@everchron/ec-shards 1.3.7 → 1.5.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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "1.3.7",
3
+ "version": "1.5.0",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -30,16 +30,17 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.13.15",
33
- "@storybook/addon-actions": "^6.5.9",
34
- "@storybook/addon-essentials": "^6.5.9",
35
- "@storybook/addon-links": "^6.5.9",
36
- "@storybook/vue": "^6.5.9",
33
+ "@storybook/addon-actions": "^6.5.10",
34
+ "@storybook/addon-essentials": "^6.5.10",
35
+ "@storybook/addon-links": "^6.5.10",
36
+ "@storybook/vue": "^6.5.10",
37
37
  "@vue/cli-plugin-babel": "~4.5.0",
38
38
  "@vue/cli-service": "~4.5.0",
39
39
  "babel-eslint": "^10.1.0",
40
40
  "babel-loader": "^8.2.2",
41
41
  "core-js": "^3.6.5",
42
42
  "eslint": "^6.7.2",
43
+ "eslint-plugin-storybook": "^0.6.4",
43
44
  "eslint-plugin-vue": "^6.2.2",
44
45
  "node-sass": "^5.0.0",
45
46
  "sass-loader": "^10.1.1",
@@ -0,0 +1 @@
1
+ <svg width="140" height="140" fill="none" xmlns="http://www.w3.org/2000/svg"><path vector-effect="non-scaling-stroke" d="M31.25 23.333h67.083C104.777 23.333 110 28.557 110 35M61.5 37.77h35M56.5 37.77h-4M61.5 43.77h30M56.5 43.77h-4M61.5 49.77h24M56.5 49.77h-4M61.5 55.77h20M56.5 55.77h-4M61.5 61.77h19M56.5 61.77h-4M61.5 67.77h19M56.5 67.77h-4M61.5 73.77h20M56.5 73.77h-4M61.5 79.77h23M56.5 79.77h-4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path vector-effect="non-scaling-stroke" d="M48.75 116.667h67.083c6.444 0 11.667-5.224 11.667-11.667v-5.833a5.833 5.833 0 0 0-5.833-5.834H63.333a5.833 5.833 0 0 0-5.833 5.834v8.75a8.75 8.75 0 0 1-8.75 8.75Zm0 0a8.75 8.75 0 0 1-8.75-8.75V58.333m0 .648V32.083a8.75 8.75 0 1 0-17.5 0v14.584a5.833 5.833 0 0 0 5.833 5.833H40v6.481ZM101.996 55.49a9.533 9.533 0 0 1 6.042.006 9.99 9.99 0 0 1-4.27 19.433 10.102 10.102 0 0 1-8.277-6.886 9.531 9.531 0 0 1 0-6.047 1 1 0 0 1 1.662-.377l5.614 5.614 4.472-4.472-5.615-5.614a1 1 0 0 1 .372-1.656v0Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path vector-effect="non-scaling-stroke" d="M117.728 77.728c7.029-7.03 7.029-18.426 0-25.456-7.029-7.03-18.426-7.03-25.456 0-7.03 7.03-7.03 18.426 0 25.456 7.03 7.03 18.427 7.03 25.456 0ZM107.581 74.652l6.112 6.112M114.653 67.582l6.111 6.111" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.75a6.75 6.75 0 1 0 0-13.5 6.75 6.75 0 0 0 0 13.5Z" fill="#6BAFFF" stroke="#fff" stroke-width="1.5"/><path d="M8.2 11.484v-3.75h-1" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.8" cy="4.8" r="1" fill="#fff"/></svg>
@@ -74,10 +74,7 @@
74
74
  &:after{
75
75
  content: "";
76
76
  position: absolute;
77
- top: 0;
78
- left: 0;
79
- bottom: 0;
80
- right: 0;
77
+ inset: 0;
81
78
  background: rgba($color-gray-8, .08);
82
79
  opacity: 0;
83
80
  transform: scale(.6);
@@ -4,16 +4,20 @@
4
4
  <div v-else class="no-txt" />
5
5
  <div v-if="instantView" class="instant" />
6
6
  <div v-else class="no-instant" />
7
- <div v-if="loading" class="loading" />
7
+ <span v-if="loading" class="loading">
8
+ <ecs-icon type="loading" width="18px" height="18px" color="#202127" />
9
+ </span>
8
10
  </div>
9
11
  </template>
10
12
 
11
13
  <script>
12
14
  import EcsAnimations from '../animations/animations'
15
+ import EcsIcon from '../icon/icon'
13
16
 
14
17
  export default {
15
18
  components: {
16
- EcsAnimations
19
+ EcsAnimations,
20
+ EcsIcon
17
21
  },
18
22
  props: {
19
23
  /** Determines if the document has been processed by OCR. */
@@ -72,12 +76,20 @@
72
76
  }
73
77
 
74
78
  .loading{
75
- width: 16px;
76
- height: 16px;
77
- left: 16px;
78
- top: 16px;
79
- animation: spin 1.5s infinite linear reverse;
80
- background: svg-uri('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g fill="none" fill-rule="evenodd"><circle cx="8" cy="8" r="8" fill="#FFF"/><path fill="#2F333C" d="M14.0263548,8.16381819 C14.0113782,7.38027913 13.841386,6.59917757 13.5274173,5.88496663 C13.2144798,5.17012288 12.7602845,4.52256819 12.2027063,3.98746663 C11.6454563,3.45196663 10.9846126,3.0286385 10.2693001,2.74935725 C9.55440947,2.46899788 8.78575322,2.335076 8.02635478,2.35131819 C7.2668626,2.36634163 6.51074541,2.53148225 5.81931572,2.83595882 C5.12734697,3.13942757 4.50046416,3.57974788 3.98258916,4.12005257 C3.46433916,4.660076 3.05493291,5.30022444 2.78509697,5.99268538 C2.51422978,6.68481819 2.38515947,7.42846663 2.40135478,8.16381819 C2.4164251,8.89928694 2.57671416,9.63039632 2.8716751,10.2990448 C3.1656751,10.9681854 3.59209697,11.5743729 4.11515166,12.0749979 C4.6379251,12.5760213 5.25740166,12.9715291 5.92703447,13.2318729 C6.59638603,13.4932479 7.31507353,13.6174432 8.02635478,13.6013182 C8.73777666,13.586201 9.44387822,13.4307635 10.0897454,13.1452948 C10.7360345,12.8607401 11.3215735,12.4482635 11.804972,11.9424354 C12.2887454,11.4368885 12.6703313,10.8381073 12.9212298,10.1913026 C13.073972,9.79921663 13.177636,9.38974007 13.2322688,8.97491975 C13.2468704,8.9757635 13.2615423,8.976326 13.2763548,8.976326 C13.6905657,8.976326 14.0263548,8.64056038 14.0263548,8.226326 C14.0263548,8.20527913 14.0252532,8.18446663 14.0235657,8.16384163 L14.0263548,8.16384163 L14.0263548,8.16381819 Z M12.8346282,10.1553963 C12.5595657,10.7788573 12.1609876,11.3436776 11.672386,11.8098494 C11.1840657,12.2763729 10.6059798,12.6440604 9.98202666,12.8855135 C9.35826103,13.1278338 8.68956572,13.2423729 8.02635478,13.2263182 C7.36302666,13.2111073 6.70687041,13.0653494 6.10658916,12.7988885 C5.50600322,12.5332713 4.96185478,12.1486151 4.51290947,11.6772635 C4.06363603,11.2061932 3.70984697,10.6487791 3.47788603,10.0476776 C3.24503447,9.44669319 3.13537041,8.80298225 3.15135478,8.16381819 C3.1666126,7.52453694 3.30754228,6.89336507 3.5644876,6.3158885 C3.82063603,5.73815413 4.19141728,5.21467757 4.64549541,4.78295882 C5.0993626,4.35091194 5.63608135,4.01104475 6.21433135,3.78855257 C6.79251103,3.56519319 7.4112376,3.46035725 8.02635478,3.47631819 C8.64158916,3.49162288 9.24777666,3.627701 9.80247197,3.87515413 C10.3573782,4.12183382 10.8601595,4.47869319 11.2746282,4.91556819 C11.6894251,5.35218538 12.0153704,5.86823225 12.2284173,6.42363069 C12.442261,6.97900569 12.5422688,7.57274788 12.5263548,8.16381819 L12.5291438,8.16381819 C12.5274563,8.18444319 12.5263548,8.20525569 12.5263548,8.22630257 C12.5263548,8.61316194 12.8192298,8.93146663 13.1953313,8.97189632 C13.1223938,9.37996663 13.0016204,9.77835725 12.8346282,10.1553963 L12.8346282,10.1553963 Z"/></g></svg>');
79
+ border-radius: 100%;
80
+ background: #FFF;
81
+ width: 18px;
82
+ height: 18px;
83
+ position: absolute;
84
+ bottom: -3px;
85
+ right: 0;
86
+ display: block;
87
+
88
+ .icon{
89
+ position: absolute;
90
+ inset: 0;
91
+ animation: spin 1.5s infinite linear reverse;
92
+ }
81
93
  }
82
94
  }
83
95
  </style>
@@ -69,6 +69,7 @@ import EcsJumperPage from "./jumper-page/jumper-page.vue"
69
69
  import EcsLayoutIndex from "./layout-index/layout-index.vue"
70
70
  import EcsLayoutDirectory from "./layout-directory/layout-directory.vue"
71
71
  import EcsLayoutDataTable from "./layout-data-table/layout-data-table.vue"
72
+ import EcsLogMessage from "./log-message/log-message.vue"
72
73
  import EcsMap from "./map/map.vue"
73
74
  import EcsModal from "./modal/modal.vue"
74
75
  import EcsModalHeader from "./modal-header/modal-header.vue"
@@ -117,6 +118,7 @@ import EcsText from "./text/text.vue"
117
118
  import EcsToast from "./toast/toast.vue"
118
119
  import EcsToasts from "./toasts/toasts.vue"
119
120
  import EcsToolbar from "./toolbar/toolbar.vue"
121
+ import EcsTranscriptState from "./transcript-state/transcript-state.vue"
120
122
  import EcsTreeList from "./tree-list/tree-list.vue"
121
123
  import EcsTreeListItem from "./tree-list-item/tree-list-item.vue"
122
124
  import EcsVideo from "./video/video.vue"
@@ -190,6 +192,7 @@ const Components = {
190
192
  EcsLayoutIndex,
191
193
  EcsLayoutDirectory,
192
194
  EcsLayoutDataTable,
195
+ EcsLogMessage,
193
196
  EcsMap,
194
197
  EcsModal,
195
198
  EcsModalHeader,
@@ -238,6 +241,7 @@ const Components = {
238
241
  EcsToast,
239
242
  EcsToasts,
240
243
  EcsToolbar,
244
+ EcsTranscriptState,
241
245
  EcsTreeList,
242
246
  EcsTreeListItem,
243
247
  EcsVideo
@@ -0,0 +1,144 @@
1
+ <template>
2
+ <ecs-flex-row class="ecs-log-message" :class="[type, highlight ? 'highlighted' : '']" align="start" :style="padding">
3
+ <ecs-sticker v-if="type != 'blank'" :type="type" />
4
+ <div class="ecs-log-message-content">
5
+ <slot></slot>
6
+ </div>
7
+ <div v-if="meta" class="ecs-log-message-meta">
8
+ {{ meta }}
9
+ </div>
10
+ </ecs-flex-row>
11
+ </template>
12
+
13
+ <script>
14
+ import EcsFlexRow from '../flex/flex-row'
15
+ import EcsSticker from '../sticker/sticker'
16
+
17
+ export default {
18
+ components: {
19
+ EcsFlexRow, EcsSticker
20
+ },
21
+
22
+ props: {
23
+ /** Determines the type of log message, which also impacts the styling of it. */
24
+ type: {
25
+ type: String,
26
+ validator: v => ['blank', 'success', 'warning', 'info', 'error'].includes(v),
27
+ default: 'blank'
28
+ },
29
+ /** Adds a background color to highlight the line within the log. */
30
+ highlight: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ /** Meta text like (most usual) a timestamp, a username, etc. Appears as subtle gray text on the right side of the log message. */
35
+ meta: {
36
+ type: String
37
+ },
38
+ /** Allows to customize the left and right inner padding of the log message. */
39
+ verticalPadding: {
40
+ type: String,
41
+ default: '20px'
42
+ },
43
+ },
44
+
45
+ computed: {
46
+ padding() {
47
+ return 'padding-left: ' + this.verticalPadding + '; padding-right: ' + this.verticalPadding + ';'
48
+ }
49
+ }
50
+ }
51
+ </script>
52
+
53
+ <style lang="scss">
54
+ @import "../../tokens/build/scss/tokens.scss";
55
+
56
+ .ecs-log-message-content{
57
+ p, ol, ul, blockquote{
58
+ margin: $spacing-10 0;
59
+ }
60
+
61
+ b, strong{
62
+ font-weight: $font-weight-medium;
63
+ }
64
+
65
+ a{
66
+ font-weight: $font-weight-medium;
67
+
68
+ &:hover{
69
+ text-decoration: underline;
70
+ }
71
+ }
72
+ }
73
+
74
+ .highlighted.error > .ecs-log-message-content a{
75
+ color: $color-red-12;
76
+ }
77
+
78
+ .highlighted.info > .ecs-log-message-content a{
79
+ color: $color-blue-12;
80
+ }
81
+
82
+ .highlighted.warning > .ecs-log-message-content a{
83
+ color: $color-yellow-12;
84
+ }
85
+
86
+ .highlighted.success > .ecs-log-message-content a{
87
+ color: $color-green-12;
88
+ }
89
+ </style>
90
+
91
+ <style lang="scss" scoped>
92
+ @import "../../tokens/build/scss/tokens.scss";
93
+ @import "../mixins/svg-uri";
94
+
95
+ .ecs-log-message{
96
+ column-gap: $spacing-10;
97
+ padding-top: $spacing-10;
98
+ padding-bottom: $spacing-10;
99
+ color: $color-gray-15;
100
+ font-size: $type-scale-2-font-size;
101
+ line-height: $type-scale-2-line-height;
102
+ border-bottom: 1px solid $color-gray-1;
103
+
104
+ &-content{
105
+ flex: 1;
106
+
107
+ > :first-child{
108
+ margin-top: 0;
109
+ }
110
+
111
+ > :last-child{
112
+ margin-bottom: 0;
113
+ }
114
+ }
115
+
116
+ &-meta{
117
+ opacity: .5;
118
+ }
119
+ }
120
+
121
+ .info.highlighted{
122
+ background: $color-blue-1;
123
+ border-color: $color-blue-2;
124
+ color: $color-blue-15;
125
+ }
126
+
127
+ .warning.highlighted{
128
+ background: $color-yellow-1;
129
+ border-color: $color-yellow-2;
130
+ color: $color-yellow-15;
131
+ }
132
+
133
+ .error.highlighted{
134
+ background: $color-red-1;
135
+ border-color: $color-red-2;
136
+ color: $color-red-15;
137
+ }
138
+
139
+ .success.highlighted{
140
+ background: $color-green-1;
141
+ border-color: $color-green-2;
142
+ color: $color-green-15;
143
+ }
144
+ </style>
@@ -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 '920px'
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 '780px'
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 15px;
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: 24px;
284
+ margin-right: $spacing-30;
247
285
  }
248
286
 
249
287
  .sidebar-button{
250
- margin-right: 24px;
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 15px 0 30px;
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: 15px;
321
- padding-left: 20px;
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
- margin: 0 auto;
360
- display: flex;
361
- align-items: center;
362
- justify-content: space-between;
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: 4px;
443
+ margin-top: $spacing-5;
394
444
  }
395
445
  }
396
446
  }
@@ -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
@@ -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,6 +6,36 @@ import { Meta } from '@storybook/addon-docs/blocks';
6
6
  Changelog
7
7
  </h1>
8
8
 
9
+ ## Version 1.5.0 (9 September 2022)
10
+
11
+ ### Features
12
+
13
+ - Added new `blockContent` prop to `EcsOverlay` which allows to block any interactions on the content area.
14
+
15
+ ### Fixes
16
+
17
+ - Added dynamic padding on `EcsOverlay` footer, depending if the content area is scrollable.
18
+ - Added minimum padding for `EcsOverlay` content, when it's not the full width variant.
19
+
20
+ ## Version 1.4.1 (7 September 2022)
21
+
22
+ ### Fixes
23
+
24
+ - Correct size for EcsTranscriptState button, added active styles and removed not needed `repair` state.
25
+
26
+ ## Version 1.4.0 (6 September 2022)
27
+
28
+ ### Features
29
+
30
+ - Added new `EcsTranscriptState` component
31
+ - Added new `EcsLogMessage` component
32
+ - Added broken transcript empty state icon
33
+ - Added info sticker icon
34
+
35
+ ### Fixes
36
+
37
+ - Cleaned up styles on the EcsDocumentState component and reduced weight of inline styles a bit.
38
+
9
39
  ## Version 1.3.6 (29 August 2022)
10
40
 
11
41
  ### Fixes