2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Dropdown also known as Select, is used to choose an item from a collection of options.
|
|
|
|
*
|
2024-04-18 14:17:41 +00:00
|
|
|
* [Live Demo](https://www.primevue.org/select/)
|
2023-03-01 10:43:09 +00:00
|
|
|
*
|
|
|
|
* @module dropdown
|
|
|
|
*
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
import 'vue';
|
|
|
|
import * as Select from '../select';
|
2024-05-16 10:50:43 +00:00
|
|
|
import { DefineComponent, EmitFn, GlobalComponentConstructor } from '../ts-helpers';
|
2023-08-02 14:07:22 +00:00
|
|
|
|
2023-05-07 20:37:26 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownPassThroughMethodOptions<T> extends Select.SelectPassThroughMethodOptions<T> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Custom change event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link DropdownEmits.change}
|
2023-03-01 10:43:09 +00:00
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownChangeEvent extends Select.SelectChangeEvent {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
2023-03-03 14:17:03 +00:00
|
|
|
* Custom filter event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link DropdownEmits.filter}
|
2023-03-01 10:43:09 +00:00
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownFilterEvent extends Select.SelectFilterEvent {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-05-07 20:37:26 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link DropdownProps.pt}
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownPassThroughOptions<T = any> extends Select.SelectPassThroughOptions<T> {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownPassThroughAttributes extends Select.SelectPassThroughAttributes {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current inline state in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownState extends Select.SelectState {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current options in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownContext extends Select.SelectContext {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownProps extends Select.SelectProps {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownSlots extends Select.SelectSlots {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Defines valid emits in Dropdown component.
|
|
|
|
*/
|
2024-05-16 10:50:43 +00:00
|
|
|
interface DropdownEmitsOptions {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2024-05-16 10:50:43 +00:00
|
|
|
export declare type DropdownEmits = EmitFn<DropdownEmitsOptions> & Select.SelectEmits;
|
|
|
|
|
|
|
|
export interface DropdownMethods {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Shows the overlay.
|
2023-03-01 10:43:09 +00:00
|
|
|
* @param {boolean} [isFocus] - Decides whether to focus on the component. @defaultValue false.
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
* @memberof Dropdown
|
|
|
|
*/
|
|
|
|
show: (isFocus?: boolean) => void;
|
|
|
|
/**
|
|
|
|
* Hides the overlay.
|
2023-03-01 10:43:09 +00:00
|
|
|
* @param {boolean} [isFocus] - Decides whether to focus on the component. @defaultValue false.
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
* @memberof Dropdown
|
|
|
|
*/
|
|
|
|
hide: (isFocus?: boolean) => void;
|
|
|
|
}
|
|
|
|
|
2024-05-16 10:50:43 +00:00
|
|
|
/**
|
|
|
|
* @deprecated Deprecated since v4. Use Select component instead.
|
|
|
|
*
|
|
|
|
* **PrimeVue - Dropdown**
|
|
|
|
*
|
|
|
|
* _Dropdown also known as Select, is used to choose an item from a collection of options._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/select/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
declare const Dropdown: DefineComponent<DropdownProps, DropdownSlots, DropdownEmits, DropdownMethods>;
|
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2024-05-16 10:50:43 +00:00
|
|
|
Dropdown: GlobalComponentConstructor<DropdownProps, DropdownSlots, DropdownEmits, DropdownMethods>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Dropdown;
|