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
155 lines (150 loc) • 4.52 kB
TypeScript
import * as i0 from '@angular/core';
import { AfterContentInit, TemplateRef, QueryList } from '@angular/core';
import * as i1 from 'primeng/api';
import { BlockableUI, PrimeTemplate } from 'primeng/api';
import { BaseComponent } from 'primeng/basecomponent';
import { BaseStyle } from 'primeng/base';
/**
*
* Card is a flexible container component.
*
* [Live Demo](https://www.primeng.org/card/)
*
* @module cardstyle
*
*/
declare enum CardClasses {
/**
* Class name of the root element
*/
root = "p-card",
/**
* Class name of the header element
*/
header = "p-card-header",
/**
* Class name of the body element
*/
body = "p-card-body",
/**
* Class name of the caption element
*/
caption = "p-card-caption",
/**
* Class name of the title element
*/
title = "p-card-title",
/**
* Class name of the subtitle element
*/
subtitle = "p-card-subtitle",
/**
* Class name of the content element
*/
content = "p-card-content",
/**
* Class name of the footer element
*/
footer = "p-card-footer"
}
declare class CardStyle extends BaseStyle {
name: string;
theme: string;
classes: {
root: string;
header: string;
body: string;
caption: string;
title: string;
subtitle: string;
content: string;
footer: string;
};
static ɵfac: i0.ɵɵFactoryDeclaration<CardStyle, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CardStyle>;
}
interface CardStyle extends BaseStyle {
}
/**
* Card is a flexible container component.
* @group Components
*/
declare class Card extends BaseComponent implements AfterContentInit, BlockableUI {
/**
* Header of the card.
* @group Props
*/
header: string | undefined;
/**
* Subheader of the card.
* @group Props
*/
subheader: string | undefined;
/**
* Inline style of the element.
* @group Props
*/
set style(value: {
[klass: string]: any;
} | null | undefined);
/**
* Class of the element.
* @deprecated since v20.0.0, use `class` instead.
* @group Props
*/
styleClass: string | undefined;
headerFacet: TemplateRef<any> | undefined;
footerFacet: TemplateRef<any> | undefined;
headerTemplate: TemplateRef<any> | undefined;
titleTemplate: TemplateRef<any> | undefined;
subtitleTemplate: TemplateRef<any> | undefined;
contentTemplate: TemplateRef<any> | undefined;
footerTemplate: TemplateRef<any> | undefined;
_headerTemplate: TemplateRef<any> | undefined;
_titleTemplate: TemplateRef<any> | undefined;
_subtitleTemplate: TemplateRef<any> | undefined;
_contentTemplate: TemplateRef<any> | undefined;
_footerTemplate: TemplateRef<any> | undefined;
_style: i0.WritableSignal<{
[klass: string]: any;
}>;
_componentStyle: CardStyle;
getBlockableElement(): HTMLElement;
templates: QueryList<PrimeTemplate> | undefined;
ngAfterContentInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<Card, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<Card, "p-card", never, { "header": { "alias": "header"; "required": false; }; "subheader": { "alias": "subheader"; "required": false; }; "style": { "alias": "style"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; }, {}, ["headerFacet", "footerFacet", "headerTemplate", "titleTemplate", "subtitleTemplate", "contentTemplate", "footerTemplate", "templates"], ["p-header", "*", "p-footer"], true, never>;
}
declare class CardModule {
static ɵfac: i0.ɵɵFactoryDeclaration<CardModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<CardModule, never, [typeof Card, typeof i1.SharedModule], [typeof Card, typeof i1.SharedModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<CardModule>;
}
/**
* Defines valid templates in Card.
* @group Templates
*/
interface CardTemplates {
/**
* Custom template of header.
*/
header(): TemplateRef<any>;
/**
* Custom template of title.
*/
title(): TemplateRef<any>;
/**
* Custom template of subtitle.
*/
subtitle(): TemplateRef<any>;
/**
* Custom template of content.
*/
content(): TemplateRef<any>;
/**
* Custom template of footer.
*/
footer(): TemplateRef<any>;
}
export { Card, CardClasses, CardModule, CardStyle };
export type { CardTemplates };