packages/react-components/react-motion/library/etc/react-motion.api.md
Do not edit this file. It is a report generated by API Extractor.
import type { JSXElement } from '@fluentui/react-utilities';
import type { JSXIntrinsicElementKeys } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { SlotComponentType } from '@fluentui/react-utilities';
import type { SlotRenderFunction } from '@fluentui/react-utilities';
// @public (undocumented)
export type AtomMotion = AtomCore & {
reducedMotion?: Partial<AtomCore>;
};
// @public (undocumented)
export type AtomMotionFn<MotionParams extends Record<string, MotionParam> = {}> = (params: {
element: HTMLElement;
} & MotionParams) => AtomMotion | AtomMotion[];
// @public
export function createMotionComponent<MotionParams extends Record<string, MotionParam> = {}>(value: AtomMotion | AtomMotion[] | AtomMotionFn<MotionParams>): MotionComponent<MotionParams>;
// @public
export function createMotionComponentVariant<MotionParams extends Record<string, MotionParam> = {}>(component: MotionComponent<MotionParams>, variantParams: Partial<MotionParams>): MotionComponent<MotionParams>;
// @public (undocumented)
export function createPresenceComponent<MotionParams extends Record<string, MotionParam> = {}>(value: PresenceMotion | PresenceMotionFn<MotionParams>): PresenceComponent<MotionParams>;
// @public
export function createPresenceComponentVariant<MotionParams extends Record<string, MotionParam> = {}>(component: PresenceComponent<MotionParams>, variantParams: Partial<MotionParams>): PresenceComponent<MotionParams>;
// @public (undocumented)
export const curves: {
readonly curveAccelerateMax: "cubic-bezier(0.9,0.1,1,0.2)";
readonly curveAccelerateMid: "cubic-bezier(1,0,1,1)";
readonly curveAccelerateMin: "cubic-bezier(0.8,0,0.78,1)";
readonly curveDecelerateMax: "cubic-bezier(0.1,0.9,0.2,1)";
readonly curveDecelerateMid: "cubic-bezier(0,0,0,1)";
readonly curveDecelerateMin: "cubic-bezier(0.33,0,0.1,1)";
readonly curveEasyEaseMax: "cubic-bezier(0.8,0,0.2,1)";
readonly curveEasyEase: "cubic-bezier(0.33,0,0.67,1)";
readonly curveLinear: "cubic-bezier(0,0,1,1)";
};
// @public (undocumented)
export const durations: {
readonly durationUltraFast: 50;
readonly durationFaster: 100;
readonly durationFast: 150;
readonly durationNormal: 200;
readonly durationGentle: 250;
readonly durationSlow: 300;
readonly durationSlower: 400;
readonly durationUltraSlow: 500;
};
// @public (undocumented)
export const MotionBehaviourProvider: React_2.Provider<MotionBehaviourType | undefined>;
// @public (undocumented)
export type MotionComponent<MotionParams extends Record<string, MotionParam> = {}> = React_2.FC<MotionComponentProps & MotionParams> & {
[MOTION_DEFINITION]: AtomMotionFn<MotionParams>;
};
// @public (undocumented)
export type MotionComponentProps = {
children: JSXElement;
imperativeRef?: React_2.Ref<MotionImperativeRef | undefined>;
onMotionFinish?: (ev: null) => void;
onMotionCancel?: (ev: null) => void;
onMotionStart?: (ev: null) => void;
};
// @public (undocumented)
export type MotionImperativeRef = {
setPlaybackRate: (rate: number) => void;
setPlayState: (state: 'running' | 'paused') => void;
};
// @public
export type MotionParam = boolean | number | string;
// @internal
export const MotionRefForwarder: React_2.ForwardRefExoticComponent<{
children?: React_2.ReactElement;
} & React_2.RefAttributes<HTMLElement>>;
// @internal
export const MotionRefForwarderReset: React_2.FC<{
children: React_2.ReactElement;
}>;
// @public (undocumented)
export const motionTokens: {
curveAccelerateMax: "cubic-bezier(0.9,0.1,1,0.2)";
curveAccelerateMid: "cubic-bezier(1,0,1,1)";
curveAccelerateMin: "cubic-bezier(0.8,0,0.78,1)";
curveDecelerateMax: "cubic-bezier(0.1,0.9,0.2,1)";
curveDecelerateMid: "cubic-bezier(0,0,0,1)";
curveDecelerateMin: "cubic-bezier(0.33,0,0.1,1)";
curveEasyEaseMax: "cubic-bezier(0.8,0,0.2,1)";
curveEasyEase: "cubic-bezier(0.33,0,0.67,1)";
curveLinear: "cubic-bezier(0,0,1,1)";
durationUltraFast: 50;
durationFaster: 100;
durationFast: 150;
durationNormal: 200;
durationGentle: 250;
durationSlow: 300;
durationSlower: 400;
durationUltraSlow: 500;
};
// @public (undocumented)
export type PresenceComponent<MotionParams extends Record<string, MotionParam> = {}> = React_2.FC<PresenceComponentProps & MotionParams> & {
(props: PresenceComponentProps & MotionParams): JSXElement | null;
[PRESENCE_MOTION_DEFINITION]: PresenceMotionFn<MotionParams>;
In: React_2.FC<MotionComponentProps & MotionParams>;
Out: React_2.FC<MotionComponentProps & MotionParams>;
};
// @public (undocumented)
export type PresenceComponentProps = {
appear?: boolean;
children: JSXElement;
imperativeRef?: React_2.Ref<MotionImperativeRef | undefined>;
onMotionFinish?: (ev: null, data: {
direction: PresenceDirection;
}) => void;
onMotionCancel?: (ev: null, data: {
direction: PresenceDirection;
}) => void;
onMotionStart?: (ev: null, data: {
direction: PresenceDirection;
}) => void;
visible?: boolean;
unmountOnExit?: boolean;
};
// @public (undocumented)
export type PresenceDirection = 'enter' | 'exit';
// @public (undocumented)
export class PresenceGroup extends React_2.Component<PresenceGroupProps, PresenceGroupState> {
constructor(props: PresenceGroupProps, context?: unknown);
// (undocumented)
componentDidMount(): void;
// (undocumented)
componentWillUnmount(): void;
// (undocumented)
static getDerivedStateFromProps(nextProps: PresenceGroupProps, { childMapping: prevChildMapping, firstRender }: PresenceGroupState): PresenceGroupState;
// (undocumented)
render(): JSXElement;
}
// @public (undocumented)
export type PresenceGroupChildContextValue = {
appear: boolean;
visible: boolean;
unmountOnExit: boolean;
onExit: () => void;
};
// @public (undocumented)
export const PresenceGroupChildProvider: React_2.Provider<PresenceGroupChildContextValue | undefined>;
// @public (undocumented)
export type PresenceMotion = Record<PresenceDirection, AtomMotion | AtomMotion[]>;
// @public (undocumented)
export type PresenceMotionFn<MotionParams extends Record<string, MotionParam> = {}> = (params: {
element: HTMLElement;
} & MotionParams) => PresenceMotion;
// @public (undocumented)
export function presenceMotionSlot<MotionParams extends Record<string, MotionParam> = {}>(motion: PresenceMotionSlotProps<MotionParams> | null | undefined, options: {
elementType: React_2.FC<PresenceComponentProps & MotionParams>;
defaultProps: PresenceMotionSlotRenderProps & MotionParams;
}): SlotComponentType<PresenceMotionSlotRenderProps & MotionParams>;
// @public (undocumented)
export type PresenceMotionSlotProps<MotionParams extends Record<string, MotionParam> = {}> = Pick<PresenceComponentProps, 'imperativeRef' | 'onMotionFinish' | 'onMotionStart'> & {
as?: JSXIntrinsicElementKeys;
children?: SlotRenderFunction<PresenceMotionSlotRenderProps & MotionParams & {
children: JSXElement;
}>;
};
// @internal
export function useMotionForwardedRef(): React_2.Ref<HTMLElement> | undefined;
// @public (undocumented)
export const usePresenceGroupChildContext: () => PresenceGroupChildContextValue | undefined;
// (No @packageDocumentation comment for this package)