vue-tel-input 6.0.0-beta.5 → 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/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite App</title>
8
+ <script src="https://unpkg.com/vue@next"></script>
9
+ <script src="/dist/vue-tel-input.iife.js"></script>
10
+ <link rel="stylesheet" href="/dist/vue-tel-input.css"></link>
11
+ </head>
12
+ <body>
13
+ <div id="app"></div>
14
+ <script>
15
+ const app = Vue.createApp({
16
+ template: `
17
+ <h1> Hello Vue! </h1>
18
+ <vue-tel-input v-model="phone" />
19
+ `,
20
+ data() {
21
+ return {
22
+ phone: '123213123',
23
+ };
24
+ },
25
+ });
26
+ app.use(VueTelInput);
27
+ app.mount('#app');
28
+ </script>
29
+ </body>
30
+ </html>
@@ -0,0 +1,77 @@
1
+ <script>
2
+ export default {
3
+ name: 'App',
4
+ data() {
5
+ return {
6
+ phone: '123123123'
7
+ }
8
+ }
9
+ }
10
+ </script>
11
+
12
+ <template>
13
+ <div class="wrapper">
14
+ <vue-tel-input v-model="phone" />
15
+ </div>
16
+ </template>
17
+
18
+ <style>
19
+ #app {
20
+ max-width: 1280px;
21
+ margin: 0 auto;
22
+ padding: 2rem;
23
+
24
+ font-weight: normal;
25
+ }
26
+
27
+ header {
28
+ line-height: 1.5;
29
+ }
30
+
31
+ .logo {
32
+ display: block;
33
+ margin: 0 auto 2rem;
34
+ }
35
+
36
+ a,
37
+ .green {
38
+ text-decoration: none;
39
+ color: hsla(160, 100%, 37%, 1);
40
+ transition: 0.4s;
41
+ }
42
+
43
+ @media (hover: hover) {
44
+ a:hover {
45
+ background-color: hsla(160, 100%, 37%, 0.2);
46
+ }
47
+ }
48
+
49
+ @media (min-width: 1024px) {
50
+ body {
51
+ display: flex;
52
+ place-items: center;
53
+ }
54
+
55
+ #app {
56
+ display: grid;
57
+ grid-template-columns: 1fr 1fr;
58
+ padding: 0 2rem;
59
+ }
60
+
61
+ header {
62
+ display: flex;
63
+ place-items: center;
64
+ padding-right: calc(var(--section-gap) / 2);
65
+ }
66
+
67
+ header .wrapper {
68
+ display: flex;
69
+ place-items: flex-start;
70
+ flex-wrap: wrap;
71
+ }
72
+
73
+ .logo {
74
+ margin: 0 2rem 0 0;
75
+ }
76
+ }
77
+ </style>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite App</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="./main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,8 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue';
3
+ import { VueTelInput } from '../../dist/vue-tel-input.es.js';
4
+ import '../../dist/vue-tel-input.css';
5
+
6
+ const app = createApp(App);
7
+ app.component('VueTelInput', VueTelInput);
8
+ app.mount('#app');
package/package.json CHANGED
@@ -1,57 +1,51 @@
1
1
  {
2
2
  "name": "vue-tel-input",
3
- "version": "6.0.0-beta.5",
3
+ "version": "6.0.0",
4
4
  "description": "International Telephone Input with Vue",
5
5
  "author": "Steven Dao <iamstevendao@gmail.com>",
6
6
  "license": "MIT",
7
- "homepage": "https://iamstevendao.github.io/vue-tel-input/",
7
+ "homepage": "https://vue-tel-input.iamstevendao.com",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/iamstevendao/vue-tel-input.git"
11
11
  },
12
+ "main": "dist/vue-tel-input.cjs.js",
13
+ "module": "dist/vue-tel-input.es.js",
14
+ "unpkg": "dist/vue-tel-input.cjs.js",
15
+ "browser": "dist/vue-tel-input.iife.js",
12
16
  "scripts": {
13
- "serve": "vuepress dev docs",
14
- "build": "vue-cli-service build --target lib src/index.js",
15
- "docs:build": "vuepress build docs",
16
- "test:unit": "vue-cli-service test:unit",
17
- "lint": "vue-cli-service lint",
18
- "prepublishOnly": "npm run build"
17
+ "dev": "vite",
18
+ "build": "run-p type-check build-only",
19
+ "preview": "vite preview --port 4173",
20
+ "build-only": "vite build",
21
+ "type-check": "vue-tsc --noEmit",
22
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
23
+ "docs:dev": "vitepress dev docs",
24
+ "docs:build": "vitepress build docs",
25
+ "docs:serve": "vitepress serve docs"
19
26
  },
20
- "files": [
21
- "dist/"
22
- ],
23
- "main": "dist/vue-tel-input.umd.min.js",
24
- "unpkg": "dist/vue-tel-input.umd.min.js",
25
- "jsdelivr": "dist/vue-tel-input.umd.min.js",
26
27
  "dependencies": {
27
- "core-js": "^3.6.5",
28
- "libphonenumber-js": "^1.9.6",
29
- "vue": "^3.1.1"
28
+ "libphonenumber-js": "^1.10.7"
30
29
  },
31
- "devDependencies": {
32
- "@vue/cli-plugin-babel": "~4.5.0",
33
- "@vue/cli-plugin-eslint": "~4.5.0",
34
- "@vue/cli-plugin-unit-jest": "~4.5.0",
35
- "@vue/cli-service": "~4.5.0",
36
- "@vue/compiler-sfc": "^3.1.1",
37
- "@vue/eslint-config-airbnb": "^5.0.2",
38
- "@vue/test-utils": "^2.0.0-rc.6",
39
- "babel-eslint": "^10.1.0",
40
- "copy-webpack-plugin": "^5.1.2",
41
- "eslint": "^6.7.2",
42
- "eslint-plugin-import": "^2.20.2",
43
- "eslint-plugin-jest": "^22.15.1",
44
- "eslint-plugin-vue": "^7.11.1",
45
- "lint-staged": "^9.5.0",
46
- "vuepress": "^2.0.0-beta.18"
30
+ "peerDependencies": {
31
+ "vue": "^3.2.37"
47
32
  },
48
- "gitHooks": {
49
- "pre-commit": "lint-staged"
33
+ "devDependencies": {
34
+ "@rushstack/eslint-patch": "^1.1.0",
35
+ "@types/node": "^16.11.41",
36
+ "@vitejs/plugin-vue": "^2.3.3",
37
+ "@vue/eslint-config-typescript": "^11.0.0",
38
+ "@vue/tsconfig": "^0.1.3",
39
+ "eslint": "^8.5.0",
40
+ "eslint-plugin-vue": "^9.0.0",
41
+ "npm-run-all": "^4.1.5",
42
+ "rollup-plugin-copy": "^3.4.0",
43
+ "typescript": "~4.7.4",
44
+ "vite": "^2.9.12",
45
+ "vite-plugin-static-copy": "^0.6.1",
46
+ "vitepress": "^1.0.0-alpha.4",
47
+ "vue-tsc": "^0.38.1"
50
48
  },
51
- "browserslist": [
52
- "> 1%",
53
- "last 2 versions"
54
- ],
55
49
  "keywords": [
56
50
  "vue",
57
51
  "telephone",