UNPKG

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

256 lines (252 loc) 8.86 kB
import * as i0 from '@angular/core'; import { InputSignalWithTransform, TemplateRef, EventEmitter } from '@angular/core'; import * as i2 from 'primeng/api'; import { BlockableUI } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import { BaseStyle } from 'primeng/base'; import * as i1 from 'primeng/ripple'; /** * * Accordion groups a collection of contents in tabs. * * [Live Demo](https://www.primeng.org/accordion/) * * @module accordionstyle * */ declare enum AccordionClasses { /** * Class name of the root element */ root = "p-accordion", /** * Class name of the content wrapper */ contentwrapper = "p-accordioncontent", /** * Class name of the content */ content = "p-accordioncontent-content", /** * Class name of the header */ header = "p-accordionheader", /** * Class name of the toggle icon */ toggleicon = "p-accordionheader-toggle-icon", /** * Class name of the panel */ panel = "p-accordionpanel" } declare class AccordionStyle extends BaseStyle { name: string; theme: string; classes: { root: string; panel: ({ instance }: { instance: any; }) => (string | { 'p-accordionpanel-active': any; 'p-disabled': any; })[]; header: string; toggleicon: string; contentContainer: string; content: string; }; static ɵfac: i0.ɵɵFactoryDeclaration<AccordionStyle, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AccordionStyle>; } interface AccordionStyle extends BaseStyle { } /** * Custom tab open event. * @see {@link onOpen} * @group Interface */ interface AccordionTabOpenEvent { /** * Browser event. */ originalEvent: Event; /** * Opened tab index. */ index: number; } /** * Custom tab close event. * @see {@link onClose} * @extends {AccordionTabOpenEvent} * @group Interface */ interface AccordionTabCloseEvent extends AccordionTabOpenEvent { } /** * Toggle icon template context. * @group Interface */ interface AccordionToggleIconTemplateContext { /** * Represents the active status of the panel. */ active: boolean; } /** * AccordionPanel is a helper component for Accordion component. * @group Components */ declare class AccordionPanel extends BaseComponent { pcAccordion: any; /** * Value of the active tab. * @defaultValue undefined * @group Props */ value: i0.ModelSignal<string | number | string[] | number[]>; /** * Disables the tab when enabled. * @defaultValue false * @group Props */ disabled: InputSignalWithTransform<any, boolean>; active: i0.Signal<boolean>; valueEquals(currentValue: any, value: any): boolean; _componentStyle: AccordionStyle; static ɵfac: i0.ɵɵFactoryDeclaration<AccordionPanel, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AccordionPanel, "p-accordion-panel, p-accordionpanel", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["*"], true, never>; } /** * AccordionHeader is a helper component for Accordion component. * @group Components */ declare class AccordionHeader extends BaseComponent { pcAccordion: any; pcAccordionPanel: any; id: i0.Signal<string>; active: i0.Signal<any>; disabled: i0.Signal<any>; ariaControls: i0.Signal<string>; /** * Toggle icon template. * @type {TemplateRef<AccordionToggleIconTemplateContext>} context - Context of the template * @example * ```html * <ng-template #toggleicon let-active="active"> </ng-template> * ``` * @see {@link AccordionToggleIconTemplateContext} * @group Templates */ toggleicon: TemplateRef<AccordionToggleIconTemplateContext> | undefined; onClick(event?: MouseEvent | KeyboardEvent): void; onFocus(): void; onKeydown(event: KeyboardEvent): void; _componentStyle: AccordionStyle; changeActiveValue(): void; private findPanel; private findHeader; private findNextPanel; private findPrevPanel; private findFirstPanel; private findLastPanel; private changeFocusedPanel; private arrowDownKey; private arrowUpKey; private onHomeKey; private onEndKey; private onEnterKey; static ɵfac: i0.ɵɵFactoryDeclaration<AccordionHeader, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AccordionHeader, "p-accordion-header, p-accordionheader", never, {}, {}, ["toggleicon"], ["*"], true, [{ directive: typeof i1.Ripple; inputs: {}; outputs: {}; }]>; } declare class AccordionContent extends BaseComponent { pcAccordion: any; pcAccordionPanel: any; active: i0.Signal<any>; ariaLabelledby: i0.Signal<string>; id: i0.Signal<string>; _componentStyle: AccordionStyle; static ɵfac: i0.ɵɵFactoryDeclaration<AccordionContent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AccordionContent, "p-accordion-content, p-accordioncontent", never, {}, {}, never, ["*"], true, never>; } /** * Accordion groups a collection of contents in tabs. * @group Components */ declare class Accordion extends BaseComponent implements BlockableUI { /** * Value of the active tab. * @defaultValue undefined * @group Props */ value: i0.ModelSignal<string | number | string[] | number[]>; /** * When enabled, multiple tabs can be activated at the same time. * @defaultValue false * @group Props */ multiple: InputSignalWithTransform<boolean, any>; /** * Class of the element. * @deprecated since v20.0.0, use `class` instead. * @group Props */ styleClass: string | undefined; /** * Icon of a collapsed tab. * @group Props */ expandIcon: string | undefined; /** * Icon of an expanded tab. * @group Props */ collapseIcon: string | undefined; /** * When enabled, the focused tab is activated. * @defaultValue false * @group Props */ selectOnFocus: InputSignalWithTransform<boolean, any>; /** * Transition options of the animation. * @group Props */ transitionOptions: string; /** * Callback to invoke when an active tab is collapsed by clicking on the header. * @param {AccordionTabCloseEvent} event - Custom tab close event. * @group Emits */ onClose: EventEmitter<AccordionTabCloseEvent>; /** * Callback to invoke when a tab gets expanded. * @param {AccordionTabOpenEvent} event - Custom tab open event. * @group Emits */ onOpen: EventEmitter<AccordionTabOpenEvent>; id: i0.WritableSignal<string>; _componentStyle: AccordionStyle; onKeydown(event: any): void; onTabArrowDownKey(event: any): void; onTabArrowUpKey(event: any): void; onTabHomeKey(event: any): void; changeFocusedTab(element: any): void; findNextHeaderAction(tabElement: any, selfCheck?: boolean): any; findPrevHeaderAction(tabElement: any, selfCheck?: boolean): any; findFirstHeaderAction(): any; findLastHeaderAction(): any; onTabEndKey(event: any): void; getBlockableElement(): HTMLElement; updateValue(value: string | number): void; static ɵfac: i0.ɵɵFactoryDeclaration<Accordion, never>; static ɵcmp: i0.ɵɵComponentDeclaration<Accordion, "p-accordion", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; }; "expandIcon": { "alias": "expandIcon"; "required": false; }; "collapseIcon": { "alias": "collapseIcon"; "required": false; }; "selectOnFocus": { "alias": "selectOnFocus"; "required": false; "isSignal": true; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; }; }, { "value": "valueChange"; "onClose": "onClose"; "onOpen": "onOpen"; }, never, ["*"], true, never>; } declare class AccordionModule { static ɵfac: i0.ɵɵFactoryDeclaration<AccordionModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<AccordionModule, never, [typeof Accordion, typeof i2.SharedModule, typeof AccordionPanel, typeof AccordionHeader, typeof AccordionContent], [typeof Accordion, typeof i2.SharedModule, typeof AccordionPanel, typeof AccordionHeader, typeof AccordionContent]>; static ɵinj: i0.ɵɵInjectorDeclaration<AccordionModule>; } export { Accordion, AccordionClasses, AccordionContent, AccordionHeader, AccordionModule, AccordionPanel, AccordionStyle }; export type { AccordionTabCloseEvent, AccordionTabOpenEvent, AccordionToggleIconTemplateContext };