@zywave/zui-dialog
Advanced tools
Comparing version 4.0.4-pre.4 to 4.0.4
@@ -6,2 +6,10 @@ # Change Log | ||
## [4.0.4](https://gitlab.zywave.com/zui/zui/compare/@zywave/zui-dialog@4.0.4-pre.4...@zywave/zui-dialog@4.0.4) (2019-07-29) | ||
**Note:** Version bump only for package @zywave/zui-dialog | ||
## [4.0.3](https://gitlab.zywave.com/zui/zui/compare/@zywave/zui-dialog@4.0.3-pre.6...@zywave/zui-dialog@4.0.3) (2019-07-12) | ||
@@ -8,0 +16,0 @@ |
import { IronOverlayBehavior } from '@polymer/iron-overlay-behavior/iron-overlay-behavior'; | ||
import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class'; | ||
export const ZuiDialogBehaviorMixin = superClass => { | ||
export var ZuiDialogBehaviorMixin = superClass => { | ||
return class extends mixinBehaviors(IronOverlayBehavior, superClass) { | ||
@@ -35,3 +35,3 @@ static get properties() { | ||
}); | ||
const body = document.querySelector('body'); | ||
var body = document.querySelector('body'); | ||
this.addEventListener('opened-changed', e => { | ||
@@ -52,3 +52,3 @@ body.style.overflow = e.detail.value ? 'hidden' : 'auto'; | ||
_onDialogClick(event) { | ||
const path = event.path || event.composedPath && event.composedPath(); | ||
var path = event.path || event.composedPath && event.composedPath(); | ||
@@ -59,7 +59,7 @@ if (path.indexOf(this) === 0 && !this.noCancelOnOutsideClick) { | ||
} else { | ||
for (let i = 0, l = path.indexOf(this); i < l; i++) { | ||
const target = path[i]; | ||
for (var i = 0, l = path.indexOf(this); i < l; i++) { | ||
var target = path[i]; | ||
if (target.hasAttribute && (target.hasAttribute('dialog-close') || target.hasAttribute('dialog-confirm'))) { | ||
const isConfirm = target.hasAttribute('dialog-confirm'); | ||
var isConfirm = target.hasAttribute('dialog-confirm'); | ||
isConfirm ? this.close() : this.cancel(); | ||
@@ -66,0 +66,0 @@ event.stopPropagation(); |
@@ -15,8 +15,8 @@ export class ZuiDialogController { | ||
show() { | ||
let header = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '<h1>Header goes here</h1>'; | ||
let content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '<p>Content goes here</p>'; | ||
let footer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '<zui-button class="secondary" dialog-close>Close</zui-button><zui-button dialog-confirm>Submit</zui-button>'; | ||
let size = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'medium'; | ||
let noCancelOutsideDialog = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
const dialog = document.createElement('zui-dialog'); | ||
var header = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '<h1>Header goes here</h1>'; | ||
var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '<p>Content goes here</p>'; | ||
var footer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '<zui-button class="secondary" dialog-close>Close</zui-button><zui-button dialog-confirm>Submit</zui-button>'; | ||
var size = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'medium'; | ||
var noCancelOutsideDialog = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
var dialog = document.createElement('zui-dialog'); | ||
@@ -28,3 +28,3 @@ if (noCancelOutsideDialog) { | ||
dialog.classList.add(size); | ||
let innards = ''; | ||
var innards = ''; | ||
innards += "<div slot=\"header\">".concat(header, "</div>"); | ||
@@ -31,0 +31,0 @@ innards += "<div slot=\"content\">".concat(content, "</div>"); |
function _templateObject() { | ||
const data = _taggedTemplateLiteral(["\n <style>\n :host{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;z-index:6000;flex-direction:column;align-items:center;overflow-x:hidden;overflow-y:auto;padding:2.25rem;box-sizing:border-box}:host .wrapper{padding:20px;transition:200ms padding ease-in-out;box-sizing:border-box;position:relative;display:block;width:100%;margin:auto;background-color:#fff;box-shadow:rgba(0,0,0,0.14) 0 16px 24px 2px,rgba(0,0,0,0.12) 0 6px 30px 5px,rgba(0,0,0,0.4) 0 8px 10px -5px}@media (min-width: 80em){:host .wrapper{padding:30px}}:host .wrapper .close{position:absolute;top:-2.25rem;right:-2.25rem;display:block;width:2.625rem;height:2.625rem;margin:0;padding:0;background-color:transparent;border:0;cursor:pointer;color:#fff;transition:0.2s}:host .wrapper .close button{display:flex;width:100%;height:100%;justify-content:center;align-items:center;margin:0;padding:0;background-color:transparent;border:0;border-radius:50%;font:inherit;cursor:pointer;color:#fff;transition:background 100ms ease-out, color 100ms ease-out}:host .wrapper .close button:hover{background-color:var(--zui-gray-100);color:var(--zui-gray)}:host .wrapper .close button:focus{background-color:var(--zui-gray-100);outline:none;color:var(--zui-gray)}:host .wrapper .close button zui-icon{--zui-icon-size: 1rem}:host .wrapper .header{margin:0 0 0.9375rem}:host .wrapper .content{max-height:10000px;min-height:7.5rem;transition:height 1s cubic-bezier(0.25, 0.8, 0.25, 1)}:host .wrapper .footer{display:flex;width:100%;justify-content:flex-end;margin-top:1.875rem}:host ::slotted([slot='footer']){display:flex;width:100%;justify-content:flex-end}:host(.small) .wrapper{max-width:29.6875rem}:host(.medium) .wrapper{max-width:42.1875rem}:host(.large) .wrapper{max-width:54.6875rem}:host(.full) .wrapper{max-width:none}:host([hide-backdrop]) .close button{border-radius:30px}:host([hide-backdrop]) .close button zui-icon{color:var(--zui-gray-600)}:host([hide-backdrop]) .close button:hover{transition:0.2s}\n </style>\n <div id=\"wrapper\" class=\"wrapper\">\n <div class=\"close\">\n <button id=\"close\" aria-label=\"close\">\n <zui-icon icon=\"zui-close\"></zui-icon>\n </button>\n </div>\n <div class=\"header\"><slot name=\"header\"></slot></div>\n <div class=\"content\"><slot name=\"content\"></slot></div>\n <div class=\"footer\"><slot name=\"footer\"></slot></div>\n <slot></slot>\n </div>\n "]); | ||
var data = _taggedTemplateLiteral(["\n <style>\n :host{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;z-index:6000;flex-direction:column;align-items:center;overflow-x:hidden;overflow-y:auto;padding:2.25rem;box-sizing:border-box}:host .wrapper{padding:20px;transition:200ms padding ease-in-out;box-sizing:border-box;position:relative;display:block;width:100%;margin:auto;background-color:#fff;box-shadow:rgba(0,0,0,0.14) 0 16px 24px 2px,rgba(0,0,0,0.12) 0 6px 30px 5px,rgba(0,0,0,0.4) 0 8px 10px -5px}@media (min-width: 80em){:host .wrapper{padding:30px}}:host .wrapper .close{position:absolute;top:-2.25rem;right:-2.25rem;display:block;width:2.625rem;height:2.625rem;margin:0;padding:0;background-color:transparent;border:0;cursor:pointer;color:#fff;transition:0.2s}:host .wrapper .close button{display:flex;width:100%;height:100%;justify-content:center;align-items:center;margin:0;padding:0;background-color:transparent;border:0;border-radius:50%;font:inherit;cursor:pointer;color:#fff;transition:background 100ms ease-out, color 100ms ease-out}:host .wrapper .close button:hover{background-color:var(--zui-gray-100);color:var(--zui-gray)}:host .wrapper .close button:focus{background-color:var(--zui-gray-100);outline:none;color:var(--zui-gray)}:host .wrapper .close button zui-icon{--zui-icon-size: 1rem}:host .wrapper .header{margin:0 0 0.9375rem}:host .wrapper .content{max-height:10000px;min-height:7.5rem;transition:height 1s cubic-bezier(0.25, 0.8, 0.25, 1)}:host .wrapper .footer{display:flex;width:100%;justify-content:flex-end;margin-top:1.875rem}:host ::slotted([slot='footer']){display:flex;width:100%;justify-content:flex-end}:host(.small) .wrapper{max-width:29.6875rem}:host(.medium) .wrapper{max-width:42.1875rem}:host(.large) .wrapper{max-width:54.6875rem}:host(.full) .wrapper{max-width:none}:host([hide-backdrop]) .close button{border-radius:30px}:host([hide-backdrop]) .close button zui-icon{color:var(--zui-gray-600)}:host([hide-backdrop]) .close button:hover{transition:0.2s}\n </style>\n <div id=\"wrapper\" class=\"wrapper\">\n <div class=\"close\">\n <button id=\"close\" aria-label=\"close\">\n <zui-icon icon=\"zui-close\"></zui-icon>\n </button>\n </div>\n <div class=\"header\"><slot name=\"header\"></slot></div>\n <div class=\"content\"><slot name=\"content\"></slot></div>\n <div class=\"footer\"><slot name=\"footer\"></slot></div>\n <slot></slot>\n </div>\n "]); | ||
@@ -4,0 +4,0 @@ _templateObject = function _templateObject() { |
{ | ||
"name": "@zywave/zui-dialog", | ||
"version": "4.0.4-pre.4", | ||
"version": "4.0.4", | ||
"main": "dist/index.js", | ||
@@ -10,4 +10,4 @@ "module": "dist/index.js", | ||
"@polymer/polymer": "3.2.0", | ||
"@zywave/zui-base": "^4.0.3-pre.2", | ||
"@zywave/zui-icons": "^4.0.4-pre.4" | ||
"@zywave/zui-base": "^4.0.3", | ||
"@zywave/zui-icons": "^4.0.4" | ||
}, | ||
@@ -43,3 +43,3 @@ "scripts": { | ||
}, | ||
"gitHead": "dd920ac1aa7f159f720d3a047e2dc6a6195e3866" | ||
"gitHead": "05e8a244fb337e164f69c14cf57e6af21373f18e" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
34180
17
Updated@zywave/zui-base@^4.0.3
Updated@zywave/zui-icons@^4.0.4