Giter Club home page Giter Club logo

typings-material-ui's People

Contributors

alitaheri avatar mattiamanzati avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

typings-material-ui's Issues

Autocomplete dataSource typings too narrow, dataSourceConfig missing.

TypeScript Version: 2.0.2

Typings Version: master

Issue:
Autocomplete dataSource typings are too narrow. They ignore the existence of dataSourceConfig (which is missing).

Code:

const countries = [
  { "name": "Afghanistan", "code": "AF" },
  { "name": "Åland Islands", "code": "AX" },
  { "name": "Albania", "code": "AL" }
];
let autocomplete = <AutoComplete floatingLabelText="Search for a country"
                         filter={AutoComplete.fuzzyFilter}
                         dataSource={countries}
                         dataSourceConfig={{ text: 'name', value: 'code' }} />

See the doc.

typings progress tracking

TypeScript Version: 2.0.0

Typings Version: master

Issue
This issue will and tracks the current status of the typings! Feel free to comment to assign yourself to one of the missing components or report missing ones!

could not import from 'material-ui', must use 'material-ui/index' instead

TypeScript Version: 2.0.0

Typeings Version: master

Code

// this will throw error
import {AppBar} from 'material-ui'

// this works fine
import {AppBar} from 'material-ui/index'

Expected behavior:
"/index" should not be necessary; is there any config to perform with the typings.json file? Unfortunately I don't know how to solve it atm.

Actual behavior:
"/index" is required, "material-ui" seems to be not declared.

Linting

I think this project is big enough to enable linting. Do you agree? Should I set up tslint with some rules?

If so we should agree on some rules 😅

  1. semicolon ( always or never ) [ ]
  2. new line at the end of each file ( yes or no ) [ ]
  3. indentation ( 2 or 4 ) [ ]

"material-ui/styles/colors" is missing

TypeScript Version: 2.0.2

Typings Version: master

Issue:
The entire "material-ui/styles/colors" module is missing. It's documented here

Code:
This would solve it, taken from DefinitelyTyped

declare module "material-ui/styles/colors" {
  export const red50: string;
  export const red100: string;
  export const red200: string;
  export const red300: string;
  export const red400: string;
  export const red500: string;
  export const red600: string;
  export const red700: string;
  export const red800: string;
  export const red900: string;
  export const redA100: string;
  export const redA200: string;
  export const redA400: string;
  export const redA700: string;

  export const pink50: string;
  export const pink100: string;
  export const pink200: string;
  export const pink300: string;
  export const pink400: string;
  export const pink500: string;
  export const pink600: string;
  export const pink700: string;
  export const pink800: string;
  export const pink900: string;
  export const pinkA100: string;
  export const pinkA200: string;
  export const pinkA400: string;
  export const pinkA700: string;

  export const purple50: string;
  export const purple100: string;
  export const purple200: string;
  export const purple300: string;
  export const purple400: string;
  export const purple500: string;
  export const purple600: string;
  export const purple700: string;
  export const purple800: string;
  export const purple900: string;
  export const purpleA100: string;
  export const purpleA200: string;
  export const purpleA400: string;
  export const purpleA700: string;

  export const deepPurple50: string;
  export const deepPurple100: string;
  export const deepPurple200: string;
  export const deepPurple300: string;
  export const deepPurple400: string;
  export const deepPurple500: string;
  export const deepPurple600: string;
  export const deepPurple700: string;
  export const deepPurple800: string;
  export const deepPurple900: string;
  export const deepPurpleA100: string;
  export const deepPurpleA200: string;
  export const deepPurpleA400: string;
  export const deepPurpleA700: string;

  export const indigo50: string;
  export const indigo100: string;
  export const indigo200: string;
  export const indigo300: string;
  export const indigo400: string;
  export const indigo500: string;
  export const indigo600: string;
  export const indigo700: string;
  export const indigo800: string;
  export const indigo900: string;
  export const indigoA100: string;
  export const indigoA200: string;
  export const indigoA400: string;
  export const indigoA700: string;

  export const blue50: string;
  export const blue100: string;
  export const blue200: string;
  export const blue300: string;
  export const blue400: string;
  export const blue500: string;
  export const blue600: string;
  export const blue700: string;
  export const blue800: string;
  export const blue900: string;
  export const blueA100: string;
  export const blueA200: string;
  export const blueA400: string;
  export const blueA700: string;

  export const lightBlue50: string;
  export const lightBlue100: string;
  export const lightBlue200: string;
  export const lightBlue300: string;
  export const lightBlue400: string;
  export const lightBlue500: string;
  export const lightBlue600: string;
  export const lightBlue700: string;
  export const lightBlue800: string;
  export const lightBlue900: string;
  export const lightBlueA100: string;
  export const lightBlueA200: string;
  export const lightBlueA400: string;
  export const lightBlueA700: string;

  export const cyan50: string;
  export const cyan100: string;
  export const cyan200: string;
  export const cyan300: string;
  export const cyan400: string;
  export const cyan500: string;
  export const cyan600: string;
  export const cyan700: string;
  export const cyan800: string;
  export const cyan900: string;
  export const cyanA100: string;
  export const cyanA200: string;
  export const cyanA400: string;
  export const cyanA700: string;

