UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

76 lines (75 loc) 3.16 kB
import { ReactNodeOrFunction } from "../../utils/index.types.js"; import { SimplePlacement, ThemeProps } from "../../core/system/index.types.js"; import { Component, HTMLStyledProps } from "../../core/components/index.types.js"; import "../../core/index.js"; import { HTMLMotionProps, MotionTransitionProps } from "../motion/index.types.js"; import { PopoverStyle } from "./popover.style.js"; import { PortalProps } from "../portal/portal.js"; import { UsePopoverProps } from "./use-popover.js"; import "../../index.js"; import * as react2598 from "react"; import { FC, PropsWithChildren } from "react"; //#region src/components/popover/popover.d.ts interface PopupAnimationProps { /** * The animation of the element. * * @default 'scale' */ animationScheme?: "none" | "scale" | SimplePlacement; /** * The animation duration. * * @default 0.2 */ duration?: MotionTransitionProps["duration"]; } declare const getPopupAnimationProps: (animationScheme?: PopupAnimationProps["animationScheme"], duration?: PopupAnimationProps["duration"]) => {}; interface PopoverRootProps extends UsePopoverProps, PopupAnimationProps, ThemeProps<PopoverStyle> { /** * The children of the popover. */ children?: ReactNodeOrFunction<{ open: boolean; onClose: () => void; }>; /** * The animation duration. * * @default 0.2 */ duration?: PopupAnimationProps["duration"]; /** * If `true`, display the popover close button. * * @default true */ withCloseButton?: boolean; } declare const PopoverPropsContext: react2598.Context<Partial<PopoverRootProps> | undefined>, usePopoverPropsContext: () => Partial<PopoverRootProps> | undefined; /** * `Popover` is a component that floats around an element to display information. * * @see https://yamada-ui.com/docs/components/popover */ declare const PopoverRoot: FC<PopoverRootProps>; interface PopoverTriggerProps extends HTMLStyledProps<"button"> {} declare const PopoverTrigger: Component<"button", PopoverTriggerProps>; interface PopoverAnchorProps extends HTMLStyledProps {} declare const PopoverAnchor: Component<"div", PopoverAnchorProps>; interface PopoverContentProps extends Omit<HTMLMotionProps, "children">, PropsWithChildren { /** * Props for portal component. */ portalProps?: Omit<PortalProps, "children">; } declare const PopoverContent: Component<"div", PopoverContentProps>; interface PopoverHeaderProps extends HTMLStyledProps {} declare const PopoverHeader: Component<"div", PopoverHeaderProps>; interface PopoverBodyProps extends HTMLStyledProps {} declare const PopoverBody: Component<"div", PopoverBodyProps>; interface PopoverFooterProps extends HTMLStyledProps {} declare const PopoverFooter: Component<"div", PopoverFooterProps>; //#endregion export { PopoverAnchor, PopoverAnchorProps, PopoverBody, PopoverBodyProps, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverPropsContext, PopoverRoot, PopoverRootProps, PopoverTrigger, PopoverTriggerProps, PopupAnimationProps, getPopupAnimationProps, usePopoverPropsContext }; //# sourceMappingURL=popover.d.ts.map