UNPKG

@ng-doc/ui-kit

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

72 lines (50 loc) 3.2 kB
import { ElementRef, TemplateRef, Type, Injector } from '@angular/core'; import { PolymorpheusTemplate, PolymorpheusHandler, PolymorpheusComponent } from '@tinkoff/ng-polymorpheus'; import { FlexibleConnectedPositionStrategyOrigin, ConnectedPosition } from '@angular/cdk/overlay'; import { Unsubscribable } from 'rxjs'; /** Horizontal align values */ type NgDocHorizontalAlign = 'left' | 'right'; /** Vertical align values */ type NgDocVerticalAlign = 'top' | 'bottom'; /** Text align values */ type NgDocTextAlign = NgDocHorizontalAlign | 'center'; type BaseElement<T> = ElementRef<T> | T; type NgDocBlockquoteType = 'note' | 'warning' | 'default' | 'alert' | 'success'; type NgDocColor = 'primary' | 'warning' | 'info' | 'alert' | 'link' | 'success'; type NgDocContent<C extends object = {}> = string | number | null | undefined | TemplateRef<C> | PolymorpheusTemplate<C> | PolymorpheusHandler<C> | NgDocComponentContent<object, C>; declare class NgDocComponentContent<T extends object, C extends object = object> extends PolymorpheusComponent<T, C> { readonly component: Type<T>; readonly injectorRef?: Injector | undefined; constructor(component: Type<T>, injectorRef?: Injector | undefined); createInjector<C>(injector: Injector, useValue?: C): Injector; } type NgDocDefineValueFunction<T, G> = (item: T) => G; type NgDocDisplayValueFunction<T = unknown> = (value: T | null) => string; type NgDocHandler<T, G> = (item: T) => G; type NgDocBooleanHandler<T> = NgDocHandler<T, boolean>; type NgDocStringHandler<T> = NgDocHandler<T, string>; type NgDocNumberHandler<T> = NgDocHandler<T, number>; type NgDocGroupFn<T, G> = NgDocHandler<T, G>; /** Possible icon sizes */ type NgDocIconSize = 16 | 24; type NgDocOrientation = 'vertical' | 'horizontal'; type NgDocOverlayAnimationEvent = 'beforeOpen' | 'afterOpen' | 'beforeClose' | 'afterClose'; type NgDocOverlayOrigin = FlexibleConnectedPositionStrategyOrigin; type NgDocOverlayPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom' | ConnectedPosition; type NgDocOverlayRelativePosition = 'top' | 'bottom' | 'left' | 'right'; interface NgDocPosition { top: string; left: string; width: string; height: string; } /** Possible sizes */ type NgDocSize = 'small' | 'medium' | 'large'; interface NgDocSubscribable<T> { subscribe(next?: (value: T) => void, error?: (error: unknown) => void, complete?: () => void): Unsubscribable; } type NgDocTagSize = 'medium' | 'small'; /** Possible text colors */ type NgDocTextColor = 'normal' | 'muted'; export { NgDocComponentContent }; export type { BaseElement, NgDocBlockquoteType, NgDocBooleanHandler, NgDocColor, NgDocContent, NgDocDefineValueFunction, NgDocDisplayValueFunction, NgDocGroupFn, NgDocHandler, NgDocHorizontalAlign, NgDocIconSize, NgDocNumberHandler, NgDocOrientation, NgDocOverlayAnimationEvent, NgDocOverlayOrigin, NgDocOverlayPosition, NgDocOverlayRelativePosition, NgDocPosition, NgDocSize, NgDocStringHandler, NgDocSubscribable, NgDocTagSize, NgDocTextAlign, NgDocTextColor, NgDocVerticalAlign };