UNPKG

@doku-dev/doku-fragment

Version:

A new Angular UI library that moving away from Bootstrap and built from scratch.

57 lines (56 loc) 1.82 kB
import { NgClass } from '@angular/common'; import { ElementRef, NgZone, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import * as i0 from "@angular/core"; export declare class DokuShimmer implements OnChanges, OnDestroy { private elementRef; private ngZone; /** * Width of the shimmer. * @default '100%' */ width: string; /** * Height of the shimmer. * * If `shape` is not rectangle and `width` is not in pixels, * the height will be calculated based on the element width. * * @default '14px' */ height: string; /** * Border radius of the shimmer. * * If `shape` is circle, the value will be ignored. * * @default '4px' */ borderRadius: string; /** * The shape of the shimmer. * * Some shapes will affect the height or border radius. * * @default 'rectangle' */ shape: 'rectangle' | 'square' | 'circle'; /** * Color variant of the shimmer. * @default 'light' */ variant: 'light' | 'dark'; protected get classes(): NgClass['ngClass']; private resizeListener?; constructor(elementRef: ElementRef, ngZone: NgZone); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; protected get normalizedHeight(): string; protected get normalizedBorderRadius(): string; /** * Calculate height value when width is not using pixels. */ private calculateHeightByWidth; private listenResize; static ɵfac: i0.ɵɵFactoryDeclaration<DokuShimmer, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DokuShimmer, "doku-shimmer", ["dokuShimmer"], { "width": "width"; "height": "height"; "borderRadius": "borderRadius"; "shape": "shape"; "variant": "variant"; }, {}, never, never, true>; }