@creaditor/newsletter-starterkit
Version:
Creaditor Newsletter Editor - Starterkit for creating beautiful email newsletters
236 lines (210 loc) • 9.07 kB
JavaScript
/*! For license information please see 1410.creaditor.bundle.js.LICENSE.txt */
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1410],{71933:(e,a,p)=>{p.d(a,{j:()=>l,n:()=>r});p(94002);var t=p(73114),i=p(93273),o=p(82279);const l={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){t.$._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){t.$._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},r=[t.P,i.a,o.o,l]},82279:(e,a,p)=>{p.d(a,{o:()=>o});p(94002),p(34790);var t=p(73114),i=p(3572);const o={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){t.$._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var a=this._rippleContainer||this.root;if(a&&(0,i.vz)(a).appendChild(this._ripple),e){var p=(0,i.vz)(this._rippleContainer||this),t=(0,i.vz)(e).rootTarget;p.deepContains(t)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}}},37939:(e,a,p)=>{p(94002),p(72202);const t=p(24931).d`
<dom-module id="paper-material-styles">
<template>
<style>
html {
--paper-material: {
display: block;
position: relative;
};
--paper-material-elevation-1: {
@apply --shadow-elevation-2dp;
};
--paper-material-elevation-2: {
@apply --shadow-elevation-4dp;
};
--paper-material-elevation-3: {
@apply --shadow-elevation-6dp;
};
--paper-material-elevation-4: {
@apply --shadow-elevation-8dp;
};
--paper-material-elevation-5: {
@apply --shadow-elevation-16dp;
};
}
.paper-material {
@apply --paper-material;
}
.paper-material[elevation="1"] {
@apply --paper-material-elevation-1;
}
.paper-material[elevation="2"] {
@apply --paper-material-elevation-2;
}
.paper-material[elevation="3"] {
@apply --paper-material-elevation-3;
}
.paper-material[elevation="4"] {
@apply --paper-material-elevation-4;
}
.paper-material[elevation="5"] {
@apply --paper-material-elevation-5;
}
/* Duplicate the styles because of https://github.com/webcomponents/shadycss/issues/193 */
:host {
--paper-material: {
display: block;
position: relative;
};
--paper-material-elevation-1: {
@apply --shadow-elevation-2dp;
};
--paper-material-elevation-2: {
@apply --shadow-elevation-4dp;
};
--paper-material-elevation-3: {
@apply --shadow-elevation-6dp;
};
--paper-material-elevation-4: {
@apply --shadow-elevation-8dp;
};
--paper-material-elevation-5: {
@apply --shadow-elevation-16dp;
};
}
:host(.paper-material) {
@apply --paper-material;
}
:host(.paper-material[elevation="1"]) {
@apply --paper-material-elevation-1;
}
:host(.paper-material[elevation="2"]) {
@apply --paper-material-elevation-2;
}
:host(.paper-material[elevation="3"]) {
@apply --paper-material-elevation-3;
}
:host(.paper-material[elevation="4"]) {
@apply --paper-material-elevation-4;
}
:host(.paper-material[elevation="5"]) {
@apply --paper-material-elevation-5;
}
</style>
</template>
</dom-module>`;t.setAttribute("style","display: none;"),document.head.appendChild(t.content)},72202:(e,a,p)=>{p(94002);const t=p(24931).d`
<custom-style>
<style is="custom-style">
html {
--shadow-transition: {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
};
--shadow-none: {
box-shadow: none;
};
/* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
--shadow-elevation-2dp: {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
};
--shadow-elevation-3dp: {
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
0 1px 8px 0 rgba(0, 0, 0, 0.12),
0 3px 3px -2px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-4dp: {
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
0 1px 10px 0 rgba(0, 0, 0, 0.12),
0 2px 4px -1px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-6dp: {
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
0 1px 18px 0 rgba(0, 0, 0, 0.12),
0 3px 5px -1px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-8dp: {
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12),
0 5px 5px -3px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-12dp: {
box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
0 4px 22px 3px rgba(0, 0, 0, 0.12),
0 6px 7px -4px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-16dp: {
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
0 6px 30px 5px rgba(0, 0, 0, 0.12),
0 8px 10px -5px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-24dp: {
box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
0 9px 46px 8px rgba(0, 0, 0, 0.12),
0 11px 15px -7px rgba(0, 0, 0, 0.4);
};
}
</style>
</custom-style>`;t.setAttribute("style","display: none;"),document.head.appendChild(t.content)},1410:(e,a,p)=>{p.r(a);p(41674),p(37939);var t=p(71933),i=p(50696);const o=p(94002).dy` <style include="paper-material-styles">
/* Need to specify the same specificity as the styles imported from paper-material. */
:host {
@apply --layout-inline;
@apply --layout-center-center;
position: relative;
box-sizing: border-box;
min-width: 2.14em;
margin: 0 0.29em;
background: transparent;
font-size: 14px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
font: inherit;
text-transform: none;
outline-width: 0;
border-radius: 3px;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: pointer;
z-index: 0;
padding: 0.3em 0.47em;
@apply --paper-font-common-base;
@apply --paper-button;
}
:host([elevation="1"]) {
@apply --paper-material-elevation-1;
}
:host([elevation="2"]) {
@apply --paper-material-elevation-2;
}
:host([elevation="3"]) {
@apply --paper-material-elevation-3;
}
:host([elevation="4"]) {
@apply --paper-material-elevation-4;
}
:host([elevation="5"]) {
@apply --paper-material-elevation-5;
}
:host([hidden]) {
display: none ;
}
:host([raised].keyboard-focus) {
font-weight: bold;
@apply --paper-button-raised-keyboard-focus;
}
:host(:not([raised]).keyboard-focus) {
font-weight: bold;
@apply --paper-button-flat-keyboard-focus;
}
:host([disabled]) {
background: none;
color: #a8a8a8;
cursor: auto;
pointer-events: none;
@apply --paper-button-disabled;
}
:host([disabled][raised]) {
background: #eaeaea;
}
:host([animated]) {
@apply --shadow-transition;
}
paper-ripple {
color: var(--paper-button-ink-color);
}
</style>
<slot></slot>`;o.setAttribute("strip-whitespace",""),window.customElements.get("paper-button")||(0,i.k)({_template:o,is:"paper-button",behaviors:[t.n],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?t.j._calculateElevation.apply(this):this._setElevation(0)}})}}]);