refactor(types): rewrite type definitions to account for intrinsic attributes

This commit is contained in:
Eric Liu 2020-11-03 05:44:11 -08:00
commit 3c04f122b0
158 changed files with 6997 additions and 5383 deletions

View file

@ -0,0 +1,25 @@
/// <reference types="svelte" />
export default class ProgressIndicatorSkeleton {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> & {
/**
* Set to `true` to use the vertical variant
* @default false
*/
vertical?: boolean;
/**
* Specify the number of steps to render
* @default 4
*/
count?: number;
};
$$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}

View file

@ -0,0 +1,40 @@
/// <reference types="svelte" />
export default class ProgressIndicator {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> & {
/**
* Specify the current step index
* @default 0
*/
currentIndex?: number;
/**
* Set to `true` to use the vertical variant
* @default false
*/
vertical?: boolean;
/**
* Set to `true` to specify whether the progress steps should be split equally in size in the div
* @default false
*/
spaceEqually?: boolean;
/**
* Set to `true` to prevent updating `currentIndex`
* @default false
*/
preventChangeOnClick?: boolean;
};
$$slot_def: {
default: {};
};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "change", cb: (event: CustomEvent<any>) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}

View file

@ -0,0 +1,63 @@
/// <reference types="svelte" />
export default class ProgressStep {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> & {
/**
* Set to `true` for the complete variant
* @default false
*/
complete?: boolean;
/**
* Set to `true` to use the current variant
* @default false
*/
current?: boolean;
/**
* Set to `true` to disable the progress step
* @default false
*/
disabled?: boolean;
/**
* Set to `true` to indicate an invalid state
* @default false
*/
invalid?: boolean;
/**
* Specify the step description
* @default ""
*/
description?: string;
/**
* Specify the step label
* @default ""
*/
label?: string;
/**
* Specify the step secondary label
* @default ""
*/
secondaryLabel?: string;
/**
* Set an id for the top-level element
*/
id?: string;
};
$$slot_def: {
default: { props: { class: "bx--progress-label" } };
};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}