toggle-components-library 1.33.0-beta.10 → 1.33.0-beta.11

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.
@@ -1,73 +0,0 @@
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 blinking" v-if="showDot">&#9679;</span>
5
- {{ statusName }}
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>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- export default {
19
- name: 'StatusBar',
20
- props: {
21
- status: {
22
- type: String,
23
- required: true,
24
- validator: function (value) {
25
- return ['draft', 'processing', 'complete', 'inactive', 'active', 'submitted', 'failed'].indexOf(value) !== -1;
26
- }
27
- },
28
- size: {
29
- type: String,
30
- required: false,
31
- validator: function (value) {
32
- return ['small'].indexOf(value) !== -1;
33
- }
34
- },
35
- toolTipOptions: {
36
- type: Object,
37
- required: false
38
- }
39
- },
40
- computed: {
41
- // Capitalise the first letter of the status
42
- statusName() {
43
- return this.status.charAt(0).toUpperCase() + this.status.slice(1);
44
- },
45
- // Add the status to the class name
46
- statusColours() {
47
- return 'toggle-status-bar-' + this.status;
48
- },
49
- // Add the size to the class name
50
- statusSize() {
51
- return 'toggle-status-bar-' + this.size;
52
- },
53
- // Show the dot if the status is active or processing
54
- showDot() {
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
- }
70
- }
71
- }
72
- }
73
- </script>
@@ -1,179 +0,0 @@
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
- // 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
-
55
- // Draft colours
56
- .toggle-status-bar-draft {
57
- background-color: #FFB88D;
58
-
59
- .toggle-status-bar-label {
60
- color: #A34308;
61
- }
62
-
63
- .toggle-status-bar-tooltip {
64
- color: #A34308;
65
- border: 1px solid #A34308;
66
- }
67
- }
68
-
69
- // Processing colours
70
- .toggle-status-bar-processing {
71
- background-color: #D7E9F2;
72
-
73
- .toggle-status-bar-label {
74
- color: #269BE3;
75
- }
76
-
77
- .toggle-status-bar-tooltip {
78
- color: #269BE3;
79
- border: 1px solid #269BE3;
80
- }
81
- }
82
-
83
- // Complete colours
84
- .toggle-status-bar-complete {
85
- background-color: #B3E49F;
86
-
87
- .toggle-status-bar-label {
88
- color: #3BB40B;
89
- }
90
-
91
- .toggle-status-bar-tooltip {
92
- color: #3BB40B;
93
- border: 1px solid #3BB40B;
94
- }
95
- }
96
-
97
- // Inactive colours
98
- .toggle-status-bar-inactive {
99
- background-color: #D7E9F2;
100
-
101
- .toggle-status-bar-label {
102
- color: #269BE3;
103
- }
104
-
105
- .toggle-status-bar-tooltip {
106
- color: #269BE3;
107
- border: 1px solid #269BE3;
108
- }
109
- }
110
-
111
- // Active colours
112
- .toggle-status-bar-active {
113
- background-color: #D7E9F2;
114
- border: 1px solid #FF4848;
115
-
116
- .toggle-status-bar-label {
117
- color: #FF4848;
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
- }
154
- }
155
-
156
- .toggle-status-bar-dot {
157
- font-size: 20px;
158
- margin: 0 3px 0 0;
159
- float: none !important;
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
- }
179
- }