toggle-components-library 1.37.0-beta.9 → 1.37.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.37.0-beta.9",
3
+ "version": "1.37.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="#3180FF"/>
5
+ <stop offset="1" stop-color="#38ABFF"/>
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,24 +1,20 @@
1
1
  <template>
2
- <div :class="['toggle-breadcrumb']" v-if="breadcrumb_computed">
2
+ <div class="toggle-breadcrumb" v-if="breadcrumb_computed">
3
3
  <div v-for="(crumb, index) in breadcrumb_computed" :key="index">
4
- <template v-if="index === breadcrumb_computed.length - 1 && editable">
5
- <div class="toggle-breadcrumb-last-element-container">
6
- <h1 class="toggle-breadcrumb-h1 toggle-breadcrumb-last-element">{{ crumb.name }}</h1>
7
- <div v-if="editable" class="toggle-breadcrumb-edit-icon" @click="editClicked"></div>
8
- </div>
9
- </template>
10
- <template v-else>
11
- <router-link :to="{ name: crumb.link}" class="back-product" v-if="crumb.link && !isNuxt">{{ crumb.name }}</router-link>
12
- <NuxtLink :to="{ name: crumb.link}" class="back-product" v-if="crumb.link && isNuxt">{{ crumb.name }}</NuxtLink>
13
- <i class="toggle-breadcrumb-arrow-right" v-if="crumb.link"></i>
14
- <h1 class="toggle-breadcrumb-h1" v-if="!crumb.link">{{ crumb.name }}</h1>
15
- </template>
4
+ <router-link :to="{ name: crumb.link}" class="back-product" v-if="crumb.link && !isNuxt">{{ crumb.name }}</router-link>
5
+ <NuxtLink :to="{ name: crumb.link}" class="back-product" v-if="crumb.link && isNuxt">{{ crumb.name }}</NuxtLink>
6
+ <i class="toggle-breadcrumb-arrow-right" v-if="crumb.link"></i>
7
+ <h1 class="toggle-breadcrumb-h1" v-if="!crumb.link">{{ crumb.name }}</h1>
16
8
  </div>
17
9
  </div>
18
10
  </template>
19
11
 
20
12
  <script>
