// Type definitions for material-ui 0.21 // Project: https://github.com/callemall/material-ui, http://material-ui.com // Definitions by: Nathan Brown // Igor Beagorudsky // Ali Taheri Moghaddar // Oliver Herrmann // Daniel Roth // AureliƩn Allienne // Matthias Schlesinger // Jonathon Kelly // Artyom Stukans // Dan Jones // Daisuke Mino // Sam Walsh // Tim de Koning // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 /// /// declare module "material-ui" { export import AppBar = __MaterialUI.AppBar; export import AppBarProps = __MaterialUI.AppBarProps; export import AutoComplete = __MaterialUI.AutoComplete; export import AutoCompleteProps = __MaterialUI.AutoCompleteProps; export import Avatar = __MaterialUI.Avatar; export import AvatarProps = __MaterialUI.AvatarProps; export import Badge = __MaterialUI.Badge; export import BadgeProps = __MaterialUI.BadgeProps; export import BottomNavigation = __MaterialUI.BottomNavigation.BottomNavigation; export import BottomNavigationProps = __MaterialUI.BottomNavigation.BottomNavigationProps; export import BottomNavigationItem = __MaterialUI.BottomNavigation.BottomNavigationItem; export import BottomNavigationItemProps = __MaterialUI.BottomNavigation.BottomNavigationItemProps; export import Card = __MaterialUI.Card.Card; export import CardProps = __MaterialUI.Card.CardProps; export import CardActions = __MaterialUI.Card.CardActions; export import CardActionsProps = __MaterialUI.Card.CardActionsProps; export import CardHeader = __MaterialUI.Card.CardHeader; export import CardHeaderProps = __MaterialUI.Card.CardHeaderProps; export import CardMedia = __MaterialUI.Card.CardMedia; export import CardMediaProps = __MaterialUI.Card.CardMediaProps; export import CardText = __MaterialUI.Card.CardText; export import CardTextProps = __MaterialUI.Card.CardTextProps; export import CardTitle = __MaterialUI.Card.CardTitle; export import CardTitleProps = __MaterialUI.Card.CardTitleProps; export import Checkbox = __MaterialUI.Switches.Checkbox; export import CheckboxProps = __MaterialUI.Switches.CheckboxProps; export import Chip = __MaterialUI.Chip; export import ChipProps = __MaterialUI.ChipProps; export import CircularProgress = __MaterialUI.CircularProgress; export import CircularProgressProps = __MaterialUI.CircularProgressProps; export import DatePicker = __MaterialUI.DatePicker.DatePicker; export import DatePickerProps = __MaterialUI.DatePicker.DatePickerProps; export import Dialog = __MaterialUI.Dialog; export import DialogProps = __MaterialUI.DialogProps; export import Divider = __MaterialUI.Divider; export import DividerProps = __MaterialUI.DividerProps; export import Drawer = __MaterialUI.Drawer; export import DrawerProps = __MaterialUI.DrawerProps; export import DropDownMenu = __MaterialUI.Menus.DropDownMenu; export import DropDownMenuProps = __MaterialUI.Menus.DropDownMenuProps; export import FlatButton = __MaterialUI.FlatButton; export import FlatButtonProps = __MaterialUI.FlatButtonProps; export import FloatingActionButton = __MaterialUI.FloatingActionButton; export import FloatingActionButtonProps = __MaterialUI.FloatingActionButtonProps; export import FontIcon = __MaterialUI.FontIcon; export import FontIconProps = __MaterialUI.FontIconProps; export import GridList = __MaterialUI.GridList.GridList; export import GridListProps = __MaterialUI.GridList.GridListProps; export import GridTile = __MaterialUI.GridList.GridTile; export import GridTileProps = __MaterialUI.GridList.GridTileProps; export import IconButton = __MaterialUI.IconButton; export import IconButtonProps = __MaterialUI.IconButtonProps; export import IconMenu = __MaterialUI.Menus.IconMenu; export import IconMenuProps = __MaterialUI.Menus.IconMenuProps; export import LinearProgress = __MaterialUI.LinearProgress; export import LinearProgressProps = __MaterialUI.LinearProgressProps; export import List = __MaterialUI.List.List; export import ListProps = __MaterialUI.List.ListProps; export import ListItem = __MaterialUI.List.ListItem; export import ListItemProps = __MaterialUI.List.ListItemProps; export import makeSelectable = __MaterialUI.List.makeSelectable; export import Menu = __MaterialUI.Menus.Menu; export import MenuProps = __MaterialUI.Menus.MenuProps; export import MenuItem = __MaterialUI.Menus.MenuItem; export import MenuItemProps = __MaterialUI.Menus.MenuItemProps; export import Paper = __MaterialUI.Paper; export import PaperProps = __MaterialUI.PaperProps; export import Popover = __MaterialUI.Popover.Popover; export import PopoverProps = __MaterialUI.Popover.PopoverProps; export import RadioButton = __MaterialUI.Switches.RadioButton; export import RadioButtonProps = __MaterialUI.Switches.RadioButtonProps; export import RadioButtonGroup = __MaterialUI.Switches.RadioButtonGroup; export import RadioButtonGroupProps = __MaterialUI.Switches.RadioButtonGroupProps; export import RaisedButton = __MaterialUI.RaisedButton; export import RaisedButtonProps = __MaterialUI.RaisedButtonProps; export import RefreshIndicator = __MaterialUI.RefreshIndicator; export import RefreshIndicatorProps = __MaterialUI.RefreshIndicatorProps; export import SelectField = __MaterialUI.SelectField; export import SelectFieldProps = __MaterialUI.SelectFieldProps; export import Slider = __MaterialUI.Slider; export import SliderProps = __MaterialUI.SliderProps; export import Subheader = __MaterialUI.Subheader; export import SubheaderProps = __MaterialUI.SubheaderProps; export import SvgIcon = __MaterialUI.SvgIcon; export import SvgIconProps = __MaterialUI.SvgIconProps; export import Step = __MaterialUI.Stepper.Step; export import StepProps = __MaterialUI.Stepper.StepProps; export import StepButton = __MaterialUI.Stepper.StepButton; export import StepButtonProps = __MaterialUI.Stepper.StepButtonProps; export import StepContent = __MaterialUI.Stepper.StepContent; export import StepContentProps = __MaterialUI.Stepper.StepContentProps; export import StepLabel = __MaterialUI.Stepper.StepLabel; export import StepLabelProps = __MaterialUI.Stepper.StepLabelProps; export import Stepper = __MaterialUI.Stepper.Stepper; export import StepperProps = __MaterialUI.Stepper.StepperProps; export import Snackbar = __MaterialUI.Snackbar; export import SnackbarProps = __MaterialUI.SnackbarProps; export import Tab = __MaterialUI.Tabs.Tab; export import TabProps = __MaterialUI.Tabs.TabProps; export import Tabs = __MaterialUI.Tabs.Tabs; export import TabsProps = __MaterialUI.Tabs.TabsProps; export import Table = __MaterialUI.Table.Table; export import TableProps = __MaterialUI.Table.TableProps; export import TableBody = __MaterialUI.Table.TableBody; export import TableBodyProps = __MaterialUI.Table.TableBodyProps; export import TableFooter = __MaterialUI.Table.TableFooter; export import TableFooterProps = __MaterialUI.Table.TableFooterProps; export import TableHeader = __MaterialUI.Table.TableHeader; export import TableHeaderProps = __MaterialUI.Table.TableHeaderProps; export import TableHeaderColumn = __MaterialUI.Table.TableHeaderColumn; export import TableHeaderColumnProps = __MaterialUI.Table.TableHeaderColumnProps; export import TableRow = __MaterialUI.Table.TableRow; export import TableRowProps = __MaterialUI.Table.TableRowProps; export import TableRowColumn = __MaterialUI.Table.TableRowColumn; export import TableRowColumnProps = __MaterialUI.Table.TableRowColumnProps; export import TextField = __MaterialUI.TextField; export import TextFieldProps = __MaterialUI.TextFieldProps; export import TimePicker = __MaterialUI.TimePicker; export import TimePickerProps = __MaterialUI.TimePickerProps; export import Toggle = __MaterialUI.Switches.Toggle; export import ToggleProps = __MaterialUI.Switches.ToggleProps; export import Toolbar = __MaterialUI.Toolbar.Toolbar; export import ToolbarProps = __MaterialUI.Toolbar.ToolbarProps; export import ToolbarGroup = __MaterialUI.Toolbar.ToolbarGroup; export import ToolbarGroupProps = __MaterialUI.Toolbar.ToolbarGroupProps; export import ToolbarSeparator = __MaterialUI.Toolbar.ToolbarSeparator; export import ToolbarSeparatorProps = __MaterialUI.Toolbar.ToolbarSeparatorProps; export import ToolbarTitle = __MaterialUI.Toolbar.ToolbarTitle; export import ToolbarTitleProps = __MaterialUI.Toolbar.ToolbarTitleProps; } declare namespace __MaterialUI { // ReactLink is from "react/addons" interface ReactLink { value: T; requestChange(newValue: T): void; } export interface ThemeWrapperProps { theme: Styles.MuiTheme; } export class ThemeWrapper extends React.Component { } export namespace Styles { interface Spacing { iconSize?: number; desktopGutter?: number; desktopGutterMore?: number; desktopGutterLess?: number; desktopGutterMini?: number; desktopKeylineIncrement?: number; desktopDropDownMenuItemHeight?: number; desktopDropDownMenuFontSize?: number; desktopLeftNavMenuItemHeight?: number; desktopSubheaderHeight?: number; desktopToolbarHeight?: number; } export let Spacing: Spacing; interface ThemePalette { primary1Color?: string; primary2Color?: string; primary3Color?: string; accent1Color?: string; accent2Color?: string; accent3Color?: string; textColor?: string; secondaryTextColor?: string; alternateTextColor?: string; canvasColor?: string; borderColor?: string; disabledColor?: string; pickerHeaderColor?: string; clockCircleColor?: string; shadowColor?: string; } export let ThemePalette: ThemePalette; interface MuiTheme { spacing?: Spacing; fontFamily?: string; palette?: ThemePalette; isRtl?: boolean; userAgent?: string | boolean; zIndex?: zIndex; baseTheme?: RawTheme; rawTheme?: RawTheme; appBar?: { color?: string; textColor?: string; height?: number; titleFontWeight?: number; padding?: number; }; avatar?: { color?: string; backgroundColor?: string; borderColor?: string; }; badge?: { color?: string; textColor?: string; primaryColor?: string; primaryTextColor?: string; secondaryColor?: string; secondaryTextColor?: string; fontWeight?: number; }; button?: { height?: number; minWidth?: number; iconButtonSize?: number; textTransform?: string; }; card?: { titleColor?: string; subtitleColor?: string; fontWeight?: number; }; cardMedia?: { color?: string; overlayContentBackground?: string; titleColor?: string; subtitleColor?: string; }; cardText?: { textColor?: string; }; checkbox?: { boxColor?: string; checkedColor?: string; requiredColor?: string; disabledColor?: string; labelColor?: string; labelDisabledColor?: string; }; chip?: { backgroundColor?: string; deleteIconColor?: string; textColor?: string; fontSize?: number; fontWeight?: number; shadow?: string; }; datePicker?: { color?: string; textColor?: string; calendarTextColor?: string; selectColor?: string; selectTextColor?: string; calendarYearBackgroundColor?: string; headerColor?: string; }; dialog?: { titleFontSize?: number; bodyFontSize?: number; bodyColor?: string; }; dropDownMenu?: { accentColor?: string; }; enhancedButton?: { tapHighlightColor?: string; }; flatButton?: { color?: string; buttonFilterColor?: string; disabledTextColor?: string; textColor?: string; primaryTextColor?: string; secondaryTextColor?: string; fontSize?: number; fontWeight?: number; }; floatingActionButton?: { buttonSize?: number; miniSize?: number; color?: string; iconColor?: string; secondaryColor?: string; secondaryIconColor?: string; disabledTextColor?: string; disabledColor?: string; }; gridTile?: { textColor?: string; }; icon?: { color?: string; backgroundColor?: string; }; inkBar?: { backgroundColor?: string; }; drawer?: { width?: number; color?: string; }; listItem?: { nestedLevelDepth?: number; secondaryTextColor?: string; leftIconColor?: string; rightIconColor?: string; }; menu?: { backgroundColor?: string; containerBackgroundColor?: string; }; menuItem?: { dataHeight?: number; height?: number; hoverColor?: string; padding?: number; selectedTextColor?: string; rightIconDesktopFill?: string; }; menuSubheader?: { padding?: number; borderColor?: string; textColor?: string; }; overlay?: { backgroundColor?: string; }; paper?: { color?: string; backgroundColor?: string; zDepthShadows?: string[]; }; radioButton?: { borderColor?: string; backgroundColor?: string; checkedColor?: string; requiredColor?: string; disabledColor?: string; size?: number; labelColor?: string; labelDisabledColor?: string; }; raisedButton?: { color?: string; textColor?: string; primaryColor?: string; primaryTextColor?: string; secondaryColor?: string; secondaryTextColor?: string; disabledColor?: string; disabledTextColor?: string; fontSize?: number; fontWeight?: number; }; refreshIndicator?: { strokeColor?: string; loadingStrokeColor?: string; }; ripple?: { color?: string; }; slider?: { trackSize?: number; trackColor?: string; trackColorSelected?: string; handleSize?: number; handleSizeDisabled?: number; handleSizeActive?: number; handleColorZero?: string; handleFillColor?: string; selectionColor?: string; rippleColor?: string; }; snackbar?: { textColor?: string; backgroundColor?: string; actionColor?: string; }; subheader?: { color?: string; fontWeight?: number; }; stepper?: { backgroundColor?: string; hoverBackgroundColor?: string; iconColor?: string; hoveredIconColor?: string; inactiveIconColor?: string; textColor?: string; disabledTextColor?: string; connectorLineColor?: string; }; svgIcon?: { color?: string, }; table?: { backgroundColor?: string; }; tableFooter?: { borderColor?: string; textColor?: string; }; tableHeader?: { borderColor?: string; }; tableHeaderColumn?: { textColor?: string; height?: number; spacing?: number; }; tableRow?: { hoverColor?: string; stripeColor?: string; selectedColor?: string; textColor?: string; borderColor?: string; height?: number; }; tableRowColumn?: { height?: number; spacing?: number; }; tabs?: { backgroundColor?: string; textColor?: string; selectedTextColor?: string; }; textField?: { textColor?: string; hintColor?: string; floatingLabelColor?: string; disabledTextColor?: string; errorColor?: string; focusColor?: string; backgroundColor?: string; borderColor?: string; }; timePicker?: { color?: string; textColor?: string; accentColor?: string; clockColor?: string; clockCircleColor?: string; headerColor?: string; selectColor?: string; selectTextColor?: string; }; toggle?: { thumbOnColor?: string; thumbOffColor?: string; thumbDisabledColor?: string; thumbRequiredColor?: string; trackOnColor?: string; trackOffColor?: string; trackDisabledColor?: string; labelColor?: string; labelDisabledColor?: string; trackRequiredColor?: string; }; toolbar?: { color?: string; hoverColor?: string; backgroundColor?: string; height?: number; titleFontSize?: number; iconColor?: string; separatorColor?: string; menuHoverColor?: string; }; tooltip?: { color?: string; rippleBackgroundColor?: string; }; } interface zIndex { menu: number; appBar: number; drawerOverlay: number; drawer: number; dialogOverlay: number; dialog: number; layer: number; popover: number; snackbar: number; tooltip: number; } export let zIndex: zIndex; interface RawTheme { spacing?: Spacing; fontFamily?: string; palette?: ThemePalette; } let lightBaseTheme: RawTheme; let darkBaseTheme: RawTheme; export function muiThemeable(): < TComponent extends React.ComponentClass

