import type { ARIAButtonType } from '@fluentui/react-aria'; import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; import type { EventData } from '@fluentui/react-utilities'; import type { EventHandler } from '@fluentui/react-utilities'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; import type { JSXElement } from '@fluentui/react-utilities'; import type { PopoverContextValue as PopoverContextValue_2 } from '@fluentui/react-popover'; import type { PopoverTriggerChildProps } from '@fluentui/react-popover'; import { PositioningShorthand } from '@fluentui/react-positioning'; import * as React_2 from 'react'; import { renderTeachingPopoverBody_unstable as renderTeachingPopoverBody } from '@fluentui/react-teaching-popover'; import { renderTeachingPopoverCarouselCard_unstable as renderTeachingPopoverCarouselCard } from '@fluentui/react-teaching-popover'; import { renderTeachingPopoverCarouselNav_unstable as renderTeachingPopoverCarouselNav } from '@fluentui/react-teaching-popover'; import { renderTeachingPopoverCarouselPageCount_unstable as renderTeachingPopoverCarouselPageCount } from '@fluentui/react-teaching-popover'; import type { Slot } from '@fluentui/react-utilities'; import { TeachingPopoverBodyProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverBodySlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverBodyState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselCardProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselCardSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselCardState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselFooterButtonBaseProps as TeachingPopoverCarouselFooterButtonProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselFooterButtonSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselFooterButtonBaseState as TeachingPopoverCarouselFooterButtonState } from '@fluentui/react-teaching-popover'; import type { TeachingPopoverCarouselNavButtonBaseProps } from '@fluentui/react-teaching-popover'; import type { TeachingPopoverCarouselNavButtonBaseState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselNavButtonSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselNavBaseProps as TeachingPopoverCarouselNavProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselNavSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselNavBaseState as TeachingPopoverCarouselNavState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselPageCountProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselPageCountRenderFunction } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselPageCountSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselPageCountState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselBaseProps as TeachingPopoverCarouselProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverCarouselBaseState as TeachingPopoverCarouselState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverFooterBaseProps as TeachingPopoverFooterProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverFooterBaseState as TeachingPopoverFooterState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverHeaderBaseProps as TeachingPopoverHeaderProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverHeaderSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverHeaderBaseState as TeachingPopoverHeaderState } from '@fluentui/react-teaching-popover'; import { TeachingPopoverTitleBaseProps as TeachingPopoverTitleProps } from '@fluentui/react-teaching-popover'; import { TeachingPopoverTitleSlots } from '@fluentui/react-teaching-popover'; import { TeachingPopoverTitleBaseState as TeachingPopoverTitleState } from '@fluentui/react-teaching-popover'; import type { TriggerProps } from '@fluentui/react-utilities'; import { useTeachingPopoverBody_unstable as useTeachingPopoverBody } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverCarouselBase_unstable as useTeachingPopoverCarousel } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverCarouselCard_unstable as useTeachingPopoverCarouselCard } from '@fluentui/react-teaching-popover'; import type { useTeachingPopoverCarouselContextValues_unstable } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverCarouselFooterButtonBase_unstable as useTeachingPopoverCarouselFooterButton } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverCarouselNavBase_unstable as useTeachingPopoverCarouselNav } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverCarouselPageCount_unstable as useTeachingPopoverCarouselPageCount } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverFooterBase_unstable as useTeachingPopoverFooter } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverHeaderBase_unstable as useTeachingPopoverHeader } from '@fluentui/react-teaching-popover'; import { useTeachingPopoverTitleBase_unstable as useTeachingPopoverTitle } from '@fluentui/react-teaching-popover'; declare type HeadlessPopoverTriggerChildExtras = { 'aria-haspopup'?: 'true'; 'aria-details'?: string; 'data-open'?: string; }; /** * Render function for the carousel nav buttons. * * Derived from the v9 `TeachingPopoverCarouselNavBaseState.renderNavButton` * field, which is the package's public contract for this shape. */ export declare type NavButtonRenderFunction = TeachingPopoverCarouselNavState['renderNavButton']; /** * Data attached to open/close events. Uses the canonical `EventData` shape so * consumers can discriminate on `type` or use the handler directly via * `EventHandler`. */ declare type OnOpenChangeData = EventData & { open: boolean; }; /** * Events that can trigger Popover open/close changes. */ declare type OpenPopoverEvents = MouseEvent | TouchEvent | React_2.FocusEvent | React_2.KeyboardEvent | React_2.MouseEvent; /** * Context shared between Popover and its children. */ declare type PopoverContextValue = Pick & { positioning: { targetRef: React_2.RefCallback; containerRef: React_2.RefCallback; }; }; /** * Popover Props */ declare type PopoverProps = { /** * Can contain two children including `PopoverTrigger` and `PopoverSurface`. * Alternatively can only contain `PopoverSurface` if using a custom `target`. */ children: [JSXElement, JSXElement] | JSXElement; /** Controlled open state. */ open?: boolean; /** * Default open state for uncontrolled mode. * @default false */ defaultOpen?: boolean; /** Callback when the open state changes. */ onOpenChange?: EventHandler; /** * Open on hover. * @default false */ openOnHover?: boolean; /** * Open on context menu (right-click). * @default false */ openOnContext?: boolean; /** * Delay in ms before closing on mouse leave. * @default 500 */ mouseLeaveDelay?: number; /** * Positioning configuration. Accepts either a full `PositioningProps` * object or a shorthand string such as `'below'` / `'above-end'`. * * See the {@link https://react.fluentui.dev/?path=/docs/headless-concepts-positioning--docs Positioning concept} * for the full list of options and live examples. */ positioning?: PositioningShorthand; /** * Display an arrow pointing to the target. * @default false */ withArrow?: boolean; /** * Optional id for the popover surface. When provided, this id is applied to * the `PopoverSurface` element and referenced by `PopoverTrigger` * (`aria-details`). If omitted, a generated id is used. */ id?: string; /** * When true, opens the popover as a modal via `HTMLDialogElement.showModal()`. * Focus is trapped inside the surface, the rest of the page is inert, and * focus is restored to the trigger when the popover closes — all spec-mandated * by the native dialog element. * * When false (default), the popover is non-modal: opens via `showPopover()`, * the browser handles light dismiss (Escape, click-outside, popover-stack * peer dismissal), and no focus trap or autofocus is applied unless a child * has the HTML `autofocus` attribute. * * @default false */ trapFocus?: boolean; }; /** * Popover State */ declare type PopoverState = Required> & Pick & { setOpen: (e: OpenPopoverEvents, open: boolean) => void; toggleOpen: (e: OpenPopoverEvents) => void; triggerRef: React_2.RefObject; contentRef: React_2.RefObject; arrowRef: React_2.RefObject; popoverTrigger: React_2.ReactElement | undefined; popoverSurface: React_2.ReactElement | undefined; contextTarget: { x: number; y: number; } | undefined; setContextTarget: (target: { x: number; y: number; } | undefined) => void; positioning: PositioningReturn; surfaceId: string; }; declare type PositioningReturn = { targetRef: React_2.RefCallback; containerRef: React_2.RefCallback; }; /** * Renders TeachingPopover by providing both the headless `PopoverContext` * (consumed by headless sub-components) and the `@fluentui/react-popover` * `PopoverContext` (consumed by `@fluentui/react-teaching-popover` base * hooks). The bridged value is cast to `BasePopoverContextValue` — the * omitted fields (`size`, `inline`, etc.) are styling concerns that no base * hook reads. */ export declare const renderTeachingPopover: (state: TeachingPopoverState, contextValues: TeachingPopoverContextValues) => React_2.ReactElement; export { renderTeachingPopoverBody } export declare const renderTeachingPopoverCarousel: (state: TeachingPopoverCarouselState, contextValues: TeachingPopoverCarouselContextValues) => JSXElement; export { renderTeachingPopoverCarouselCard } export declare const renderTeachingPopoverCarouselFooter: (state: TeachingPopoverCarouselFooterState) => JSXElement; export declare const renderTeachingPopoverCarouselFooterButton: (state: TeachingPopoverCarouselFooterButtonState) => JSXElement; export { renderTeachingPopoverCarouselNav } export declare const renderTeachingPopoverCarouselNavButton: (state: TeachingPopoverCarouselNavButtonState) => JSXElement; export { renderTeachingPopoverCarouselPageCount } /** * The headless footer leaves button composition to consumers — unlike the * v9 render which emits dedicated `primary`/`secondary` Button slots that * the headless base hook intentionally omits. */ export declare const renderTeachingPopoverFooter: (state: TeachingPopoverFooterState) => JSXElement; export declare const renderTeachingPopoverHeader: (state: TeachingPopoverHeaderState) => JSXElement; export declare const renderTeachingPopoverSurface: (state: TeachingPopoverSurfaceState) => JSXElement; export declare const renderTeachingPopoverTitle: (state: TeachingPopoverTitleState) => JSXElement; /** * Renders the PopoverTrigger (returns the cloned child element). */ export declare const renderTeachingPopoverTrigger: (state: TeachingPopoverTriggerState) => JSXElement | null; /** * Headless TeachingPopover component. * * Wraps the headless `Popover` and additionally bridges the v9 * `PopoverContext` so sub-components built on `useTeachingPopover*Base_unstable` * hooks from `@fluentui/react-teaching-popover` resolve their context reads. */ export declare const TeachingPopover: { (props: TeachingPopoverProps): JSXElement; displayName: string; }; /** * Subset of the `@fluentui/react-popover` `PopoverContextValue` that the * `@fluentui/react-teaching-popover` base hooks actually read (`toggleOpen`, * `setOpen`, `triggerRef`). The other fields fall back to * `popoverContextDefaultValue` from `@fluentui/react-popover`. */ export declare type TeachingPopoverBaseBridgedContextValue = Pick; export declare const TeachingPopoverBody: ForwardRefComponent; export { TeachingPopoverBodyProps } export { TeachingPopoverBodySlots } export { TeachingPopoverBodyState } export declare const TeachingPopoverCarousel: ForwardRefComponent; export declare const TeachingPopoverCarouselCard: ForwardRefComponent; export { TeachingPopoverCarouselCardProps } export { TeachingPopoverCarouselCardSlots } export { TeachingPopoverCarouselCardState } /** * Context shared between TeachingPopoverCarousel and its children components. * * Derived from the v9 `useTeachingPopoverCarouselContextValues_unstable` return * type, which is the package's public contract for this shape. */ export declare type TeachingPopoverCarouselContextValues = ReturnType; export declare const TeachingPopoverCarouselFooter: ForwardRefComponent; export declare const TeachingPopoverCarouselFooterButton: ForwardRefComponent; export { TeachingPopoverCarouselFooterButtonProps } export { TeachingPopoverCarouselFooterButtonSlots } export { TeachingPopoverCarouselFooterButtonState } export declare type TeachingPopoverCarouselFooterProps = ComponentProps; export declare type TeachingPopoverCarouselFooterSlots = { /** * The element wrapping carousel pages and navigation. */ root: NonNullable>; /** * Previous-page button. Defaults to `TeachingPopoverCarouselFooterButton` * with `navType: 'prev'`; consumers provide `altText` and content. */ previous?: Slot; /** * Next/finish-page button. Defaults to `TeachingPopoverCarouselFooterButton` * with `navType: 'next'`; consumers provide `altText` and content. */ next: NonNullable>; }; export declare type TeachingPopoverCarouselFooterState = ComponentState; export declare const TeachingPopoverCarouselNav: ForwardRefComponent; export declare const TeachingPopoverCarouselNavButton: ForwardRefComponent; export declare type TeachingPopoverCarouselNavButtonProps = TeachingPopoverCarouselNavButtonBaseProps; export { TeachingPopoverCarouselNavButtonSlots } export declare type TeachingPopoverCarouselNavButtonState = TeachingPopoverCarouselNavButtonBaseState & { root: { 'data-selected'?: string; }; }; export { TeachingPopoverCarouselNavProps } export { TeachingPopoverCarouselNavSlots } export { TeachingPopoverCarouselNavState } export declare const TeachingPopoverCarouselPageCount: ForwardRefComponent; export { TeachingPopoverCarouselPageCountProps } export { TeachingPopoverCarouselPageCountRenderFunction } export { TeachingPopoverCarouselPageCountSlots } export { TeachingPopoverCarouselPageCountState } export { TeachingPopoverCarouselProps } export { TeachingPopoverCarouselSlots } export { TeachingPopoverCarouselState } export declare type TeachingPopoverContextValues = { popover: PopoverContextValue; basePopover: TeachingPopoverBaseBridgedContextValue; }; export declare const TeachingPopoverFooter: ForwardRefComponent; export { TeachingPopoverFooterProps } export { TeachingPopoverFooterState } export declare const TeachingPopoverHeader: ForwardRefComponent; export { TeachingPopoverHeaderProps } export { TeachingPopoverHeaderSlots } export { TeachingPopoverHeaderState } /** * TeachingPopover Props */ export declare type TeachingPopoverProps = PopoverProps; /** * TeachingPopover State — identical to the headless Popover state. Styling * concerns from `@fluentui/react-teaching-popover` (`appearance`, `trapFocus`, * `inline`) are intentionally omitted; consumers control presentation. */ export declare type TeachingPopoverState = PopoverState; /** * Headless PopoverSurface component. * * Renders the popover content area as a native `` so * a single element supports both non-modal (`showPopover()`) and modal * (`showModal()`) show modes; the choice is driven by the parent * `Popover`'s `trapFocus` prop. */ export declare const TeachingPopoverSurface: ForwardRefComponent; export declare type TeachingPopoverSurfaceProps = ComponentProps; /** * PopoverSurface Slots. * * The root renders as a native `` so a single element * supports both show modes: `showPopover()` for non-modal (default) and * `showModal()` for the modal/focus-trap path. */ export declare type TeachingPopoverSurfaceSlots = { root: Slot<'dialog'>; }; export declare type TeachingPopoverSurfaceState = ComponentState & { withArrow: boolean | undefined; arrowRef: React_2.RefObject; 'data-open': string; }; export declare const TeachingPopoverTitle: ForwardRefComponent; export { TeachingPopoverTitleProps } export { TeachingPopoverTitleSlots } export { TeachingPopoverTitleState } /** * Headless PopoverTrigger component. * * Wraps a trigger element, applying event handlers and ARIA attributes * for popover interaction. */ export declare const TeachingPopoverTrigger: React_2.FC; /** * Props that are merged onto the child of the PopoverTrigger when cloned. * Composes canonical {@link CanonicalPopoverTriggerChildProps} with the headless-specific extras. */ export declare type TeachingPopoverTriggerChildProps = PopoverTriggerChildProps; /** * PopoverTrigger Props */ export declare type TeachingPopoverTriggerProps = Omit, 'children'> & { children: React_2.ReactElement; /** * Disable ARIA button enhancement on the trigger. * @default false */ disableButtonEnhancement?: boolean; }; /** * PopoverTrigger State */ export declare type TeachingPopoverTriggerState = { children: React_2.ReactElement | null; }; /** * Returns the state for a TeachingPopover component. * * Built on top of the headless `Popover` and defaults `withArrow` to `true`, * matching the v9 TeachingPopover convention. */ export declare const useTeachingPopover: (props: TeachingPopoverProps) => TeachingPopoverState; export { useTeachingPopoverBody } export { useTeachingPopoverCarousel } export { useTeachingPopoverCarouselCard } export declare const useTeachingPopoverCarouselContextValues: (state: TeachingPopoverCarouselState) => TeachingPopoverCarouselContextValues; export declare const useTeachingPopoverCarouselFooter: (props: TeachingPopoverCarouselFooterProps, ref: React_2.Ref) => TeachingPopoverCarouselFooterState; export { useTeachingPopoverCarouselFooterButton } export { useTeachingPopoverCarouselNav } export declare const useTeachingPopoverCarouselNavButton: (props: TeachingPopoverCarouselNavButtonProps, ref: React_2.Ref) => TeachingPopoverCarouselNavButtonState; export { useTeachingPopoverCarouselPageCount } /** * Builds both the headless `PopoverContext` value and a * `@fluentui/react-popover`-compatible `PopoverContext` value. The bridge * lets sub-components consume base hooks from * `@fluentui/react-teaching-popover` (e.g. `useTeachingPopoverHeaderBase_unstable`), * which read `toggleOpen` / `setOpen` / `triggerRef` from that context. * * The `@fluentui/react-popover` `OpenPopoverEvents` union is wider than the * headless one (it accepts `FocusEvent`). Base hooks never fire focus-driven * dismisses, so casting `state.setOpen` / `state.toggleOpen` to those * signatures is safe — no extra event types reach them in practice. */ export declare const useTeachingPopoverContextValues: (state: TeachingPopoverState) => TeachingPopoverContextValues; export { useTeachingPopoverFooter } export { useTeachingPopoverHeader } /** * Returns the state for a PopoverSurface component. */ export declare const useTeachingPopoverSurface: (props: TeachingPopoverSurfaceProps, ref: React_2.Ref) => TeachingPopoverSurfaceState; export { useTeachingPopoverTitle } /** * Returns the state for a PopoverTrigger component. * Applies event handlers and ARIA attributes to the child element. */ export declare const useTeachingPopoverTrigger: (props: TeachingPopoverTriggerProps) => TeachingPopoverTriggerState; export { }