intl-tel-input 25.15.0 → 25.15.1
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 +21 -19
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +1 -1
- package/angular/build/IntlTelInputWithUtils.js +125 -186
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/i18n/zh-hk/countries.js +245 -0
- package/build/js/i18n/zh-hk/index.js +5 -0
- package/build/js/i18n/zh-hk/interface.js +14 -0
- package/build/js/intlTelInput.js +2 -2
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +126 -187
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/build/js/utils.js +53 -54
- package/package.json +2 -2
- package/react/README.md +4 -2
- package/react/build/IntlTelInput.cjs +1 -1
- package/react/build/IntlTelInput.js +1 -1
- package/react/build/IntlTelInputWithUtils.cjs +125 -186
- package/react/build/IntlTelInputWithUtils.js +125 -186
- package/svelte/README.md +7 -9
- package/svelte/build/IntlTelInput.mjs +1329 -1329
- package/svelte/build/IntlTelInputWithUtils.mjs +1829 -1890
- package/vue/README.md +7 -9
- package/vue/build/IntlTelInput.mjs +1 -1
- package/vue/build/IntlTelInputWithUtils.mjs +125 -186
- package/vue/build/exports/IntlTelInput.mjs +1 -1
- package/vue/build/exports/IntlTelInputWithUtils.mjs +1 -1
- package/vue/build/intl-tel-input/data.d.ts +18 -0
- package/vue/build/intl-tel-input/i18n/ar/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bg/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bn/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bs/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ca/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/cs/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/da/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/de/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ee/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/el/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/en/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/es/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fa/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hu/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/id/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/index.d.ts +43 -0
- package/vue/build/intl-tel-input/i18n/it/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ja/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ko/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/lt/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/mr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/nl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/no/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/pl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/pt/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ro/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ru/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sk/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sq/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sv/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/te/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/th/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/tr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/types.d.ts +10 -0
- package/vue/build/intl-tel-input/i18n/uk/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ur/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/uz/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/vi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/zh/index.d.ts +3 -0
- package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
- package/vue/build/{intl-tel-input-Db39yQmC.mjs → intl-tel-input-f0-6rrpA.mjs} +136 -138
- package/vue/build/modules/core/ui.d.ts +0 -1
- package/vue/build/modules/format/formatting.d.ts +1 -1
- package/vue/build/modules/types/public-api.d.ts +2 -1
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# International Telephone Input [](https://github.com/jackocnr/intl-tel-input/actions/workflows/ci.yml) <img src="https://img.shields.io/github/package-json/v/jackocnr/intl-tel-input.svg" alt="version"/> <img src="https://img.shields.io/npm/dm/intl-tel-input.svg" alt="downloads"/>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
🗣️ NEWS: [v26.0.0-beta.0](https://github.com/jackocnr/intl-tel-input/releases/tag/v26.0.0-beta.0) released, with support for:
|
|
4
|
+
- Autocomplete
|
|
5
|
+
- TypeScript types for the Vue component
|
|
6
|
+
- Country names now generated with `Intl.DisplayNames` (reduced bundle size)
|
|
7
|
+
- A more easily customisable globe icon SVG
|
|
8
|
+
- Modernised CSS
|
|
9
|
+
- More control over number extensions
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<img src="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/angular.png" alt="Angular logo" width="16" /> NEWS: we now have our own <a href="https://github.com/jackocnr/intl-tel-input/tree/master/angular">Angular component</a>!
|
|
8
|
-
|
|
9
|
-
🗣️ NEWS: we now provide [translations](#translations) in over 40 languages! [See them in action](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--i18n).
|
|
10
|
-
|
|
11
|
-
International Telephone Input is a JavaScript plugin for entering and validating international telephone numbers. It takes a regular input field, adds a searchable country dropdown, auto-detects the user's country, displays a relevant placeholder number, formats the number as you type, and provides comprehensive validation methods. React, Vue and Angular components are also included.
|
|
11
|
+
International Telephone Input is a JavaScript plugin for entering and validating international telephone numbers. It takes a regular input field, adds a searchable country dropdown, auto-detects the user's country, displays a relevant placeholder number, formats the number as you type, and provides comprehensive validation methods. [React](https://github.com/jackocnr/intl-tel-input/blob/master/react/README.md), [Vue](https://github.com/jackocnr/intl-tel-input/blob/master/vue/README.md), [Angular](https://github.com/jackocnr/intl-tel-input/blob/master/angular/README.md) and [Svelte (beta)](https://github.com/jackocnr/intl-tel-input/blob/master/svelte/README.md) components are also included.
|
|
12
12
|
|
|
13
13
|
<picture>
|
|
14
14
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/vanilla-dark.png">
|
|
@@ -25,7 +25,7 @@ Use [Twilio's API to build phone verification, SMS 2FA, appointment reminders, m
|
|
|
25
25
|
|
|
26
26
|
## Table of Contents
|
|
27
27
|
|
|
28
|
-
- [React, Vue and
|
|
28
|
+
- [React, Vue, Angular and Svelte Components](#react-vue-angular-and-svelte-components)
|
|
29
29
|
- [Demo and Examples](#demo-and-examples)
|
|
30
30
|
- [Mobile](#mobile)
|
|
31
31
|
- [Features](#features)
|
|
@@ -44,11 +44,13 @@ Use [Twilio's API to build phone verification, SMS 2FA, appointment reminders, m
|
|
|
44
44
|
- [Contributing](#contributing)
|
|
45
45
|
- [Attributions](#attributions)
|
|
46
46
|
|
|
47
|
-
## React, Vue and
|
|
48
|
-
We now provide React, Vue and
|
|
47
|
+
## React, Vue, Angular and Svelte Components
|
|
48
|
+
We now provide React, Vue, Angular and Svelte (beta) components alongside the regular JavaScript plugin. This readme is for the JavaScript plugin. View the [React Component](https://github.com/jackocnr/intl-tel-input/blob/master/react/README.md), the [Vue Component](https://github.com/jackocnr/intl-tel-input/blob/master/vue/README.md) the [Angular Component](https://github.com/jackocnr/intl-tel-input/blob/master/angular/README.md), or the [Svelte component (beta)](https://github.com/jackocnr/intl-tel-input/blob/master/svelte/README.md).
|
|
49
49
|
|
|
50
50
|
## Demo and Examples
|
|
51
|
-
|
|
51
|
+
View the [live demo](https://intl-tel-input.com) for examples of how to use the various options, along with the relevant code snippets. Or play with the options yourself on [Storybook](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--vanilla).
|
|
52
|
+
|
|
53
|
+
Alternatively, download and build the project yourself in 3 simple steps. You just need to initialise the submodules with `git submodule update --init --recursive`, then run `npm install`, and then `npm run build`. You should now be able to open the included demo.html in your browser and have a working plugin!
|
|
52
54
|
|
|
53
55
|
## Mobile
|
|
54
56
|
By default, on mobile devices, we show a fullscreen popup instead of the inline dropdown to make better use of the limited screen space. This is similar to how a native `<select>` element works. You can control this behaviour with the `useFullscreenPopup` option. The popup can be closed by either selecting a country from the list or by tapping on the grey area on the sides. [See example](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--usefullscreenpopup) (using the React component).
|
|
@@ -67,8 +69,8 @@ By default, on mobile devices, we show a fullscreen popup instead of the inline
|
|
|
67
69
|
* Accessibility provided via ARIA tags
|
|
68
70
|
* Typescript type definitions included
|
|
69
71
|
* Easily customise styles by overriding CSS variables, e.g. support dark mode
|
|
70
|
-
* React, Vue, and
|
|
71
|
-
* Translations
|
|
72
|
+
* React, Vue, Angular and Svelte components also included
|
|
73
|
+
* Translations provided in over 40 languages, as well as support for RTL layout and alternative numeral sets
|
|
72
74
|
* Lots of initialisation options for customisation, as well as instance methods/events for interaction
|
|
73
75
|
|
|
74
76
|
## Browser Compatibility
|
|
@@ -81,16 +83,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because
|
|
|
81
83
|
## Getting Started (Using a CDN)
|
|
82
84
|
1. Add the CSS
|
|
83
85
|
```html
|
|
84
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.
|
|
86
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.1/build/css/intlTelInput.css">
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
2. Add the plugin script and initialise it on your input element
|
|
88
90
|
```html
|
|
89
|
-
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.
|
|
91
|
+
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.1/build/js/intlTelInput.min.js"></script>
|
|
90
92
|
<script>
|
|
91
93
|
const input = document.querySelector("#phone");
|
|
92
94
|
window.intlTelInput(input, {
|
|
93
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.
|
|
95
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.1/build/js/utils.js"),
|
|
94
96
|
});
|
|
95
97
|
</script>
|
|
96
98
|
```
|
|
@@ -328,12 +330,12 @@ Set the initial country selection by specifying its country code, e.g. `"us"` fo
|
|
|
328
330
|
Type: `() => Promise<module>` Default: `null`
|
|
329
331
|
This is one way to lazy load the included utils.js (to enable formatting/validation, etc) - see [Loading The Utilities Script](#loading-the-utilities-script) for more options.
|
|
330
332
|
|
|
331
|
-
The `loadUtils` option takes a function that returns a Promise resolving to the utils module (see example code below). You can `import` the utils module in different ways: (A) from a CDN, (B) from your own hosted version of [utils.js](https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.
|
|
333
|
+
The `loadUtils` option takes a function that returns a Promise resolving to the utils module (see example code below). You can `import` the utils module in different ways: (A) from a CDN, (B) from your own hosted version of [utils.js](https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.1/build/js/utils.js), or (C) if you use a bundler like Webpack, Vite or Parcel, you can import it directly from the package.
|
|
332
334
|
|
|
333
335
|
```js
|
|
334
336
|
// (A) import utils module from a CDN
|
|
335
337
|
intlTelInput(htmlInputElement, {
|
|
336
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.
|
|
338
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.1/build/js/utils.js"),
|
|
337
339
|
});
|
|
338
340
|
|
|
339
341
|
// (B) import utils module from your own hosted version of utils.js
|
package/angular/README.md
CHANGED
|
@@ -54,7 +54,7 @@ import "intl-tel-input/styles";
|
|
|
54
54
|
|
|
55
55
|
See the [validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/angular/demo/validation/validation.component.ts) for a more fleshed-out example of how to handle validation, or check out the [form demo](https://github.com/jackocnr/intl-tel-input/blob/master/angular/demo/form/form.component.ts) for an alternative approach using `ReactiveFormsModule`.
|
|
56
56
|
|
|
57
|
-
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just `import { IntlTelInputComponent } from "intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.
|
|
57
|
+
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just `import { IntlTelInputComponent } from "intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.15.1/build/js/utils.js"`.
|
|
58
58
|
|
|
59
59
|
## Props
|
|
60
60
|
|
|
@@ -3875,7 +3875,7 @@ var intlTelInput = Object.assign((input, options) => {
|
|
|
3875
3875
|
attachUtils,
|
|
3876
3876
|
startedLoadingUtilsScript: false,
|
|
3877
3877
|
startedLoadingAutoCountry: false,
|
|
3878
|
-
version: "25.15.
|
|
3878
|
+
version: "25.15.1"
|
|
3879
3879
|
});
|
|
3880
3880
|
var intl_tel_input_default = intlTelInput;
|
|
3881
3881
|
|