@locusgraph/components 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/dist/action/button-group.d.ts +11 -0
- package/dist/action/button-group.js +27 -0
- package/dist/action/button.d.ts +10 -0
- package/dist/action/button.js +35 -0
- package/dist/action/toggle-group.d.ts +9 -0
- package/dist/action/toggle-group.js +22 -0
- package/dist/action/toggle.d.ts +9 -0
- package/dist/action/toggle.js +26 -0
- package/dist/display/avatar.d.ts +6 -0
- package/dist/display/avatar.js +14 -0
- package/dist/display/badge.d.ts +9 -0
- package/dist/display/badge.js +24 -0
- package/dist/display/chart/chart-container.d.ts +43 -0
- package/dist/display/chart/chart-container.js +59 -0
- package/dist/display/chart/chart-legend.d.ts +8 -0
- package/dist/display/chart/chart-legend.js +22 -0
- package/dist/display/chart/chart-tooltip.d.ts +13 -0
- package/dist/display/chart/chart-tooltip.js +49 -0
- package/dist/display/chat/attachment/attachment-parts.d.ts +10 -0
- package/dist/display/chat/attachment/attachment-parts.js +21 -0
- package/dist/display/chat/attachment/attachment.d.ts +16 -0
- package/dist/display/chat/attachment/attachment.js +40 -0
- package/dist/display/chat/bubble.d.ts +17 -0
- package/dist/display/chat/bubble.js +50 -0
- package/dist/display/chat/marker.d.ts +11 -0
- package/dist/display/chat/marker.js +24 -0
- package/dist/display/chat/message-scroller.d.ts +10 -0
- package/dist/display/chat/message-scroller.js +25 -0
- package/dist/display/chat/message.d.ts +10 -0
- package/dist/display/chat/message.js +21 -0
- package/dist/display/content/item.d.ts +23 -0
- package/dist/display/content/item.js +66 -0
- package/dist/display/content/kbd.d.ts +3 -0
- package/dist/display/content/kbd.js +9 -0
- package/dist/display/media/aspect-ratio.d.ts +3 -0
- package/dist/display/media/aspect-ratio.js +7 -0
- package/dist/display/media/carousel-controls.d.ts +5 -0
- package/dist/display/media/carousel-controls.js +19 -0
- package/dist/display/media/carousel.d.ts +25 -0
- package/dist/display/media/carousel.js +77 -0
- package/dist/display/rule-grid/rule-grid.d.ts +14 -0
- package/dist/display/rule-grid/rule-grid.js +35 -0
- package/dist/display/separator.d.ts +4 -0
- package/dist/display/separator.js +8 -0
- package/dist/display/status/alert.d.ts +9 -0
- package/dist/display/status/alert.js +24 -0
- package/dist/display/status/empty.d.ts +11 -0
- package/dist/display/status/empty.js +33 -0
- package/dist/display/status/progress.d.ts +4 -0
- package/dist/display/status/progress.js +8 -0
- package/dist/display/status/skeleton.d.ts +2 -0
- package/dist/display/status/skeleton.js +6 -0
- package/dist/display/status/spinner.d.ts +2 -0
- package/dist/display/status/spinner.js +7 -0
- package/dist/display/table.d.ts +10 -0
- package/dist/display/table.js +27 -0
- package/dist/feedback/toaster.d.ts +5 -0
- package/dist/feedback/toaster.js +32 -0
- package/dist/form/advanced/calendar-day-button.d.ts +4 -0
- package/dist/form/advanced/calendar-day-button.js +19 -0
- package/dist/form/advanced/calendar.d.ts +7 -0
- package/dist/form/advanced/calendar.js +64 -0
- package/dist/form/advanced/combobox/combobox-chips.d.ts +9 -0
- package/dist/form/advanced/combobox/combobox-chips.js +20 -0
- package/dist/form/advanced/combobox/combobox-items.d.ts +8 -0
- package/dist/form/advanced/combobox/combobox-items.js +24 -0
- package/dist/form/advanced/combobox/combobox.d.ts +11 -0
- package/dist/form/advanced/combobox/combobox.js +26 -0
- package/dist/form/advanced/input-otp.d.ts +11 -0
- package/dist/form/advanced/input-otp.js +21 -0
- package/dist/form/choice/checkbox.d.ts +4 -0
- package/dist/form/choice/checkbox.js +9 -0
- package/dist/form/choice/radio-group.d.ts +5 -0
- package/dist/form/choice/radio-group.js +12 -0
- package/dist/form/choice/select.d.ts +15 -0
- package/dist/form/choice/select.js +38 -0
- package/dist/form/choice/slider.d.ts +4 -0
- package/dist/form/choice/slider.js +10 -0
- package/dist/form/choice/switch.d.ts +4 -0
- package/dist/form/choice/switch.js +8 -0
- package/dist/form/field/field-error.d.ts +8 -0
- package/dist/form/field/field-error.js +20 -0
- package/dist/form/field/field-separator.d.ts +3 -0
- package/dist/form/field/field-separator.js +7 -0
- package/dist/form/field/field-set.d.ts +6 -0
- package/dist/form/field/field-set.js +9 -0
- package/dist/form/field/field-text.d.ts +6 -0
- package/dist/form/field/field-text.js +13 -0
- package/dist/form/field/field.d.ts +9 -0
- package/dist/form/field/field.js +33 -0
- package/dist/form/hook-form/form.d.ts +24 -0
- package/dist/form/hook-form/form.js +57 -0
- package/dist/form/input-group.d.ts +16 -0
- package/dist/form/input-group.js +65 -0
- package/dist/form/input.d.ts +3 -0
- package/dist/form/input.js +6 -0
- package/dist/form/label.d.ts +4 -0
- package/dist/form/label.js +8 -0
- package/dist/form/native-select.d.ts +7 -0
- package/dist/form/native-select.js +13 -0
- package/dist/form/textarea.d.ts +3 -0
- package/dist/form/textarea.js +6 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.js +95 -0
- package/dist/layout/accordion.d.ts +7 -0
- package/dist/layout/accordion.js +18 -0
- package/dist/layout/collapsible.d.ts +5 -0
- package/dist/layout/collapsible.js +13 -0
- package/dist/layout/resizable.d.ts +7 -0
- package/dist/layout/resizable.js +15 -0
- package/dist/layout/scroll/direction.d.ts +7 -0
- package/dist/layout/scroll/direction.js +8 -0
- package/dist/layout/scroll/scroll-area.d.ts +5 -0
- package/dist/layout/scroll/scroll-area.js +11 -0
- package/dist/layout/sidebar/sidebar-context.d.ts +19 -0
- package/dist/layout/sidebar/sidebar-context.js +72 -0
- package/dist/layout/sidebar/sidebar-menu-sub.d.ts +12 -0
- package/dist/layout/sidebar/sidebar-menu-sub.js +26 -0
- package/dist/layout/sidebar/sidebar-menu.d.ts +20 -0
- package/dist/layout/sidebar/sidebar-menu.js +53 -0
- package/dist/layout/sidebar/sidebar-sections.d.ts +17 -0
- package/dist/layout/sidebar/sidebar-sections.js +37 -0
- package/dist/layout/sidebar/sidebar.d.ts +11 -0
- package/dist/layout/sidebar/sidebar.js +40 -0
- package/dist/layout/tabs.d.ts +11 -0
- package/dist/layout/tabs.js +30 -0
- package/dist/layout/use-mobile.d.ts +1 -0
- package/dist/layout/use-mobile.js +15 -0
- package/dist/navigation/breadcrumb.d.ts +11 -0
- package/dist/navigation/breadcrumb.js +27 -0
- package/dist/navigation/menubar/menubar-items.d.ts +15 -0
- package/dist/navigation/menubar/menubar-items.js +27 -0
- package/dist/navigation/menubar/menubar-sub.d.ts +8 -0
- package/dist/navigation/menubar/menubar-sub.js +15 -0
- package/dist/navigation/menubar/menubar.d.ts +9 -0
- package/dist/navigation/menubar/menubar.js +23 -0
- package/dist/navigation/navigation-menu.d.ts +14 -0
- package/dist/navigation/navigation-menu.js +31 -0
- package/dist/navigation/pagination.d.ts +13 -0
- package/dist/navigation/pagination.js +29 -0
- package/dist/overlay/alert-dialog.d.ts +18 -0
- package/dist/overlay/alert-dialog.js +42 -0
- package/dist/overlay/context-menu/context-menu-items.d.ts +15 -0
- package/dist/overlay/context-menu/context-menu-items.js +27 -0
- package/dist/overlay/context-menu/context-menu-sub.d.ts +8 -0
- package/dist/overlay/context-menu/context-menu-sub.js +15 -0
- package/dist/overlay/context-menu/context-menu.d.ts +8 -0
- package/dist/overlay/context-menu/context-menu.js +20 -0
- package/dist/overlay/dialog.d.ts +16 -0
- package/dist/overlay/dialog.js +40 -0
- package/dist/overlay/floating/command.d.ts +18 -0
- package/dist/overlay/floating/command.js +34 -0
- package/dist/overlay/floating/drawer.d.ts +13 -0
- package/dist/overlay/floating/drawer.js +35 -0
- package/dist/overlay/floating/hover-card.d.ts +6 -0
- package/dist/overlay/floating/hover-card.js +14 -0
- package/dist/overlay/menu/dropdown-menu-choice.d.ts +6 -0
- package/dist/overlay/menu/dropdown-menu-choice.js +15 -0
- package/dist/overlay/menu/dropdown-menu-item.d.ts +12 -0
- package/dist/overlay/menu/dropdown-menu-item.js +17 -0
- package/dist/overlay/menu/dropdown-menu-sub.d.ts +8 -0
- package/dist/overlay/menu/dropdown-menu-sub.js +15 -0
- package/dist/overlay/menu/dropdown-menu.d.ts +8 -0
- package/dist/overlay/menu/dropdown-menu.js +20 -0
- package/dist/overlay/popover.d.ts +6 -0
- package/dist/overlay/popover.js +14 -0
- package/dist/overlay/sheet.d.ts +14 -0
- package/dist/overlay/sheet.js +40 -0
- package/dist/overlay/tooltip.d.ts +7 -0
- package/dist/overlay/tooltip.js +17 -0
- package/dist/shell/app-header.d.ts +11 -0
- package/dist/shell/app-header.js +10 -0
- package/dist/shell/app-shell.d.ts +10 -0
- package/dist/shell/app-shell.js +8 -0
- package/dist/shell/breadcrumbs.d.ts +12 -0
- package/dist/shell/breadcrumbs.js +18 -0
- package/dist/shell/docs/docs-header.d.ts +22 -0
- package/dist/shell/docs/docs-header.js +20 -0
- package/dist/shell/docs/docs-shell.d.ts +9 -0
- package/dist/shell/docs/docs-shell.js +7 -0
- package/dist/shell/docs/docs-sidebar.d.ts +17 -0
- package/dist/shell/docs/docs-sidebar.js +12 -0
- package/dist/shell/docs/on-this-page.d.ts +11 -0
- package/dist/shell/docs/on-this-page.js +12 -0
- package/dist/shell/docs/use-active-section.d.ts +2 -0
- package/dist/shell/docs/use-active-section.js +54 -0
- package/dist/shell/link.d.ts +4 -0
- package/dist/shell/link.js +1 -0
- package/dist/shell/navigation/app-sidebar.d.ts +19 -0
- package/dist/shell/navigation/app-sidebar.js +12 -0
- package/dist/shell/navigation/nav-group.d.ts +23 -0
- package/dist/shell/navigation/nav-group.js +17 -0
- package/dist/shell/theme-toggle.d.ts +7 -0
- package/dist/shell/theme-toggle.js +9 -0
- package/dist/styles/theme.css +4 -0
- package/package.json +65 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
|
|
5
|
+
variants: {
|
|
6
|
+
orientation: {
|
|
7
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
8
|
+
horizontal: [
|
|
9
|
+
"flex-row items-center",
|
|
10
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
11
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
12
|
+
],
|
|
13
|
+
responsive: [
|
|
14
|
+
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
15
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
16
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
orientation: "vertical",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
25
|
+
return (_jsx("div", { role: "group", "data-slot": "field", "data-orientation": orientation, className: cn(fieldVariants({ orientation }), className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function FieldGroup({ className, ...props }) {
|
|
28
|
+
return (_jsx("div", { "data-slot": "field-group", className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function FieldContent({ className, ...props }) {
|
|
31
|
+
return (_jsx("div", { "data-slot": "field-content", className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
export { Field, FieldContent, FieldGroup, fieldVariants };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as LabelPrimitive from "radix-ui/label";
|
|
2
|
+
import * as Slot from "radix-ui/slot";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
5
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getErrors, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
7
|
+
declare const useFormField: () => {
|
|
8
|
+
invalid: boolean;
|
|
9
|
+
isDirty: boolean;
|
|
10
|
+
isTouched: boolean;
|
|
11
|
+
isValidating: boolean;
|
|
12
|
+
error?: import("react-hook-form").FieldError | undefined;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
formItemId: string;
|
|
16
|
+
formDescriptionId: string;
|
|
17
|
+
formMessageId: string;
|
|
18
|
+
};
|
|
19
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
20
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
|
|
21
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>): React.JSX.Element;
|
|
22
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
23
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element | null;
|
|
24
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
|
|
7
|
+
import { Label } from "../label";
|
|
8
|
+
const Form = FormProvider;
|
|
9
|
+
const FormFieldContext = React.createContext({});
|
|
10
|
+
const FormField = ({ ...props }) => {
|
|
11
|
+
return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
|
|
12
|
+
};
|
|
13
|
+
const useFormField = () => {
|
|
14
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
15
|
+
const itemContext = React.useContext(FormItemContext);
|
|
16
|
+
const { getFieldState } = useFormContext();
|
|
17
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
18
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
19
|
+
if (!fieldContext) {
|
|
20
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
21
|
+
}
|
|
22
|
+
const { id } = itemContext;
|
|
23
|
+
return {
|
|
24
|
+
id,
|
|
25
|
+
name: fieldContext.name,
|
|
26
|
+
formItemId: `${id}-form-item`,
|
|
27
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
28
|
+
formMessageId: `${id}-form-item-message`,
|
|
29
|
+
...fieldState,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const FormItemContext = React.createContext({});
|
|
33
|
+
function FormItem({ className, ...props }) {
|
|
34
|
+
const id = React.useId();
|
|
35
|
+
return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) }));
|
|
36
|
+
}
|
|
37
|
+
function FormLabel({ className, ...props }) {
|
|
38
|
+
const { error, formItemId } = useFormField();
|
|
39
|
+
return (_jsx(Label, { "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive", className), htmlFor: formItemId, ...props }));
|
|
40
|
+
}
|
|
41
|
+
function FormControl({ ...props }) {
|
|
42
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
43
|
+
return (_jsx(Slot.Root, { "data-slot": "form-control", id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
|
|
44
|
+
}
|
|
45
|
+
function FormDescription({ className, ...props }) {
|
|
46
|
+
const { formDescriptionId } = useFormField();
|
|
47
|
+
return (_jsx("p", { "data-slot": "form-description", id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
48
|
+
}
|
|
49
|
+
function FormMessage({ className, ...props }) {
|
|
50
|
+
const { error, formMessageId } = useFormField();
|
|
51
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
52
|
+
if (!body) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return (_jsx("p", { "data-slot": "form-message", id: formMessageId, className: cn("text-sm text-destructive", className), ...props, children: body }));
|
|
56
|
+
}
|
|
57
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button } from "../action/button";
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "icon-sm" | "icon-xs" | "sm" | "xs" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
|
|
13
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
14
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
15
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
16
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { Button } from "../action/button";
|
|
6
|
+
import { Input } from "./input";
|
|
7
|
+
import { Textarea } from "./textarea";
|
|
8
|
+
const inputGroupAlignmentClasses = [
|
|
9
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
10
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
11
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
12
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
13
|
+
];
|
|
14
|
+
const inputGroupFocusClasses = "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring";
|
|
15
|
+
const inputGroupErrorClasses = "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40";
|
|
16
|
+
function InputGroup({ className, ...props }) {
|
|
17
|
+
return (_jsx("div", { "data-slot": "input-group", role: "group", className: cn("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30", "h-9 min-w-0 has-[>textarea]:h-auto", inputGroupAlignmentClasses, inputGroupFocusClasses, inputGroupErrorClasses, className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
20
|
+
variants: {
|
|
21
|
+
align: {
|
|
22
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
23
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
24
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
25
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
align: "inline-start",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
33
|
+
return (_jsx("div", { role: "group", "data-slot": "input-group-addon", "data-align": align, className: cn(inputGroupAddonVariants({ align }), className), onClick: (e) => {
|
|
34
|
+
if (e.target.closest("button")) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
38
|
+
}, ...props }));
|
|
39
|
+
}
|
|
40
|
+
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
41
|
+
variants: {
|
|
42
|
+
size: {
|
|
43
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
44
|
+
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
45
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
46
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
size: "xs",
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
54
|
+
return (_jsx(Button, { type: type, "data-size": size, variant: variant, className: cn(inputGroupButtonVariants({ size }), className), ...props }));
|
|
55
|
+
}
|
|
56
|
+
function InputGroupText({ className, ...props }) {
|
|
57
|
+
return (_jsx("span", { className: cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
58
|
+
}
|
|
59
|
+
function InputGroupInput({ className, ...props }) {
|
|
60
|
+
return (_jsx(Input, { "data-slot": "input-group-control", className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className), ...props }));
|
|
61
|
+
}
|
|
62
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
63
|
+
return (_jsx(Textarea, { "data-slot": "input-group-control", className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className), ...props }));
|
|
64
|
+
}
|
|
65
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
function Input({ className, type, ...props }) {
|
|
4
|
+
return (_jsx("input", { type: type, "data-slot": "input", className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none 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-1 focus-visible:ring-ring", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Input };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as LabelPrimitive from "radix-ui/label";
|
|
5
|
+
function Label({ className, ...props }) {
|
|
6
|
+
return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("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", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
export { Label };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function NativeSelect({ className, size, ...props }: Omit<React.ComponentProps<"select">, "size"> & {
|
|
3
|
+
size?: "sm" | "default";
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
declare function NativeSelectOption({ className, ...props }: React.ComponentProps<"option">): React.JSX.Element;
|
|
6
|
+
declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">): React.JSX.Element;
|
|
7
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
5
|
+
return (_jsxs("div", { className: "group/native-select relative w-fit has-[select:disabled]:opacity-50", "data-slot": "native-select-wrapper", children: [_jsx("select", { "data-slot": "native-select", "data-size": size, className: cn("h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), ...props }), _jsx(ChevronDownIcon, { className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none", "aria-hidden": "true", "data-slot": "native-select-icon" })] }));
|
|
6
|
+
}
|
|
7
|
+
function NativeSelectOption({ className, ...props }) {
|
|
8
|
+
return (_jsx("option", { "data-slot": "native-select-option", className: cn("bg-[Canvas] text-[CanvasText]", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
11
|
+
return (_jsx("optgroup", { "data-slot": "native-select-optgroup", className: cn("bg-[Canvas] text-[CanvasText]", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
function Textarea({ className, ...props }) {
|
|
4
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Textarea };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export { cn } from "cn";
|
|
2
|
+
export * from "./action/button";
|
|
3
|
+
export * from "./action/button-group";
|
|
4
|
+
export * from "./action/toggle";
|
|
5
|
+
export * from "./action/toggle-group";
|
|
6
|
+
export * from "./display/avatar";
|
|
7
|
+
export * from "./display/badge";
|
|
8
|
+
export * from "./display/chart/chart-container";
|
|
9
|
+
export * from "./display/chart/chart-legend";
|
|
10
|
+
export * from "./display/chart/chart-tooltip";
|
|
11
|
+
export * from "./display/chat/attachment/attachment";
|
|
12
|
+
export * from "./display/chat/attachment/attachment-parts";
|
|
13
|
+
export * from "./display/chat/bubble";
|
|
14
|
+
export * from "./display/chat/marker";
|
|
15
|
+
export * from "./display/chat/message";
|
|
16
|
+
export * from "./display/chat/message-scroller";
|
|
17
|
+
export * from "./display/content/item";
|
|
18
|
+
export * from "./display/content/kbd";
|
|
19
|
+
export * from "./display/media/aspect-ratio";
|
|
20
|
+
export * from "./display/media/carousel";
|
|
21
|
+
export * from "./display/media/carousel-controls";
|
|
22
|
+
export * from "./display/rule-grid/rule-grid";
|
|
23
|
+
export * from "./display/separator";
|
|
24
|
+
export * from "./display/status/alert";
|
|
25
|
+
export * from "./display/status/empty";
|
|
26
|
+
export * from "./display/status/progress";
|
|
27
|
+
export * from "./display/status/skeleton";
|
|
28
|
+
export * from "./display/status/spinner";
|
|
29
|
+
export * from "./display/table";
|
|
30
|
+
export * from "./feedback/toaster";
|
|
31
|
+
export * from "./form/advanced/calendar";
|
|
32
|
+
export * from "./form/advanced/calendar-day-button";
|
|
33
|
+
export * from "./form/advanced/combobox/combobox";
|
|
34
|
+
export * from "./form/advanced/combobox/combobox-chips";
|
|
35
|
+
export * from "./form/advanced/combobox/combobox-items";
|
|
36
|
+
export * from "./form/advanced/input-otp";
|
|
37
|
+
export * from "./form/choice/checkbox";
|
|
38
|
+
export * from "./form/choice/radio-group";
|
|
39
|
+
export * from "./form/choice/select";
|
|
40
|
+
export * from "./form/choice/slider";
|
|
41
|
+
export * from "./form/choice/switch";
|
|
42
|
+
export * from "./form/field/field";
|
|
43
|
+
export * from "./form/field/field-error";
|
|
44
|
+
export * from "./form/field/field-separator";
|
|
45
|
+
export * from "./form/field/field-set";
|
|
46
|
+
export * from "./form/field/field-text";
|
|
47
|
+
export * from "./form/hook-form/form";
|
|
48
|
+
export * from "./form/input";
|
|
49
|
+
export * from "./form/input-group";
|
|
50
|
+
export * from "./form/label";
|
|
51
|
+
export * from "./form/native-select";
|
|
52
|
+
export * from "./form/textarea";
|
|
53
|
+
export * from "./layout/accordion";
|
|
54
|
+
export * from "./layout/collapsible";
|
|
55
|
+
export * from "./layout/resizable";
|
|
56
|
+
export * from "./layout/scroll/direction";
|
|
57
|
+
export * from "./layout/scroll/scroll-area";
|
|
58
|
+
export * from "./layout/sidebar/sidebar";
|
|
59
|
+
export { SidebarProvider, useSidebar } from "./layout/sidebar/sidebar-context";
|
|
60
|
+
export * from "./layout/sidebar/sidebar-menu";
|
|
61
|
+
export * from "./layout/sidebar/sidebar-menu-sub";
|
|
62
|
+
export * from "./layout/sidebar/sidebar-sections";
|
|
63
|
+
export * from "./layout/tabs";
|
|
64
|
+
export * from "./layout/use-mobile";
|
|
65
|
+
export * from "./navigation/breadcrumb";
|
|
66
|
+
export * from "./navigation/menubar/menubar";
|
|
67
|
+
export * from "./navigation/menubar/menubar-items";
|
|
68
|
+
export * from "./navigation/menubar/menubar-sub";
|
|
69
|
+
export * from "./navigation/navigation-menu";
|
|
70
|
+
export * from "./navigation/pagination";
|
|
71
|
+
export * from "./overlay/alert-dialog";
|
|
72
|
+
export * from "./overlay/context-menu/context-menu";
|
|
73
|
+
export * from "./overlay/context-menu/context-menu-items";
|
|
74
|
+
export * from "./overlay/context-menu/context-menu-sub";
|
|
75
|
+
export * from "./overlay/dialog";
|
|
76
|
+
export * from "./overlay/floating/command";
|
|
77
|
+
export * from "./overlay/floating/drawer";
|
|
78
|
+
export * from "./overlay/floating/hover-card";
|
|
79
|
+
export * from "./overlay/menu/dropdown-menu";
|
|
80
|
+
export * from "./overlay/menu/dropdown-menu-choice";
|
|
81
|
+
export * from "./overlay/menu/dropdown-menu-item";
|
|
82
|
+
export * from "./overlay/menu/dropdown-menu-sub";
|
|
83
|
+
export * from "./overlay/popover";
|
|
84
|
+
export * from "./overlay/sheet";
|
|
85
|
+
export * from "./overlay/tooltip";
|
|
86
|
+
export * from "./shell/app-header";
|
|
87
|
+
export * from "./shell/app-shell";
|
|
88
|
+
export * from "./shell/breadcrumbs";
|
|
89
|
+
export * from "./shell/docs/docs-header";
|
|
90
|
+
export * from "./shell/docs/docs-shell";
|
|
91
|
+
export * from "./shell/docs/docs-sidebar";
|
|
92
|
+
export * from "./shell/docs/on-this-page";
|
|
93
|
+
export * from "./shell/link";
|
|
94
|
+
export * from "./shell/navigation/app-sidebar";
|
|
95
|
+
export type { AppNavGroup, AppNavItem } from "./shell/navigation/nav-group";
|
|
96
|
+
export * from "./shell/theme-toggle";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export { cn } from "cn";
|
|
2
|
+
export * from "./action/button";
|
|
3
|
+
export * from "./action/button-group";
|
|
4
|
+
export * from "./action/toggle";
|
|
5
|
+
export * from "./action/toggle-group";
|
|
6
|
+
export * from "./display/avatar";
|
|
7
|
+
export * from "./display/badge";
|
|
8
|
+
export * from "./display/chart/chart-container";
|
|
9
|
+
export * from "./display/chart/chart-legend";
|
|
10
|
+
export * from "./display/chart/chart-tooltip";
|
|
11
|
+
export * from "./display/chat/attachment/attachment";
|
|
12
|
+
export * from "./display/chat/attachment/attachment-parts";
|
|
13
|
+
export * from "./display/chat/bubble";
|
|
14
|
+
export * from "./display/chat/marker";
|
|
15
|
+
export * from "./display/chat/message";
|
|
16
|
+
export * from "./display/chat/message-scroller";
|
|
17
|
+
export * from "./display/content/item";
|
|
18
|
+
export * from "./display/content/kbd";
|
|
19
|
+
export * from "./display/media/aspect-ratio";
|
|
20
|
+
export * from "./display/media/carousel";
|
|
21
|
+
export * from "./display/media/carousel-controls";
|
|
22
|
+
export * from "./display/rule-grid/rule-grid";
|
|
23
|
+
export * from "./display/separator";
|
|
24
|
+
export * from "./display/status/alert";
|
|
25
|
+
export * from "./display/status/empty";
|
|
26
|
+
export * from "./display/status/progress";
|
|
27
|
+
export * from "./display/status/skeleton";
|
|
28
|
+
export * from "./display/status/spinner";
|
|
29
|
+
export * from "./display/table";
|
|
30
|
+
export * from "./feedback/toaster";
|
|
31
|
+
export * from "./form/advanced/calendar";
|
|
32
|
+
export * from "./form/advanced/calendar-day-button";
|
|
33
|
+
export * from "./form/advanced/combobox/combobox";
|
|
34
|
+
export * from "./form/advanced/combobox/combobox-chips";
|
|
35
|
+
export * from "./form/advanced/combobox/combobox-items";
|
|
36
|
+
export * from "./form/advanced/input-otp";
|
|
37
|
+
export * from "./form/choice/checkbox";
|
|
38
|
+
export * from "./form/choice/radio-group";
|
|
39
|
+
export * from "./form/choice/select";
|
|
40
|
+
export * from "./form/choice/slider";
|
|
41
|
+
export * from "./form/choice/switch";
|
|
42
|
+
export * from "./form/field/field";
|
|
43
|
+
export * from "./form/field/field-error";
|
|
44
|
+
export * from "./form/field/field-separator";
|
|
45
|
+
export * from "./form/field/field-set";
|
|
46
|
+
export * from "./form/field/field-text";
|
|
47
|
+
export * from "./form/hook-form/form";
|
|
48
|
+
export * from "./form/input";
|
|
49
|
+
export * from "./form/input-group";
|
|
50
|
+
export * from "./form/label";
|
|
51
|
+
export * from "./form/native-select";
|
|
52
|
+
export * from "./form/textarea";
|
|
53
|
+
export * from "./layout/accordion";
|
|
54
|
+
export * from "./layout/collapsible";
|
|
55
|
+
export * from "./layout/resizable";
|
|
56
|
+
export * from "./layout/scroll/direction";
|
|
57
|
+
export * from "./layout/scroll/scroll-area";
|
|
58
|
+
export * from "./layout/sidebar/sidebar";
|
|
59
|
+
export { SidebarProvider, useSidebar } from "./layout/sidebar/sidebar-context";
|
|
60
|
+
export * from "./layout/sidebar/sidebar-menu";
|
|
61
|
+
export * from "./layout/sidebar/sidebar-menu-sub";
|
|
62
|
+
export * from "./layout/sidebar/sidebar-sections";
|
|
63
|
+
export * from "./layout/tabs";
|
|
64
|
+
export * from "./layout/use-mobile";
|
|
65
|
+
export * from "./navigation/breadcrumb";
|
|
66
|
+
export * from "./navigation/menubar/menubar";
|
|
67
|
+
export * from "./navigation/menubar/menubar-items";
|
|
68
|
+
export * from "./navigation/menubar/menubar-sub";
|
|
69
|
+
export * from "./navigation/navigation-menu";
|
|
70
|
+
export * from "./navigation/pagination";
|
|
71
|
+
export * from "./overlay/alert-dialog";
|
|
72
|
+
export * from "./overlay/context-menu/context-menu";
|
|
73
|
+
export * from "./overlay/context-menu/context-menu-items";
|
|
74
|
+
export * from "./overlay/context-menu/context-menu-sub";
|
|
75
|
+
export * from "./overlay/dialog";
|
|
76
|
+
export * from "./overlay/floating/command";
|
|
77
|
+
export * from "./overlay/floating/drawer";
|
|
78
|
+
export * from "./overlay/floating/hover-card";
|
|
79
|
+
export * from "./overlay/menu/dropdown-menu";
|
|
80
|
+
export * from "./overlay/menu/dropdown-menu-choice";
|
|
81
|
+
export * from "./overlay/menu/dropdown-menu-item";
|
|
82
|
+
export * from "./overlay/menu/dropdown-menu-sub";
|
|
83
|
+
export * from "./overlay/popover";
|
|
84
|
+
export * from "./overlay/sheet";
|
|
85
|
+
export * from "./overlay/tooltip";
|
|
86
|
+
export * from "./shell/app-header";
|
|
87
|
+
export * from "./shell/app-shell";
|
|
88
|
+
export * from "./shell/breadcrumbs";
|
|
89
|
+
export * from "./shell/docs/docs-header";
|
|
90
|
+
export * from "./shell/docs/docs-shell";
|
|
91
|
+
export * from "./shell/docs/docs-sidebar";
|
|
92
|
+
export * from "./shell/docs/on-this-page";
|
|
93
|
+
export * from "./shell/link";
|
|
94
|
+
export * from "./shell/navigation/app-sidebar";
|
|
95
|
+
export * from "./shell/theme-toggle";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "radix-ui/accordion";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare function Accordion(props: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import * as AccordionPrimitive from "radix-ui/accordion";
|
|
6
|
+
function Accordion(props) {
|
|
7
|
+
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
8
|
+
}
|
|
9
|
+
function AccordionItem({ className, ...props }) {
|
|
10
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("border-b last:border-b-0", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
13
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" })] }) }));
|
|
14
|
+
}
|
|
15
|
+
function AccordionContent({ className, children, ...props }) {
|
|
16
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn("pt-0 pb-4", className), children: children }) }));
|
|
17
|
+
}
|
|
18
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "radix-ui/collapsible";
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as CollapsiblePrimitive from "radix-ui/collapsible";
|
|
4
|
+
function Collapsible({ ...props }) {
|
|
5
|
+
return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
6
|
+
}
|
|
7
|
+
function CollapsibleTrigger({ ...props }) {
|
|
8
|
+
return _jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
|
|
9
|
+
}
|
|
10
|
+
function CollapsibleContent({ ...props }) {
|
|
11
|
+
return _jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
|
|
12
|
+
}
|
|
13
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
|
|
3
|
+
declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
|
|
4
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
5
|
+
withHandle?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { GripVerticalIcon } from "lucide-react";
|
|
5
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function ResizablePanel({ ...props }) {
|
|
10
|
+
return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
11
|
+
}
|
|
12
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
13
|
+
return (_jsx(ResizablePrimitive.Separator, { "data-slot": "resizable-handle", className: cn("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: _jsx(GripVerticalIcon, { className: "size-2.5" }) })) }));
|
|
14
|
+
}
|
|
15
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Direction from "radix-ui/direction";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function DirectionProvider({ dir, direction, children, }: React.ComponentProps<typeof Direction.DirectionProvider> & {
|
|
4
|
+
direction?: React.ComponentProps<typeof Direction.DirectionProvider>["dir"];
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare const useDirection: typeof Direction.useDirection;
|
|
7
|
+
export { DirectionProvider, useDirection };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as Direction from "radix-ui/direction";
|
|
4
|
+
function DirectionProvider({ dir, direction, children, }) {
|
|
5
|
+
return (_jsx(Direction.DirectionProvider, { dir: direction ?? dir, children: children }));
|
|
6
|
+
}
|
|
7
|
+
const useDirection = Direction.useDirection;
|
|
8
|
+
export { DirectionProvider, useDirection };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from "radix-ui/scroll-area";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
|
|
5
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as ScrollAreaPrimitive from "radix-ui/scroll-area";
|
|
5
|
+
function ScrollArea({ className, children, ...props }) {
|
|
6
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
7
|
+
}
|
|
8
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
9
|
+
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-border" }) }));
|
|
10
|
+
}
|
|
11
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
3
|
+
type SidebarContextProps = {
|
|
4
|
+
state: "expanded" | "collapsed";
|
|
5
|
+
open: boolean;
|
|
6
|
+
setOpen: (open: boolean) => void;
|
|
7
|
+
openMobile: boolean;
|
|
8
|
+
setOpenMobile: (open: boolean) => void;
|
|
9
|
+
isMobile: boolean;
|
|
10
|
+
toggleSidebar: () => void;
|
|
11
|
+
};
|
|
12
|
+
declare function useSidebar(): SidebarContextProps;
|
|
13
|
+
declare const sidebarMobileHitArea = "after:absolute after:-inset-2 md:after:hidden";
|
|
14
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
open?: boolean;
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
export { SIDEBAR_WIDTH_MOBILE, SidebarProvider, sidebarMobileHitArea, useSidebar };
|