transition.d.ts 1.3 KB

123456789101112131415161718
  1. import type { BaseTransitionProps, CSSProperties, Ref, TransitionGroupProps, TransitionProps } from 'vue';
  2. declare const SelectPlacements: ["bottomLeft", "bottomRight", "topLeft", "topRight"];
  3. export type SelectCommonPlacement = (typeof SelectPlacements)[number];
  4. declare const getTransitionDirection: (placement: SelectCommonPlacement | undefined) => "slide-up" | "slide-down";
  5. export declare const getTransitionProps: (transitionName: string, opt?: TransitionProps) => TransitionProps;
  6. export declare const getTransitionGroupProps: (transitionName: string, opt?: TransitionProps) => TransitionGroupProps;
  7. export declare type MotionEvent = (TransitionEvent | AnimationEvent) & {
  8. deadline?: boolean;
  9. };
  10. export declare type MotionEventHandler = (element: Element, done?: () => void) => CSSProperties;
  11. export declare type MotionEndEventHandler = (element: Element, done?: () => void) => boolean | void;
  12. export interface CSSMotionProps extends Partial<BaseTransitionProps<Element>> {
  13. name?: string;
  14. css?: boolean;
  15. }
  16. declare const collapseMotion: (name: string, style: Ref<CSSProperties>, className: Ref<string>) => CSSMotionProps;
  17. declare const getTransitionName: (rootPrefixCls: string, motion: string, transitionName?: string) => string;
  18. export { collapseMotion, getTransitionName, getTransitionDirection };