mui-tel-input 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,20 @@
1
1
  <div align="center">
2
- <h1>Mui-tel-input</h1>
2
+ <h1>MUI tel input</h1>
3
3
  <p>A phone number input designed for the React library <a href="https://mui.com/">MUI</a></p>
4
4
  </div>
5
5
  <div align="center">
6
+
7
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/viclafouch/mui-tel-input/blob/master/LICENSE)
8
+ ![ts](https://badgen.net/badge/Built%20With/TypeScript/blue)
9
+ [![npm](https://img.shields.io/npm/v/mui-tel-input)](https://www.npmjs.com/package/mui-tel-input)
10
+ [![CircleCI](https://circleci.com/gh/viclafouch/mui-tel-input/tree/master.svg?style=svg)](https://circleci.com/gh/viclafouch/mui-tel-input/tree/master)
6
11
 
7
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/viclafouch/mui-tel-input/blob/master/LICENSE)
12
+ <div align="center">
13
+ <img src="https://github.com/viclafouch/mui-tel-input/blob/master/mui-tel-input.gif" width="100%" />
14
+ </div>
8
15
 
16
+ ## ➡️ ➡ ➡️ [DEMO](https://codesandbox.io/s/mui-tel-input-p7b2jz) ⬅️ ⬅️ ⬅️
17
+
9
18
  </div>
10
19
 
11
20
  ## Installation
@@ -66,17 +75,19 @@ const MyComponent = () => {
66
75
  | Name | Type | Description |
67
76
  | --------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
68
77
  | `value` | `string` | The phone number value (**Required**) |
69
- | `onChange` | `(value, info) => void` | Gets called once the user updates the input or selects a new country. | `defaultCountry?` | `string` | [Country code](#country-code) to be displayed on mount.
70
- | `onlyCountries?` | `array` | [Country codes](#country-code) to be included. | `excludedCountries?` | `array` | [Country codes](#country-code) to be excluded.
78
+ | `onChange?` | `(value, info) => void` | Gets called once the user updates the input or selects a new country. | `defaultCountry?` | `string` | [Country code](#country-code) to be displayed on mount.
79
+ | `onlyCountries?` | `array` | [Country codes](#country-code) to be included.
80
+ | `excludedCountries?` | `array` | [Country codes](#country-code) to be excluded. |
71
81
  | `preferredCountries?` | `array` | [Country codes](#country-code) to be highlighted to the top of the list of countries.
72
82
  | `continents?` | `array` | [Continent codes](#continent-code) to include a list of countries.
73
83
  | `forceCallingCode?` | `boolean` | Force the calling code (e.g: `+33`) to be displayed so the value cannot be empty. Default `false`.
74
84
  | `focusOnSelectCountry?` | `boolean` | Autofocus the input when the user selects a country in the list. Default `false`.
75
85
  | `disableDropdown?` | `boolean` | No country list / The current flag is a `span` instead of a `button`. Default `false`.
86
+ | `disableFormatting?` | `boolean` | Remove format (spaces..) from the input value. Default `false`.
76
87
  | `langOfCountryName?` | `string` | An Intl locale to translate countries (see [Intl locales](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames)). Default `en`.
77
88
  | `MenuProps?` | [Menu API](https://mui.com/api/menu) | Props for the Menu component.
78
89
  | `ref?` | `React.Ref<HTMLDivElement>` | A ref pointing to the [Mui TextField component](https://mui.com/components/text-fields/).
79
- | [TextField Props](#inheritance) | |
90
+ | [TextField Props](#inheritance) | |
80
91
 
81
92
  ### Inheritance
82
93
 
@@ -91,7 +102,7 @@ This library supports all [officially assigned](https://en.wikipedia.org/wiki/IS
91
102
 
92
103
  ## Continent code
93
104
 
94
- | Code | Continent
105
+ | Code | Continent
95
106
  | --------------- | -------------------------------
96
107
  | AF | Africa
97
108
  | AS | Asia