toggle-components-library 1.25.12 → 1.25.13
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 +54 -54
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +54 -54
- package/package-lock.json +20275 -0
- package/package.json +1 -1
- package/src/components/buttons/ToggleLoginButton.vue +75 -0
- package/src/sass/includes/_as_buttons.scss +83 -0
- package/src/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="toggle-button-container toggle-button-container--login" :class="{'toggle-button-container--fluid': btnFluid}">
|
|
3
|
+
|
|
4
|
+
<button :type="type" :class="['toggle-login-button', { 'toggle-login-button--airship': platform == 'airship' }]" @click="click">
|
|
5
|
+
|
|
6
|
+
<div :class="['toggle-login-button-loader', { 'toggle-login-button-loader--airship': platform == 'airship' }]" v-if="loading"></div>
|
|
7
|
+
|
|
8
|
+
<div class="toggle-login-button-text" v-else>
|
|
9
|
+
{{ buttonText }}
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
</button>
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'ButtonLogin',
|
|
21
|
+
props: {
|
|
22
|
+
/**
|
|
23
|
+
* The test to display in side the button
|
|
24
|
+
*/
|
|
25
|
+
buttonText: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "Let's go!"
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* The HTML button type i.e. `submit` or `button`
|
|
31
|
+
*/
|
|
32
|
+
type: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "submit"
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* Is the button in a loading state?
|
|
38
|
+
*/
|
|
39
|
+
loading: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Is the button being used on toggle or airship? use `toggle` or `airship`
|
|
45
|
+
*/
|
|
46
|
+
platform: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "toggle",
|
|
49
|
+
validator: function (value) {
|
|
50
|
+
return ['toggle', 'airship'].indexOf(value) !== -1;
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Is the button being used on toggle or airship? use `toggle` or `airship`
|
|
55
|
+
*/
|
|
56
|
+
btnFluid: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
validator: function (value) {
|
|
60
|
+
return [true, false].indexOf(value) !== -1;
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
click() {
|
|
66
|
+
/**
|
|
67
|
+
* Emitted when the button is clicked.
|
|
68
|
+
* @event click
|
|
69
|
+
* @type {Event}
|
|
70
|
+
*/
|
|
71
|
+
this.$emit('click');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
background:white;
|
|
20
20
|
display: inline-block;
|
|
21
21
|
border-radius: 0.3rem;
|
|
22
|
+
&--login{
|
|
23
|
+
border-radius: 23px;
|
|
24
|
+
}
|
|
25
|
+
&--fluid{
|
|
26
|
+
width: 100%;
|
|
27
|
+
button{
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
|
|
24
33
|
|
|
@@ -237,3 +246,77 @@
|
|
|
237
246
|
}
|
|
238
247
|
|
|
239
248
|
}
|
|
249
|
+
|
|
250
|
+
//
|
|
251
|
+
// Toggle and Airship Login Buttons
|
|
252
|
+
//
|
|
253
|
+
|
|
254
|
+
.toggle-login-button {
|
|
255
|
+
background-color: #3180FF;
|
|
256
|
+
border: 0;
|
|
257
|
+
border-radius: 23px;
|
|
258
|
+
width: 120px;
|
|
259
|
+
height: 46px;
|
|
260
|
+
color: #ffffff;
|
|
261
|
+
cursor: pointer;
|
|
262
|
+
font: normal normal 600 15px/18px Lato;
|
|
263
|
+
position: relative;
|
|
264
|
+
transition: box-shadow .3s, transform .3s, background-color .3s, -webkit-transform .3s;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.toggle-login-button--airship {
|
|
268
|
+
background-color: #FF7175 !important;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.toggle-login-button:hover {
|
|
272
|
+
background-color: #1571dd;
|
|
273
|
+
box-shadow: 0 10px 30px -10px #2cc1ff;
|
|
274
|
+
-webkit-transform: translate(0, -3px);
|
|
275
|
+
-ms-transform: translate(0, -3px);
|
|
276
|
+
transform: translate(0, -3px);
|
|
277
|
+
color: #fff;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.toggle-login-button--airship:hover {
|
|
281
|
+
background-color: #ff463f !important;
|
|
282
|
+
box-shadow: 0 10px 30px -10px rgb(254 108 102 / 50%) !important;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.toggle-login-button-loader {
|
|
286
|
+
border-radius: 50%;
|
|
287
|
+
border: .25rem solid #fff;
|
|
288
|
+
border-top-color: #3180FF;
|
|
289
|
+
animation: spin 1s infinite linear;
|
|
290
|
+
margin: 0 auto;
|
|
291
|
+
width: 0.5rem;
|
|
292
|
+
height: 0.5rem;
|
|
293
|
+
position: absolute;
|
|
294
|
+
left: 50%;
|
|
295
|
+
margin-left: -0.5rem;
|
|
296
|
+
top: 50%;
|
|
297
|
+
margin-top: -0.5rem;
|
|
298
|
+
box-sizing: content-box;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.toggle-login-button-loader--airship {
|
|
302
|
+
border-top-color: #FF7175;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.toggle-button-container{
|
|
306
|
+
&:disabled, &[disabled]{
|
|
307
|
+
.toggle-login-button{
|
|
308
|
+
background-color: #d4e4ff;
|
|
309
|
+
cursor: not-allowed;
|
|
310
|
+
-webkit-transform: translate(0, 0);
|
|
311
|
+
-ms-transform: translate(0, 0);
|
|
312
|
+
transform: translate(0, 0);
|
|
313
|
+
}
|
|
314
|
+
.toggle-login-button--airship{
|
|
315
|
+
background-color: #ed9598 !important;
|
|
316
|
+
cursor: not-allowed;
|
|
317
|
+
-webkit-transform: translate(0, 0);
|
|
318
|
+
-ms-transform: translate(0, 0);
|
|
319
|
+
transform: translate(0, 0);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
package/src/.DS_Store
DELETED
|
Binary file
|