toggle-components-library 1.36.4-beta.4 → 1.36.4-beta.6
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/bolt-solid.445f9a14.svg +9 -0
- package/dist/toggle-components-library.common.js +136 -94
- 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 +136 -94
- 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/bolt-solid.svg +9 -0
- package/src/components/buttons/ToggleLoginButton.vue +29 -5
- package/src/components/metrics/ToggleMetricSingleMetric.vue +23 -2
- package/src/sass/includes/_as_badges.scss +10 -0
- package/src/sass/includes/_as_buttons.scss +12 -7
- package/src/sass/includes/_as_metrics.scss +21 -0
- package/src/sass/includes/_as_variables.scss +3 -3
- package/package-lock.json +0 -20279
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="6.922" height="12.381" viewBox="0 0 6.922 12.381">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="linear-gradient" x1="0.343" y1="-0.06" x2="0.923" y2="2.008" gradientUnits="objectBoundingBox">
|
|
4
|
+
<stop offset="0" stop-color="#c139e5"/>
|
|
5
|
+
<stop offset="1" stop-color="#611d73"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<path id="bolt-solid" d="M37.679,1.07a.944.944,0,0,0-.191-.931.469.469,0,0,0-.719.044L32.156,5.6a.961.961,0,0,0-.16.854.616.616,0,0,0,.541.5h2.009L33.16,11.294a.944.944,0,0,0,.191.931.469.469,0,0,0,.719-.044l4.613-5.417a.961.961,0,0,0,.16-.854.612.612,0,0,0-.541-.5H36.293Z" transform="translate(-31.959 0.009)" fill="url(#linear-gradient)"/>
|
|
9
|
+
</svg>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="toggle-button-container toggle-button-container--login"
|
|
3
|
-
|
|
4
|
-
<button :type="type" :class="['toggle-login-button', { 'toggle-login-button--airship': platform == 'airship' }, { 'toggle-login-button--loading': platform == 'toggle' && loading }, { 'toggle-login-button--airship-loading': platform == 'airship' && loading }]" @click="click"
|
|
5
|
-
:disabled="(loading || disabled)">
|
|
2
|
+
<div class="toggle-button-container toggle-button-container--login"
|
|
3
|
+
:class="{'toggle-button-container--fluid': btnFluid}">
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
<button :type="type" :class="buttonClasses" @click="click" :disabled="(loading || disabled)">
|
|
6
|
+
|
|
7
|
+
<div :class="loaderClasses" v-if="loading"></div>
|
|
8
8
|
|
|
9
9
|
<div class="toggle-login-button-text" v-else>
|
|
10
10
|
{{ buttonText }}
|
|
@@ -77,6 +77,30 @@ export default {
|
|
|
77
77
|
*/
|
|
78
78
|
this.$emit('click');
|
|
79
79
|
}
|
|
80
|
+
},
|
|
81
|
+
computed: {
|
|
82
|
+
/**
|
|
83
|
+
* The class to apply to the button
|
|
84
|
+
* @return {Object}
|
|
85
|
+
*/
|
|
86
|
+
buttonClasses() {
|
|
87
|
+
return {
|
|
88
|
+
'toggle-login-button': true,
|
|
89
|
+
'toggle-login-button--airship': this.platform == 'airship',
|
|
90
|
+
'toggle-login-button--loading': this.platform == 'toggle' && this.loading,
|
|
91
|
+
'toggle-login-button--airship-loading': this.platform == 'airship' && this.loading
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* The class to apply to the loader
|
|
96
|
+
* @return {Object}
|
|
97
|
+
*/
|
|
98
|
+
loaderClasses() {
|
|
99
|
+
return {
|
|
100
|
+
'toggle-login-button-loader': true,
|
|
101
|
+
'toggle-login-button-loader--airship': this.platform == 'airship',
|
|
102
|
+
}
|
|
103
|
+
}
|
|
80
104
|
}
|
|
81
105
|
}
|
|
82
106
|
</script>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<h3 class="toggle-metric metric-label">{{label}}</h3>
|
|
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" v-else>{{metricValue}}
|
|
5
|
+
<h1 :class="['toggle-metric metric-value', { 'metric-value-atmosphere': atmosphere }]" v-else>{{metricValue}}
|
|
6
6
|
<span v-if="score && value.maxScore" class="toggle-metric-score-rating">/{{value.maxScore}}</span>
|
|
7
|
+
<span v-if="atmosphere && live == true" class="toggle-metric-live-icon"></span>
|
|
7
8
|
</h1>
|
|
8
9
|
</div>
|
|
9
10
|
</template>
|
|
@@ -73,6 +74,23 @@ export default {
|
|
|
73
74
|
metricPending: {
|
|
74
75
|
type: Boolean,
|
|
75
76
|
default: false
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Metric style (default or atmosphere release themed)
|
|
80
|
+
*/
|
|
81
|
+
metricStyle: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "default",
|
|
84
|
+
validator: function (value) {
|
|
85
|
+
return ['default', 'atmosphere'].indexOf(value) !== -1
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Show live lightening bolt
|
|
90
|
+
*/
|
|
91
|
+
live: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
76
94
|
}
|
|
77
95
|
},
|
|
78
96
|
computed: {
|
|
@@ -99,6 +117,9 @@ export default {
|
|
|
99
117
|
},
|
|
100
118
|
score() {
|
|
101
119
|
return this.type === 'score';
|
|
120
|
+
},
|
|
121
|
+
atmosphere() {
|
|
122
|
+
return this.metricStyle === 'atmosphere';
|
|
102
123
|
}
|
|
103
124
|
}
|
|
104
125
|
}
|
|
@@ -37,6 +37,16 @@
|
|
|
37
37
|
border-radius: 50px;
|
|
38
38
|
padding: 5px 11px;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
// Atmosphere release styling
|
|
42
|
+
&.atmosphere {
|
|
43
|
+
background-color: #E4EDF2;
|
|
44
|
+
color: #354B64;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
padding: 5px 11px;
|
|
48
|
+
border-radius: 5px;
|
|
49
|
+
}
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
.toggle-podium-badge {
|
|
@@ -294,21 +294,23 @@
|
|
|
294
294
|
transform: translate(0, -3px);
|
|
295
295
|
color: #fff;
|
|
296
296
|
}
|
|
297
|
-
&--airship{
|
|
298
|
-
background
|
|
297
|
+
&--airship {
|
|
298
|
+
background: transparent linear-gradient(112deg, #BD38DF 0%, #5F1C70 100%) 0% 0% no-repeat padding-box;
|
|
299
|
+
|
|
299
300
|
&:hover:not(:disabled) {
|
|
300
|
-
background-color: #
|
|
301
|
-
box-shadow: 0 10px 30px -10px rgba(
|
|
301
|
+
background-color: #5F1C70;
|
|
302
|
+
box-shadow: 0 10px 30px -10px rgba(190, 58, 223, 0.5);
|
|
302
303
|
}
|
|
303
|
-
|
|
304
|
-
|
|
304
|
+
|
|
305
|
+
&:disabled, &[disabled] {
|
|
306
|
+
background: transparent linear-gradient(112deg, rgba(190, 58, 223, 0.6) 0%, rgba(94, 28, 110, 0.6) 100%) 0% 0% no-repeat padding-box;
|
|
305
307
|
}
|
|
306
308
|
}
|
|
307
309
|
&--loading{
|
|
308
310
|
background-color: #3180FF !important;
|
|
309
311
|
}
|
|
310
312
|
&--airship-loading{
|
|
311
|
-
background
|
|
313
|
+
background: transparent linear-gradient(112deg, #BD38DF 0%, #5F1C70 100%) 0% 0% no-repeat padding-box !important;
|
|
312
314
|
}
|
|
313
315
|
}
|
|
314
316
|
|
|
@@ -328,6 +330,9 @@
|
|
|
328
330
|
top: 50%;
|
|
329
331
|
margin-top: -0.5rem;
|
|
330
332
|
box-sizing: content-box;
|
|
333
|
+
&--airship {
|
|
334
|
+
border-top-color: transparent;
|
|
335
|
+
}
|
|
331
336
|
}
|
|
332
337
|
|
|
333
338
|
.toggle-metrics-button {
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
color: $toggle-metric-label-black;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
&.metric-label-atmosphere {
|
|
21
|
+
color: #354B64;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
font-size: 18px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.metric-value-atmosphere {
|
|
27
|
+
font-weight: 800;
|
|
28
|
+
color: #00346F;
|
|
29
|
+
}
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
|
|
@@ -139,4 +149,15 @@
|
|
|
139
149
|
.toggle-metric-score-rating {
|
|
140
150
|
font-size: 27px;
|
|
141
151
|
margin-left: -8px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.toggle-metric-live-icon {
|
|
155
|
+
display: inline-block;
|
|
156
|
+
vertical-align: top;
|
|
157
|
+
background-image: url('../assets/icons/bolt-solid.svg');
|
|
158
|
+
background-repeat: no-repeat;
|
|
159
|
+
background-size: contain;
|
|
160
|
+
height: 19px;
|
|
161
|
+
width: 19px;
|
|
162
|
+
margin: 17px 0 0 5px;
|
|
142
163
|
}
|
|
@@ -62,9 +62,9 @@ $booster-test-colour-light:#02add3;
|
|
|
62
62
|
$booster-test-colour-med:#0098ac;
|
|
63
63
|
$booster-test-colour-dark:#008ba4;
|
|
64
64
|
|
|
65
|
-
$booster-feedback-colour-light:#
|
|
66
|
-
$booster-feedback-colour-med:#
|
|
67
|
-
$booster-feedback-colour-dark:#
|
|
65
|
+
$booster-feedback-colour-light:#ffffff;
|
|
66
|
+
$booster-feedback-colour-med:#dd3c3c;
|
|
67
|
+
$booster-feedback-colour-dark:#000000;
|
|
68
68
|
|
|
69
69
|
/* metrics */
|
|
70
70
|
$toggle-metric-label-blue: #477EF6;
|