primevue-mirror/components/lib/accordiontab/AccordionTab.d.ts

198 lines
5.1 KiB
TypeScript
Raw Normal View History

2023-02-28 08:29:30 +00:00
/**
*
2023-02-28 15:38:02 +00:00
* AccordionTab is a helper component for Accordion.
2023-02-28 08:29:30 +00:00
*
* [Live Demo](https://www.primevue.org/accordion/)
*
* @module accordiontab
*
*/
2022-09-14 11:26:01 +00:00
import { AnchorHTMLAttributes, HTMLAttributes, VNode } from 'vue';
import { AccordionPassThroughOptions } from '../accordion';
2022-09-06 12:03:37 +00:00
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export declare type AccordionTabPassThroughOptionType = AccordionTabPassThroughAttributes | ((options: AccordionTabPassThroughMethodOptions) => AccordionTabPassThroughAttributes | string) | string | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface AccordionTabPassThroughMethodOptions {
2023-07-06 12:01:33 +00:00
instance: any;
props: AccordionTabProps;
parent: AccordionPassThroughOptions;
2023-05-23 21:10:36 +00:00
context: AccordionTabContext;
}
/**
* Custom passthrough(pt) options.
* @see {@link AccordionTabProps.pt}
*/
export interface AccordionTabPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: AccordionTabPassThroughOptionType;
/**
* Uses to pass attributes to the header's DOM element.
*/
header?: AccordionTabPassThroughOptionType;
/**
* Uses to pass attributes to the headeraction's DOM element.
*/
2023-04-19 08:00:52 +00:00
headerAction?: AccordionTabPassThroughOptionType;
/**
* Uses to pass attributes to the headericon's DOM element.
*/
2023-04-19 08:00:52 +00:00
headerIcon?: AccordionTabPassThroughOptionType;
/**
* Uses to pass attributes to the headertitle's DOM element.
*/
2023-04-19 08:00:52 +00:00
headerTitle?: AccordionTabPassThroughOptionType;
/**
* Uses to pass attributes to the toggleablecontent's DOM element.
*/
2023-04-19 08:00:52 +00:00
toggleableContent?: AccordionTabPassThroughOptionType;
/**
* Uses to pass attributes to the content's DOM element.
*/
content?: AccordionTabPassThroughOptionType;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface AccordionTabPassThroughAttributes {
[key: string]: any;
}
2023-02-28 08:29:30 +00:00
/**
* Defines valid properties in AccordionTab component.
*/
2022-09-06 12:03:37 +00:00
export interface AccordionTabProps {
/**
* Orientation of tab headers.
*/
header?: string | undefined;
2022-09-14 11:26:01 +00:00
/**
* Inline style of the tab header.
*/
headerStyle?: any;
/**
* Style class of the tab header.
*/
headerClass?: any;
/**
* Uses to pass all properties of the HTMLDivElement to the tab header.
2023-03-24 06:34:32 +00:00
* @deprecated since v3.26.0. Use 'pt' property instead.
2022-09-14 11:26:01 +00:00
*/
headerProps?: HTMLAttributes | undefined;
/**
* Uses to pass all properties of the HTMLAnchorElement to the focusable anchor element inside the tab header.
2023-03-24 06:34:32 +00:00
* @deprecated since v3.26.0. Use 'pt' property instead.
2022-09-14 11:26:01 +00:00
*/
headerActionProps?: AnchorHTMLAttributes | undefined;
/**
* Inline style of the tab content.
*/
contentStyle?: any;
/**
* Style class of the tab content.
*/
contentClass?: any;
/**
* Uses to pass all properties of the HTMLDivElement to the tab content.
2023-03-24 06:34:32 +00:00
* @deprecated since v3.26.0. Use 'pt' property instead.
2022-09-14 11:26:01 +00:00
*/
contentProps?: HTMLAttributes | undefined;
2022-09-06 12:03:37 +00:00
/**
* Whether the tab is disabled.
2023-02-28 15:38:02 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
disabled?: boolean | undefined;
2023-03-24 06:34:32 +00:00
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {AccordionTabPassThroughOptions}
*/
pt?: AccordionTabPassThroughOptions;
2022-09-06 12:03:37 +00:00
}
2023-05-23 21:10:36 +00:00
/**
* Defines current options in AccordionTab component.
*/
export interface AccordionTabContext {
/**
* Current index of the tab.
*/
index: number;
/**
* Count of tabs
*/
count: number;
/**
* Whether the tab is first.
*/
first: boolean;
/**
* Whether the tab is last.
*/
last: boolean;
/**
* Whether the tab is active.
*/
active: boolean;
2023-05-23 21:10:36 +00:00
}
2023-02-28 08:29:30 +00:00
/**
2023-02-28 15:38:02 +00:00
* Defines valid slots in AcordionTab slots.
2023-02-28 08:29:30 +00:00
*/
2022-09-06 12:03:37 +00:00
export interface AccordionTabSlots {
/**
* Default slot for content.
*/
2023-02-28 08:29:30 +00:00
default(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom content for the title section of a AccordionTab is defined using the header template.
2022-09-06 12:03:37 +00:00
*/
2023-02-28 08:29:30 +00:00
header(): VNode[];
/**
* Custom icon for the header section of a AccordionTab is defined using the headericon template.
* @param {Object} scope - header slot's params.
*/
headericon(scope: {
/**
* Index of the tab
*/
index: number;
/**
* Whether the tab is active
*/
isTabActive(i: number): void;
}): VNode[];
2022-09-06 12:03:37 +00:00
}
2023-02-28 08:29:30 +00:00
/**
2023-02-28 15:38:02 +00:00
* Defines valid emits in AcordionTab component.
2023-02-28 08:29:30 +00:00
*/
export interface AccordionTabEmits {}
2022-09-06 12:03:37 +00:00
2023-02-28 15:38:02 +00:00
/**
* **PrimeVue - Accordion**
*
* _AccordionTab is a helper component for Accordion.._
*
* [Live Demo](https://www.primevue.org/accordion/)
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-02-28 15:38:02 +00:00
*
* @group Component
*/
2023-03-01 11:08:29 +00:00
declare class AccordionTab extends ClassComponent<AccordionTabProps, AccordionTabSlots, AccordionTabEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
AccordionTab: GlobalComponentConstructor<AccordionTab>;
2022-09-06 12:03:37 +00:00
}
}
export default AccordionTab;