intl-tel-input 25.14.1 → 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.
Files changed (98) hide show
  1. package/README.md +21 -19
  2. package/angular/README.md +1 -1
  3. package/angular/build/IntlTelInput.js +1 -1
  4. package/angular/build/IntlTelInputWithUtils.js +125 -186
  5. package/build/css/intlTelInput-no-assets.css +1259 -0
  6. package/build/css/intlTelInput-no-assets.min.css +1 -0
  7. package/build/css/intlTelInput.css +6 -4
  8. package/build/css/intlTelInput.min.css +1 -1
  9. package/build/js/data.js +1 -1
  10. package/build/js/data.min.js +1 -1
  11. package/build/js/i18n/zh-hk/countries.js +245 -0
  12. package/build/js/i18n/zh-hk/index.js +5 -0
  13. package/build/js/i18n/zh-hk/interface.js +14 -0
  14. package/build/js/intlTelInput.js +2 -2
  15. package/build/js/intlTelInput.min.js +2 -2
  16. package/build/js/intlTelInputWithUtils.js +126 -187
  17. package/build/js/intlTelInputWithUtils.min.js +2 -2
  18. package/build/js/utils.js +53 -54
  19. package/package.json +2 -2
  20. package/react/README.md +4 -2
  21. package/react/build/IntlTelInput.cjs +1 -1
  22. package/react/build/IntlTelInput.js +1 -1
  23. package/react/build/IntlTelInputWithUtils.cjs +125 -186
  24. package/react/build/IntlTelInputWithUtils.js +125 -186
  25. package/svelte/README.md +7 -9
  26. package/svelte/build/IntlTelInput.mjs +1329 -1329
  27. package/svelte/build/IntlTelInputWithUtils.mjs +1829 -1890
  28. package/vue/README.md +7 -9
  29. package/vue/build/IntlTelInput.mjs +1 -1
  30. package/vue/build/IntlTelInput.vue.d.ts +34 -0
  31. package/vue/build/IntlTelInputWithUtils.mjs +125 -186
  32. package/vue/build/IntlTelInputWithUtils.vue.d.ts +34 -0
  33. package/vue/build/exports/IntlTelInput.d.ts +3 -0
  34. package/vue/build/exports/IntlTelInput.mjs +66 -0
  35. package/vue/build/exports/IntlTelInputWithUtils.d.ts +3 -0
  36. package/vue/build/exports/IntlTelInputWithUtils.mjs +6207 -0
  37. package/vue/build/intl-tel-input/data.d.ts +18 -0
  38. package/vue/build/intl-tel-input/i18n/ar/index.d.ts +3 -0
  39. package/vue/build/intl-tel-input/i18n/bg/index.d.ts +3 -0
  40. package/vue/build/intl-tel-input/i18n/bn/index.d.ts +3 -0
  41. package/vue/build/intl-tel-input/i18n/bs/index.d.ts +3 -0
  42. package/vue/build/intl-tel-input/i18n/ca/index.d.ts +3 -0
  43. package/vue/build/intl-tel-input/i18n/cs/index.d.ts +3 -0
  44. package/vue/build/intl-tel-input/i18n/da/index.d.ts +3 -0
  45. package/vue/build/intl-tel-input/i18n/de/index.d.ts +3 -0
  46. package/vue/build/intl-tel-input/i18n/ee/index.d.ts +3 -0
  47. package/vue/build/intl-tel-input/i18n/el/index.d.ts +3 -0
  48. package/vue/build/intl-tel-input/i18n/en/index.d.ts +3 -0
  49. package/vue/build/intl-tel-input/i18n/es/index.d.ts +3 -0
  50. package/vue/build/intl-tel-input/i18n/fa/index.d.ts +3 -0
  51. package/vue/build/intl-tel-input/i18n/fi/index.d.ts +3 -0
  52. package/vue/build/intl-tel-input/i18n/fr/index.d.ts +3 -0
  53. package/vue/build/intl-tel-input/i18n/hi/index.d.ts +3 -0
  54. package/vue/build/intl-tel-input/i18n/hr/index.d.ts +3 -0
  55. package/vue/build/intl-tel-input/i18n/hu/index.d.ts +3 -0
  56. package/vue/build/intl-tel-input/i18n/id/index.d.ts +3 -0
  57. package/vue/build/intl-tel-input/i18n/index.d.ts +43 -0
  58. package/vue/build/intl-tel-input/i18n/it/index.d.ts +3 -0
  59. package/vue/build/intl-tel-input/i18n/ja/index.d.ts +3 -0
  60. package/vue/build/intl-tel-input/i18n/ko/index.d.ts +3 -0
  61. package/vue/build/intl-tel-input/i18n/lt/index.d.ts +3 -0
  62. package/vue/build/intl-tel-input/i18n/mr/index.d.ts +3 -0
  63. package/vue/build/intl-tel-input/i18n/nl/index.d.ts +3 -0
  64. package/vue/build/intl-tel-input/i18n/no/index.d.ts +3 -0
  65. package/vue/build/intl-tel-input/i18n/pl/index.d.ts +3 -0
  66. package/vue/build/intl-tel-input/i18n/pt/index.d.ts +3 -0
  67. package/vue/build/intl-tel-input/i18n/ro/index.d.ts +3 -0
  68. package/vue/build/intl-tel-input/i18n/ru/index.d.ts +3 -0
  69. package/vue/build/intl-tel-input/i18n/sk/index.d.ts +3 -0
  70. package/vue/build/intl-tel-input/i18n/sl/index.d.ts +3 -0
  71. package/vue/build/intl-tel-input/i18n/sq/index.d.ts +3 -0
  72. package/vue/build/intl-tel-input/i18n/sr/index.d.ts +3 -0
  73. package/vue/build/intl-tel-input/i18n/sv/index.d.ts +3 -0
  74. package/vue/build/intl-tel-input/i18n/te/index.d.ts +3 -0
  75. package/vue/build/intl-tel-input/i18n/th/index.d.ts +3 -0
  76. package/vue/build/intl-tel-input/i18n/tr/index.d.ts +3 -0
  77. package/vue/build/intl-tel-input/i18n/types.d.ts +10 -0
  78. package/vue/build/intl-tel-input/i18n/uk/index.d.ts +3 -0
  79. package/vue/build/intl-tel-input/i18n/ur/index.d.ts +3 -0
  80. package/vue/build/intl-tel-input/i18n/uz/index.d.ts +3 -0
  81. package/vue/build/intl-tel-input/i18n/vi/index.d.ts +3 -0
  82. package/vue/build/intl-tel-input/i18n/zh/index.d.ts +3 -0
  83. package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
  84. package/vue/build/intl-tel-input-f0-6rrpA.mjs +3081 -0
  85. package/vue/build/intl-tel-input.d.ts +97 -0
  86. package/vue/build/modules/constants.d.ts +85 -0
  87. package/vue/build/modules/core/countrySearch.d.ts +17 -0
  88. package/vue/build/modules/core/icons.d.ts +9 -0
  89. package/vue/build/modules/core/options.d.ts +3 -0
  90. package/vue/build/modules/core/ui.d.ts +45 -0
  91. package/vue/build/modules/data/country-data.d.ts +12 -0
  92. package/vue/build/modules/data/nanp-regionless.d.ts +2 -0
  93. package/vue/build/modules/format/caret.d.ts +1 -0
  94. package/vue/build/modules/format/formatting.d.ts +3 -0
  95. package/vue/build/modules/types/events.d.ts +9 -0
  96. package/vue/build/modules/types/public-api.d.ts +79 -0
  97. package/vue/build/modules/utils/dom.d.ts +6 -0
  98. package/vue/build/modules/utils/string.d.ts +2 -0
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # International Telephone Input [![CI](https://github.com/jackocnr/intl-tel-input/actions/workflows/ci.yml/badge.svg?branch=master)](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
- <img src="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/vue-icon.png" alt="Vue logo" width="16" /> NEWS: we now have our own <a href="https://github.com/jackocnr/intl-tel-input/tree/master/vue">Vue component</a>!
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
- <img src="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/react.webp" alt="React logo" width="16" /> NEWS: we now have our own <a href="https://github.com/jackocnr/intl-tel-input/tree/master/react">React component</a>! Play with it on <a href="https://intl-tel-input.com/storybook/?path=/docs/intltelinput--vanilla">Storybook</a>.
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 Angular Components](#react-vue-and-angular-components)
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 Angular Components
48
- We now provide React, Vue and Angular components alongside the regular JavaScript plugin. This readme is for the JavaScript plugin. View the [React Component readme](https://github.com/jackocnr/intl-tel-input/blob/master/react/README.md), the [Vue Component readme](https://github.com/jackocnr/intl-tel-input/blob/master/vue/README.md) or the [Angular Component readme](https://github.com/jackocnr/intl-tel-input/blob/master/angular/README.md).
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
- You can view [a live demo](https://intl-tel-input.com) and see some examples of how to use the various options. Alternatively, try it for yourself by downloading the project and opening demo.html in a browser.
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 Angular components also included
71
- * Translations for country names (etc) provided in over 40 languages, and support for RTL layout
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.14.1/build/css/intlTelInput.css">
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.14.1/build/js/intlTelInput.min.js"></script>
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.14.1/build/js/utils.js"),
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.14.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.
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.14.1/build/js/utils.js"),
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.14.1/build/js/utils.js"`.
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.14.1"
3878
+ version: "25.15.1"
3879
3879
  });
3880
3880
  var intl_tel_input_default = intlTelInput;
3881
3881