2023-02-28 14:44:35 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Card is a flexible container component.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/card/)
|
|
|
|
*
|
|
|
|
* @module card
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
2023-07-06 11:17:08 +00:00
|
|
|
import { ComponentHooks } from '../basecomponent';
|
2023-09-05 08:50:46 +00:00
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2024-04-02 08:24:31 +00:00
|
|
|
import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2024-02-20 08:16:34 +00:00
|
|
|
export declare type CardPassThroughOptionType = CardPassThroughAttributes | ((options: CardPassThroughMethodOptions) => CardPassThroughAttributes | string) | string | null | undefined;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface CardPassThroughMethodOptions {
|
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
|
|
|
instance: any;
|
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
|
|
|
props: CardProps;
|
|
|
|
/**
|
|
|
|
* Defines valid attributes.
|
|
|
|
*/
|
|
|
|
attrs: any;
|
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
|
|
|
}
|
2023-03-24 13:15:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link CardProps.pt}
|
|
|
|
*/
|
|
|
|
export interface CardPassThroughOptions {
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
root?: CardPassThroughOptionType;
|
2023-03-31 12:55:51 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the header's DOM element.
|
2023-03-31 12:55:51 +00:00
|
|
|
*/
|
|
|
|
header?: CardPassThroughOptionType;
|
2023-03-24 13:15:30 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the body's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
body?: CardPassThroughOptionType;
|
2024-01-03 11:06:19 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the caption's DOM element.
|
2024-01-03 11:06:19 +00:00
|
|
|
*/
|
|
|
|
caption?: CardPassThroughOptionType;
|
2023-03-24 13:15:30 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the title's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
title?: CardPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the subtitle's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
subtitle?: CardPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the content's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
content?: CardPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the footer's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
footer?: CardPassThroughOptionType;
|
2023-07-06 11:09:01 +00:00
|
|
|
/**
|
2023-11-07 06:16:39 +00:00
|
|
|
* Used to manage all lifecycle hooks.
|
2023-07-06 11:09:01 +00:00
|
|
|
* @see {@link BaseComponent.ComponentHooks}
|
|
|
|
*/
|
|
|
|
hooks?: ComponentHooks;
|
2023-03-24 13:15:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
|
|
|
export interface CardPassThroughAttributes {
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
2023-03-03 14:16:05 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Card component.
|
|
|
|
*/
|
2023-03-24 13:15:30 +00:00
|
|
|
export interface CardProps {
|
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 13:15:30 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
2023-03-24 13:15:30 +00:00
|
|
|
* @type {CardPassThroughOptions}
|
|
|
|
*/
|
2023-09-05 11:28:04 +00:00
|
|
|
pt?: PassThrough<CardPassThroughOptions>;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
2023-05-22 22:03:28 +00:00
|
|
|
/**
|
|
|
|
* When enabled, it removes component related styles in the core.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
unstyled?: boolean;
|
2023-03-24 13:15:30 +00:00
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-03 14:16:05 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Card component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface CardSlots {
|
|
|
|
/**
|
|
|
|
* Custom header template.
|
|
|
|
*/
|
2023-02-28 14:44:35 +00:00
|
|
|
header(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom title template.
|
|
|
|
*/
|
2023-02-28 14:44:35 +00:00
|
|
|
title(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom subtitle template.
|
|
|
|
*/
|
2023-02-28 14:44:35 +00:00
|
|
|
subtitle(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom content template.
|
|
|
|
*/
|
2023-02-28 14:44:35 +00:00
|
|
|
content(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom footer template.
|
|
|
|
*/
|
2023-02-28 14:44:35 +00:00
|
|
|
footer(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-02-28 14:44:35 +00:00
|
|
|
/**
|
2023-03-03 14:16:05 +00:00
|
|
|
* Defines valid emits in Card component.
|
2023-02-28 14:44:35 +00:00
|
|
|
*/
|
2023-03-03 14:16:05 +00:00
|
|
|
export interface CardEmits {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-02-28 14:44:35 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - Card**
|
|
|
|
*
|
|
|
|
* _Card is a flexible container component._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/card/)
|
|
|
|
* --- ---
|
2023-03-03 10:55:20 +00:00
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
2023-02-28 14:44:35 +00:00
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*/
|
2023-03-01 12:30:54 +00:00
|
|
|
declare class Card extends ClassComponent<CardProps, CardSlots, CardEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Card: GlobalComponentConstructor<Card>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Card;
|