3.1.1 • Published 4 months ago

input-material-ui v3.1.1

Weekly downloads
91,444
License
MIT
Repository
github
Last release
4 months ago

input-material-ui Weekly downloads

A material-ui INPUT component which allows to see/hide the password text of the field and to clear the input value


Demo

You can access the storybook for this component here.

Props

The component accepts the props defined bellow in the table.

Props accepted by InputMaterialUi

NameTypeRequiredDefaultDescription
FormHelperTextPropsFormHelperTextPropsnoundefinedThe props passed to helper text
helperTextstringnoundefinedThe helper text
idstringnoundefinedThe id of the field
InputLabelPropsInputLabelPropsnoundefinedThe Props passed to label
InputPropsInputPropsnoundefinedThe props passed to input field
labelstringyes-The label of the field
onChange(value: string) => voidyes-The callback function called when the value is changed
placeholderstringnoundefinedThe placeholder of the field
typestringnotextThe type of the field; ex. text, password
valuestringnoundefinedThe value of the field

Versions

InputMaterialUi usesMaterial-uiReact
1.0.x3.2.016.5.2
1.1.x3.6.016.6.3
1.2.x3.9.216.8.1
1.3.x3.9.316.8.6
2.0.x4.0.216.8.6
2.1.x4.2.016.8.6
2.2.x4.3.216.9.0
2.3.x4.9.016.9.0
2.4.x4.9.716.9.0
2.5.x4.10.216.9.0
2.6.x4.11.016.9.0
2.7.x4.11.316.9.0 or 17.0.0
2.8.x4.11.316.9.0 or 17.0.0
2.9.x4.12.316.9.0 or 17.0.0
3.0.x5.10.17>=18.0.0

About versioning schema used for InputMaterialUi

  • Major - it will be increased if the major version of the dependat package changes or there are breaking changes in the code of InputMaterialUi
  • Minor - it will be increased if no major version of the dependat package changes, but there are changes of the minor or patch versions of it
  • Patch - it will be increased if there are no changes of the dependat packages, but there are non breaking changes in the code of InputMaterialUi

Example

The base component which allows to create an input with a visible or masked input:

import * as React from 'react';
import InputMaterialUi from 'input-material-ui';

class App extends React.Component {
  render() {
    return (
      <div className="App">
        <InputMaterialUi
          type="text"
          label="Account"
          placeholder="contains this text"
          value={value}
          onChange={onChange}
        />
      </div>
    );
  }

  handleChange = (event: any) => {
    console.log(event);
  };
}

export default App;
import * as React from 'react';
import InputMaterialUi from 'input-material-ui';

class App extends React.Component {
  render() {
    return (
      <div className="App">
        <InputMaterialUi type="password" label="Password" onChange={onChange} />
      </div>
    );
  }

  handleChange = (event: any) => {
    console.log(event);
  };
}

export default App;

Changelog

1.0.0

  • input-material-ui is made publicly available

1.0.1

  • Replaced fontawesome icon with an svg icon

1.0.3

  • Fixed display of remove value when the field has a value

1.0.5

  • Fixed the bug related to switching between being uncontroled/controled

1.1.0

  • Updated the react and material-ui package

1.1.1

  • Fixed the controlled mode for input

1.2.0

  • Updated packages

1.2.1

  • The input field received a name automatically. The name is created by doing kebabCase from the first defined of: id, label or placeholder.
  • Fixed the height of the input field to do not cut the letter 'g' or 'y'

1.3.0

  • Updated packages

2.0.0

  • Updated packages

2.0.1

  • Added the possibility to display a helper text
  • Added new props for passing props to input field, label and helper text
  • Added a storybook for this component

2.1.0

  • Updated packages

2.2.0

  • Updated packages

2.3.0

  • Updated packages

2.4.0

  • Updated packages
  • Moved from npm to yarn

2.5.0

  • Updated packages

2.6.0

  • Updated packages

2.6.1

  • Fixed crash produced by "export * from"

2.7.0

  • Accepting React 17 as peerDependencies
  • Fixed security warnings

2.8.0

  • Added support for defaultValue

2.9.0

  • Updated the packages

3.0.0

  • Migrated to material-ui 5
  • Supports minimum React 18
3.1.1

4 months ago

3.1.0

4 months ago

3.0.0

1 year ago

2.9.0

3 years ago

2.8.0

3 years ago

2.7.0

3 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago