This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typing): adds more typescript definitions
- Loading branch information
1 parent
8a2bba9
commit e2c6e67
Showing
14 changed files
with
271 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class AppBar extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
height?: string; | ||
tile?: boolean; | ||
flat?: boolean; | ||
dense?: boolean; | ||
prominent?: boolean; | ||
fixed?: boolean; | ||
absolute?: boolean; | ||
collapsed?: boolean; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default AppBar; |
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,24 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class Button extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
fab?: boolean; | ||
icon?: boolean; | ||
block?: boolean; | ||
size?: 'x-small' | 'small' | 'default' | 'large' | 'x-large'; | ||
tile?: boolean; | ||
text?: boolean; | ||
depressed?: boolean; | ||
outlined?: boolean; | ||
rounded?: boolean; | ||
disabled?: boolean; | ||
active?: boolean; | ||
activeClass?: string; | ||
type?: 'button' | 'reset' | 'submit'; | ||
ripple?: any; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default Button; |
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,16 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class Icon extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
size?: string; | ||
rotate?: number; | ||
spin?: boolean; | ||
disabled?: boolean; | ||
path?: any; | ||
label?: any; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class Input extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
value?: any; | ||
color?: string; | ||
dense?: boolean; | ||
readonly?: boolean; | ||
disabled?: boolean; | ||
counter?: boolean; | ||
hint?: string; | ||
messages?: string[]; | ||
messagesCount?: number; | ||
error?: boolean; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default Input; |
9 changes: 9 additions & 0 deletions
9
packages/svelte-materialify/@types/components/MaterialApp.d.ts
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,9 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class MaterialApp extends SvelteComponent { | ||
$$prop_def: { | ||
theme?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default MaterialApp; |
23 changes: 23 additions & 0 deletions
23
packages/svelte-materialify/@types/components/NavigationDrawer.d.ts
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,23 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
import { TransitionConfig } from 'svelte/transition'; | ||
|
||
declare class MaterialApp extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
width?: string; | ||
active?: boolean; | ||
fixed?: boolean; | ||
absolute?: boolean; | ||
right?: boolean; | ||
mini?: boolean; | ||
clipped?: boolean; | ||
noBorder?: boolean; | ||
miniWidth?: string; | ||
clippedHeight?: string; | ||
transition?: (node: Element, options: Record<string, any>) => TransitionConfig; // Svelte transition??? | ||
transitionOpts?: Record<string, any>; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default MaterialApp; |
16 changes: 16 additions & 0 deletions
16
packages/svelte-materialify/@types/components/Overlay.d.ts
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,16 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class Overlay extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
active?: boolean; | ||
opacity?: number; | ||
color?: string; | ||
index?: number; | ||
absolute?: boolean; | ||
fadeOptions?: any; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default Overlay; |
50 changes: 50 additions & 0 deletions
50
packages/svelte-materialify/@types/components/TextField.d.ts
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,50 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class TextField extends SvelteComponent { | ||
$$prop_def: { | ||
// Value of the text input. | ||
value?: string; | ||
// The color of the input when active. | ||
color?: string; | ||
// Changes the variant of the input to filled. | ||
filled?: boolean; | ||
// Changes the variant of the input to solo. | ||
solo?: boolean; | ||
// Changes the variant of the input to outlined. | ||
outlined?: boolean; | ||
// Removes any shadow from the input. | ||
flat?: boolean; | ||
// Reduces the input height. | ||
dense?: boolean; | ||
// Adds a border radius to the input. | ||
rounded?: boolean; | ||
// Add input clear functionality. | ||
clearable?: boolean; | ||
// Puts input in readonly state. | ||
readonly?: boolean; | ||
// Disable the input. | ||
disabled?: boolean; | ||
// The input placeholder content. | ||
placeholder?: string; | ||
// Hint text. | ||
hint?: string; | ||
/** | ||
* Creates counter for input length. | ||
* @type {number} | ||
*/ | ||
counter?: number; | ||
/** | ||
* An array of functions which take input value as arguement and return error message. | ||
* @type {Array} | ||
*/ | ||
rules: ((value) => string | false)[]; | ||
// Delays validation till blur. | ||
validateOnBlur: boolean; | ||
// Error state of the input. | ||
error: boolean; | ||
// Id of the text input. | ||
id?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default TextField; |
18 changes: 18 additions & 0 deletions
18
packages/svelte-materialify/@types/components/card/card.d.ts
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,18 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class Card extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
flat?: boolean; | ||
tile?: boolean; | ||
outlined?: boolean; | ||
raised?: boolean; | ||
shaped?: boolean; | ||
hover?: boolean; | ||
link?: boolean; | ||
disabled?: boolean; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default Card; |
16 changes: 16 additions & 0 deletions
16
packages/svelte-materialify/@types/components/list/List.d.ts
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,16 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class List extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
dense?: boolean; | ||
disabled?: boolean; | ||
flat?: boolean; | ||
rounded?: boolean; | ||
nav?: boolean; | ||
outlined?: boolean; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default List; |
18 changes: 18 additions & 0 deletions
18
packages/svelte-materialify/@types/components/list/ListGroup.d.ts
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,18 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
import { TransitionConfig } from 'svelte/transition'; | ||
|
||
declare class ListGroup extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
active?: boolean; | ||
eager?: boolean; | ||
transition?: (node: Element, options: Record<string, any>) => TransitionConfig; // Svelte transition??? | ||
transitionOpts?: Record<string, any>; | ||
offset?: boolean; | ||
disabled?: boolean; | ||
ripple?: any; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default ListGroup; |
16 changes: 16 additions & 0 deletions
16
packages/svelte-materialify/@types/components/list/ListItem.d.ts
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,16 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class ListItem extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
activeClass?: string; | ||
active?: boolean; | ||
value?: any; | ||
dense?: boolean; | ||
disabled?: boolean; | ||
selectable?: boolean; | ||
ripple?: any; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default ListItem; |
14 changes: 14 additions & 0 deletions
14
packages/svelte-materialify/@types/components/list/ListItemGroup.d.ts
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,14 @@ | ||
import { SvelteComponent } from 'svelte'; | ||
|
||
declare class ListItemGroup extends SvelteComponent { | ||
$$prop_def: { | ||
class?: string; | ||
value?: any; | ||
multiple?: boolean; | ||
mandatory?: boolean; | ||
max?: number; | ||
style?: string; | ||
} & Record<string, any>; | ||
} | ||
|
||
export default ListItemGroup; |
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