toggle-components-library 1.36.3 → 1.36.4-beta.0

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.36.3",
3
+ "version": "1.36.4-beta.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,10 +1,10 @@
1
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' }, { 'toggle-login-button--loading': platform == 'toggle' && loading }, { 'toggle-login-button--airship-loading': platform == 'airship' && loading }]" @click="click"
5
- :disabled="(loading || disabled)">
2
+ <div class="toggle-button-container toggle-button-container--login"
3
+ :class="{'toggle-button-container--fluid': btnFluid}">
6
4
 
7
- <div :class="['toggle-login-button-loader', { 'toggle-login-button-loader--airship': platform == 'airship' }]" v-if="loading"></div>
5
+ <button :type="type" :class="buttonClasses" @click="click" :disabled="(loading || disabled)">
6
+
7
+ <div :class="loaderClasses" v-if="loading"></div>
8
8
 
9
9
  <div class="toggle-login-button-text" v-else>
10
10
  {{ buttonText }}
@@ -42,13 +42,13 @@ export default {
42
42
  default: false
43
43
  },
44
44
  /**
45
- * Is the button being used on toggle or airship? use `toggle` or `airship`
45
+ * Is the button being used on toggle or airship? use `toggle` or `airship` or for Airships new rebranding `airship-atmosphere`
46
46
  */
47
47
  platform: {
48
48
  type: String,
49
49
  default: "toggle",
50
50
  validator: function (value) {
51
- return ['toggle', 'airship'].indexOf(value) !== -1;
51
+ return ['toggle', 'airship', 'airship-atmosphere'].indexOf(value) !== -1;
52
52
  },
53
53
  },
54
54
  /**
@@ -77,6 +77,33 @@ export default {
77
77
  */
78
78
  this.$emit('click');
79
79
  }
80
+ },
81
+ computed: {
82
+ /**
83
+ * The class to apply to the button
84
+ * @return {Object}
85
+ */
86
+ buttonClasses() {
87
+ return {
88
+ 'toggle-login-button': true,
89
+ 'toggle-login-button--airship': this.platform == 'airship',
90
+ 'toggle-login-button--loading': this.platform == 'toggle' && this.loading,
91
+ 'toggle-login-button--airship-loading': this.platform == 'airship' && this.loading,
92
+ 'toggle-login-button--airship-atmosphere': this.platform == 'airship-atmosphere',
93
+ 'toggle-login-button--airship-atmosphere-loading': this.platform == 'airship-atmosphere' && this.loading
94
+ }
95
+ },
96
+ /**
97
+ * The class to apply to the loader
98
+ * @return {Object}
99
+ */
100
+ loaderClasses() {
101
+ return {
102
+ 'toggle-login-button-loader': true,
103
+ 'toggle-login-button-loader--airship': this.platform == 'airship',
104
+ 'toggle-login-button-loader--airship-atmosphere': this.platform == 'airship-atmosphere'
105
+ }
106
+ }
80
107
  }
81
108
  }
82
109
  </script>
@@ -167,7 +167,7 @@ export default {
167
167
 
168
168
  </script>
169
169
 
170
- <style scoped>
170
+ <style scoped lang="scss">
171
171
  .toggle-date-container {
172
172
  display: none;
173
173
  &.visible {
@@ -304,12 +304,27 @@
304
304
  background-color: #ed9598;
305
305
  }
306
306
  }
307
+ &--airship-atmosphere {
308
+ background: transparent linear-gradient(112deg, #BD38DF 0%, #5F1C70 100%) 0% 0% no-repeat padding-box;
309
+
310
+ &:hover:not(:disabled) {
311
+ background-color: #5F1C70;
312
+ box-shadow: 0 10px 30px -10px rgba(190, 58, 223, 0.5);
313
+ }
314
+
315
+ &:disabled, &[disabled] {
316
+ background: transparent linear-gradient(112deg, rgba(190, 58, 223, 0.6) 0%, rgba(94, 28, 110, 0.6) 100%) 0% 0% no-repeat padding-box;
317
+ }
318
+ }
307
319
  &--loading{
308
320
  background-color: #3180FF !important;
309
321
  }
310
322
  &--airship-loading{
311
323
  background-color: #FF7175 !important;
312
324
  }
325
+ &--airship-atmosphere-loading{
326
+ background: transparent linear-gradient(112deg, #BD38DF 0%, #5F1C70 100%) 0% 0% no-repeat padding-box !important;
327
+ }
313
328
  }
314
329
 
315
330
 
@@ -328,6 +343,12 @@
328
343
  top: 50%;
329
344
  margin-top: -0.5rem;
330
345
  box-sizing: content-box;
346
+ &--airship {
347
+ border-top-color: #FF7175;
348
+ }
349
+ &--airship-atmosphere {
350
+ border-top-color: transparent;
351
+ }
331
352
  }
332
353
 
333
354
  .toggle-metrics-button {