@locusgraph/components 0.1.0 → 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.d.ts +1 -1
- package/dist/action/button-group.js +2 -2
- package/dist/action/button.js +3 -3
- package/dist/action/toggle-group.d.ts +1 -1
- package/dist/action/toggle-group.js +3 -3
- 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-legend.js +1 -1
- package/dist/display/chart/chart-tooltip.js +3 -3
- package/dist/display/chat/attachment/attachment-parts.d.ts +1 -1
- package/dist/display/chat/attachment/attachment-parts.js +1 -1
- package/dist/display/chat/attachment/attachment.js +1 -1
- package/dist/display/chat/bubble.js +2 -2
- package/dist/display/chat/message-scroller.d.ts +1 -1
- package/dist/display/chat/message-scroller.js +2 -2
- package/dist/display/chat/message.js +2 -2
- package/dist/display/content/item.d.ts +1 -1
- package/dist/display/content/item.js +1 -1
- package/dist/display/content/kbd.js +1 -1
- package/dist/display/media/carousel-controls.d.ts +1 -1
- package/dist/display/media/carousel-controls.js +3 -3
- 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 +2 -2
- package/dist/form/advanced/calendar.d.ts +1 -1
- package/dist/form/advanced/calendar.js +6 -6
- package/dist/form/advanced/combobox/combobox-chips.js +3 -3
- package/dist/form/advanced/combobox/combobox-items.js +2 -2
- package/dist/form/advanced/combobox/combobox.js +3 -3
- 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-separator.js +1 -1
- package/dist/form/field/field-text.d.ts +1 -1
- package/dist/form/field/field-text.js +1 -1
- package/dist/form/field/field.js +3 -3
- package/dist/form/hook-form/form.js +2 -2
- package/dist/form/input-group.d.ts +1 -1
- package/dist/form/input-group.js +7 -7
- package/dist/form/native-select.js +2 -2
- package/dist/index.d.ts +101 -95
- package/dist/index.js +100 -94
- 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-context.js +2 -2
- package/dist/layout/sidebar/sidebar-menu-sub.js +1 -1
- package/dist/layout/sidebar/sidebar-menu.d.ts +1 -1
- package/dist/layout/sidebar/sidebar-menu.js +2 -2
- package/dist/layout/sidebar/sidebar-sections.d.ts +2 -2
- package/dist/layout/sidebar/sidebar-sections.js +4 -4
- package/dist/layout/sidebar/sidebar.d.ts +1 -1
- package/dist/layout/sidebar/sidebar.js +4 -4
- 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.d.ts +1 -1
- package/dist/navigation/pagination.js +6 -5
- package/dist/overlay/alert-dialog.d.ts +1 -1
- package/dist/overlay/alert-dialog.js +4 -4
- 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.d.ts +1 -1
- package/dist/overlay/floating/command.js +6 -6
- 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/app-header.js +2 -2
- package/dist/shell/app-shell.js +2 -2
- package/dist/shell/breadcrumbs.d.ts +1 -1
- package/dist/shell/breadcrumbs.js +1 -1
- package/dist/shell/docs/docs-header.d.ts +1 -1
- package/dist/shell/docs/docs-header.js +3 -3
- package/dist/shell/docs/docs-shell.js +1 -1
- package/dist/shell/docs/docs-sidebar.d.ts +1 -1
- package/dist/shell/docs/docs-sidebar.js +2 -2
- package/dist/shell/docs/on-this-page.js +2 -2
- package/dist/shell/navigation/app-sidebar.d.ts +2 -2
- package/dist/shell/navigation/app-sidebar.js +4 -4
- package/dist/shell/navigation/nav-group.d.ts +1 -1
- package/dist/shell/navigation/nav-group.js +2 -2
- package/dist/shell/theme-toggle.js +2 -2
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "cn";
|
|
4
|
-
import { useActiveSection } from "./use-active-section";
|
|
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
|
import type * as React from "react";
|
|
2
|
-
import type { LinkComponent } from "../link";
|
|
3
|
-
import { type AppNavGroup, type AppNavItem } from "./nav-group";
|
|
2
|
+
import type { LinkComponent } from "../link.js";
|
|
3
|
+
import { type AppNavGroup, type AppNavItem } from "./nav-group.js";
|
|
4
4
|
type AppBrand = {
|
|
5
5
|
title: React.ReactNode;
|
|
6
6
|
subtitle?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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";
|
|
2
|
+
import { Sidebar, SidebarRail } from "../../layout/sidebar/sidebar.js";
|
|
3
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../../layout/sidebar/sidebar-menu.js";
|
|
4
|
+
import { SidebarContent, SidebarFooter, SidebarHeader, } from "../../layout/sidebar/sidebar-sections.js";
|
|
5
|
+
import { NavGroup } from "./nav-group.js";
|
|
6
6
|
function BrandLink({ brand, Link }) {
|
|
7
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
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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";
|
|
2
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../../layout/sidebar/sidebar-menu.js";
|
|
3
|
+
import { SidebarGroup, SidebarGroupContent, SidebarGroupLabel, } from "../../layout/sidebar/sidebar-sections.js";
|
|
4
4
|
function isActiveHref(itemHref, activeHref) {
|
|
5
5
|
return activeHref === itemHref || activeHref.startsWith(`${itemHref}/`);
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MoonIcon, SunIcon } from "
|
|
4
|
-
import { Button } from "../action/button";
|
|
3
|
+
import { Moon as MoonIcon, Sun as SunIcon } from "@carbon/icons-react";
|
|
4
|
+
import { Button } from "../action/button.js";
|
|
5
5
|
function ThemeToggle({ theme, onThemeChange }) {
|
|
6
6
|
const nextTheme = theme === "dark" ? "light" : "dark";
|
|
7
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" })] }));
|
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",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"homepage": "https://design.locusgraph.com",
|
|
63
63
|
"scripts": {
|
|
64
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp -R src/styles dist/styles",
|
|
64
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp -R src/styles dist/styles && node ../../scripts/esm-extensions.mjs dist",
|
|
65
65
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
66
66
|
"test": "vitest run"
|
|
67
67
|
}
|