vue-tel-input 6.0.0-beta.7 → 6.0.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/.editorconfig +7 -0
- package/.eslintrc.cjs +11 -0
- package/.github/FUNDING.yml +12 -0
- package/README.md +44 -38
- package/dist/css/sprite.css +0 -0
- package/dist/vue-tel-input.cjs.js +9 -0
- package/dist/vue-tel-input.css +1 -1
- package/dist/vue-tel-input.es.js +4205 -0
- package/dist/vue-tel-input.iife.js +11 -0
- package/env.d.ts +1 -0
- package/examples/browser.html +30 -0
- package/examples/module/App.vue +77 -0
- package/examples/module/index.html +13 -0
- package/examples/module/main.ts +8 -0
- package/package.json +33 -39
- package/src/assets/all-countries.js +1238 -0
- package/src/assets/component.css +98 -0
- package/src/assets/sprite.css +1071 -0
- package/src/components/vue-tel-input.test.js +261 -0
- package/src/components/vue-tel-input.vue +623 -0
- package/src/directives/click-outside.js +24 -0
- package/src/index.js +34 -0
- package/src/utils.js +291 -0
- package/tsconfig.config.json +8 -0
- package/tsconfig.json +23 -0
- package/vite.config.ts +67 -0
- package/dist/demo.html +0 -10
- package/dist/vue-tel-input.common.js +0 -9798
- package/dist/vue-tel-input.common.js.map +0 -1
- package/dist/vue-tel-input.umd.js +0 -9808
- package/dist/vue-tel-input.umd.js.map +0 -1
- package/dist/vue-tel-input.umd.min.js +0 -2
- package/dist/vue-tel-input.umd.min.js.map +0 -1
package/.editorconfig
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: iamstevendao
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# vue-tel-input
|
|
2
|
+
|
|
2
3
|
International Telephone Input with Vue.
|
|
3
4
|
|
|
4
5
|
[](https://www.npmjs.com/package/vue-tel-input) [](https://github.com/iamstevendao/vue-tel-input)
|
|
@@ -12,9 +13,10 @@ International Telephone Input with Vue.
|
|
|
12
13
|
[Visit the website](https://iamstevendao.github.io/vue-tel-input/)
|
|
13
14
|
|
|
14
15
|
## Getting started
|
|
16
|
+
|
|
15
17
|
- Install the plugin:
|
|
16
18
|
|
|
17
|
-
```
|
|
19
|
+
```sh
|
|
18
20
|
npm install vue-tel-input
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -39,7 +41,9 @@ International Telephone Input with Vue.
|
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
## Installation
|
|
44
|
+
|
|
42
45
|
### npm
|
|
46
|
+
|
|
43
47
|
```bash
|
|
44
48
|
npm install vue-tel-input
|
|
45
49
|
```
|
|
@@ -53,6 +57,7 @@ import 'vue-tel-input/dist/vue-tel-input.css'
|
|
|
53
57
|
|
|
54
58
|
Vue.use(VueTelInput, options) // Define default global options here (optional)
|
|
55
59
|
```
|
|
60
|
+
|
|
56
61
|
> View all available options in [Props](https://iamstevendao.github.io/vue-tel-input/documentation/props.html).
|
|
57
62
|
|
|
58
63
|
Or use the component directly:
|
|
@@ -82,7 +87,7 @@ export default {
|
|
|
82
87
|
<link rel="stylesheet" href="https://unpkg.com/vue-tel-input/dist/vue-tel-input.css">
|
|
83
88
|
```
|
|
84
89
|
|
|
85
|
-
**
|
|
90
|
+
**If Vue is detected in the Page, the plugin is installed automatically.**
|
|
86
91
|
|
|
87
92
|
** Otherwise, manually install the plugin into Vue:
|
|
88
93
|
|
|
@@ -90,48 +95,49 @@ export default {
|
|
|
90
95
|
Vue.use(window['vue-tel-input']);
|
|
91
96
|
```
|
|
92
97
|
|
|
93
|
-
|
|
98
|
+
## Changelog
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
```html
|
|
97
|
-
<!-- tel-input.vue -->
|
|
98
|
-
<template>
|
|
99
|
-
<vue-tel-input v-model="value"></vue-tel-input>
|
|
100
|
-
</template>
|
|
101
|
-
|
|
102
|
-
<script>
|
|
103
|
-
import { abstractField } from 'vue-form-generator';
|
|
104
|
-
|
|
105
|
-
export default {
|
|
106
|
-
name: 'TelephoneInput',
|
|
107
|
-
mixins: [abstractField],
|
|
108
|
-
};
|
|
109
|
-
</script>
|
|
110
|
-
```
|
|
100
|
+
[Go to Github Releases](https://github.com/iamstevendao/vue-tel-input/releases)
|
|
111
101
|
|
|
112
|
-
|
|
113
|
-
```js
|
|
114
|
-
import Vue from 'vue';
|
|
115
|
-
import TelInput from '<path>/tel-input.vue';
|
|
102
|
+
## Development
|
|
116
103
|
|
|
117
|
-
|
|
118
|
-
```
|
|
104
|
+
Clone the project
|
|
119
105
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
fields: [{
|
|
124
|
-
type: "tel-input",
|
|
125
|
-
label: "Awesome (tel input)",
|
|
126
|
-
model: "telephone"
|
|
127
|
-
}]
|
|
128
|
-
};
|
|
129
|
-
```
|
|
130
|
-
Read more on `vue-form-generator`'s [instruction page](https://icebob.gitbooks.io/vueformgenerator/content/fields/custom_fields.html)
|
|
106
|
+
```bash
|
|
107
|
+
git clone https://github.com/iamstevendao/vue-tel-input.git
|
|
108
|
+
```
|
|
131
109
|
|
|
110
|
+
Go to the project directory & checkout the `next` branch
|
|
132
111
|
|
|
133
|
-
|
|
134
|
-
|
|
112
|
+
```bash
|
|
113
|
+
cd vue-tel-input
|
|
114
|
+
git checkout next origin/next
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Install dependencies
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm install
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Build the project
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm run build
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Start the es build example
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm run dev
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Start the browser build example
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npx http-server -p 8080
|
|
139
|
+
# 127.0.0.1:8080/examples/browser.html
|
|
140
|
+
```
|
|
135
141
|
|
|
136
142
|
## License
|
|
137
143
|
|
package/dist/css/sprite.css
CHANGED
|
File without changes
|