@progress/kendo-react-popup
Version:
React Popup positions a piece of content next to a specific anchor component. KendoReact Popup package
100 lines (99 loc) • 2.76 kB
TypeScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { AlignPoint, Collision as CollisionEnum } from '@progress/kendo-popup-common';
import { Offset } from './models/Offset.js';
import { PopupProps } from './models/PopupProps.js';
import { Align } from './models/Align.js';
import { Collision } from './models/Collision.js';
import * as React from 'react';
/**
* The PopupPropsContext. It allows to configure the Popup props from a wrapper component.
*
* @example
* ```jsx-no-run
* <PopupPropsContext.Provider value={props => ({ ...props, appendTo: document.querySelector('myPopupsContainer') })}>
* <DropDownList />
* <Editor />
* </PopupPropsContext.Provider>
* ```
*/
export declare const PopupPropsContext: React.Context<(props: PopupProps) => PopupProps>;
declare enum Status {
hiding = "hiding",
hidden = "hidden",
showing = "showing",
shown = "shown",
reposition = "reposition"
}
/**
* @hidden
*/
export interface PopupState {
current: Status;
previous: Status;
props: {
show?: boolean;
anchor?: HTMLElement | null;
anchorAlign?: Align;
appendTo?: HTMLElement | null;
collision?: Collision;
popupAlign?: Align;
className?: string | string[] | {
[key: string]: boolean;
};
popupClass?: string | string[] | {
[key: string]: boolean;
};
style?: React.CSSProperties;
offset?: Offset;
contentKey?: any;
};
}
/**
* The KendoReact PopupHandle component.
*/
export interface PopupHandle {
/**
* Represents the Popup DOM element.
*/
element: any;
/**
* The props of the PopupHandle component.
*/
props: PopupProps;
}
/**
* The KendoReact Popup component.
*/
export declare const Popup: React.ForwardRefExoticComponent<PopupProps & React.RefAttributes<PopupHandle | null>>;
export declare const popupDefaultProps: {
collision: {
horizontal: CollisionEnum;
vertical: CollisionEnum;
};
anchorAlign: {
horizontal: AlignPoint;
vertical: AlignPoint;
};
popupAlign: {
horizontal: AlignPoint;
vertical: AlignPoint;
};
offset: {
left: number;
top: number;
};
animate: boolean;
show: boolean;
margin: {
horizontal: number;
vertical: number;
};
positionMode: string;
};
export {};