UNPKG

@sikka/hawa

Version:

Modern UI Kit made with Tailwind

265 lines (253 loc) • 10.3 kB
import * as React from 'react'; import React__default, { FC } from 'react'; import { D as DirectionType } from '../commonTypes-C-g8nFFC.mjs'; import { C as ChipColors } from '../Chip-KG1_ZmCL.mjs'; import { M as MenuItemType } from '../DropdownMenu-mK9EvfKp.mjs'; import * as MenubarPrimitive from '@radix-ui/react-menubar'; import '@radix-ui/react-dropdown-menu'; interface StatTypes extends React__default.HTMLAttributes<HTMLDivElement> { label?: string; color?: string; number?: string; helperText?: any; helperTextColor?: "default" | "positive" | "negative" | "muted"; chart?: any; icon?: React__default.ReactNode; variant?: "default" | "plain" | "contained" | "outlined" | "brutalist" | "dropshadow"; width?: "full" | "min" | "normal"; isLoading?: boolean; className?: string; clickable?: boolean; } declare const Stats: FC<StatTypes>; type AppSidebarItemProps = { value: string; slug?: string; label: string; badge?: { label: string; color?: ChipColors; }; icon?: any; subitems?: SubItem[]; onClick?: (e: React.MouseEvent) => void; onMouseDown?: (e: React.MouseEvent) => void; }; type SubItem = { value: string; label: string; slug?: string; badge?: { label: string; color?: ChipColors; }; icon?: any; onMouseDown?: (e: React.MouseEvent) => void; onClick?: (e: React.MouseEvent) => void; }; interface SidebarGroupProps { title?: string; items: AppSidebarItemProps[]; openedItem?: any; setOpenedItem?: any; selectedItem?: any; isOpen?: boolean; onItemClick?: (value: string[]) => void; onSubItemClick?: (values: string[]) => void; direction?: DirectionType; LinkComponent?: any; } declare const SidebarGroup: React.FC<SidebarGroupProps>; declare const SidebarItem: React.FC<{ item: AppSidebarItemProps; selectedItem?: any; direction?: DirectionType; onItemClick?: (value: string[]) => void; onSubItemClick?: (values: string[]) => void; isOpen?: boolean; LinkComponent?: any; }>; type CopyRightsTypes = { /** A text used as the version of the app, for example: v1.0.0 */ version?: string; /** Credit to the creator of the app, for example: Sikka Software */ credits?: string; /** The URL of the logo in the copyrights */ logoURL?: string; /** Enable/Disable the existance of the logo */ withLogo?: boolean; /** Fires when the logo is clicked, usually goes to the website of the creator of the app */ onLogoClicked?: any; }; declare const Copyrights: FC<CopyRightsTypes>; type NavigationMenuItem = { label: string; action: () => void; trigger?: any; }; type NavbarType = { logo?: any; buttons?: any; menuItems?: NavigationMenuItem[]; handleLogoClick?: () => void; backgroundColor?: string; }; declare const Navbar: React__default.FC<NavbarType>; type AppLayoutTypes$1 = { /** a custom header to replace the logoLink & logoSymbol */ header?: React__default.ReactNode; design?: "default"; bordered?: boolean; /** The pages of the side drawer */ drawerItems: AppSidebarItemProps[]; /** The direction of the layout */ direction?: DirectionType; /** The title of the current selected page, make sure it's the same as the drawerItem slug */ currentPage: string; /** Specifies the title of the page. */ pageTitle?: string; /** Specifies the symbol for the logo. */ logoSymbol?: any; /** Specifies the link for the logo. */ logoLink?: string; /** Specifies the text for the logo. */ logoText?: any; /** Specifies the content to be displayed in the layout. */ children?: any; /** Specifies whether to display the top bar. */ topBar?: boolean; /** Specifies the username to be displayed. */ username?: string; /** Specifies the user email to be displayed. */ email?: string; /** Specifies the image for the avatar. */ avatarImage?: any; /** * Specifies the size of the drawer. * - 'sm': Small. * - 'md': Medium. * - 'large': Large. */ drawerSize?: "sm" | "md" | "large"; /** Specifies the menu items for the profile menu. */ profileMenuItems?: MenuItemType[]; onAvatarClick?: () => void; /** * Specifies the width of the profile menu. * - 'default': Default width. * - 'sm': Small width. * - 'lg': Large width. * - 'parent': Inherits width from parent element. */ profileMenuWidth?: "default" | "sm" | "lg" | "parent"; /** Specifies additional actions for the drawer footer. */ DrawerFooterActions?: any; /** Specifies the item that was clicked. */ clickedItem?: any; /** Event handler for logo button click. */ onLogoClick?: () => void; /** Event handler for drawer expanded. */ onDrawerExpanded?: (isExpanded: boolean) => void; /** Text labels for various UI elements. */ texts?: { /** Label for expand sidebar button. */ expandSidebar?: string; /** Label for collapse sidebar button. */ collapseSidebar?: string; }; classNames?: { fullLogoImg?: string; symbolLogoImg?: string; logoContainer?: string; }; DrawerLinkComponent?: any; MenuLinkComponent?: any; }; declare const AppLayout: React__default.FunctionComponent<AppLayoutTypes$1>; type AppTopbarType = { direction?: DirectionType; size?: number; username?: string; email?: string; profileMenuItems?: MenuItemType[]; avatarImage?: string; }; declare const AppTopbar: React__default.FC<AppTopbarType>; declare const MenubarMenu: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Menu>>; declare const MenubarGroup: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>>; declare const MenubarPortal: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Portal>>; declare const MenubarSub: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>>; declare const MenubarRadioGroup: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>>; declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>; declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>; declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & { inset?: boolean; } & React.RefAttributes<HTMLDivElement>>; declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>; declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>; declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & { inset?: boolean; } & React.RefAttributes<HTMLDivElement>>; declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>; declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>; declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & { inset?: boolean; } & React.RefAttributes<HTMLDivElement>>; declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>; declare const MenubarShortcut: { ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element; displayname: string; }; type SingleAppTab = { label: string; value?: string; icon?: React__default.ReactNode; path?: string; action?: any; onMouseDown?: any; onClick?: any; }; type AppTabsType = { className?: string; tabs: SingleAppTab[]; }; declare const AppTabs: React__default.FC<AppTabsType>; type AppLayoutTypes = { pages?: any[]; /** The direction of the layout */ direction?: DirectionType; /** Specifies the title of the page. */ pageTitle?: string; /** Specifies the symbol for the logo. */ logoSymbol?: any; /** Specifies the link for the logo. */ logoLink?: string; /** Specifies the content to be displayed in the layout. */ children?: any; /** Specifies the image for the avatar. */ avatarImage?: any; /** * Specifies the size of the drawer. * - 'sm': Small. * - 'md': Medium. * - 'large': Large. */ drawerSize?: "sm" | "md" | "large"; /** Specifies whether to keep the drawer open. */ keepOpen: boolean; setKeepOpen: (value: boolean) => void; /** Specifies additional actions for the drawer footer. */ DrawerFooterActions?: any; /** Specifies the item that was clicked. */ clickedItem?: any; /** Event handler for logo button click. */ onLogoClick?: () => void; }; declare const DocsLayout: React__default.FunctionComponent<AppLayoutTypes>; type DocsSidebarType = { pages: any[]; currentPage?: string; direction?: DirectionType; }; declare const DocsSidebar: React__default.FC<DocsSidebarType>; export { AppLayout, type AppSidebarItemProps, AppTabs, AppTopbar, Copyrights, DocsLayout, DocsSidebar, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, SidebarGroup, SidebarItem, Stats };