@everchron/ec-shards 2.1.4 → 2.1.6
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/ec-shards.common.js +16 -6
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.umd.js +16 -6
- 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 +1 -1
- package/src/components/log-message/log-message.vue +19 -4
- package/src/components/modal/modal.vue +11 -1
- package/src/stories/Changelog.stories.mdx +12 -0
- package/src/stories/log-message/log-message.stories.js +11 -0
- package/src/stories/modal/modal.stories.js +29 -0
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ecs-flex-row class="ecs-log-message" :class="[type, highlight ? 'highlighted' : '']" align="start" :style="padding">
|
|
3
|
-
<ecs-
|
|
3
|
+
<ecs-skeleton-loader v-if="loading && type != 'blank'" type="rect" :width="16" :height="16" />
|
|
4
|
+
<ecs-sticker v-else-if="type != 'blank'" :type="type" />
|
|
4
5
|
<div class="ecs-log-message-content">
|
|
5
|
-
<
|
|
6
|
+
<ecs-skeleton-loader v-if="loading" type="single" :width="40" class="skeleton-text" />
|
|
7
|
+
<slot v-else></slot>
|
|
6
8
|
</div>
|
|
7
|
-
<
|
|
9
|
+
<ecs-skeleton-loader v-if="loading && meta" type="single" :width="15" class="skeleton-text" />
|
|
10
|
+
<div v-else-if="meta" class="ecs-log-message-meta">
|
|
8
11
|
{{ meta }}
|
|
9
12
|
</div>
|
|
10
13
|
</ecs-flex-row>
|
|
@@ -13,10 +16,11 @@
|
|
|
13
16
|
<script>
|
|
14
17
|
import EcsFlexRow from '../flex/flex-row'
|
|
15
18
|
import EcsSticker from '../sticker/sticker'
|
|
19
|
+
import EcsSkeletonLoader from '../skeleton-loader/skeleton-loader'
|
|
16
20
|
|
|
17
21
|
export default {
|
|
18
22
|
components: {
|
|
19
|
-
EcsFlexRow, EcsSticker
|
|
23
|
+
EcsFlexRow, EcsSticker, EcsSkeletonLoader
|
|
20
24
|
},
|
|
21
25
|
|
|
22
26
|
props: {
|
|
@@ -40,6 +44,11 @@ export default {
|
|
|
40
44
|
type: String,
|
|
41
45
|
default: '20px'
|
|
42
46
|
},
|
|
47
|
+
/** Turns the log message into fetching/loading state, which replaces it's content with skeleton loaders. */
|
|
48
|
+
loading: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
}
|
|
43
52
|
},
|
|
44
53
|
|
|
45
54
|
computed: {
|
|
@@ -54,6 +63,8 @@ export default {
|
|
|
54
63
|
@import "../../tokens/build/scss/tokens.scss";
|
|
55
64
|
|
|
56
65
|
.ecs-log-message-content{
|
|
66
|
+
min-height: $type-scale-2-line-height;
|
|
67
|
+
|
|
57
68
|
p, ol, ul, blockquote{
|
|
58
69
|
margin: $spacing-10 0;
|
|
59
70
|
}
|
|
@@ -141,4 +152,8 @@ export default {
|
|
|
141
152
|
border-color: $color-green-2;
|
|
142
153
|
color: $color-green-15;
|
|
143
154
|
}
|
|
155
|
+
|
|
156
|
+
.skeleton-text{
|
|
157
|
+
margin-top: 5px !important;
|
|
158
|
+
}
|
|
144
159
|
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<transition name="dialog-fade">
|
|
3
3
|
<div v-if="isShown" class="ecs-modal" :class="[typeClass, clickthrough ? 'ecs-modal-click-through' : '']">
|
|
4
4
|
|
|
5
|
-
<div class="ecs-modal-dialog ecs-modal-sheet">
|
|
5
|
+
<div class="ecs-modal-dialog ecs-modal-sheet" :style="fixedHeightStyle">
|
|
6
6
|
<div v-if="$slots.header" class="ecs-modal-header-wrap">
|
|
7
7
|
<!-- @slot Slot for the modal header content. -->
|
|
8
8
|
<slot name="header"></slot>
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
type: Boolean,
|
|
45
45
|
default: false
|
|
46
46
|
},
|
|
47
|
+
/** Sets the modal height to a fixed pixel value. If not passed, the modal height will auto adapt it's height. The modal height will never exceed 90% height of viewport. */
|
|
48
|
+
fixedHeight: {
|
|
49
|
+
type: Number
|
|
50
|
+
}
|
|
47
51
|
},
|
|
48
52
|
|
|
49
53
|
data () {
|
|
@@ -57,6 +61,12 @@
|
|
|
57
61
|
if (this.type && this.type !== '')
|
|
58
62
|
return `ecs-modal-${this.type}`
|
|
59
63
|
return this.type
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
fixedHeightStyle() {
|
|
67
|
+
if (this.fixedHeight && this.fixedHeight !== '')
|
|
68
|
+
return `height:${this.fixedHeight}px`
|
|
69
|
+
return this.fixedHeight
|
|
60
70
|
}
|
|
61
71
|
},
|
|
62
72
|
|
|
@@ -6,6 +6,18 @@ import { Meta } from '@storybook/addon-docs/blocks';
|
|
|
6
6
|
Changelog
|
|
7
7
|
</h1>
|
|
8
8
|
|
|
9
|
+
## Version 2.1.6 (28 October 2022)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- Added `loading` prop to EcsLogMessage component
|
|
14
|
+
|
|
15
|
+
## Version 2.1.5 (28 October 2022)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- Added `fixedHeight` prop to modal component
|
|
20
|
+
|
|
9
21
|
## Version 2.1.4 (26 October 2022)
|
|
10
22
|
|
|
11
23
|
### Features
|
|
@@ -35,3 +35,14 @@ export const logMessageRichText = () => ({
|
|
|
35
35
|
</ecs-log-message>
|
|
36
36
|
</div>`,
|
|
37
37
|
});
|
|
38
|
+
|
|
39
|
+
export const logMessageLoading = () => ({
|
|
40
|
+
components: { EcsLogMessage },
|
|
41
|
+
template: `<div>
|
|
42
|
+
<ecs-log-message type="info" meta="07/21/2022, 11:23 AM" loading>Message</ecs-log-message>
|
|
43
|
+
<ecs-log-message type="info" meta="07/21/2022, 11:23 AM" highlight loading>
|
|
44
|
+
<p>Broken Transcript Issue opened by <strong><a href="mailto:r.reyes@orrick.com">r.reyes@orrick.com</a></strong></p>
|
|
45
|
+
<p>Hey there, it looks like this transcript is cut-off at page 58, even though the original file has a total of 112 pages. Additionally there are lines of text missing at the end of each page.</p>
|
|
46
|
+
</ecs-log-message>
|
|
47
|
+
</div>`,
|
|
48
|
+
});
|
|
@@ -128,3 +128,32 @@ export const footer = () => ({
|
|
|
128
128
|
</ecs-modal>
|
|
129
129
|
</div>`,
|
|
130
130
|
});
|
|
131
|
+
|
|
132
|
+
export const modalFixedHeight = () => ({
|
|
133
|
+
components: { EcsModal, EcsModalHeader, EcsModalFooter },
|
|
134
|
+
data() {
|
|
135
|
+
return {
|
|
136
|
+
showdialog: false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
template: `<div>
|
|
140
|
+
<button @click="showdialog = !showdialog">Open</button>
|
|
141
|
+
|
|
142
|
+
<ecs-modal :fixed-height="300" :show="showdialog">
|
|
143
|
+
<template slot="header">
|
|
144
|
+
<ecs-modal-header @close="showdialog = !showdialog">
|
|
145
|
+
<h2 class="headline-2">Regular Header</h2>
|
|
146
|
+
</ecs-modal-header>
|
|
147
|
+
</template>
|
|
148
|
+
<p>Modal Content Slot</p>
|
|
149
|
+
<template slot="footer">
|
|
150
|
+
<ecs-modal-footer>
|
|
151
|
+
<template slot="secondary">
|
|
152
|
+
Secondary Footer
|
|
153
|
+
</template>
|
|
154
|
+
Primary Footer Content
|
|
155
|
+
</ecs-modal-footer>
|
|
156
|
+
</template>
|
|
157
|
+
</ecs-modal>
|
|
158
|
+
</div>`,
|
|
159
|
+
});
|