import { Button } from '@fluid-design/fluid-ui'; import { Dialog, Transition } from '@headlessui/react'; import { Bars2Icon } from '@heroicons/react/24/outline'; import { BookOpenIcon, Squares2X2Icon } from '@heroicons/react/24/solid'; import { motion } from 'framer-motion'; import { useRouter } from 'next/router'; import { createContext, Fragment, useContext } from 'react'; import { MdMouse } from 'react-icons/md'; import clsxm from '@/lib/clsxm'; import { useMobileNavigationStore } from '@/components/framework/MobileNavigation'; import { ThemeSwitch } from '@/components/ThemeSwitch'; import UnstyledLink from './UnstyledLink'; import AppLogo from '../ui/AppLogo'; import packageInfo from '../../../package.json'; const navigation = [ { name: 'Dashboard', href: 'dashboard', icon: Squares2X2Icon }, { name: 'Examples', href: 'examples', icon: MdMouse }, { name: 'Usage', href: 'usage', icon: BookOpenIcon }, ]; const secondaryNavigation = [ { groupName: 'Plugins', groupList: [ { name: 'Button', href: 'plugin/button', isDone: true }, { name: 'Tooltip', href: 'plugin/tooltip', isDone: true }, ], }, { groupName: 'Components', groupList: [ // { name: "Alert", href: "alert", isDone: false }, { name: 'Accordion', href: 'accordion', isDone: true }, // { name: "Badge", href: "badge", isDone: false }, // { name: "Breadcrumbs", href: "breadcrumbs", isDone: false }, { name: 'Button', href: 'button', isDone: true }, // { name: "Collapse", href: "collapse", isDone: false }, // { name: "Divider", href: "divider", isDone: false }, // { name: "Drawer", href: "drawer", isDone: false }, // { name: "Dropdown", href: "dropdown", isDone: false }, // { name: "Footer", href: "footer", isDone: false }, // { name: "Hero", href: "hero", isDone: false }, // { name: "Indicator", href: "indicator", isDone: false }, // { name: "List", href: "list", isDone: false }, // { name: "Mask", href: "mask", isDone: false }, { name: 'Menu', href: 'menu', isDone: true }, // { name: 'Popover', href: 'popover', isDone: false }, { name: 'Dialog (Modal)', href: 'dialog', isDone: true }, // { name: "Navbar", href: "navbar", isDone: false }, // { name: "Pagination", href: "pagination", isDone: false }, // { name: "Progress", href: "progress", isDone: false }, { name: 'Tab', href: 'tab', isDone: true }, { name: 'Toast', href: 'toast', isDone: true }, // { name: "Table", href: "table", isDone: false }, // { name: "Tooltip", href: "tooltip", isDone: false }, ], }, { groupName: 'Forms', groupList: [ { name: 'Validation', href: 'form/validation', isDone: true }, { name: 'Select', href: 'form/select', isDone: true }, { name: 'Combobox', href: 'form/combobox', isDone: true }, { name: 'Switch', href: 'form/switch', isDone: true }, { name: 'Input', href: 'form/input', isDone: true }, { name: 'Textarea', href: 'form/textarea', isDone: true }, ], }, { groupName: 'UI', groupList: [ { name: 'Card', href: 'ui/card', isDone: true }, // { name: 'Empty State', href: 'empty-state', isDone: false }, { name: 'List', href: 'ui/list', isDone: true }, ], }, ]; const bgClassName = 'dark:bg-gray-900 dark:contrast-more:border-gray-200 dark:contrast-more:bg-[rgb(18,15,13)] bg-gray-50'; export const SidebarHeader = () => { return (
Fluid Design
V{packageInfo.version}
); }; export const SidebarNavigation = ({ className = '' }) => { const router = useRouter(); const { pathname, asPath, query } = router; const activeTab = pathname.split('docs/')[1]; return ( ); }; export const SidebarMenu = ({ className = '', ...props }) => { return (
); }; export const Sidebar = ({ hideNav = false }) => { if (hideNav) return null; return (
); }; const IsInsideMobileNavigationContext = createContext(false); export const useIsInsideMobileNavigation = () => { return useContext(IsInsideMobileNavigationContext); }; export const MobileSidebar = () => { const isInsideMobileNavigation = useIsInsideMobileNavigation(); const { isOpen, toggle, close } = useMobileNavigationStore(); return ( {!isInsideMobileNavigation && ( )} ); };