primevue-mirror/components/lib/buttongroup/ButtonGroup.d.ts

118 lines
3.0 KiB
TypeScript
Raw Normal View History

2024-02-16 09:16:05 +00:00
/**
*
2024-02-16 11:06:57 +00:00
* A set of Buttons can be displayed together using the ButtonGroup component.
2024-02-16 09:16:05 +00:00
*
* [Live Demo](https://www.primevue.org/button/)
*
2024-02-16 11:06:57 +00:00
* @module buttongroup
2024-02-16 09:16:05 +00:00
*
*/
import { VNode } from 'vue';
2024-02-16 11:06:57 +00:00
import { ComponentHooks } from '../basecomponent/BaseComponent';
2024-02-16 09:16:05 +00:00
import { PassThroughOptions } from '../passthrough';
import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
2024-02-16 09:16:05 +00:00
2024-02-16 11:06:57 +00:00
export declare type ButtonGroupPassThroughOptionType = ButtonGroupPassThroughAttributes | ((options: ButtonGroupPassThroughMethodOptions) => ButtonGroupPassThroughAttributes | string) | string | null | undefined;
2024-02-16 09:16:05 +00:00
/**
* Custom passthrough(pt) option method.
*/
2024-02-16 11:06:57 +00:00
export interface ButtonGroupPassThroughMethodOptions {
2024-02-16 09:16:05 +00:00
/**
* Defines instance.
*/
instance: any;
/**
* Defines valid properties.
*/
2024-02-16 11:06:57 +00:00
props: ButtonGroupProps;
2024-02-16 09:16:05 +00:00
/**
* Defines passthrough(pt) options in global config.
*/
global: object | undefined;
}
/**
* Custom passthrough(pt) options.
2024-02-16 11:06:57 +00:00
* @see {@link ButtonGroupProps.pt}
2024-02-16 09:16:05 +00:00
*/
2024-02-16 11:06:57 +00:00
export interface ButtonGroupPassThroughOptions {
2024-02-16 09:16:05 +00:00
/**
* Used to pass attributes to the root's DOM element.
*/
2024-02-16 11:06:57 +00:00
root?: ButtonGroupPassThroughOptionType;
2024-02-16 09:16:05 +00:00
/**
* Used to manage all lifecycle hooks.
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
}
/**
* Custom passthrough attributes for each DOM elements
*/
2024-02-16 11:06:57 +00:00
export interface ButtonGroupPassThroughAttributes {
2024-02-16 09:16:05 +00:00
[key: string]: any;
}
/**
2024-02-16 11:06:57 +00:00
* Defines valid properties in ButtonGroup component.
2024-02-16 09:16:05 +00:00
*/
2024-02-16 11:06:57 +00:00
export interface ButtonGroupProps {
/**
* It generates scoped CSS variables using design tokens for the component.
*/
dt?: DesignToken<any>;
2024-02-16 09:16:05 +00:00
/**
* Used to pass attributes to DOM elements inside the component.
2024-02-16 11:06:57 +00:00
* @type {ButtonGroupPassThroughOptions}
2024-02-16 09:16:05 +00:00
*/
2024-02-16 11:06:57 +00:00
pt?: PassThrough<ButtonGroupPassThroughOptions>;
2024-02-16 09:16:05 +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;
}
/**
2024-02-16 11:06:57 +00:00
* Defines valid slots in ButtonGroup component.
2024-02-16 09:16:05 +00:00
*/
2024-02-16 11:06:57 +00:00
export interface ButtonGroupSlots {
2024-02-16 09:16:05 +00:00
/**
* Default slot to detect Button components.
*/
default(): VNode[];
}
/**
2024-02-16 11:06:57 +00:00
* Defines valid emits in ButtonGroup component.
2024-02-16 09:16:05 +00:00
*/
2024-02-16 11:06:57 +00:00
export interface ButtonGroupEmits {}
2024-02-16 09:16:05 +00:00
/**
2024-02-16 11:06:57 +00:00
* **PrimeVue - ButtonGroup**
2024-02-16 09:16:05 +00:00
*
2024-02-16 11:06:57 +00:00
* _A set of Buttons can be displayed together using the ButtonGroup component._
2024-02-16 09:16:05 +00:00
*
* [Live Demo](https://www.primevue.org/button/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
*
* @group Component
*/
2024-02-16 11:06:57 +00:00
declare class ButtonGroup extends ClassComponent<ButtonGroupProps, ButtonGroupSlots, ButtonGroupEmits> {}
2024-02-16 09:16:05 +00:00
declare module 'vue' {
export interface GlobalComponents {
2024-02-16 11:06:57 +00:00
ButtonGroup: GlobalComponentConstructor<ButtonGroup>;
2024-02-16 09:16:05 +00:00
}
}
2024-02-16 11:06:57 +00:00
export default ButtonGroup;