toggle-components-library 1.28.6-beta.6 → 1.28.7-beta.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/dist/toggle-components-library.common.js +564 -1167
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +564 -1167
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +8 -8
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/loaders/ToggleProgressLoader.vue +99 -0
- package/src/index.js +4 -3
- package/src/sass/includes/_as_inputs.scss +2 -260
- package/src/sass/includes/_as_loaders.scss +128 -14
- package/dist/img/arrow-icon.6b7bdc31.svg +0 -3
- package/dist/img/email-icon.3c44b236.svg +0 -3
- package/dist/img/magnifying-glass-icon.9a2b42a1.svg +0 -3
- package/dist/img/mobile-icon.9e16ffcd.svg +0 -6
- package/package-lock.json +0 -20596
- package/src/assets/icons/arrow-icon.svg +0 -3
- package/src/assets/icons/email-icon.svg +0 -3
- package/src/assets/icons/magnifying-glass-icon.svg +0 -3
- package/src/assets/icons/mobile-icon.svg +0 -6
- package/src/components/forms/ToggleContactSearch.vue +0 -156
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="11" viewBox="0 0 18 11">
|
|
2
|
-
<path id="Polygon_8" data-name="Polygon 8" d="M7.452,1.892a2,2,0,0,1,3.1,0l4.78,5.842A2,2,0,0,1,13.78,11H4.22A2,2,0,0,1,2.673,7.734Z" transform="translate(18 11) rotate(180)" fill="#3a4a62"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="31.001" height="31.001" viewBox="0 0 31.001 31.001">
|
|
2
|
-
<path id="at-solid" d="M15.5,3.875a11.625,11.625,0,0,0,0,23.251A1.938,1.938,0,1,1,15.5,31,15.5,15.5,0,1,1,31,15.5v1.938A5.812,5.812,0,0,1,20.756,21.2a7.753,7.753,0,1,1-.733-11.989,1.938,1.938,0,0,1,3.227,1.447v6.781a1.938,1.938,0,0,0,3.875,0V15.5A11.628,11.628,0,0,0,15.5,3.875ZM19.376,15.5A3.875,3.875,0,1,0,15.5,19.376,3.875,3.875,0,0,0,19.376,15.5Z" fill="#3a4a62"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24.674" height="24.678" viewBox="0 0 24.674 24.678">
|
|
2
|
-
<path id="magnifying-glass-solid" d="M20.048,10.024a10,10,0,0,1-1.928,5.913l6.1,6.106a1.544,1.544,0,0,1-2.183,2.183l-6.1-6.106a10.026,10.026,0,1,1,4.111-8.1Zm-10.024,6.94a6.94,6.94,0,1,0-6.94-6.94A6.94,6.94,0,0,0,10.024,16.964Z" fill="#3a4a62"/>
|
|
3
|
-
</svg>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="31.001" height="32.921" viewBox="0 0 23.131 32.921">
|
|
2
|
-
<g id="Rectangle_1084" data-name="Rectangle 1084" transform="matrix(0.995, -0.105, 0.105, 0.995, 0, 2.091)" fill="none" stroke="#3a4a62" stroke-width="4">
|
|
3
|
-
<rect width="20" height="31" rx="5" stroke="none"/>
|
|
4
|
-
<rect x="2" y="2" width="16" height="27" rx="3" fill="none"/>
|
|
5
|
-
</g>
|
|
6
|
-
</svg>
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="toggle-contact-search-container">
|
|
3
|
-
|
|
4
|
-
<div class="toggle-contact-search-error" >
|
|
5
|
-
{{isInvalid ? errorMessage : ''}}
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="toggle-contact-search-input-container"
|
|
9
|
-
:class="{'toggle-input-is-invalid': isInvalid, 'toggle-contact-search-input-container-active': showDropdown}">
|
|
10
|
-
<div class="toggle-contact-search-icon-input-container">
|
|
11
|
-
<div :class="{'toggle-contact-search-icon-arrow-container': true, 'toggle-contact-search-icon-arrow-container-disabled': disabled}"
|
|
12
|
-
@click="showDropdown = !disabled && !loading ? !showDropdown : false">
|
|
13
|
-
<div class="toggle-contact-search-icon"
|
|
14
|
-
:class="{
|
|
15
|
-
'toggle-contact-search-icon-email': inputType == 'email',
|
|
16
|
-
'toggle-contact-search-icon-mobile': inputType == 'mobile'
|
|
17
|
-
}"
|
|
18
|
-
></div>
|
|
19
|
-
<div class="toggle-contact-search-arrow" :class="{'toggle-contact-search-arrow-active': showDropdown}"></div>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="toggle-contact-search-divider"></div>
|
|
23
|
-
|
|
24
|
-
<input :class="{'toggle-contact-search-input': true, 'toggle-contact-search-disabled': disabled}" v-model="inputVal" :disabled="disabled || loading" type="text" :placeholder="placeholder" @keyup.enter="onEnter">
|
|
25
|
-
|
|
26
|
-
<div v-if="loading" class="toggle-contact-search-loading-container">
|
|
27
|
-
<div class="toggle-inline-loader"></div>
|
|
28
|
-
</div>
|
|
29
|
-
<div v-else :class="{'toggle-contact-search-magnifying-glass-icon': true, 'toggle-contact-search-magnifying-glass-icon-disabled': disabled}" @click="onSearch"></div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<Transition name="drop-down">
|
|
33
|
-
<div v-if="showDropdown" class="toggle-contact-search-dropdown-container">
|
|
34
|
-
<div v-for="type, i in types" @click="inputType = type; showDropdown = false; loading = false" :key="i">
|
|
35
|
-
<div class="toggle-contact-search-dropdown-item">
|
|
36
|
-
<div class="toggle-contact-search-icon-dropdown" :class="iconForType(type)"></div>
|
|
37
|
-
<label class="toggle-contact-search-dropdown-item-label" :class="{'toggle-contact-search-dropwdown-item-highlighted': type == inputType}">
|
|
38
|
-
{{textForType(type)}}
|
|
39
|
-
</label>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</Transition>
|
|
44
|
-
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<script>
|
|
50
|
-
|
|
51
|
-
import { mixins } from '../mixins/mixins';
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
mixins: [mixins],
|
|
55
|
-
props: {
|
|
56
|
-
value: {
|
|
57
|
-
type: [Number,String]
|
|
58
|
-
},
|
|
59
|
-
types: {
|
|
60
|
-
type: Array,
|
|
61
|
-
default: function () {
|
|
62
|
-
return ['email', 'mobile'];
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
isInvalid: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false
|
|
68
|
-
},
|
|
69
|
-
errorMessage: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: 'No contact found with these details'
|
|
72
|
-
},
|
|
73
|
-
loading: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false
|
|
76
|
-
},
|
|
77
|
-
disabled: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
data() {
|
|
83
|
-
return {
|
|
84
|
-
inputType: 'email',
|
|
85
|
-
showDropdown: false
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
watch: {
|
|
89
|
-
showDropdown: function (val) {
|
|
90
|
-
if (val) {
|
|
91
|
-
this.isInvalid = false;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
created() {
|
|
96
|
-
window.addEventListener('click', this.windowClick, true);
|
|
97
|
-
},
|
|
98
|
-
beforeDestroy() {
|
|
99
|
-
window.removeEventListener('click', this.windowClick, true);
|
|
100
|
-
},
|
|
101
|
-
computed: {
|
|
102
|
-
inputVal: {
|
|
103
|
-
get: function () {
|
|
104
|
-
return this.value;
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
set: function (value) {
|
|
108
|
-
this.$emit('input', value);
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
placeholder: function () {
|
|
112
|
-
return this.inputType == 'email' ? 'Enter contact email address' : 'Enter contact mobile number';
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
methods: {
|
|
116
|
-
textForType(type) {
|
|
117
|
-
switch (type) {
|
|
118
|
-
case 'email':
|
|
119
|
-
return 'Search for a contact by email address';
|
|
120
|
-
case 'mobile':
|
|
121
|
-
return 'Search for a contact by mobile';
|
|
122
|
-
default:
|
|
123
|
-
return 'Search for a contact by ' + this.inputType;
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
iconForType(type) {
|
|
127
|
-
switch (type) {
|
|
128
|
-
case 'email':
|
|
129
|
-
return 'toggle-contact-search-icon-email'
|
|
130
|
-
case 'mobile':
|
|
131
|
-
return 'toggle-contact-search-icon-mobile'
|
|
132
|
-
default:
|
|
133
|
-
return 'toggle-contact-search-icon-email'
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
onEnter(e) {
|
|
137
|
-
this.$emit('enterPressed', {
|
|
138
|
-
type: this.inputType,
|
|
139
|
-
value: e.target.value
|
|
140
|
-
});
|
|
141
|
-
},
|
|
142
|
-
onSearch() {
|
|
143
|
-
this.$emit('clickSearch', {
|
|
144
|
-
type: this.inputType,
|
|
145
|
-
value: this.inputVal
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
windowClick(e) {
|
|
149
|
-
if (!e.target.matches('.toggle-contact-search-container *')) {
|
|
150
|
-
this.showDropdown = false;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
</script>
|