toggle-components-library 1.36.4-beta.6 → 1.36.4-beta.8
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/img/airship-flight-assist.539bc3e3.svg +13 -0
- package/dist/toggle-components-library.common.js +152 -92
- 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 +152 -92
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +1 -1
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/airship-flight-assist.svg +13 -0
- package/src/components/forms/ToggleContactSearch.vue +0 -2
- package/src/components/metrics/ToggleMetricSingleMetric.vue +11 -1
- package/src/components/metrics/ToggleMetricSparkLine.vue +16 -2
- package/src/components/tooltips/ToggleTooltip.vue +6 -0
- package/src/index.js +4 -1
- package/src/sass/includes/_as_badges.scss +25 -1
- package/src/sass/includes/_as_inputs.scss +19 -22
- package/src/sass/includes/_as_metrics.scss +5 -1
- package/src/sass/includes/_as_navs.scss +16 -6
- package/src/sass/includes/_as_tooltips.scss +42 -0
- package/src/sass/main.scss +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
|
|
4
|
+
<stop offset="0" stop-color="#bd38df"/>
|
|
5
|
+
<stop offset="1" stop-color="#5f1c70"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<g id="Group_22" data-name="Group 22" transform="translate(9.062 -181.365) rotate(11)">
|
|
9
|
+
<path id="Path_14" data-name="Path 14" d="M6.264,2.145a.982.982,0,0,1,1.838,0l.79,3.538c.1.236.192.5.525.525l2.8.056a1,1,0,0,1,0,1.838L9.706,9.181a1,1,0,0,0-.525.525L8.1,15.222a1,1,0,0,1-1.838,0L5.186,9.706a1,1,0,0,0-.525-.525L2.145,8.1a1,1,0,0,1,0-1.838l2.782.1c.347.007.424-.289.525-.525Z" transform="matrix(-0.848, -0.53, 0.53, -0.848, 42.092, 197.282)" fill="url(#linear-gradient)"/>
|
|
10
|
+
<path id="Polygon_2" data-name="Polygon 2" d="M3.07,2.145a1,1,0,0,1,1.838,0l.12.28a1,1,0,0,0,.525.525l.28.12a1,1,0,0,1,0,1.838l-.28.12a1,1,0,0,0-.525.525l-.12.28a1,1,0,0,1-1.838,0l-.12-.28a1,1,0,0,0-.525-.525l-.28-.12a1,1,0,0,1,0-1.838l.28-.12a1,1,0,0,0,.525-.525Z" transform="matrix(0.996, -0.087, 0.087, 0.996, 27.627, 185.251)" fill="url(#linear-gradient)"/>
|
|
11
|
+
<path id="Polygon_3" data-name="Polygon 3" d="M4.712,4.147a.684.684,0,0,1,1.35,0h0a.684.684,0,0,0,.565.565h0a.684.684,0,0,1,0,1.35h0a.684.684,0,0,0-.565.565h0a.684.684,0,0,1-1.35,0h0a.684.684,0,0,0-.565-.565h0a.684.684,0,0,1,0-1.35h0a.684.684,0,0,0,.565-.565Z" transform="matrix(0.996, -0.087, 0.087, 0.996, 35.981, 190.046)" fill="url(#linear-gradient)"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
<div class="toggle-contact-search-arrow" :class="{'toggle-contact-search-arrow-active': showDropdown}"></div>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
-
<div class="toggle-contact-search-divider"></div>
|
|
23
|
-
|
|
24
22
|
<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
23
|
|
|
26
24
|
<div v-if="loading" class="toggle-contact-search-loading-container">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<h3 :class="['toggle-metric metric-label', {'metric-label-atmosphere': atmosphere}]">{{label}}</h3>
|
|
4
4
|
<div class="single-metric-icon" v-if="metricPending && label.length == 0"></div>
|
|
5
|
-
<h1 :class="['toggle-metric metric-value', { 'metric-value-atmosphere': atmosphere }]" v-else>{{metricValue}}
|
|
5
|
+
<h1 :class="['toggle-metric metric-value', { 'metric-value-atmosphere': atmosphere }, { 'metric-value-small': small}]" v-else>{{metricValue}}
|
|
6
6
|
<span v-if="score && value.maxScore" class="toggle-metric-score-rating">/{{value.maxScore}}</span>
|
|
7
7
|
<span v-if="atmosphere && live == true" class="toggle-metric-live-icon"></span>
|
|
8
8
|
</h1>
|
|
@@ -85,6 +85,13 @@ export default {
|
|
|
85
85
|
return ['default', 'atmosphere'].indexOf(value) !== -1
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
+
metricSize: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "default",
|
|
91
|
+
validator: function (value) {
|
|
92
|
+
return ['default', 'small'].indexOf(value) !== -1
|
|
93
|
+
}
|
|
94
|
+
},
|
|
88
95
|
/**
|
|
89
96
|
* Show live lightening bolt
|
|
90
97
|
*/
|
|
@@ -120,6 +127,9 @@ export default {
|
|
|
120
127
|
},
|
|
121
128
|
atmosphere() {
|
|
122
129
|
return this.metricStyle === 'atmosphere';
|
|
130
|
+
},
|
|
131
|
+
small() {
|
|
132
|
+
return this.metricSize === 'small';
|
|
123
133
|
}
|
|
124
134
|
}
|
|
125
135
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{{trendImpactLabel}}
|
|
7
7
|
</ToggleBadge>
|
|
8
8
|
|
|
9
|
-
<ToggleMetricSingleMetric :value="singleMetricVal" :label="label" :type="type" :currencyCode="currencyCode" :currencyLocale="currencyLocale" :currencyDenomination="currencyDenomination"/>
|
|
9
|
+
<ToggleMetricSingleMetric :value="singleMetricVal" :label="label" :type="type" :currencyCode="currencyCode" :currencyLocale="currencyLocale" :currencyDenomination="currencyDenomination" :metricStyle="metricStyle" :metricSize="metricStyle == 'atmosphere' ? 'small' : 'default'"/>
|
|
10
10
|
|
|
11
11
|
<apexchart type="line" :height="height" :width="width" :options="chartOptions" :series="sparkLineVal" ref="sparkLineRef">
|
|
12
12
|
</apexchart>
|
|
@@ -116,6 +116,13 @@ export default {
|
|
|
116
116
|
showTrendForAllZeros: {
|
|
117
117
|
type: Boolean,
|
|
118
118
|
default: false
|
|
119
|
+
},
|
|
120
|
+
metricStyle: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: "default",
|
|
123
|
+
validator: function (value) {
|
|
124
|
+
return ['default', 'atmosphere'].indexOf(value) !== -1
|
|
125
|
+
}
|
|
119
126
|
}
|
|
120
127
|
},
|
|
121
128
|
|
|
@@ -171,10 +178,17 @@ export default {
|
|
|
171
178
|
* @return String
|
|
172
179
|
*/
|
|
173
180
|
trendImpactClass() {
|
|
174
|
-
|
|
181
|
+
if (this.metricStyle === 'atmosphere'){
|
|
182
|
+
return this.getTrendImpact() === 1 ? 'atmosphere confirm'
|
|
183
|
+
: this.getTrendImpact() === -1 ? 'atmosphere abort'
|
|
184
|
+
: this.getTrendImpact() === 0 ? 'atmosphere warning'
|
|
185
|
+
: 'atmosphere empty';
|
|
186
|
+
} else {
|
|
187
|
+
return this.getTrendImpact() === 1 ? 'confirm'
|
|
175
188
|
: this.getTrendImpact() === -1 ? 'abort'
|
|
176
189
|
: this.getTrendImpact() === 0 ? 'warning'
|
|
177
190
|
: 'empty';
|
|
191
|
+
}
|
|
178
192
|
},
|
|
179
193
|
/**
|
|
180
194
|
* Defines the badge title from the trending impact
|
package/src/index.js
CHANGED
|
@@ -89,6 +89,8 @@ import ToggleEmailCard from "./components/cards/ToggleEmailCard.vue";
|
|
|
89
89
|
import ToggleRewardsCard from "./components/cards/ToggleRewardsCard.vue";
|
|
90
90
|
import ToggleCommentCard from "./components/cards/ToggleCommentCard.vue";
|
|
91
91
|
|
|
92
|
+
import ToggleTooltip from "./components/tooltips/ToggleTooltip.vue";
|
|
93
|
+
|
|
92
94
|
|
|
93
95
|
import './sass/main.scss';
|
|
94
96
|
|
|
@@ -161,7 +163,8 @@ const Components = {
|
|
|
161
163
|
ToggleCarouselSlide,
|
|
162
164
|
ToggleEmailCard,
|
|
163
165
|
ToggleRewardsCard,
|
|
164
|
-
ToggleCommentCard
|
|
166
|
+
ToggleCommentCard,
|
|
167
|
+
ToggleTooltip
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
Object.keys(Components).forEach(name => {
|
|
@@ -42,10 +42,34 @@
|
|
|
42
42
|
&.atmosphere {
|
|
43
43
|
background-color: #E4EDF2;
|
|
44
44
|
color: #354B64;
|
|
45
|
-
font-size:
|
|
45
|
+
font-size: 12px;
|
|
46
46
|
font-weight: 400;
|
|
47
47
|
padding: 5px 11px;
|
|
48
48
|
border-radius: 5px;
|
|
49
|
+
|
|
50
|
+
&.confirm {
|
|
51
|
+
background-color: #DFEED4;
|
|
52
|
+
color: #71BE37;
|
|
53
|
+
}
|
|
54
|
+
&.abort {
|
|
55
|
+
background-color: #FDE9E9;
|
|
56
|
+
color: #D8000C;
|
|
57
|
+
}
|
|
58
|
+
&.warning {
|
|
59
|
+
background-color: #F7EBD4;
|
|
60
|
+
color: #E6A831;
|
|
61
|
+
}
|
|
62
|
+
&.inactive {
|
|
63
|
+
color: rgba(53, 75, 100, .5)
|
|
64
|
+
}
|
|
65
|
+
&.empty {
|
|
66
|
+
background-color: #E4EDF2;
|
|
67
|
+
color: #354B64;
|
|
68
|
+
}
|
|
69
|
+
&.neutral {
|
|
70
|
+
background-color: #E4EDF2;
|
|
71
|
+
color: #38ABFF;
|
|
72
|
+
}
|
|
49
73
|
}
|
|
50
74
|
}
|
|
51
75
|
|
|
@@ -970,7 +970,7 @@ $iconWidth:20px;
|
|
|
970
970
|
height: 40px;
|
|
971
971
|
background-color: $toggle-white;
|
|
972
972
|
border-radius: 8px;
|
|
973
|
-
|
|
973
|
+
max-width: 425px;
|
|
974
974
|
}
|
|
975
975
|
|
|
976
976
|
.toggle-contact-search-input-container-active {
|
|
@@ -984,7 +984,7 @@ $iconWidth:20px;
|
|
|
984
984
|
}
|
|
985
985
|
|
|
986
986
|
.toggle-contact-search-dropdown-container {
|
|
987
|
-
|
|
987
|
+
width: 425px;
|
|
988
988
|
background-color: $toggle-white;
|
|
989
989
|
border-radius: 0 0 8px 8px;
|
|
990
990
|
overflow: hidden;
|
|
@@ -997,14 +997,19 @@ $iconWidth:20px;
|
|
|
997
997
|
border: 0;
|
|
998
998
|
border-radius: 0px;
|
|
999
999
|
height: 30px;
|
|
1000
|
-
margin: 4px 5px 0px
|
|
1000
|
+
margin: 4px 5px 0px 0px;
|
|
1001
|
+
padding-left: 0;
|
|
1001
1002
|
color: #3A4A62;
|
|
1002
1003
|
font-family: $toggle-font-family;
|
|
1003
1004
|
font-weight: 700;
|
|
1004
|
-
font-size:
|
|
1005
|
+
font-size: 14px;
|
|
1005
1006
|
background-color: #FFFFFF;
|
|
1006
1007
|
}
|
|
1007
1008
|
|
|
1009
|
+
.toggle-contact-search-input:focus{
|
|
1010
|
+
outline: none;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1008
1013
|
.toggle-contact-search-input::placeholder {
|
|
1009
1014
|
color: #C5CED8;
|
|
1010
1015
|
opacity: 1;
|
|
@@ -1033,10 +1038,10 @@ $iconWidth:20px;
|
|
|
1033
1038
|
.toggle-contact-search-icon {
|
|
1034
1039
|
max-width: 20px;
|
|
1035
1040
|
max-height: 20px;
|
|
1036
|
-
margin:
|
|
1041
|
+
margin: 12px 8px 0 0;
|
|
1037
1042
|
transition: transform .2s ease-in-out;
|
|
1038
|
-
width:
|
|
1039
|
-
height:
|
|
1043
|
+
width: 18px;
|
|
1044
|
+
height: 18px;
|
|
1040
1045
|
background-repeat: no-repeat;
|
|
1041
1046
|
background-size: contain;
|
|
1042
1047
|
}
|
|
@@ -1057,7 +1062,7 @@ $iconWidth:20px;
|
|
|
1057
1062
|
|
|
1058
1063
|
.toggle-contact-search-icon-arrow-container {
|
|
1059
1064
|
display: flex;
|
|
1060
|
-
width:
|
|
1065
|
+
width: 70px;
|
|
1061
1066
|
min-width: 60px;
|
|
1062
1067
|
flex-direction: row;
|
|
1063
1068
|
justify-content: center;
|
|
@@ -1071,9 +1076,9 @@ $iconWidth:20px;
|
|
|
1071
1076
|
|
|
1072
1077
|
.toggle-contact-search-magnifying-glass-icon {
|
|
1073
1078
|
cursor: pointer;
|
|
1074
|
-
margin:
|
|
1075
|
-
width:
|
|
1076
|
-
height:
|
|
1079
|
+
margin: 13px 15px 0 3px;
|
|
1080
|
+
width: 21px;
|
|
1081
|
+
height: 21px;
|
|
1077
1082
|
background-image: url('../assets/icons/magnifying-glass-icon.svg');
|
|
1078
1083
|
background-repeat: no-repeat;
|
|
1079
1084
|
background-size: contain;
|
|
@@ -1103,14 +1108,8 @@ $iconWidth:20px;
|
|
|
1103
1108
|
transform: rotate(-3.1416rad) translateY(5px);
|
|
1104
1109
|
}
|
|
1105
1110
|
|
|
1106
|
-
.toggle-contact-search-divider {
|
|
1107
|
-
height: 28px;
|
|
1108
|
-
margin: 7px 0 0 0;
|
|
1109
|
-
border-right: 2px solid #D9D9D9;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
1111
|
.toggle-contact-search-dropdown-item {
|
|
1113
|
-
margin: 5px 5px 5px
|
|
1112
|
+
margin: 5px 5px 5px 7px;
|
|
1114
1113
|
border-radius: 8px;
|
|
1115
1114
|
cursor: pointer;
|
|
1116
1115
|
font-size: 16px;
|
|
@@ -1145,12 +1144,10 @@ $iconWidth:20px;
|
|
|
1145
1144
|
}
|
|
1146
1145
|
|
|
1147
1146
|
.toggle-contact-search-icon-dropdown {
|
|
1148
|
-
width:
|
|
1149
|
-
height:
|
|
1147
|
+
width: 18px;
|
|
1148
|
+
height: 18px;
|
|
1150
1149
|
background-repeat: no-repeat;
|
|
1151
1150
|
background-size: contain;
|
|
1152
|
-
max-width: 20px;
|
|
1153
|
-
max-height: 20px;
|
|
1154
1151
|
margin: 2px 14px 0 0;
|
|
1155
1152
|
transition: transform .2s ease-in-out;
|
|
1156
1153
|
}
|
|
@@ -20,13 +20,17 @@
|
|
|
20
20
|
&.metric-label-atmosphere {
|
|
21
21
|
color: #354B64;
|
|
22
22
|
font-weight: 400;
|
|
23
|
-
font-size:
|
|
23
|
+
font-size: 14px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
&.metric-value-atmosphere {
|
|
27
27
|
font-weight: 800;
|
|
28
28
|
color: #00346F;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
&.metric-value-small {
|
|
32
|
+
font-size: 30px;
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
|
|
@@ -273,12 +273,11 @@
|
|
|
273
273
|
.toggle-multi-tier-sidenav-item {
|
|
274
274
|
list-style: none;
|
|
275
275
|
font-family: $toggle-font-family;
|
|
276
|
-
font-size:
|
|
277
|
-
font-weight: bold !important;
|
|
276
|
+
font-size: .9rem;
|
|
278
277
|
padding-bottom: 0.25rem;
|
|
279
278
|
|
|
280
279
|
a, span{
|
|
281
|
-
font-weight:
|
|
280
|
+
font-weight: 400 !important;
|
|
282
281
|
}
|
|
283
282
|
|
|
284
283
|
&.active {
|
|
@@ -522,7 +521,19 @@
|
|
|
522
521
|
animation: tilt-shake 0.4s;
|
|
523
522
|
background-image: url("../assets/icons/airship-feedback-hover.svg");
|
|
524
523
|
}
|
|
524
|
+
&.airship-flight-assist-icon a::before,
|
|
525
|
+
&.airship-flight-assist-icon span::before {
|
|
526
|
+
background-image: url("../assets/icons/airship-flight-assist.svg");
|
|
527
|
+
width: 1.2rem;
|
|
528
|
+
height: 1.2rem;
|
|
529
|
+
padding-left: 0.3rem;
|
|
530
|
+
}
|
|
525
531
|
|
|
532
|
+
&.airship-flight-assist-icon a:hover::before,
|
|
533
|
+
&.airship-flight-assist-icon span:hover::before {
|
|
534
|
+
animation: tilt-shake 0.4s;
|
|
535
|
+
background-image: url("../assets/icons/airship-flight-assist.svg");
|
|
536
|
+
}
|
|
526
537
|
}
|
|
527
538
|
}
|
|
528
539
|
|
|
@@ -550,8 +561,7 @@
|
|
|
550
561
|
li {
|
|
551
562
|
a, span {
|
|
552
563
|
padding-left: .8rem;
|
|
553
|
-
font-size:
|
|
554
|
-
font-weight: bold;
|
|
564
|
+
font-size: 0.9rem;
|
|
555
565
|
}
|
|
556
566
|
}
|
|
557
567
|
|
|
@@ -562,7 +572,7 @@
|
|
|
562
572
|
|
|
563
573
|
li {
|
|
564
574
|
a, span {
|
|
565
|
-
font-size: 0.
|
|
575
|
+
font-size: 0.75rem;
|
|
566
576
|
font-weight: normal;
|
|
567
577
|
}
|
|
568
578
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.toggle-tooltip {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
height: 17px;
|
|
5
|
+
width: 17px;
|
|
6
|
+
background-color: #768CA2;
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
color: #FFFFFF;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
text-align: center;
|
|
11
|
+
font-family: Palatino;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.toggle-tooltip-i {
|
|
15
|
+
margin: 2px 0 0 0;
|
|
16
|
+
font-size: 13px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.toggle-tooltip-text {
|
|
20
|
+
@include toggle-global-font-config;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.toggle-tooltip .toggle-tooltip-text {
|
|
24
|
+
visibility: hidden;
|
|
25
|
+
width: 160px;
|
|
26
|
+
background-color: #000;
|
|
27
|
+
color: #fff;
|
|
28
|
+
text-align: center;
|
|
29
|
+
padding: 8px 12px;
|
|
30
|
+
border-radius: 6px;
|
|
31
|
+
position: absolute;
|
|
32
|
+
z-index: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.toggle-tooltip:hover .toggle-tooltip-text {
|
|
36
|
+
visibility: visible;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.toggle-tooltip .toggle-tooltip-text {
|
|
40
|
+
top: -5px;
|
|
41
|
+
left: 105%;
|
|
42
|
+
}
|
package/src/sass/main.scss
CHANGED