toggle-components-library 1.32.0-beta.9 → 1.33.0-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-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.32.0-beta.9",
3
+ "version": "1.33.0-beta.0",
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.32.0-beta.9",
3
+ "version": "1.33.0-beta.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- <div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid }" v-on:click="focusClosestInput">
6
+ <div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid, 'toggle-input-is-disabled': disabled }" v-on:click="focusClosestInput">
7
7
  <label
8
8
  v-if="label"
9
9
  :for="name ? name : 'InputText' "
@@ -16,6 +16,7 @@
16
16
  :placeholder="placeholder ? placeholder : '' "
17
17
  :autocomplete="autocomplete ? 'on' : 'off' "
18
18
  :required="required"
19
+ :disabled="disabled"
19
20
  v-model="inputVal"
20
21
  @blur="isInputActive = false"
21
22
  @focus="isInputActive = true"
@@ -91,8 +92,12 @@ export default {
91
92
  currencyDenomination: {
92
93
  type: Number,
93
94
  default: 100
94
- }
95
-
95
+ },
96
+ disabled: {
97
+ type: Boolean,
98
+ required: false,
99
+ default: false
100
+ },
96
101
  },
97
102
 
98
103
  created : function(){
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <div :class="['toggle-status-bar-container', statusColours, statusSize]">
3
+ <label class="toggle-status-bar-label">
4
+ <span class="toggle-status-bar-dot" v-if="showDot">&#9679;</span>
5
+ {{ statusName }}
6
+ </label>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'StatusBar',
13
+ props: {
14
+ status: {
15
+ type: String,
16
+ required: true,
17
+ validator: function (value) {
18
+ return ['draft', 'processing', 'complete', 'inactive', 'active'].indexOf(value) !== -1;
19
+ }
20
+ },
21
+ size: {
22
+ type: String,
23
+ required: false,
24
+ validator: function (value) {
25
+ return ['small'].indexOf(value) !== -1;
26
+ }
27
+ }
28
+ },
29
+ computed: {
30
+ // Capitalise the first letter of the status
31
+ statusName() {
32
+ return this.status.charAt(0).toUpperCase() + this.status.slice(1);
33
+ },
34
+ // Add the status to the class name
35
+ statusColours() {
36
+ return 'toggle-status-bar-' + this.status;
37
+ },
38
+ // Add the size to the class name
39
+ statusSize() {
40
+ return 'toggle-status-bar-' + this.size;
41
+ },
42
+ // Show the dot if the status is active or processing
43
+ showDot() {
44
+ return this.status === 'active' || this.status === 'processing';
45
+ }
46
+ }
47
+ }
48
+ </script>
package/src/index.js CHANGED
@@ -83,6 +83,8 @@ import ToggleMetricFunnelChart from "./components/metrics/ToggleMetricFunnelChar
83
83
  import ToggleThreeDots from "./components/threedots/ToggleThreeDots.vue";
84
84
  import ToggleThreeDotsButton from "./components/threedots/ToggleThreeDotsButton.vue";
85
85
 
86
+ import ToggleStatusBar from "./components/statusbar/ToggleStatusBar.vue";
87
+
86
88
  import ToggleCarousel from "./components/carousel/ToggleCarousel.vue";
87
89
  import ToggleCarouselSlide from "./components/carousel/ToggleCarouselSlide.vue";
88
90
 
@@ -158,6 +160,7 @@ const Components = {
158
160
  ToggleBoosterBasicButton,
159
161
  ToggleBoosterModal,
160
162
  ToggleContactSearch,
163
+ ToggleStatusBar,
161
164
  ToggleCarousel,
162
165
  ToggleCarouselSlide,
163
166
  ToggleEmailCard,
@@ -0,0 +1,67 @@
1
+ .toggle-status-bar-container {
2
+ font-family: $toggle-font-family;
3
+ font-size: 16px !important;
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+ height: 50px;
8
+ width: 100%;
9
+ border-radius: 7px;
10
+ }
11
+
12
+ .toggle-status-bar-small {
13
+ height: 35px;
14
+ }
15
+
16
+ // Draft colours
17
+ .toggle-status-bar-draft {
18
+ background-color: #FFB88D;
19
+
20
+ .toggle-status-bar-label {
21
+ color: #A34308;
22
+ }
23
+ }
24
+
25
+ // Processing colours
26
+ .toggle-status-bar-processing {
27
+ background-color: #D7E9F2;
28
+
29
+ .toggle-status-bar-label {
30
+ color: #269BE3;
31
+ }
32
+ }
33
+
34
+ // Complete colours
35
+ .toggle-status-bar-complete {
36
+ background-color: #B3E49F;
37
+
38
+ .toggle-status-bar-label {
39
+ color: #3BB40B;
40
+ }
41
+ }
42
+
43
+ // Inactive colours
44
+ .toggle-status-bar-inactive {
45
+ background-color: #D7E9F2;
46
+
47
+ .toggle-status-bar-label {
48
+ color: #269BE3;
49
+ }
50
+ }
51
+
52
+ // Active colours
53
+ .toggle-status-bar-active {
54
+ background-color: #D7E9F2;
55
+ border: 1px solid #FF4848;
56
+
57
+ .toggle-status-bar-label {
58
+ color: #FF4848;
59
+ }
60
+ }
61
+
62
+ .toggle-status-bar-dot {
63
+ font-size: 20px;
64
+ margin: 0 3px 0 0;
65
+ float: none !important;
66
+ padding: 0 !important;
67
+ }
@@ -21,5 +21,6 @@
21
21
  @import "./includes/_as_metrics.scss";
22
22
  @import "./includes/_as_threedots.scss";
23
23
  @import "./includes/_as_boosters.scss";
24
+ @import "./includes/_as_statusbar.scss";
24
25
  @import "./includes/_as_cards.scss";
25
26
  @import "./includes/_as_carousels.scss";
package/src/.DS_Store DELETED
Binary file
Binary file