Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
309 changes: 280 additions & 29 deletions content/docs/components/basic/sidebar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,75 @@ The Sidebar component provides a collapsible navigation sidebar for applications

<ComponentDemo
schema={{
type: 'sidebar',
items: [
{ label: 'Dashboard', icon: 'home', href: '/' },
{ label: 'Projects', icon: 'folder', href: '/projects' },
{ label: 'Team', icon: 'users', href: '/team' },
{ label: 'Settings', icon: 'settings', href: '/settings' }
type: 'sidebar-provider',
body: [
{
type: 'sidebar',
body: [
{
type: 'sidebar-content',
body: [
{
type: 'sidebar-group',
label: 'Menu',
body: [
{
type: 'sidebar-menu',
body: [
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Dashboard' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Projects' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Team' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Settings' }]
}
]
}
]
}
]
}
]
}
]
},
{
type: 'sidebar-inset',
body: [
{
type: 'div',
className: 'p-4',
body: [{ type: 'text', content: 'Main content area' }]
}
]
}
]
}}
title="Basic Sidebar"
Expand All @@ -26,20 +89,84 @@ The Sidebar component provides a collapsible navigation sidebar for applications

<ComponentDemo
schema={{
type: 'sidebar',
groups: [
type: 'sidebar-provider',
body: [
{
title: 'Main',
items: [
{ label: 'Dashboard', icon: 'home', href: '/' },
{ label: 'Analytics', icon: 'bar-chart', href: '/analytics' }
type: 'sidebar',
body: [
{
type: 'sidebar-content',
body: [
{
type: 'sidebar-group',
label: 'Main',
body: [
{
type: 'sidebar-menu',
body: [
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Dashboard' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Analytics' }]
}
]
}
]
}
]
},
{
type: 'sidebar-group',
label: 'Management',
body: [
{
type: 'sidebar-menu',
body: [
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Projects' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Team' }]
}
]
}
]
}
]
}
]
}
]
},
{
title: 'Management',
items: [
{ label: 'Projects', icon: 'folder', href: '/projects' },
{ label: 'Team', icon: 'users', href: '/team' }
type: 'sidebar-inset',
body: [
{
type: 'div',
className: 'p-4',
body: [{ type: 'text', content: 'Main content area' }]
}
]
}
]
Expand All @@ -51,13 +178,69 @@ The Sidebar component provides a collapsible navigation sidebar for applications

<ComponentDemo
schema={{
type: 'sidebar',
collapsible: true,
defaultCollapsed: false,
items: [
{ label: 'Home', icon: 'home', href: '/' },
{ label: 'Files', icon: 'folder', href: '/files' },
{ label: 'Settings', icon: 'settings', href: '/settings' }
type: 'sidebar-provider',
body: [
{
type: 'sidebar',
collapsible: 'icon',
body: [
{
type: 'sidebar-content',
body: [
{
type: 'sidebar-group',
body: [
{
type: 'sidebar-menu',
body: [
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Home' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Files' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Settings' }]
}
]
}
]
}
]
}
]
}
]
},
{
type: 'sidebar-inset',
body: [
{
type: 'div',
className: 'p-4',
body: [
{ type: 'sidebar-trigger' },
{ type: 'text', content: 'Main content area' }
]
}
]
}
]
}}
title="Collapsible Sidebar"
Expand Down Expand Up @@ -97,12 +280,80 @@ interface SidebarSchema {

<ComponentDemo
schema={{
type: 'sidebar',
items: [
{ label: 'Inbox', icon: 'inbox', href: '/inbox', badge: 12 },
{ label: 'Drafts', icon: 'file-text', href: '/drafts', badge: 3 },
{ label: 'Sent', icon: 'send', href: '/sent' },
{ label: 'Trash', icon: 'trash', href: '/trash' }
type: 'sidebar-provider',
body: [
{
type: 'sidebar',
body: [
{
type: 'sidebar-content',
body: [
{
type: 'sidebar-group',
body: [
{
type: 'sidebar-menu',
body: [
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [
{ type: 'text', content: 'Inbox' },
{ type: 'badge', content: '12', className: 'ml-auto' }
]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [
{ type: 'text', content: 'Drafts' },
{ type: 'badge', content: '3', className: 'ml-auto' }
]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Sent' }]
}
]
},
{
type: 'sidebar-menu-item',
body: [
{
type: 'sidebar-menu-button',
body: [{ type: 'text', content: 'Trash' }]
}
]
}
]
}
]
}
]
}
]
},
{
type: 'sidebar-inset',
body: [
{
type: 'div',
className: 'p-4',
body: [{ type: 'text', content: 'Main content area' }]
}
]
}
]
}}
title="Sidebar with Badges"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/renderers/data-display/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '../../ui/table';
import { cn } from '../../lib/utils';

export const SimpleTableRenderer = ({ schema, className, ..._props }: any) => {
export const SimpleTableRenderer = ({ schema, className }: any) => {
const data = useDataScope(schema.bind);
const columns = schema.props?.columns || [];

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/renderers/placeholders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ComponentRegistry } from '@object-ui/core';
import { cn } from '../lib/utils';
import { Box, FileQuestion } from 'lucide-react';

export const PlaceholderRenderer = ({ schema, className, ...props }: any) => {
export const PlaceholderRenderer = ({ schema, className }: any) => {
const type = schema.type;
const isView = type.startsWith('view:');
const isWidget = type.startsWith('widget:');
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-aggrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@types/react": "^19.2.9",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.2.1",
"ag-grid-community": "^35.0.1",
"ag-grid-react": "^32.3.4",
"ag-grid-community": "^32.3.9",
"ag-grid-react": "^32.3.9",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-dts": "^4.5.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-aggrid/src/AgGridImpl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default function AgGridImpl({
}, [columnDefs, editable, columnConfig]);

// Merge grid options with props
const mergedGridOptions: GridOptions = useMemo(() => ({
const mergedGridOptions = useMemo(() => ({
...gridOptions,
pagination,
paginationPageSize,
Expand Down
Loading
Loading