| React.StatelessComponent

, P extends {muiTheme?: MuiTheme} >(component: TComponent) => TComponent; export interface MuiThemeProviderProps { muiTheme?: MuiTheme; } export class MuiThemeProvider extends React.Component { } export function getMuiTheme(...muiTheme: MuiTheme[]): MuiTheme; interface Transitions { easeOut(duration?: string, property?: string | string[], delay?: string, easeFunction?: string): string; create(duration?: string, property?: string, delay?: string, easeFunction?: string): string; easeOutFunction: string; easeInOutFunction: string; } export let Transitions: Transitions; interface Typography { textFullBlack: string; textDarkBlack: string; textLightBlack: string; textMinBlack: string; textFullWhite: string; textDarkWhite: string; textLightWhite: string; // font weight fontWeightLight: number; fontWeightNormal: number; fontWeightMedium: number; fontStyleButtonFontSize: number; } export let Typography: Typography; } export interface AppBarProps { className?: string; iconClassNameLeft?: string; iconClassNameRight?: string; iconElementLeft?: React.ReactElement; iconElementRight?: React.ReactElement; iconStyleRight?: React.CSSProperties; iconStyleLeft?: React.CSSProperties; onLeftIconButtonClick?: React.MouseEventHandler<{}>; onRightIconButtonClick?: React.MouseEventHandler<{}>; onTitleClick?: React.MouseEventHandler<{}>; showMenuIconButton?: boolean; style?: React.CSSProperties; title?: React.ReactNode; titleStyle?: React.CSSProperties; zDepth?: number; } export class AppBar extends React.Component { } export interface AppCanvasProps { } export class AppCanvas extends React.Component { } namespace propTypes { type horizontal = 'left' | 'middle' | 'right'; type tooltipHorizontal = 'left' | 'center' | 'right'; type vertical = 'top' | 'center' | 'bottom'; type direction = 'left' | 'right' | 'up' | 'down'; interface origin { horizontal: horizontal; vertical: vertical; } interface utils { getWeekArray(date: Date, firstDayOfWeek: number): Array>; getYear(date: Date): number; setYear(date: Date, year: number): Date; addDays(date: Date, days: number): Date; addMonths(date: Date, months: number): Date; addYears(date: Date, years: number): Date; getFirstDayOfMonth(date: Date): Date; monthDiff(date1: Date, date2: Date): number; } type corners = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'; type cornersAndCenter = 'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right'; } export interface AutoCompleteProps extends TextFieldProps { anchorOrigin?: propTypes.origin; animated?: boolean; animation?: React.ComponentClass; dataSource: DataItem[]; dataSourceConfig?: { text: string; value: string; }; disableFocusRipple?: boolean; errorStyle?: React.CSSProperties; errorText?: React.ReactNode; filter?(searchText: string, key: string, item: DataItem): boolean; floatingLabelText?: React.ReactNode; fullWidth?: boolean; hintText?: React.ReactNode; listStyle?: React.CSSProperties; maxSearchResults?: number; menuCloseDelay?: number; menuProps?: any; menuStyle?: React.CSSProperties; onBlur?: React.FocusEventHandler<{}>; onFocus?: React.FocusEventHandler<{}>; onKeyDown?: React.KeyboardEventHandler<{}>; onNewRequest?(chosenRequest: DataItem, index: number): void; onUpdateInput?(searchText: string, dataSource: DataItem[]): void; open?: boolean; openOnFocus?: boolean; popoverProps?: Popover.PopoverProps; searchText?: string; style?: React.CSSProperties; targetOrigin?: propTypes.origin; textFieldStyle?: React.CSSProperties; } export class AutoComplete extends React.Component> { static noFilter(): boolean; static defaultFilter(searchText: string, key: string): boolean; static caseSensitiveFilter(searchText: string, key: string): boolean; static caseInsensitiveFilter(searchText: string, key: string): boolean; static levenshteinDistanceFilter(distanceLessThan: number): (searchText: string, key: string) => boolean; static fuzzyFilter(searchText: string, key: string): boolean; static Item: Menus.MenuItem; static Divider: Divider; } export interface AvatarProps { backgroundColor?: string; className?: string; color?: string; icon?: React.ReactElement; size?: number; src?: string; style?: React.CSSProperties; onClick?: React.MouseEventHandler<{}>; } export class Avatar extends React.Component { } export interface BadgeProps { badgeContent: React.ReactNode; badgeStyle?: React.CSSProperties; className?: string; primary?: boolean; secondary?: boolean; style?: React.CSSProperties; } export class Badge extends React.Component { } export interface BeforeAfterWrapperProps { afterElementType?: string; afterStyle?: React.CSSProperties; beforeElementType?: string; beforeStyle?: React.CSSProperties; elementType?: string; style?: React.CSSProperties; } export class BeforeAfterWrapper extends React.Component { } // non generally overridden elements of EnhancedButton export interface SharedEnhancedButtonProps { centerRipple?: boolean; disableFocusRipple?: boolean; disableKeyboardFocus?: boolean; disableTouchRipple?: boolean; focusRippleColor?: string; focusRippleOpacity?: number; href?: string; keyboardFocused?: boolean; onBlur?: React.FocusEventHandler<{}>; onFocus?: React.FocusEventHandler<{}>; onKeyboardFocus?(e: React.FocusEvent<{}>, isKeyboardFocused: boolean): void; onKeyDown?: React.KeyboardEventHandler<{}>; onKeyUp?: React.KeyboardEventHandler<{}>; onClick?: React.MouseEventHandler<{}>; style?: React.CSSProperties; tabIndex?: number; target?: string; touchRippleColor?: string; touchRippleOpacity?: number; type?: string; containerElement?: React.ReactNode | string; } export interface EnhancedButtonProps extends React.HTMLAttributes<{}>, SharedEnhancedButtonProps { // container element,