Splitter d.ts updated

pull/3689/head
Bahadır Sofuoğlu 2023-03-01 00:23:26 +03:00
parent b3a7f65af0
commit 0bf8507230
2 changed files with 79 additions and 20 deletions

View File

@ -1,10 +1,19 @@
/**
*
* Splitter is utilized to separate and resize panels.
*
* [Live Demo](https://www.primevue.org/splitter/)
*
* @module splitter
*
*/
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type SplitterLayoutType = 'horizontal' | 'vertical' | undefined;
type SplitterStateStorageType = 'local' | 'session' | undefined;
/**
* Custom resize start event.
* @see resizestar
*/
export interface SplitterResizeStartEvent {
/**
* Browser event
@ -16,6 +25,10 @@ export interface SplitterResizeStartEvent {
sizes: number[];
}
/**
* Custom resize end event.
* @see resizeend
*/
export interface SplitterResizeEndEvent {
/**
* Browser event
@ -27,16 +40,18 @@ export interface SplitterResizeEndEvent {
sizes: number[];
}
/**
* Defines valid properties in Splitter component.
*/
export interface SplitterProps {
/**
* Orientation of the panels.
* @see SplitterLayoutType
* Default value is 'horizontal'.
* @defaultValue horizontal
*/
layout?: SplitterLayoutType;
layout?: 'horizontal' | 'vertical' | undefined;
/**
* Size of the divider in pixels.
* Default value is 4.
* @defaultValue 4
*/
gutterSize?: number | undefined;
/**
@ -45,38 +60,55 @@ export interface SplitterProps {
stateKey?: string | undefined;
/**
* Defines where a stateful splitter keeps its state, valid values are 'session' for sessionStorage and 'local' for localStorage.
* @see SplitterStateStorageType
* Default value is 'session'.
* @defaultValue session
*/
stateStorage?: SplitterStateStorageType;
stateStorage?: 'local' | 'session' | undefined;
/**
* Step factor to increment/decrement the size of the panels while pressing the arrow keys.
* Default value is 1.
* @defaultValue 1
*/
step?: number | undefined;
}
/**
* Defines valid slots in Splitter slots.
*/
export interface SplitterSlots {
/**
* Default slot to detect SplitterPanel components.
*/
default: () => VNode[];
default(): VNode[];
}
export declare type SplitterEmits = {
/**
* Defines valid emits in Splitter component.
*/
export interface SplitterEmits {
/**
* Callback to invoke when resize starts.
* @param {SplitterResizeStartEvent} event - Custom resize start event.
*/
resizestar: (event: SplitterResizeStartEvent) => void;
resizestar(event: SplitterResizeStartEvent): void;
/**
* Callback to invoke when resize ends.
* @param {SplitterResizeEndEvent} event - Custom resize end event.
*/
resizeend: (event: SplitterResizeEndEvent) => void;
};
resizeend(event: SplitterResizeEndEvent): void;
}
declare class Splitter extends ClassComponent<SplitterProps, SplitterSlots, SplitterEmits> {}
/**
* **PrimeVue - Splitter**
*
* _Splitter is utilized to separate and resize panels._
*
* [Live Demo](https://www.primevue.org/splitter/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
*
* @group Component
*
*/
export declare class Splitter extends ClassComponent<SplitterProps, SplitterSlots, SplitterEmits> {}
declare module '@vue/runtime-core' {
interface GlobalComponents {

View File

@ -1,6 +1,18 @@
/**
*
* SplitterPanel is a helper component for Splitter component.
*
* [Live Demo](https://www.primevue.org/splitter/)
*
* @module splitterpanel
*
*/
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Defines valid properties in SplitterPanel component.
*/
export interface SplitterPanelProps {
/**
* Size of the element relative to 100%.
@ -12,6 +24,9 @@ export interface SplitterPanelProps {
minSize?: number | undefined;
}
/**
* Defines valid slots in SplitterPanel slots.
*/
export interface SplitterPanelSlots {
/**
* Custom content template.
@ -19,9 +34,21 @@ export interface SplitterPanelSlots {
default: () => VNode[];
}
export declare type SplitterPanelEmits = {};
export interface SplitterPanelEmits {}
declare class SplitterPanel extends ClassComponent<SplitterPanelProps, SplitterPanelSlots, SplitterPanelEmits> {}
/**
* **PrimeVue - SplitterPanel**
*
* _SplitterPanel is a helper component for Splitter component._
*
* [Live Demo](https://www.primevue.org/splitterpanel/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
*
* @group Component
*
*/
export declare class SplitterPanel extends ClassComponent<SplitterPanelProps, SplitterPanelSlots, SplitterPanelEmits> {}
declare module '@vue/runtime-core' {
interface GlobalComponents {