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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,10 @@
/// <reference types="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
* @default "uploading"

View file

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