toggle-components-library 1.25.3 → 1.25.5
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/dist/toggle-components-library.common.js +187 -94
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +187 -94
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +6 -6
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/buttons/ToggleLoginButton.vue +67 -0
- package/src/components/navs/multitiersidenav/ToggleMultiTierSideNav.vue +13 -1
- package/src/index.js +2 -0
- package/src/sass/includes/_as_buttons.scss +55 -0
- package/src/sass/includes/_as_inputs.scss +4 -2
- package/package-lock.json +0 -20762
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -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>
|
|
@@ -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="
|
|
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,
|
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
|
+
}
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
font-size: $toggle-font-size-small;
|
|
155
155
|
color : $toggle-error-red !important;
|
|
156
156
|
display : block;
|
|
157
|
-
|
|
158
|
-
bottom
|
|
157
|
+
margin-top: 1rem;
|
|
158
|
+
margin-bottom: -1.1rem;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// date picker
|
|
@@ -893,6 +893,8 @@ $iconWidth:20px;
|
|
|
893
893
|
}
|
|
894
894
|
|
|
895
895
|
.toggle-input-label-error {
|
|
896
|
+
margin-top: 0rem;
|
|
897
|
+
margin-bottom: 0rem;
|
|
896
898
|
position: absolute;
|
|
897
899
|
bottom:-17px;
|
|
898
900
|
}
|