UNPKG

@obliczeniowo/elementary

Version:
131 lines (124 loc) 5.74 kB
import * as i0 from '@angular/core'; import { Renderer2, ElementRef, ViewContainerRef } from '@angular/core'; import * as i4 from '@angular/common'; import * as i5 from '@obliczeniowo/elementary/icons'; import * as i6 from '@obliczeniowo/elementary/loading'; declare class ExpandButtonComponent { isOpen: boolean; static ɵfac: i0.ɵɵFactoryDeclaration<ExpandButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ExpandButtonComponent, "obl-expand-button", never, { "isOpen": { "alias": "isOpen"; "required": false; }; }, {}, never, never, false, never>; } /** * Set class for the button element * * Default class name is: 'obl-button' you cen extend it by using input oblButton * in such case the name of class will change to 'obl-button-'+this.oblButton * * You can use scss mixin to generate new set of styles: * * @example * * // in HTML * * <button oblButton="red">Some button</button> * * // in global scss file style.scss * * @use "node_modules/@obliczeniowo/elementary/styles/global.scss" as *; * * @include button-styles("red", #080808, black, red, white, #cc5d5d, white, gray); */ declare class ButtonDirective { protected renderer: Renderer2; protected elementRef: ElementRef<HTMLButtonElement>; private readonly viewContainerRef; private _oblButton; private _spinner?; private _icon?; private _name?; get oblButton(): string; /** * Let you set default class if no extended class is set * * if extended is set then you can generate your own styles class using mixin * * @example * @use "node_modules/@obliczeniowo/elementary/styles/buttons-styles.scss" as *; * * @include button-styles("red", #080808, black, red, white, #cc5d5d, white, gray); */ set oblButton(value: string); /** * Name of icon to display inside of button, when no icon set then no icon to display * * When loading = true icon is removed and spinner is displayed */ set icon(icon: string | undefined); blockWhenLoading: boolean; protected _loading?: boolean; /** * If loading is set to true then button is disabled and spinner is added as first child of button * * on loading = false spinner is removed and if icon is set then icon displayed on his place */ set loading(loading: boolean); /** */ toggle: i0.InputSignal<boolean>; /** */ selected: boolean; /** * link to open when clicked */ link: i0.InputSignal<string | undefined>; /** * target option for link option only */ target: i0.InputSignal<string>; /** * To handle disable state of button */ get load(): boolean; clicked(event: MouseEvent): void; constructor(renderer: Renderer2, elementRef: ElementRef<HTMLButtonElement>, viewContainerRef: ViewContainerRef); ngAfterViewInit(): void; protected class(prefix?: string): string; static ɵfac: i0.ɵɵFactoryDeclaration<ButtonDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ButtonDirective, "oblButton, [oblButton]", ["oblButton"], { "oblButton": { "alias": "oblButton"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "blockWhenLoading": { "alias": "blockWhenLoading"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "toggle": { "alias": "toggle"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>; } declare class ActionDirective { protected ref: ElementRef<HTMLElement>; protected time: any; protected dt: number; protected interval: number; protected element: HTMLDivElement; protected rect: DOMRect; protected offset: { left: number; top: number; }; set message(message: string); animEnd?: () => void; duration: number; clicked(): void; constructor(ref: ElementRef<HTMLElement>); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ActionDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ActionDirective, "[oblAction]", never, { "message": { "alias": "message"; "required": false; }; "animEnd": { "alias": "animEnd"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; }, {}, never, never, false, never>; } declare class ButtonsModule { static ɵfac: i0.ɵɵFactoryDeclaration<ButtonsModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonsModule, [typeof ExpandButtonComponent, typeof ButtonDirective, typeof ActionDirective], [typeof i4.CommonModule, typeof i5.IconsModule, typeof i6.LoadingModule], [typeof ExpandButtonComponent, typeof ButtonDirective, typeof ActionDirective]>; static ɵinj: i0.ɵɵInjectorDeclaration<ButtonsModule>; } declare class ProgressButtonComponent { /** if not undefined then display progress bar with % value */ progress: i0.InputSignal<number | undefined>; /** disable light effect */ light: i0.InputSignal<boolean>; real: i0.Signal<number>; get disabled(): number | undefined; button: boolean; static ɵfac: i0.ɵɵFactoryDeclaration<ProgressButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ProgressButtonComponent, "button[obl-progress]", never, { "progress": { "alias": "progress"; "required": false; "isSignal": true; }; "light": { "alias": "light"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>; } export { ActionDirective, ButtonDirective, ButtonsModule, ExpandButtonComponent, ProgressButtonComponent };