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';
|
2022-09-06 12:03:37 +00:00
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
|
2023-03-24 13:15:30 +00:00
|
|
|
export declare type CardPassThroughOptionType = CardPassThroughAttributes | null | undefined;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link CardProps.pt}
|
|
|
|
*/
|
|
|
|
export interface CardPassThroughOptions {
|
|
|
|
/**
|
2023-08-01 14:01:12 +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
|
|
|
/**
|
2023-08-01 14:01:12 +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
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the body's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
body?: CardPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the title's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
title?: CardPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the subtitle's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
subtitle?: CardPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the content's DOM element.
|
2023-03-24 13:15:30 +00:00
|
|
|
*/
|
|
|
|
content?: CardPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +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-08-01 14:01:12 +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 {
|
|
|
|
/**
|
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}
|
|
|
|
*/
|
|
|
|
pt?: CardPassThroughOptions;
|
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
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Card: GlobalComponentConstructor<Card>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Card;
|