@creaditor/newsletter-starterkit 1.0.55 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5340],{12258(e,t,o){o.d(t,{A:()=>c});var n=o(59929),s=o(40648);class i extends n.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,s.Q)(this.persistKey,this.open)}render(){return n.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5340],{12258(e,t,o){o.d(t,{A:()=>r});var n=o(59929),s=o(40648);class i extends n.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,s.Q)(this.persistKey,this.open)}render(){return n.qy`
2
2
  <div class="section">
3
3
  <div class="header" @click=${this.toggle}>
4
4
  <span class="title"><lang-text text="${this.label}"></lang-text></span>
@@ -19,37 +19,37 @@
19
19
  --editor-container-inline-padding: 0;
20
20
  }
21
21
  .section {
22
- border-bottom: 1px solid #eaeaee;
22
+ border-bottom: 1px solid var(--color-border);
23
23
  }
24
24
  .header {
25
25
  display: flex;
26
26
  align-items: center;
27
27
  justify-content: space-between;
28
- padding: 12px 16px;
28
+ padding: var(--space-3) var(--space-4);
29
29
  cursor: pointer;
30
30
  user-select: none;
31
31
  }
32
32
  .title {
33
- font-size: 12.5px;
33
+ font-size: var(--text-md);
34
34
  font-weight: 600;
35
- color: #222;
35
+ color: var(--color-text);
36
36
  letter-spacing: 0.01em;
37
37
  }
38
38
  .chevron {
39
39
  width: 16px;
40
40
  height: 16px;
41
- transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
42
- color: #ccc;
41
+ transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
42
+ color: var(--color-text-faint);
43
43
  }
44
44
  .header:hover .chevron {
45
- color: #888;
45
+ color: var(--color-text-muted);
46
46
  }
47
47
  .chevron.open {
48
48
  transform: rotate(180deg);
49
49
  }
50
50
  .content {
51
51
  overflow: hidden;
52
- transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
52
+ transition: max-height var(--duration-normal) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
53
53
  max-height: 0;
54
54
  opacity: 0;
55
55
  }
@@ -58,9 +58,9 @@
58
58
  opacity: 1;
59
59
  }
60
60
  .content-inner {
61
- padding: 0 16px 12px 16px;
61
+ padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
62
62
  }
63
- `,i.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const c=(e,t)=>n.qy`
63
+ `,i.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const r=(e,t)=>n.qy`
64
64
  <cdtr-editor-section
65
65
  .label=${e.label}
66
66
  .open=${!1!==e.open}
@@ -68,28 +68,28 @@
68
68
  >
69
69
  ${t}
70
70
  </cdtr-editor-section>
71
- `},40648(e,t,o){o.d(t,{Q:()=>c,i:()=>i});const n="cdtr:section-open";function s(){try{const e=localStorage.getItem(n);return e?JSON.parse(e):{}}catch(e){return{}}}function i(e){if(!e)return;const t=s();return Object.prototype.hasOwnProperty.call(t,e)?!!t[e]:void 0}function c(e,t){if(!e)return;const o=s();o[e]=!!t,function(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}}(o)}},45340(e,t,o){o.r(t),o.d(t,{SettingEditor:()=>r});var n=o(59929),s=o(86319),i=o(36565),c=(o(12258),o(79307));class r extends n.WF{constructor(){super(),this.onInspect=this.onInspect.bind(this),this.name="",this.element_ID=" ",this.cmds={onToggleDisplayMode:(e,t)=>{i.Ay.store().execCommand(`show_on_${e}`,t),this[`show_on_${e}`]=t},onChangeElementID(e){i.Ay.store().execCommand("element_ID",e.target.value)},onChangeName(e){i.Ay.store().execCommand("name",e.target.value)}}}onInspect(){if(i.Ay.components.length>0){const e=i.Ay.components[0].props;this.show_on_desktop=!!e.show_on_desktop,this.show_on_tablet=!!e.show_on_tablet,this.show_on_mobile=!!e.show_on_mobile,this.name=e.name||"",this.element_ID=e.element_ID||""}}connectedCallback(){super.connectedCallback(),i.Ay.on("select",this.onInspect),i.Ay.on("update",this.onInspect),this.onInspect()}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("select",this.onInspect),i.Ay.off("update",this.onInspect)}render(){const e="block"===i.Ay.getSelectedComponent()[0].type,t="web"===s.M.get("config","channel");return n.qy`
71
+ `},40648(e,t,o){o.d(t,{Q:()=>r,i:()=>i});const n="cdtr:section-open";function s(){try{const e=localStorage.getItem(n);return e?JSON.parse(e):{}}catch(e){return{}}}function i(e){if(!e)return;const t=s();return Object.prototype.hasOwnProperty.call(t,e)?!!t[e]:void 0}function r(e,t){if(!e)return;const o=s();o[e]=!!t,function(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}}(o)}},45340(e,t,o){o.r(t),o.d(t,{SettingEditor:()=>a});var n=o(59929),s=o(86319),i=o(36565),r=(o(12258),o(79307));class a extends n.WF{constructor(){super(),this.onInspect=this.onInspect.bind(this),this.name="",this.element_ID=" ",this.cmds={onToggleDisplayMode:(e,t)=>{i.Ay.store().execCommand(`show_on_${e}`,t),this[`show_on_${e}`]=t},onChangeElementID(e){i.Ay.store().execCommand("element_ID",e.target.value)},onChangeName(e){i.Ay.store().execCommand("name",e.target.value)}}}onInspect(){if(i.Ay.components.length>0){const e=i.Ay.components[0].props;this.show_on_desktop=!!e.show_on_desktop,this.show_on_tablet=!!e.show_on_tablet,this.show_on_mobile=!!e.show_on_mobile,this.name=e.name||"",this.element_ID=e.element_ID||""}}connectedCallback(){super.connectedCallback(),i.Ay.on("select",this.onInspect),i.Ay.on("update",this.onInspect),this.onInspect()}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("select",this.onInspect),i.Ay.off("update",this.onInspect)}render(){const e="block"===i.Ay.getSelectedComponent()[0].type,t="web"===s.M.get("config","channel");return n.qy`
72
72
  ${e&&t?n.qy`<cdtr-editor-section label="display_mode" .open=${!0}>
73
73
  <div class="device-toggle-row">
74
74
  <div
75
75
  class="device-toggle-btn ${this.show_on_desktop?"active":""}"
76
76
  @click=${()=>this.cmds.onToggleDisplayMode("desktop",!this.show_on_desktop)}
77
77
  >
78
- <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${c.oe}</svg>
78
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${r.oe}</svg>
79
79
  <lang-text text="desktop"></lang-text>
80
80
  </div>
81
81
  <div
82
82
  class="device-toggle-btn ${this.show_on_tablet?"active":""}"
83
83
  @click=${()=>this.cmds.onToggleDisplayMode("tablet",!this.show_on_tablet)}
84
84
  >
85
- <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${c.kN}</svg>
85
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${r.kN}</svg>
86
86
  <lang-text text="tablet"></lang-text>
87
87
  </div>
88
88
  <div
89
89
  class="device-toggle-btn ${this.show_on_mobile?"active":""}"
90
90
  @click=${()=>this.cmds.onToggleDisplayMode("mobile",!this.show_on_mobile)}
91
91
  >
92
- <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${c.S9}</svg>
92
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${r.S9}</svg>
93
93
  <lang-text text="mobile"></lang-text>
94
94
  </div>
95
95
  </div>
@@ -120,7 +120,7 @@
120
120
  ></cdtr-input>
121
121
  </cdtr-row>
122
122
  </cdtr-editor-section>
123
- `}}r.properties={name:{},element_ID:{},show_on_desktop:{},show_on_tablet:{},show_on_mobile:{}},r.styles=n.AH`
123
+ `}}a.properties={name:{},element_ID:{},show_on_desktop:{},show_on_tablet:{},show_on_mobile:{}},a.styles=n.AH`
124
124
  :host {
125
125
  direction: var(--direction-locale);
126
126
  }
@@ -153,4 +153,4 @@
153
153
  background: color-mix(in srgb, var(--accent, #5B5FC7) 12%, transparent);
154
154
  color: var(--accent, #5B5FC7);
155
155
  }
156
- `,customElements.define("cdtr-setting-editor",r)}}]);
156
+ `,customElements.define("cdtr-setting-editor",a)}}]);
Binary file
@@ -25,21 +25,25 @@
25
25
  cdtr-editor-tab-item:focus {
26
26
  outline: none;
27
27
  }
