primevue-mirror/components/lib/divider/Divider.d.ts

130 lines
3.1 KiB
TypeScript
Raw Normal View History

2023-02-28 15:50:01 +00:00
/**
*
* Divider is used to separate contents.
*
2023-03-02 09:22:22 +00:00
* [Live Demo](https://primevue.org/divider)
2023-02-28 15:50:01 +00:00
*
* @module divider
*
*/
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';
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
2022-09-06 12:03:37 +00:00
export declare type DividerPassThroughOptionType = DividerPassThroughAttributes | ((options: DividerPassThroughMethodOptions) => DividerPassThroughAttributes | string) | string | null | undefined;
2023-03-28 12:30:44 +00:00
/**
* Custom passthrough(pt) option method.
*/
export interface DividerPassThroughMethodOptions {
/**
* Defines instance.
*/
2023-07-06 12:01:33 +00:00
instance: any;
/**
* Defines valid properties.
*/
2023-03-28 12:30:44 +00:00
props: DividerProps;
2023-09-05 08:50:46 +00:00
/**
* Defines passthrough(pt) options in global config.
*/
global: object | undefined;
2023-03-28 12:30:44 +00:00
}
/**
* Custom passthrough(pt) options.
* @see {@link DividerProps.pt}
*/
export interface DividerPassThroughOptions {
/**
2023-08-01 14:01:12 +00:00
* Used to pass attributes to the root's DOM element.
2023-03-28 12:30:44 +00:00
*/
root?: DividerPassThroughOptionType;
/**
2023-08-01 14:01:12 +00:00
* Used to pass attributes to the content's DOM element.
2023-03-28 12:30:44 +00:00
*/
content?: DividerPassThroughOptionType;
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-28 12:30:44 +00:00
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface DividerPassThroughAttributes {
[key: string]: any;
}
2023-02-28 15:50:01 +00:00
/**
* Defines valid properties in Divider component.
*/
2022-09-06 12:03:37 +00:00
export interface DividerProps {
/**
2023-03-03 08:18:55 +00:00
* Alignment of the content.
2022-09-06 12:03:37 +00:00
*/
2023-02-28 15:50:01 +00:00
align?: 'left' | 'center' | 'right' | 'top' | 'center' | 'bottom' | undefined;
2022-09-06 12:03:37 +00:00
/**
* Specifies the orientation, valid values are 'horizontal' and 'vertical'.
2023-03-08 10:51:52 +00:00
* @defaultValue horizontal
2022-09-06 12:03:37 +00:00
*/
2023-02-28 15:50:01 +00:00
layout?: 'horizontal' | 'vertical' | undefined;
2022-09-06 12:03:37 +00:00
/**
* Border style type.
2023-03-08 10:51:52 +00:00
* @defaultValue solid
2022-09-06 12:03:37 +00:00
*/
2023-02-28 15:50:01 +00:00
type?: 'solid' | 'dashed' | 'dotted' | undefined;
2023-03-28 12:30:44 +00:00
/**
2023-08-01 14:01:12 +00:00
* Used to pass attributes to DOM elements inside the component.
2023-03-28 12:30:44 +00:00
* @type {DividerPassThroughOptions}
*/
pt?: PTOptions<DividerPassThroughOptions>;
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:05:19 +00:00
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
2022-09-06 12:03:37 +00:00
}
2023-02-28 15:50:01 +00:00
/**
* Defines valid slots in Divider slots.
*/
2022-09-06 12:03:37 +00:00
export interface DividerSlots {
/**
* Default content slot.
*/
2023-02-28 15:50:01 +00:00
default(): VNode[];
2022-09-06 12:03:37 +00:00
}
2023-02-28 15:50:01 +00:00
export interface DividerEmits {}
2022-09-06 12:03:37 +00:00
2023-02-28 15:50:01 +00:00
/**
* **PrimeVue - Divider**
*
* _Divider is used to separate contents._
*
2023-03-02 09:22:22 +00:00
* [Live Demo](https://primevue.org/divider)
2023-02-28 15:50:01 +00:00
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-02-28 15:50:01 +00:00
*
* @group Component
*
*/
2023-03-01 12:30:54 +00:00
declare class Divider extends ClassComponent<DividerProps, DividerSlots, DividerEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Divider: GlobalComponentConstructor<Divider>;
2022-09-06 12:03:37 +00:00
}
}
export default Divider;