toggle-components-library 1.25.2 → 1.25.4

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-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.25.2",
3
+ "version": "1.25.4",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.25.2",
3
+ "version": "1.25.4",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div class="toggle-button-container">
3
+
4
+ <button :type="type"
5
+ :class="['toggle-login-button', { 'toggle-login-button--airship': platform == 'airship' }]" @click="click">
6
+
7
+ <div :class="['toggle-login-button-loader', { 'toggle-login-button-loader--airship': platform == 'airship' }]"
8
+ v-if="loading"></div>
9
+
10
+ <div class="toggle-login-button-text" v-else>
11
+ {{ buttonText }}
12
+ </div>
13
+
14
+ </button>
15
+
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+
21
+ export default {
22
+ name: 'ButtonLogin',
23
+ props: {
24
+ /**
25
+ * The test to display in side the button
26
+ */
27
+ buttonText: {
28
+ type: String,
29
+ default: "Let's go!"
30
+ },
31
+ /**
32
+ * The HTML button type i.e. `submit` or `button`
33
+ */
34
+ type: {
35
+ type: String,
36
+ default: "submit"
37
+ },
38
+ /**
39
+ * Is the button in a loading state?
40
+ */
41
+ loading: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ /**
46
+ * Is the button being used on toggle or airship? use `toggle` or `airship`
47
+ */
48
+ platform: {
49
+ type: String,
50
+ default: "toggle",
51
+ validator: function (value) {
52
+ return ['toggle', 'airship'].indexOf(value) !== -1;
53
+ },
54
+ }
55
+ },
56
+ methods: {
57
+ click() {
58
+ /**
59
+ * Emitted when the button is clicked.
60
+ * @event click
61
+ * @type {Event}
62
+ */
63
+ this.$emit('click');
64
+ }
65
+ }
66
+ }
67
+ </script>
@@ -15,7 +15,7 @@
15
15
  tag="ul"
16
16
  v-model="inputVal"
17
17
  v-bind="dragOptions"
18
-
18
+
19
19
  >
20
20
  <transition-group type="transition" >
21
21
  <li
@@ -25,7 +25,7 @@
25
25
  :style="{marginRight:thumbnailWidth / 8 + 'px'}"
26
26
 
27
27
  >
28
- <div class="toggle-item-img toggle-dark-grey toggle-center"
28
+ <div class="toggle-item-img toggle-dark-grey toggle-center" :class="moveIconClass"
29
29
  :style="{ background: `rgb(243, 237, 237) url(${image.url}) no-repeat center top`,
30
30
  height: previewRatio == 'letterbox' ? thumbnailWidth / 2 + 'px': thumbnailWidth+'px',
31
31
  width: thumbnailWidth+'px'}"
@@ -49,7 +49,7 @@
49
49
  :id="'dropzone'+_uid"
50
50
  :options="dropzoneOptions"
51
51
  @vdropzone-file-added="fileAdded"
52
-
52
+
53
53
  />
54
54
  </div>
55
55
  </div>
@@ -142,6 +142,11 @@ export default {
142
142
  animation: 200,
143
143
  group: "images",
144
144
  };
145
+ },
146
+ moveIconClass() {
147
+ return {
148
+ 'toggle-move-icon' : this.images.length > 1
149
+ }
145
150
  },
146
151
  inputVal: {
147
152
  get: function (){
@@ -155,8 +160,8 @@ export default {
155
160
  },
156
161
  methods: {
157
162
 
158
-
159
-
163
+
164
+
160
165
  }
161
166
  }
162
167
 
@@ -164,5 +169,4 @@ export default {
164
169
  </script>
165
170
  <style lang="scss">
166
171
 
167
-
168
172
  </style>
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
  <div class="toggle-multi-tier-sidenav-select-container">
17
- <ToggleInputSelect type="text" placeholder="placeholder text" label="Location" :options="unitOptions" v-model="unitOptionVal" />
17
+ <ToggleInputSelect type="text" placeholder="placeholder text" label="Location" :options="unitOptionsSorted" v-model="unitOptionVal" />
18
18
  </div>
19
19
 
20
20
  <div v-if="userMenuOpen" class="toggle-multi-tier-sidenav-user-menu-container">
@@ -82,7 +82,19 @@ export default {
82
82
  set: function (value) {
83
83
  this.$emit('input', value);
84
84
  }
85
+ },
86
+
87
+ unitOptionsSorted() {
88
+ // Create a new array and populate it with the elements from the original unitOptions array
89
+ const sortedUnitOptions = [...this.unitOptions];
90
+
91
+ // Sort the new array in ascending alphabetical order according to the label property of each element
92
+ sortedUnitOptions.sort((a, b) => a.label.localeCompare(b.label));
93
+
94
+ // Return the new sorted array
95
+ return sortedUnitOptions;
85
96
  }
97
+
86
98
  },
87
99
  components: {
88
100
  ToggleHeaderTextLarge,
@@ -45,7 +45,16 @@ export default {
45
45
  window.getSelection().removeAllRanges();
46
46
  window.getSelection().addRange(range);
47
47
  document.execCommand("copy");
48
- }
48
+ this.click();
49
+ },
50
+ click(){
51
+ /**
52
+ * Emitted when the button is clicked.
53
+ * @event click
54
+ * @type {Event}
55
+ */
56
+ this.$emit('click');
57
+ }
49
58
  }
