primevue-mirror/components/lib/inputgroupaddon/InputGroupAddon.d.ts

115 lines
3.0 KiB
TypeScript
Raw Normal View History

2023-11-02 12:48:32 +00:00
/**
*
* InputGroupAddon displays text, icon, buttons and other content can be grouped next to an input.
*
* [Live Demo](https://www.primevue.org/inputgroup/)
*
* @module inputgroupaddon
*
*/
import { VNode } from 'vue';
import { ComponentHooks } from '../basecomponent';
import { PassThroughOptions } from '../passthrough';
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
2023-11-07 06:14:13 +00:00
export declare type InputGroupAddonPassThroughOptionType = InputGroupAddonPassThroughAttributes | ((options: InputGroupAddonPassThroughMethodOptions) => InputGroupAddonPassThroughAttributes | string) | string | null | undefined;
2023-11-02 12:48:32 +00:00
/**
* Custom passthrough(pt) option method.
*/
2023-11-07 06:14:13 +00:00
export interface InputGroupAddonPassThroughMethodOptions {
2023-11-02 12:48:32 +00:00
/**
* Defines instance.
*/
instance: any;
/**
* Defines passthrough(pt) options in global config.
*/
global: object | undefined;
}
/**
* Custom passthrough(pt) options.
2023-11-07 06:14:13 +00:00
* @see {@link InputGroupAddonProps.pt}
2023-11-02 12:48:32 +00:00
*/
2023-11-07 06:14:13 +00:00
export interface InputGroupAddonPassThroughOptions {
2023-11-02 12:48:32 +00:00
/**
* Used to pass attributes to the root's DOM element.
*/
2023-11-07 06:14:13 +00:00
root?: InputGroupAddonPassThroughOptionType;
2023-11-02 12:48:32 +00:00
/**
2023-11-07 06:16:39 +00:00
* Used to manage all lifecycle hooks.
2023-11-02 12:48:32 +00:00
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
}
/**
* Custom passthrough attributes for each DOM elements
*/
2023-11-07 06:14:13 +00:00
export interface InputGroupAddonPassThroughAttributes {
2023-11-02 12:48:32 +00:00
[key: string]: any;
}
/**
* Defines valid properties in InputGroupAddon component.
*/
2023-11-07 06:14:13 +00:00
export interface InputGroupAddonProps {
2023-11-02 12:48:32 +00:00
/**
* Used to pass attributes to DOM elements inside the component.
2023-11-07 06:14:13 +00:00
* @type {InputGroupAddonPassThroughOptions}
2023-11-02 12:48:32 +00:00
*/
2023-11-07 06:14:13 +00:00
pt?: PassThrough<InputGroupAddonPassThroughOptions>;
2023-11-02 12:48:32 +00:00
/**
* Used to configure passthrough(pt) options of the component.
* @type {PassThroughOptions}
*/
ptOptions?: PassThroughOptions;
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}
/**
* Defines valid slots in InputGroupAddon component.
*/
2023-11-07 06:14:13 +00:00
export interface InputGroupAddonSlots {
2023-11-02 12:48:32 +00:00
/**
* Custom default template.
*/
default(): VNode[];
/**
* Dynamic content template.
* @todo
*/
[key: string]: (node: any) => VNode[];
}
/**
* Defines valid emits in InputGroupAddon component.
*/
2023-11-07 06:14:13 +00:00
export interface InputGroupAddonEmits {}
2023-11-02 12:48:32 +00:00
/**
* **PrimeVue - InputGroupAddon**
*
2023-11-07 06:14:13 +00:00
* _InputGroupAddon displays text, icon, buttons and other content can be grouped next to an input._
2023-11-02 12:48:32 +00:00
*
2023-11-07 06:14:13 +00:00
* [Live Demo](https://www.primevue.org/inputgroupaddon/)
2023-11-02 12:48:32 +00:00
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
*
* @group Component
*/
2023-11-07 06:14:13 +00:00
declare class InputGroupAddon extends ClassComponent<InputGroupAddonProps, InputGroupAddonSlots, InputGroupAddonEmits> {}
2023-11-02 12:48:32 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
InputGroupAddon: GlobalComponentConstructor<InputGroupAddon>;
}
}
export default InputGroupAddon;