13
+
14
+
21
15
  export default {
16
+
17
+ mixins: [],
22
18
  props: {
23
19
  isNuxt: {
24
20
  type: Boolean,
@@ -27,21 +23,21 @@ export default {
27
23
  breadcrumb: {
28
24
  type: Array,
29
25
  required: false
30
- },
31
- editable: {
32
- type: Boolean,
33
- default: false
34
26
  }
35
27
  },
28
+
29
+ data: function () {
30
+
31
+
32
+ return {};
33
+ },
34
+
36
35
  computed: {
36
+
37
37
  breadcrumb_computed() {
38
38
  return this.isNuxt ? this.breadcrumb : this.$route.meta.breadcrumb
39
- }
40
- },
41
- methods: {
42
- editClicked() {
43
- this.$emit('edit-clicked')
44
- }
39
+ },
45
40
  }
41
+
46
42
  }
47
43
  </script>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div>
3
- <h3 :class="['toggle-metric metric-label', {'metric-label-atmosphere': atmosphere}]">{{label}}</h3>
3
+ <h3 :class="['toggle-metric metric-label', {'metric-label-atmosphere': atmosphere || toggle}]">{{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 }, { 'metric-value-small': small}]" v-else>{{metricValue}}
5
+ <h1 :class="['toggle-metric metric-value', { 'metric-value-atmosphere': atmosphere || toggle }, { 'metric-value-small': small}]" 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
+ <span v-if="(atmosphere || toggle) && live == true" :class="['toggle-metric-live-icon', {'toggle-metric-live-icon-toggle': toggle}]"></span>
8
8
  </h1>
9
9
  </div>
10
10
  </template>
@@ -82,7 +82,7 @@ export default {
82
82
  type: String,
83
83
  default: "default",
84
84
  validator: function (value) {
85
- return ['default', 'atmosphere'].indexOf(value) !== -1
85
+ return ['default', 'atmosphere', 'toggle'].indexOf(value) !== -1
86
86
  }
87
87
  },
88
88
  metricSize: {
@@ -128,6 +128,9 @@ export default {
128
128
  atmosphere() {
129
129
  return this.metricStyle === 'atmosphere';
130
130
  },
131
+ toggle() {
132
+ return this.metricStyle === 'toggle';
133
+ },
131
134
  small() {
132
135
  return this.metricSize === 'small';
133
136
  }
package/src/index.js CHANGED
@@ -8,7 +8,6 @@ import ToggleInputSelect from "./components/forms/ToggleInputSelect.vue";
8
8
  import ToggleInputPercentage from "./components/forms/ToggleInputPercentage.vue";
9
9
  import ToggleInputCurrency from "./components/forms/ToggleInputCurrency.vue";
10
10
  import ToggleInputRadioButtons from "./components/forms/ToggleInputRadioButtons.vue";
11
- import ToggleInputRadioButtonMini from "./components/forms/ToggleInputRadioButtonMini.vue";
12
11
  import ToggleInputTextArea from "./components/forms/ToggleInputTextArea.vue";
13
12
  import ToggleInputCheckboxContainer from "./components/forms/ToggleInputCheckboxContainer.vue";
14
13
  import ToggleInternationalPhoneInputSelect from "./components/forms/ToggleInternationalPhoneInputSelect.vue";
@@ -113,7 +112,6 @@ const Components = {
113
112
  ToggleInputPercentage,
114
113
  ToggleInputCurrency,
115
114
  ToggleInputRadioButtons,
116
- ToggleInputRadioButtonMini,
117
115
  ToggleInputTextArea,
118
116
  ToggleInputCheckboxContainer,
119
117
  ToggleInputCheckbox,
@@ -36,30 +36,4 @@
36
36
  transform: rotate(-45deg);
37
37
  -webkit-transform: rotate(-45deg);
38
38
  }
39
- .toggle-breadcrumb-last-element-container {
40
- display: flex;
41
-
42
- .toggle-breadcrumb-last-element {
43
- margin: 0;
44
- overflow: hidden;
45
- white-space: nowrap;
46
- text-overflow: ellipsis;
47
- }
48
- .toggle-breadcrumb-edit-icon {
49
- margin: 4px 0 0 0;
50
- background-image: url('../assets/icons/edit-icon.svg');
51
- background-repeat:no-repeat;
52
- background-size:contain;
53
- height: 22px;
54
- width: 22px;
55
- min-width: 22px;
56
- margin-left: 15px;
57
- cursor: pointer;
58
- transition: 0.2s;
59
- }
60
- .toggle-breadcrumb-edit-icon:hover {
61
- filter: invert(0.5) sepia(1) saturate(3) hue-rotate(180deg);
62
- transform: scale(1.1) rotate(-10deg);
63
- }
64
- }
65
- }
39
+ }
@@ -1218,83 +1218,4 @@ $iconWidth:20px;
1218
1218
  .drop-down-leave-to {
1219
1219
  overflow: hidden;
1220
1220
  max-height: 0;
1221
- }
1222
-
1223
- // Radio button mini
1224
-
1225
- .toggle-input-radio-button-mini-switch {
1226
- position: relative;
1227
- display: inline-block;
1228
- width: 52px;
1229
- height: 28px;
1230
- }
1231
-
1232
- .toggle-input-radio-button-mini-switch input {
1233
- opacity: 0;
1234
- width: 0;
1235
- height: 0;
1236
- }
1237
-
1238
- .toggle-input-radio-button-mini-slider {
1239
- position: absolute;
1240
- cursor: pointer;
1241
- top: 0;
1242
- left: 0;
1243
- right: 0;
1244
- bottom: 0;
1245
- background-color: #ccc;
1246
- -webkit-transition: .4s;
1247
- transition: .4s;
1248
- display: flex;
1249
- align-items: center;
1250
- border-radius: 34px;
1251
- }
1252
-
1253
- .toggle-input-radio-button-mini-slider:before {
1254
- position: absolute;
1255
- content: "";
1256
- height: 22px;
1257
- width: 22px;
1258
- left: 4px;
1259
- bottom: 3px;
1260
- background-color: white;
1261
- -webkit-transition: .4s;
1262
- transition: .4s;
1263
- border-radius: 50%;
1264
- }
1265
-
1266
- input:checked + .toggle-input-radio-button-mini-slider {
1267
- background-color: #2196F3;
1268
- }
1269
-
1270
- input:focus + .toggle-input-radio-button-mini-slider {
1271
- box-shadow: 0 0 1px #2196F3;
1272
- }
1273
-
1274
- input:checked + .toggle-input-radio-button-mini-slider:before {
1275
- -webkit-transform: translateX(22px);
1276
- -ms-transform: translateX(22px);
1277
- transform: translateX(22px);
1278
- }
1279
-
1280
- .toggle-input-radio-button-mini-text-on {
1281
- font-family: $toggle-font-family;
1282
- font-size: 12px;
1283
- color: #ffffff;
1284
- margin-left: 7px;
1285
- }
1286
- .toggle-input-radio-button-mini-text-off {
1287
- font-family: $toggle-font-family;
1288
- font-size: 12px;
1289
- color: #3A4A62;
1290
- margin-left: 6px;
1291
- }
1292
- .toggle-input-radio-button-mini-switch-disabled {
1293
- cursor: default !important;
1294
- opacity: 0.5;
1295
- }
1296
-
1297
- .toggle-input-radio-button-mini-slider-disabled {
1298
- cursor: default !important;
1299
- opacity: 0.5;
1300
1221
  }
@@ -164,4 +164,8 @@
164
164
  height: 19px;
165
165
  width: 19px;
166
166
  margin: 17px 0 0 5px;
167
+ }
168
+
169
+ .toggle-metric-live-icon-toggle {
170
+ background-image: url('../assets/icons/bolt-solid-toggle.svg') !important;
167
171
  }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#abb7c5"><path d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#abb7c5"><path d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"/></svg>
@@ -1,38 +0,0 @@
1
- <template>
2
- <div>
3
- <label :class="['toggle-input-radio-button-mini-switch', {'toggle-input-radio-button-mini-switch-disabled': disabled}]">
4
- <input type="checkbox" :value="value" v-model="value" :disabled="disabled">
5
- <span :class="['toggle-input-radio-button-mini-slider', {'toggle-input-radio-button-mini-slider-disabled': disabled}]">
6
- <span class="toggle-input-radio-button-mini-text-on">On</span>
7
- <span class="toggle-input-radio-button-mini-text-off">Off</span>
8
- </span>
9
- </label>
10
- </div>
11
- </template>
12
-
13
- <script>
14
- export default {
15
- name: 'ToggleInputRadioButtonMini',
16
- props: {
17
- disabled: {
18
- type: Boolean,
19
- default: false
20
- }
21
- },
22
- computed: {
23
- value: {
24
- get() {
25
- return this.$attrs.value
26
- },
27
- set(value) {
28
- this.$emit('input', value)
29
- }
30
- }
31
- },
32
- watch: {
33
- value: function (val) {
34
- this.$emit('input', val)
35
- }
36
- }
37
- }
38
- </script>