fix(types): add missing $$restProps for Checkbox, Filename, FluidForm (#1655)

* fix(types): add missing `$$restProps` for `Checkbox`, `Filename`, `FluidForm`

* Run "yarn build:docs"

* test: assert `$$restProps` for `Checkbox`, `Form`
This commit is contained in:
metonym 2023-02-11 10:50:01 -08:00 committed by GitHub
commit 6450e8b0b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 8 deletions

View file

@ -924,7 +924,7 @@
{ "type": "forwarded", "name": "blur", "element": "input" } { "type": "forwarded", "name": "blur", "element": "input" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "InlineComponent", "name": "CheckboxSkeleton" } "rest_props": { "type": "Element", "name": "div" }
}, },
{ {
"moduleName": "CheckboxSkeleton", "moduleName": "CheckboxSkeleton",
@ -4399,7 +4399,7 @@
{ "type": "forwarded", "name": "keydown", "element": "button" } { "type": "forwarded", "name": "keydown", "element": "button" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "InlineComponent", "name": "Loading" } "rest_props": { "type": "Element", "name": "div | button | svg" }
}, },
{ {
"moduleName": "FluidForm", "moduleName": "FluidForm",
@ -4416,7 +4416,7 @@
{ "type": "forwarded", "name": "submit", "element": "Form" } { "type": "forwarded", "name": "submit", "element": "Form" }
], ],
"typedefs": [], "typedefs": [],
"rest_props": { "type": "InlineComponent", "name": "Form" } "rest_props": { "type": "Element", "name": "form" }
}, },
{ {
"moduleName": "Form", "moduleName": "Form",

View file

@ -1,5 +1,6 @@
<script> <script>
/** /**
* @restProps {div}
* @event {boolean} check * @event {boolean} check
*/ */

View file

@ -1,4 +1,8 @@
<script> <script>
/**
* @restProps {div | button | svg}
*/
/** /**
* Specify the file name status * Specify the file name status
* @type {"uploading" | "edit" | "complete"} * @type {"uploading" | "edit" | "complete"}

View file

@ -1,4 +1,8 @@
<script> <script>
/**
* @restProps {form}
*/
import { setContext } from "svelte"; import { setContext } from "svelte";
import Form from "../Form/Form.svelte"; import Form from "../Form/Form.svelte";

View file

@ -2,7 +2,7 @@
import { Checkbox } from "../types"; import { Checkbox } from "../types";
</script> </script>
<Checkbox labelText="Label text" /> <Checkbox labelText="Label text" style="margin: 1rem" />
<Checkbox labelText="Label text" checked /> <Checkbox labelText="Label text" checked />

View file

@ -2,7 +2,7 @@
import { FluidForm, TextInput, PasswordInput } from "../types"; import { FluidForm, TextInput, PasswordInput } from "../types";
</script> </script>
<FluidForm> <FluidForm action="" method="get">
<TextInput labelText="User name" placeholder="Enter user name..." required /> <TextInput labelText="User name" placeholder="Enter user name..." required />
<PasswordInput <PasswordInput
required required

View file

@ -1,7 +1,8 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
import type { SvelteComponentTyped } from "svelte"; import type { SvelteComponentTyped } from "svelte";
export interface CheckboxProps { export interface CheckboxProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/** /**
* Specify the value of the checkbox * Specify the value of the checkbox
* @default "" * @default ""

View file

@ -1,7 +1,10 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
import type { SvelteComponentTyped } from "svelte"; import type { SvelteComponentTyped } from "svelte";
export interface FilenameProps { export interface FilenameProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]>,
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]>,
svelte.JSX.SVGAttributes<SVGSVGElement> {
/** /**
* Specify the file name status * Specify the file name status
* @default "uploading" * @default "uploading"

View file

@ -1,7 +1,8 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
import type { SvelteComponentTyped } from "svelte"; import type { SvelteComponentTyped } from "svelte";
export interface FluidFormProps {} export interface FluidFormProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["form"]> {}
export default class FluidForm extends SvelteComponentTyped< export default class FluidForm extends SvelteComponentTyped<
FluidFormProps, FluidFormProps,