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';
|
|
|
|
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 {
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
barx?: ScrollPanelPassThroughOptionType;
|
|
|
|
/**
|
|
|
|
* Uses to pass attributes to the vertical panel's DOM element.
|
|
|
|
*/
|
|
|
|
bary?: ScrollPanelPassThroughOptionType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
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;
|