UNPKG

@accelint/design-toolkit

Version:

An open-source component library to serve as part of the entire ecosystem of UX for Accelint.

67 lines (64 loc) 2.11 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; import { PopoverProps, PopoverTitleProps, PopoverContentProps, PopoverBodyProps, PopoverTriggerProps } from './types.js'; import 'react-aria-components'; /** * Popover - A floating content container positioned relative to a trigger element * * Provides accessible popover functionality with flexible positioning and content * organization. Perfect for contextual information, menus, or supplementary content * that appears on demand without interrupting the user's workflow. * * @example * // Basic popover * <Popover> * <Popover.Trigger> * <Button>Show Info</Button> * </Popover.Trigger> * <Popover.Content> * <Popover.Body> * <p>Additional information appears here</p> * </Popover.Body> * </Popover.Content> * </Popover> * * @example * // Popover with title and actions * <Popover placement="top"> * <Popover.Trigger> * <Button>Options</Button> * </Popover.Trigger> * <Popover.Content> * <Popover.Title>Quick Actions</Popover.Title> * <Popover.Body> * <Button>Edit</Button> * <Button>Delete</Button> * </Popover.Body> * </Popover.Content> * </Popover> */ declare const Popover: { ({ placement, children, ...rest }: PopoverProps): react_jsx_runtime.JSX.Element; displayName: string; Title: { ({ children, className, ...rest }: PopoverTitleProps): react_jsx_runtime.JSX.Element; displayName: string; }; Content: { ({ children, className, ...rest }: PopoverContentProps): react_jsx_runtime.JSX.Element; displayName: string; }; Body: { ({ children, className }: PopoverBodyProps): react_jsx_runtime.JSX.Element; displayName: string; }; Footer: { ({ children, className, }: { children: ReactNode; className?: string; }): react_jsx_runtime.JSX.Element; displayName: string; }; Trigger: ({ children, ...props }: PopoverTriggerProps) => react_jsx_runtime.JSX.Element; }; export { Popover };