primeng
Version:
PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,
136 lines (133 loc) • 4.03 kB
TypeScript
import { MotionOptions } from '@primeuix/motion';
import { PassThrough, PassThroughOption } from 'primeng/api';
/**
* Defines the value type for Accordion component.
* @group Types
*/
type AccordionValue = string | number | (string | number)[] | null | undefined;
/**
* 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;
}
/**
* Defines valid pass-through options in Accordion component.
* @template I Type of instance.
*
* @group Interface
*/
interface AccordionPassThroughOptions<I = unknown> {
/**
* Used to pass attributes to the root's DOM element.
*/
root?: PassThroughOption<HTMLElement, I>;
/**
* Used to pass options to the motion component/directive.
*/
motion?: MotionOptions;
}
/**
* Defines valid pass-through options in Accordion component.
* @see {@link AccordionPassThroughOptions}
*
* @template I Type of instance.
*/
type AccordionPassThrough<I = unknown> = PassThrough<I, AccordionPassThroughOptions<I>>;
/**
* Defines valid pass-through options in AccordionPanel component.
* @template I Type of instance.
*
* @group Interface
*/
interface AccordionPanelPassThroughOptions<I = unknown> {
/**
* Used to pass attributes to the panel's DOM element.
*/
root?: PassThroughOption<HTMLElement, I>;
}
/**
* Defines valid pass-through options in AccordionPanel component.
* @see {@link AccordionPanelPassThroughOptions}
*
* @template I Type of instance.
*/
type AccordionPanelPassThrough<I = unknown> = PassThrough<I, AccordionPanelPassThroughOptions<I>>;
/**
* Defines valid pass-through options in AccordionHeader component.
* @template I Type of instance.
*
* @group Interface
*/
interface AccordionHeaderPassThroughOptions<I = unknown> {
/**
* Used to pass attributes to the header's DOM element.
*/
root?: PassThroughOption<HTMLElement, I>;
/**
* Used to pass attributes to the toggle icon's DOM element.
*/
toggleicon?: PassThroughOption<SVGElement, I>;
}
/**
* Defines valid pass-through options in AccordionHeader component.
* @see {@link AccordionHeaderPassThroughOptions}
*
* @template I Type of instance.
*/
type AccordionHeaderPassThrough<I = unknown> = PassThrough<I, AccordionHeaderPassThroughOptions<I>>;
/**
* Defines valid pass-through options in AccordionContent component.
* @template I Type of instance.
*
* @group Interface
*/
interface AccordionContentPassThroughOptions<I = unknown> {
/**
* Used to pass attributes to the content container's DOM element.
*/
root?: PassThroughOption<HTMLElement, I>;
/**
* Used to pass attributes to the content wrapper DOM element.
*/
contentWrapper?: PassThroughOption<HTMLDivElement, I>;
/**
* Used to pass attributes to the content's DOM element.
*/
content?: PassThroughOption<HTMLDivElement, I>;
}
/**
* Defines valid pass-through options in AccordionContent component.
* @see {@link AccordionContentPassThroughOptions}
*
* @template I Type of instance.
*/
type AccordionContentPassThrough<I = unknown> = PassThrough<I, AccordionContentPassThroughOptions<I>>;
export type { AccordionContentPassThrough, AccordionContentPassThroughOptions, AccordionHeaderPassThrough, AccordionHeaderPassThroughOptions, AccordionPanelPassThrough, AccordionPanelPassThroughOptions, AccordionPassThrough, AccordionPassThroughOptions, AccordionTabCloseEvent, AccordionTabOpenEvent, AccordionToggleIconTemplateContext, AccordionValue };