@locusgraph/components 0.1.1 → 0.2.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/dist/action/button-group.js +1 -1
- package/dist/action/button.js +3 -3
- package/dist/action/toggle-group.js +2 -2
- package/dist/action/toggle.js +5 -5
- package/dist/display/badge.d.ts +1 -1
- package/dist/display/badge.js +4 -1
- package/dist/display/chart/chart-tooltip.js +2 -2
- package/dist/display/chat/attachment/attachment.js +1 -1
- package/dist/display/chat/bubble.js +2 -2
- package/dist/display/chat/message-scroller.js +1 -1
- package/dist/display/chat/message.js +2 -2
- package/dist/display/content/kbd.js +1 -1
- package/dist/display/media/carousel-controls.js +1 -1
- package/dist/display/rule-grid/rule-grid.d.ts +3 -1
- package/dist/display/rule-grid/rule-grid.js +8 -2
- package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +10 -0
- package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-table.js +16 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.js +20 -0
- package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-button.js +20 -0
- package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
- package/dist/display/skeletons/shapes/skeleton-text.js +13 -0
- package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
- package/dist/display/skeletons/skeleton-parts.js +11 -0
- package/dist/display/status/alert.d.ts +1 -1
- package/dist/display/status/alert.js +4 -2
- package/dist/display/status/empty.js +1 -1
- package/dist/display/status/progress.d.ts +5 -1
- package/dist/display/status/progress.js +19 -2
- package/dist/display/status/skeleton.js +1 -1
- package/dist/display/status/spinner.js +1 -1
- package/dist/display/table.js +1 -1
- package/dist/feedback/toaster.d.ts +1 -1
- package/dist/feedback/toaster.js +12 -14
- package/dist/form/advanced/calendar-day-button.js +1 -1
- package/dist/form/advanced/calendar.js +4 -4
- package/dist/form/advanced/combobox/combobox-chips.js +2 -2
- package/dist/form/advanced/combobox/combobox-items.js +2 -2
- package/dist/form/advanced/combobox/combobox.js +2 -2
- package/dist/form/advanced/input-otp.js +2 -2
- package/dist/form/choice/checkbox.js +3 -3
- package/dist/form/choice/radio-group.js +2 -2
- package/dist/form/choice/select.js +5 -5
- package/dist/form/choice/slider.js +1 -1
- package/dist/form/choice/switch.js +1 -1
- package/dist/form/field/field.js +3 -3
- package/dist/form/hook-form/form.js +1 -1
- package/dist/form/input-group.js +4 -4
- package/dist/form/native-select.js +2 -2
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/layout/accordion.js +3 -3
- package/dist/layout/resizable.js +1 -1
- package/dist/layout/scroll/scroll-area.d.ts +1 -1
- package/dist/layout/scroll/scroll-area.js +3 -3
- package/dist/layout/sidebar/sidebar-sections.js +1 -1
- package/dist/layout/sidebar/sidebar.js +1 -1
- package/dist/layout/tabs.js +3 -3
- package/dist/navigation/breadcrumb.js +1 -1
- package/dist/navigation/menubar/menubar-items.js +2 -2
- package/dist/navigation/menubar/menubar-sub.js +2 -2
- package/dist/navigation/menubar/menubar.js +2 -2
- package/dist/navigation/navigation-menu.js +3 -3
- package/dist/navigation/pagination.js +5 -4
- package/dist/overlay/alert-dialog.js +3 -3
- package/dist/overlay/context-menu/context-menu-items.js +2 -2
- package/dist/overlay/context-menu/context-menu-sub.js +2 -2
- package/dist/overlay/context-menu/context-menu.js +1 -1
- package/dist/overlay/dialog.js +4 -4
- package/dist/overlay/floating/command.js +5 -5
- package/dist/overlay/floating/drawer.js +5 -5
- package/dist/overlay/floating/hover-card.js +2 -2
- package/dist/overlay/menu/dropdown-menu-choice.js +1 -1
- package/dist/overlay/menu/dropdown-menu-item.js +1 -1
- package/dist/overlay/menu/dropdown-menu-sub.js +2 -2
- package/dist/overlay/menu/dropdown-menu.js +2 -2
- package/dist/overlay/popover.js +2 -2
- package/dist/overlay/sheet.js +7 -7
- package/dist/shell/breadcrumbs.js +1 -1
- package/dist/shell/docs/docs-header.js +1 -1
- package/dist/shell/docs/docs-sidebar.js +2 -2
- package/dist/shell/docs/on-this-page.js +1 -1
- package/dist/shell/theme-toggle.js +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
5
5
|
import * as ContextMenuPrimitive from "radix-ui/context-menu";
|
|
6
6
|
function ContextMenuSub({ ...props }) {
|
|
7
7
|
return _jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
@@ -10,6 +10,6 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
10
10
|
return (_jsxs(ContextMenuPrimitive.SubTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
|
|
11
11
|
}
|
|
12
12
|
function ContextMenuSubContent({ className, ...props }) {
|
|
13
|
-
return (_jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-
|
|
13
|
+
return (_jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }));
|
|
14
14
|
}
|
|
15
15
|
export { ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger };
|
|
@@ -15,6 +15,6 @@ function ContextMenuPortal({ ...props }) {
|
|
|
15
15
|
return _jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
16
16
|
}
|
|
17
17
|
function ContextMenuContent({ className, ...props }) {
|
|
18
|
-
return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-
|
|
18
|
+
return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
|
|
19
19
|
}
|
|
20
20
|
export { ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuPortal, ContextMenuTrigger };
|
package/dist/overlay/dialog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Close as XIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { XIcon } from "lucide-react";
|
|
5
5
|
import * as DialogPrimitive from "radix-ui/dialog";
|
|
6
6
|
function Dialog({ ...props }) {
|
|
7
7
|
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
@@ -16,10 +16,10 @@ function DialogClose({ ...props }) {
|
|
|
16
16
|
return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
17
17
|
}
|
|
18
18
|
function DialogOverlay({ className, ...props }) {
|
|
19
|
-
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 z-[300] bg-
|
|
19
|
+
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 z-[300] bg-scrim backdrop-blur-[2px] 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
20
|
}
|
|
21
21
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
22
|
-
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("fixed top-[50%] left-[50%] z-[300] flex max-h-[calc(100dvh-4rem)] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-lg border border-line bg-
|
|
22
|
+
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("fixed top-[50%] left-[50%] z-[300] flex max-h-[calc(100dvh-4rem)] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-lg border border-line bg-popover shadow-overlay duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", className), ...props, children: [children, showCloseButton ? (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "absolute top-4 right-4 rounded-sm text-soft opacity-70 transition-opacity hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-hidden", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })) : null] })] }));
|
|
23
23
|
}
|
|
24
24
|
const clearOfCloseButton = "pr-12";
|
|
25
25
|
function DialogHeader({ className, ...props }) {
|
|
@@ -29,7 +29,7 @@ function DialogBody({ className, ...props }) {
|
|
|
29
29
|
return (_jsx("div", { "data-slot": "dialog-body", className: cn("no-scrollbar min-h-0 flex-1 space-y-4 overflow-y-auto px-6", className), ...props }));
|
|
30
30
|
}
|
|
31
31
|
function DialogFooter({ className, ...props }) {
|
|
32
|
-
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("mt-auto flex flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row", className), ...props }));
|
|
32
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("mt-auto flex flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end", className), ...props }));
|
|
33
33
|
}
|
|
34
34
|
function DialogTitle({ className, ...props }) {
|
|
35
35
|
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-base font-semibold tracking-tight", className), ...props }));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Search as SearchIcon } from "@carbon/icons-react";
|
|
3
4
|
import { Command as CommandPrimitive } from "cmdk";
|
|
4
5
|
import { cn } from "cn";
|
|
5
|
-
import { SearchIcon } from "lucide-react";
|
|
6
6
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "../dialog.js";
|
|
7
7
|
function Command({ className, ...props }) {
|
|
8
8
|
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className), ...props }));
|
|
9
9
|
}
|
|
10
|
-
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton =
|
|
11
|
-
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), showCloseButton: showCloseButton, children: _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group
|
|
10
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) {
|
|
11
|
+
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), showCloseButton: showCloseButton, children: _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:py-2", children: children }) })] }));
|
|
12
12
|
}
|
|
13
13
|
function CommandInput({ className, ...props }) {
|
|
14
|
-
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-
|
|
14
|
+
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-10 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("flex h-full w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
|
|
15
15
|
}
|
|
16
16
|
function CommandList({ className, ...props }) {
|
|
17
17
|
return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
|
|
@@ -20,7 +20,7 @@ function CommandEmpty({ ...props }) {
|
|
|
20
20
|
return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
|
|
21
21
|
}
|
|
22
22
|
function CommandGroup({ className, ...props }) {
|
|
23
|
-
return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:
|
|
23
|
+
return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:eyebrow [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:pb-1", className), ...props }));
|
|
24
24
|
}
|
|
25
25
|
function CommandSeparator({ className, ...props }) {
|
|
26
26
|
return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("-mx-1 h-px bg-border", className), ...props }));
|
|
@@ -15,19 +15,19 @@ function DrawerClose({ ...props }) {
|
|
|
15
15
|
return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
16
16
|
}
|
|
17
17
|
function DrawerOverlay({ className, ...props }) {
|
|
18
|
-
return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-
|
|
18
|
+
return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-[300] bg-scrim backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className), ...props }));
|
|
19
19
|
}
|
|
20
20
|
function DrawerContent({ className, children, ...props }) {
|
|
21
|
-
return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("group/drawer-content fixed z-
|
|
21
|
+
return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("group/drawer-content fixed z-[300] flex h-auto flex-col bg-popover shadow-overlay", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className), ...props, children: [_jsx("div", { className: "mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full bg-foreground/20 group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
|
|
22
22
|
}
|
|
23
23
|
function DrawerHeader({ className, ...props }) {
|
|
24
|
-
return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-
|
|
24
|
+
return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5 px-6 pt-4 pb-4 text-left", className), ...props }));
|
|
25
25
|
}
|
|
26
26
|
function DrawerFooter({ className, ...props }) {
|
|
27
|
-
return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2
|
|
27
|
+
return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 px-6 pt-4 pb-6", className), ...props }));
|
|
28
28
|
}
|
|
29
29
|
function DrawerTitle({ className, ...props }) {
|
|
30
|
-
return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("font-semibold text-foreground", className), ...props }));
|
|
30
|
+
return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-base font-semibold tracking-tight text-foreground", className), ...props }));
|
|
31
31
|
}
|
|
32
32
|
function DrawerDescription({ className, ...props }) {
|
|
33
33
|
return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
@@ -8,7 +8,7 @@ function HoverCard({ ...props }) {
|
|
|
8
8
|
function HoverCardTrigger({ ...props }) {
|
|
9
9
|
return _jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
10
10
|
}
|
|
11
|
-
function HoverCardContent({ className, align = "center", sideOffset =
|
|
12
|
-
return (_jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(HoverCardPrimitive.Content, { "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-
|
|
11
|
+
function HoverCardContent({ className, align = "center", sideOffset = 6, ...props }) {
|
|
12
|
+
return (_jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(HoverCardPrimitive.Content, { "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-overlay outline-hidden 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
|
|
13
13
|
}
|
|
14
14
|
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Checkmark as CheckIcon, CircleSolid as CircleIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { CheckIcon, CircleIcon } from "lucide-react";
|
|
5
5
|
import * as DropdownMenuPrimitive from "radix-ui/dropdown-menu";
|
|
6
6
|
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
7
7
|
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
@@ -6,7 +6,7 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
6
6
|
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
|
|
7
7
|
}
|
|
8
8
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
9
|
-
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2
|
|
9
|
+
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("eyebrow px-2 pt-2 pb-1 data-[inset]:pl-8", className), ...props }));
|
|
10
10
|
}
|
|
11
11
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
12
12
|
return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
5
5
|
import * as DropdownMenuPrimitive from "radix-ui/dropdown-menu";
|
|
6
6
|
function DropdownMenuSub({ ...props }) {
|
|
7
7
|
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
@@ -10,6 +10,6 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
10
10
|
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
11
11
|
}
|
|
12
12
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
13
|
-
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-
|
|
13
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }));
|
|
14
14
|
}
|
|
15
15
|
export { DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger };
|
|
@@ -11,8 +11,8 @@ function DropdownMenuPortal({ ...props }) {
|
|
|
11
11
|
function DropdownMenuTrigger({ ...props }) {
|
|
12
12
|
return _jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
13
13
|
}
|
|
14
|
-
function DropdownMenuContent({ className, sideOffset =
|
|
15
|
-
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-
|
|
14
|
+
function DropdownMenuContent({ className, sideOffset = 6, ...props }) {
|
|
15
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
|
|
16
16
|
}
|
|
17
17
|
function DropdownMenuGroup({ ...props }) {
|
|
18
18
|
return _jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
package/dist/overlay/popover.js
CHANGED
|
@@ -8,7 +8,7 @@ function Popover({ ...props }) {
|
|
|
8
8
|
function PopoverTrigger({ ...props }) {
|
|
9
9
|
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
10
10
|
}
|
|
11
|
-
function PopoverContent({ className, align = "center", sideOffset =
|
|
12
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-
|
|
11
|
+
function PopoverContent({ className, align = "center", sideOffset = 6, ...props }) {
|
|
12
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-overlay outline-hidden", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props }) }));
|
|
13
13
|
}
|
|
14
14
|
export { Popover, PopoverContent, PopoverTrigger };
|
package/dist/overlay/sheet.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Close as XIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { XIcon } from "lucide-react";
|
|
5
5
|
import * as SheetPrimitive from "radix-ui/dialog";
|
|
6
6
|
function Sheet({ ...props }) {
|
|
7
7
|
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
@@ -16,23 +16,23 @@ function SheetPortal({ ...props }) {
|
|
|
16
16
|
return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
17
17
|
}
|
|
18
18
|
function SheetOverlay({ className, ...props }) {
|
|
19
|
-
return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-[300] bg-
|
|
19
|
+
return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-[300] bg-scrim backdrop-blur-[2px] 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
20
|
}
|
|
21
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-
|
|
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-popover shadow-overlay 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
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
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
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-
|
|
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-sm text-soft opacity-70 transition-opacity hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-hidden disabled:pointer-events-none", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
27
27
|
}
|
|
28
28
|
function SheetHeader({ className, ...props }) {
|
|
29
|
-
return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5
|
|
29
|
+
return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 px-6 pt-6 pb-2 pr-12", className), ...props }));
|
|
30
30
|
}
|
|
31
31
|
function SheetFooter({ className, ...props }) {
|
|
32
|
-
return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2
|
|
32
|
+
return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 px-6 pt-4 pb-6", className), ...props }));
|
|
33
33
|
}
|
|
34
34
|
function SheetTitle({ className, ...props }) {
|
|
35
|
-
return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("font-semibold text-foreground", className), ...props }));
|
|
35
|
+
return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("text-base font-semibold tracking-tight text-foreground", className), ...props }));
|
|
36
36
|
}
|
|
37
37
|
function SheetDescription({ className, ...props }) {
|
|
38
38
|
return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronRightIcon } from "
|
|
2
|
+
import { ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
|
|
3
3
|
function CrumbLabel({ crumb, last, Link, }) {
|
|
4
4
|
if (last) {
|
|
5
5
|
return (_jsx("span", { "aria-current": "page", className: "truncate font-medium", children: crumb.label }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Menu as MenuIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { MenuIcon } from "lucide-react";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { Button } from "../../action/button.js";
|
|
7
7
|
import { Sheet, SheetContent, SheetTitle } from "../../overlay/sheet.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "cn";
|
|
3
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
|
|
4
|
+
return (_jsx("div", { className: "flex flex-col gap-4", children: groups.map((group) => (_jsxs("div", { className: "flex flex-col", children: [_jsx("p", { className: "eyebrow flex h-8 items-center px-2", children: group.label }), _jsx("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => {
|
|
5
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-
|
|
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-sm font-medium transition-colors hover:bg-accent", active && "border-accent bg-accent"), children: item.title }) }, item.href));
|
|
7
7
|
}) })] }, group.label))) }));
|
|
8
8
|
}
|
|
9
9
|
function DocsSidebar(props) {
|
|
@@ -4,7 +4,7 @@ import { cn } from "cn";
|
|
|
4
4
|
import { useActiveSection } from "./use-active-section.js";
|
|
5
5
|
function OnThisPage({ sections, title = "On This Page" }) {
|
|
6
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
|
|
7
|
+
return (_jsxs("nav", { "aria-label": title, className: "flex flex-col gap-2 text-sm", children: [_jsx("p", { className: "eyebrow flex h-6 items-center", children: title }), sections.map((section) => (_jsx("button", { type: "button", onClick: () => {
|
|
8
8
|
pinSection(section.id);
|
|
9
9
|
document.getElementById(section.id)?.scrollIntoView({ behavior: "smooth" });
|
|
10
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)))] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MoonIcon, SunIcon } from "
|
|
3
|
+
import { Moon as MoonIcon, Sun as SunIcon } from "@carbon/icons-react";
|
|
4
4
|
import { Button } from "../action/button.js";
|
|
5
5
|
function ThemeToggle({ theme, onThemeChange }) {
|
|
6
6
|
const nextTheme = theme === "dark" ? "light" : "dark";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusgraph/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Radix and shadcn based React components, shells and theme for LocusGraph apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@base-ui/react": "^1.9.0",
|
|
36
|
-
"@
|
|
36
|
+
"@carbon/icons-react": "11.89.0",
|
|
37
|
+
"@locusgraph/tokens": "0.2.0",
|
|
37
38
|
"@shadcn/react": "^0.3.1",
|
|
38
39
|
"class-variance-authority": "^0.7.1",
|
|
39
40
|
"cmdk": "^1.1.1",
|
|
40
41
|
"cn": "^0.4.0",
|
|
41
42
|
"embla-carousel-react": "^8.6.0",
|
|
42
43
|
"input-otp": "^1.5.0",
|
|
43
|
-
"lucide-react": "^1.28.0",
|
|
44
44
|
"radix-ui": "^1.8.1",
|
|
45
45
|
"react-day-picker": "^9.14.0",
|
|
46
46
|
"react-hook-form": "^7.90.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"vaul": "^1.1.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@locusgraph/config": "0.1.
|
|
53
|
+
"@locusgraph/config": "0.1.1",
|
|
54
54
|
"@types/node": "^22.0.0",
|
|
55
55
|
"@types/react": "^19.2.0",
|
|
56
56
|
"@types/react-dom": "^19.2.0",
|