primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
124 lines (123 loc) • 5.23 kB
TypeScript
import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
import { BaseComponent } from 'primeng/basecomponent';
import { BadgeStyle } from './style/badgestyle';
import * as i0 from "@angular/core";
import * as i1 from "primeng/api";
/**
* Badge Directive is directive usage of badge component.
* @group Components
*/
export declare class BadgeDirective extends BaseComponent implements OnChanges, AfterViewInit {
/**
* When specified, disables the component.
* @group Props
*/
disabled: boolean;
/**
* Size of the badge, valid options are "large" and "xlarge".
* @group Props
*/
badgeSize: 'large' | 'xlarge' | 'small' | null | undefined;
/**
* Size of the badge, valid options are "large" and "xlarge".
* @group Props
* @deprecated use badgeSize instead.
*/
set size(value: 'large' | 'xlarge' | 'small' | null | undefined);
get size(): 'large' | 'xlarge' | 'small' | null | undefined;
_size: 'large' | 'xlarge' | 'small' | null | undefined;
/**
* Severity type of the badge.
* @group Props
*/
severity: 'secondary' | 'info' | 'success' | 'warn' | 'danger' | 'contrast' | null | undefined;
/**
* Value to display inside the badge.
* @group Props
*/
value: string | number;
/**
* Inline style of the element.
* @group Props
*/
badgeStyle: {
[klass: string]: any;
} | null | undefined;
/**
* Class of the element.
* @group Props
*/
badgeStyleClass: string;
private id;
badgeEl: HTMLElement;
_componentStyle: BadgeStyle;
private get activeElement();
private get canUpdateBadge();
constructor();
ngOnChanges({ value, size, severity, disabled, badgeStyle, badgeStyleClass }: SimpleChanges): void;
ngAfterViewInit(): void;
private setValue;
private setSizeClasses;
private renderBadgeContent;
private applyStyles;
private setSeverity;
private toggleDisableState;
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<BadgeDirective, "[pBadge]", never, { "disabled": { "alias": "badgeDisabled"; "required": false; }; "badgeSize": { "alias": "badgeSize"; "required": false; }; "size": { "alias": "size"; "required": false; }; "severity": { "alias": "severity"; "required": false; }; "value": { "alias": "value"; "required": false; }; "badgeStyle": { "alias": "badgeStyle"; "required": false; }; "badgeStyleClass": { "alias": "badgeStyleClass"; "required": false; }; }, {}, never, never, true, never>;
}
/**
* Badge is a small status indicator for another element.
* @group Components
*/
export declare class Badge extends BaseComponent {
/**
* Class of the element.
* @group Props
*/
styleClass: import("@angular/core").InputSignal<string>;
/**
* Inline style of the element.
* @group Props
*/
style: import("@angular/core").InputSignal<{
[klass: string]: any;
}>;
/**
* Size of the badge, valid options are "large" and "xlarge".
* @group Props
*/
badgeSize: import("@angular/core").InputSignal<"small" | "large" | "xlarge">;
/**
* Size of the badge, valid options are "large" and "xlarge".
* @group Props
*/
size: import("@angular/core").InputSignal<"small" | "large" | "xlarge">;
/**
* Severity type of the badge.
* @group Props
*/
severity: import("@angular/core").InputSignal<"info" | "success" | "warn" | "danger" | "secondary" | "contrast">;
/**
* Value to display inside the badge.
* @group Props
*/
value: import("@angular/core").InputSignal<string | number>;
/**
* When specified, disables the component.
* @group Props
*/
badgeDisabled: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
_componentStyle: BadgeStyle;
/**
* Computes the container class for the badge element based on its properties.
* @returns An object representing the CSS classes to be applied to the badge container.
*/
containerClass: import("@angular/core").Signal<string>;
static ɵfac: i0.ɵɵFactoryDeclaration<Badge, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<Badge, "p-badge", never, { "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "badgeSize": { "alias": "badgeSize"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "badgeDisabled": { "alias": "badgeDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
export declare class BadgeModule {
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<BadgeModule, never, [typeof Badge, typeof BadgeDirective, typeof i1.SharedModule], [typeof Badge, typeof BadgeDirective, typeof i1.SharedModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<BadgeModule>;
}