UNPKG

@aplus-frontend/ui

Version:

215 lines (214 loc) 9.21 kB
import { ScrollOptions, ScrollViewProps } from './interface'; import { ScrollBarDirection, InternalScrollBarProps } from '../scroll-bar'; import { CreateComponentPublicInstanceWithMixins, Ref, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue'; declare function scroll(x?: number, y?: number): void; declare function scrollTo({ smooth, left, top }: ScrollOptions): void; declare function scrollIntoView(element: HTMLElement, position?: 'start' | 'center' | 'end'): void; declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: {}): any; }; refs: { containerRef: HTMLDivElement; contentRef: HTMLDivElement; yBarRef: CreateComponentPublicInstanceWithMixins<Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; track: HTMLDivElement; bar: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }> | null; xBarRef: CreateComponentPublicInstanceWithMixins<Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; track: HTMLDivElement; bar: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }> | null; }; rootEl: HTMLDivElement; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: DefineComponent<ScrollViewProps, { scrollTop: ComputedRef<number>; scrollLeft: ComputedRef<number>; scroll: typeof scroll; scrollTo: typeof scrollTo; scrollIntoView: typeof scrollIntoView; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ScrollViewProps> & Readonly<{}>, { showXBar: boolean; showYBar: boolean; xBarProps: { width?: number | undefined; onScroll?: ((percent: number) => void) | undefined; disabled?: boolean | undefined; trackSpeed?: number | undefined; barColor?: import("csstype").Property.BackgroundColor | undefined; trackColor?: import("csstype").Property.BackgroundColor | undefined; trackWidth?: number | undefined; showTrack?: boolean | undefined; onScrollStart?: ((percent: number) => void) | undefined; onScrollEnd?: ((percent: number) => void) | undefined; }; yBarProps: { width?: number | undefined; onScroll?: ((percent: number) => void) | undefined; disabled?: boolean | undefined; trackSpeed?: number | undefined; barColor?: import("csstype").Property.BackgroundColor | undefined; trackColor?: import("csstype").Property.BackgroundColor | undefined; trackWidth?: number | undefined; showTrack?: boolean | undefined; onScrollStart?: ((percent: number) => void) | undefined; onScrollEnd?: ((percent: number) => void) | undefined; }; }, {}, {}, {}, string, ComponentProvideOptions, false, { containerRef: HTMLDivElement; contentRef: HTMLDivElement; yBarRef: CreateComponentPublicInstanceWithMixins<Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; track: HTMLDivElement; bar: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }> | null; xBarRef: CreateComponentPublicInstanceWithMixins<Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; track: HTMLDivElement; bar: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< InternalScrollBarProps> & Readonly<{}>, { currentScroll: Ref<number, number>; container: Ref<HTMLElement | undefined, HTMLElement | undefined>; bar: Ref<HTMLElement | undefined, HTMLElement | undefined>; track: Ref<HTMLElement | undefined, HTMLElement | undefined>; scroll: (percent: number) => void; }, {}, {}, {}, { scroll: number; disabled: boolean; direction: ScrollBarDirection; trackSpeed: number; barLength: number; showTrack: boolean; }> | null; }, HTMLDivElement>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };