toggle-components-library 1.36.4-beta.0 → 1.36.4-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.36.4-beta.0",
3
+ "version": "1.36.4-beta.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -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
- :class="{'toggle-button-container--fluid': btnFluid}">
2
+ <div class="toggle-button-container toggle-button-container--login" :class="{'toggle-button-container--fluid': btnFluid}">
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)">
4
6
 
5
- <button :type="type" :class="buttonClasses" @click="click" :disabled="(loading || disabled)">
6
-
7
- <div :class="loaderClasses" v-if="loading"></div>
7
+ <div :class="['toggle-login-button-loader', { 'toggle-login-button-loader--airship': platform == 'airship' }]" v-if="loading"></div>
8
8
 
9
9
  <div class="toggle-login-button-text" v-else>
10
10
  {{ buttonText }}
@@ -42,13 +42,13 @@ export default {
42
42
  default: false
43
43
  },
44
44
  /**
45
- * Is the button being used on toggle or airship? use `toggle` or `airship` or for Airships new rebranding `airship-atmosphere`
45
+ * Is the button being used on toggle or airship? use `toggle` or `airship`
46
46
  */
47
47
  platform: {
48
48
  type: String,
49
49
  default: "toggle",
50
50
  validator: function (value) {
51
- return ['toggle', 'airship', 'airship-atmosphere'].indexOf(value) !== -1;
51
+ return ['toggle', 'airship'].indexOf(value) !== -1;
52
52
  },
53
53
  },
54
54
  /**
@@ -77,33 +77,6 @@ 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
- 'toggle-login-button--airship-atmosphere': this.platform == 'airship-atmosphere',
93
- 'toggle-login-button--airship-atmosphere-loading': this.platform == 'airship-atmosphere' && this.loading
94
- }
95
- },
96
- /**
97
- * The class to apply to the loader
98
- * @return {Object}
99
- */
100
- loaderClasses() {
101
- return {
102
- 'toggle-login-button-loader': true,
103
- 'toggle-login-button-loader--airship': this.platform == 'airship',
104
- 'toggle-login-button-loader--airship-atmosphere': this.platform == 'airship-atmosphere'
105
- }
106
- }
107
80
  }
108
81
  }
109
82
  </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 {
@@ -304,27 +304,12 @@
304
304
  background-color: #ed9598;
305
305
  }
306
306
  }
307
- &--airship-atmosphere {
308
- background: transparent linear-gradient(112deg, #BD38DF 0%, #5F1C70 100%) 0% 0% no-repeat padding-box;
309
-
310
- &:hover:not(:disabled) {
311
- background-color: #5F1C70;
312
- box-shadow: 0 10px 30px -10px rgba(190, 58, 223, 0.5);
313
- }
314
-
315
- &:disabled, &[disabled] {
316
- 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;
317
- }
318
- }
319
307
  &--loading{
320
308
  background-color: #3180FF !important;
321
309
  }
322
310
  &--airship-loading{
323
311
  background-color: #FF7175 !important;
324
312
  }
325
- &--airship-atmosphere-loading{
326
- background: transparent linear-gradient(112deg, #BD38DF 0%, #5F1C70 100%) 0% 0% no-repeat padding-box !important;
327
- }
328
313
  }
329
314
 
330
315
 
@@ -343,12 +328,6 @@
343
328
  top: 50%;
344
329
  margin-top: -0.5rem;
345
330
  box-sizing: content-box;
346
- &--airship {
347
- border-top-color: #FF7175;
348
- }
349
- &--airship-atmosphere {
350
- border-top-color: transparent;
351
- }
352
331
  }
353
332
 
354
333
  .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
  }