2019-01-31 12:15:32 +00:00
|
|
|
<template>
|
2020-02-04 07:46:11 +00:00
|
|
|
<div ref="mask" :class="maskClass" v-if="maskVisible">
|
2020-01-20 10:54:26 +00:00
|
|
|
<transition name="p-dialog" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @after-leave="onAfterLeave" @appear="onAppear">
|
2020-02-04 07:46:11 +00:00
|
|
|
<div ref="dialog" :class="dialogClass" :style="dialogStyle" v-if="visible" v-bind="$attrs" v-on="listeners" role="dialog" :aria-labelledby="ariaLabelledById" :aria-modal="modal">
|
2020-01-08 10:51:56 +00:00
|
|
|
<div class="p-dialog-titlebar" v-if="showHeader">
|
|
|
|
<slot name="header">
|
|
|
|
<span :id="ariaLabelledById" class="p-dialog-title" v-if="header" >{{header}}</span>
|
|
|
|
</slot>
|
|
|
|
<div class="p-dialog-titlebar-icons">
|
2020-02-03 09:08:54 +00:00
|
|
|
<button class="p-dialog-titlebar-icon p-dialog-titlebar-maximize p-link" @click="maximize" v-if="maximizable" type="button">
|
|
|
|
<span :class="maximizeIconClass"></span>
|
|
|
|
</button>
|
2020-01-13 10:06:08 +00:00
|
|
|
<button class="p-dialog-titlebar-icon p-dialog-titlebar-close p-link" @click="close" v-if="closable" :aria-label="ariaCloseLabel" type="button">
|
2020-01-08 10:51:56 +00:00
|
|
|
<span class="p-dialog-titlebar-close-icon pi pi-times"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="p-dialog-content" :style="contentStyle">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
<div class="p-dialog-footer" v-if="footer || $slots.footer">
|
|
|
|
<slot name="footer">{{footer}}</slot>
|
2019-01-31 12:15:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-01-08 10:51:56 +00:00
|
|
|
</transition>
|
|
|
|
</div>
|
2019-01-31 12:15:32 +00:00
|
|
|
</template>
|
|
|
|
<script>
|
2019-12-26 11:24:53 +00:00
|
|
|
import UniqueComponentId from '../utils/UniqueComponentId';
|
2019-01-31 12:15:32 +00:00
|
|
|
import DomHandler from '../utils/DomHandler';
|
|
|
|
export default {
|
2020-01-08 10:51:56 +00:00
|
|
|
inheritAttrs: false,
|
2019-01-31 12:15:32 +00:00
|
|
|
props: {
|
2020-01-20 10:54:26 +00:00
|
|
|
header: null,
|
|
|
|
footer: null,
|
2019-01-31 12:15:32 +00:00
|
|
|
visible: Boolean,
|
|
|
|
modal: Boolean,
|
2020-01-20 10:54:26 +00:00
|
|
|
contentStyle: null,
|
2019-01-31 12:15:32 +00:00
|
|
|
rtl: Boolean,
|
2020-02-03 09:08:54 +00:00
|
|
|
maximizable: Boolean,
|
2019-01-31 12:15:32 +00:00
|
|
|
closable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
showHeader: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
baseZIndex: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
autoZIndex: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
2019-12-26 11:24:53 +00:00
|
|
|
},
|
|
|
|
ariaCloseLabel: {
|
|
|
|
type: String,
|
|
|
|
default: 'close'
|
2020-02-03 12:18:00 +00:00
|
|
|
},
|
|
|
|
position: {
|
|
|
|
type: String,
|
|
|
|
default: 'center'
|
2019-01-31 15:42:58 +00:00
|
|
|
}
|
2019-01-31 12:15:32 +00:00
|
|
|
},
|
2020-01-08 10:51:56 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dialogClasses: null,
|
2020-01-17 13:27:16 +00:00
|
|
|
dialogStyles: null,
|
2020-02-03 09:08:54 +00:00
|
|
|
maskVisible: this.visible,
|
|
|
|
maximized: false
|
2020-01-08 10:51:56 +00:00
|
|
|
}
|
|
|
|
},
|
2019-11-01 08:30:06 +00:00
|
|
|
documentKeydownListener: null,
|
2020-01-08 10:51:56 +00:00
|
|
|
updated() {
|
2020-01-30 08:03:03 +00:00
|
|
|
this.removeStylesFromMask();
|
2020-01-20 10:54:26 +00:00
|
|
|
|
2020-01-30 07:13:26 +00:00
|
|
|
if (this.visible && !this.maskVisible) {
|
|
|
|
this.maskVisible = true;
|
2020-01-20 10:54:26 +00:00
|
|
|
}
|
2019-11-01 08:30:06 +00:00
|
|
|
},
|
2020-01-30 08:03:03 +00:00
|
|
|
mounted() {
|
|
|
|
this.removeStylesFromMask();
|
|
|
|
},
|
2020-01-08 10:51:56 +00:00
|
|
|
beforeDestroy() {
|
2020-02-03 09:44:20 +00:00
|
|
|
this.disableDocumentSettings();
|
2020-01-08 10:51:56 +00:00
|
|
|
},
|
2019-01-31 12:15:32 +00:00
|
|
|
methods: {
|
2019-01-31 15:42:58 +00:00
|
|
|
close() {
|
2020-01-20 10:54:26 +00:00
|
|
|
this.$emit('update:visible', false);
|
2019-01-31 12:15:32 +00:00
|
|
|
},
|
2020-01-20 10:54:26 +00:00
|
|
|
onBeforeEnter(el) {
|
2019-01-31 12:15:32 +00:00
|
|
|
if (this.autoZIndex) {
|
2020-01-20 10:54:26 +00:00
|
|
|
el.style.zIndex = String(this.baseZIndex + DomHandler.generateZIndex());
|
2019-01-31 12:15:32 +00:00
|
|
|
}
|
2020-01-20 10:54:26 +00:00
|
|
|
},
|
|
|
|
onEnter() {
|
2020-02-04 07:46:11 +00:00
|
|
|
this.$refs.mask.style.zIndex = String(parseInt(this.$refs.dialog.style.zIndex, 10) - 1);
|
2020-01-08 10:51:56 +00:00
|
|
|
|
2020-01-20 10:54:26 +00:00
|
|
|
this.$emit('show');
|
|
|
|
this.focus();
|
2020-02-03 09:44:20 +00:00
|
|
|
this.enableDocumentSettings();
|
2019-01-31 12:15:32 +00:00
|
|
|
},
|
2020-01-30 07:57:29 +00:00
|
|
|
onLeave() {
|
2019-01-31 12:15:32 +00:00
|
|
|
this.$emit('hide');
|
2020-01-20 10:54:26 +00:00
|
|
|
},
|
|
|
|
onAfterLeave() {
|
2020-01-30 07:13:26 +00:00
|
|
|
this.maskVisible = false;
|
2020-02-03 09:44:20 +00:00
|
|
|
this.disableDocumentSettings();
|
2019-01-31 12:15:32 +00:00
|
|
|
},
|
2019-12-09 14:48:23 +00:00
|
|
|
onAppear() {
|
2020-01-20 10:54:26 +00:00
|
|
|
if (this.visible) {
|
2019-12-09 14:48:23 +00:00
|
|
|
this.onEnter();
|
|
|
|
}
|
|
|
|
},
|
2019-01-31 12:15:32 +00:00
|
|
|
focus() {
|
2020-02-04 07:46:11 +00:00
|
|
|
let focusable = DomHandler.findSingle(this.$refs.dialog, 'input,button');
|
2019-01-31 12:15:32 +00:00
|
|
|
if (focusable) {
|
|
|
|
focusable.focus();
|
|
|
|
}
|
|
|
|
},
|
2020-02-03 09:44:20 +00:00
|
|
|
maximize() {
|
|
|
|
this.maximized = !this.maximized;
|
|
|
|
|
|
|
|
if (!this.modal) {
|
|
|
|
if (this.maximized)
|
|
|
|
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
|
|
else
|
|
|
|
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
enableDocumentSettings() {
|
2020-01-08 10:51:56 +00:00
|
|
|
if (this.modal) {
|
2019-01-31 12:15:32 +00:00
|
|
|
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
2019-11-01 08:30:06 +00:00
|
|
|
this.bindDocumentKeydownListener();
|
2019-01-31 12:15:32 +00:00
|
|
|
}
|
2020-02-03 09:44:20 +00:00
|
|
|
else if (this.maximizable && this.maximized) {
|
|
|
|
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
|
|
}
|
2019-01-31 12:15:32 +00:00
|
|
|
},
|
2020-02-03 09:44:20 +00:00
|
|
|
disableDocumentSettings() {
|
2020-01-08 10:51:56 +00:00
|
|
|
if (this.modal) {
|
2019-01-31 12:15:32 +00:00
|
|
|
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
2019-11-01 08:30:06 +00:00
|
|
|
this.unbindDocumentKeydownListener();
|
|
|
|
}
|
2020-02-03 09:44:20 +00:00
|
|
|
else if (this.maximizable && this.maximized) {
|
|
|
|
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
2020-02-03 09:08:54 +00:00
|
|
|
}
|
|
|
|
},
|
2019-11-01 08:30:06 +00:00
|
|
|
onKeyDown(event) {
|
|
|
|
if (event.which === 9) {
|
|
|
|
event.preventDefault();
|
2020-02-04 07:46:11 +00:00
|
|
|
let focusableElements = DomHandler.getFocusableElements(this.$refs.dialog);
|
2019-11-01 08:30:06 +00:00
|
|
|
if (focusableElements && focusableElements.length > 0) {
|
|
|
|
if (!document.activeElement) {
|
|
|
|
focusableElements[0].focus();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
let focusedIndex = focusableElements.indexOf(document.activeElement);
|
|
|
|
if (event.shiftKey) {
|
|
|
|
if (focusedIndex == -1 || focusedIndex === 0)
|
|
|
|
focusableElements[focusableElements.length - 1].focus();
|
|
|
|
else
|
|
|
|
focusableElements[focusedIndex - 1].focus();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))
|
|
|
|
focusableElements[0].focus();
|
|
|
|
else
|
|
|
|
focusableElements[focusedIndex + 1].focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
bindDocumentKeydownListener() {
|
|
|
|
if (!this.documentKeydownListener) {
|
|
|
|
this.documentKeydownListener = this.onKeyDown.bind(this);
|
|
|
|
window.document.addEventListener('keydown', this.documentKeydownListener);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
unbindDocumentKeydownListener() {
|
|
|
|
if (this.documentKeydownListener) {
|
|
|
|
window.document.removeEventListener('keydown', this.documentKeydownListener);
|
|
|
|
this.documentKeydownListener = null;
|
2019-01-31 12:15:32 +00:00
|
|
|
}
|
2020-01-30 08:03:03 +00:00
|
|
|
},
|
2020-02-03 12:18:00 +00:00
|
|
|
getPositionClass() {
|
2020-02-06 11:57:20 +00:00
|
|
|
const positions = ['left', 'right', 'top', 'topleft', 'topright', 'bottom', 'bottomleft', 'bottomright'];
|
2020-02-03 12:18:00 +00:00
|
|
|
const pos = positions.find(item => item === this.position);
|
|
|
|
|
|
|
|
return pos ? `p-dialog-${pos}` : '';
|
|
|
|
},
|
2020-01-30 08:03:03 +00:00
|
|
|
removeStylesFromMask() {
|
|
|
|
if (this.$refs.mask) {
|
|
|
|
this.dialogStyles = this.$vnode.data.style;
|
2020-02-03 07:25:08 +00:00
|
|
|
if (this.dialogStyles) {
|
|
|
|
Object.keys(this.dialogStyles).forEach((key) => {
|
2020-01-30 08:03:03 +00:00
|
|
|
this.$refs.mask.style[key] = '';
|
|
|
|
});
|
|
|
|
}
|
2020-02-03 07:25:08 +00:00
|
|
|
|
|
|
|
this.dialogClasses = this.$vnode.data.class || this.$vnode.data.staticClass;
|
|
|
|
if (this.dialogClasses) {
|
2020-02-04 07:46:11 +00:00
|
|
|
this.$refs.mask.classList = 'p-dialog-mask' + (this.modal && ' p-component-overlay ') + this.getPositionClass();
|
2020-02-03 07:25:08 +00:00
|
|
|
}
|
2020-01-30 08:03:03 +00:00
|
|
|
}
|
2019-01-31 12:15:32 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2020-01-08 10:51:56 +00:00
|
|
|
listeners() {
|
|
|
|
return {
|
|
|
|
...this.$listeners
|
|
|
|
};
|
|
|
|
},
|
2020-02-04 07:46:11 +00:00
|
|
|
maskClass() {
|
|
|
|
return ['p-dialog-mask', {
|
|
|
|
'p-component-overlay': this.modal,
|
2020-02-03 12:18:00 +00:00
|
|
|
}, this.getPositionClass()];
|
2020-01-08 10:51:56 +00:00
|
|
|
},
|
2020-02-04 07:46:11 +00:00
|
|
|
dialogClass() {
|
2019-01-31 12:15:32 +00:00
|
|
|
return ['p-dialog p-component', {
|
2020-02-03 09:08:54 +00:00
|
|
|
'p-dialog-rtl': this.rtl,
|
|
|
|
'p-dialog-maximized': this.maximizable && this.maximized
|
2020-01-08 10:51:56 +00:00
|
|
|
}, this.dialogClasses];
|
|
|
|
},
|
2020-02-03 09:08:54 +00:00
|
|
|
maximizeIconClass() {
|
|
|
|
return ['p-dialog-titlebar-maximize-icon pi', {
|
|
|
|
'pi-window-maximize': !this.maximized,
|
|
|
|
'pi-window-minimize': this.maximized
|
|
|
|
}];
|
|
|
|
},
|
2020-02-04 07:46:11 +00:00
|
|
|
dialogStyle() {
|
2020-01-08 10:51:56 +00:00
|
|
|
return this.dialogStyles;
|
2019-12-26 11:24:53 +00:00
|
|
|
},
|
|
|
|
ariaId() {
|
|
|
|
return UniqueComponentId();
|
|
|
|
},
|
|
|
|
ariaLabelledById() {
|
|
|
|
return this.header != null ? this.ariaId + '_header' : null;
|
2019-01-31 12:15:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2019-05-25 21:13:31 +00:00
|
|
|
<style>
|
2020-02-04 07:46:11 +00:00
|
|
|
.p-dialog-mask {
|
2020-01-08 10:51:56 +00:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2020-02-04 07:46:11 +00:00
|
|
|
.p-dialog-mask.p-component-overlay {
|
2020-01-08 10:51:56 +00:00
|
|
|
pointer-events: auto;
|
|
|
|
}
|
2019-05-25 21:13:31 +00:00
|
|
|
.p-dialog {
|
2020-01-31 13:34:35 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2019-05-25 21:13:31 +00:00
|
|
|
padding: 0;
|
2020-01-08 10:51:56 +00:00
|
|
|
pointer-events: auto;
|
2020-01-23 08:27:24 +00:00
|
|
|
max-height: 90%;
|
2020-01-30 07:57:29 +00:00
|
|
|
transform: scale(1);
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
|
|
|
.p-dialog .p-dialog-titlebar {
|
2020-01-20 10:54:26 +00:00
|
|
|
padding: .5em .75em;
|
2019-05-25 21:13:31 +00:00
|
|
|
position: relative;
|
|
|
|
border: 0;
|
2020-02-03 09:08:54 +00:00
|
|
|
flex-shrink: 0;
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
|
|
|
.p-dialog .p-dialog-content {
|
|
|
|
position: relative;
|
|
|
|
border: 0;
|
|
|
|
padding: .5em .75em;
|
|
|
|
background: none;
|
|
|
|
zoom: 1;
|
2020-01-31 13:34:35 +00:00
|
|
|
overflow-y: auto;
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
|
|
|
.p-dialog-resizable .p-dialog-content {
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
.p-dialog .p-resizable-handle {
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
right: 3px;
|
|
|
|
bottom: 3px;
|
|
|
|
position: absolute;
|
|
|
|
font-size: .1px;
|
|
|
|
display: block;
|
|
|
|
cursor: se-resize;
|
|
|
|
}
|
|
|
|
.p-draggable .p-dialog-titlebar {
|
|
|
|
cursor: move;
|
|
|
|
}
|
|
|
|
.p-dialog .p-dialog-titlebar-icons {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
.p-dialog .p-dialog-titlebar-icons:after {
|
|
|
|
content: "";
|
|
|
|
display: table;
|
|
|
|
clear: both;
|
|
|
|
}
|
|
|
|
.p-dialog .p-dialog-titlebar-icon {
|
|
|
|
text-decoration: none;
|
|
|
|
padding: .125em;
|
|
|
|
cursor: pointer;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
border: 1px solid transparent;
|
|
|
|
}
|
|
|
|
.p-dialog .p-dialog-titlebar-icon span {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
.p-dialog-footer {
|
|
|
|
padding: 1em;
|
|
|
|
text-align: right;
|
2020-02-03 09:08:54 +00:00
|
|
|
flex-shrink: 0;
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
|
|
|
/* ConfirmDialog */
|
|
|
|
.p-confirmdialog {
|
|
|
|
width: 30em;
|
|
|
|
}
|
|
|
|
.p-confirmdialog.p-dialog .p-dialog-content {
|
|
|
|
padding: 1em 2em;
|
|
|
|
}
|
|
|
|
.p-confirmdialog .p-dialog-content .p-confirmdialog-icon {
|
|
|
|
font-size: 1.5em;
|
|
|
|
vertical-align: middle;
|
|
|
|
margin-right: .5em;
|
|
|
|
}
|
|
|
|
.p-confirmdialog .p-dialog-content .p-confirmdialog-message {
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
/* Fluid */
|
|
|
|
.p-fluid .p-dialog-footer .p-button {
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
/* RTL */
|
|
|
|
.p-rtl .p-dialog .p-dialog-titlebar-close {
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
.p-rtl .p-dialog .p-dialog-footer {
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
@media screen and (max-width: 40em) {
|
|
|
|
.p-confirmdialog {
|
|
|
|
width: 90%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Animation */
|
2020-02-04 07:46:11 +00:00
|
|
|
/* Center */
|
2019-05-25 21:13:31 +00:00
|
|
|
.p-dialog-enter-active {
|
|
|
|
transition: all 150ms cubic-bezier(0, 0, 0.2, 1);
|
|
|
|
}
|
|
|
|
.p-dialog-leave-active {
|
2020-01-30 08:05:19 +00:00
|
|
|
transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
|
|
|
.p-dialog-enter,
|
|
|
|
.p-dialog-leave-to {
|
|
|
|
opacity: 0;
|
2020-01-23 08:27:24 +00:00
|
|
|
transform: scale(0.7);
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
2020-02-04 07:46:11 +00:00
|
|
|
/* Top, Bottom, Left, Right, Top* and Bottom* */
|
|
|
|
.p-dialog-top .p-dialog,
|
|
|
|
.p-dialog-bottom .p-dialog,
|
|
|
|
.p-dialog-left .p-dialog,
|
|
|
|
.p-dialog-right .p-dialog,
|
2020-02-06 11:57:20 +00:00
|
|
|
.p-dialog-topleft .p-dialog,
|
|
|
|
.p-dialog-topright .p-dialog,
|
|
|
|
.p-dialog-bottomleft .p-dialog,
|
|
|
|
.p-dialog-bottomright .p-dialog {
|
2020-02-04 07:46:11 +00:00
|
|
|
margin: .75em;
|
|
|
|
transform: translate3d(0px, 0px, 0px);
|
|
|
|
}
|
|
|
|
.p-dialog-top .p-dialog-enter-active,
|
|
|
|
.p-dialog-top .p-dialog-leave-active,
|
|
|
|
.p-dialog-bottom .p-dialog-enter-active,
|
|
|
|
.p-dialog-bottom .p-dialog-leave-active,
|
|
|
|
.p-dialog-left .p-dialog-enter-active,
|
|
|
|
.p-dialog-left .p-dialog-leave-active,
|
|
|
|
.p-dialog-right .p-dialog-enter-active,
|
|
|
|
.p-dialog-right .p-dialog-leave-active,
|
2020-02-06 11:57:20 +00:00
|
|
|
.p-dialog-topleft .p-dialog-enter-active,
|
|
|
|
.p-dialog-topleft .p-dialog-leave-active,
|
|
|
|
.p-dialog-topright .p-dialog-enter-active,
|
|
|
|
.p-dialog-topright .p-dialog-leave-active,
|
|
|
|
.p-dialog-bottomleft .p-dialog-enter-active,
|
|
|
|
.p-dialog-bottomleft .p-dialog-leave-active,
|
|
|
|
.p-dialog-bottomright .p-dialog-enter-active,
|
|
|
|
.p-dialog-bottomright .p-dialog-leave-active {
|
2020-02-04 07:46:11 +00:00
|
|
|
transition: all .3s ease-out;
|
|
|
|
}
|
|
|
|
.p-dialog-top .p-dialog-enter,
|
|
|
|
.p-dialog-top .p-dialog-leave-to {
|
|
|
|
transform: translate3d(0px, -100%, 0px);
|
|
|
|
}
|
|
|
|
.p-dialog-bottom .p-dialog-enter,
|
|
|
|
.p-dialog-bottom .p-dialog-leave-to {
|
|
|
|
transform: translate3d(0px, 100%, 0px);
|
|
|
|
}
|
|
|
|
.p-dialog-left .p-dialog-enter,
|
|
|
|
.p-dialog-left .p-dialog-leave-to,
|
2020-02-06 11:57:20 +00:00
|
|
|
.p-dialog-topleft .p-dialog-enter,
|
|
|
|
.p-dialog-topleft .p-dialog-leave-to,
|
|
|
|
.p-dialog-bottomleft .p-dialog-enter,
|
|
|
|
.p-dialog-bottomleft .p-dialog-leave-to {
|
2020-02-04 07:46:11 +00:00
|
|
|
transform: translate3d(-100%, 0px, 0px);
|
|
|
|
}
|
|
|
|
.p-dialog-right .p-dialog-enter,
|
|
|
|
.p-dialog-right .p-dialog-leave-to,
|
2020-02-06 11:57:20 +00:00
|
|
|
.p-dialog-topright .p-dialog-enter,
|
|
|
|
.p-dialog-topright .p-dialog-leave-to,
|
|
|
|
.p-dialog-bottomright .p-dialog-enter,
|
|
|
|
.p-dialog-bottomright .p-dialog-leave-to {
|
2020-02-04 07:46:11 +00:00
|
|
|
transform: translate3d(100%, 0px, 0px);
|
|
|
|
}
|
2019-05-25 21:13:31 +00:00
|
|
|
/* Maximize */
|
|
|
|
.p-dialog-maximized {
|
|
|
|
-webkit-transition: none;
|
|
|
|
transition: none;
|
|
|
|
transform: none;
|
|
|
|
width: 100vw !important;
|
2020-01-23 08:39:52 +00:00
|
|
|
max-height: 100%;
|
2020-02-03 09:08:54 +00:00
|
|
|
height: 100%;
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
|
|
|
.p-dialog-maximized .p-dialog-content {
|
2020-02-03 09:08:54 +00:00
|
|
|
flex-grow: 1;
|
2019-05-25 21:13:31 +00:00
|
|
|
}
|
2020-02-03 12:18:00 +00:00
|
|
|
|
|
|
|
/* Position */
|
|
|
|
.p-dialog-left {
|
|
|
|
justify-content: flex-start;
|
|
|
|
}
|
|
|
|
.p-dialog-right {
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
|
|
|
.p-dialog-top {
|
|
|
|
align-items: flex-start;
|
|
|
|
}
|
2020-02-07 12:54:20 +00:00
|
|
|
.p-dialog-topleft {
|
2020-02-03 12:18:00 +00:00
|
|
|
justify-content: flex-start;
|
|
|
|
align-items: flex-start;
|
|
|
|
}
|
2020-02-07 12:54:20 +00:00
|
|
|
.p-dialog-topright {
|
2020-02-03 12:18:00 +00:00
|
|
|
justify-content: flex-end;
|
|
|
|
align-items: flex-start;
|
|
|
|
}
|
|
|
|
.p-dialog-bottom {
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
2020-02-07 12:54:20 +00:00
|
|
|
.p-dialog-bottomleft {
|
2020-02-03 12:18:00 +00:00
|
|
|
justify-content: flex-start;
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
2020-02-07 12:54:20 +00:00
|
|
|
.p-dialog-bottomright {
|
2020-02-03 12:18:00 +00:00
|
|
|
justify-content: flex-end;
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
2020-01-17 13:27:16 +00:00
|
|
|
</style>
|