@everchron/ec-shards 5.0.40 → 5.0.42
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 +75 -34
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +75 -34
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +1 -1
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/data-grid/data-grid-head-cell.vue +1 -0
- package/src/components/modal/modal.vue +76 -1
- package/src/stories/modal/modal.stories.js +41 -0
package/package.json
CHANGED
|
@@ -11,9 +11,16 @@
|
|
|
11
11
|
<slot></slot>
|
|
12
12
|
</div>
|
|
13
13
|
<div v-if="$slots.footer" class="ecs-modal-footer-wrap">
|
|
14
|
-
<!-- @slot Slot the modal footer content. -->
|
|
14
|
+
<!-- @slot Slot for the modal footer content. -->
|
|
15
15
|
<slot name="footer"></slot>
|
|
16
16
|
</div>
|
|
17
|
+
<div v-if="$slots.dialog" class="ecs-modal-inner-dialog" :style="{ 'top': innerDialogOffset + 'px' }" :class="innerDialog ? 'open' : ''">
|
|
18
|
+
<!-- @slot Slot for dialogs that should render _within_ the modal. -->
|
|
19
|
+
<slot name="dialog"></slot>
|
|
20
|
+
<transition name="fade">
|
|
21
|
+
<div v-if="innerDialog" class="ecs-modal-inner-dialog-backdrop" />
|
|
22
|
+
</transition>
|
|
23
|
+
</div>
|
|
17
24
|
</div>
|
|
18
25
|
|
|
19
26
|
<div class="ecs-modal-backdrop ecs-modal-sheet-backdrop" />
|
|
@@ -47,6 +54,16 @@
|
|
|
47
54
|
/** 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
55
|
fixedHeight: {
|
|
49
56
|
type: Number
|
|
57
|
+
},
|
|
58
|
+
/** If set, there will be a dialog backdrop rendered within the modal, blocking all interactions besides the header. */
|
|
59
|
+
innerDialog: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
/** Allows to adjust the top offset of the inner dialog area (e.g. for dynamic header heights). */
|
|
64
|
+
innerDialogOffset: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 48
|
|
50
67
|
}
|
|
51
68
|
},
|
|
52
69
|
|
|
@@ -155,5 +172,63 @@
|
|
|
155
172
|
pointer-events: auto;
|
|
156
173
|
}
|
|
157
174
|
}
|
|
175
|
+
|
|
176
|
+
.ecs-dialog{
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 0;
|
|
179
|
+
z-index: 1;
|
|
180
|
+
border-radius: 0 0 $border-radius-large $border-radius-large;
|
|
181
|
+
box-shadow: 0px 2px 20px rgba(71, 75, 96, 0.1), 0px 0px 0px 1px rgba(71, 75, 96, 0.05), 0px 1px 5px rgba(71, 75, 96, 0.2);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
185
|
+
|
|
186
|
+
<style lang="scss" scoped>
|
|
187
|
+
@import "../../tokens/build/scss/tokens.scss";
|
|
188
|
+
|
|
189
|
+
.ecs-modal-inner-dialog{
|
|
190
|
+
position: absolute;
|
|
191
|
+
left: 0;
|
|
192
|
+
right: 0;
|
|
193
|
+
bottom: 0;
|
|
194
|
+
z-index: 3;
|
|
195
|
+
display: none;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
|
|
198
|
+
&:before{
|
|
199
|
+
content: "";
|
|
200
|
+
position: absolute;
|
|
201
|
+
height: 3px;
|
|
202
|
+
left: 0px;
|
|
203
|
+
right: 0px;
|
|
204
|
+
top: 0px;
|
|
205
|
+
z-index: 2;
|
|
206
|
+
background: linear-gradient(180deg, rgba(32, 33, 39, 0.12) 0%, rgba(32, 33, 39, 0) 100%);
|
|
207
|
+
transition: .3s;
|
|
208
|
+
opacity: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&.open{
|
|
212
|
+
display: block;
|
|
213
|
+
|
|
214
|
+
&:before{
|
|
215
|
+
opacity: 1;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&-backdrop{
|
|
220
|
+
position: absolute;
|
|
221
|
+
inset: 0;
|
|
222
|
+
background: $color-gray-13;
|
|
223
|
+
opacity: .2;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.fade-enter-active, .fade-leave-active {
|
|
228
|
+
transition: opacity .4s;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.fade-enter, .fade-leave-to {
|
|
232
|
+
opacity: 0;
|
|
158
233
|
}
|
|
159
234
|
</style>
|
|
@@ -3,6 +3,10 @@ import EcsModalHeader from '@components/modal-header/modal-header';
|
|
|
3
3
|
import EcsModalFooter from '@components/modal-footer/modal-footer';
|
|
4
4
|
import EcsSequenceMap from '@components/sequence-map/sequence-map';
|
|
5
5
|
import EcsSequenceMapButton from '@components/sequence-map-button/sequence-map-button';
|
|
6
|
+
import EcsDialog from '@components/dialog/dialog';
|
|
7
|
+
import EcsDialogHeader from '@components/dialog-header/dialog-header';
|
|
8
|
+
import EcsButtonDialog from '@components/button-dialog/button-dialog';
|
|
9
|
+
|
|
6
10
|
|
|
7
11
|
export default {
|
|
8
12
|
title: 'Patterns/Modal',
|
|
@@ -157,3 +161,40 @@ export const modalFixedHeight = () => ({
|
|
|
157
161
|
</ecs-modal>
|
|
158
162
|
</div>`,
|
|
159
163
|
});
|
|
164
|
+
|
|
165
|
+
export const modalWithInnerDialog = () => ({
|
|
166
|
+
components: { EcsModal, EcsModalHeader, EcsModalFooter, EcsDialog, EcsButtonDialog, EcsDialogHeader },
|
|
167
|
+
data() {
|
|
168
|
+
return {
|
|
169
|
+
showDialog: false,
|
|
170
|
+
showModal: false
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
template: `<div>
|
|
174
|
+
<button @click="showModal = !showModal">Open Modal</button>
|
|
175
|
+
|
|
176
|
+
<ecs-modal :fixed-height="400" :show="showModal" :inner-dialog="showDialog">
|
|
177
|
+
<template slot="header">
|
|
178
|
+
<ecs-modal-header @close="showModal = !showModal">
|
|
179
|
+
<h2 class="headline-2">Regular Header</h2>
|
|
180
|
+
</ecs-modal-header>
|
|
181
|
+
</template>
|
|
182
|
+
<button @click="showDialog = true">Show Inner Dialog</button>
|
|
183
|
+
<template slot="footer">
|
|
184
|
+
<ecs-modal-footer>
|
|
185
|
+
Primary Footer Content
|
|
186
|
+
</ecs-modal-footer>
|
|
187
|
+
</template>
|
|
188
|
+
<template slot="dialog">
|
|
189
|
+
<ecs-dialog show-in-place :show="showDialog">
|
|
190
|
+
<ecs-dialog-header>Choose Attachment</ecs-dialog-header>
|
|
191
|
+
<p>Select documents to attach to.</p>
|
|
192
|
+
<template slot="actions">
|
|
193
|
+
<ecs-button-dialog @click="showDialog = false">Cancel</ecs-button-dialog>
|
|
194
|
+
<ecs-button-dialog @click="showDialog = false" type="confirm" icon="download">Confirm</ecs-button-dialog>
|
|
195
|
+
</template>
|
|
196
|
+
</ecs-dialog>
|
|
197
|
+
</template>
|
|
198
|
+
</ecs-modal>
|
|
199
|
+
</div>`,
|
|
200
|
+
});
|