primevue-mirror/components/lib/scrollpanel/ScrollPanel.d.ts

143 lines
3.5 KiB
TypeScript
Raw Normal View History

2023-02-28 17:39:29 +00:00
/**
*
* ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.
*
* [Live Demo](https://www.primevue.org/scrollpanel/)
*
* @module scrollpanel
*
*/
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-27 06:27:52 +00:00
export declare type ScrollPanelPassThroughOptionType = ScrollPanelPassThroughAttributes | ((options: ScrollPanelPassThroughMethodOptions) => ScrollPanelPassThroughAttributes) | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface ScrollPanelPassThroughMethodOptions {
2023-07-06 12:01:33 +00:00
instance: any;
2023-03-27 06:27:52 +00:00
props: ScrollPanelProps;
state: ScrollPanelState;
}
/**
* Custom passthrough(pt) options.
* @see {@link ScrollPanelProps.pt}
*/
export interface ScrollPanelPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: ScrollPanelPassThroughOptionType;
/**
* Uses to pass attributes to the wrapper's DOM element.
*/
wrapper?: ScrollPanelPassThroughOptionType;
/**
* Uses to pass attributes to the content's DOM element.
*/
content?: ScrollPanelPassThroughOptionType;
/**
* Uses to pass attributes to the horizontal panel's DOM element.
*/
2023-04-19 08:00:52 +00:00
barX?: ScrollPanelPassThroughOptionType;
2023-03-27 06:27:52 +00:00
/**
* Uses to pass attributes to the vertical panel's DOM element.
*/
2023-04-19 08:00:52 +00:00
barY?: ScrollPanelPassThroughOptionType;
2023-07-06 11:09:01 +00:00
/**
* Uses to manage all lifecycle hooks
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
2023-03-27 06:27:52 +00:00
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface ScrollPanelPassThroughAttributes {
[key: string]: any;
}
/**
* Defines current inline state in Panel component.
*/
export interface ScrollPanelState {
/**
* Current id state as a string.
*/
id: string;
/**
* Current scrollpanel orientation.
* @defaultValue vertical
*/
orientation: string;
/**
* Latest scroll top position.
* @defaultValue 0
*/
lastScrollTop: number;
/**
* Latest scroll left position.
* @defaultValue 0
*/
lastScrollLeft: number;
}
2023-02-28 17:39:29 +00:00
/**
* Defines valid properties in ScrollPanel component.
*/
2022-09-06 12:03:37 +00:00
export interface ScrollPanelProps {
2022-09-14 11:26:01 +00:00
/**
* Step factor to scroll the content while pressing the arrow keys.
2023-02-28 17:39:29 +00:00
* @defaultValue 5
2022-09-14 11:26:01 +00:00
*/
step?: number | undefined;
2023-03-27 06:27:52 +00:00
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {ScrollPanelPassThroughOptions}
*/
pt?: ScrollPanelPassThroughOptions;
2023-05-24 14:08:05 +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 17:39:29 +00:00
/**
* Defines valid slots in Accordion slots.
*/
2022-09-06 12:03:37 +00:00
export interface ScrollPanelSlots {
/**
* Custom content slot.
*/
default: () => VNode[];
}
2023-02-28 17:39:29 +00:00
export interface ScrollPanelEmits {}
2022-09-06 12:03:37 +00:00
2023-02-28 17:39:29 +00:00
/**
* **PrimeVue - ScrollPanel**
*
* _ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.._
*
* [Live Demo](https://www.primevue.org/scrollpanel/)
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-02-28 17:39:29 +00:00
*
* @group Component
*
*/
2023-03-01 12:30:54 +00:00
declare class ScrollPanel extends ClassComponent<ScrollPanelProps, ScrollPanelSlots, ScrollPanelEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
ScrollPanel: GlobalComponentConstructor<ScrollPanel>;
2022-09-06 12:03:37 +00:00
}
}
export default ScrollPanel;