import type { ARIAButtonSlotProps } from '@fluentui/react-aria'; import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; import { ContextSelector } from '@fluentui/react-context-selector'; import { FC } from 'react'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; import type { JSXElement } from '@fluentui/react-utilities'; import type { PresenceMotionSlotProps } from '@fluentui/react-motion'; import { Provider } from 'react'; import { ProviderProps } from 'react'; import * as React_2 from 'react'; import type { Slot } from '@fluentui/react-utilities'; import type { SlotClassNames } from '@fluentui/react-utilities'; /** * Define a styled Accordion, using the `useAccordion_unstable` and `useAccordionStyles_unstable` hooks. */ export declare const Accordion: ForwardRefComponent & ((props: AccordionProps) => JSXElement); export declare type AccordionBaseProps = Omit, 'navigation'>; export declare type AccordionBaseState = Omit, 'navigation'>; export declare const accordionClassNames: SlotClassNames; export declare type AccordionContextValue = { /** * The list of opened panels by index */ openItems: AccordionItemValue[]; /** * Callback used by AccordionItem to request a change on it's own opened state * Should be used to toggle AccordionItem */ requestToggle: (data: AccordionRequestToggleData) => void; collapsible: boolean; multiple: boolean; navigation: 'linear' | 'circular' | undefined; }; export declare type AccordionContextValues = { accordion: AccordionContextValue; }; /** * Define a styled AccordionHeader, using the `useAccordionHeader_unstable` and `useAccordionHeaderStyles_unstable` * hooks. */ export declare const AccordionHeader: ForwardRefComponent; export declare type AccordionHeaderBaseProps = Omit; export declare type AccordionHeaderBaseState = Omit; export declare const accordionHeaderClassNames: SlotClassNames; export declare type AccordionHeaderContextValue = { disabled: boolean; open: boolean; expandIconPosition: AccordionHeaderExpandIconPosition; size: AccordionHeaderSize; }; export declare type AccordionHeaderContextValues = { accordionHeader: AccordionHeaderContextValue; }; export declare type AccordionHeaderExpandIconPosition = 'start' | 'end'; export declare type AccordionHeaderProps = ComponentProps> & { /** * The position of the expand icon slot in heading. */ expandIconPosition?: AccordionHeaderExpandIconPosition; /** * Indicates if the AccordionHeader should be rendered inline. */ inline?: boolean; /** * Size of spacing in the heading. */ size?: AccordionHeaderSize; }; export declare const AccordionHeaderProvider: React_2.Provider; export declare type AccordionHeaderSize = 'small' | 'medium' | 'large' | 'extra-large'; export declare type AccordionHeaderSlots = { /** * The element wrapping the button. By default this is a div, but can be a heading. */ root: NonNullable>; /** * The component to be used as button in heading */ button: NonNullable>>; /** * Expand icon slot rendered before (or after) children content in heading. */ expandIcon?: Slot<'span'>; /** * Expand icon slot rendered before (or after) children content in heading. */ icon?: Slot<'div'>; }; export declare type AccordionHeaderState = ComponentState & Required> & AccordionHeaderContextValue; export declare type AccordionIndex = number | number[]; /** * Define a styled AccordionItem, using the `useAccordionItem_unstable` and `useAccordionItemStyles_unstable` hooks. */ export declare const AccordionItem: ForwardRefComponent; export declare const accordionItemClassNames: SlotClassNames; export declare type AccordionItemContextValue = { open: boolean; disabled: boolean; value: Value; /** * @deprecated - use `requestToggle` from AccordionContent instead */ onHeaderClick(event: AccordionToggleEvent): void; }; export declare type AccordionItemContextValues = { accordionItem: AccordionItemContextValue; }; export declare type AccordionItemProps = ComponentProps & { /** * Disables opening/closing of panel. */ disabled?: boolean; /** * Required value that identifies this item inside an Accordion component. */ value: Value; }; export declare const AccordionItemProvider: React_2.Provider>; export declare type AccordionItemSlots = { root: NonNullable>; }; export declare type AccordionItemState = ComponentState & AccordionItemContextValue; export declare type AccordionItemValue = unknown; /** * Define a styled AccordionPanel, using the `useAccordionPanel_unstable` and `useAccordionPanelStyles_unstable` hooks. */ export declare const AccordionPanel: ForwardRefComponent; export declare type AccordionPanelBaseProps = ComponentProps>; export declare type AccordionPanelBaseState = ComponentState> & Pick; export declare const accordionPanelClassNames: SlotClassNames>; export declare type AccordionPanelProps = ComponentProps; export declare type AccordionPanelSlots = { root: NonNullable>; collapseMotion?: Slot; }; export declare type AccordionPanelState = ComponentState & { /** * Internal open state, provided by context. */ open: boolean; }; export declare type AccordionProps = Omit, 'onToggle'> & { /** * Default value for the uncontrolled state of the panel. */ defaultOpenItems?: Value | Value[]; /** * Indicates if Accordion support multiple Panels closed at the same time. */ collapsible?: boolean; /** * Indicates if Accordion support multiple Panels opened at the same time. */ multiple?: boolean; /** * @deprecated Arrow keyboard navigation is not recommended for accordions. Consider using Tree if arrow navigation is a hard requirement. * Indicates if keyboard navigation is available and gives two options, linear or circular navigation. */ navigation?: 'linear' | 'circular'; /** * Callback to be called when the opened items change. */ onToggle?: AccordionToggleEventHandler; /** * Controls the state of the panel. */ openItems?: Value | Value[]; }; export declare const AccordionProvider: Provider> & FC>>; declare type AccordionRequestToggleData = { event: AccordionToggleEvent; } & Pick, 'value'>; export declare type AccordionSlots = { root: NonNullable>; }; export declare type AccordionState = ComponentState & AccordionContextValue; export declare type AccordionToggleData = { value: Value; openItems: Value[]; }; export declare type AccordionToggleEvent = React_2.MouseEvent | React_2.KeyboardEvent; export declare type AccordionToggleEventHandler = (event: AccordionToggleEvent, data: AccordionToggleData) => void; /** * Function that renders the final JSX of the component */ export declare const renderAccordion_unstable: (state: AccordionBaseState, contextValues: AccordionContextValues) => JSXElement; /** * Function that renders the final JSX of the component */ export declare const renderAccordionHeader_unstable: (state: AccordionHeaderBaseState, contextValues: AccordionHeaderContextValues) => JSXElement; /** * Function that renders the final JSX of the component */ export declare const renderAccordionItem_unstable: (state: AccordionItemState, contextValues: AccordionItemContextValues) => JSXElement; /** * Function that renders the final JSX of the component */ export declare const renderAccordionPanel_unstable: (state: AccordionPanelState) => JSXElement; /** * Returns the props and state required to render the component * @param props - Accordion properties * @param ref - reference to root HTMLElement of Accordion */ export declare const useAccordion_unstable: (props: AccordionProps, ref: React_2.Ref) => AccordionState; /** * Returns the props and state required to render the component * @param props - Accordion properties * @param ref - reference to root HTMLElement of Accordion */ export declare const useAccordionBase_unstable: (props: AccordionBaseProps, ref: React_2.Ref) => AccordionBaseState; export declare const useAccordionContext_unstable: (selector: ContextSelector) => T; export declare function useAccordionContextValues_unstable(state: AccordionState): AccordionContextValues; /** * Returns the props and state required to render the component * * @param props - AccordionHeader properties * @param ref - reference to root HTMLElement of AccordionHeader */ export declare const useAccordionHeader_unstable: (props: AccordionHeaderProps, ref: React_2.Ref) => AccordionHeaderState; /** * Base state hook for AccordionHeader, without design related features. * * @param props - AccordionHeader properties * @param ref - reference to root HTMLElement of AccordionHeader */ export declare const useAccordionHeaderBase_unstable: (props: AccordionHeaderBaseProps, ref: React_2.Ref) => AccordionHeaderBaseState; export declare const useAccordionHeaderContext_unstable: () => AccordionHeaderContextValue; export declare function useAccordionHeaderContextValues_unstable(state: AccordionHeaderState): AccordionHeaderContextValues; /** Applies style classnames to slots */ export declare const useAccordionHeaderStyles_unstable: (state: AccordionHeaderState) => AccordionHeaderState; /** * Returns the props and state required to render the component * @param props - AccordionItem properties * @param ref - reference to root HTMLElement of AccordionItem */ export declare const useAccordionItem_unstable: (props: AccordionItemProps, ref: React_2.Ref) => AccordionItemState; export declare const useAccordionItemContext_unstable: () => AccordionItemContextValue; export declare function useAccordionItemContextValues_unstable(state: AccordionItemState): AccordionItemContextValues; export declare const useAccordionItemStyles_unstable: (state: AccordionItemState) => AccordionItemState; /** * Returns the props and state required to render the component * @param props - AccordionPanel properties * @param ref - reference to root HTMLElement of AccordionPanel */ export declare const useAccordionPanel_unstable: (props: AccordionPanelProps, ref: React_2.Ref) => AccordionPanelState; /** * Base state hook for AccordionPanel, without design related features. * * @param props - AccordionPanelBaseProps properties * @param ref - reference to root HTMLElement of AccordionPanel */ export declare const useAccordionPanelBase_unstable: (props: AccordionPanelBaseProps, ref: React_2.Ref) => AccordionPanelBaseState; /** Applies style classnames to slots */ export declare const useAccordionPanelStyles_unstable: (state: AccordionPanelState) => AccordionPanelState; export declare const useAccordionStyles_unstable: (state: AccordionState) => AccordionState; export { }