@everchron/ec-shards 2.0.0 → 2.0.2
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/.eslintrc.js +2 -5
- package/dist/ec-shards.common.js +880 -310
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +880 -310
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +2 -2
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +6 -5
- package/src/assets/icons/empty-broken-transcript.svg +1 -0
- package/src/assets/icons/sticker-info.svg +1 -0
- package/src/components/button-toolbar-icon/button-toolbar-icon.vue +1 -4
- package/src/components/data-list-item/data-list-item.vue +34 -28
- package/src/components/document-state/document-state.vue +20 -8
- package/src/components/index.js +6 -0
- package/src/components/legend-item/legend-item.vue +176 -0
- package/src/components/log-message/log-message.vue +144 -0
- package/src/components/overlay/overlay.vue +68 -18
- package/src/components/quicklink/quicklink.vue +1 -1
- package/src/components/sticker/sticker.vue +4 -2
- package/src/components/switch/switch.vue +102 -11
- package/src/components/transcript-state/transcript-state.vue +125 -0
- package/src/stories/Changelog.stories.mdx +58 -1
- package/src/stories/{data-list-item → data-list}/.DS_Store +0 -0
- package/src/stories/{data-list-item → data-list}/data-list-item.stories.js +3 -3
- package/src/stories/data-list/data-list.stories.js +17 -0
- package/src/stories/legend-item/legend-item.stories.js +50 -0
- package/src/stories/log-message/log-message.stories.js +37 -0
- package/src/stories/overlay/overlay.stories.js +60 -15
- package/src/stories/quicklink/quicklink.stories.js +6 -1
- package/src/stories/sidebar/sidebar-content.stories.js +27 -0
- package/src/stories/{sidebar-footer → sidebar}/sidebar-footer.stories.js +0 -0
- package/src/stories/{sidebar-header → sidebar}/sidebar-header.stories.js +0 -0
- package/src/stories/swatches-picker/swatches-picker.stories.js +7 -161
- package/src/stories/switch/switch.stories.js +21 -1
- package/src/stories/{sidebar-footer → transcript-state}/.DS_Store +0 -0
- package/src/stories/transcript-state/transcript-state.stories.js +16 -0
- package/src/stories/sidebar-header/.DS_Store +0 -0
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
<!-- @slot Slot for a tab bar. -->
|
|
32
32
|
<slot name="tabs"></slot>
|
|
33
33
|
</div>
|
|
34
|
-
<div class="ecs-overlay-content-inner scrollbar" :class="sidebarOpenClass">
|
|
35
|
-
<div class="ecs-overlay-content-inner-inner" :class="$slots.sidebar && !fullWidth && width > 1500 ? 'has-sidebar' : ' '" :style="{ width: contentWidth, maxWidth: contentMaxWidth, minWidth: contentMinWidth }">
|
|
34
|
+
<div ref="innerContent" class="ecs-overlay-content-inner scrollbar" :class="sidebarOpenClass">
|
|
35
|
+
<div class="ecs-overlay-content-inner-inner" :class="$slots.sidebar && !fullWidth && width > 1500 ? 'has-sidebar' : ' '" :style="{ width: contentWidth, maxWidth: contentMaxWidth, minWidth: contentMinWidth, paddingLeft: contentPadding, paddingRight: contentPadding }">
|
|
36
36
|
<!-- @slot Main content area. -->
|
|
37
37
|
<slot></slot>
|
|
38
38
|
</div>
|
|
@@ -46,15 +46,17 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
</transition>
|
|
48
48
|
</div>
|
|
49
|
+
<div v-if="blockContent" class="ecs-overlay-content-block" />
|
|
49
50
|
</div>
|
|
50
51
|
<div v-if="$slots.footer" class="ecs-overlay-footer">
|
|
51
52
|
<div v-if="$slots.tabs" class="spacer-tabs" />
|
|
52
53
|
<div class="ecs-overlay-footer-content">
|
|
53
|
-
<div class="ecs-overlay-footer-content-inner" :style="{ width: contentWidth, maxWidth: contentMaxWidth, minWidth: contentMinWidth }">
|
|
54
|
+
<div class="ecs-overlay-footer-content-inner" :style="{ width: contentWidth, maxWidth: contentMaxWidth, minWidth: contentMinWidth, paddingLeft: contentPadding, paddingRight: contentPadding }">
|
|
54
55
|
<!-- @slot Slot for footer buttons, etc. -->
|
|
55
56
|
<slot name="footer"></slot>
|
|
56
57
|
</div>
|
|
57
58
|
<div v-if="$slots.sidebar && width > 1500" class="spacer-sidebar" />
|
|
59
|
+
<div v-if="footerScrollSpacer" class="spacer-scrollbar" />
|
|
58
60
|
</div>
|
|
59
61
|
</div>
|
|
60
62
|
</div>
|
|
@@ -111,6 +113,11 @@
|
|
|
111
113
|
type: Number,
|
|
112
114
|
default: 41
|
|
113
115
|
},
|
|
116
|
+
/** Adds a half-transparent layer on top of the entire content area, that blocks any user interactions. */
|
|
117
|
+
blockContent: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: false
|
|
120
|
+
},
|
|
114
121
|
|
|
115
122
|
// Props for additional slide-in sidbar
|
|
116
123
|
/** Sets the icon for the sidebar icon button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). Note: the button is only visible when the sidebar is collapsed on smaller screens. */
|
|
@@ -145,6 +152,9 @@
|
|
|
145
152
|
isShown: this.show,
|
|
146
153
|
showSidebar: false,
|
|
147
154
|
width: window.innerWidth,
|
|
155
|
+
elementsHeight: null,
|
|
156
|
+
scrollsHeight: null,
|
|
157
|
+
footerScrollSpacer: false
|
|
148
158
|
}
|
|
149
159
|
},
|
|
150
160
|
|
|
@@ -161,7 +171,7 @@
|
|
|
161
171
|
if(this.fullWidth && !this.$slots.tabs){
|
|
162
172
|
return '100%'
|
|
163
173
|
} else {
|
|
164
|
-
return '
|
|
174
|
+
return '952px'
|
|
165
175
|
}
|
|
166
176
|
},
|
|
167
177
|
|
|
@@ -171,7 +181,7 @@
|
|
|
171
181
|
} else if(this.fullWidth && this.$slots.tabs){
|
|
172
182
|
return 'calc(100vw - 260px)'
|
|
173
183
|
} else {
|
|
174
|
-
return '
|
|
184
|
+
return '821px'
|
|
175
185
|
}
|
|
176
186
|
},
|
|
177
187
|
|
|
@@ -179,17 +189,27 @@
|
|
|
179
189
|
if(this.showSidebar && this.width < 1500){
|
|
180
190
|
return 'sidebar-open'
|
|
181
191
|
}
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
contentPadding(){
|
|
195
|
+
if(!this.fullWidth){
|
|
196
|
+
return '16px'
|
|
197
|
+
} else {
|
|
198
|
+
return '0'
|
|
199
|
+
}
|
|
182
200
|
}
|
|
183
201
|
},
|
|
184
202
|
|
|
185
203
|
mounted(){
|
|
186
204
|
this.$nextTick(() => {
|
|
187
205
|
window.addEventListener('resize', this.windowWidth)
|
|
206
|
+
window.addEventListener('resize', this.setScrollPaddings)
|
|
188
207
|
})
|
|
189
208
|
},
|
|
190
209
|
|
|
191
210
|
beforeDestroy() {
|
|
192
211
|
window.removeEventListener('resize', this.windowWidth)
|
|
212
|
+
window.removeEventListener('resize', this.setScrollPaddings)
|
|
193
213
|
},
|
|
194
214
|
|
|
195
215
|
methods :{
|
|
@@ -202,19 +222,37 @@
|
|
|
202
222
|
this.width = window.innerWidth
|
|
203
223
|
},
|
|
204
224
|
|
|
225
|
+
setScrollPaddings() {
|
|
226
|
+
if(this.isShown){
|
|
227
|
+
this.elementsHeight = this.$refs.innerContent.clientHeight
|
|
228
|
+
this.scrollsHeight = this.$refs.innerContent.scrollHeight
|
|
229
|
+
|
|
230
|
+
if(this.elementsHeight < this.scrollsHeight){
|
|
231
|
+
this.footerScrollSpacer = true
|
|
232
|
+
} else {
|
|
233
|
+
this.footerScrollSpacer = false
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
|
|
205
238
|
sidebarToggle(){
|
|
206
239
|
this.showSidebar = !this.showSidebar
|
|
207
240
|
this.$refs.content.classList.add('overflow-hidden')
|
|
208
241
|
setTimeout(() => {
|
|
209
242
|
this.$refs.content.classList.remove('overflow-hidden')
|
|
210
243
|
}, 360);
|
|
211
|
-
|
|
212
244
|
},
|
|
213
245
|
},
|
|
214
246
|
|
|
215
247
|
watch: {
|
|
216
248
|
show(){
|
|
217
249
|
this.isShown = this.show
|
|
250
|
+
|
|
251
|
+
setTimeout(() => {
|
|
252
|
+
if(this.isShown){
|
|
253
|
+
this.setScrollPaddings()
|
|
254
|
+
}
|
|
255
|
+
}, 10);
|
|
218
256
|
}
|
|
219
257
|
}
|
|
220
258
|
}
|
|
@@ -238,16 +276,16 @@
|
|
|
238
276
|
display: flex;
|
|
239
277
|
align-items: center;
|
|
240
278
|
justify-content: space-between;
|
|
241
|
-
padding: 0
|
|
279
|
+
padding: 0 $spacing-20;
|
|
242
280
|
min-height: 72px;
|
|
243
281
|
border-bottom: 1px solid $color-gray-4;
|
|
244
282
|
|
|
245
283
|
&-controls{
|
|
246
|
-
margin-right:
|
|
284
|
+
margin-right: $spacing-30;
|
|
247
285
|
}
|
|
248
286
|
|
|
249
287
|
.sidebar-button{
|
|
250
|
-
margin-right:
|
|
288
|
+
margin-right: $spacing-30;
|
|
251
289
|
}
|
|
252
290
|
}
|
|
253
291
|
|
|
@@ -257,6 +295,14 @@
|
|
|
257
295
|
overflow: hidden;
|
|
258
296
|
position: relative;
|
|
259
297
|
|
|
298
|
+
&-block{
|
|
299
|
+
position: absolute;
|
|
300
|
+
background: rgba(#FFF, .5);
|
|
301
|
+
cursor: wait;
|
|
302
|
+
inset: 0;
|
|
303
|
+
z-index: 9;
|
|
304
|
+
}
|
|
305
|
+
|
|
260
306
|
&.overflow-hidden{
|
|
261
307
|
overflow: hidden !important;
|
|
262
308
|
|
|
@@ -309,7 +355,7 @@
|
|
|
309
355
|
}
|
|
310
356
|
|
|
311
357
|
&-sidebar-static{
|
|
312
|
-
padding: 0
|
|
358
|
+
padding: 0 $spacing-20;
|
|
313
359
|
width: 400px;
|
|
314
360
|
margin: 0 auto 0 0;
|
|
315
361
|
height: min-content;
|
|
@@ -317,8 +363,8 @@
|
|
|
317
363
|
|
|
318
364
|
&-sidebar-float{
|
|
319
365
|
padding: 0;
|
|
320
|
-
padding-right:
|
|
321
|
-
padding-left:
|
|
366
|
+
padding-right: $spacing-20;
|
|
367
|
+
padding-left: $spacing-20;
|
|
322
368
|
width: 400px;
|
|
323
369
|
overflow: auto;
|
|
324
370
|
position: absolute;
|
|
@@ -351,16 +397,20 @@
|
|
|
351
397
|
min-width: 400px;
|
|
352
398
|
}
|
|
353
399
|
|
|
400
|
+
.spacer-scrollbar{
|
|
401
|
+
min-width: 15px;
|
|
402
|
+
}
|
|
403
|
+
|
|
354
404
|
&-content{
|
|
355
405
|
width: 100%;
|
|
356
406
|
display: flex;
|
|
357
407
|
|
|
358
408
|
&-inner{
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
409
|
+
margin: 0 auto;
|
|
410
|
+
display: flex;
|
|
411
|
+
align-items: center;
|
|
412
|
+
justify-content: space-between;
|
|
413
|
+
}
|
|
364
414
|
}
|
|
365
415
|
}
|
|
366
416
|
|
|
@@ -390,7 +440,7 @@
|
|
|
390
440
|
.subline{
|
|
391
441
|
font-size: $type-scale-2-font-size;
|
|
392
442
|
color: $color-gray-9;
|
|
393
|
-
margin-top:
|
|
443
|
+
margin-top: $spacing-5;
|
|
394
444
|
}
|
|
395
445
|
}
|
|
396
446
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<template v-else-if="type === 'switch'">
|
|
27
|
-
<ecs-switch @input="$emit('toggle', $event)" :value="valueToggle" :disabled="value == false" size="sml">{{label}}</ecs-switch>
|
|
27
|
+
<ecs-switch @input="$emit('toggle', $event)" :value="valueToggle" :disabled="value == false" size="sml-toggle" colored>{{label}}</ecs-switch>
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<template v-else>
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
props: {
|
|
15
15
|
/** Sets the sticker icon. */
|
|
16
16
|
type: {
|
|
17
|
-
type: String
|
|
17
|
+
type: String,
|
|
18
|
+
validator: v => ['current', 'error', 'loading', 'warning', 'warning-critical', 'success', 'info', 'null', null, undefined].includes(v)
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
|
|
@@ -34,7 +35,8 @@
|
|
|
34
35
|
|| this.type == 'loading'
|
|
35
36
|
|| this.type == 'warning'
|
|
36
37
|
|| this.type == 'warning-critical'
|
|
37
|
-
|| this.type == 'success'
|
|
38
|
+
|| this.type == 'success'
|
|
39
|
+
|| this.type == 'info')
|
|
38
40
|
return true
|
|
39
41
|
else
|
|
40
42
|
return false
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
<label class="ecs-switch"
|
|
4
4
|
:class="[
|
|
5
5
|
sizeClass,
|
|
6
|
-
hasDefaultSlot ?
|
|
7
|
-
disabled ?
|
|
6
|
+
hasDefaultSlot ? 'ecs-switch-has-label' : '',
|
|
7
|
+
disabled ? 'disabled' : '',
|
|
8
|
+
colored ? 'ecs-switch-colored' : '',
|
|
9
|
+
indeterminate ? 'ecs-switch-indeterminate' : ''
|
|
8
10
|
]">
|
|
9
11
|
<input
|
|
10
12
|
type="checkbox"
|
|
@@ -15,7 +17,9 @@
|
|
|
15
17
|
:disabled="disabled"
|
|
16
18
|
:checked="checked"
|
|
17
19
|
@change="handleClick">
|
|
18
|
-
<div class="ecs-slide-switch"
|
|
20
|
+
<div class="ecs-slide-switch">
|
|
21
|
+
<div class="indeterminate" />
|
|
22
|
+
</div>
|
|
19
23
|
</label>
|
|
20
24
|
<label v-if="hasDefaultSlot" :for="id">
|
|
21
25
|
<slot></slot>
|
|
@@ -30,10 +34,10 @@
|
|
|
30
34
|
name: {
|
|
31
35
|
type: String
|
|
32
36
|
},
|
|
33
|
-
/** Determines the size of the switch. */
|
|
37
|
+
/** Determines the size of the switch. `sml-toggle` sets the toggle control size to small, but maintains a regular font size. */
|
|
34
38
|
size: {
|
|
35
39
|
type: String,
|
|
36
|
-
validator: v => ['sml', 'lg', 'null', null].includes(v)
|
|
40
|
+
validator: v => ['sml', 'sml-toggle', 'lg', 'md', 'null', null].includes(v)
|
|
37
41
|
},
|
|
38
42
|
/** Sets the switch to required. */
|
|
39
43
|
required: {
|
|
@@ -45,6 +49,16 @@
|
|
|
45
49
|
type: Boolean,
|
|
46
50
|
default: false
|
|
47
51
|
},
|
|
52
|
+
/** Reflects a true or false state with positive (green) and negative (red) colors. */
|
|
53
|
+
colored: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false
|
|
56
|
+
},
|
|
57
|
+
/** Reflects an indeterminate switch state (e.g. not all options checked, but some). This is a purely visual setting. */
|
|
58
|
+
indeterminate: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
48
62
|
value: {
|
|
49
63
|
default: false,
|
|
50
64
|
required: false,
|
|
@@ -81,7 +95,11 @@
|
|
|
81
95
|
|
|
82
96
|
sizeClass() {
|
|
83
97
|
if (this.size && this.size !== '')
|
|
84
|
-
|
|
98
|
+
if (this.size == 'sml-toggle'){
|
|
99
|
+
return `ecs-switch-sml regular-font`
|
|
100
|
+
} else {
|
|
101
|
+
return `ecs-switch-${this.size}`
|
|
102
|
+
}
|
|
85
103
|
return this.size
|
|
86
104
|
},
|
|
87
105
|
|
|
@@ -143,14 +161,24 @@
|
|
|
143
161
|
align-items: center;
|
|
144
162
|
}
|
|
145
163
|
|
|
146
|
-
&.disabled{
|
|
147
|
-
opacity: .5;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
164
|
input[type=checkbox] {
|
|
151
165
|
display:none;
|
|
152
166
|
}
|
|
153
167
|
|
|
168
|
+
.indeterminate{
|
|
169
|
+
width: 9px;
|
|
170
|
+
height: 4px;
|
|
171
|
+
border-radius: 2px;
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: 50%;
|
|
174
|
+
left: 5px;
|
|
175
|
+
margin-top: -2px;
|
|
176
|
+
background: #FFF;
|
|
177
|
+
transition: .3s .15s;
|
|
178
|
+
transform: scale(.5);
|
|
179
|
+
opacity: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
154
182
|
&-has-label{
|
|
155
183
|
margin: $spacing-5 $spacing-15 $spacing-5 0;
|
|
156
184
|
|
|
@@ -158,9 +186,10 @@
|
|
|
158
186
|
margin: $spacing-5 0;
|
|
159
187
|
line-height: $spacing-30;
|
|
160
188
|
font-size: $type-scale-3-font-size;
|
|
161
|
-
|
|
189
|
+
line-height: $type-scale-3-line-height;
|
|
162
190
|
display: flex;
|
|
163
191
|
align-items: center;
|
|
192
|
+
user-select: none;
|
|
164
193
|
}
|
|
165
194
|
}
|
|
166
195
|
|
|
@@ -178,6 +207,13 @@
|
|
|
178
207
|
width: 10px;
|
|
179
208
|
height: 10px;
|
|
180
209
|
}
|
|
210
|
+
|
|
211
|
+
.indeterminate{
|
|
212
|
+
width: 4px;
|
|
213
|
+
height: 2px;
|
|
214
|
+
left: 3px;
|
|
215
|
+
margin-top: -1px;
|
|
216
|
+
}
|
|
181
217
|
}
|
|
182
218
|
|
|
183
219
|
input:checked + .ecs-slide-switch::after{
|
|
@@ -192,6 +228,15 @@
|
|
|
192
228
|
line-height: $type-scale-2-line-height;
|
|
193
229
|
}
|
|
194
230
|
}
|
|
231
|
+
|
|
232
|
+
&.regular-font.ecs-switch-has-label{
|
|
233
|
+
margin: $spacing-5 $spacing-10 $spacing-5 0;
|
|
234
|
+
|
|
235
|
+
+ label{
|
|
236
|
+
font-size: $type-scale-3-font-size;
|
|
237
|
+
line-height: $type-scale-2-line-height;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
195
240
|
}
|
|
196
241
|
|
|
197
242
|
&-lg{
|
|
@@ -208,6 +253,11 @@
|
|
|
208
253
|
width: 28px;
|
|
209
254
|
height: 28px;
|
|
210
255
|
}
|
|
256
|
+
|
|
257
|
+
.indeterminate{
|
|
258
|
+
width: 11px;
|
|
259
|
+
left: 6px;
|
|
260
|
+
}
|
|
211
261
|
}
|
|
212
262
|
|
|
213
263
|
input:checked + .ecs-slide-switch::after{
|
|
@@ -275,4 +325,45 @@
|
|
|
275
325
|
}
|
|
276
326
|
}
|
|
277
327
|
}
|
|
328
|
+
|
|
329
|
+
// Colored theme
|
|
330
|
+
.ecs-switch-colored{
|
|
331
|
+
.ecs-slide-switch{
|
|
332
|
+
&:before{
|
|
333
|
+
border-color: $color-red-9;
|
|
334
|
+
background: $color-red-8;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
input:checked + .ecs-slide-switch{
|
|
339
|
+
background-color: $color-green-8;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.ecs-switch-indeterminate{
|
|
344
|
+
input:checked + .ecs-slide-switch{
|
|
345
|
+
.indeterminate{
|
|
346
|
+
transform: scale(1);
|
|
347
|
+
opacity: 1;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
//Disabled state
|
|
353
|
+
.ecs-switch.disabled{
|
|
354
|
+
opacity: .5;
|
|
355
|
+
|
|
356
|
+
.ecs-slide-switch{
|
|
357
|
+
cursor: not-allowed;
|
|
358
|
+
|
|
359
|
+
&:before{
|
|
360
|
+
border-color: $color-gray-5;
|
|
361
|
+
background: $color-gray-4;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
input:checked + .ecs-slide-switch{
|
|
366
|
+
background-color: $color-gray-8;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
278
369
|
</style>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div @click="$emit('click', $event)" class="ecs-transcript-state" :class="[interactive ? 'interactive' : '']">
|
|
3
|
+
<ecs-icon type="toolbar-transcript" color="#929AA9" />
|
|
4
|
+
<div v-if="state =='healthy'" class="healthy" />
|
|
5
|
+
<div v-if="state =='repairing'" class="repairing" />
|
|
6
|
+
<div v-if="state =='corrupted'" class="corrupted" />
|
|
7
|
+
<span v-if="state == 'loading'" class="loading">
|
|
8
|
+
<ecs-icon type="loading" width="18px" height="18px" color="#202127" />
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import EcsAnimations from '../animations/animations'
|
|
15
|
+
import EcsIcon from '../icon/icon'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
components: {
|
|
19
|
+
EcsAnimations,
|
|
20
|
+
EcsIcon
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
/** Displays a status indicator based on the passed value. */
|
|
24
|
+
state: {
|
|
25
|
+
type: String,
|
|
26
|
+
validator: v => ['healthy', 'loading', 'corrupted'].includes(v),
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
/** Indicates that the element is a clickable element, by adding a :hover state and showing pointer cursor. */
|
|
30
|
+
interactive: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="scss" scoped>
|
|
39
|
+
@import "../../tokens/build/scss/tokens.scss";
|
|
40
|
+
@import "../mixins/svg-uri";
|
|
41
|
+
|
|
42
|
+
.ecs-transcript-state{
|
|
43
|
+
width: 36px;
|
|
44
|
+
height: 36px;
|
|
45
|
+
position: relative;
|
|
46
|
+
cursor: help;
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
|
|
50
|
+
div{
|
|
51
|
+
width: 30px;
|
|
52
|
+
height: 30px;
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 3px;
|
|
55
|
+
left: 3px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> .icon{
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 3px;
|
|
61
|
+
left: 3px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.healthy{
|
|
65
|
+
background-image: svg-uri('<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M25.0657 13.9129L25.0304 13.9468L24.9997 13.9849L21.0235 18.9354L19.9494 18.0137C19.6108 17.7015 19.191 17.6225 18.8271 17.6695C18.4719 17.7154 18.1497 17.8792 17.9013 18.0833C17.6534 18.2869 17.4262 18.5742 17.3167 18.9238C17.2008 19.2938 17.2224 19.7327 17.4931 20.1232L17.5128 20.1515L17.535 20.1779L20.0265 23.1467L20.0335 23.1551L20.0408 23.1634C20.3616 23.5236 20.8034 23.778 21.3214 23.7476C21.8285 23.7178 22.2304 23.4249 22.5053 23.072L22.5241 23.048L22.5408 23.0224L27.4703 15.5069L27.4956 15.4683L27.516 15.4269C27.6882 15.0771 27.7869 14.697 27.7372 14.3253C27.6843 13.9289 27.4607 13.5718 27.0792 13.3823C26.3775 13.0338 25.5896 13.4113 25.0657 13.9129Z" fill="#157EFB" stroke="#FFF" stroke-width="1.5"/></svg>');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.corrupted{
|
|
69
|
+
background-image: svg-uri('<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.9271 16.2357L17.9269 16.2358C16.889 16.8402 16.25 17.9508 16.25 19.1525V21.9303C16.25 23.132 16.8891 24.2427 17.9277 24.8471C17.9277 24.8471 17.9277 24.8471 17.9277 24.8471L20.5527 26.3748L20.5527 26.3749C21.602 26.9854 22.8986 26.9854 23.9478 26.3749L23.9479 26.3748L26.5729 24.8471L26.5731 24.847C27.611 24.2426 28.25 23.1319 28.25 21.9303V19.1525C28.25 17.9508 27.6109 16.8401 26.5723 16.2357C26.5723 16.2357 26.5723 16.2357 26.5723 16.2357L23.9473 14.7079L23.9473 14.7079C22.898 14.0974 21.6014 14.0974 20.5522 14.7079L20.5521 14.7079L17.9271 16.2357Z" fill="#FF3750" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path fill-rule="evenodd" clip-rule="evenodd" d="M22.0004 17.1111C22.43 17.1111 22.7782 17.4326 22.7782 17.8291V21.0598C22.7782 21.4563 22.43 21.7778 22.0004 21.7778C21.5709 21.7778 21.2227 21.4563 21.2227 21.0598V17.8291C21.2227 17.4326 21.5709 17.1111 22.0004 17.1111Z" fill="#FFF"/><circle cx="22.0004" cy="23.4778" r="0.777778" fill="white"/></svg>');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.loading{
|
|
73
|
+
border-radius: 100%;
|
|
74
|
+
background: #FFF;
|
|
75
|
+
width: 18px;
|
|
76
|
+
height: 18px;
|
|
77
|
+
position: absolute;
|
|
78
|
+
bottom: 3px;
|
|
79
|
+
right: 3px;
|
|
80
|
+
display: block;
|
|
81
|
+
|
|
82
|
+
.icon{
|
|
83
|
+
position: absolute;
|
|
84
|
+
inset: 0;
|
|
85
|
+
animation: spin 1.5s infinite linear reverse;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.interactive{
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
|
|
92
|
+
&:after{
|
|
93
|
+
content: "";
|
|
94
|
+
position: absolute;
|
|
95
|
+
inset: 0;
|
|
96
|
+
background: rgba($color-gray-8, .08);
|
|
97
|
+
opacity: 0;
|
|
98
|
+
transform: scale(.6);
|
|
99
|
+
transition: opacity .15s ease-in-out, transform .3s cubic-bezier(0.3, 0.76, 0.27, 1);
|
|
100
|
+
border-radius: $border-radius-small;
|
|
101
|
+
z-index: -1;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:hover:after{
|
|
106
|
+
opacity: 1;
|
|
107
|
+
transform: scale(1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</style>
|
|
112
|
+
|
|
113
|
+
<style lang="scss">
|
|
114
|
+
@import "../../tokens/build/scss/tokens.scss";
|
|
115
|
+
|
|
116
|
+
.popover-button.active > .ecs-transcript-state > .icon{
|
|
117
|
+
color: $color-blue-9;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.popover-button.active > .ecs-transcript-state.interactive:after{
|
|
121
|
+
opacity: 1;
|
|
122
|
+
transform: scale(1);
|
|
123
|
+
background: rgba($color-blue-8, .08);
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
@@ -6,12 +6,69 @@ import { Meta } from '@storybook/addon-docs/blocks';
|
|
|
6
6
|
Changelog
|
|
7
7
|
</h1>
|
|
8
8
|
|
|
9
|
-
## Version 2.0.
|
|
9
|
+
## Version 2.0.2 (22 September 2022)
|
|
10
10
|
|
|
11
11
|
### Breaking Changes
|
|
12
12
|
|
|
13
13
|
- Refactored the EcsPartyEntry component to accept custom color values. Deprecated the old annotation color classes.
|
|
14
|
+
- Refactored EcsSwatchesPicker. Now accepts all color values as a prop and does not handle color management within the component.
|
|
14
15
|
|
|
16
|
+
### Fixes
|
|
17
|
+
|
|
18
|
+
- Unscoped content styles for `EcsDataListItem`
|
|
19
|
+
|
|
20
|
+
## Version 1.6.4 (15 September 2022)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- Added new props and functionality to `EcsSwitch` component
|
|
25
|
+
- `indeterminate`: sets the switch to indeterminate state (only visually)
|
|
26
|
+
- `colored`: alters the switch colors to red/green
|
|
27
|
+
- `size="sml-toggle"`: shows the switch toggle in small, but it's label in a regular size
|
|
28
|
+
- improved disabled styles
|
|
29
|
+
- `EcsQuicklink` now uses the new colored switch theme for quicklinks that contain a switch.
|
|
30
|
+
|
|
31
|
+
## Version 1.6.1 (13 September 2022)
|
|
32
|
+
|
|
33
|
+
### Fixes
|
|
34
|
+
|
|
35
|
+
- Unscoped content styles of `EcsDataListItem` to allow more dynamic content injeciton.
|
|
36
|
+
|
|
37
|
+
## Version 1.6.0 (13 September 2022)
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
- Added new `EcsLegendItem` component.
|
|
42
|
+
|
|
43
|
+
## Version 1.5.0 (9 September 2022)
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
- Added new `blockContent` prop to `EcsOverlay` which allows to block any interactions on the content area.
|
|
48
|
+
|
|
49
|
+
### Fixes
|
|
50
|
+
|
|
51
|
+
- Added dynamic padding on `EcsOverlay` footer, depending if the content area is scrollable.
|
|
52
|
+
- Added minimum padding for `EcsOverlay` content, when it's not the full width variant.
|
|
53
|
+
|
|
54
|
+
## Version 1.4.1 (7 September 2022)
|
|
55
|
+
|
|
56
|
+
### Fixes
|
|
57
|
+
|
|
58
|
+
- Correct size for EcsTranscriptState button, added active styles and removed not needed `repair` state.
|
|
59
|
+
|
|
60
|
+
## Version 1.4.0 (6 September 2022)
|
|
61
|
+
|
|
62
|
+
### Features
|
|
63
|
+
|
|
64
|
+
- Added new `EcsTranscriptState` component
|
|
65
|
+
- Added new `EcsLogMessage` component
|
|
66
|
+
- Added broken transcript empty state icon
|
|
67
|
+
- Added info sticker icon
|
|
68
|
+
|
|
69
|
+
### Fixes
|
|
70
|
+
|
|
71
|
+
- Cleaned up styles on the EcsDocumentState component and reduced weight of inline styles a bit.
|
|
15
72
|
|
|
16
73
|
## Version 1.3.6 (29 August 2022)
|
|
17
74
|
|
|
File without changes
|
|
@@ -3,8 +3,8 @@ import EcsDataListItem from '@components/data-list-item/data-list-item';
|
|
|
3
3
|
import EcsButton from '@components/button/button';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title: 'Data/Data List',
|
|
7
|
-
component:
|
|
6
|
+
title: 'Data/Data List/Item',
|
|
7
|
+
component: EcsDataListItem
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export const dataListItem = () => ({
|
|
@@ -12,7 +12,7 @@ export const dataListItem = () => ({
|
|
|
12
12
|
template: `<ecs-data-list>
|
|
13
13
|
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
14
14
|
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
15
|
-
<ecs-data-list-item identifier="Identifier"
|
|
15
|
+
<ecs-data-list-item identifier="Identifier"><a href="https://google.com" target="_blank">Google</a></ecs-data-list-item>
|
|
16
16
|
</ecs-data-list>`
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import EcsDataList from '@components/data-list/data-list';
|
|
2
|
+
import EcsDataListItem from '@components/data-list-item/data-list-item';
|
|
3
|
+
import EcsButton from '@components/button/button';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Data/Data List/List',
|
|
7
|
+
component: EcsDataList
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const dataList = () => ({
|
|
11
|
+
components: { EcsDataList, EcsDataListItem, EcsButton },
|
|
12
|
+
template: `<ecs-data-list>
|
|
13
|
+
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
14
|
+
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
15
|
+
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
16
|
+
</ecs-data-list>`
|
|
17
|
+
});
|