import React, { ReactNode } from 'react'; import type { Options, ScrollbarsAutoHideBehavior } from 'overlayscrollbars'; import { IHasCX, IHasRawProps } from '@epam/uui-core'; import './ScrollBars.scss'; export type ScrollbarsApi = { /** Reference to the scrollbar container element */ container: HTMLElement | null; /** Reference to the scrollable view element */ view: HTMLElement | null; }; export type ScrollbarProps = IHasCX & IHasRawProps> & { /** Callback fired when scroll position changes */ onScroll?: React.UIEventHandler; /** * The scrollbars auto hide behavior * - 'never' - The scrollbars are always hidden. * - 'scroll' - The scrollbars are hidden unless the user scrolls. * - 'move' - The scrollbars are hidden unless the pointer moves in the host element or the user scrolls. * - 'leave' - The scrollbars are hidden if the pointer leaves the host element or unless the user scrolls. * @default 'never' */ autoHide?: ScrollbarsAutoHideBehavior; /** * Delay in milliseconds before scrollbars hide after scrolling stops * @default 1300 */ autoHideDelay?: number; /** * Visual effect to show at the top when content is scrolled down * - 'line': shows a thin line border * - 'shadow': shows a gradient shadow * - 'none': no visual effect * @default 'none' */ overflowTopEffect?: 'line' | 'shadow' | 'none'; /** * Visual effect to show at the bottom when content can be scrolled down * - 'line': shows a thin line border * - 'shadow': shows a gradient shadow * - 'none': no visual effect * @default 'none' */ overflowBottomEffect?: 'line' | 'shadow' | 'none'; /** * The given Event(s) from the elements with the given selector(s) will trigger an update. * Useful for cases where OverlayScrollbars' default logic does not detect changes, such as shadow DOM size changes. */ elementEvents?: Options['update']['elementEvents']; children?: ReactNode | undefined; }; export declare const ScrollBars: React.ForwardRefExoticComponent> & { /** Callback fired when scroll position changes */ onScroll?: React.UIEventHandler; /** * The scrollbars auto hide behavior * - 'never' - The scrollbars are always hidden. * - 'scroll' - The scrollbars are hidden unless the user scrolls. * - 'move' - The scrollbars are hidden unless the pointer moves in the host element or the user scrolls. * - 'leave' - The scrollbars are hidden if the pointer leaves the host element or unless the user scrolls. * @default 'never' */ autoHide?: ScrollbarsAutoHideBehavior; /** * Delay in milliseconds before scrollbars hide after scrolling stops * @default 1300 */ autoHideDelay?: number; /** * Visual effect to show at the top when content is scrolled down * - 'line': shows a thin line border * - 'shadow': shows a gradient shadow * - 'none': no visual effect * @default 'none' */ overflowTopEffect?: 'line' | 'shadow' | 'none'; /** * Visual effect to show at the bottom when content can be scrolled down * - 'line': shows a thin line border * - 'shadow': shows a gradient shadow * - 'none': no visual effect * @default 'none' */ overflowBottomEffect?: 'line' | 'shadow' | 'none'; /** * The given Event(s) from the elements with the given selector(s) will trigger an update. * Useful for cases where OverlayScrollbars' default logic does not detect changes, such as shadow DOM size changes. */ elementEvents?: Options['update']['elementEvents']; children?: ReactNode | undefined; } & React.RefAttributes>; //# sourceMappingURL=ScrollBars.d.ts.map