2023-02-28 08:29:30 +00:00
|
|
|
/**
|
2024-04-24 22:42:28 +00:00
|
|
|
* @deprecated since v4. Use the new structure of Accordion instead.
|
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
|
|
|
|
*
|
|
|
|
*/
|
2023-08-02 14:07:22 +00:00
|
|
|
import { AnchorHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
|
2023-09-05 08:50:46 +00:00
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2024-05-16 10:50:43 +00:00
|
|
|
import { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-07-11 22:42:43 +00:00
|
|
|
export declare type AccordionTabPassThroughOptionType = AccordionTabPassThroughAttributes | ((options: AccordionTabPassThroughMethodOptions) => AccordionTabPassThroughAttributes | string) | string | null | undefined;
|
2023-03-23 14:42:14 +00:00
|
|
|
|
2023-08-02 14:07:22 +00:00
|
|
|
export declare type AccordionTabPassThroughTransitionType = TransitionProps | ((options: AccordionTabPassThroughMethodOptions) => TransitionProps) | undefined;
|
|
|
|
|
2023-03-23 14:42:14 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface AccordionTabPassThroughMethodOptions {
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
2023-07-06 12:01:33 +00:00
|
|
|
instance: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
2023-03-23 14:42:14 +00:00
|
|
|
props: AccordionTabProps;
|
2023-12-10 21:41:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid attributes.
|
|
|
|
*/
|
|
|
|
attrs: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
2023-12-05 11:06:32 +00:00
|
|
|
* Defines parent options.
|
2023-09-05 06:50:04 +00:00
|
|
|
*/
|
2023-12-05 11:06:32 +00:00
|
|
|
parent: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines current options.
|
|
|
|
*/
|
2023-05-23 21:10:36 +00:00
|
|
|
context: AccordionTabContext;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
2023-03-23 14:42:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link AccordionTabProps.pt}
|
|
|
|
*/
|
|
|
|
export interface AccordionTabPassThroughOptions {
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
|
|
|
root?: AccordionTabPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the header's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
|
|
|
header?: AccordionTabPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the headeraction's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
2023-04-19 08:00:52 +00:00
|
|
|
headerAction?: AccordionTabPassThroughOptionType;
|
2023-03-23 14:42:14 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the headericon's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
2023-04-19 08:00:52 +00:00
|
|
|
headerIcon?: AccordionTabPassThroughOptionType;
|
2023-03-23 14:42:14 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the headertitle's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
2023-04-19 08:00:52 +00:00
|
|
|
headerTitle?: AccordionTabPassThroughOptionType;
|
2023-03-23 14:42:14 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the toggleablecontent's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
2023-04-19 08:00:52 +00:00
|
|
|
toggleableContent?: AccordionTabPassThroughOptionType;
|
2023-03-23 14:42:14 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the content's DOM element.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
|
|
|
content?: AccordionTabPassThroughOptionType;
|
2023-08-02 11:59:30 +00:00
|
|
|
/**
|
|
|
|
* Used to control Vue Transition API.
|
|
|
|
*/
|
2023-08-02 14:07:22 +00:00
|
|
|
transition?: AccordionTabPassThroughTransitionType;
|
2023-03-23 14:42:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used 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;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used 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;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used 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;
|
2024-04-02 08:24:31 +00:00
|
|
|
/**
|
|
|
|
* It generates scoped CSS variables using design tokens for the component.
|
|
|
|
*/
|
|
|
|
dt?: DesignToken<any>;
|
2023-03-24 06:34:32 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
2023-03-24 06:34:32 +00:00
|
|
|
* @type {AccordionTabPassThroughOptions}
|
|
|
|
*/
|
2023-09-05 11:28:04 +00:00
|
|
|
pt?: PassThrough<AccordionTabPassThroughOptions>;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
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;
|
2023-05-29 13:38:47 +00:00
|
|
|
/**
|
|
|
|
* Count of tabs
|
|
|
|
*/
|
|
|
|
count: number;
|
|
|
|
/**
|
|
|
|
* Whether the tab is first.
|
|
|
|
*/
|
|
|
|
first: boolean;
|
|
|
|
/**
|
|
|
|
* Whether the tab is last.
|
|
|
|
*/
|
|
|
|
last: boolean;
|
2023-05-29 15:38:17 +00:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
/**
|
2023-03-23 14:42:14 +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[];
|
2023-03-23 14:42:14 +00:00
|
|
|
/**
|
|
|
|
* 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
|
2023-08-17 07:16:25 +00:00
|
|
|
* @param {number} index - Index of the tab
|
2023-11-09 10:33:08 +00:00
|
|
|
* @deprecated since v3.40.0. Use 'active' property instead.
|
2023-03-23 14:42:14 +00:00
|
|
|
*/
|
2023-08-17 07:19:14 +00:00
|
|
|
isTabActive: (index: number) => void;
|
2023-11-09 10:33:08 +00:00
|
|
|
/**
|
|
|
|
* Whether the tab is active
|
|
|
|
* @param {number} index - Index of the tab
|
|
|
|
*/
|
|
|
|
active: (index: number) => void;
|
2023-03-23 14:42:14 +00:00
|
|
|
}): 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
|
|
|
*/
|
2024-05-16 14:05:43 +00:00
|
|
|
export interface AccordionTabEmitsOptions {}
|
2024-05-16 10:50:43 +00:00
|
|
|
|
|
|
|
export declare type AccordionTabEmits = EmitFn<AccordionTabEmitsOptions>;
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-02-28 15:38:02 +00:00
|
|
|
/**
|
2024-04-24 22:42:28 +00:00
|
|
|
* @deprecated since v4. Use the new structure of Accordion instead.
|
|
|
|
*
|
|
|
|
* **PrimeVue - AccordionTab**
|
2023-02-28 15:38:02 +00:00
|
|
|
*
|
|
|
|
* _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
|
2024-05-16 10:50:43 +00:00
|
|
|
*
|
2023-02-28 15:38:02 +00:00
|
|
|
*/
|
2024-05-16 10:50:43 +00:00
|
|
|
declare const AccordionTab: DefineComponent<AccordionTabProps, AccordionTabSlots, AccordionTabEmits>;
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2024-05-16 10:50:43 +00:00
|
|
|
AccordionTab: GlobalComponentConstructor<AccordionTabProps, AccordionTabSlots, AccordionTabEmits>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default AccordionTab;
|