This repository was archived by the owner on Sep 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +17
-15
lines changed
packages/svelte-materialify/@types Expand file tree Collapse file tree 5 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 1
1
import { SvelteComponent } from './shared' ;
2
2
3
- export interface CheckboxProps < T extends string | number | string [ ] = string [ ] > {
3
+ export interface CheckboxProps {
4
4
/** Classes to add to checkbox wrapper. */
5
5
class ?: string ;
6
6
/** Color class of the checkbox when checked or indeterminate. */
@@ -12,9 +12,9 @@ export interface CheckboxProps<T extends string | number | string[] = string[]>
12
12
/** Whether checkbox is disabled. */
13
13
disabled ?: boolean ;
14
14
/** Value of the checkbox. */
15
- value ?: T ;
15
+ value ?: string | number | string [ ] ;
16
16
/** Bind checkbox to a group. */
17
- group ?: T ;
17
+ group ?: number [ ] | string [ ] ;
18
18
/** Id of the checkbox. Defaults to a random uid. */
19
19
id ?: string ;
20
20
/** Styles to add to checkbox wrapper. */
Original file line number Diff line number Diff line change 1
1
import { SvelteComponent } from './shared' ;
2
2
3
- export interface RadioProps < T extends string | number | string [ ] = string [ ] > {
3
+ export interface RadioProps {
4
4
/** Classes to add to radio wrapper. */
5
5
class ?: string ;
6
6
/** Color of the radio when active. */
7
7
color ?: string ;
8
8
/** Disables the radio. */
9
9
disabled ?: boolean ;
10
10
/** Bind radio to a group. */
11
- group ?: T ;
11
+ group ?: string | number | string [ ] ;
12
12
/** Value of the radio. */
13
- value ?: T ;
13
+ value ?: string | number | string [ ] ;
14
14
/** Id of the radio. */
15
15
id ?: string ;
16
16
/** Styles to add to radio wrapper. */
Original file line number Diff line number Diff line change 1
1
import { SvelteComponent } from './shared' ;
2
2
3
- interface SelectProps < T extends number [ ] | string [ ] = string [ ] > {
3
+ interface SelectProps {
4
4
/** Classes to add to select wrapper. */
5
5
class ?: string ;
6
6
/** Whether select is opened. */
7
- active ?: string ;
7
+ active ?: boolean ;
8
8
/** Value of the select. */
9
- value ?: T ;
9
+ value ?: number [ ] | string [ ] ;
10
10
/** List of items to select from. */
11
11
items ?: { name : string | number , value : string | number } [ ] ;
12
12
/** Whether select is the `filled` material design variant. */
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ interface TextFieldProps {
34
34
/** Error messages to display. */
35
35
messages ?: string [ ] ;
36
36
/**
37
- * A list of validator functions that take the textarea value and return an error
37
+ * A list of validator functions that take the text field value and return an error
38
38
* message, or `true` otherwise.
39
39
*/
40
40
rules ?: ( ( value : string ) => string | true ) [ ] ;
@@ -44,11 +44,13 @@ interface TextFieldProps {
44
44
validateOnBlur ?: boolean ;
45
45
/** Whether text field has error. */
46
46
error ?: boolean ;
47
+ /** Whether text field has `success` class. */
48
+ success ?: boolean ;
47
49
/** Id of the text field. Defaults to a random uid. */
48
50
id ?: string ;
49
- /** Styles to add to textarea wrapper. */
51
+ /** Styles to add to text field wrapper. */
50
52
style ?: string ;
51
- /** Reference to textarea element in the DOM. */
53
+ /** Reference to text field element in the DOM. */
52
54
inputElement ?: Element ;
53
55
}
54
56
Original file line number Diff line number Diff line change 1
1
import { SvelteComponent } from './shared' ;
2
2
3
- interface TextareaProps < T extends string | number | string [ ] = string [ ] > {
3
+ interface TextareaProps {
4
4
/** Value of the textarea. */
5
- value ?: T ;
5
+ value ?: string | number | string [ ] ;
6
6
/** Color class of the textarea when active. */
7
7
color ?: string ;
8
8
/** Whether textarea is the `filled` material design variant. */
@@ -37,7 +37,7 @@ interface TextareaProps<T extends string | number | string[] = string[]> {
37
37
* A list of validator functions that take the textarea value and return an error
38
38
* message, or `true` otherwise.
39
39
*/
40
- rules ?: ( ( value : T ) => string | true ) [ ] ;
40
+ rules ?: ( ( value : string | number | string [ ] ) => string | true ) [ ] ;
41
41
/** Number of error messages to display. Defaults to one. */
42
42
errorCount ?: number ;
43
43
/** Error messages to display. */
You can’t perform that action at this time.
0 commit comments