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

28
types/UIShell/SideNav/SideNav.d.ts vendored Normal file
View file

@ -0,0 +1,28 @@
/// <reference types="svelte" />
export default class SideNav {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["nav"]> & {
/**
* Set to `true` to use the fixed variant
* @default false
*/
fixed?: boolean;
/**
* Specify the ARIA label for the nav
*/
ariaLabel?: string;
/**
* Set to `true` to toggle the expanded state
* @default false
*/
isOpen?: boolean;
};
$$slot_def: {
default: {};
};
$on(eventname: string, cb: (event: Event) => void): () => void;
}

11
types/UIShell/SideNav/SideNavItems.d.ts vendored Normal file
View file

@ -0,0 +1,11 @@
/// <reference types="svelte" />
export default class SideNavItems {
$$prop_def: {};
$$slot_def: {
default: {};
};
$on(eventname: string, cb: (event: Event) => void): () => void;
}

37
types/UIShell/SideNav/SideNavLink.d.ts vendored Normal file
View file

@ -0,0 +1,37 @@
/// <reference types="svelte" />
export default class SideNavLink {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
/**
* Set to `true` to select the current link
* @default false
*/
isSelected?: boolean;
/**
* Specify the `href` attribute
*/
href?: string;
/**
* Specify the text
*/
text?: string;
/**
* Specify the icon props
*/
icon?: { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean };
/**
* Obtain a reference to the HTML anchor element
* @default null
*/
ref?: null | HTMLAnchorElement;
};
$$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}

34
types/UIShell/SideNav/SideNavMenu.d.ts vendored Normal file
View file

@ -0,0 +1,34 @@
/// <reference types="svelte" />
export default class SideNavMenu {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> & {
/**
* Set to `true` to toggle the expanded state
* @default false
*/
expanded?: boolean;
/**
* Specify the text
*/
text?: string;
/**
* Specify the icon props
*/
icon?: { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean };
/**
* Obtain a reference to the HTML button element
* @default null
*/
ref?: null | HTMLButtonElement;
};
$$slot_def: {
default: {};
};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}

View file

@ -0,0 +1,31 @@
/// <reference types="svelte" />
export default class SideNavMenuItem {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
/**
* Set to `true` to select the item
*/
isSelected?: boolean;
/**
* Specify the `href` attribute
*/
href?: string;
/**
* Specify the item text
*/
text?: string;
/**
* Obtain a reference to the HTML anchor element
* @default null
*/
ref?: null | HTMLAnchorElement;
};
$$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}