mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor(types): rewrite type definitions to account for intrinsic attributes
This commit is contained in:
parent
8c30452169
commit
3c04f122b0
158 changed files with 6997 additions and 5383 deletions
54
types/UIShell/GlobalHeader/Header.d.ts
vendored
Normal file
54
types/UIShell/GlobalHeader/Header.d.ts
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class Header {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
|
||||
/**
|
||||
* Set to `false` to hide the side nav by default
|
||||
* @default true
|
||||
*/
|
||||
expandedByDefault?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to open the side nav
|
||||
* @default false
|
||||
*/
|
||||
isSideNavOpen?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label for the header
|
||||
*/
|
||||
uiShellAriaLabel?: string;
|
||||
|
||||
/**
|
||||
* Specify the `href` attribute
|
||||
*/
|
||||
href?: string;
|
||||
|
||||
/**
|
||||
* Specify the company name
|
||||
*/
|
||||
company?: string;
|
||||
|
||||
/**
|
||||
* Specify the platform name
|
||||
* Alternatively, use the named slot "platform" (e.g. <span slot="platform">...</span>)
|
||||
* @default ""
|
||||
*/
|
||||
platformName?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the HTML anchor element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLAnchorElement;
|
||||
};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
["skip-to-content"]: {};
|
||||
platform: {};
|
||||
};
|
||||
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
38
types/UIShell/GlobalHeader/HeaderAction.d.ts
vendored
Normal file
38
types/UIShell/GlobalHeader/HeaderAction.d.ts
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderAction {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> & {
|
||||
/**
|
||||
* Set to `true` to open the panel
|
||||
* @default false
|
||||
*/
|
||||
isOpen?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the icon props
|
||||
*/
|
||||
icon?: { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean };
|
||||
|
||||
/**
|
||||
* Specify the text
|
||||
* Alternatively, use the named slot "text" (e.g. <div slot="text">...</div>)
|
||||
*/
|
||||
text?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the button HTML element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLButtonElement;
|
||||
};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
text: {};
|
||||
};
|
||||
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: "close", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: "undefined", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
31
types/UIShell/GlobalHeader/HeaderActionLink.d.ts
vendored
Normal file
31
types/UIShell/GlobalHeader/HeaderActionLink.d.ts
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderActionLink {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
|
||||
/**
|
||||
* Set to `true` to use the active state
|
||||
* @default false
|
||||
*/
|
||||
linkIsActive?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the `href` attribute
|
||||
*/
|
||||
href?: 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: string, cb: (event: Event) => void): () => void;
|
||||
}
|
18
types/UIShell/GlobalHeader/HeaderActionSearch.d.ts
vendored
Normal file
18
types/UIShell/GlobalHeader/HeaderActionSearch.d.ts
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderActionSearch {
|
||||
$$prop_def: {
|
||||
/**
|
||||
* Set to `true` to focus the search
|
||||
* @default false
|
||||
*/
|
||||
searchIsActive?: boolean;
|
||||
};
|
||||
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "focusInputSearch", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: "focusOutInputSearch", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: "inputSearch", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
16
types/UIShell/GlobalHeader/HeaderNav.d.ts
vendored
Normal file
16
types/UIShell/GlobalHeader/HeaderNav.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderNav {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["nav"]> & {
|
||||
/**
|
||||
* Specify the ARIA label for the nav
|
||||
*/
|
||||
ariaLabel?: string;
|
||||
};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
33
types/UIShell/GlobalHeader/HeaderNavItem.d.ts
vendored
Normal file
33
types/UIShell/GlobalHeader/HeaderNavItem.d.ts
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderNavItem {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
|
||||
/**
|
||||
* Specify the `href` attribute
|
||||
*/
|
||||
href?: string;
|
||||
|
||||
/**
|
||||
* Specify the 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: "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: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void;
|
||||
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
|
||||
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void;
|
||||
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
48
types/UIShell/GlobalHeader/HeaderNavMenu.d.ts
vendored
Normal file
48
types/UIShell/GlobalHeader/HeaderNavMenu.d.ts
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderNavMenu {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
|
||||
/**
|
||||
* Set to `true` to toggle the expanded state
|
||||
* @default false
|
||||
*/
|
||||
expanded?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the `href` attribute
|
||||
* @default "/"
|
||||
*/
|
||||
href?: string;
|
||||
|
||||
/**
|
||||
* Specify the text
|
||||
*/
|
||||
text?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the HTML anchor element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLAnchorElement;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label for the chevron icon
|
||||
* @default "Expand/Collapse"
|
||||
*/
|
||||
iconDescription?: string;
|
||||
};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
|
||||
$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: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void;
|
||||
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void;
|
||||
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
11
types/UIShell/GlobalHeader/HeaderPanelDivider.d.ts
vendored
Normal file
11
types/UIShell/GlobalHeader/HeaderPanelDivider.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderPanelDivider {
|
||||
$$prop_def: {};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
23
types/UIShell/GlobalHeader/HeaderPanelLink.d.ts
vendored
Normal file
23
types/UIShell/GlobalHeader/HeaderPanelLink.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderPanelLink {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> & {
|
||||
/**
|
||||
* Specify the `href` attribute
|
||||
*/
|
||||
href?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the HTML anchor element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLAnchorElement;
|
||||
};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
11
types/UIShell/GlobalHeader/HeaderPanelLinks.d.ts
vendored
Normal file
11
types/UIShell/GlobalHeader/HeaderPanelLinks.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderPanelLinks {
|
||||
$$prop_def: {};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
11
types/UIShell/GlobalHeader/HeaderUtilities.d.ts
vendored
Normal file
11
types/UIShell/GlobalHeader/HeaderUtilities.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export default class HeaderUtilities {
|
||||
$$prop_def: {};
|
||||
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue