npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ambiot/material-ui-phone-field

v0.2.0

Published

Simple React phone input field based on [Material-UI](https://material-ui.com/), [`i18n-iso-countries`](https://www.npmjs.com/package/i18n-iso-countries) and [`libphonenumber-js`](https://www.npmjs.com/package/libphonenumber-js). **Overall look and feel w

Downloads

6

Readme

Material-UI Phone Field

Simple React phone input field based on Material-UI, i18n-iso-countries and libphonenumber-js. Overall look and feel will change when we add country flags.

Installation

To install the component run this command:

npm i -S @ambiot/material-ui-phone-field

API

PhoneField (default export)

| Prop Name | Type | Default | Description | | -------------- | ----------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | value | string | empty string | Accepts plain phone number, without any formatting. For example, +79031234567 | | onChange | (value: string) => void, required | — | Callback when user changes the input. Returns plain phone number without any formatting. If user didn't choose the country, returns just the value of the text field. If user did, returns text field value with plus sign and country calling code prepended. | | defaultCountry | string | null | ISO country code to be selected by default | | fullWidth | boolean | false | If true, field will take 100% of the available width. | | language | string | en | Language in which country names are displayed. Currently supports only en and ru values for English and Russian language respectively. |

To-Do

  • [ ] Correctly expose registerLocale method of i18n-iso-countries without increasing the bundle size, so user can required languages manually.
  • [ ] Add country flags to Select field from the flags folder. See this TSDX issue and this StackOverflow question.

Contributing

The package is built using TSDX. Refer to its documentation if you need some advanced stuff. Here's simple stuff:

  1. Clone the repository: git clone https://github.com/ambiot-llc/material-ui-phone-field.git
  2. Get inside the folder: cd material-ui-phone-field
  3. Install all the general dependencies: npm install
  4. Run TSDX watcher using npm start
  5. Open another terminal and get inside the example folder: cd example
  6. Install all dependencies needed to launch the example: npm install
  7. Run npm start to launch the example app
  8. Library is located in src. Edit the code and watch the changes in the browser