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';
|
2023-09-05 08:50:46 +00:00
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2024-04-02 08:24:31 +00:00
|
|
|
import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-07-11 22:42:43 +00:00
|
|
|
export declare type ScrollPanelPassThroughOptionType = ScrollPanelPassThroughAttributes | ((options: ScrollPanelPassThroughMethodOptions) => ScrollPanelPassThroughAttributes | string) | string | null | undefined;
|
2023-03-27 06:27:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface ScrollPanelPassThroughMethodOptions {
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
2023-07-06 12:01:33 +00:00
|
|
|
instance: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
2023-03-27 06:27:52 +00:00
|
|
|
props: ScrollPanelProps;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines current inline state.
|
|
|
|
*/
|
2023-03-27 06:27:52 +00:00
|
|
|
state: ScrollPanelState;
|
2023-12-10 21:41:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid attributes.
|
|
|
|
*/
|
|
|
|
attrs: any;
|
2023-12-05 11:06:32 +00:00
|
|
|
/**
|
|
|
|
* Defines parent options.
|
|
|
|
*/
|
|
|
|
parent: any;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
2023-03-27 06:27:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link ScrollPanelProps.pt}
|
|
|
|
*/
|
|
|
|
export interface ScrollPanelPassThroughOptions {
|
|
|
|
/**
|
2024-05-15 09:22:27 +00:00
|
|
|
* Used to pass attributes to the roots DOM element.
|
2023-03-27 06:27:52 +00:00
|
|
|
*/
|
|
|
|
root?: ScrollPanelPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:22:27 +00:00
|
|
|
* Used to pass attributes to the content containers DOM element.
|
2023-03-27 06:27:52 +00:00
|
|
|
*/
|
2024-04-30 14:09:49 +00:00
|
|
|
contentContainer?: ScrollPanelPassThroughOptionType;
|
2023-03-27 06:27:52 +00:00
|
|
|
/**
|
2024-05-15 09:22:27 +00:00
|
|
|
* Used to pass attributes to the contents DOM element.
|
2023-03-27 06:27:52 +00:00
|
|
|
*/
|
|
|
|
content?: ScrollPanelPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:22:27 +00:00
|
|
|
* Used to pass attributes to the horizontal panels DOM element.
|
2023-03-27 06:27:52 +00:00
|
|
|
*/
|
2023-04-19 08:00:52 +00:00
|
|
|
barX?: ScrollPanelPassThroughOptionType;
|
2023-03-27 06:27:52 +00:00
|
|
|
/**
|
2024-05-15 09:22:27 +00:00
|
|
|
* Used to pass attributes to the vertical panels DOM element.
|
2023-03-27 06:27:52 +00:00
|
|
|
*/
|
2023-04-19 08:00:52 +00:00
|
|
|
barY?: ScrollPanelPassThroughOptionType;
|
2023-07-06 11:09:01 +00:00
|
|
|
/**
|
2023-11-07 06:16:39 +00:00
|
|
|
* Used to manage all lifecycle hooks.
|
2023-07-06 11:09:01 +00:00
|
|
|
* @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;
|
2024-04-02 08:24:31 +00:00
|
|
|
/**
|
|
|
|
* It generates scoped CSS variables using design tokens for the component.
|
|
|
|
*/
|
|
|
|
dt?: DesignToken<any>;
|
2023-03-27 06:27:52 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
2023-03-27 06:27:52 +00:00
|
|
|
* @type {ScrollPanelPassThroughOptions}
|
|
|
|
*/
|
2023-09-05 11:28:04 +00:00
|
|
|
pt?: PassThrough<ScrollPanelPassThroughOptions>;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
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
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
ScrollPanel: GlobalComponentConstructor<ScrollPanel>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ScrollPanel;
|