50
59
  };
51
60
  </script>
package/src/index.js CHANGED
@@ -25,6 +25,7 @@ import ToggleModal from "./components/modals/ToggleModal.vue";
25
25
  import ToggleInputSearch from "./components/forms/ToggleInputSearch.vue";
26
26
  import ToggleInputRadioButtonGroup from "./components/forms/ToggleInputRadioButtonGroup.vue";
27
27
  import ToggleButton from "./components/buttons/ToggleButton.vue";
28
+ import ToggleLoginButton from "./components/buttons/ToggleLoginButton.vue";
28
29
  import ToggleFillLoader from "./components/loaders/ToggleFillLoader.vue";
29
30
 
30
31
 
@@ -90,6 +91,7 @@ const Components = {
90
91
  ToggleFillLoader,
91
92
  ToggleInputImage,
92
93
  ToggleButton,
94
+ ToggleLoginButton,
93
95
  ToggleInputGroup,
94
96
  ToggleHeaderTextLarge,
95
97
  ToggleInputNumber,
@@ -237,3 +237,58 @@
237
237
  }
238
238
 
239
239
  }
240
+
241
+ //
242
+ // Toggle and Airship Login Buttons
243
+ //
244
+
245
+ .toggle-login-button {
246
+ background-color: #3180FF;
247
+ border: 0;
248
+ border-radius: 23px;
249
+ width: 120px;
250
+ height: 46px;
251
+ color: #ffffff;
252
+ cursor: pointer;
253
+ font: normal normal 600 15px/18px Lato;
254
+ position: relative;
255
+ transition: box-shadow .3s, transform .3s, background-color .3s, -webkit-transform .3s;
256
+ }
257
+
258
+ .toggle-login-button--airship {
259
+ background-color: #FF7175 !important;
260
+ }
261
+
262
+ .toggle-login-button:hover {
263
+ background-color: #1571dd;
264
+ box-shadow: 0 10px 30px -10px #2cc1ff;
265
+ -webkit-transform: translate(0, -3px);
266
+ -ms-transform: translate(0, -3px);
267
+ transform: translate(0, -3px);
268
+ color: #fff;
269
+ }
270
+
271
+ .toggle-login-button--airship:hover {
272
+ background-color: #ff463f !important;
273
+ box-shadow: 0 10px 30px -10px rgb(254 108 102 / 50%) !important;
274
+ }
275
+
276
+ .toggle-login-button-loader {
277
+ border-radius: 50%;
278
+ border: .25rem solid #fff;
279
+ border-top-color: #3180FF;
280
+ animation: spin 1s infinite linear;
281
+ margin: 0 auto;
282
+ width: 0.5rem;
283
+ height: 0.5rem;
284
+ position: absolute;
285
+ left: 50%;
286
+ margin-left: -0.5rem;
287
+ top: 50%;
288
+ margin-top: -0.5rem;
289
+ box-sizing: content-box;
290
+ }
291
+
292
+ .toggle-login-button-loader--airship {
293
+ border-top-color: #FF7175;
294
+ }
@@ -507,20 +507,20 @@ $iconWidth:20px;
507
507
  background-size: cover !important;
508
508
  background-position: center;
509
509
  border-radius:4px;
510
- cursor: move;
511
510
  }
512
- .toggle-item-img::after{
511
+ .toggle-center {
512
+ display: flex;
513
+ align-items: center;
514
+ justify-content: center;
515
+ }
516
+ .toggle-move-icon::after {
513
517
  position: absolute;
514
518
  content:'';
515
519
  height: 100%;
516
520
  width: 100%;
521
+ background-size: $iconWidth!important;
517
522
  background: url('../assets/icons/draggable.svg') no-repeat center center;
518
- background-size: $iconWidth;
519
- }
520
- .toggle-center {
521
- display: flex;
522
- align-items: center;
523
- justify-content: center;
523
+ cursor: move;
524
524
  }
525
525
 
526
526
  }
@@ -51,7 +51,7 @@ a {
51
51
  background-position: center;
52
52
  background-size: contain;
53
53
  background-repeat: no-repeat;
54
- cursor:pointer;
54
+ cursor:copy;
55
55
  }
56
56
  }
57
57
  }