@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,50 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
|
+
function BubbleGroup({ className, ...props }) {
|
|
6
|
+
return (_jsx("div", { "data-slot": "bubble-group", className: cn("flex min-w-0 flex-col gap-2", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
const bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
12
|
+
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
13
|
+
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
14
|
+
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
15
|
+
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
16
|
+
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
17
|
+
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
function Bubble({ variant = "default", align = "start", className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "bubble", "data-variant": variant, "data-align": align, className: cn(bubbleVariants({ variant }), className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function BubbleContent({ asChild = false, className, ...props }) {
|
|
28
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
29
|
+
return (_jsx(Comp, { "data-slot": "bubble-content", className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
const bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
|
|
32
|
+
variants: {
|
|
33
|
+
side: {
|
|
34
|
+
top: "top-0 -translate-y-3/4",
|
|
35
|
+
bottom: "bottom-0 translate-y-3/4",
|
|
36
|
+
},
|
|
37
|
+
align: {
|
|
38
|
+
start: "left-3",
|
|
39
|
+
end: "right-3",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
side: "bottom",
|
|
44
|
+
align: "end",
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
function BubbleReactions({ side = "bottom", align = "end", className, ...props }) {
|
|
48
|
+
return (_jsx("div", { "data-slot": "bubble-reactions", "data-align": align, "data-side": side, className: cn(bubbleReactionsVariants({ side, align }), className), ...props }));
|
|
49
|
+
}
|
|
50
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const markerVariants: (props?: ({
|
|
4
|
+
variant?: "border" | "default" | "separator" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Marker({ className, variant, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof markerVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function MarkerIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
declare function MarkerContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
|
+
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
|
+
const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "",
|
|
9
|
+
separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
10
|
+
border: "border-b border-border pb-2",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
function Marker({ className, variant = "default", asChild = false, ...props }) {
|
|
15
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
16
|
+
return (_jsx(Comp, { "data-slot": "marker", "data-variant": variant, className: cn(markerVariants({ variant, className })), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function MarkerIcon({ className, ...props }) {
|
|
19
|
+
return (_jsx("span", { "data-slot": "marker-icon", "aria-hidden": "true", className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function MarkerContent({ className, ...props }) {
|
|
22
|
+
return (_jsx("span", { "data-slot": "marker-content", className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button } from "../../action/button";
|
|
4
|
+
declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>): React.JSX.Element;
|
|
5
|
+
declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>): React.JSX.Element;
|
|
6
|
+
declare function MessageScrollerViewport({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>): React.JSX.Element;
|
|
7
|
+
declare function MessageScrollerContent({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Content>): React.JSX.Element;
|
|
8
|
+
declare function MessageScrollerItem({ className, scrollAnchor, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Item>): React.JSX.Element;
|
|
9
|
+
declare function MessageScrollerButton({ direction, className, children, render, variant, size, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Button> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
|
|
10
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from "@shadcn/react/message-scroller";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { ArrowDownIcon } from "lucide-react";
|
|
6
|
+
import { Button } from "../../action/button";
|
|
7
|
+
function MessageScrollerProvider(props) {
|
|
8
|
+
return _jsx(MessageScrollerPrimitive.Provider, { ...props });
|
|
9
|
+
}
|
|
10
|
+
function MessageScroller({ className, ...props }) {
|
|
11
|
+
return (_jsx(MessageScrollerPrimitive.Root, { "data-slot": "message-scroller", className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function MessageScrollerViewport({ className, ...props }) {
|
|
14
|
+
return (_jsx(MessageScrollerPrimitive.Viewport, { "data-slot": "message-scroller-viewport", className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-none data-pending-scroll:invisible", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function MessageScrollerContent({ className, ...props }) {
|
|
17
|
+
return (_jsx(MessageScrollerPrimitive.Content, { "data-slot": "message-scroller-content", className: cn("flex h-max min-h-full flex-col gap-8", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
|
|
20
|
+
return (_jsx(MessageScrollerPrimitive.Item, { "data-slot": "message-scroller-item", scrollAnchor: scrollAnchor, className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
|
|
23
|
+
return (_jsx(MessageScrollerPrimitive.Button, { "data-slot": "message-scroller-button", "data-direction": direction, "data-variant": variant, "data-size": size, direction: direction, className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className), render: render ?? _jsx(Button, { variant: variant, size: size }), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(ArrowDownIcon, {}), _jsx("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })] })) }));
|
|
24
|
+
}
|
|
25
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function MessageGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function Message({ className, align, ...props }: React.ComponentProps<"div"> & {
|
|
4
|
+
align?: "start" | "end";
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function MessageAvatar({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function MessageContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function MessageHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function MessageFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
function MessageGroup({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "message-group", className: cn("flex min-w-0 flex-col gap-2", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function Message({ className, align = "start", ...props }) {
|
|
7
|
+
return (_jsx("div", { "data-slot": "message", "data-align": align, className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function MessageAvatar({ className, ...props }) {
|
|
10
|
+
return (_jsx("div", { "data-slot": "message-avatar", className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function MessageContent({ className, ...props }) {
|
|
13
|
+
return (_jsx("div", { "data-slot": "message-content", className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function MessageHeader({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "message-header", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function MessageFooter({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "message-footer", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Separator } from "../separator";
|
|
4
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
6
|
+
declare const itemVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "muted" | "outline" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
declare const itemMediaVariants: (props?: ({
|
|
14
|
+
variant?: "default" | "icon" | "image" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
17
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
18
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
20
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
21
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
22
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
23
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
|
+
import { Separator } from "../separator";
|
|
6
|
+
function ItemGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx("div", { role: "list", "data-slot": "item-group", className: cn("group/item-group flex flex-col", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function ItemSeparator({ className, ...props }) {
|
|
10
|
+
return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn("my-0", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
const itemVariants = cva("group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background [a]:transition-colors [a]:hover:bg-accent/50", {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "bg-transparent",
|
|
16
|
+
outline: "border-border",
|
|
17
|
+
muted: "bg-muted/50",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "gap-4 p-4",
|
|
21
|
+
sm: "gap-2.5 px-4 py-3",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default",
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
function Item({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
30
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
31
|
+
return (_jsx(Comp, { "data-slot": "item", "data-variant": variant, "data-size": size, className: cn(itemVariants({ variant, size, className })), ...props }));
|
|
32
|
+
}
|
|
33
|
+
const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", {
|
|
34
|
+
variants: {
|
|
35
|
+
variant: {
|
|
36
|
+
default: "bg-transparent",
|
|
37
|
+
icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
38
|
+
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: "default",
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
function ItemMedia({ className, variant = "default", ...props }) {
|
|
46
|
+
return (_jsx("div", { "data-slot": "item-media", "data-variant": variant, className: cn(itemMediaVariants({ variant, className })), ...props }));
|
|
47
|
+
}
|
|
48
|
+
function ItemContent({ className, ...props }) {
|
|
49
|
+
return (_jsx("div", { "data-slot": "item-content", className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
function ItemTitle({ className, ...props }) {
|
|
52
|
+
return (_jsx("div", { "data-slot": "item-title", className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className), ...props }));
|
|
53
|
+
}
|
|
54
|
+
function ItemDescription({ className, ...props }) {
|
|
55
|
+
return (_jsx("p", { "data-slot": "item-description", className: cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
|
|
56
|
+
}
|
|
57
|
+
function ItemActions({ className, ...props }) {
|
|
58
|
+
return (_jsx("div", { "data-slot": "item-actions", className: cn("flex items-center gap-2", className), ...props }));
|
|
59
|
+
}
|
|
60
|
+
function ItemHeader({ className, ...props }) {
|
|
61
|
+
return (_jsx("div", { "data-slot": "item-header", className: cn("flex basis-full items-center justify-between gap-2", className), ...props }));
|
|
62
|
+
}
|
|
63
|
+
function ItemFooter({ className, ...props }) {
|
|
64
|
+
return (_jsx("div", { "data-slot": "item-footer", className: cn("flex basis-full items-center justify-between gap-2", className), ...props }));
|
|
65
|
+
}
|
|
66
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
function Kbd({ className, ...props }) {
|
|
4
|
+
return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function KbdGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx("kbd", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
export { Kbd, KbdGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as AspectRatioPrimitive from "radix-ui/aspect-ratio";
|
|
4
|
+
function AspectRatio({ ...props }) {
|
|
5
|
+
return _jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
6
|
+
}
|
|
7
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Button } from "../../action/button";
|
|
3
|
+
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
4
|
+
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
5
|
+
export { CarouselNext, CarouselPrevious };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
5
|
+
import { Button } from "../../action/button";
|
|
6
|
+
import { useCarousel } from "./carousel";
|
|
7
|
+
function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
|
|
8
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
9
|
+
return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn("absolute size-8 rounded-full", orientation === "horizontal"
|
|
10
|
+
? "top-1/2 -left-12 -translate-y-1/2"
|
|
11
|
+
: "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [_jsx(ArrowLeft, {}), _jsx("span", { className: "sr-only", children: "Previous slide" })] }));
|
|
12
|
+
}
|
|
13
|
+
function CarouselNext({ className, variant = "outline", size = "icon", ...props }) {
|
|
14
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
15
|
+
return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn("absolute size-8 rounded-full", orientation === "horizontal"
|
|
16
|
+
? "top-1/2 -right-12 -translate-y-1/2"
|
|
17
|
+
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [_jsx(ArrowRight, {}), _jsx("span", { className: "sr-only", children: "Next slide" })] }));
|
|
18
|
+
}
|
|
19
|
+
export { CarouselNext, CarouselPrevious };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
4
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
5
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
6
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
7
|
+
type CarouselProps = {
|
|
8
|
+
opts?: CarouselOptions;
|
|
9
|
+
plugins?: CarouselPlugin;
|
|
10
|
+
orientation?: "horizontal" | "vertical";
|
|
11
|
+
setApi?: (api: CarouselApi) => void;
|
|
12
|
+
};
|
|
13
|
+
type CarouselContextProps = {
|
|
14
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
15
|
+
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
16
|
+
scrollPrev: () => void;
|
|
17
|
+
scrollNext: () => void;
|
|
18
|
+
canScrollPrev: boolean;
|
|
19
|
+
canScrollNext: boolean;
|
|
20
|
+
} & CarouselProps;
|
|
21
|
+
declare function useCarousel(): CarouselContextProps;
|
|
22
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): React.JSX.Element;
|
|
23
|
+
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
24
|
+
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
25
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, useCarousel };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
const CarouselContext = React.createContext(null);
|
|
7
|
+
function useCarousel() {
|
|
8
|
+
const context = React.useContext(CarouselContext);
|
|
9
|
+
if (!context) {
|
|
10
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
11
|
+
}
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
|
|
15
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
16
|
+
...opts,
|
|
17
|
+
axis: orientation === "horizontal" ? "x" : "y",
|
|
18
|
+
}, plugins);
|
|
19
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
20
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
21
|
+
const onSelect = React.useCallback((api) => {
|
|
22
|
+
if (!api)
|
|
23
|
+
return;
|
|
24
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
25
|
+
setCanScrollNext(api.canScrollNext());
|
|
26
|
+
}, []);
|
|
27
|
+
const scrollPrev = React.useCallback(() => {
|
|
28
|
+
api?.scrollPrev();
|
|
29
|
+
}, [api]);
|
|
30
|
+
const scrollNext = React.useCallback(() => {
|
|
31
|
+
api?.scrollNext();
|
|
32
|
+
}, [api]);
|
|
33
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
34
|
+
if (event.key === "ArrowLeft") {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
scrollPrev();
|
|
37
|
+
}
|
|
38
|
+
else if (event.key === "ArrowRight") {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
scrollNext();
|
|
41
|
+
}
|
|
42
|
+
}, [scrollPrev, scrollNext]);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
if (!api || !setApi)
|
|
45
|
+
return;
|
|
46
|
+
setApi(api);
|
|
47
|
+
}, [api, setApi]);
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
if (!api)
|
|
50
|
+
return;
|
|
51
|
+
onSelect(api);
|
|
52
|
+
api.on("reInit", onSelect);
|
|
53
|
+
api.on("select", onSelect);
|
|
54
|
+
return () => {
|
|
55
|
+
api?.off("select", onSelect);
|
|
56
|
+
};
|
|
57
|
+
}, [api, onSelect]);
|
|
58
|
+
return (_jsx(CarouselContext.Provider, { value: {
|
|
59
|
+
carouselRef,
|
|
60
|
+
api: api,
|
|
61
|
+
opts,
|
|
62
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
63
|
+
scrollPrev,
|
|
64
|
+
scrollNext,
|
|
65
|
+
canScrollPrev,
|
|
66
|
+
canScrollNext,
|
|
67
|
+
}, children: _jsx("div", { onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel", ...props, children: children }) }));
|
|
68
|
+
}
|
|
69
|
+
function CarouselContent({ className, ...props }) {
|
|
70
|
+
const { carouselRef, orientation } = useCarousel();
|
|
71
|
+
return (_jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: _jsx("div", { className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className), ...props }) }));
|
|
72
|
+
}
|
|
73
|
+
function CarouselItem({ className, ...props }) {
|
|
74
|
+
const { orientation } = useCarousel();
|
|
75
|
+
return (_jsx("div", { role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className), ...props }));
|
|
76
|
+
}
|
|
77
|
+
export { Carousel, CarouselContent, CarouselItem, useCarousel };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const ruleGridVariants: (props?: ({
|
|
4
|
+
columns?: 1 | 2 | 3 | 4 | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function RuleGrid({ className, columns, ...props }: React.ComponentProps<"div"> & VariantProps<typeof ruleGridVariants>): React.JSX.Element;
|
|
7
|
+
declare function RuleGridCell({ className, asChild, interactive, ...props }: React.ComponentProps<"div"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
interactive?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function RuleGridLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
declare function RuleGridTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function RuleGridDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
14
|
+
export { RuleGrid, RuleGridCell, RuleGridDescription, RuleGridLabel, RuleGridTitle, ruleGridVariants, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
|
+
const ruleGridVariants = cva("grid grid-cols-1 gap-px p-px", {
|
|
6
|
+
variants: {
|
|
7
|
+
columns: {
|
|
8
|
+
1: "",
|
|
9
|
+
2: "sm:grid-cols-2",
|
|
10
|
+
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
11
|
+
4: "sm:grid-cols-2 lg:grid-cols-4",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
columns: 3,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
function RuleGrid({ className, columns = 3, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "rule-grid", "data-columns": columns, className: cn(ruleGridVariants({ columns, className })), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function RuleGridCell({ className, asChild = false, interactive = false, ...props }) {
|
|
22
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
23
|
+
return (_jsx(Comp, { "data-slot": "rule-grid-cell", "data-interactive": interactive || undefined, className: cn("flex min-w-0 flex-col gap-2 bg-card p-6 text-card-foreground ring-1 ring-border", interactive &&
|
|
24
|
+
"transition-colors duration-150 ease-out outline-none hover:bg-accent/60 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring active:bg-accent", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function RuleGridLabel({ className, ...props }) {
|
|
27
|
+
return (_jsx("span", { "data-slot": "rule-grid-label", className: cn("font-mono text-[11.5px] text-muted-foreground", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function RuleGridTitle({ className, ...props }) {
|
|
30
|
+
return (_jsx("div", { "data-slot": "rule-grid-title", className: cn("text-[15px] font-medium tracking-[-0.01em]", className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function RuleGridDescription({ className, ...props }) {
|
|
33
|
+
return (_jsx("p", { "data-slot": "rule-grid-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
34
|
+
}
|
|
35
|
+
export { RuleGrid, RuleGridCell, RuleGridDescription, RuleGridLabel, RuleGridTitle, ruleGridVariants, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as SeparatorPrimitive from "radix-ui/separator";
|
|
5
|
+
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
6
|
+
return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
export { Separator };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
const alertVariants = cva("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground",
|
|
8
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: "default",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Alert({ className, variant, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertTitle({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
3
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
4
|
+
declare const emptyMediaVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
|
|
8
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
9
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
|
|
10
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
11
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
|
|
@@ -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
|
+
function Empty({ className, ...props }) {
|
|
5
|
+
return (_jsx("div", { "data-slot": "empty", className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
function EmptyHeader({ className, ...props }) {
|
|
8
|
+
return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-transparent",
|
|
14
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
variant: "default",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
function EmptyMedia({ className, variant = "default", ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function EmptyTitle({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "empty-title", className: cn("text-lg font-medium tracking-tight", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function EmptyDescription({ className, ...props }) {
|
|
28
|
+
return (_jsx("div", { "data-slot": "empty-description", className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function EmptyContent({ className, ...props }) {
|
|
31
|
+
return (_jsx("div", { "data-slot": "empty-content", className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as ProgressPrimitive from "radix-ui/progress";
|
|
5
|
+
function Progress({ className, value, ...props }) {
|
|
6
|
+
return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
|
|
7
|
+
}
|
|
8
|
+
export { Progress };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
function Skeleton({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-accent", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Skeleton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { Loader2Icon } from "lucide-react";
|
|
4
|
+
function Spinner({ className, ...props }) {
|
|
5
|
+
return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
export { Spinner };
|