toggle-components-library 1.31.0 → 1.32.0-beta.10
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 +13 -7
- 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 +13 -7
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +1 -1
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package-lock.json +26191 -385
- package/package.json +1 -1
- package/src/components/forms/ToggleInputCrudField.vue +6 -1
- package/src/components/statusbar/ToggleStatusBar.vue +39 -0
- package/src/sass/includes/_as_inputs.scss +7 -0
- package/src/sass/includes/_as_statusbar.scss +60 -0
- package/src/sass/main.scss +1 -0
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
> {{ label }}
|
|
14
14
|
</button>
|
|
15
15
|
<label
|
|
16
|
-
class="toggle-input-crud-container-description"
|
|
16
|
+
:class="['toggle-input-crud-container-description', {'hide-overflow':hideDescriptionOverflow}]"
|
|
17
17
|
> {{ description ? description : ' ' }}
|
|
18
18
|
</label>
|
|
19
19
|
|
|
@@ -65,7 +65,12 @@ export default {
|
|
|
65
65
|
empty:{
|
|
66
66
|
type: Boolean,
|
|
67
67
|
default: false
|
|
68
|
+
},
|
|
69
|
+
hideDescriptionOverflow:{
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false
|
|
68
72
|
}
|
|
73
|
+
|
|
69
74
|
},
|
|
70
75
|
|
|
71
76
|
created : function(){
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div :class="['toggle-status-bar-container', statusColours]">
|
|
4
|
+
<label class="toggle-status-bar-label">
|
|
5
|
+
<span class="toggle-status-bar-dot" v-if="showDot">●</span>
|
|
6
|
+
{{ statusName }}
|
|
7
|
+
</label>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: 'StatusBar',
|
|
15
|
+
props: {
|
|
16
|
+
status: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
validator: function (value) {
|
|
20
|
+
return ['draft', 'processing', 'complete', 'inactive', 'active'].indexOf(value) !== -1;
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
// Capitalise the first letter of the status
|
|
26
|
+
statusName() {
|
|
27
|
+
return this.status.charAt(0).toUpperCase() + this.status.slice(1);
|
|
28
|
+
},
|
|
29
|
+
// Add the status to the class name
|
|
30
|
+
statusColours() {
|
|
31
|
+
return 'toggle-status-bar-' + this.status;
|
|
32
|
+
},
|
|
33
|
+
// Show the dot if the status is active or processing
|
|
34
|
+
showDot() {
|
|
35
|
+
return this.status === 'active' || this.status === 'processing';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
@@ -722,6 +722,7 @@ $iconWidth:20px;
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
|
|
725
|
+
|
|
725
726
|
.toggle-input-crud-container-buttons{
|
|
726
727
|
.toggle-button-container{
|
|
727
728
|
display: block;
|
|
@@ -753,6 +754,12 @@ $iconWidth:20px;
|
|
|
753
754
|
clear: both;
|
|
754
755
|
font-size: $toggle-font-size-small;
|
|
755
756
|
color: $toggle-header-colour;
|
|
757
|
+
&.hide-overflow{
|
|
758
|
+
overflow-x: clip;
|
|
759
|
+
text-overflow: ellipsis;
|
|
760
|
+
white-space: nowrap;
|
|
761
|
+
width: inherit;
|
|
762
|
+
}
|
|
756
763
|
}
|
|
757
764
|
.toggle-input-protocol {
|
|
758
765
|
width: 100px;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.toggle-status-bar-container {
|
|
2
|
+
font-family: $toggle-font-family;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
height: 50px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
border-radius: 7px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Draft colours
|
|
12
|
+
.toggle-status-bar-draft {
|
|
13
|
+
background-color: #FFB88D;
|
|
14
|
+
|
|
15
|
+
.toggle-status-bar-label {
|
|
16
|
+
color: #A34308;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Processing colours
|
|
21
|
+
.toggle-status-bar-processing {
|
|
22
|
+
background-color: #D7E9F2;
|
|
23
|
+
|
|
24
|
+
.toggle-status-bar-label {
|
|
25
|
+
color: #269BE3;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Complete colours
|
|
30
|
+
.toggle-status-bar-complete {
|
|
31
|
+
background-color: #B3E49F;
|
|
32
|
+
|
|
33
|
+
.toggle-status-bar-label {
|
|
34
|
+
color: #3BB40B;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Inactive colours
|
|
39
|
+
.toggle-status-bar-inactive {
|
|
40
|
+
background-color: #D7E9F2;
|
|
41
|
+
|
|
42
|
+
.toggle-status-bar-label {
|
|
43
|
+
color: #269BE3;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Active colours
|
|
48
|
+
.toggle-status-bar-active {
|
|
49
|
+
background-color: #D7E9F2;
|
|
50
|
+
border: 1px solid #FF4848;
|
|
51
|
+
|
|
52
|
+
.toggle-status-bar-label {
|
|
53
|
+
color: #FF4848;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.toggle-status-bar-dot {
|
|
58
|
+
font-size: 20px;
|
|
59
|
+
margin: 0 3px 0 0;
|
|
60
|
+
}
|
package/src/sass/main.scss
CHANGED