Skip to content

Commit 9856ca0

Browse files
committed
Update libs with new external .d.ts files
1 parent 235d914 commit 9856ca0

File tree

38 files changed

+2331
-51
lines changed

38 files changed

+2331
-51
lines changed

lib/app_bar/index.d.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import * as React from 'react';
2+
export interface Props {
3+
/**
4+
* Sets a CSS class on the component.
5+
*/
6+
className?: string,
7+
id?: string;
8+
/**
9+
* A key used to uniquely identify the element within an Array
10+
*/
11+
key?: string,
12+
/**
13+
* Inline style
14+
*/
15+
style?: any,
16+
/**
17+
* Tooltip text
18+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
19+
* @see http://react-toolbox.com/#/components/tooltip
20+
*/
21+
tooltip?: string,
22+
/**
23+
* Amount of time in miliseconds spent before the tooltip is visible.
24+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
25+
* @see http://react-toolbox.com/#/components/tooltip
26+
*/
27+
tooltipDelay?: number,
28+
/**
29+
* If true, the Tooltip hides after a click in the host component.
30+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
31+
* @default true
32+
* @see http://react-toolbox.com/#/components/tooltip
33+
*/
34+
tooltipHideOnClick?: boolean,
35+
}
36+
37+
export interface AppBarProps extends Props {
38+
/**
39+
* If true, the AppBar shows a shadow.
40+
* @default false
41+
*/
42+
flat?: boolean,
43+
/**
44+
* Determine if the bar should have position fixed (true) or relative (false)
45+
* @default false
46+
*/
47+
fixed?: boolean,
48+
}
49+
/**
50+
* The app bar is a special kind of toolbar that’s used for branding, navigation, search, and actions.
51+
* Usually it contains controls on the right and left side and a title with the current section or app name.
52+
* You should give the content with children elements.
53+
*/
54+
export default class AppBar extends React.Component<AppBarProps, {}> {
55+
render(): React.DOMElement<any, any>;
56+
}

lib/autocomplete/index.d.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import * as React from 'react';
2+
export interface Props {
3+
/**
4+
* Sets a CSS class on the component.
5+
*/
6+
className?: string,
7+
id?: string;
8+
/**
9+
* A key used to uniquely identify the element within an Array
10+
*/
11+
key?: string,
12+
/**
13+
* Inline style
14+
*/
15+
style?: any,
16+
/**
17+
* Tooltip text
18+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
19+
* @see http://react-toolbox.com/#/components/tooltip
20+
*/
21+
tooltip?: string,
22+
/**
23+
* Amount of time in miliseconds spent before the tooltip is visible.
24+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
25+
* @see http://react-toolbox.com/#/components/tooltip
26+
*/
27+
tooltipDelay?: number,
28+
/**
29+
* If true, the Tooltip hides after a click in the host component.
30+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
31+
* @default true
32+
* @see http://react-toolbox.com/#/components/tooltip
33+
*/
34+
tooltipHideOnClick?: boolean,
35+
}
36+
export interface Conditional {
37+
/**
38+
* If true, component will be disabled
39+
* @default false
40+
*/
41+
disabled?: boolean
42+
}
43+
44+
/**
45+
* Properties of components that have values that can be changed (T is the type of the value)
46+
*/
47+
export interface Changeable<T> {
48+
/**
49+
* Callback called when the picker value is changed.
50+
* @param v Type of the value
51+
*/
52+
onChange?: (v: T) => void
53+
}
54+
55+
export interface AutocompleteProps extends Props, Conditional, Changeable<string | Array<any>> {
56+
/**
57+
* Sets the error string for the internal input element.
58+
*/
59+
error?: string,
60+
/**
61+
* The text string to use for the floating label element.
62+
*/
63+
label?: string,
64+
/**
65+
* If true, component can hold multiple values.
66+
* @default true
67+
*/
68+
multiple?: boolean,
69+
/**
70+
* Object of key/values or array representing all items suggested.
71+
*/
72+
source: Object | Array<any>,
73+
/**
74+
* If true, the list of suggestions will not be filtered when a value is selected, until the query is modified.
75+
* @default false
76+
*/
77+
showSuggestionsWhenValueIsSet?: boolean,
78+
/**
79+
* Type of the input element. It can be a valid HTML5 input type
80+
* @default text
81+
*/
82+
type?: string,
83+
/**
84+
* Value or array of values currently selected component.Current value of the input element.
85+
*/
86+
value?: string | Array<any>,
87+
}
88+
/**
89+
* An input field with a set of predeterminated labeled values. When it's focused it shows a list of hints that are filtered by label as the user types.
90+
* They can be simple or multiple depending on the amount of values that can be selected.
91+
* The opening direction is determined at opening time depending on the current position.
92+
*/
93+
export default class Autocomplete extends React.Component<AutocompleteProps, {}> {
94+
render(): React.DOMElement<any, any>;
95+
}

