mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(types): use the SvelteComponentTyped interface in the TypeScript definitions (#515)
This commit is contained in:
parent
4e4234f83d
commit
bcd28de86e
161 changed files with 6379 additions and 6362 deletions
28
types/ProgressIndicator/ProgressIndicator.d.ts
vendored
28
types/ProgressIndicator/ProgressIndicator.d.ts
vendored
|
@ -1,6 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface ProgressIndicatorProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> {
|
||||
export interface ProgressIndicatorProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> {
|
||||
/**
|
||||
* Specify the current step index
|
||||
* @default 0
|
||||
|
@ -26,16 +28,14 @@ export interface ProgressIndicatorProps extends svelte.JSX.HTMLAttributes<HTMLEl
|
|||
preventChangeOnClick?: boolean;
|
||||
}
|
||||
|
||||
export default class ProgressIndicator {
|
||||
$$prop_def: ProgressIndicatorProps;
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
||||
$on(eventname: "change", cb: (event: CustomEvent<number>) => 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: string, cb: (event: Event) => void): () => void;
|
||||
}
|
||||
export default class ProgressIndicator extends SvelteComponentTyped<
|
||||
ProgressIndicatorProps,
|
||||
{
|
||||
change: CustomEvent<number>;
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
},
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface ProgressIndicatorSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> {
|
||||
export interface ProgressIndicatorSkeletonProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> {
|
||||
/**
|
||||
* Set to `true` to use the vertical variant
|
||||
* @default false
|
||||
|
@ -14,13 +16,13 @@ export interface ProgressIndicatorSkeletonProps extends svelte.JSX.HTMLAttribute
|
|||
count?: number;
|
||||
}
|
||||
|
||||
export default class ProgressIndicatorSkeleton {
|
||||
$$prop_def: ProgressIndicatorSkeletonProps;
|
||||
$$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;
|
||||
}
|
||||
export default class ProgressIndicatorSkeleton extends SvelteComponentTyped<
|
||||
ProgressIndicatorSkeletonProps,
|
||||
{
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
28
types/ProgressIndicator/ProgressStep.d.ts
vendored
28
types/ProgressIndicator/ProgressStep.d.ts
vendored
|
@ -1,6 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface ProgressStepProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> {
|
||||
export interface ProgressStepProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> {
|
||||
/**
|
||||
* Set to `true` for the complete variant
|
||||
* @default false
|
||||
|
@ -50,16 +52,14 @@ export interface ProgressStepProps extends svelte.JSX.HTMLAttributes<HTMLElement
|
|||
id?: string;
|
||||
}
|
||||
|
||||
export default class ProgressStep {
|
||||
$$prop_def: ProgressStepProps;
|
||||
$$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;
|
||||
}
|
||||
export default class ProgressStep extends SvelteComponentTyped<
|
||||
ProgressStepProps,
|
||||
{
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
keydown: WindowEventMap["keydown"];
|
||||
},
|
||||
{ default: { props: { class: "bx--progress-label" } } }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue