import type { Meta, StoryObj } from '@storybook/vue3-vite'; import { ref } from 'vue'; import CompactButton from '@/components/button/compact-button.vue'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/collapsible'; import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/dropdown-menu'; import SidebarMenuBadge from '@/components/sidebar/sidebar-menu-badge.vue'; import { Sidebar, SidebarContent, SidebarElement, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarTrigger } from '..'; const meta: Meta = { title: 'Components/Sidebar', component: Sidebar, }; export default meta; type Story = StoryObj; export const Simple: Story = { parameters: { layout: 'fullscreen', }, args: {}, render: args => ({ components: { CompactButton, Collapsible, CollapsibleContent, CollapsibleTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Sidebar, SidebarContent, SidebarElement, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarMenuBadge, SidebarTrigger, }, setup() { // Track which items are expanded const expandedItems = ref>({ Orders: true, Products: false, Upsells: false, Coupons: false, Customers: false, Store: true, Insights: false, Invoices: false, }); const sidebarItems = [ { title: 'Dashboard', link: '#', icon: 'i-celeste-dashboard-line', }, { title: 'Orders', link: '#', icon: 'i-celeste-shopping-bag-line', children: [ { title: 'All orders', link: '#' }, { title: 'New order', link: '#' }, { title: 'Abandoned carts', link: '#' }, ], }, { title: 'Products', link: '#', icon: 'i-celeste-shopping-cart-line', children: [ { title: 'All products', link: '#' }, { title: 'New product', link: '#' }, { title: 'Categories', link: '#' }, { title: 'Reviews', link: '#' }, { title: 'Inventory', link: '#' }, ], }, { title: 'Upsells', link: '#', icon: 'i-celeste-arrow-up-line', children: [ { title: 'All upsells', link: '#' }, { title: 'New upsell', link: '#' }, ], }, { title: 'Coupons', link: '#', icon: 'i-celeste-coupon-line', children: [ { title: 'All coupons', link: '#' }, { title: 'New coupon', link: '#' }, ], }, { title: 'Customers', link: '#', icon: 'i-celeste-group-line', children: [ { title: 'All customers', link: '#' }, { title: 'New customer', link: '#' }, ], }, { title: 'Store', link: '#', icon: 'i-celeste-store-line', children: [ { title: 'Theme', link: '#' }, { title: 'Themes', link: '#' }, { title: 'Menus', link: '#' }, { title: 'Languages', link: '#' }, { title: 'Pages', link: '#' }, { title: 'Funnels', link: '#' }, { title: 'Domains', link: '#' }, ], }, { title: 'Insights', link: '#', icon: 'i-celeste-bar-chart-line', }, { title: 'Invoices', link: '#', icon: 'i-celeste-file-list-line', }, { title: 'Apps', link: '#', icon: 'i-celeste-apps-line', }, ]; const footerItems = [ { title: 'Affiliate', link: '#', icon: 'i-celeste-service-line', }, { title: 'Support', link: '#', icon: 'i-celeste-question-line', }, { title: 'Settings', link: '#', icon: 'i-celeste-settings-line', }, ]; return { expandedItems, sidebarItems, footerItems, args, }; }, template: `
Ageeba
ageeba.dotshop.com
Stores Dotshop Dawg Create a new store
Application Other
Dara
My Account Profile Settings Billing Log out
`, }), };