lib/avatar/index.d.ts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import * as React from 'react';
2+
export interface Props {
3+
/**
4+
* Sets a CSS class on the component.
5+
*/
6+
className?: string,
7+
id?: string;
8+
/**
9+
* A key used to uniquely identify the element within an Array
10+
*/
11+
key?: string,
12+
/**
13+
* Inline style
14+
*/
15+
style?: any,
16+
/**
17+
* Tooltip text
18+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
19+
* @see http://react-toolbox.com/#/components/tooltip
20+
*/
21+
tooltip?: string,
22+
/**
23+
* Amount of time in miliseconds spent before the tooltip is visible.
24+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
25+
* @see http://react-toolbox.com/#/components/tooltip
26+
*/
27+
tooltipDelay?: number,
28+
/**
29+
* If true, the Tooltip hides after a click in the host component.
30+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
31+
* @default true
32+
* @see http://react-toolbox.com/#/components/tooltip
33+
*/
34+
tooltipHideOnClick?: boolean,
35+
}
36+
export interface Iconic {
37+
/**
38+
* Value of the icon (See icon component).
39+
*/
40+
icon?: string | React.ReactElement<any> | React.ReactHTMLElement<any>,
41+
}
42+
export interface AvatarProps extends Props, Iconic {
43+
children?: any,
44+
image?: string | React.ReactElement<any> | React.ReactHTMLElement<any> | React.ClassicComponent<any, any>,
45+
title?: string | boolean,
46+
}
47+
/**
48+
* Avatars can be used to represent people.
49+
* For personal avatars, offer personalization options.
50+
* As users may choose not to personalize an avatar, provide delightful defaults.
51+
* When used with a specific logo, avatars can also be used to represent brand.
52+
*/
53+
export default class Avatar extends React.Component<AvatarProps, {}> {
54+
render(): React.DOMElement<any, any>;
55+
}

lib/button/index.d.ts

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
import * as React from 'react';
2+
export interface Props {
3+
/**
4+
* Sets a CSS class on the component.
5+
*/
6+
className?: string,
7+
id?: string;
8+
/**
9+
* A key used to uniquely identify the element within an Array
10+
*/
11+
key?: string,
12+
/**
13+
* Inline style
14+
*/
15+
style?: any,
16+
/**
17+
* Tooltip text
18+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
19+
* @see http://react-toolbox.com/#/components/tooltip
20+
*/
21+
tooltip?: string,
22+
/**
23+
* Amount of time in miliseconds spent before the tooltip is visible.
24+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
25+
* @see http://react-toolbox.com/#/components/tooltip
26+
*/
27+
tooltipDelay?: number,
28+
/**
29+
* If true, the Tooltip hides after a click in the host component.
30+
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
31+
* @default true
32+
* @see http://react-toolbox.com/#/components/tooltip
33+
*/
34+
tooltipHideOnClick?: boolean,
35+
}
36+
37+
// Interface for components with icons
38+
export interface Iconic {
39+
/**
40+
* Value of the icon (See icon component).
41+
*/
42+
icon?: string | React.ReactElement<any> | React.ReactHTMLElement<any>,
43+
}
44+
45+
export interface Conditional {
46+
/**
47+
* If true, component will be disabled
48+
* @default false
49+
*/
50+
disabled?: boolean
51+
}
52+
53+
/**
54+
* Properties of components that can be clicked
55+
*/
56+
export interface Clickable {
57+
/**
58+
* Callback called when the button is clicked.
59+
*/
60+
onClick?: Function
61+
}
62+
export interface ButtonProps extends Props, Clickable, Conditional, Iconic {
63+
/**
64+
* Indicates if the button should have accent color.
65+
* @default false
66+
*/
67+
accent?: boolean,
68+
/**
69+
* If true, the button will have a flat look.
70+
* @default false
71+
*/
72+
flat?: boolean,
73+
/**
74+
* If true, the button will have a floating look.
75+
* @default false
76+
*/
77+
floating?: boolean,
78+
/**
79+
* If specified, the button will be rendered as an <a>
80+
*/
81+
href?: string,
82+
/**
83+
* The text string to use for the name of the button.
84+
*/
85+
label?: string,
86+
/**
87+
* If true, component will be disabled and show a loading animation.
88+
* @default false
89+
*/
90+
loading?: boolean,
91+
/**
92+
* To be used with floating button. If true the button will be smaller.
93+
* @default false
94+
*/
95+
mini?: boolean,
96+
/**
97+
* Indicates if the button should have primary color.
98+
* @default false
99+
*/
100+
primary?: boolean,
101+
/**
102+
* If true, the button will have a raised look.
103+
* @default false
104+
*/
105+
raised?: boolean,
106+
/**
107+
* If true, component will have a ripple effect on click.
108+
* @default true
109+
*/
110+
ripple?: boolean,
111+
}
112+
/**
113+
* A button clearly communicates what action will occur when the user touches it.
114+
* It consists of text, an image, or both, designed in accordance with your app’s color theme.
115+
*/
116+
export class Button extends React.Component<ButtonProps, {}> {
117+
render(): React.DOMElement<any, any>;
118+
}
119+
120+
export class IconButton extends React.Component<ButtonProps, {}> {
121+
render(): React.DOMElement<any, any>;
122+
}

0 commit comments

Comments
 (0)