From 0bf8507230d5727f1a71e357effeb91f23d831c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Wed, 1 Mar 2023 00:23:26 +0300 Subject: [PATCH] Splitter d.ts updated --- components/splitter/Splitter.d.ts | 68 +++++++++++++++------ components/splitterpanel/SplitterPanel.d.ts | 31 +++++++++- 2 files changed, 79 insertions(+), 20 deletions(-) diff --git a/components/splitter/Splitter.d.ts b/components/splitter/Splitter.d.ts index 8db3a1026..c28e6725f 100644 --- a/components/splitter/Splitter.d.ts +++ b/components/splitter/Splitter.d.ts @@ -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 {} +/** + * **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 {} declare module '@vue/runtime-core' { interface GlobalComponents { diff --git a/components/splitterpanel/SplitterPanel.d.ts b/components/splitterpanel/SplitterPanel.d.ts index 23be12e29..d733a8cb2 100644 --- a/components/splitterpanel/SplitterPanel.d.ts +++ b/components/splitterpanel/SplitterPanel.d.ts @@ -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 {} +/** + * **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 {} declare module '@vue/runtime-core' { interface GlobalComponents {