  export const teal50: string;
  export const teal100: string;
  export const teal200: string;
  export const teal300: string;
  export const teal400: string;
  export const teal500: string;
  export const teal600: string;
  export const teal700: string;
  export const teal800: string;
  export const teal900: string;
  export const tealA100: string;
  export const tealA200: string;
  export const tealA400: string;
  export const tealA700: string;

  export const green50: string;
  export const green100: string;
  export const green200: string;
  export const green300: string;
  export const green400: string;
  export const green500: string;
  export const green600: string;
  export const green700: string;
  export const green800: string;
  export const green900: string;
  export const greenA100: string;
  export const greenA200: string;
  export const greenA400: string;
  export const greenA700: string;

  export const lightGreen50: string;
  export const lightGreen100: string;
  export const lightGreen200: string;
  export const lightGreen300: string;
  export const lightGreen400: string;
  export const lightGreen500: string;
  export const lightGreen600: string;
  export const lightGreen700: string;
  export const lightGreen800: string;
  export const lightGreen900: string;
  export const lightGreenA100: string;
  export const lightGreenA200: string;
  export const lightGreenA400: string;
  export const lightGreenA700: string;

  export const lime50: string;
  export const lime100: string;
  export const lime200: string;
  export const lime300: string;
  export const lime400: string;
  export const lime500: string;
  export const lime600: string;
  export const lime700: string;
  export const lime800: string;
  export const lime900: string;
  export const limeA100: string;
  export const limeA200: string;
  export const limeA400: string;
  export const limeA700: string;

  export const yellow50: string;
  export const yellow100: string;
  export const yellow200: string;
  export const yellow300: string;
  export const yellow400: string;
  export const yellow500: string;
  export const yellow600: string;
  export const yellow700: string;
  export const yellow800: string;
  export const yellow900: string;
  export const yellowA100: string;
  export const yellowA200: string;
  export const yellowA400: string;
  export const yellowA700: string;

  export const amber50: string;
  export const amber100: string;
  export const amber200: string;
  export const amber300: string;
  export const amber400: string;
  export const amber500: string;
  export const amber600: string;
  export const amber700: string;
  export const amber800: string;
  export const amber900: string;
  export const amberA100: string;
  export const amberA200: string;
  export const amberA400: string;
  export const amberA700: string;

  export const orange50: string;
  export const orange100: string;
  export const orange200: string;
  export const orange300: string;
  export const orange400: string;
  export const orange500: string;
  export const orange600: string;
  export const orange700: string;
  export const orange800: string;
  export const orange900: string;
  export const orangeA100: string;
  export const orangeA200: string;
  export const orangeA400: string;
  export const orangeA700: string;

  export const deepOrange50: string;
  export const deepOrange100: string;
  export const deepOrange200: string;
  export const deepOrange300: string;
  export const deepOrange400: string;
  export const deepOrange500: string;
  export const deepOrange600: string;
  export const deepOrange700: string;
  export const deepOrange800: string;
  export const deepOrange900: string;
  export const deepOrangeA100: string;
  export const deepOrangeA200: string;
  export const deepOrangeA400: string;
  export const deepOrangeA700: string;

  export const brown50: string;
  export const brown100: string;
  export const brown200: string;
  export const brown300: string;
  export const brown400: string;
  export const brown500: string;
  export const brown600: string;
  export const brown700: string;
  export const brown800: string;
  export const brown900: string;

  export const blueGrey50: string;
  export const blueGrey100: string;
  export const blueGrey200: string;
  export const blueGrey300: string;
  export const blueGrey400: string;
  export const blueGrey500: string;
  export const blueGrey600: string;
  export const blueGrey700: string;
  export const blueGrey800: string;
  export const blueGrey900: string;

  export const grey50: string;
  export const grey100: string;
  export const grey200: string;
  export const grey300: string;
  export const grey400: string;
  export const grey500: string;
  export const grey600: string;
  export const grey700: string;
  export const grey800: string;
  export const grey900: string;

  export const black: string;
  export const white: string;

  export const transparent: string;
  export const fullBlack: string;
  export const darkBlack: string;
  export const lightBlack: string;
  export const minBlack: string;
  export const faintBlack: string;
  export const fullWhite: string;
  export const darkWhite: string;
  export const lightWhite: string;
}

should we generate icons files via script?

TypeScript Version: 2.0.0

Typeings Version: master

Issue:
material-ui has a lot of svg icons files; is there a way to declare them all at once, or should we consider using a script to generate them in a batch process?

(Undocumented) property "label" is missing on RadioButton

TypeScript Version: 2.0.2

Typings Version: master

Issue:
Error:

error TS2339: Property 'label' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RadioButton> & RadioButtonProps & { children?: Rea...'.

It's not documented but appears in the example code (and works flawlessly), see docs

Code:

<RadioButton label="Label!" value="value" />

(Undocumented) property "autoFocus" is missing on TextField

TypeScript Version: 2.0.2

Typings Version: master

Issue:
This property is pretty obscure, the best reference I've seen so far was at StackOverflow. It's not present in the docs, not even in the examples. Still works fine.

Code:

<TextField hintText="Search for something"
           autoFocus
           onKeyDown={this.handleKeyDownSearch.bind(this)} />

Possible fix:

export interface TextFieldProps extends TextFieldCommonProps {
  // [...]
  autoFocus?: boolean;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.