toggle-components-library 1.37.0-beta.1 → 1.37.0-beta.11

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.1",
3
+ "version": "1.37.0-beta.11",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -0,0 +1 @@
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,13 +1,11 @@
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
4
  <template v-if="index === breadcrumb_computed.length - 1 && editable">
5
- <input
6
- class="toggle-breadcrumb-editable-input"
7
- v-model="crumb.name"
8
- maxlength="50"
9
- @input="autoResizeInput($event.target); updateContent($event);"
10
- />
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>
11
9
  </template>
12
10
  <template v-else>
13
11
  <router-link :to="{ name: crumb.link}" class="back-product" v-if="crumb.link && !isNuxt">{{ crumb.name }}</router-link>
@@ -21,7 +19,6 @@
21
19
 
22
20
  <script>
23
21
  export default {
24
- mixins: [],
25
22
  props: {
26
23
  isNuxt: {
27
24
  type: Boolean,
@@ -36,24 +33,14 @@ export default {
36
33
  default: false
37
34
  }
38
35
  },
39
-
40
- data: function () {
41
- return {};
42
- },
43
-
44
36
  computed: {
45
37
  breadcrumb_computed() {
46
- return this.isNuxt ? this.breadcrumb : this.$route.meta.breadcrumb
47
- },
38
+ return this.isNuxt ? this.breadcrumb : this.$route.meta.breadcrumb
39
+ }
48
40
  },
49
-
50
41
  methods: {
51
- autoResizeInput(input) {
52
- input.style.width = input.value.length * 11 + "px";
53
- },
54
- updateContent(event) {
55
- const newContent = event.target.value;
56
- this.$emit('update:lastCrumb', newContent);
42
+ editClicked() {
43
+ this.$emit('edit-clicked')
57
44
  }
58
45
  }
59
46
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>
2
+ <div class="toggle-input-radio-button-mini-switch-wrapper">
3
3
  <label :class="['toggle-input-radio-button-mini-switch', {'toggle-input-radio-button-mini-switch-disabled': disabled}]">
4
4
  <input type="checkbox" :value="value" v-model="value" :disabled="disabled">
5
5
  <span :class="['toggle-input-radio-button-mini-slider', {'toggle-input-radio-button-mini-slider-disabled': disabled}]">
@@ -10,37 +10,6 @@
10
10
 
11
11
  }
12
12
 
13
- .toggle-breadcrumb-editable-input {
14
- font-size: $toggle-font-size-extra-large;
15
- font-family: "DIN-2014","Lato",sans-serif;
16
- color: $toggle-black;
17
- background-color: transparent;
18
- display: inline-flex;
19
- align-items: center;
20
- min-width: 10rem !important;
21
- max-width: 31rem !important;
22
- height: 2rem;
23
- width: 15rem;
24
- padding-right: 0.5rem;
25
- border: none;
26
- border-radius: 4px;
27
- white-space: nowrap;
28
- overflow: hidden;
29
- line-height: 1;
30
- border: 1px solid transparent;
31
- margin: -1px 0 0 0;
32
- }
33
- .toggle-breadcrumb-editable-input:hover {
34
- border: 1px solid #ccc;
35
- background-color: $toggle-off-white;
36
- }
37
-
38
- .toggle-breadcrumb-editable-input:focus {
39
- border: 1px solid #ccc;
40
- outline: none;
41
- }
42
-
43
-
44
13
  a {
45
14
 
46
15
  font-size: $toggle-font-size-extra-large;
@@ -67,4 +36,30 @@
67
36
  transform: rotate(-45deg);
68
37
  -webkit-transform: rotate(-45deg);
69
38
  }
70
- }
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.07) rotate(-6deg);
63
+ }
64
+ }
65
+ }
@@ -1221,80 +1221,84 @@ $iconWidth:20px;
1221
1221
  }
1222
1222
 
1223
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;
1224
+ .toggle-input-radio-button-mini-switch-wrapper{
1248
1225
  display: flex;
1249
1226
  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
1227
 
1297
- .toggle-input-radio-button-mini-slider-disabled {
1298
- cursor: default !important;
1299
- opacity: 0.5;
1228
+ .toggle-input-radio-button-mini-switch {
1229
+ position: relative;
1230
+ display: inline-block;
1231
+ width: 52px;
1232
+ height: 28px;
1233
+ }
1234
+
1235
+ .toggle-input-radio-button-mini-switch input {
1236
+ opacity: 0;
1237
+ width: 0;
1238
+ height: 0;
1239
+ }
1240
+
1241
+ .toggle-input-radio-button-mini-slider {
1242
+ position: absolute;
1243
+ cursor: pointer;
1244
+ top: 0;
1245
+ left: 0;
1246
+ right: 0;
1247
+ bottom: 0;
1248
+ background-color: #ccc;
1249
+ -webkit-transition: .4s;
1250
+ transition: .4s;
1251
+ display: flex;
1252
+ align-items: center;
1253
+ border-radius: 34px;
1254
+ }
1255
+
1256
+ .toggle-input-radio-button-mini-slider:before {
1257
+ position: absolute;
1258
+ content: "";
1259
+ height: 22px;
1260
+ width: 22px;
1261
+ left: 4px;
1262
+ bottom: 3px;
1263
+ background-color: white;
1264
+ -webkit-transition: .4s;
1265
+ transition: .4s;
1266
+ border-radius: 50%;
1267
+ }
1268
+
1269
+ input:checked + .toggle-input-radio-button-mini-slider {
1270
+ background-color: #2196F3;
1271
+ }
1272
+
1273
+ input:focus + .toggle-input-radio-button-mini-slider {
1274
+ box-shadow: 0 0 1px #2196F3;
1275
+ }
1276
+
1277
+ input:checked + .toggle-input-radio-button-mini-slider:before {
1278
+ -webkit-transform: translateX(22px);
1279
+ -ms-transform: translateX(22px);
1280
+ transform: translateX(22px);
1281
+ }
1282
+
1283
+ .toggle-input-radio-button-mini-text-on {
1284
+ font-family: $toggle-font-family;
1285
+ font-size: 12px;
1286
+ color: #ffffff;
1287
+ margin-left: 7px;
1288
+ }
1289
+ .toggle-input-radio-button-mini-text-off {
1290
+ font-family: $toggle-font-family;
1291
+ font-size: 12px;
1292
+ color: #3A4A62;
1293
+ margin-left: 6px;
1294
+ }
1295
+ .toggle-input-radio-button-mini-switch-disabled {
1296
+ cursor: default !important;
1297
+ opacity: 0.5;
1298
+ }
1299
+
1300
+ .toggle-input-radio-button-mini-slider-disabled {
1301
+ cursor: default !important;
1302
+ opacity: 0.5;
1303
+ }
1300
1304
  }