-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add prop types for HTML props for components
- Loading branch information
Showing
262 changed files
with
2,477 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
import type Component from './Banner.svelte'; | ||
|
||
export declare class BannerComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
{ | ||
[k in keyof Partial< | ||
svelte.JSX.HTMLAttributes<HTMLDivElement> | ||
> as `textWrapper\$${k}`]?: Partial< | ||
svelte.JSX.HTMLAttributes<HTMLDivElement> | ||
>[k]; | ||
} & | ||
{ | ||
[k in keyof Partial< | ||
svelte.JSX.HTMLAttributes<HTMLDivElement> | ||
> as `graphic\$${k}`]?: Partial< | ||
svelte.JSX.HTMLAttributes<HTMLDivElement> | ||
>[k]; | ||
} & | ||
Component['$$prop_def']; | ||
} | ||
|
||
export { CloseReason } from '@material/banner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import Banner from './Banner.svelte'; | ||
import type { BannerComponentDev } from './Banner.types'; | ||
export * from './Banner.types'; | ||
|
||
import { Label, Icon } from '@smui/common'; | ||
|
||
export default Banner; | ||
export default Banner as typeof BannerComponentDev; | ||
|
||
export { Label, Icon }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { SMUIComponent } from '@smui/common'; | ||
import type Component from './Button.svelte'; | ||
import type { ButtonComponentDev as ButtonElementComponentDev } from '@smui/common/elements'; | ||
|
||
export declare class ButtonComponentDev< | ||
C extends SMUIComponent = ButtonElementComponentDev | ||
> extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<ReturnType<C['getElement']>>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './Group.svelte'; | ||
|
||
export declare class GroupComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare namespace svelte.JSX { | ||
interface HTMLAttributes<T> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import Button from './Button.svelte'; | ||
import type { ButtonComponentDev } from './Button.types'; | ||
export * from './Button.types'; | ||
|
||
import Group from './Group.svelte'; | ||
export * from './GroupItem'; | ||
import GroupComponent from './Group.svelte'; | ||
import type { GroupComponentDev } from './Group.types'; | ||
export * from './Group.types'; | ||
const Group = GroupComponent as typeof GroupComponentDev; | ||
import GroupItem from './GroupItem'; | ||
import { Label, Icon } from '@smui/common'; | ||
|
||
export default Button; | ||
export default Button as typeof ButtonComponentDev; | ||
|
||
export { Group, GroupItem, Label, Icon }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import type { SMUIComponent } from '@smui/common'; | ||
import { classAdderBuilder } from '@smui/common/internal'; | ||
import Div from '@smui/common/Div.svelte'; | ||
import { Div } from '@smui/common/elements'; | ||
|
||
export default classAdderBuilder({ | ||
class: 'mdc-card__action-buttons', | ||
component: Div as typeof SMUIComponent, | ||
component: Div, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import type { SMUIComponent } from '@smui/common'; | ||
import { classAdderBuilder } from '@smui/common/internal'; | ||
import Div from '@smui/common/Div.svelte'; | ||
import { Div } from '@smui/common/elements'; | ||
|
||
export default classAdderBuilder({ | ||
class: 'mdc-card__action-icons', | ||
component: Div as typeof SMUIComponent, | ||
component: Div, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './Actions.svelte'; | ||
|
||
export declare class ActionsComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './Card.svelte'; | ||
|
||
export declare class CardComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import type { SMUIComponent } from '@smui/common'; | ||
import { classAdderBuilder } from '@smui/common/internal'; | ||
import Div from '@smui/common/Div.svelte'; | ||
import { Div } from '@smui/common/elements'; | ||
|
||
export default classAdderBuilder({ | ||
class: 'smui-card__content', | ||
component: Div as typeof SMUIComponent, | ||
component: Div, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './Media.svelte'; | ||
|
||
export declare class MediaComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import type { SMUIComponent } from '@smui/common'; | ||
import { classAdderBuilder } from '@smui/common/internal'; | ||
import Div from '@smui/common/Div.svelte'; | ||
import { Div } from '@smui/common/elements'; | ||
|
||
export default classAdderBuilder({ | ||
class: 'mdc-card__media-content', | ||
component: Div as typeof SMUIComponent, | ||
component: Div, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './PrimaryAction.svelte'; | ||
|
||
export declare class PrimaryActionComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare namespace svelte.JSX { | ||
interface HTMLAttributes<T> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type Component from './Checkbox.svelte'; | ||
|
||
export declare class CheckboxComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLDivElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
{ | ||
[k in keyof Partial< | ||
svelte.JSX.HTMLAttributes<HTMLInputElement> | ||
> as `input\$${k}`]?: Partial< | ||
svelte.JSX.HTMLAttributes<HTMLInputElement> | ||
>[k]; | ||
} & { | ||
input$type?: never; | ||
input$disabled?: never; | ||
input$value?: never; | ||
input$checked?: never; | ||
input$group?: never; | ||
} & Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare namespace svelte.JSX { | ||
interface HTMLAttributes<T> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import Checkbox from './Checkbox.svelte'; | ||
import type { CheckboxComponentDev } from './Checkbox.types'; | ||
export * from './Checkbox.types'; | ||
|
||
export default Checkbox; | ||
export default Checkbox as typeof CheckboxComponentDev; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './Checkmark.svelte'; | ||
|
||
export declare class CheckmarkComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLSpanElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type Component from './LeadingIcon.svelte'; | ||
|
||
export declare class LeadingIconComponentDev extends Component { | ||
/** | ||
* @private | ||
* For type checking capabilities only. | ||
* Does not exist at runtime. | ||
* ### DO NOT USE! | ||
*/ | ||
$$prop_def: Omit< | ||
Partial<svelte.JSX.HTMLAttributes<HTMLElement>>, | ||
keyof Component['$$prop_def'] | ||
> & | ||
Component['$$prop_def']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.