UNPKG

@creaditor/newsletter-starterkit

Version:

Creaditor Newsletter Editor - Starterkit for creating beautiful email newsletters

14 lines 1.87 kB
/*! For license information please see 5848.creaditor.bundle.js.LICENSE.txt */ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5848],{95848:(t,e,s)=>{s.r(e),s.d(e,{TitleEditor:()=>i});var n=s(56666),r=s(21293),o=s(3959);class i extends r.oi{constructor(){super(),this.pb="6px"}render(){const t={fontWeight:this.bold?700:400,paddingBottom:this.pb};return r.dy`<span style=${(0,o.V)(t)}><slot></slot></span>`}}(0,n.Z)(i,"styles",r.iv` :host { display: block; font-size: 13px; font-weight: 500; color: var(--text-dark-color); font-family: var(--font-family); -webkit-font-smoothing: antialiased; text-align: var(--text-align-locale); direction: var(--direction-locale); user-select: none; } `),(0,n.Z)(i,"properties",{bold:{type:Boolean},pb:{type:String}}),customElements.define("cdtr-title",i)},3959:(t,e,s)=>{s.d(e,{V:()=>l});var n=s(33692),r=s(50875);const o="important",i=" !"+o,l=(0,r.XM)(class extends r.Xe{constructor(t){if(super(t),t.type!==r.pX.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const n=t[s];return null==n?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const n=e[t];if(null!=n){this.ft.add(t);const e="string"==typeof n&&n.endsWith(i);t.includes("-")||e?s.setProperty(t,e?n.slice(0,-11):n,e?o:""):s[t]=n}}return n.Jb}})}}]);