diff --git a/src/AppMenu.vue b/src/AppMenu.vue index e0005411a..8838527a3 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -76,7 +76,7 @@
- ● Link + ● Dialog
diff --git a/src/assets/styles/primevue.css b/src/assets/styles/primevue.css index 7334ecd3d..7c6aa67ac 100644 --- a/src/assets/styles/primevue.css +++ b/src/assets/styles/primevue.css @@ -5,6 +5,7 @@ @import '../../components/card/Card.css'; @import '../../components/checkbox/Checkbox.css'; @import '../../components/chips/Chips.css'; +@import '../../components/dialog/Dialog.css'; @import '../../components/dropdown/Dropdown.css'; @import '../../components/fieldset/Fieldset.css'; @import '../../components/inputtext/InputText.css'; diff --git a/src/components/common/Common.css b/src/components/common/Common.css index 4570bbaa5..8415467bd 100644 --- a/src/components/common/Common.css +++ b/src/components/common/Common.css @@ -86,7 +86,7 @@ button { .p-link { text-align: left; - background: transparent; + background-color: transparent; margin: 0; padding: 0; border: none; diff --git a/src/components/dialog/Dialog.css b/src/components/dialog/Dialog.css new file mode 100644 index 000000000..5d8107755 --- /dev/null +++ b/src/components/dialog/Dialog.css @@ -0,0 +1,134 @@ +.p-dialog { + position: fixed; + padding: 0; + top: 50%; + left: 50%; + transform: translateX(-50%) translateY(-50%); +} +.p-dialog-visible { + display: block; +} +.p-dialog .p-dialog-titlebar { + padding: .5em .75em; + position: relative; + border: 0; +} +.p-dialog .p-dialog-content { + position: relative; + border: 0; + padding: .5em .75em; + background: none; + zoom: 1; +} +.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; +} + +.p-dialog-mask { + position: fixed; + width: 100%; + height: 100%; +} + +/* 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 */ +.p-dialog-enter, +.p-dialog-leave-to { + opacity: 0; + transform: translate3d(-50%, -25%, 0) scale(0.9); +} + +.p-dialog-enter-active, +.p-dialog-leave-active { + + transition: all 400ms cubic-bezier(0.25, 0.8, 0.25, 1); +} + +/* Maximize */ +.p-dialog-maximized { + -webkit-transition: none; + transition: none; + transform: none; + width: 100vw !important; + top: 0; + left: 0; +} + +.p-dialog-maximized .p-dialog-content { + -webkit-transition: height .3s; + transition: height .3s; +} \ No newline at end of file diff --git a/src/components/dialog/Dialog.vue b/src/components/dialog/Dialog.vue new file mode 100644 index 000000000..a5298da8d --- /dev/null +++ b/src/components/dialog/Dialog.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/main.js b/src/main.js index 3196ee876..8a5e13233 100644 --- a/src/main.js +++ b/src/main.js @@ -9,6 +9,7 @@ import Card from './components/card/Card'; import Chart from './components/chart/Chart'; import Checkbox from './components/checkbox/Checkbox'; import Chips from './components/chips/Chips'; +import Dialog from './components/dialog/Dialog'; import Dropdown from './components/dropdown/Dropdown'; import Editor from './components/editor/Editor'; import FullCalendar from './components/fullcalendar/FullCalendar'; @@ -46,6 +47,7 @@ Vue.component('Card', Card); Vue.component('Chart', Chart); Vue.component('Checkbox', Checkbox); Vue.component('Chips', Chips); +Vue.component('Dialog', Dialog); Vue.component('Dropdown', Dropdown); Vue.component('Editor', Editor); Vue.component('FullCalendar', FullCalendar); diff --git a/src/router.js b/src/router.js index 0bb3e7227..ca80fa28c 100644 --- a/src/router.js +++ b/src/router.js @@ -81,6 +81,11 @@ export default new Router({ name: 'chips', component: () => import('./views/chips/ChipsDemo.vue') }, + { + path: '/dialog', + name: 'dialog', + component: () => import('./views/dialog/DialogDemo.vue') + }, { path: '/dropdown', name: 'dropdown', diff --git a/src/views/dialog/DialogDemo.vue b/src/views/dialog/DialogDemo.vue new file mode 100644 index 000000000..5b6d74bcc --- /dev/null +++ b/src/views/dialog/DialogDemo.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file