fix types for FileUploader component (#422)

* fix types for FileUploader component

* correction of a mistaken change

Co-authored-by: Daniel Miedzik <dmiedzik@bethel.jw.org>
This commit is contained in:
Daniel Miedzik 2020-11-27 13:15:01 +01:00 committed by GitHub
commit c670964e93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 248 additions and 284 deletions

File diff suppressed because it is too large Load diff

View file

@ -1205,12 +1205,12 @@
], ],
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }], "slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
"events": [ "events": [
{ "type": "forwarded", "name": "blur", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" }, { "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }, { "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "keydown", "element": "div" }, { "type": "forwarded", "name": "keydown", "element": "div" }
{ "type": "forwarded", "name": "blur", "element": "div" }
], ],
"typedefs": [ "typedefs": [
{ {
@ -2896,10 +2896,10 @@
"name": "mouseleave", "name": "mouseleave",
"element": "SearchSkeleton" "element": "SearchSkeleton"
}, },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" }, { "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "dispatched", "name": "clear" } { "type": "dispatched", "name": "clear" }
], ],
"typedefs": [], "typedefs": [],
@ -3998,7 +3998,7 @@
"name": "accept", "name": "accept",
"kind": "let", "kind": "let",
"description": "Specify the accepted file types", "description": "Specify the accepted file types",
"type": "Files", "type": "string[]",
"value": "[]", "value": "[]",
"isFunction": false, "isFunction": false,
"constant": false, "constant": false,
@ -4111,9 +4111,7 @@
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "click", "element": "input" } { "type": "forwarded", "name": "click", "element": "input" }
], ],
"typedefs": [ "typedefs": [],
{ "type": "string[]", "name": "Files", "ts": "type Files = string[]" }
],
"rest_props": { "type": "Element", "name": "input" } "rest_props": { "type": "Element", "name": "input" }
}, },
{ {
@ -4134,7 +4132,7 @@
"name": "accept", "name": "accept",
"kind": "let", "kind": "let",
"description": "Specify the accepted file types", "description": "Specify the accepted file types",
"type": "Files", "type": "string[]",
"value": "[]", "value": "[]",
"isFunction": false, "isFunction": false,
"constant": false, "constant": false,
@ -4144,7 +4142,7 @@
"name": "files", "name": "files",
"kind": "let", "kind": "let",
"description": "Obtain the uploaded file names", "description": "Obtain the uploaded file names",
"type": "Files", "type": "FileList",
"value": "[]", "value": "[]",
"isFunction": false, "isFunction": false,
"constant": false, "constant": false,
@ -4233,8 +4231,8 @@
], ],
"slots": [], "slots": [],
"events": [ "events": [
{ "type": "dispatched", "name": "add", "detail": "Files" }, { "type": "dispatched", "name": "add", "detail": "FileList" },
{ "type": "dispatched", "name": "remove", "detail": "Files" }, { "type": "dispatched", "name": "remove", "detail": "FileList" },
{ "type": "forwarded", "name": "click", "element": "div" }, { "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
@ -4246,9 +4244,7 @@
}, },
{ "type": "forwarded", "name": "keydown", "element": "Filename" } { "type": "forwarded", "name": "keydown", "element": "Filename" }
], ],
"typedefs": [ "typedefs": [],
{ "type": "string[]", "name": "Files", "ts": "type Files = string[]" }
],
"rest_props": { "type": "Element", "name": "div" } "rest_props": { "type": "Element", "name": "div" }
}, },
{ {
@ -4344,7 +4340,7 @@
"name": "accept", "name": "accept",
"kind": "let", "kind": "let",
"description": "Specify the accepted file types", "description": "Specify the accepted file types",
"type": "Files", "type": "string[]",
"value": "[]", "value": "[]",
"isFunction": false, "isFunction": false,
"constant": false, "constant": false,
@ -4364,7 +4360,7 @@
"name": "validateFiles", "name": "validateFiles",
"kind": "let", "kind": "let",
"description": "Override the default behavior of validating uploaded files\nThe default behavior does not validate files", "description": "Override the default behavior of validating uploaded files\nThe default behavior does not validate files",
"type": "(files: Files) => Files", "type": "(files: FileList) => FileList",
"value": "(files) => files", "value": "(files) => files",
"isFunction": true, "isFunction": true,
"constant": false, "constant": false,
@ -4443,7 +4439,7 @@
], ],
"slots": [], "slots": [],
"events": [ "events": [
{ "type": "dispatched", "name": "add", "detail": "Files" }, { "type": "dispatched", "name": "add", "detail": "FileList" },
{ "type": "forwarded", "name": "dragover", "element": "div" }, { "type": "forwarded", "name": "dragover", "element": "div" },
{ "type": "forwarded", "name": "dragleave", "element": "div" }, { "type": "forwarded", "name": "dragleave", "element": "div" },
{ "type": "forwarded", "name": "drop", "element": "div" }, { "type": "forwarded", "name": "drop", "element": "div" },
@ -4451,9 +4447,7 @@
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "click", "element": "input" } { "type": "forwarded", "name": "click", "element": "input" }
], ],
"typedefs": [ "typedefs": [],
{ "type": "string[]", "name": "Files", "ts": "type Files = string[]" }
],
"rest_props": { "type": "Element", "name": "div" } "rest_props": { "type": "Element", "name": "div" }
}, },
{ {
@ -5517,11 +5511,11 @@
} }
], ],
"events": [ "events": [
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "keydown", "element": "div" }, { "type": "forwarded", "name": "keydown", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" }, { "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "dispatched", "name": "submit" }, { "type": "dispatched", "name": "submit" },
{ "type": "dispatched", "name": "click:button--secondary" }, { "type": "dispatched", "name": "click:button--secondary" },
{ "type": "dispatched", "name": "close" }, { "type": "dispatched", "name": "close" },
@ -7887,10 +7881,10 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }, { "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "textarea" },
{ "type": "forwarded", "name": "change", "element": "textarea" }, { "type": "forwarded", "name": "change", "element": "textarea" },
{ "type": "forwarded", "name": "input", "element": "textarea" }, { "type": "forwarded", "name": "input", "element": "textarea" },
{ "type": "forwarded", "name": "focus", "element": "textarea" }, { "type": "forwarded", "name": "focus", "element": "textarea" }
{ "type": "forwarded", "name": "blur", "element": "textarea" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "textarea" } "rest_props": { "type": "Element", "name": "textarea" }
@ -8109,11 +8103,11 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }, { "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" }, { "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "keydown", "element": "input" }, { "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" }
{ "type": "forwarded", "name": "blur", "element": "input" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "div" } "rest_props": { "type": "Element", "name": "div" }
@ -8330,11 +8324,11 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }, { "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" }, { "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "keydown", "element": "input" }, { "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" }
{ "type": "forwarded", "name": "blur", "element": "input" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "div" } "rest_props": { "type": "Element", "name": "div" }
@ -8509,11 +8503,11 @@
{ "name": "below", "default": false, "slot_props": "{}" } { "name": "below", "default": false, "slot_props": "{}" }
], ],
"events": [ "events": [
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" }, { "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "keypress", "element": "div" }, { "type": "forwarded", "name": "keypress", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" }
{ "type": "forwarded", "name": "mouseleave", "element": "div" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "div" } "rest_props": { "type": "Element", "name": "div" }
@ -8909,10 +8903,10 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }, { "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" }, { "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" }
{ "type": "forwarded", "name": "blur", "element": "input" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "div" } "rest_props": { "type": "Element", "name": "div" }
@ -9100,8 +9094,8 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" }, { "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }, { "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "keyup", "element": "input" }, { "type": "forwarded", "name": "keyup", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" } { "type": "forwarded", "name": "blur", "element": "input" }
], ],
@ -9870,13 +9864,13 @@
"slots": [], "slots": [],
"events": [ "events": [
{ "type": "forwarded", "name": "click", "element": "a" }, { "type": "forwarded", "name": "click", "element": "a" },
{ "type": "forwarded", "name": "blur", "element": "a" },
{ "type": "forwarded", "name": "mouseover", "element": "a" }, { "type": "forwarded", "name": "mouseover", "element": "a" },
{ "type": "forwarded", "name": "mouseenter", "element": "a" }, { "type": "forwarded", "name": "mouseenter", "element": "a" },
{ "type": "forwarded", "name": "mouseleave", "element": "a" }, { "type": "forwarded", "name": "mouseleave", "element": "a" },
{ "type": "forwarded", "name": "keyup", "element": "a" }, { "type": "forwarded", "name": "keyup", "element": "a" },
{ "type": "forwarded", "name": "keydown", "element": "a" }, { "type": "forwarded", "name": "keydown", "element": "a" },
{ "type": "forwarded", "name": "focus", "element": "a" }, { "type": "forwarded", "name": "focus", "element": "a" }
{ "type": "forwarded", "name": "blur", "element": "a" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "a" } "rest_props": { "type": "Element", "name": "a" }
@ -9937,14 +9931,14 @@
], ],
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }], "slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
"events": [ "events": [
{ "type": "forwarded", "name": "blur", "element": "a" },
{ "type": "forwarded", "name": "keydown", "element": "a" }, { "type": "forwarded", "name": "keydown", "element": "a" },
{ "type": "forwarded", "name": "click", "element": "a" }, { "type": "forwarded", "name": "click", "element": "a" },
{ "type": "forwarded", "name": "mouseover", "element": "a" }, { "type": "forwarded", "name": "mouseover", "element": "a" },
{ "type": "forwarded", "name": "mouseenter", "element": "a" }, { "type": "forwarded", "name": "mouseenter", "element": "a" },
{ "type": "forwarded", "name": "mouseleave", "element": "a" }, { "type": "forwarded", "name": "mouseleave", "element": "a" },
{ "type": "forwarded", "name": "keyup", "element": "a" }, { "type": "forwarded", "name": "keyup", "element": "a" },
{ "type": "forwarded", "name": "focus", "element": "a" }, { "type": "forwarded", "name": "focus", "element": "a" }
{ "type": "forwarded", "name": "blur", "element": "a" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "Element", "name": "a" } "rest_props": { "type": "Element", "name": "a" }
@ -10376,11 +10370,11 @@
"name": "select", "name": "select",
"detail": "{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }" "detail": "{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }"
}, },
{ "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" }, { "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" }, { "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" }, { "type": "forwarded", "name": "blur", "element": "input" }
{ "type": "forwarded", "name": "keydown", "element": "input" }
], ],
"typedefs": [ "typedefs": [
{ {

View file

@ -1,8 +1,7 @@
<script> <script>
/** /**
* @typedef {string[]} Files * @event {FileList} add
* @event {Files} add * @event {FileList} remove
* @event {Files} remove
*/ */
/** /**
@ -13,13 +12,13 @@
/** /**
* Specify the accepted file types * Specify the accepted file types
* @type {Files} * @type {string[]}
*/ */
export let accept = []; export let accept = [];
/** /**
* Obtain the uploaded file names * Obtain the uploaded file names
* @type {Files} * @type {FileList}
*/ */
export let files = []; export let files = [];

View file

@ -1,11 +1,7 @@
<script> <script>
/**
* @typedef {string[]} Files
*/
/** /**
* Specify the accepted file types * Specify the accepted file types
* @type {Files} * @type {string[]}
*/ */
export let accept = []; export let accept = [];

View file

@ -1,12 +1,11 @@
<script> <script>
/** /**
* @typedef {string[]} Files * @event {FileList} add
* @event {Files} add
*/ */
/** /**
* Specify the accepted file types * Specify the accepted file types
* @type {Files} * @type {string[]}
*/ */
export let accept = []; export let accept = [];
@ -16,7 +15,7 @@
/** /**
* Override the default behavior of validating uploaded files * Override the default behavior of validating uploaded files
* The default behavior does not validate files * The default behavior does not validate files
* @type {(files: Files) => Files} * @type {(files: FileList) => FileList}
*/ */
export let validateFiles = (files) => files; export let validateFiles = (files) => files;

View file

@ -1,7 +1,5 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export type Files = string[];
export interface FileUploaderProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> { export interface FileUploaderProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/** /**
* Specify the file uploader status * Specify the file uploader status
@ -13,13 +11,13 @@ export interface FileUploaderProps extends svelte.JSX.HTMLAttributes<HTMLElement
* Specify the accepted file types * Specify the accepted file types
* @default [] * @default []
*/ */
accept?: Files; accept?: string[];
/** /**
* Obtain the uploaded file names * Obtain the uploaded file names
* @default [] * @default []
*/ */
files?: Files; files?: FileList;
/** /**
* Set to `true` to allow multiple files * Set to `true` to allow multiple files
@ -75,8 +73,8 @@ export default class FileUploader {
$$prop_def: FileUploaderProps; $$prop_def: FileUploaderProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "add", cb: (event: CustomEvent<Files>) => void): () => void; $on(eventname: "add", cb: (event: CustomEvent<FileList>) => void): () => void;
$on(eventname: "remove", cb: (event: CustomEvent<Files>) => void): () => void; $on(eventname: "remove", cb: (event: CustomEvent<FileList>) => void): () => void;
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;

View file

@ -1,13 +1,11 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export type Files = string[];
export interface FileUploaderButtonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["input"]> { export interface FileUploaderButtonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["input"]> {
/** /**
* Specify the accepted file types * Specify the accepted file types
* @default [] * @default []
*/ */
accept?: Files; accept?: string[];
/** /**
* Set to `true` to allow multiple files * Set to `true` to allow multiple files

View file

@ -1,13 +1,11 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export type Files = string[];
export interface FileUploaderDropContainerProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> { export interface FileUploaderDropContainerProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/** /**
* Specify the accepted file types * Specify the accepted file types
* @default [] * @default []
*/ */
accept?: Files; accept?: string[];
/** /**
* Set to `true` to allow multiple files * Set to `true` to allow multiple files
@ -20,7 +18,7 @@ export interface FileUploaderDropContainerProps extends svelte.JSX.HTMLAttribute
* The default behavior does not validate files * The default behavior does not validate files
* @default (files) => files * @default (files) => files
*/ */
validateFiles?: (files: Files) => Files; validateFiles?: (files: FileList) => FileList;
/** /**
* Specify the label text * Specify the label text
@ -69,7 +67,7 @@ export default class FileUploaderDropContainer {
$$prop_def: FileUploaderDropContainerProps; $$prop_def: FileUploaderDropContainerProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "add", cb: (event: CustomEvent<Files>) => void): () => void; $on(eventname: "add", cb: (event: CustomEvent<FileList>) => void): () => void;
$on(eventname: "dragover", cb: (event: WindowEventMap["dragover"]) => void): () => void; $on(eventname: "dragover", cb: (event: WindowEventMap["dragover"]) => void): () => void;
$on(eventname: "dragleave", cb: (event: WindowEventMap["dragleave"]) => void): () => void; $on(eventname: "dragleave", cb: (event: WindowEventMap["dragleave"]) => void): () => void;
$on(eventname: "drop", cb: (event: WindowEventMap["drop"]) => void): () => void; $on(eventname: "drop", cb: (event: WindowEventMap["drop"]) => void): () => void;

View file

@ -53,11 +53,11 @@ export default class ListBoxField {
default: {}; default: {};
}; };
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void; $on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -120,11 +120,11 @@ export default class Modal {
label: {}; label: {};
}; };
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void; $on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "submit", cb: (event: CustomEvent<any>) => void): () => void; $on(eventname: "submit", cb: (event: CustomEvent<any>) => void): () => void;
$on(eventname: "click:button--secondary", cb: (event: CustomEvent<any>) => void): () => void; $on(eventname: "click:button--secondary", cb: (event: CustomEvent<any>) => void): () => void;
$on(eventname: "close", cb: (event: CustomEvent<any>) => void): () => void; $on(eventname: "close", cb: (event: CustomEvent<any>) => void): () => void;

View file

@ -93,10 +93,10 @@ export default class Search {
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void; $on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void; $on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void; $on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "clear", cb: (event: CustomEvent<any>) => void): () => void; $on(eventname: "clear", cb: (event: CustomEvent<any>) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -93,9 +93,9 @@ export default class TextArea {
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void; $on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void; $on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -114,10 +114,10 @@ export default class PasswordInput {
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void; $on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void; $on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void; $on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -116,10 +116,10 @@ export default class TextInput {
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void; $on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void; $on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void; $on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -63,10 +63,10 @@ export default class ExpandableTile {
below: {}; below: {};
}; };
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "keypress", cb: (event: WindowEventMap["keypress"]) => void): () => void; $on(eventname: "keypress", cb: (event: WindowEventMap["keypress"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -100,9 +100,9 @@ export default class TimePicker {
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void; $on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void; $on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -57,8 +57,8 @@ export default class Toggle {
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void; $on(eventname: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void; $on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void; $on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void; $on(eventname: string, cb: (event: Event) => void): () => void;

View file

@ -23,12 +23,12 @@ export default class HeaderNavItem {
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void; $on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void; $on(eventname: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void; $on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -37,6 +37,7 @@ export default class HeaderNavMenu {
default: {}; default: {};
}; };
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void; $on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void; $on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
@ -44,6 +45,5 @@ export default class HeaderNavMenu {
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void; $on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
$on(eventname: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void; $on(eventname: "keyup", cb: (event: WindowEventMap["keyup"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => 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; $on(eventname: string, cb: (event: Event) => void): () => void;
} }

View file

@ -51,10 +51,10 @@ export default class HeaderSearch {
eventname: "select", eventname: "select",
cb: (event: CustomEvent<{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }>) => void cb: (event: CustomEvent<{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }>) => void
): () => void; ): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void; $on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void; $on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void; $on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void; $on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void; $on(eventname: string, cb: (event: Event) => void): () => void;
} }