28
+ cdtr-editor-tab-item:focus-visible {
29
+ outline: none;
30
+ box-shadow: var(--focus-ring-inset, inset 0 0 0 2px #6366f1);
31
+ }
28
32
  cdtr-editor-tab-item {
29
33
  width: 100%;
30
34
  }
31
35
  .icon-tabs {
32
- padding: 10px 0;
33
- background: #fafafa;
36
+ padding: var(--space-3, 12px) 0;
37
+ background: var(--color-bg-subtle, #fafafa);
34
38
  width: 52px;
35
39
  height: 100%;
36
40
  min-height: 400px;
37
- border-left: 1px solid #eaeaee;
41
+ border-left: 1px solid var(--color-border, #eaeaee);
38
42
  direction: ltr;
39
43
  display: flex;
40
44
  flex-direction: column;
41
45
  align-items: center;
42
- gap: 2px;
46
+ gap: var(--space-1, 4px);
43
47
  }
44
48
 
45
49
  .main {
@@ -51,6 +55,6 @@
51
55
  overflow-x: hidden;
52
56
  max-height: calc(100vh - 130px);
53
57
  min-height: 80%;
54
- padding-top: 12px;
58
+ padding-top: var(--space-3, 12px);
55
59
  }
56
60
  `,s.properties={tabs:{type:Array},value:{type:String}},customElements.define("cdtr-editor-tabs",s)}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[752],{40752(t,i,e){e.r(i),e.d(i,{EditorContainer:()=>a});var n=e(59929);class a extends n.WF{constructor(){super(),this.pt="10px",this.isAnimate=!0}render(){return n.qy`<div
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[752],{40752(e,t,i){i.r(t),i.d(t,{EditorContainer:()=>a});var n=i(59929);class a extends n.WF{constructor(){super(),this.pt="10px",this.isAnimate=!0}render(){return n.qy`<div
2
2
  style="padding-top:${this.pt}"
3
3
  class="container ${this.isAnimate?"animate":""}"
4
4
  >
@@ -12,15 +12,15 @@
12
12
  direction: var(--direction-locale);
13
13
  }
14
14
  .container {
15
- padding-inline: var(--editor-container-inline-padding, 16px);
15
+ padding-inline: var(--editor-container-inline-padding, var(--space-4, 16px));
16
16
  display: block;
17
17
  width: 100%;
18
18
  min-height: 20px;
19
- padding-bottom: 8px;
19
+ padding-bottom: var(--space-2, 8px);
20
20
  box-sizing: border-box;
21
21
  }
22
22
  .animate {
23
- animation: slide-in 0.2s ease-in-out;
23
+ animation: slide-in var(--duration-normal, 200ms) var(--ease-default, ease-in-out);
24
24
  }
25
25
  @keyframes slide-in {
26
26
  from {
Binary file
@@ -1 +1,34 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[763],{10763(e,t,n){n.d(t,{default:()=>I});var o=n(96374),a=n(86319);const i=e=>{{const{component:t,commands:n,helpers:i}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"design",selected:!0},{text:"link"},{text:"icons"},..."web"===a.M.get("config","channel")?[{text:"animations"},{text:"modal"}]:[],{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:i,changeTab:l,tabs:r}=e;const s=(a.M.get("components")||[]).filter(e=>e&&"block"===e.type&&e.props?.modalable),c=[{value:"",label:"modal_none"},...s.map((e,t)=>({value:e.id,label:e.props?.modalName||`modal ${t+1}`}))],d=t.props.modalBlockId||"",p=c.find(e=>e.value===d)?.label||"modal_none";return[{type:"heading",level:6,text:"open_modal",active:()=>"modal"===i.text},{type:"info",text:s.length?"modal_pick_hint":"modal_none_hint",active:()=>"modal"===i.text},{type:"dropdown",title:"modal_block",active:()=>"modal"===i.text,value:p,selected:d,items:c,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"settings",active:()=>"design"===i.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"design"===i.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"heading",level:6,text:"typography",active:()=>"design"===i.text},{type:"typography",active:()=>"design"===i.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const a="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:a})}}},{type:"fontFamily",active:()=>"design"===i.text,value:t.props.style.fontFamily,weight:"web"===a.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"design"===i.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"heading",level:6,text:"dimensions",active:()=>"design"===i.text},{type:"slider",title:"width",min:10,max:500,active:()=>"design"===i.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"heading",level:6,text:"colors",active:()=>"design"===i.text},{type:"colorSwatchGroup",active:()=>"design"===i.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const a=e.target.value;if(!a.includes("gradient(")){const e=(0,o.w)(t.props.style.color,a);n.execCommand("style",{color:e})}n.execCommand("style",{background:a,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"border_design",active:()=>"design"===i.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"design"===i.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"design"===i.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"design"===i.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"design"===i.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===i.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"icons"===i.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"icons"===i.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"icons"===i.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"icons"===i.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"design"===i.text},{type:"spacingPicker",active:()=>"design"===i.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,a=e.target.leftValue,i=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:a+"px",paddingRight:i+"px",padding:null})}}]}}}},l=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,a,i)=>{switch(a){case"style":return e[a]=t.deepMerge(e[a],i),!0;case"text":return e.text=i,o()||n.chain().setContent(i).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[a]=i,!0;case"onClick":if(i.link)return e[a]=i,!0}}}};var r=n(72591),s=n.n(r),c=n(88639),d=n.n(c),p=n(88128),m=n.n(p),u=n(30855),g=n.n(u),h=n(93051),A=n.n(h),y=n(49536),x={};x.setAttributes=g(),x.insert=m().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=A();s()(y.A,x);const C=y.A&&y.A.locals?y.A.locals:void 0;var b=n(81318),v=n(1366);const f=b.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,b.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var E=n(85194),k=n(28396);const B=b.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const I=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:a}=t,{arrayToString:r,mergeDiff:s}=a;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:m}=function(e){let{content:t,element:n}=e;return{element:n,editor:new b.KE({element:n,extensions:[v.A,f,k.A,E.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);return m.view.dom.setAttribute("dir","auto"),m.on("update",e=>{let{editor:t}=e;const n=t.getText();o.editor.store().updateComponent(o,"text",n)}),m.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),m.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=C.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{m.commands.insertContent(e),m.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,a=o.props.iconSize,i="icon_in_button";let l=d.querySelector(`.${i}`)||document.createElement("img");e&&t?(l.className=i,l.src=t,l.style.width=(a||16)+"px",l.style.height=(a||16)+"px",l.style.marginRight="8px",l.style.marginLeft="8px","left"===n?d.insertBefore(l,d.firstChild):d.appendChild(l)):l.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,handleBar:!0,validator:l({template:d,helpers:a,editor:m,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{m.destroy()},remove:()=>{d.remove()},createEditor:i})}}}},49536(e,t,n){n.d(t,{A:()=>r});var o=n(82001),a=n.n(o),i=n(40935),l=n.n(i)()(a());l.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),l.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const r=l}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[763],{10763(e,t,o){o.d(t,{default:()=>W});var n=o(96374),r=o(86319),l=o(59929);const a=e=>{{const{component:t,commands:o,helpers:a}=e;return{select:e=>{let{changeTab:t,tab:o}=e},tabs:e=>{const t=[{text:"design",selected:!0},{text:"styles"},{text:"link"},{text:"icons"},..."web"===r.M.get("config","channel")?[{text:"animations"},{text:"modal"}]:[],{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:d,tabs:i}=e;const s=(r.M.get("components")||[]).filter(e=>e&&"block"===e.type&&e.props?.modalable),c=[{value:"",label:"modal_none"},...s.map((e,t)=>({value:e.id,label:e.props?.modalName||`modal ${t+1}`}))],p=t.props.modalBlockId||"",b=c.find(e=>e.value===p)?.label||"modal_none";return[{type:"custom",active:()=>"styles"===a.text,node:()=>{const e="web"===r.M.get("config","channel"),n={cart:"http://app.creaditor.com/assets/bullets/images/cart-icon.png",arrowRight:"http://app.creaditor.com/assets/bullets/images/1469020585_ic_keyboard_arrow_right_48px.png"},a=[{category:"Basic",presets:[{name:"Solid",style:{background:"#111111",color:"#ffffff",borderRadius:"6px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Pill",style:{background:"#2563eb",color:"#ffffff",borderRadius:"999px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Outline",style:{background:"transparent",color:"#111111",borderRadius:"6px",border:"1px solid #111111",borderWidth:"1px",borderColor:"#111111",boxShadow:null}},{name:"Soft",style:{background:"#eef2ff",color:"#3730a3",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]},{category:"Gradients",presets:[{name:"Sunset",style:{background:"linear-gradient(135deg,#ff6a00,#ee0979)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Ocean",style:{background:"linear-gradient(135deg,#2193b0,#6dd5ed)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Grape",webOnly:!0,style:{background:"linear-gradient(135deg,#7b2ff7,#f107a3)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Lime",webOnly:!0,style:{background:"linear-gradient(135deg,#11998e,#38ef7d)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]},{category:"3D blocks",presets:[{name:"Orange",webOnly:!0,style:{background:"#ed8936",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #b45309"}},{name:"Green",webOnly:!0,style:{background:"#38a169",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #276749"}},{name:"Blue",webOnly:!0,style:{background:"#3182ce",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #2151a1"}},{name:"Red",webOnly:!0,style:{background:"#e53e3e",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #9b2c2c"}},{name:"Purple",webOnly:!0,style:{background:"#805ad5",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #553c9a"}},{name:"Dark",webOnly:!0,style:{background:"#2d3748",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #1a202c"}}]},{category:"Effects",presets:[{name:"Neon",webOnly:!0,style:{background:"#0a0a0a",color:"#39ff14",borderRadius:"8px",border:"1px solid #39ff14",borderWidth:"1px",borderColor:"#39ff14",boxShadow:"0 0 10px #39ff14, 0 0 22px rgba(57,255,20,0.5)"}},{name:"Glow",webOnly:!0,style:{background:"#7b2ff7",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 24px rgba(123,47,247,0.55)"}},{name:"Glass",webOnly:!0,style:{background:"rgba(255,255,255,0.18)",color:"#111111",borderRadius:"12px",border:"1px solid rgba(255,255,255,0.6)",borderWidth:"1px",borderColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(8px)",boxShadow:"0 4px 30px rgba(0,0,0,0.1)"}},{name:"Shadow",webOnly:!0,style:{background:"#ffffff",color:"#111111",borderRadius:"12px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 10px 24px rgba(0,0,0,0.18)"}},{name:"Emboss",webOnly:!0,style:{background:"#e2e8f0",color:"#2d3748",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"inset 0 2px 4px rgba(255,255,255,0.9), inset 0 -2px 4px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1)"}}]},{category:"Premium gradients",presets:[{name:"Aurora",webOnly:!0,style:{background:"linear-gradient(135deg,#667eea,#764ba2)",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(118,75,162,0.4)"}},{name:"Peach",webOnly:!0,style:{background:"linear-gradient(135deg,#ff9a9e,#fecfef)",color:"#7a2e3a",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(255,154,158,0.45)"}},{name:"Gold",webOnly:!0,style:{background:"linear-gradient(135deg,#f6d365,#fda085)",color:"#5a3a1a",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(253,160,133,0.45)"}},{name:"Midnight",webOnly:!0,style:{background:"linear-gradient(135deg,#0f2027,#203a43,#2c5364)",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(15,32,39,0.5)"}},{name:"Candy",webOnly:!0,style:{background:"linear-gradient(135deg,#f093fb,#f5576c)",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(245,87,108,0.45)"}}]},{category:"With icon",presets:[{name:"Buy now",icon:{src:n.cart,direction:"left",size:18},style:{background:"#16a34a",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Continue",icon:{src:n.arrowRight,direction:"right",size:18},style:{background:"linear-gradient(135deg,#2563eb,#1e3a8a)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]}].map(t=>({...t,presets:t.presets.filter(t=>e||!t.webOnly)})).filter(e=>e.presets.length>0),d=t.props.text||"Button",i=e=>e.icon?l.qy`<img
2
+ src="${e.icon.src}"
3
+ style="width:16px;height:16px;object-fit:contain;vertical-align:middle;${"right"===e.icon.direction?"margin-left:6px;order:2;":"margin-right:6px;"}"
4
+ />`:"",s=e=>l.qy`
5
+ <button
6
+ type="button"
7
+ title="${e.name}"
8
+ @click=${()=>(e=>{o.execCommand("style",{...e.style}),e.icon&&(o.execCommand("hasIcon",!0),o.execCommand("iconUrl",e.icon.src),o.execCommand("iconDirection",e.icon.direction||"left"),o.execCommand("iconSize",e.icon.size||18))})(e)}
9
+ style="display:flex;align-items:center;justify-content:center;width:100%;cursor:pointer;padding:12px 14px;font-size:13px;overflow:hidden;white-space:nowrap;
10
+ background:${e.style.background};
11
+ color:${e.style.color};
12
+ border-radius:${e.style.borderRadius};
13
+ border:${e.style.border};
14
+ font-weight:${e.style.fontWeight||400};
15
+ box-shadow:${e.style.boxShadow||"none"};"
16
+ >
17
+ ${e.icon&&"right"!==e.icon.direction?i(e):""}
18
+ <span style="overflow:hidden;text-overflow:ellipsis;">${d}</span>
19
+ ${e.icon&&"right"===e.icon.direction?i(e):""}
20
+ </button>
21
+ `;return l.qy`
22
+ <cdtr-editor-container pt="0">
23
+ <div style="display:flex;flex-direction:column;gap:10px;padding:8px 16px;">
24
+ ${a.map(e=>l.qy`
25
+ <div
26
+ style="margin-top:6px;font-size:11px;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;color:#888;"
27
+ >
28
+ ${e.category}
29
+ </div>
30
+ ${e.presets.map(e=>s(e))}
31
+ `)}
32
+ </div>
33
+ </cdtr-editor-container>
34
+ `}},{type:"heading",level:6,text:"open_modal",active:()=>"modal"===a.text},{type:"info",text:s.length?"modal_pick_hint":"modal_none_hint",active:()=>"modal"===a.text},{type:"dropdown",title:"modal_block",active:()=>"modal"===a.text,value:b,selected:p,items:c,onChange:e=>{o.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"settings",active:()=>"design"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"design"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;o.execCommand("text",t)}},{type:"heading",level:6,text:"typography",active:()=>"design"===a.text},{type:"typography",active:()=>"design"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;o.execCommand("style",{fontWeight:e});break;case"italic":const n="italic"===t.props.style.fontStyle?"normal":"italic";o.execCommand("style",{fontStyle:n});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";o.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"design"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;o.execCommand("style",{fontFamily:t})},onWeightChange:e=>{o.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"design"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;o.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"heading",level:6,text:"dimensions",active:()=>"design"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"design"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;o.execCommand("style",{width:t+"px",minWidth:null})}},{type:"heading",level:6,text:"colors",active:()=>"design"===a.text},{type:"colorSwatchGroup",active:()=>"design"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,n.w)(t.props.style.color,r);o.execCommand("style",{color:e})}o.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;o.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"border_design",active:()=>"design"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"design"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;o.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"design"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;o.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"design"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;o.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"design"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;o.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"design"===a.text},{type:"boxShadow",active:()=>"design"===a.text,value:t.props.style.boxShadow,onChange:e=>{o.execCommand("style",{boxShadow:e})}},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===a.text,onChange:e=>{const t={link:e.target.value};o.execCommand("onClick",t)}},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"icons"===a.text,onChange:e=>{const t=e.target.checked;o.execCommand("hasIcon",t),o.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"icons"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;o.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"icons"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;o.execCommand("iconSize",t)}},{type:"icons",active:()=>"icons"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;o.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"design"===a.text},{type:"spacingPicker",active:()=>"design"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,n=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;o.execCommand("style",{paddingTop:t+"px",paddingBottom:n+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}}]}}}},d=e=>{let{helpers:t,editor:o,getFocused:n}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,n()||o.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var i=o(72591),s=o.n(i),c=o(88639),p=o.n(c),b=o(88128),u=o.n(b),g=o(30855),x=o.n(g),f=o(93051),h=o.n(f),m=o(49536),y={};y.setAttributes=x(),y.insert=u().bind(null,"head"),y.domAPI=p(),y.insertStyleElement=h();s()(m.A,y);const A=m.A&&m.A.locals?m.A.locals:void 0;var C=o(81318),w=o(1366);const v=C.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,C.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var k=o(85194),S=o(28396);const E=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const W=()=>{const e="button";return{name:e,create:t=>{const{createElement:o,compose:n,helpers:r}=t,{arrayToString:l,mergeDiff:i}=r;let s=!1;const c=document.createElement("div"),p=document.createElement("div"),{editor:b}=function(e){let{content:t,element:o}=e;return{element:o,editor:new C.KE({element:o,extensions:[w.A,v,S.A,k.Ay,E],content:t})}}({content:n.props.text,element:p});c.appendChild(p);return b.view.dom.setAttribute("dir","auto"),b.on("update",e=>{let{editor:t}=e;const o=t.getText();n.editor.store().updateComponent(n,"text",o)}),b.on("focus",e=>{let{event:t,editor:o}=e;s=!0}),b.on("blur",e=>{let{event:t,editor:o}=e;s=!1}),c.className=A.button,o({name:e,id:n.id,template:c,commands:{insertContent:e=>{b.commands.insertContent(e),b.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{n.props.style.display="",n.props.style.direction=""}catch(e){console.error(e)}i(c,{style:n.props.style}),c.style.height="auto";const e=n.props.hasIcon,t=n.props.iconUrl,o=n.props.iconDirection,r=n.props.iconSize,l="icon_in_button";let a=c.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","left"===o?c.insertBefore(a,c.firstChild):c.appendChild(a)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>c,handleBar:!0,validator:d({template:c,helpers:r,editor:b,getFocused:function(){return s}}),schema:n.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:n,destroy:()=>{b.destroy()},remove:()=>{c.remove()},createEditor:a})}}}},49536(e,t,o){o.d(t,{A:()=>d});var n=o(82001),r=o.n(n),l=o(40935),a=o.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const d=a}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(t,e,n){n.r(e),n.d(e,{EditorTabItem:()=>c});var i=n(59929);class c extends i.WF{constructor(){super()}focus(){const t=this.shadowRoot.querySelector(".tab-btn");t?t.focus():super.focus()}onClickItem(t){this.value=t,this.dispatchEvent(new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}))}handleKeyDown(t){if("Enter"===t.key||" "===t.key)return t.preventDefault(),t.stopPropagation(),void this.onClickItem(this.icon);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("arrow-navigation",{detail:{key:t.key,currentIcon:this.icon},bubbles:!0,cancelable:!0})))}factory(){let t="fill:currentColor;color:inherit;width:18px;height:18px;";switch(this.icon){case"box-shadow":return n.e(1456).then(n.bind(n,11456)),i.qy`<cdtr-box-shadow-icon iconStyle=${t}></cdtr-box-shadow-icon>`;case"design":return n.e(9162).then(n.bind(n,59162)),i.qy`<cdtr-design-icon iconStyle=${t}></cdtr-design-icon>`;case"text":case"typography":return n.e(9089).then(n.bind(n,59089)),i.qy`<cdtr-text-icon iconStyle=${t}></cdtr-text-icon>`;case"animations":return n.e(9184).then(n.bind(n,29184)),i.qy`<cdtr-animation-icon iconStyle=${t}></cdtr-animation-icon>`;case"settings":return n.e(4114).then(n.bind(n,84114)),i.qy`<cdtr-setting-icon iconStyle=${t}></cdtr-setting-icon>`;case"qr":return i.qy`<img style="width:16px;height:16px;" alt="qr" width="16" height="16" src="https://img.creaditor.ai/images/qr?link=https%3A%2F%2Fexample.com&size=20" />`;case"link":return n.e(5428).then(n.bind(n,85428)),i.qy`<cdtr-link-icon iconStyle=${t}></cdtr-link-icon>`;case"spacing":return n.e(365).then(n.bind(n,50365)),i.qy`<cdtr-spacing-icon iconStyle=${t}></cdtr-spacing-icon>`;case"background":case"image":case"giphy":return n.e(1452).then(n.bind(n,61452)),i.qy`<cdtr-background-icon iconStyle=${t}></cdtr-background-icon>`;case"video":return n.e(7759).then(n.bind(n,97759)),i.qy`<cdtr-video-icon iconStyle=${t}></cdtr-video-icon>`;case"list-check":return n.e(6459).then(n.bind(n,16459)),i.qy`<cdtr-list-check-icon iconStyle=${t}></cdtr-list-check-icon>`;case"time":return n.e(307).then(n.bind(n,307)),i.qy`<cdtr-time-icon iconStyle=${t}></cdtr-time-icon>`;case"icons":return i.qy`<cdtr-icon icon="emoji" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"modal":return i.qy`<cdtr-icon icon="page" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"list-settings":return n.e(8676).then(n.bind(n,48676)),i.qy`<cdtr-list-settings-icon iconStyle=${t}></cdtr-list-settings-icon>`;case"automations":return n.e(8305).then(n.bind(n,58305)),i.qy`<cdtr-automation-icon iconStyle=${t}></cdtr-automation-icon>`;case"ai":return i.qy`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20.25 21" preserveAspectRatio="xMidYMid meet">
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(t,e,n){n.r(e),n.d(e,{EditorTabItem:()=>o});var i=n(59929);class o extends i.WF{constructor(){super()}focus(){const t=this.shadowRoot.querySelector(".tab-btn");t?t.focus():super.focus()}onClickItem(t){this.value=t,this.dispatchEvent(new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}))}handleKeyDown(t){if("Enter"===t.key||" "===t.key)return t.preventDefault(),t.stopPropagation(),void this.onClickItem(this.icon);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("arrow-navigation",{detail:{key:t.key,currentIcon:this.icon},bubbles:!0,cancelable:!0})))}factory(){let t="fill:currentColor;color:inherit;width:18px;height:18px;";switch(this.icon){case"box-shadow":return n.e(1456).then(n.bind(n,11456)),i.qy`<cdtr-box-shadow-icon iconStyle=${t}></cdtr-box-shadow-icon>`;case"design":return n.e(9162).then(n.bind(n,59162)),i.qy`<cdtr-design-icon iconStyle=${t}></cdtr-design-icon>`;case"text":case"typography":return n.e(9089).then(n.bind(n,59089)),i.qy`<cdtr-text-icon iconStyle=${t}></cdtr-text-icon>`;case"animations":return n.e(9184).then(n.bind(n,29184)),i.qy`<cdtr-animation-icon iconStyle=${t}></cdtr-animation-icon>`;case"settings":return n.e(4114).then(n.bind(n,84114)),i.qy`<cdtr-setting-icon iconStyle=${t}></cdtr-setting-icon>`;case"qr":return i.qy`<img style="width:16px;height:16px;" alt="qr" width="16" height="16" src="https://img.creaditor.ai/images/qr?link=https%3A%2F%2Fexample.com&size=20" />`;case"link":return n.e(5428).then(n.bind(n,85428)),i.qy`<cdtr-link-icon iconStyle=${t}></cdtr-link-icon>`;case"spacing":return n.e(365).then(n.bind(n,50365)),i.qy`<cdtr-spacing-icon iconStyle=${t}></cdtr-spacing-icon>`;case"background":case"image":case"giphy":return n.e(1452).then(n.bind(n,61452)),i.qy`<cdtr-background-icon iconStyle=${t}></cdtr-background-icon>`;case"video":return n.e(7759).then(n.bind(n,97759)),i.qy`<cdtr-video-icon iconStyle=${t}></cdtr-video-icon>`;case"list-check":return n.e(6459).then(n.bind(n,16459)),i.qy`<cdtr-list-check-icon iconStyle=${t}></cdtr-list-check-icon>`;case"time":return n.e(307).then(n.bind(n,307)),i.qy`<cdtr-time-icon iconStyle=${t}></cdtr-time-icon>`;case"icons":return i.qy`<cdtr-icon icon="emoji" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"modal":return i.qy`<cdtr-icon icon="page" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"list-settings":return n.e(8676).then(n.bind(n,48676)),i.qy`<cdtr-list-settings-icon iconStyle=${t}></cdtr-list-settings-icon>`;case"automations":return n.e(8305).then(n.bind(n,58305)),i.qy`<cdtr-automation-icon iconStyle=${t}></cdtr-automation-icon>`;case"ai":return i.qy`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20.25 21" preserveAspectRatio="xMidYMid meet">
2
2
  <defs><clippath id="ai-clip"><path d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z" clip-rule="nonzero"></path></clippath></defs>
3
3
  <g clip-path="url(#ai-clip)"><path fill="#9747ff" d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z" fill-opacity="1" fill-rule="evenodd"></path></g>
4
4
  </svg>`;default:return null}}render(){return i.qy`
@@ -12,7 +12,7 @@
12
12
  <span class="icon">${this.factory()}</span>
13
13
  <span class="label"><lang-text text="${this.icon}"></lang-text></span>
14
14
  </button>
15
- `}}c.styles=i.AH`
15
+ `}}o.styles=i.AH`
16
16
  :host {
17
17
  display: block;
18
18
  direction: ltr;
@@ -24,19 +24,19 @@
24
24
  align-items: center;
25
25
  justify-content: center;
26
26
  gap: 3px;
27
- padding: 6px 2px;
27
+ padding: var(--space-2, 8px) var(--space-1, 4px);
28
28
  cursor: pointer;
29
29
  border: none;
30
30
  background: transparent;
31
31
  outline: none;
32
32
  position: relative;
33
- transition: background 0.15s ease;
33
+ transition: background var(--duration-fast, 120ms) var(--ease-default, ease);
34
34
  }
35
35
  .tab-btn:hover:not(.selected) {
36
- background: #eeeef0;
36
+ background: var(--color-bg-muted, #eeeef0);
37
37
  }
38
38
  .tab-btn.selected {
39
- background: color-mix(in srgb, var(--accent, #5B5FC7) 12%, transparent);
39
+ background: var(--color-primary-soft, rgba(99, 102, 241, 0.08));
40
40
  }
41
41
  .icon {
42
42
  display: flex;
@@ -44,21 +44,21 @@
44
44
  justify-content: center;
45
45
  --cdtr-icon-width: 18px;
46
46
  --cdtr-icon-height: 18px;
47
- opacity: 0.55;
48
- transition: opacity 0.15s ease, color 0.15s ease;
49
- color: #666;
47
+ opacity: 0.6;
48
+ transition: opacity var(--duration-fast, 120ms) var(--ease-default, ease), color var(--duration-fast, 120ms) var(--ease-default, ease);
49
+ color: var(--color-text-muted, #666);
50
50
  }
51
51
  .tab-btn:hover:not(.selected) .icon {
52
52
  opacity: 0.8;
53
- color: #444;
53
+ color: var(--color-text-secondary, #444);
54
54
  }
55
55
  .tab-btn.selected .icon {
56
56
  opacity: 1;
57
- color: var(--accent, #5B5FC7);
57
+ color: var(--color-primary, #6366f1);
58
58
  }
59
59
  .label {
60
- font-size: 9px;
61
- color: #888;
60
+ font-size: 10px;
61
+ color: var(--color-text-muted, #888);
62
62
  font-weight: 500;
63
63
  text-align: center;
64
64
  line-height: 1;
@@ -66,13 +66,13 @@
66
66
  overflow: hidden;
67
67
  text-overflow: ellipsis;
68
68
  white-space: nowrap;
69
- transition: color 0.15s ease;
69
+ transition: color var(--duration-fast, 120ms) var(--ease-default, ease);
70
70
  }
71
71
  .tab-btn.selected .label {
72
- color: var(--accent, #5B5FC7);
72
+ color: var(--color-primary, #6366f1);
73
73
  font-weight: 600;
74
74
  }
75
75
  .tab-btn:hover:not(.selected) .label {
76
- color: #444;
76
+ color: var(--color-text-secondary, #444);
77
77
  }
78
- `,c.properties={icon:{},labelMode:{},selected:{}},customElements.define("cdtr-editor-tab-item",c)}}]);
78
+ `,o.properties={icon:{},labelMode:{},selected:{}},customElements.define("cdtr-editor-tab-item",o)}}]);
Binary file
@@ -55,6 +55,7 @@
55
55
  background: #fff;
56
56
  position: absolute;
57
57
  right: 0;
58
+ transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
58
59
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
59
60
  -webkit-animation: slide-in 0.5s forwards;
60
61
  -webkit-animation-delay: 2s;
Binary file
@@ -0,0 +1,114 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9994],{19994(p,x,r){r.r(x),r.d(x,{BoxShadowEditor:()=>m});var e=r(59088),t=r(36936),a=r(59929),o=r(49410),i=r(86319);const d=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}];function l(p){try{return function(p){const x=p.split(/ (?![^(]*\))/);let r="",e=0,t=0,a=0,o=0,i=!1;for(let p of x)p=p.trim(),"inset"===p?i=!0:p.endsWith("px")||p.endsWith("em")?0===t?t=parseFloat(p):0===e?e=parseFloat(p):0===a?a=parseFloat(p):0===o&&(o=parseFloat(p)):(p.includes("rgb")||p.includes("#"))&&(r=p);return[{color:r,offsetY:e,offsetX:t,blurRadius:a,spreadRadius:o,inset:i}]}(p)}catch(p){console.error(p)}}var s,n,b,g,u,c;const h=r(36565).Ay,w="#000 0px 0px 0px 0px",f={};let m=(s=(0,o.MZ)({type:String}),n=(0,o.MZ)({type:String}),(c=class extends a.WF{constructor(){super(),(0,e.A)(this,"value",g,this),(0,e.A)(this,"boxShadow",u,this),this.tabName=void 0,this.theme=void 0,this.onChangeBoxShadow=(p,x)=>{const r={color:f.color,offsetY:f.offsetY,offsetX:f.offsetX,blurRadius:f.blurRadius,spreadRadius:f.spreadRadius,inset:!!f.inset};if(void 0!==r[p]&&("string"==typeof x||"number"==typeof x||"boolean"==typeof x)){r[p]=x,f[p]=x;const e=`${r.offsetX}px ${r.offsetY}px ${r.blurRadius}px ${r.spreadRadius}px ${r.color} ${r.inset?"inset":""}`;this.changeBoxShadowValue(e)}},this.tabName="design",this.theme=i.M.get("theme"),this.removeBoxShadow=this.removeBoxShadow.bind(this),this.onChangeBoxShadow=this.onChangeBoxShadow.bind(this)}changeBoxShadowValue(p){h.store().execCommand("style",{boxShadow:p}),this.boxShadow=this.value=p}removeBoxShadow(){h.store().execCommand("style",{boxShadow:w}),this.boxShadow=this.value=w}connectedCallback(){super.connectedCallback(),r.e(1456).then(r.bind(r,11456)),r.e(5666).then(r.bind(r,35666))}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}changeTab(p){this.tabName=p.target.value}render(){if(void 0===this.value||this.value!==this.boxShadow){this.value||(this.value=w),this.boxShadow=this.value;const p=l(this.value);Array.isArray(p)&&p.length>0?(f.offsetX=p[0].offsetX,f.offsetY=p[0].offsetY,f.blurRadius=p[0].blurRadius,f.spreadRadius=p[0].spreadRadius,f.color=p[0].color,f.inset=p[0].inset):(f.offsetX=0,f.offsetY=0,f.blurRadius=0,f.spreadRadius=0,f.color="#000",f.inset=void 0)}return a.qy`
2
+ <cdtr-editor-container>
3
+ <cdtr-row alignItems="center" justify="space-between">
4
+ <cdtr-col>
5
+ <cdtr-title>
6
+ <lang-text text="box-shadow"></lang-text>
7
+ </cdtr-title>
8
+ </cdtr-col>
9
+ <cdtr-col sm="2">
10
+ ${this.boxShadow!==w?a.qy` <paper-button
11
+ style="min-width:40px;padding:0;"
12
+ @click=${this.removeBoxShadow}
13
+ ><cdtr-icon icon="x"></cdtr-icon
14
+ ></paper-button>`:null}
15
+ </cdtr-col>
16
+ <cdtr-col sm="3">
17
+ <cdtr-dropdown custom overflow maxHeight="900px" top=${200}>
18
+ <paper-button slot="trigger"
19
+ ><cdtr-box-shadow-icon
20
+ .iconStyle="box-shadow:${this.value};"
21
+ ></cdtr-box-shadow-icon
22
+ ></paper-button>
23
+ <div slot="content">
24
+ <div>
25
+ ${"design"===this.tabName?a.qy`
26
+ <cdtr-editor-container>
27
+ <h1 class="mb-2">
28
+ <lang-text
29
+ whiteSpace="break-spaces"
30
+ text="box-shadow"
31
+ ></lang-text>
32
+ </h1>
33
+ <cdtr-width-editor
34
+ text="horizontal_shadow_length"
35
+ unit="px"
36
+ max="200"
37
+ min="-200"
38
+ .value=${f.offsetX}
39
+ @input=${p=>this.onChangeBoxShadow("offsetX",p.target.value)}
40
+ ></cdtr-width-editor>
41
+ </cdtr-editor-container>
42
+ <cdtr-editor-container>
43
+ <cdtr-width-editor
44
+ text="vertical_shadow_length"
45
+ unit="px"
46
+ max="400"
47
+ min="-400"
48
+ .value=${f.offsetY}
49
+ @input=${p=>this.onChangeBoxShadow("offsetY",p.target.value)}
50
+ ></cdtr-width-editor>
51
+ </cdtr-editor-container>
52
+ <cdtr-editor-container>
53
+ <cdtr-width-editor
54
+ text="blur_radius"
55
+ unit="px"
56
+ max="400"
57
+ min="0"
58
+ .value=${f.blurRadius}
59
+ @input=${p=>this.onChangeBoxShadow("blurRadius",p.target.value)}
60
+ ></cdtr-width-editor>
61
+ </cdtr-editor-container>
62
+ <cdtr-editor-container>
63
+ <cdtr-width-editor
64
+ text="spread_radius"
65
+ unit="px"
66
+ max="200"
67
+ min="-200"
68
+ .value=${f.spreadRadius}
69
+ @input=${p=>this.onChangeBoxShadow("spreadRadius",p.target.value)}
70
+ ></cdtr-width-editor>
71
+ </cdtr-editor-container>
72
+ <cdtr-editor-container>
73
+ <cdtr-colorpicker-editor
74
+ @input=${p=>this.onChangeBoxShadow("color",p.target.value)}
75
+ .value=${f.color}
76
+ text="shadow_color"
77
+ ></cdtr-colorpicker-editor>
78
+ </cdtr-editor-container>
79
+
80
+ <cdtr-editor-container>
81
+ <cdtr-row justify="space-between" alignItems="center">
82
+ <cdtr-title
83
+ ><lang-text text="inset"></lang-text
84
+ ></cdtr-title>
85
+ <cdtr-toggle
86
+ @change=${p=>this.onChangeBoxShadow("inset",!p.target.checked)}
87
+ ></cdtr-toggle>
88
+ </cdtr-row>
89
+ </cdtr-editor-container>
90
+ `:null}
91
+ ${"gallery"===this.tabName?a.qy`<cdtr-row
92
+ style="overflow-y: auto;
93
+ max-height: 90vh;max-width:500px;"
94
+ justify="center"
95
+ spacing="10px"
96
+ >
97
+ ${d.map(p=>a.qy` <cdtr-col sm="5" style="height:120px;"
98
+ ><paper-button
99
+ @click=${()=>this.changeBoxShadowValue(p.rule)}
100
+ style="box-shadow:${p.rule};margin:0 25px;width:90%;height:90%;"
101
+ ></paper-button
102
+ ></cdtr-col>`)}
103
+ </cdtr-row>`:null}
104
+ </div>
105
+ </div>
106
+ </cdtr-dropdown>
107
+ </cdtr-col>
108
+ </cdtr-row>
109
+ </cdtr-editor-container>
110
+ `}}).styles=a.AH`
111
+ :host {
112
+ direction: var(--direction-locale);
113
+ }
114
+ `,b=c,g=(0,t.A)(b.prototype,"value",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=(0,t.A)(b.prototype,"boxShadow",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),b);customElements.define("cdtr-box-shadow-editor",m)}}]);
Binary file