UNPKG

405 kBTypeScriptView Raw
1// Type definitions for material-ui 0.21
2// Project: https://github.com/callemall/material-ui, http://material-ui.com
3// Definitions by: Nathan Brown <https://github.com/ngbrown>
4// Igor Beagorudsky <https://github.com/theigor>
5// Ali Taheri Moghaddar <https://github.com/alitaheri>
6// Oliver Herrmann <https://github.com/herrmanno>
7// Daniel Roth <https://github.com/DaIgeb>
8// AureliƩn Allienne <https://github.com/allienna>
9// Matthias Schlesinger <https://github.com/schlesingermatthias>
10// Jonathon Kelly <https://github.com/InsidersByte>
11// Artyom Stukans <https://github.com/artyomsv>
12// Dan Jones <https://github.com/dan-j>
13// Daisuke Mino <https://github.com/minodisk>
14// Sam Walsh <https://github.com/samwalshnz>
15// Tim de Koning <https://github.com/reggino>
16// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
17// Minimum TypeScript Version: 3.5
18
19/// <reference types="react" />
20/// <reference types="react-addons-linked-state-mixin" />
21
22declare module "material-ui" {
23 export import AppBar = __MaterialUI.AppBar;
24 export import AppBarProps = __MaterialUI.AppBarProps;
25 export import AutoComplete = __MaterialUI.AutoComplete;
26 export import AutoCompleteProps = __MaterialUI.AutoCompleteProps;
27 export import Avatar = __MaterialUI.Avatar;
28 export import AvatarProps = __MaterialUI.AvatarProps;
29 export import Badge = __MaterialUI.Badge;
30 export import BadgeProps = __MaterialUI.BadgeProps;
31 export import BottomNavigation = __MaterialUI.BottomNavigation.BottomNavigation;
32 export import BottomNavigationProps = __MaterialUI.BottomNavigation.BottomNavigationProps;
33 export import BottomNavigationItem = __MaterialUI.BottomNavigation.BottomNavigationItem;
34 export import BottomNavigationItemProps = __MaterialUI.BottomNavigation.BottomNavigationItemProps;
35 export import Card = __MaterialUI.Card.Card;
36 export import CardProps = __MaterialUI.Card.CardProps;
37 export import CardActions = __MaterialUI.Card.CardActions;
38 export import CardActionsProps = __MaterialUI.Card.CardActionsProps;
39 export import CardHeader = __MaterialUI.Card.CardHeader;
40 export import CardHeaderProps = __MaterialUI.Card.CardHeaderProps;
41 export import CardMedia = __MaterialUI.Card.CardMedia;
42 export import CardMediaProps = __MaterialUI.Card.CardMediaProps;
43 export import CardText = __MaterialUI.Card.CardText;
44 export import CardTextProps = __MaterialUI.Card.CardTextProps;
45 export import CardTitle = __MaterialUI.Card.CardTitle;
46 export import CardTitleProps = __MaterialUI.Card.CardTitleProps;
47 export import Checkbox = __MaterialUI.Switches.Checkbox;
48 export import CheckboxProps = __MaterialUI.Switches.CheckboxProps;
49 export import Chip = __MaterialUI.Chip;
50 export import ChipProps = __MaterialUI.ChipProps;
51 export import CircularProgress = __MaterialUI.CircularProgress;
52 export import CircularProgressProps = __MaterialUI.CircularProgressProps;
53 export import DatePicker = __MaterialUI.DatePicker.DatePicker;
54 export import DatePickerProps = __MaterialUI.DatePicker.DatePickerProps;
55 export import Dialog = __MaterialUI.Dialog;
56 export import DialogProps = __MaterialUI.DialogProps;
57 export import Divider = __MaterialUI.Divider;
58 export import DividerProps = __MaterialUI.DividerProps;
59 export import Drawer = __MaterialUI.Drawer;
60 export import DrawerProps = __MaterialUI.DrawerProps;
61 export import DropDownMenu = __MaterialUI.Menus.DropDownMenu;
62 export import DropDownMenuProps = __MaterialUI.Menus.DropDownMenuProps;
63 export import FlatButton = __MaterialUI.FlatButton;
64 export import FlatButtonProps = __MaterialUI.FlatButtonProps;
65 export import FloatingActionButton = __MaterialUI.FloatingActionButton;
66 export import FloatingActionButtonProps = __MaterialUI.FloatingActionButtonProps;
67 export import FontIcon = __MaterialUI.FontIcon;
68 export import FontIconProps = __MaterialUI.FontIconProps;
69 export import GridList = __MaterialUI.GridList.GridList;
70 export import GridListProps = __MaterialUI.GridList.GridListProps;
71 export import GridTile = __MaterialUI.GridList.GridTile;
72 export import GridTileProps = __MaterialUI.GridList.GridTileProps;
73 export import IconButton = __MaterialUI.IconButton;
74 export import IconButtonProps = __MaterialUI.IconButtonProps;
75 export import IconMenu = __MaterialUI.Menus.IconMenu;
76 export import IconMenuProps = __MaterialUI.Menus.IconMenuProps;
77 export import LinearProgress = __MaterialUI.LinearProgress;
78 export import LinearProgressProps = __MaterialUI.LinearProgressProps;
79 export import List = __MaterialUI.List.List;
80 export import ListProps = __MaterialUI.List.ListProps;
81 export import ListItem = __MaterialUI.List.ListItem;
82 export import ListItemProps = __MaterialUI.List.ListItemProps;
83 export import makeSelectable = __MaterialUI.List.makeSelectable;
84 export import Menu = __MaterialUI.Menus.Menu;
85 export import MenuProps = __MaterialUI.Menus.MenuProps;
86 export import MenuItem = __MaterialUI.Menus.MenuItem;
87 export import MenuItemProps = __MaterialUI.Menus.MenuItemProps;
88 export import Paper = __MaterialUI.Paper;
89 export import PaperProps = __MaterialUI.PaperProps;
90 export import Popover = __MaterialUI.Popover.Popover;
91 export import PopoverProps = __MaterialUI.Popover.PopoverProps;
92 export import RadioButton = __MaterialUI.Switches.RadioButton;
93 export import RadioButtonProps = __MaterialUI.Switches.RadioButtonProps;
94 export import RadioButtonGroup = __MaterialUI.Switches.RadioButtonGroup;
95 export import RadioButtonGroupProps = __MaterialUI.Switches.RadioButtonGroupProps;
96 export import RaisedButton = __MaterialUI.RaisedButton;
97 export import RaisedButtonProps = __MaterialUI.RaisedButtonProps;
98 export import RefreshIndicator = __MaterialUI.RefreshIndicator;
99 export import RefreshIndicatorProps = __MaterialUI.RefreshIndicatorProps;
100 export import SelectField = __MaterialUI.SelectField;
101 export import SelectFieldProps = __MaterialUI.SelectFieldProps;
102 export import Slider = __MaterialUI.Slider;
103 export import SliderProps = __MaterialUI.SliderProps;
104 export import Subheader = __MaterialUI.Subheader;
105 export import SubheaderProps = __MaterialUI.SubheaderProps;
106 export import SvgIcon = __MaterialUI.SvgIcon;
107 export import SvgIconProps = __MaterialUI.SvgIconProps;
108 export import Step = __MaterialUI.Stepper.Step;
109 export import StepProps = __MaterialUI.Stepper.StepProps;
110 export import StepButton = __MaterialUI.Stepper.StepButton;
111 export import StepButtonProps = __MaterialUI.Stepper.StepButtonProps;
112 export import StepContent = __MaterialUI.Stepper.StepContent;
113 export import StepContentProps = __MaterialUI.Stepper.StepContentProps;
114 export import StepLabel = __MaterialUI.Stepper.StepLabel;
115 export import StepLabelProps = __MaterialUI.Stepper.StepLabelProps;
116 export import Stepper = __MaterialUI.Stepper.Stepper;
117 export import StepperProps = __MaterialUI.Stepper.StepperProps;
118 export import Snackbar = __MaterialUI.Snackbar;
119 export import SnackbarProps = __MaterialUI.SnackbarProps;
120 export import Tab = __MaterialUI.Tabs.Tab;
121 export import TabProps = __MaterialUI.Tabs.TabProps;
122 export import Tabs = __MaterialUI.Tabs.Tabs;
123 export import TabsProps = __MaterialUI.Tabs.TabsProps;
124 export import Table = __MaterialUI.Table.Table;
125 export import TableProps = __MaterialUI.Table.TableProps;
126 export import TableBody = __MaterialUI.Table.TableBody;
127 export import TableBodyProps = __MaterialUI.Table.TableBodyProps;
128 export import TableFooter = __MaterialUI.Table.TableFooter;
129 export import TableFooterProps = __MaterialUI.Table.TableFooterProps;
130 export import TableHeader = __MaterialUI.Table.TableHeader;
131 export import TableHeaderProps = __MaterialUI.Table.TableHeaderProps;
132 export import TableHeaderColumn = __MaterialUI.Table.TableHeaderColumn;
133 export import TableHeaderColumnProps = __MaterialUI.Table.TableHeaderColumnProps;
134 export import TableRow = __MaterialUI.Table.TableRow;
135 export import TableRowProps = __MaterialUI.Table.TableRowProps;
136 export import TableRowColumn = __MaterialUI.Table.TableRowColumn;
137 export import TableRowColumnProps = __MaterialUI.Table.TableRowColumnProps;
138 export import TextField = __MaterialUI.TextField;
139 export import TextFieldProps = __MaterialUI.TextFieldProps;
140 export import TimePicker = __MaterialUI.TimePicker;
141 export import TimePickerProps = __MaterialUI.TimePickerProps;
142 export import Toggle = __MaterialUI.Switches.Toggle;
143 export import ToggleProps = __MaterialUI.Switches.ToggleProps;
144 export import Toolbar = __MaterialUI.Toolbar.Toolbar;
145 export import ToolbarProps = __MaterialUI.Toolbar.ToolbarProps;
146 export import ToolbarGroup = __MaterialUI.Toolbar.ToolbarGroup;
147 export import ToolbarGroupProps = __MaterialUI.Toolbar.ToolbarGroupProps;
148 export import ToolbarSeparator = __MaterialUI.Toolbar.ToolbarSeparator;
149 export import ToolbarSeparatorProps = __MaterialUI.Toolbar.ToolbarSeparatorProps;
150 export import ToolbarTitle = __MaterialUI.Toolbar.ToolbarTitle;
151 export import ToolbarTitleProps = __MaterialUI.Toolbar.ToolbarTitleProps;
152}
153
154declare namespace __MaterialUI {
155 // ReactLink is from "react/addons"
156 interface ReactLink<T> {
157 value: T;
158 requestChange(newValue: T): void;
159 }
160
161 export interface ThemeWrapperProps {
162 theme: Styles.MuiTheme;
163 }
164 export class ThemeWrapper extends React.Component<ThemeWrapperProps> {
165 }
166
167 export namespace Styles {
168 interface Spacing {
169 iconSize?: number | undefined;
170
171 desktopGutter?: number | undefined;
172 desktopGutterMore?: number | undefined;
173 desktopGutterLess?: number | undefined;
174 desktopGutterMini?: number | undefined;
175 desktopKeylineIncrement?: number | undefined;
176 desktopDropDownMenuItemHeight?: number | undefined;
177 desktopDropDownMenuFontSize?: number | undefined;
178 desktopLeftNavMenuItemHeight?: number | undefined;
179 desktopSubheaderHeight?: number | undefined;
180 desktopToolbarHeight?: number | undefined;
181 }
182 export let Spacing: Spacing;
183
184 interface ThemePalette {
185 primary1Color?: string | undefined;
186 primary2Color?: string | undefined;
187 primary3Color?: string | undefined;
188 accent1Color?: string | undefined;
189 accent2Color?: string | undefined;
190 accent3Color?: string | undefined;
191 textColor?: string | undefined;
192 secondaryTextColor?: string | undefined;
193 alternateTextColor?: string | undefined;
194 canvasColor?: string | undefined;
195 borderColor?: string | undefined;
196 disabledColor?: string | undefined;
197 pickerHeaderColor?: string | undefined;
198 clockCircleColor?: string | undefined;
199 shadowColor?: string | undefined;
200 }
201 export let ThemePalette: ThemePalette;
202 interface MuiTheme {
203 spacing?: Spacing | undefined;
204 fontFamily?: string | undefined;
205 palette?: ThemePalette | undefined;
206 isRtl?: boolean | undefined;
207 userAgent?: string | boolean | undefined;
208 zIndex?: zIndex | undefined;
209 baseTheme?: RawTheme | undefined;
210 rawTheme?: RawTheme | undefined;
211 appBar?: {
212 color?: string | undefined;
213 textColor?: string | undefined;
214 height?: number | undefined;
215 titleFontWeight?: number | undefined;
216 padding?: number | undefined;
217 } | undefined;
218 avatar?: {
219 color?: string | undefined;
220 backgroundColor?: string | undefined;
221 borderColor?: string | undefined;
222 } | undefined;
223 badge?: {
224 color?: string | undefined;
225 textColor?: string | undefined;
226 primaryColor?: string | undefined;
227 primaryTextColor?: string | undefined;
228 secondaryColor?: string | undefined;
229 secondaryTextColor?: string | undefined;
230 fontWeight?: number | undefined;
231 } | undefined;
232 button?: {
233 height?: number | undefined;
234 minWidth?: number | undefined;
235 iconButtonSize?: number | undefined;
236 textTransform?: string | undefined;
237 } | undefined;
238 card?: {
239 titleColor?: string | undefined;
240 subtitleColor?: string | undefined;
241 fontWeight?: number | undefined;
242 } | undefined;
243 cardMedia?: {
244 color?: string | undefined;
245 overlayContentBackground?: string | undefined;
246 titleColor?: string | undefined;
247 subtitleColor?: string | undefined;
248 } | undefined;
249 cardText?: {
250 textColor?: string | undefined;
251 } | undefined;
252 checkbox?: {
253 boxColor?: string | undefined;
254 checkedColor?: string | undefined;
255 requiredColor?: string | undefined;
256 disabledColor?: string | undefined;
257 labelColor?: string | undefined;
258 labelDisabledColor?: string | undefined;
259 } | undefined;
260 chip?: {
261 backgroundColor?: string | undefined;
262 deleteIconColor?: string | undefined;
263 textColor?: string | undefined;
264 fontSize?: number | undefined;
265 fontWeight?: number | undefined;
266 shadow?: string | undefined;
267 } | undefined;
268 datePicker?: {
269 color?: string | undefined;
270 textColor?: string | undefined;
271 calendarTextColor?: string | undefined;
272 selectColor?: string | undefined;
273 selectTextColor?: string | undefined;
274 calendarYearBackgroundColor?: string | undefined;
275 headerColor?: string | undefined;
276 } | undefined;
277 dialog?: {
278 titleFontSize?: number | undefined;
279 bodyFontSize?: number | undefined;
280 bodyColor?: string | undefined;
281 } | undefined;
282 dropDownMenu?: {
283 accentColor?: string | undefined;
284 } | undefined;
285 enhancedButton?: {
286 tapHighlightColor?: string | undefined;
287 } | undefined;
288 flatButton?: {
289 color?: string | undefined;
290 buttonFilterColor?: string | undefined;
291 disabledTextColor?: string | undefined;
292 textColor?: string | undefined;
293 primaryTextColor?: string | undefined;
294 secondaryTextColor?: string | undefined;
295 fontSize?: number | undefined;
296 fontWeight?: number | undefined;
297 } | undefined;
298 floatingActionButton?: {
299 buttonSize?: number | undefined;
300 miniSize?: number | undefined;
301 color?: string | undefined;
302 iconColor?: string | undefined;
303 secondaryColor?: string | undefined;
304 secondaryIconColor?: string | undefined;
305 disabledTextColor?: string | undefined;
306 disabledColor?: string | undefined;
307 } | undefined;
308 gridTile?: {
309 textColor?: string | undefined;
310 } | undefined;
311 icon?: {
312 color?: string | undefined;
313 backgroundColor?: string | undefined;
314 } | undefined;
315 inkBar?: {
316 backgroundColor?: string | undefined;
317 } | undefined;
318 drawer?: {
319 width?: number | undefined;
320 color?: string | undefined;
321 } | undefined;
322 listItem?: {
323 nestedLevelDepth?: number | undefined;
324 secondaryTextColor?: string | undefined;
325 leftIconColor?: string | undefined;
326 rightIconColor?: string | undefined;
327 } | undefined;
328 menu?: {
329 backgroundColor?: string | undefined;
330 containerBackgroundColor?: string | undefined;
331 } | undefined;
332 menuItem?: {
333 dataHeight?: number | undefined;
334 height?: number | undefined;
335 hoverColor?: string | undefined;
336 padding?: number | undefined;
337 selectedTextColor?: string | undefined;
338 rightIconDesktopFill?: string | undefined;
339 } | undefined;
340 menuSubheader?: {
341 padding?: number | undefined;
342 borderColor?: string | undefined;
343 textColor?: string | undefined;
344 } | undefined;
345 overlay?: {
346 backgroundColor?: string | undefined;
347 } | undefined;
348 paper?: {
349 color?: string | undefined;
350 backgroundColor?: string | undefined;
351 zDepthShadows?: string[] | undefined;
352 } | undefined;
353 radioButton?: {
354 borderColor?: string | undefined;
355 backgroundColor?: string | undefined;
356 checkedColor?: string | undefined;
357 requiredColor?: string | undefined;
358 disabledColor?: string | undefined;
359 size?: number | undefined;
360 labelColor?: string | undefined;
361 labelDisabledColor?: string | undefined;
362 } | undefined;
363 raisedButton?: {
364 color?: string | undefined;
365 textColor?: string | undefined;
366 primaryColor?: string | undefined;
367 primaryTextColor?: string | undefined;
368 secondaryColor?: string | undefined;
369 secondaryTextColor?: string | undefined;
370 disabledColor?: string | undefined;
371 disabledTextColor?: string | undefined;
372 fontSize?: number | undefined;
373 fontWeight?: number | undefined;
374 } | undefined;
375 refreshIndicator?: {
376 strokeColor?: string | undefined;
377 loadingStrokeColor?: string | undefined;
378 } | undefined;
379 ripple?: {
380 color?: string | undefined;
381 } | undefined;
382 slider?: {
383 trackSize?: number | undefined;
384 trackColor?: string | undefined;
385 trackColorSelected?: string | undefined;
386 handleSize?: number | undefined;
387 handleSizeDisabled?: number | undefined;
388 handleSizeActive?: number | undefined;
389 handleColorZero?: string | undefined;
390 handleFillColor?: string | undefined;
391 selectionColor?: string | undefined;
392 rippleColor?: string | undefined;
393 } | undefined;
394 snackbar?: {
395 textColor?: string | undefined;
396 backgroundColor?: string | undefined;
397 actionColor?: string | undefined;
398 } | undefined;
399 subheader?: {
400 color?: string | undefined;
401 fontWeight?: number | undefined;
402 } | undefined;
403 stepper?: {
404 backgroundColor?: string | undefined;
405 hoverBackgroundColor?: string | undefined;
406 iconColor?: string | undefined;
407 hoveredIconColor?: string | undefined;
408 inactiveIconColor?: string | undefined;
409 textColor?: string | undefined;
410 disabledTextColor?: string | undefined;
411 connectorLineColor?: string | undefined;
412 } | undefined;
413 svgIcon?: {
414 color?: string | undefined,
415 } | undefined;
416 table?: {
417 backgroundColor?: string | undefined;
418 } | undefined;
419 tableFooter?: {
420 borderColor?: string | undefined;
421 textColor?: string | undefined;
422 } | undefined;
423 tableHeader?: {
424 borderColor?: string | undefined;
425 } | undefined;
426 tableHeaderColumn?: {
427 textColor?: string | undefined;
428 height?: number | undefined;
429 spacing?: number | undefined;
430 } | undefined;
431 tableRow?: {
432 hoverColor?: string | undefined;
433 stripeColor?: string | undefined;
434 selectedColor?: string | undefined;
435 textColor?: string | undefined;
436 borderColor?: string | undefined;
437 height?: number | undefined;
438 } | undefined;
439 tableRowColumn?: {
440 height?: number | undefined;
441 spacing?: number | undefined;
442 } | undefined;
443 tabs?: {
444 backgroundColor?: string | undefined;
445 textColor?: string | undefined;
446 selectedTextColor?: string | undefined;
447 } | undefined;
448