toggle-components-library 1.36.3 → 1.36.4-beta.1

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.3",
3
+ "version": "1.36.4-beta.1",
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>
@@ -167,7 +167,7 @@ export default {
167
167
 
168
168
  </script>
169
169
 
170
- <style scoped>
170
+ <style scoped lang="scss">
171
171
  .toggle-date-container {
172
172
  display: none;
173
173
  &.visible {
@@ -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
  }
@@ -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
  }