UNPKG

@nova-ui/bits

Version:

SolarWinds Nova Framework

83 lines (82 loc) 3.7 kB
import { AfterContentChecked, ElementRef, OnDestroy, OnInit } from "@angular/core"; import { ButtonSizeType } from "./public-api"; import { LoggerService } from "../../services/log-service"; import * as i0 from "@angular/core"; export declare class ButtonComponent implements OnInit, OnDestroy, AfterContentChecked { private type; private el; private logger; /** * Optionally, specify the display style. Supported values are "default", "primary", "action", and "destructive". */ displayStyle: string; /** * Optionally, specify an icon to be displayed within the button. */ icon: string; /** * Optionally, specify an icon color. Note: The icon color for displayStyle "primary" is "white" and is not configurable. */ get iconColor(): string; set iconColor(value: string); /** * Optionally, modify the placement of the icon. If true, the icon is placed to the right of the button's text; otherwise, it's * placed to the left. */ iconRight: boolean; /** * Optionally, set the current busy state of the button. */ isBusy: boolean; /** * Optionally, set whether to apply special styling for a button consisting of an icon by itself with no accompanying text * (the special styling reduces min-width, adjusts padding, etc.). Note: If no value is provided for this input and * the button has no inner content, the empty button styling will still be applied. */ isEmpty: boolean; /** Sets aria-label for the component */ ariaLabel: string; /** * Optionally, set whether to fire a "click" event repeatedly while the button is pressed. */ isRepeat: boolean; /** * Optionally, set the size of the button. Supported values are "compact", "default", and "large". */ get size(): ButtonSizeType; set size(value: ButtonSizeType); get sizeClassLarge(): boolean; get sizeClassCompact(): boolean; get iconRightClass(): boolean; get iconleftClass(): boolean; get isBusyClass(): boolean; get isEmptyClass(): boolean; get dispStylePrimClass(): boolean; get dispStyleActionClass(): boolean; get displayStyleDestructiveClass(): boolean; get dispStyleDefaultClass(): boolean; get ariaIconLabel(): string; private contentContainer; private ngUnsubscribe; private _iconColor; private _isContentEmpty; private _size; constructor(type: string, el: ElementRef, logger: LoggerService); ngOnInit(): void; ngAfterContentChecked(): void; ngOnDestroy(): void; /** * Passes correct size of icon to inner HTML template. */ getIconSize(): string; /** * Passes correct styles to inner HTML template for displaying busy state. */ getRippleContainerStyle(): Partial<CSSStyleDeclaration>; private getAriaLabel; private setIsContentEmptyValue; private setupRepeatEvent; private getHostElement; static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, [{ attribute: "type"; }, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "[nui-button]", never, { "displayStyle": { "alias": "displayStyle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "iconRight": { "alias": "iconRight"; "required": false; }; "isBusy": { "alias": "isBusy"; "required": false; }; "isEmpty": { "alias": "isEmpty"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "isRepeat": { "alias": "isRepeat"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], false, never>; }