toggle-components-library 1.33.0-beta.0 → 1.33.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 +116 -86
- 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 +116 -86
- 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 +1 -1
- package/package.json +1 -1
- package/src/components/forms/ToggleDatePicker.vue +7 -3
- package/src/components/statusbar/ToggleStatusBar.vue +28 -3
- package/src/sass/includes/_as_inputs.scss +5 -0
- package/src/sass/includes/_as_statusbar.scss +112 -0
package/package-lock.json
CHANGED
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<label class="toggle-input-label">{{label}}</label>
|
|
7
7
|
|
|
8
8
|
<div class="toggle-date-input-container">
|
|
9
|
-
<div class="toggle-date-input-calendar-icon">
|
|
10
|
-
<input type="text" class="toggle-input" :name="name" ref="date-input" :id="'toggle-date-input'+_uid" :value="date" v-on:keypress="$event.preventDefault()"
|
|
9
|
+
<div :class="['toggle-date-input-calendar-icon', {'calendar-icon-disabled' :disabled}]">
|
|
10
|
+
<input type="text" class="toggle-input" :name="name" :disabled="disabled" ref="date-input" :id="'toggle-date-input'+_uid" :value="date" v-on:keypress="$event.preventDefault()" />
|
|
11
11
|
</div>
|
|
12
12
|
<button type="button" class="toggle-clear" v-on:click="clearDate" v-if="displayValue"></button>
|
|
13
13
|
</div>
|
|
@@ -101,7 +101,11 @@ export default {
|
|
|
101
101
|
maxLength:{
|
|
102
102
|
type: Number,
|
|
103
103
|
required:false
|
|
104
|
-
}
|
|
104
|
+
},
|
|
105
|
+
disabled: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: false
|
|
108
|
+
},
|
|
105
109
|
},
|
|
106
110
|
|
|
107
111
|
created : function(){
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="['toggle-status-bar-container', statusColours, statusSize]">
|
|
3
3
|
<label class="toggle-status-bar-label">
|
|
4
|
-
<span class="toggle-status-bar-dot" v-if="showDot">●</span>
|
|
4
|
+
<span class="toggle-status-bar-dot blinking" v-if="showDot">●</span>
|
|
5
5
|
{{ statusName }}
|
|
6
6
|
</label>
|
|
7
|
+
|
|
8
|
+
<div class="toggle-status-bar-tooltip-container" v-if="showToolTip && toolTipText.length">
|
|
9
|
+
<div class="toggle-status-bar-tooltip">
|
|
10
|
+
?
|
|
11
|
+
<span class="toggle-status-bar-tooltip-text">{{ toolTipText }}</span>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
7
14
|
</div>
|
|
8
15
|
</template>
|
|
9
16
|
|
|
@@ -15,7 +22,7 @@ export default {
|
|
|
15
22
|
type: String,
|
|
16
23
|
required: true,
|
|
17
24
|
validator: function (value) {
|
|
18
|
-
return ['draft', 'processing', 'complete', 'inactive', 'active'].indexOf(value) !== -1;
|
|
25
|
+
return ['draft', 'processing', 'complete', 'inactive', 'active', 'submitted', 'failed'].indexOf(value) !== -1;
|
|
19
26
|
}
|
|
20
27
|
},
|
|
21
28
|
size: {
|
|
@@ -24,6 +31,10 @@ export default {
|
|
|
24
31
|
validator: function (value) {
|
|
25
32
|
return ['small'].indexOf(value) !== -1;
|
|
26
33
|
}
|
|
34
|
+
},
|
|
35
|
+
toolTipOptions: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: false
|
|
27
38
|
}
|
|
28
39
|
},
|
|
29
40
|
computed: {
|
|
@@ -41,7 +52,21 @@ export default {
|
|
|
41
52
|
},
|
|
42
53
|
// Show the dot if the status is active or processing
|
|
43
54
|
showDot() {
|
|
44
|
-
return this.status === 'active' || this.status === 'processing';
|
|
55
|
+
return this.status === 'active' || this.status === 'processing' || this.status === 'submitted';
|
|
56
|
+
},
|
|
57
|
+
showToolTip() {
|
|
58
|
+
return this.size !== 'small';
|
|
59
|
+
},
|
|
60
|
+
toolTipText() {
|
|
61
|
+
if (!this.toolTipOptions) {
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (this.toolTipOptions[this.status]) {
|
|
66
|
+
return this.toolTipOptions[this.status];
|
|
67
|
+
} else {
|
|
68
|
+
return '';
|
|
69
|
+
}
|
|
45
70
|
}
|
|
46
71
|
}
|
|
47
72
|
}
|
|
@@ -13,6 +13,45 @@
|
|
|
13
13
|
height: 35px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// Tooltip
|
|
17
|
+
.toggle-status-bar-tooltip-container{
|
|
18
|
+
position: absolute;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: right;
|
|
21
|
+
width: 100%;
|
|
22
|
+
right: 32px;
|
|
23
|
+
cursor: default;
|
|
24
|
+
|
|
25
|
+
.toggle-status-bar-tooltip {
|
|
26
|
+
position: relative;
|
|
27
|
+
display: inline-block;
|
|
28
|
+
width: 20px;
|
|
29
|
+
text-align: center;
|
|
30
|
+
border: 1px solid hotpink;
|
|
31
|
+
border-radius: 50px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Tooltip text
|
|
35
|
+
.toggle-status-bar-tooltip .toggle-status-bar-tooltip-text {
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
width: 200px;
|
|
38
|
+
background-color: rgba(0, 0, 0, .8);
|
|
39
|
+
color: #fff;
|
|
40
|
+
text-align: center;
|
|
41
|
+
padding: 10px;
|
|
42
|
+
border-radius: 6px;
|
|
43
|
+
position: absolute;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
top: -5px;
|
|
46
|
+
right: 105%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.toggle-status-bar-tooltip:hover .toggle-status-bar-tooltip-text {
|
|
50
|
+
visibility: visible;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
16
55
|
// Draft colours
|
|
17
56
|
.toggle-status-bar-draft {
|
|
18
57
|
background-color: #FFB88D;
|
|
@@ -20,6 +59,11 @@
|
|
|
20
59
|
.toggle-status-bar-label {
|
|
21
60
|
color: #A34308;
|
|
22
61
|
}
|
|
62
|
+
|
|
63
|
+
.toggle-status-bar-tooltip {
|
|
64
|
+
color: #A34308;
|
|
65
|
+
border: 1px solid #A34308;
|
|
66
|
+
}
|
|
23
67
|
}
|
|
24
68
|
|
|
25
69
|
// Processing colours
|
|
@@ -29,6 +73,11 @@
|
|
|
29
73
|
.toggle-status-bar-label {
|
|
30
74
|
color: #269BE3;
|
|
31
75
|
}
|
|
76
|
+
|
|
77
|
+
.toggle-status-bar-tooltip {
|
|
78
|
+
color: #269BE3;
|
|
79
|
+
border: 1px solid #269BE3;
|
|
80
|
+
}
|
|
32
81
|
}
|
|
33
82
|
|
|
34
83
|
// Complete colours
|
|
@@ -38,6 +87,11 @@
|
|
|
38
87
|
.toggle-status-bar-label {
|
|
39
88
|
color: #3BB40B;
|
|
40
89
|
}
|
|
90
|
+
|
|
91
|
+
.toggle-status-bar-tooltip {
|
|
92
|
+
color: #3BB40B;
|
|
93
|
+
border: 1px solid #3BB40B;
|
|
94
|
+
}
|
|
41
95
|
}
|
|
42
96
|
|
|
43
97
|
// Inactive colours
|
|
@@ -47,6 +101,11 @@
|
|
|
47
101
|
.toggle-status-bar-label {
|
|
48
102
|
color: #269BE3;
|
|
49
103
|
}
|
|
104
|
+
|
|
105
|
+
.toggle-status-bar-tooltip {
|
|
106
|
+
color: #269BE3;
|
|
107
|
+
border: 1px solid #269BE3;
|
|
108
|
+
}
|
|
50
109
|
}
|
|
51
110
|
|
|
52
111
|
// Active colours
|
|
@@ -57,6 +116,41 @@
|
|
|
57
116
|
.toggle-status-bar-label {
|
|
58
117
|
color: #FF4848;
|
|
59
118
|
}
|
|
119
|
+
|
|
120
|
+
.toggle-status-bar-tooltip {
|
|
121
|
+
color: #FF4848;
|
|
122
|
+
border: 1px solid #FF4848;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Submitted colours
|
|
127
|
+
.toggle-status-bar-submitted {
|
|
128
|
+
background-color: #D7E9F2;
|
|
129
|
+
|
|
130
|
+
.toggle-status-bar-label {
|
|
131
|
+
color: #269BE3;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.toggle-status-bar-tooltip {
|
|
135
|
+
color: #269BE3;
|
|
136
|
+
border: 1px solid #269BE3;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Failed colours
|
|
142
|
+
.toggle-status-bar-failed {
|
|
143
|
+
background-color: #F2E3E3;
|
|
144
|
+
border: 1px solid #ED7B7C;
|
|
145
|
+
|
|
146
|
+
.toggle-status-bar-label {
|
|
147
|
+
color: #ED7B7C;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.toggle-status-bar-tooltip {
|
|
151
|
+
color: #ED7B7C;
|
|
152
|
+
border: 1px solid #ED7B7C;
|
|
153
|
+
}
|
|
60
154
|
}
|
|
61
155
|
|
|
62
156
|
.toggle-status-bar-dot {
|
|
@@ -64,4 +158,22 @@
|
|
|
64
158
|
margin: 0 3px 0 0;
|
|
65
159
|
float: none !important;
|
|
66
160
|
padding: 0 !important;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Dot blinking animation
|
|
164
|
+
|
|
165
|
+
.blinking {
|
|
166
|
+
animation: 2s blink ease infinite;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes blink {
|
|
170
|
+
|
|
171
|
+
from,
|
|
172
|
+
to {
|
|
173
|
+
opacity: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
50% {
|
|
177
|
+
opacity: 1;
|
|
178
|
+
}
|
|
67
179
|
}
|