svelte-tel-input 0.6.2 → 0.6.5
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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/components/Select/Select.svelte +21 -21
- package/components/Select/SelectListItem.svelte +1 -1
- package/components/Select/TelCountrySelect/TelCountrySelect.svelte +5 -5
- package/components/Select/TelRegionSelect/TelRegionSelect.svelte +5 -5
- package/components/Select/TelTypeSelect/TelTypeSelect.svelte +4 -4
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# svelte-tel-input
|
|
2
2
|
|
|
3
|
+
## 0.6.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: add changeset ([#61](https://github.com/gyurielf/svelte-tel-input/pull/61))
|
|
8
|
+
|
|
9
|
+
## 0.6.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- chore: update to vite 3 ([#58](https://github.com/gyurielf/svelte-tel-input/pull/58))
|
|
14
|
+
|
|
15
|
+
## 0.6.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- update dependencies ([#56](https://github.com/gyurielf/svelte-tel-input/pull/56))
|
|
20
|
+
|
|
3
21
|
## 0.6.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -7,35 +7,35 @@ export let items;
|
|
|
7
7
|
let isOpen = false;
|
|
8
8
|
let enteredSearch;
|
|
9
9
|
const toggleSelect = (e) => {
|
|
10
|
-
e
|
|
10
|
+
e?.preventDefault();
|
|
11
11
|
isOpen = !isOpen;
|
|
12
12
|
};
|
|
13
13
|
const closeSelect = (e) => {
|
|
14
|
-
e
|
|
14
|
+
e?.preventDefault();
|
|
15
15
|
isOpen = false;
|
|
16
16
|
};
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<div class="select cursor-pointer" use:clickOutsideAction={closeSelect}>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
<div on:click={() => toggleSelect()}>CHOOSE</div>
|
|
21
|
+
{#if isOpen}
|
|
22
|
+
<ul class="border border-gray-900 max-h-40 w-fit overflow-y-scroll">
|
|
23
|
+
{#if !selectOptions.searchInput}
|
|
24
|
+
<input
|
|
25
|
+
type="text"
|
|
26
|
+
class="px-4 py-1 text-gray-900 focus:outline-none w-full"
|
|
27
|
+
bind:value={enteredSearch}
|
|
28
|
+
/>
|
|
29
|
+
{/if}
|
|
30
|
+
{#each items as item}
|
|
31
|
+
<li class="p-2 bg-gray-600 hover:bg-opacity-30">
|
|
32
|
+
<span class="mr-3">{item.name}</span> +{item.dialCode}
|
|
33
|
+
</li>
|
|
34
|
+
{:else}
|
|
35
|
+
<div>List is on the way..</div>
|
|
36
|
+
{/each}
|
|
37
|
+
</ul>
|
|
38
|
+
{/if}
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<style></style>
|
|
@@ -47,10 +47,10 @@ const setSelectedCountry = (value) => {
|
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
49
|
<select
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
name="country_select"
|
|
51
|
+
class="some-class {$$props.class}"
|
|
52
|
+
on:change={(e) => setSelectedCountry(e.currentTarget.value)}
|
|
53
|
+
bind:value={selectedCountry}
|
|
54
54
|
>
|
|
55
|
-
|
|
55
|
+
<slot name="options" />
|
|
56
56
|
</select>
|
|
@@ -3,10 +3,10 @@ let selectedTelRegion;
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<select
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
name="region_select"
|
|
7
|
+
class={$$props.class}
|
|
8
|
+
bind:value={selectedTelRegion}
|
|
9
|
+
on:change={() => console.log(selectedTelRegion)}
|
|
10
10
|
>
|
|
11
|
-
|
|
11
|
+
<slot name="options" />
|
|
12
12
|
</select>
|
|
@@ -7,9 +7,9 @@ const setSelectedCountry = (value) => {
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<select
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
name="type_select"
|
|
11
|
+
class={$$props.class}
|
|
12
|
+
on:change={(e) => setSelectedCountry(e.currentTarget.value)}
|
|
13
13
|
>
|
|
14
|
-
|
|
14
|
+
<slot name="options" />
|
|
15
15
|
</select>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-tel-input",
|
|
3
3
|
"description": "svelte-tel-input",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/gyurielf/svelte-tel-input.git"
|
|
@@ -21,50 +21,50 @@
|
|
|
21
21
|
"node": ">= 16"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"libphonenumber-js": "^1.9
|
|
24
|
+
"libphonenumber-js": "^1.10.9"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.
|
|
28
|
-
"@babel/preset-env": "^7.
|
|
29
|
-
"@changesets/cli": "^2.
|
|
30
|
-
"@changesets/get-github-info": "^0.5.
|
|
27
|
+
"@babel/core": "^7.18.9",
|
|
28
|
+
"@babel/preset-env": "^7.18.9",
|
|
29
|
+
"@changesets/cli": "^2.23.2",
|
|
30
|
+
"@changesets/get-github-info": "^0.5.1",
|
|
31
31
|
"@changesets/types": "^5.0.0",
|
|
32
|
-
"@sveltejs/adapter-static": "^1.0.0-next.
|
|
33
|
-
"@sveltejs/kit": "^1.0.0-next.
|
|
32
|
+
"@sveltejs/adapter-static": "^1.0.0-next.38",
|
|
33
|
+
"@sveltejs/kit": "^1.0.0-next.385",
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.4",
|
|
35
|
-
"@testing-library/svelte": "^3.1.
|
|
36
|
-
"@types/jest": "^
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
38
|
-
"@typescript-eslint/parser": "^5.
|
|
39
|
-
"autoprefixer": "^10.4.
|
|
40
|
-
"babel-jest": "^
|
|
35
|
+
"@testing-library/svelte": "^3.1.3",
|
|
36
|
+
"@types/jest": "^28.1.4",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
38
|
+
"@typescript-eslint/parser": "^5.30.7",
|
|
39
|
+
"autoprefixer": "^10.4.7",
|
|
40
|
+
"babel-jest": "^28.1.2",
|
|
41
41
|
"babel-loader": "^8.2.5",
|
|
42
|
-
"cssnano": "^5.1.
|
|
43
|
-
"dotenv": "^16.0.
|
|
44
|
-
"eslint": "^8.
|
|
42
|
+
"cssnano": "^5.1.12",
|
|
43
|
+
"dotenv": "^16.0.1",
|
|
44
|
+
"eslint": "^8.20.0",
|
|
45
45
|
"eslint-config-prettier": "^8.5.0",
|
|
46
|
-
"eslint-plugin-jest": "^26.
|
|
47
|
-
"eslint-plugin-svelte3": "^
|
|
48
|
-
"husky": "^
|
|
49
|
-
"jest": "^
|
|
46
|
+
"eslint-plugin-jest": "^26.5.3",
|
|
47
|
+
"eslint-plugin-svelte3": "^4.0.0",
|
|
48
|
+
"husky": "^8.0.1",
|
|
49
|
+
"jest": "^28.1.2",
|
|
50
50
|
"jest-matchmedia-mock": "^1.1.0",
|
|
51
51
|
"micromatch": "^4.0.5",
|
|
52
|
-
"postcss": "^8.4.
|
|
53
|
-
"postcss-load-config": "^
|
|
54
|
-
"prettier": "^2.
|
|
52
|
+
"postcss": "^8.4.14",
|
|
53
|
+
"postcss-load-config": "^4.0.1",
|
|
54
|
+
"prettier": "^2.7.1",
|
|
55
55
|
"prettier-plugin-svelte": "^2.7.0",
|
|
56
|
-
"svelte": "^3.
|
|
57
|
-
"svelte-check": "^2.
|
|
58
|
-
"svelte-inview": "^3.0.
|
|
56
|
+
"svelte": "^3.49.0",
|
|
57
|
+
"svelte-check": "^2.8.0",
|
|
58
|
+
"svelte-inview": "^3.0.1",
|
|
59
59
|
"svelte-jester": "^2.3.2",
|
|
60
|
-
"svelte-loader": "^3.1.
|
|
61
|
-
"svelte-preprocess": "^4.10.
|
|
62
|
-
"svelte2tsx": "^0.5.
|
|
63
|
-
"tailwindcss": "^3.
|
|
64
|
-
"ts-jest": "^
|
|
60
|
+
"svelte-loader": "^3.1.3",
|
|
61
|
+
"svelte-preprocess": "^4.10.7",
|
|
62
|
+
"svelte2tsx": "^0.5.12",
|
|
63
|
+
"tailwindcss": "^3.1.6",
|
|
64
|
+
"ts-jest": "^28.0.5",
|
|
65
65
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
66
66
|
"tslib": "^2.4.0",
|
|
67
|
-
"typescript": "^4.
|
|
67
|
+
"typescript": "^4.7.4"
|
|
68
68
|
},
|
|
69
69
|
"standard-version": {
|
|
70
70
|
"skip": {
|