@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,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import * as SheetPrimitive from "radix-ui/dialog";
|
|
6
|
+
function Sheet({ ...props }) {
|
|
7
|
+
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
8
|
+
}
|
|
9
|
+
function SheetTrigger({ ...props }) {
|
|
10
|
+
return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function SheetClose({ ...props }) {
|
|
13
|
+
return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
14
|
+
}
|
|
15
|
+
function SheetPortal({ ...props }) {
|
|
16
|
+
return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
17
|
+
}
|
|
18
|
+
function SheetOverlay({ className, ...props }) {
|
|
19
|
+
return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-[300] bg-black/40 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
|
|
22
|
+
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", className: cn("fixed z-[300] flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", side === "right" &&
|
|
23
|
+
"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", side === "left" &&
|
|
24
|
+
"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", side === "top" &&
|
|
25
|
+
"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", side === "bottom" &&
|
|
26
|
+
"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
27
|
+
}
|
|
28
|
+
function SheetHeader({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function SheetFooter({ className, ...props }) {
|
|
32
|
+
return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
function SheetTitle({ className, ...props }) {
|
|
35
|
+
return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("font-semibold text-foreground", className), ...props }));
|
|
36
|
+
}
|
|
37
|
+
function SheetDescription({ className, ...props }) {
|
|
38
|
+
return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
39
|
+
}
|
|
40
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from "radix-ui/tooltip";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as TooltipPrimitive from "radix-ui/tooltip";
|
|
5
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
6
|
+
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
7
|
+
}
|
|
8
|
+
function Tooltip({ ...props }) {
|
|
9
|
+
return _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
10
|
+
}
|
|
11
|
+
function TooltipTrigger({ ...props }) {
|
|
12
|
+
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
13
|
+
}
|
|
14
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
15
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })] }) }));
|
|
16
|
+
}
|
|
17
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type AppHeaderProps = {
|
|
3
|
+
breadcrumbs?: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare function AppHeader({ breadcrumbs, children }: AppHeaderProps): React.JSX.Element;
|
|
7
|
+
declare function CommandHint({ shortcut, label, }: {
|
|
8
|
+
shortcut?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
export { AppHeader, CommandHint };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Separator } from "../display/separator";
|
|
3
|
+
import { SidebarTrigger } from "../layout/sidebar/sidebar";
|
|
4
|
+
function AppHeader({ breadcrumbs, children }) {
|
|
5
|
+
return (_jsxs("header", { "data-slot": "app-header", className: "flex h-14 shrink-0 items-center gap-3 border-b border-line bg-background px-4", children: [_jsx(SidebarTrigger, { className: "-ml-1" }), _jsx(Separator, { orientation: "vertical", className: "h-4" }), breadcrumbs, _jsx("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: children })] }));
|
|
6
|
+
}
|
|
7
|
+
function CommandHint({ shortcut = "⌘K", label = "commands", }) {
|
|
8
|
+
return (_jsxs("span", { className: "hidden items-center gap-1.5 text-xs text-faint 2xl:flex", children: [_jsx("kbd", { className: "rounded border border-line bg-ghost px-1.5 py-0.5 font-mono text-[11px]", children: shortcut }), label] }));
|
|
9
|
+
}
|
|
10
|
+
export { AppHeader, CommandHint };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type AppShellProps = {
|
|
3
|
+
sidebar: React.ReactNode;
|
|
4
|
+
header: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
bodyClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function AppShell({ sidebar, header, children, defaultOpen, bodyClassName }: AppShellProps): React.JSX.Element;
|
|
10
|
+
export { AppShell };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { SidebarInset } from "../layout/sidebar/sidebar";
|
|
4
|
+
import { SidebarProvider } from "../layout/sidebar/sidebar-context";
|
|
5
|
+
function AppShell({ sidebar, header, children, defaultOpen, bodyClassName }) {
|
|
6
|
+
return (_jsxs(SidebarProvider, { defaultOpen: defaultOpen, children: [sidebar, _jsxs(SidebarInset, { className: "h-svh overflow-hidden", children: [header, _jsx("div", { "data-slot": "app-shell-body", className: cn("no-scrollbar flex w-full flex-1 flex-col overflow-y-auto px-6 pt-7 pb-8 lg:px-8", bodyClassName), children: children })] })] }));
|
|
7
|
+
}
|
|
8
|
+
export { AppShell };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { LinkComponent } from "./link";
|
|
3
|
+
type Crumb = {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
href?: string;
|
|
6
|
+
};
|
|
7
|
+
type BreadcrumbsProps = {
|
|
8
|
+
items: Crumb[];
|
|
9
|
+
linkComponent?: LinkComponent | "a";
|
|
10
|
+
};
|
|
11
|
+
declare function Breadcrumbs({ items, linkComponent }: BreadcrumbsProps): React.JSX.Element;
|
|
12
|
+
export { Breadcrumbs, type Crumb };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
3
|
+
function CrumbLabel({ crumb, last, Link, }) {
|
|
4
|
+
if (last) {
|
|
5
|
+
return (_jsx("span", { "aria-current": "page", className: "truncate font-medium", children: crumb.label }));
|
|
6
|
+
}
|
|
7
|
+
if (crumb.href === undefined) {
|
|
8
|
+
return _jsx("span", { className: "truncate text-soft", children: crumb.label });
|
|
9
|
+
}
|
|
10
|
+
return (_jsx(Link, { href: crumb.href, className: "truncate text-soft transition-colors hover:text-foreground", children: crumb.label }));
|
|
11
|
+
}
|
|
12
|
+
function Breadcrumbs({ items, linkComponent = "a" }) {
|
|
13
|
+
return (_jsx("nav", { "aria-label": "Breadcrumb", className: "flex min-w-0 items-center gap-1.5 text-sm", children: items.map((crumb, index) => {
|
|
14
|
+
const last = index === items.length - 1;
|
|
15
|
+
return (_jsxs("span", { className: last ? "flex min-w-0 items-center gap-1.5" : "hidden items-center gap-1.5 sm:flex", children: [_jsx(CrumbLabel, { crumb: crumb, last: last, Link: linkComponent }), last ? null : (_jsx(ChevronRightIcon, { className: "size-3.5 shrink-0 text-faint", "aria-hidden": true }))] }, crumb.href ?? index));
|
|
16
|
+
}) }));
|
|
17
|
+
}
|
|
18
|
+
export { Breadcrumbs };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { LinkComponent } from "../link";
|
|
3
|
+
type DocsBrand = {
|
|
4
|
+
name: string;
|
|
5
|
+
product?: string;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
href: string;
|
|
8
|
+
};
|
|
9
|
+
type DocsHeaderLink = {
|
|
10
|
+
title: string;
|
|
11
|
+
href: string;
|
|
12
|
+
};
|
|
13
|
+
type DocsHeaderProps = {
|
|
14
|
+
brand: DocsBrand;
|
|
15
|
+
links: DocsHeaderLink[];
|
|
16
|
+
activeHref: string;
|
|
17
|
+
mobileNav: React.ReactNode;
|
|
18
|
+
linkComponent?: LinkComponent | "a";
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare function DocsHeader({ brand, links, activeHref, mobileNav, linkComponent: Link, children, }: DocsHeaderProps): React.JSX.Element;
|
|
22
|
+
export { type DocsBrand, DocsHeader, type DocsHeaderLink };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { MenuIcon } from "lucide-react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { Button } from "../../action/button";
|
|
7
|
+
import { Sheet, SheetContent, SheetTitle } from "../../overlay/sheet";
|
|
8
|
+
function MobileNavSheet({ children }) {
|
|
9
|
+
const [open, setOpen] = useState(false);
|
|
10
|
+
const closeOnLinkClick = (event) => {
|
|
11
|
+
if (event.target.closest("a")) {
|
|
12
|
+
setOpen(false);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", size: "icon-sm", className: "lg:hidden", "aria-label": "Open menu", onClick: () => setOpen(true), children: _jsx(MenuIcon, {}) }), _jsx(Sheet, { open: open, onOpenChange: setOpen, children: _jsxs(SheetContent, { side: "left", className: "w-72 overflow-y-auto p-4", children: [_jsx(SheetTitle, { className: "sr-only", children: "Menu" }), _jsx("div", { onClickCapture: closeOnLinkClick, children: children })] }) })] }));
|
|
16
|
+
}
|
|
17
|
+
function DocsHeader({ brand, links, activeHref, mobileNav, linkComponent: Link = "a", children, }) {
|
|
18
|
+
return (_jsx("header", { "data-slot": "docs-header", className: "sticky top-0 z-50 w-full bg-background/95 backdrop-blur", children: _jsxs("div", { className: "mx-auto flex h-(--docs-header-height) w-full max-w-[1536px] items-center gap-4 px-6 **:data-[slot=separator]:h-4!", children: [_jsx(MobileNavSheet, { children: mobileNav }), _jsxs(Link, { href: brand.href, className: "flex items-center gap-2 font-brand text-base tracking-tight", children: [brand.icon, _jsxs("span", { children: [_jsx("span", { className: "font-bold", children: brand.name }), brand.product && _jsx("span", { className: "font-light", children: brand.product })] })] }), _jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-0.5 lg:flex", children: links.map((link) => (_jsx(Link, { href: link.href, "aria-current": link.href === activeHref ? "page" : undefined, className: cn("rounded-md px-2.5 py-1.5 text-sm font-medium text-foreground/80 transition-colors hover:text-foreground", link.href === activeHref && "text-foreground"), children: link.title }, link.href))) }), _jsx("div", { className: "ml-auto flex items-center gap-2", children: children })] }) }));
|
|
19
|
+
}
|
|
20
|
+
export { DocsHeader };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type DocsShellProps = {
|
|
3
|
+
header: React.ReactNode;
|
|
4
|
+
sidebar?: React.ReactNode;
|
|
5
|
+
aside?: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare function DocsShell({ header, sidebar, aside, children }: DocsShellProps): React.JSX.Element;
|
|
9
|
+
export { DocsShell };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { TooltipProvider } from "../../overlay/tooltip";
|
|
4
|
+
function DocsShell({ header, sidebar, aside, children }) {
|
|
5
|
+
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs("div", { "data-slot": "docs-shell", className: "flex min-h-svh flex-col bg-background [--docs-header-height:3.5rem] lg:[--docs-header-height:4rem]", children: [header, _jsxs("div", { className: cn("mx-auto w-full max-w-[1536px] flex-1 items-start px-2", sidebar && "lg:grid lg:grid-cols-[18rem_minmax(0,1fr)]"), children: [sidebar && (_jsx("aside", { "data-slot": "docs-sidebar", className: "sticky top-[calc(var(--docs-header-height)+0.6rem)] hidden h-[calc(100svh-10rem)] lg:block", children: sidebar })), _jsxs("div", { className: "flex min-w-0 items-stretch", children: [_jsx("main", { "data-slot": "docs-body", className: "min-w-0 flex-1 px-4 pt-6 pb-16 md:px-6 lg:pt-10", children: children }), aside && (_jsx("aside", { "data-slot": "docs-aside", className: "sticky top-[calc(var(--docs-header-height)+1px)] hidden h-[90svh] w-72 shrink-0 flex-col gap-8 overflow-hidden pt-10 xl:flex", children: _jsx("div", { className: "no-scrollbar flex flex-col gap-8 overflow-y-auto px-8", children: aside }) }))] })] })] }) }));
|
|
6
|
+
}
|
|
7
|
+
export { DocsShell };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LinkComponent } from "../link";
|
|
2
|
+
type DocsNavItem = {
|
|
3
|
+
title: string;
|
|
4
|
+
href: string;
|
|
5
|
+
};
|
|
6
|
+
type DocsNavGroup = {
|
|
7
|
+
label: string;
|
|
8
|
+
items: DocsNavItem[];
|
|
9
|
+
};
|
|
10
|
+
type DocsNavListProps = {
|
|
11
|
+
groups: DocsNavGroup[];
|
|
12
|
+
activeHref: string;
|
|
13
|
+
linkComponent?: LinkComponent | "a";
|
|
14
|
+
};
|
|
15
|
+
declare function DocsNavList({ groups, activeHref, linkComponent: Link }: DocsNavListProps): import("react").JSX.Element;
|
|
16
|
+
declare function DocsSidebar(props: DocsNavListProps): import("react").JSX.Element;
|
|
17
|
+
export { type DocsNavGroup, type DocsNavItem, DocsNavList, DocsSidebar };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
function DocsNavList({ groups, activeHref, linkComponent: Link = "a" }) {
|
|
4
|
+
return (_jsx("div", { className: "flex flex-col gap-4", children: groups.map((group) => (_jsxs("div", { className: "flex flex-col", children: [_jsx("p", { className: "flex h-8 items-center px-2 text-xs font-medium text-muted-foreground", children: group.label }), _jsx("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => {
|
|
5
|
+
const active = item.href === activeHref;
|
|
6
|
+
return (_jsx("li", { children: _jsx(Link, { href: item.href, "aria-current": active ? "page" : undefined, className: cn("flex h-[30px] w-fit items-center rounded-md border border-transparent px-2 text-[0.8rem] font-medium transition-colors hover:bg-accent", active && "border-accent bg-accent"), children: item.title }) }, item.href));
|
|
7
|
+
}) })] }, group.label))) }));
|
|
8
|
+
}
|
|
9
|
+
function DocsSidebar(props) {
|
|
10
|
+
return (_jsxs("div", { className: "relative h-full", children: [_jsx("div", { className: "absolute top-12 right-2 bottom-0 w-px bg-[linear-gradient(to_bottom,transparent_0%,var(--border)_10%,var(--border)_90%,transparent_100%)]" }), _jsx("nav", { "aria-label": "Documentation", className: "no-scrollbar h-full w-56 overflow-y-auto pt-10 pb-12 pl-2.5 [mask-image:linear-gradient(to_bottom,transparent,black_2rem,black_calc(100%-3rem),transparent)]", children: _jsx(DocsNavList, { ...props }) })] }));
|
|
11
|
+
}
|
|
12
|
+
export { DocsNavList, DocsSidebar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type PageSection = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
nested?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type OnThisPageProps = {
|
|
7
|
+
sections: PageSection[];
|
|
8
|
+
title?: string;
|
|
9
|
+
};
|
|
10
|
+
declare function OnThisPage({ sections, title }: OnThisPageProps): import("react").JSX.Element;
|
|
11
|
+
export { OnThisPage, type PageSection };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { useActiveSection } from "./use-active-section";
|
|
5
|
+
function OnThisPage({ sections, title = "On This Page" }) {
|
|
6
|
+
const [activeId, pinSection] = useActiveSection(sections.map((section) => section.id));
|
|
7
|
+
return (_jsxs("nav", { "aria-label": title, className: "flex flex-col gap-2 text-sm", children: [_jsx("p", { className: "h-6 text-xs font-medium text-muted-foreground", children: title }), sections.map((section) => (_jsx("button", { type: "button", onClick: () => {
|
|
8
|
+
pinSection(section.id);
|
|
9
|
+
document.getElementById(section.id)?.scrollIntoView({ behavior: "smooth" });
|
|
10
|
+
}, "aria-current": activeId === section.id ? "location" : undefined, className: cn("text-left text-[0.8rem] text-muted-foreground transition-colors hover:text-foreground", section.nested && "pl-4", activeId === section.id && "font-medium text-foreground"), children: section.title }, section.id)))] }));
|
|
11
|
+
}
|
|
12
|
+
export { OnThisPage };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
const SMOOTH_SCROLL_MS = 800;
|
|
3
|
+
function isWindowScrolledToBottom() {
|
|
4
|
+
const pageHeight = document.documentElement.scrollHeight;
|
|
5
|
+
const canScroll = pageHeight > window.innerHeight + 2;
|
|
6
|
+
return canScroll && window.innerHeight + window.scrollY >= pageHeight - 2;
|
|
7
|
+
}
|
|
8
|
+
const ACTIVE_LINE_PX = 120;
|
|
9
|
+
function lastSectionAboveLine(ids) {
|
|
10
|
+
let current = ids[0];
|
|
11
|
+
for (const id of ids) {
|
|
12
|
+
const top = document.getElementById(id)?.getBoundingClientRect().top;
|
|
13
|
+
if (top !== undefined && top <= ACTIVE_LINE_PX) {
|
|
14
|
+
current = id;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return current;
|
|
18
|
+
}
|
|
19
|
+
function useActiveSection(sectionIds) {
|
|
20
|
+
const [activeId, setActiveId] = useState(sectionIds[0] ?? "");
|
|
21
|
+
const pinnedUntil = useRef(0);
|
|
22
|
+
const followScroll = useCallback((id) => {
|
|
23
|
+
if (Date.now() > pinnedUntil.current) {
|
|
24
|
+
setActiveId(id);
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
const pinSection = useCallback((id) => {
|
|
28
|
+
pinnedUntil.current = Date.now() + SMOOTH_SCROLL_MS;
|
|
29
|
+
setActiveId(id);
|
|
30
|
+
}, []);
|
|
31
|
+
const idsKey = sectionIds.join(" ");
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const ids = idsKey.split(" ").filter(Boolean);
|
|
34
|
+
let frame = 0;
|
|
35
|
+
const updateActiveSection = () => {
|
|
36
|
+
cancelAnimationFrame(frame);
|
|
37
|
+
frame = requestAnimationFrame(() => {
|
|
38
|
+
const lastId = ids.at(-1);
|
|
39
|
+
const current = isWindowScrolledToBottom() && lastId ? lastId : lastSectionAboveLine(ids);
|
|
40
|
+
if (current) {
|
|
41
|
+
followScroll(current);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
updateActiveSection();
|
|
46
|
+
window.addEventListener("scroll", updateActiveSection, { passive: true });
|
|
47
|
+
return () => {
|
|
48
|
+
cancelAnimationFrame(frame);
|
|
49
|
+
window.removeEventListener("scroll", updateActiveSection);
|
|
50
|
+
};
|
|
51
|
+
}, [idsKey, followScroll]);
|
|
52
|
+
return [activeId, pinSection];
|
|
53
|
+
}
|
|
54
|
+
export { useActiveSection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { LinkComponent } from "../link";
|
|
3
|
+
import { type AppNavGroup, type AppNavItem } from "./nav-group";
|
|
4
|
+
type AppBrand = {
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
href: string;
|
|
9
|
+
};
|
|
10
|
+
type AppSidebarProps = {
|
|
11
|
+
brand: AppBrand;
|
|
12
|
+
groups: AppNavGroup[];
|
|
13
|
+
bottomItems?: AppNavItem[];
|
|
14
|
+
footer?: React.ReactNode;
|
|
15
|
+
activeHref: string;
|
|
16
|
+
linkComponent?: LinkComponent | "a";
|
|
17
|
+
};
|
|
18
|
+
declare function AppSidebar({ brand, groups, bottomItems, footer, activeHref, linkComponent, }: AppSidebarProps): React.JSX.Element;
|
|
19
|
+
export { type AppBrand, AppSidebar };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Sidebar, SidebarRail } from "../../layout/sidebar/sidebar";
|
|
3
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../../layout/sidebar/sidebar-menu";
|
|
4
|
+
import { SidebarContent, SidebarFooter, SidebarHeader, } from "../../layout/sidebar/sidebar-sections";
|
|
5
|
+
import { NavGroup } from "./nav-group";
|
|
6
|
+
function BrandLink({ brand, Link }) {
|
|
7
|
+
return (_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { size: "lg", asChild: true, children: _jsxs(Link, { href: brand.href, children: [_jsx("span", { "data-slot": "app-brand-icon", className: "flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg border border-line bg-ghost", children: brand.icon }), _jsxs("span", { className: "grid flex-1 text-left leading-tight", children: [_jsx("span", { className: "truncate text-sm font-semibold tracking-tight", children: brand.title }), brand.subtitle && (_jsx("span", { className: "truncate text-xs text-soft", children: brand.subtitle }))] })] }) }) }) }));
|
|
8
|
+
}
|
|
9
|
+
function AppSidebar({ brand, groups, bottomItems, footer, activeHref, linkComponent = "a", }) {
|
|
10
|
+
return (_jsxs(Sidebar, { collapsible: "icon", children: [_jsx(SidebarHeader, { className: "h-14 justify-center border-b border-line py-0", children: _jsx(BrandLink, { brand: brand, Link: linkComponent }) }), _jsxs(SidebarContent, { children: [groups.map((group) => (_jsx(NavGroup, { group: group, activeHref: activeHref, Link: linkComponent }, group.label))), bottomItems && bottomItems.length > 0 && (_jsx(NavGroup, { group: { label: "", items: bottomItems }, activeHref: activeHref, Link: linkComponent, className: "mt-auto" }))] }), footer && _jsx(SidebarFooter, { className: "border-t border-line", children: footer }), _jsx(SidebarRail, {})] }));
|
|
11
|
+
}
|
|
12
|
+
export { AppSidebar };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { LinkComponent } from "../link";
|
|
3
|
+
type AppNavItem = {
|
|
4
|
+
title: string;
|
|
5
|
+
href: string;
|
|
6
|
+
icon: React.ComponentType<{
|
|
7
|
+
className?: string;
|
|
8
|
+
}>;
|
|
9
|
+
external?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type AppNavGroup = {
|
|
12
|
+
label: string;
|
|
13
|
+
items: AppNavItem[];
|
|
14
|
+
};
|
|
15
|
+
type NavGroupProps = {
|
|
16
|
+
group: AppNavGroup;
|
|
17
|
+
activeHref: string;
|
|
18
|
+
Link: LinkComponent | "a";
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
declare function isActiveHref(itemHref: string, activeHref: string): boolean;
|
|
22
|
+
declare function NavGroup({ group, activeHref, Link, className }: NavGroupProps): React.JSX.Element;
|
|
23
|
+
export { type AppNavGroup, type AppNavItem, isActiveHref, NavGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../../layout/sidebar/sidebar-menu";
|
|
3
|
+
import { SidebarGroup, SidebarGroupContent, SidebarGroupLabel, } from "../../layout/sidebar/sidebar-sections";
|
|
4
|
+
function isActiveHref(itemHref, activeHref) {
|
|
5
|
+
return activeHref === itemHref || activeHref.startsWith(`${itemHref}/`);
|
|
6
|
+
}
|
|
7
|
+
function NavItemLink({ item, Link, ...props }) {
|
|
8
|
+
const content = (_jsxs(_Fragment, { children: [_jsx(item.icon, {}), _jsx("span", { children: item.title })] }));
|
|
9
|
+
if (item.external) {
|
|
10
|
+
return (_jsx("a", { ...props, href: item.href, target: "_blank", rel: "noreferrer", children: content }));
|
|
11
|
+
}
|
|
12
|
+
return (_jsx(Link, { ...props, href: item.href, children: content }));
|
|
13
|
+
}
|
|
14
|
+
function NavGroup({ group, activeHref, Link, className }) {
|
|
15
|
+
return (_jsxs(SidebarGroup, { className: className, children: [group.label && _jsx(SidebarGroupLabel, { children: group.label }), _jsx(SidebarGroupContent, { children: _jsx(SidebarMenu, { children: group.items.map((item) => (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, isActive: isActiveHref(item.href, activeHref), tooltip: item.title, children: _jsx(NavItemLink, { item: item, Link: Link }) }) }, item.href))) }) })] }));
|
|
16
|
+
}
|
|
17
|
+
export { isActiveHref, NavGroup };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MoonIcon, SunIcon } from "lucide-react";
|
|
4
|
+
import { Button } from "../action/button";
|
|
5
|
+
function ThemeToggle({ theme, onThemeChange }) {
|
|
6
|
+
const nextTheme = theme === "dark" ? "light" : "dark";
|
|
7
|
+
return (_jsxs(Button, { variant: "ghost", size: "icon-sm", "aria-label": `Switch to ${nextTheme} theme`, onClick: () => onThemeChange(nextTheme), children: [_jsx(SunIcon, { className: "scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" }), _jsx(MoonIcon, { className: "absolute scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" })] }));
|
|
8
|
+
}
|
|
9
|
+
export { ThemeToggle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusgraph/components",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Radix and shadcn based React components, shells and theme for LocusGraph apps.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/locusgraph/design.git",
|
|
9
|
+
"directory": "packages/components"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"**/*.css"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./theme.css": "./dist/styles/theme.css"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"registry": "https://registry.npmjs.org",
|
|
27
|
+
"access": "public",
|
|
28
|
+
"provenance": true
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^19.2.0",
|
|
32
|
+
"react-dom": "^19.2.0"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@base-ui/react": "^1.9.0",
|
|
36
|
+
"@locusgraph/tokens": "0.1.0",
|
|
37
|
+
"@shadcn/react": "^0.3.1",
|
|
38
|
+
"class-variance-authority": "^0.7.1",
|
|
39
|
+
"cmdk": "^1.1.1",
|
|
40
|
+
"cn": "^0.4.0",
|
|
41
|
+
"embla-carousel-react": "^8.6.0",
|
|
42
|
+
"input-otp": "^1.5.0",
|
|
43
|
+
"lucide-react": "^1.28.0",
|
|
44
|
+
"radix-ui": "^1.8.1",
|
|
45
|
+
"react-day-picker": "^9.14.0",
|
|
46
|
+
"react-hook-form": "^7.90.0",
|
|
47
|
+
"react-resizable-panels": "^4.14.5",
|
|
48
|
+
"recharts": "^3.10.1",
|
|
49
|
+
"sonner": "^2.0.7",
|
|
50
|
+
"vaul": "^1.1.2"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@locusgraph/config": "0.1.0",
|
|
54
|
+
"@types/node": "^22.0.0",
|
|
55
|
+
"@types/react": "^19.2.0",
|
|
56
|
+
"@types/react-dom": "^19.2.0",
|
|
57
|
+
"react": "19.2.8",
|
|
58
|
+
"react-dom": "19.2.8",
|
|
59
|
+
"typescript": "^7.0.2",
|
|
60
|
+
"vitest": "^5.0.3"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://design.locusgraph.com",
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp -R src/styles dist/styles",
|
|
65
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
66
|
+
"test": "vitest run"
|
|
67
|
+
}
|
|
6
68
|
}
|