UNPKG

tgui-angular

Version:

🚀 Angular UI library for Telegram Web Apps with modern components and theming support | 💼 Author is open to work opportunities | 📧 Contact: a.blagovestnov@gmail.com | 💬 Telegram: @ablagovestnov

36 lines (35 loc) • 1.65 kB
import { Middleware, type MiddlewareState } from '@floating-ui/dom'; import { PlacementWithAuto } from './types'; import * as i0 from "@angular/core"; export interface UseFloatingMiddlewaresOptions { /** By default, the component will automatically choose the best placement */ placement?: PlacementWithAuto; /** Offset along the main axis. */ offsetByMainAxis?: number; /** Offset along the cross axis. */ offsetByCrossAxis?: number; /** Ref for arrow element */ arrowRef?: HTMLElement | null; /** Whether to display an arrow pointing to the anchor element. */ withArrow?: boolean; /** The height of the arrow. This is added to `mainAxis` to prevent the arrow from overlapping the anchor element. */ arrowHeight?: number; /** A safe zone around the arrow to prevent it from exceeding the content bounds. */ arrowPadding?: number; /** Sets the width to match the target element. */ sameWidth?: boolean; /** An array of custom modifiers for Popper. */ customMiddlewares?: Middleware[]; } export declare class FloatingMiddlewaresService { getMiddlewares(options: UseFloatingMiddlewaresOptions): { middlewares: { name: string; options?: any; fn: (state: MiddlewareState) => import("@floating-ui/core").MiddlewareReturn | Promise<import("@floating-ui/core").MiddlewareReturn>; }[]; strictPlacement: import("@floating-ui/utils").Placement | undefined; }; static ɵfac: i0.ɵɵFactoryDeclaration<FloatingMiddlewaresService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<FloatingMiddlewaresService>; }