@creaditor/newsletter-starterkit 1.0.56 → 1.0.57

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.
Files changed (119) hide show
  1. package/dist/1142.creaditor.bundle.js +1 -1
  2. package/dist/1142.creaditor.bundle.js.gz +0 -0
  3. package/dist/1260.creaditor.bundle.js +112 -63
  4. package/dist/1260.creaditor.bundle.js.gz +0 -0
  5. package/dist/1271.creaditor.bundle.js +544 -1
  6. package/dist/1271.creaditor.bundle.js.gz +0 -0
  7. package/dist/1334.creaditor.bundle.js +3 -3
  8. package/dist/1334.creaditor.bundle.js.gz +0 -0
  9. package/dist/170.creaditor.bundle.js +149 -22
  10. package/dist/170.creaditor.bundle.js.gz +0 -0
  11. package/dist/211.creaditor.bundle.js +1 -1
  12. package/dist/211.creaditor.bundle.js.gz +0 -0
  13. package/dist/2234.creaditor.bundle.js +121 -1
  14. package/dist/2234.creaditor.bundle.js.gz +0 -0
  15. package/dist/2590.creaditor.bundle.js +1 -1
  16. package/dist/2590.creaditor.bundle.js.gz +0 -0
  17. package/dist/271.creaditor.bundle.js +6 -6
  18. package/dist/271.creaditor.bundle.js.gz +0 -0
  19. package/dist/2765.creaditor.bundle.js +1 -1
  20. package/dist/2765.creaditor.bundle.js.gz +0 -0
  21. package/dist/2956.creaditor.bundle.js +1 -1
  22. package/dist/2956.creaditor.bundle.js.gz +0 -0
  23. package/dist/3521.creaditor.bundle.js +2 -2
  24. package/dist/3521.creaditor.bundle.js.gz +0 -0
  25. package/dist/353.creaditor.bundle.js +3 -3
  26. package/dist/353.creaditor.bundle.js.gz +0 -0
  27. package/dist/3553.creaditor.bundle.js +1 -1
  28. package/dist/3553.creaditor.bundle.js.gz +0 -0
  29. package/dist/3606.creaditor.bundle.js +12 -4
  30. package/dist/3606.creaditor.bundle.js.gz +0 -0
  31. package/dist/3932.creaditor.bundle.js +4 -4
  32. package/dist/3932.creaditor.bundle.js.gz +0 -0
  33. package/dist/4061.creaditor.bundle.js +177 -0
  34. package/dist/4061.creaditor.bundle.js.LICENSE.txt +23 -0
  35. package/dist/4061.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  36. package/dist/4061.creaditor.bundle.js.gz +0 -0
  37. package/dist/4186.creaditor.bundle.js +5 -1
  38. package/dist/4186.creaditor.bundle.js.gz +0 -0
  39. package/dist/4288.creaditor.bundle.js +10 -10
  40. package/dist/4288.creaditor.bundle.js.gz +0 -0
  41. package/dist/4475.creaditor.bundle.js +1 -1
  42. package/dist/4475.creaditor.bundle.js.gz +0 -0
  43. package/dist/453.creaditor.bundle.js +8 -7
  44. package/dist/453.creaditor.bundle.js.gz +0 -0
  45. package/dist/4639.creaditor.bundle.js +1 -1
  46. package/dist/4639.creaditor.bundle.js.gz +0 -0
  47. package/dist/4762.creaditor.bundle.js +4 -4
  48. package/dist/4762.creaditor.bundle.js.gz +0 -0
  49. package/dist/4770.creaditor.bundle.js +3 -3
  50. package/dist/4770.creaditor.bundle.js.gz +0 -0
  51. package/dist/5133.creaditor.bundle.js +3 -3
  52. package/dist/5133.creaditor.bundle.js.gz +0 -0
  53. package/dist/5379.creaditor.bundle.js +70 -0
  54. package/dist/5379.creaditor.bundle.js.gz +0 -0
  55. package/dist/5391.creaditor.bundle.js +1 -1
  56. package/dist/5391.creaditor.bundle.js.gz +0 -0
  57. package/dist/567.creaditor.bundle.js +469 -364
  58. package/dist/567.creaditor.bundle.js.gz +0 -0
  59. package/dist/5849.creaditor.bundle.js +2 -2
  60. package/dist/5849.creaditor.bundle.js.gz +0 -0
  61. package/dist/589.creaditor.bundle.js +25 -8
  62. package/dist/589.creaditor.bundle.js.gz +0 -0
  63. package/dist/5909.creaditor.bundle.js +651 -0
  64. package/dist/5909.creaditor.bundle.js.gz +0 -0
  65. package/dist/5926.creaditor.bundle.js +216 -34
  66. package/dist/5926.creaditor.bundle.js.gz +0 -0
  67. package/dist/638.creaditor.bundle.js +49 -20
  68. package/dist/638.creaditor.bundle.js.gz +0 -0
  69. package/dist/6814.creaditor.bundle.js +1 -1
  70. package/dist/6814.creaditor.bundle.js.gz +0 -0
  71. package/dist/7209.creaditor.bundle.js +98 -56
  72. package/dist/7209.creaditor.bundle.js.gz +0 -0
  73. package/dist/752.creaditor.bundle.js +6 -4
  74. package/dist/752.creaditor.bundle.js.gz +0 -0
  75. package/dist/7564.creaditor.bundle.js +1 -1
  76. package/dist/7564.creaditor.bundle.js.gz +0 -0
  77. package/dist/763.creaditor.bundle.js +9 -9
  78. package/dist/763.creaditor.bundle.js.gz +0 -0
  79. package/dist/7654.creaditor.bundle.js +221 -0
  80. package/dist/7654.creaditor.bundle.js.gz +0 -0
  81. package/dist/7918.creaditor.bundle.js +1 -0
  82. package/dist/7918.creaditor.bundle.js.gz +0 -0
  83. package/dist/7937.creaditor.bundle.js +21 -48
  84. package/dist/7937.creaditor.bundle.js.gz +0 -0
  85. package/dist/7997.creaditor.bundle.js +1 -1
  86. package/dist/7997.creaditor.bundle.js.gz +0 -0
  87. package/dist/8141.creaditor.bundle.js +2 -3
  88. package/dist/8141.creaditor.bundle.js.gz +0 -0
  89. package/dist/8250.creaditor.bundle.js +1 -1
  90. package/dist/8250.creaditor.bundle.js.gz +0 -0
  91. package/dist/8443.creaditor.bundle.js +1 -1
  92. package/dist/8443.creaditor.bundle.js.gz +0 -0
  93. package/dist/8547.creaditor.bundle.js +1270 -0
  94. package/dist/8547.creaditor.bundle.js.gz +0 -0
  95. package/dist/8570.creaditor.bundle.js +3 -3
  96. package/dist/8570.creaditor.bundle.js.gz +0 -0
  97. package/dist/8646.creaditor.bundle.js +20 -24
  98. package/dist/8646.creaditor.bundle.js.gz +0 -0
  99. package/dist/8654.creaditor.bundle.js +7 -7
  100. package/dist/8654.creaditor.bundle.js.gz +0 -0
  101. package/dist/8854.creaditor.bundle.js +4 -4
  102. package/dist/8854.creaditor.bundle.js.gz +0 -0
  103. package/dist/8916.creaditor.bundle.js +3 -1
  104. package/dist/8916.creaditor.bundle.js.gz +0 -0
  105. package/dist/9041.creaditor.bundle.js +14 -16
  106. package/dist/9041.creaditor.bundle.js.gz +0 -0
  107. package/dist/9250.creaditor.bundle.js +1 -1
  108. package/dist/9250.creaditor.bundle.js.gz +0 -0
  109. package/dist/9431.creaditor.bundle.js +1 -1
  110. package/dist/9431.creaditor.bundle.js.gz +0 -0
  111. package/dist/9694.creaditor.bundle.js +1 -1
  112. package/dist/9694.creaditor.bundle.js.gz +0 -0
  113. package/dist/creaditor.bundle.js +2848 -1978
  114. package/dist/creaditor.bundle.js.LICENSE.txt +6 -0
  115. package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
  116. package/dist/creaditor.bundle.js.gz +0 -0
  117. package/dist/service-worker.js +1 -1
  118. package/dist/service-worker.js.gz +0 -0
  119. package/package.json +1 -1
@@ -1,22 +1,79 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,i){i.r(e),i.d(e,{EditorTabs:()=>s});var n=i(59929),o=i(36565);i.e(7937).then(i.bind(i,67937));class s extends n.WF{constructor(){super(),this.onConnected=this.onConnected.bind(this),this.onArrowNavigation=this.onArrowNavigation.bind(this),this.tabs=[]}onClickItem(t){let{target:e}=t;const i=this.value=e.value,n=[...this.tabs],o=n.findIndex(t=>t.text===i);-1!==o&&(n.forEach(t=>{t.selected=!1}),n[o].selected=!0),this.tabs=n;const s=new UIEvent("tabChanged",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}firstUpdated(){super.firstUpdated()}onConnected(t){let{name:e}=t;this.onClickItem({target:{value:e}})}onArrowNavigation(t){const{key:e,currentIcon:i}=t.detail,n=this.tabs.findIndex(t=>t.text===i);if(-1===n)return;let o=n;switch(e){case"ArrowUp":case"ArrowLeft":o=n>0?n-1:this.tabs.length-1;break;case"ArrowDown":case"ArrowRight":o=n<this.tabs.length-1?n+1:0;break;default:return}const s=this.tabs[o];s&&(this.onClickItem({target:{value:s.text}}),this.updateComplete.then(()=>{const t=this.shadowRoot.querySelector(`cdtr-editor-tab-item[icon="${s.text}"]`);t&&t.focus()}))}connectedCallback(){super.connectedCallback(),o.Ay.on("editor-tabs",this.onConnected)}disconnectedCallback(){super.disconnectedCallback(),o.Ay.off("editor-tabs",this.onConnected)}renderContent(){switch(this.value){case"animations":return i.e(3553).then(i.bind(i,3553)),n.qy`<cdtr-animations-editor>
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,n){n.r(e),n.d(e,{EditorTabs:()=>l});var o=n(59929),s=n(36565),i=n(86319),a=n(40648);n.e(7937).then(n.bind(n,67937));const r="cdtr-editor-tabs-hint-seen";class l extends o.WF{constructor(){super(),this.onConnected=this.onConnected.bind(this),this.onArrowNavigation=this.onArrowNavigation.bind(this),this.dismissHint=this.dismissHint.bind(this),this.scheduleSync=this.scheduleSync.bind(this),this.observeContent=this.observeContent.bind(this),this.toggleAllSections=this.toggleAllSections.bind(this),this.tabs=[],this.showHint=!1,this._sectionCount=0,this._allExpanded=!1}sectionElements(){const t=this.shadowRoot?.querySelector('slot[name="content"]');if(!t)return[];const e=[];for(const n of t.assignedElements({flatten:!0})){"CDTR-EDITOR-SECTION"===n.tagName&&e.push(n);for(const t of n.children)"CDTR-EDITOR-SECTION"===t.tagName&&e.push(t)}return e}syncSections(){const t=this.sectionElements();this._sectionCount=t.length,this._allExpanded=t.length>0&&t.every(t=>t.open)}observeContent(){this._contentObserver||(this._contentObserver=new MutationObserver(this.scheduleSync)),this._contentObserver.disconnect();const t=this.shadowRoot?.querySelector('slot[name="content"]');if(t){for(const e of t.assignedElements({flatten:!0}))this._contentObserver.observe(e,{childList:!0});this.scheduleSync()}}scheduleSync(){this._syncPending||(this._syncPending=!0,setTimeout(()=>{this._syncPending=!1,this.isConnected&&this.syncSections()},0))}toggleAllSections(){const t=!this._allExpanded;for(const e of this.sectionElements())e.open=t,(0,a.Q)(e.persistKey,t);this._allExpanded=t}hintAlreadySeen(){try{return"1"===localStorage.getItem(r)}catch(t){return!0}}dismissHint(){this.showHint=!1;try{localStorage.setItem(r,"1")}catch(t){}}onClickItem(t){let{target:e}=t;const n=this.value=e.value,o=[...this.tabs],s=o.findIndex(t=>t.text===n);-1!==s&&(o.forEach(t=>{t.selected=!1}),o[s].selected=!0),this.tabs=o,this.scheduleSync(),this.showHint&&this.dismissHint();const i=new UIEvent("tabChanged",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(i)}firstUpdated(){super.firstUpdated()}maybeShowHint(){this._hintChecked||this.tabs.length<=1||this.hintAlreadySeen()||(this._hintChecked=!0,setTimeout(()=>{this.isConnected&&!this.hintAlreadySeen()&&(this.showHint=!0)},700))}updated(){this.setAttribute("data-active-tab",this.value||""),this.maybeShowHint(),this.observeContent()}onConnected(t){let{name:e}=t;this.onClickItem({target:{value:e}})}onArrowNavigation(t){const{key:e,currentIcon:n}=t.detail,o=this.tabs.findIndex(t=>t.text===n);if(-1===o)return;let s=o;switch(e){case"ArrowUp":case"ArrowLeft":s=o>0?o-1:this.tabs.length-1;break;case"ArrowDown":case"ArrowRight":s=o<this.tabs.length-1?o+1:0;break;default:return}const i=this.tabs[s];i&&(this.onClickItem({target:{value:i.text}}),this.updateComplete.then(()=>{const t=this.shadowRoot.querySelector(`cdtr-editor-tab-item[icon="${i.text}"]`);t&&t.focus()}))}connectedCallback(){super.connectedCallback(),s.Ay.on("editor-tabs",this.onConnected),s.Ay.on("update",this.scheduleSync),s.Ay.on("select",this.scheduleSync)}disconnectedCallback(){super.disconnectedCallback(),s.Ay.off("editor-tabs",this.onConnected),s.Ay.off("update",this.scheduleSync),s.Ay.off("select",this.scheduleSync),this._contentObserver?.disconnect()}renderContent(){switch(this.value){case"animations":return n.e(3553).then(n.bind(n,3553)),o.qy`<cdtr-animations-editor>
2
2
  <cdtr-block-loader></cdtr-block-loader
3
- ></cdtr-animations-editor>`;case"settings":case"setting":return i.e(5340).then(i.bind(i,45340)),n.qy`<cdtr-setting-editor>
3
+ ></cdtr-animations-editor>`;case"settings":case"setting":return n.e(7654).then(n.bind(n,37654)),o.qy`<cdtr-setting-editor>
4
4
  <cdtr-block-loader></cdtr-block-loader
5
- ></cdtr-setting-editor>`;default:return n.qy`<slot name="content"></slot>`}}render(){return this.tabs.length>0&&!this.tabs.some(t=>t.selected)&&(this.tabs[0].selected=!0,this.value=this.tabs[0].text),n.qy`<cdtr-row class="main">
6
- <div class="icon-tabs" @arrow-navigation=${this.onArrowNavigation}>
7
- ${this.tabs.map(t=>n.qy`<cdtr-editor-tab-item
8
- tabindex="0"
9
- @change=${this.onClickItem}
10
- icon=${t.text}
11
- text=${t.text}
12
- .selected=${t.selected}
13
- ></cdtr-editor-tab-item>`)}
5
+ ></cdtr-setting-editor>`;default:return o.qy`<slot
6
+ name="content"
7
+ @slotchange=${this.observeContent}
8
+ ></slot>`}}renderToggleAll(){const t=!this._allExpanded,[e,n]=t?["7 8 12 3 17 8","7 16 12 21 17 16"]:["7 3 12 8 17 3","7 21 12 16 17 21"];return o.qy`
9
+ <button
10
+ class="toggle-all"
11
+ @click=${this.toggleAllSections}
12
+ aria-expanded=${this._allExpanded?"true":"false"}
13
+ >
14
+ <lang-text
15
+ text=${t?"expand_all":"collapse_all"}
16
+ ></lang-text>
17
+ <svg
18
+ width="12"
19
+ height="12"
20
+ viewBox="0 0 24 24"
21
+ fill="none"
22
+ stroke="currentColor"
23
+ stroke-width="2"
24
+ stroke-linecap="round"
25
+ stroke-linejoin="round"
26
+ aria-hidden="true"
27
+ >
28
+ <polyline points=${e}></polyline>
29
+ <polyline points=${n}></polyline>
30
+ </svg>
31
+ </button>
32
+ `}render(){this.tabs.length>0&&!this.tabs.some(t=>t.selected)&&(this.tabs[0].selected=!0,this.value=this.tabs[0].text);const t=this.showHint&&this.tabs.length>1,e=this._sectionCount>=3;return o.qy`
33
+ ${this.tabs.length>1?o.qy`<div
34
+ class="tabs-row ${t?"hint-active":""}"
35
+ @arrow-navigation=${this.onArrowNavigation}
36
+ >
37
+ ${this.tabs.map(t=>o.qy`<cdtr-editor-tab-item
38
+ tabindex="0"
39
+ @change=${this.onClickItem}
40
+ icon=${t.text}
41
+ text=${t.text}
42
+ .selected=${t.selected}
43
+ ></cdtr-editor-tab-item>`)}
44
+ </div>`:null}
45
+ ${t?this.renderHint():null}
46
+ ${e?o.qy`<div class="toggle-row">${this.renderToggleAll()}</div>`:null}
47
+ <div class="content">
48
+ ${this.renderContent()}
14
49
  </div>
15
- <cdtr-col class="content"> ${this.renderContent()} </cdtr-col>
16
- </cdtr-row>`}}s.styles=n.AH`
50
+ `}renderHint(){return o.qy`
51
+ <div
52
+ class="tabs-hint"
53
+ role="dialog"
54
+ aria-label=${i.M.get("lang","tabs_hint_title")||"Tip"}
55
+ >
56
+ <p class="tabs-hint__title">
57
+ ${i.M.get("lang","tabs_hint_title")||"Tip: switch between tabs"}
58
+ </p>
59
+ <p class="tabs-hint__body">
60
+ ${i.M.get("lang","tabs_hint_body")||"Use these tabs to move between Settings, Animations, Interactions and Style — available for every element, including button links."}
61
+ </p>
62
+ <div class="tabs-hint__actions">
63
+ <button
64
+ class="tabs-hint__btn"
65
+ @click=${this.dismissHint}
66
+ autofocus
67
+ >
68
+ ${i.M.get("lang","got_it")||"Got it"}
69
+ </button>
70
+ </div>
71
+ </div>
72
+ `}}l.styles=o.AH`
17
73
  :host {
18
74
  height: 100%;
19
- display: block;
75
+ display: flex;
76
+ flex-direction: column;
20
77
  direction: var(--direction-locale);
21
78
  position: absolute;
22
79
  width: 100%;
@@ -29,32 +86,157 @@
29
86
  outline: none;
30
87
  box-shadow: var(--focus-ring-inset, inset 0 0 0 2px #6366f1);
31
88
  }
89
+ /* Header tab row: text tabs across the top. Tabs grow to fill when there
90
+ are only a few; the row scrolls horizontally if an editor has many —
91
+ labels are never truncated. */
92
+ .tabs-row {
93
+ flex: 0 0 auto;
94
+ display: flex;
95
+ gap: var(--space-1, 2px);
96
+ padding: var(--space-2, 6px) var(--space-3, 10px) 0;
97
+ border-bottom: 1px solid var(--color-border, #eaeaee);
98
+ overflow-x: auto;
99
+ scrollbar-width: none;
100
+ min-height: 42px;
101
+ }
102
+ .tabs-row::-webkit-scrollbar {
103
+ display: none;
104
+ }
32
105
  cdtr-editor-tab-item {
33
- width: 100%;
106
+ flex: 1 0 auto;
34
107
  }
35
- .icon-tabs {
36
- padding: var(--space-3, 12px) 0;
37
- background: var(--color-bg-subtle, #fafafa);
38
- width: 52px;
39
- height: 100%;
40
- min-height: 400px;
41
- border-left: 1px solid var(--color-border, #eaeaee);
42
- direction: ltr;
108
+ .content {
109
+ flex: 1;
110
+ overflow-y: auto;
111
+ overflow-x: hidden;
112
+ padding-top: var(--space-3, 12px);
113
+ /* Clear the absolutely-positioned Creaditor logo footer (~35px tall,
114
+ offset below the sidebar) so the last accordion can scroll fully into
115
+ view instead of staying trapped behind it. */
116
+ padding-bottom: 60px;
117
+ }
118
+
119
+ /* Pinned outside .content so it stays put while the sections scroll. */
120
+ .toggle-row {
121
+ flex: 0 0 auto;
43
122
  display: flex;
44
- flex-direction: column;
123
+ justify-content: flex-end;
124
+ padding: var(--space-2, 8px) var(--space-4, 16px) var(--space-1, 4px);
125
+ }
126
+ .toggle-all {
127
+ display: inline-flex;
45
128
  align-items: center;
46
129
  gap: var(--space-1, 4px);
130
+ flex: 0 0 auto;
131
+ padding: 2px 0;
132
+ border: none;
133
+ background: transparent;
134
+ font-family: inherit;
135
+ font-size: var(--text-xs, 12px);
136
+ color: var(--color-text-secondary, #555);
137
+ cursor: pointer;
138
+ white-space: nowrap;
139
+ }
140
+ .toggle-all:hover {
141
+ color: var(--color-text, #1a1a1f);
142
+ text-decoration: underline;
143
+ }
144
+ .toggle-all:focus-visible {
145
+ outline: none;
146
+ border-radius: 4px;
147
+ box-shadow: 0 0 0 2px var(--color-primary, #6366f1);
47
148
  }
48
149
 
49
- .main {
50
- height: 100%;
51
- direction: rtl;
150
+ /* One-time coachmark that points at the tab row. */
151
+ .tabs-row.hint-active {
152
+ position: relative;
153
+ animation: tabsHintGlow 1.6s ease-in-out infinite;
154
+ border-radius: 8px 8px 0 0;
52
155
  }
53
- .content {
54
- overflow-y: auto;
55
- overflow-x: hidden;
56
- max-height: calc(100vh - 130px);
57
- min-height: 80%;
58
- padding-top: var(--space-3, 12px);
156
+ @keyframes tabsHintGlow {
157
+ 0%,
158
+ 100% {
159
+ background: transparent;
160
+ }
161
+ 50% {
162
+ background: color-mix(
163
+ in srgb,
164
+ var(--color-primary, #6366f1) 8%,
165
+ transparent
166
+ );
167
+ }
168
+ }
169
+ .tabs-hint {
170
+ position: absolute;
171
+ top: 48px;
172
+ left: var(--space-3, 10px);
173
+ right: var(--space-3, 10px);
174
+ z-index: 20;
175
+ background: var(--color-surface, #fff);
176
+ color: var(--color-text, #1a1a1a);
177
+ border: 1px solid var(--color-border, #eaeaee);
178
+ border-radius: 12px;
179
+ box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
180
+ padding: 14px 16px;
181
+ animation: tabsHintIn 220ms var(--ease-default, ease) both;
182
+ }
183
+ @keyframes tabsHintIn {
184
+ from {
185
+ opacity: 0;
186
+ transform: translateY(-6px);
187
+ }
188
+ to {
189
+ opacity: 1;
190
+ transform: translateY(0);
191
+ }
192
+ }
193
+ /* Arrow pointing up at the active tab. */
194
+ .tabs-hint::before {
195
+ content: "";
196
+ position: absolute;
197
+ top: -7px;
198
+ inset-inline-end: 24px;
199
+ width: 12px;
200
+ height: 12px;
201
+ background: var(--color-surface, #fff);
202
+ border-left: 1px solid var(--color-border, #eaeaee);
203
+ border-top: 1px solid var(--color-border, #eaeaee);
204
+ transform: rotate(45deg);
205
+ }
206
+ .tabs-hint__title {
207
+ font-size: 13px;
208
+ font-weight: 700;
209
+ margin: 0 0 4px;
210
+ color: var(--color-primary, #6366f1);
211
+ }
212
+ .tabs-hint__body {
213
+ font-size: 12.5px;
214
+ line-height: 1.5;
215
+ margin: 0 0 12px;
216
+ color: var(--color-text-secondary, #555);
217
+ }
218
+ .tabs-hint__actions {
219
+ display: flex;
220
+ justify-content: flex-end;
221
+ }
222
+ .tabs-hint__btn {
223
+ font-family: inherit;
224
+ font-size: 12.5px;
225
+ font-weight: 600;
226
+ color: #fff;
227
+ background: var(--color-primary, #6366f1);
228
+ border: none;
229
+ border-radius: 8px;
230
+ padding: 7px 16px;
231
+ cursor: pointer;
232
+ transition: filter var(--duration-fast, 120ms) var(--ease-default, ease);
233
+ }
234
+ .tabs-hint__btn:hover {
235
+ filter: brightness(1.08);
236
+ }
237
+ .tabs-hint__btn:focus-visible {
238
+ outline: none;
239
+ box-shadow: 0 0 0 2px var(--color-surface, #fff),
240
+ 0 0 0 4px var(--color-primary, #6366f1);
59
241
  }
60
- `,s.properties={tabs:{type:Array},value:{type:String}},customElements.define("cdtr-editor-tabs",s)}}]);
242
+ `,l.properties={tabs:{type:Array},value:{type:String},showHint:{type:Boolean,state:!0},_sectionCount:{type:Number,state:!0},_allExpanded:{type:Boolean,state:!0}},customElements.define("cdtr-editor-tabs",l)}}]);
Binary file
@@ -1,23 +1,52 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[638],{638(e,t,i){i.r(t),i.d(t,{DevicePicker:()=>h});var o,r,c,n,d=i(59088),s=i(36936),p=i(59929);let h=(o=(0,i(49410).MZ)({type:String}),(n=class extends p.WF{constructor(){super(),(0,d.A)(this,"device",c,this),this.device="desktop"}choose(e){this.device=e}render(){return p.qy` <cdtr-row alignItems="center">
2
- <paper-button @click=${()=>this.choose("phone")}>
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[638],{638(e,t,o){o.r(t),o.d(t,{DevicePicker:()=>i});var r=o(59929);class i extends r.WF{constructor(){super(),this.device=void 0,this.device="desktop"}choose(e){this.device!==e&&(this.device=e,this.dispatchEvent(new CustomEvent("device-change",{detail:{device:e},bubbles:!0,composed:!0})))}render(){return r.qy`<div class="segmented" role="group">
2
+ <button
3
+ type="button"
4
+ aria-pressed=${"desktop"===this.device}
5
+ @click=${()=>this.choose("desktop")}
6
+ >
7
+ <cdtr-tooltip content="design_for_desktop">
8
+ <cdtr-icon width="18" icon="desktop"></cdtr-icon>
9
+ </cdtr-tooltip>
10
+ </button>
11
+ <button
12
+ type="button"
13
+ aria-pressed=${"phone"===this.device}
14
+ @click=${()=>this.choose("phone")}
15
+ >
3
16
  <cdtr-tooltip content="design_for_phone">
4
- <cdtr-icon
5
- color=${"phone"===this.device?"var(--primary)":""}
6
- width="18"
7
- icon="phone"
8
- ></cdtr-icon>
17
+ <cdtr-icon width="18" icon="phone"></cdtr-icon>
9
18
  </cdtr-tooltip>
10
- </paper-button>
11
- <paper-button @click=${()=>this.choose("desktop")}
12
- ><cdtr-tooltip content="design_for_desktop"
13
- ><cdtr-icon
14
- color=${"desktop"===this.device?"var(--primary)":""}
15
- width="18"
16
- icon="desktop"
17
- ></cdtr-icon></cdtr-tooltip></paper-button
18
- ></cdtr-row>`}}).styles=p.AH`
19
- paper-button {
20
- padding: 0;
21
- min-width: 0;
19
+ </button>
20
+ </div>`}}i.properties={device:{type:String,reflect:!0}},i.styles=r.AH`
21
+ :host {
22
+ display: inline-flex;
23
+ }
24
+ .segmented {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ gap: 2px;
28
+ padding: 2px;
29
+ border-radius: 8px;
30
+ background: var(--surface-2, rgba(0, 0, 0, 0.05));
31
+ }
32
+ button {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ padding: 4px 6px;
37
+ border: none;
38
+ border-radius: 6px;
39
+ background: transparent;
40
+ cursor: pointer;
41
+ color: var(--text-secondary, #6b7280);
42
+ transition: background 0.15s ease, color 0.15s ease;
43
+ }
44
+ button:hover {
45
+ background: var(--surface-3, rgba(0, 0, 0, 0.06));
46
+ }
47
+ button[aria-pressed="true"] {
48
+ background: var(--surface-1, #fff);
49
+ color: var(--color-primary, #6366f1);
50
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
22
51
  }
23
- `,r=n,c=(0,s.A)(r.prototype,"device",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),r);customElements.define("cdtr-device-picker",h)}}]);
52
+ `,customElements.define("cdtr-device-picker",i)}}]);
Binary file
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[6814],{46814(e,t,s){s.d(t,{default:()=>I});const n={en:{key:"English",value:"en"},he:{key:"Hebrew",value:"he"},ar:{key:"Arabic",value:"ar"}},o=Object.keys(n).map(e=>n[e]),r=e=>{const{component:t,commands:s,helpers:r,template:a}=e;return{select:e=>{let{changeTab:t,tab:s}=e;"design"!==s.text&&t("design")},tabs:e=>{const t=[{text:"design"}];return t.forEach(t=>t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:l}=e;return[{type:"input",title:"address",value:t.props.address,onChange:e=>{const t=e.target.value;s.execCommand("address",t)}},{type:"divider"},{type:"dropdown",title:"type",active:()=>"design"===r.text,selected:n[t.props.lang]?.value,value:n[t.props.lang]?.value,onChange:e=>{const t=e.target.value;s.execCommand("lang",t)},items:o},{type:"divider"},{type:"slider",title:"size",min:100,max:1e3,active:()=>"design"===r.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;s.execCommand("style",{width:t+"px",height:t/1.8+"px"})}},{type:"divider"},{type:"radius",title:"radius",active:()=>"design"===r.text,min:0,max:parseInt(t.props.style.width)/2,value:parseInt(t.props.style.borderRadius),elementId:t.id,borderTopRightRadius:parseInt(t.props.style.borderTopRightRadius),borderTopLeftRadius:parseInt(t.props.style.borderTopLeftRadius),borderBottomRightRadius:parseInt(t.props.style.borderBottomRightRadius),borderBottomLeftRadius:parseInt(t.props.style.borderBottomLeftRadius),onInput:e=>{s.execCommand("style",{...e.target.json})}}]}}};var a=s(52144);const l=e=>{let{helpers:t,image:s}=e;return{set:(e,t,s)=>{switch(t){case"style":if("object"==typeof s)return e[t]=(0,a.A)(e[t],s),!0;case"src":case"isFullWidthOnMobile":case"isOpenWithModal":case"isCircle":case"onClick":case"alt":return e[t]=s,!0}}}},i="AIzaSyAAWI9NHgjWXKv6Vu2RqsMnzcHd5gx3vvY";var p=s(72591),d=s.n(p),c=s(88639),m=s.n(c),u=s(88128),h=s.n(u),g=s(30855),A=s.n(g),y=s(93051),v=s.n(y),b=s(69632),C={};C.setAttributes=A(),C.insert=h().bind(null,"head"),C.domAPI=m(),C.insertStyleElement=v();d()(b.A,C);const f=b.A&&b.A.locals?b.A.locals:void 0,I=()=>{!function(){const e="google-google-map-script";if(document.getElementById(e))return null;let t=document.createElement("script");t.id=e,t.type="text/javascript",t.src=`https://maps.googleapis.com/maps/api/js?key=${i}&callback=initMap`,document.body.appendChild(t)}();return{name:"map",create:e=>{const{createElement:t,compose:s,helpers:n}=e,o=document.createElement("div");o.classList.add(f.root);const a=document.createElement("div");a.classList.add(f.cover);const p=document.createElement("iframe");return p.loading="lazy",p.allowFullscreen="true",p.referrerpolicy="no-referrer-when-downgrade",o.append(p,a),t({name:"map",id:s.id,template:o,atomElement:p,render:()=>{p.width=s.props.style.width,p.height=s.props.style.height;const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";return`https://www.google.com/maps/embed/v1/place?q=${encodeURIComponent(e)}&key=${i}&language=${t}`}(s.props.address,s.props.lang);p.src=e;for(const e in s.props.style)if(Object.hasOwnProperty.call(s.props.style,e)){const t=s.props.style[e];p.style[e]=t}},defaultProps:{style:{height:"200px",width:"200px"},address:"תל אביב"},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>o,handleBar:!0,validator:l({template:o,helpers:n}),schema:s.schema,onSelect:e=>{o.classList.add(e)},onDeselect:e=>{o.classList.remove(e)},elementProps:s,remove:()=>{o.remove()},createEditor:r})}}}},69632(e,t,s){s.d(t,{A:()=>l});var n=s(82001),o=s.n(n),r=s(40935),a=s.n(r)()(o());a.push([e.id,".K7psR4JLWOUIitZzJsh_ {\n position: relative;\n }\n .D3YnVg9f4nr9mHqbRr27 {\n display: none;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n background-color: var(--primary);\n opacity: 0.6;\n }\n \n .K7psR4JLWOUIitZzJsh_:hover .D3YnVg9f4nr9mHqbRr27 {\n display: block;\n }\n ","",{version:3,sources:["webpack://./../web-editors/map-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;IACI,kBAAkB;EACpB;EACA;IACE,aAAa;IACb,WAAW;IACX,YAAY;IACZ,OAAO;IACP,MAAM;IACN,kBAAkB;IAClB,gCAAgC;IAChC,YAAY;EACd;;EAEA;IACE,cAAc;EAChB",sourcesContent:[".root {\n position: relative;\n }\n .cover {\n display: none;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n background-color: var(--primary);\n opacity: 0.6;\n }\n \n .root:hover .cover {\n display: block;\n }\n "],sourceRoot:""}]),a.locals={root:"K7psR4JLWOUIitZzJsh_",cover:"D3YnVg9f4nr9mHqbRr27"};const l=a}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[6814],{46814(e,t,s){s.d(t,{default:()=>I});const n={en:{key:"English",value:"en"},he:{key:"Hebrew",value:"he"},ar:{key:"Arabic",value:"ar"}},o=Object.keys(n).map(e=>n[e]),r=e=>{const{component:t,commands:s,helpers:r,template:a}=e;return{select:e=>{let{changeTab:t,tab:s}=e;"style"!==s.text&&t("style")},tabs:e=>{const t=[{text:"style"}];return t.forEach(t=>t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:l}=e;return[{type:"input",title:"address",value:t.props.address,onChange:e=>{const t=e.target.value;s.execCommand("address",t)}},{type:"divider"},{type:"dropdown",title:"type",active:()=>"style"===r.text,selected:n[t.props.lang]?.value,value:n[t.props.lang]?.value,onChange:e=>{const t=e.target.value;s.execCommand("lang",t)},items:o},{type:"divider"},{type:"slider",title:"size",min:100,max:1e3,active:()=>"style"===r.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;s.execCommand("style",{width:t+"px",height:t/1.8+"px"})}},{type:"divider"},{type:"radius",title:"radius",active:()=>"style"===r.text,min:0,max:parseInt(t.props.style.width)/2,value:parseInt(t.props.style.borderRadius),elementId:t.id,borderTopRightRadius:parseInt(t.props.style.borderTopRightRadius),borderTopLeftRadius:parseInt(t.props.style.borderTopLeftRadius),borderBottomRightRadius:parseInt(t.props.style.borderBottomRightRadius),borderBottomLeftRadius:parseInt(t.props.style.borderBottomLeftRadius),onInput:e=>{s.execCommand("style",{...e.target.json})}}]}}};var a=s(52144);const l=e=>{let{helpers:t,image:s}=e;return{set:(e,t,s)=>{switch(t){case"style":if("object"==typeof s)return e[t]=(0,a.A)(e[t],s),!0;case"src":case"isFullWidthOnMobile":case"isOpenWithModal":case"isCircle":case"onClick":case"alt":return e[t]=s,!0}}}},p="AIzaSyAAWI9NHgjWXKv6Vu2RqsMnzcHd5gx3vvY";var i=s(72591),d=s.n(i),c=s(88639),m=s.n(c),u=s(88128),h=s.n(u),y=s(30855),A=s.n(y),g=s(93051),v=s.n(g),b=s(69632),C={};C.setAttributes=A(),C.insert=h().bind(null,"head"),C.domAPI=m(),C.insertStyleElement=v();d()(b.A,C);const f=b.A&&b.A.locals?b.A.locals:void 0,I=()=>{!function(){const e="google-google-map-script";if(document.getElementById(e))return null;let t=document.createElement("script");t.id=e,t.type="text/javascript",t.src=`https://maps.googleapis.com/maps/api/js?key=${p}&callback=initMap`,document.body.appendChild(t)}();return{name:"map",create:e=>{const{createElement:t,compose:s,helpers:n}=e,o=document.createElement("div");o.classList.add(f.root);const a=document.createElement("div");a.classList.add(f.cover);const i=document.createElement("iframe");return i.loading="lazy",i.allowFullscreen="true",i.referrerpolicy="no-referrer-when-downgrade",o.append(i,a),t({name:"map",id:s.id,template:o,atomElement:i,render:()=>{i.width=s.props.style.width,i.height=s.props.style.height;const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";return`https://www.google.com/maps/embed/v1/place?q=${encodeURIComponent(e)}&key=${p}&language=${t}`}(s.props.address,s.props.lang);i.src=e;for(const e in s.props.style)if(Object.hasOwnProperty.call(s.props.style,e)){const t=s.props.style[e];i.style[e]=t}},defaultProps:{style:{height:"200px",width:"200px"},address:"תל אביב"},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>o,handleBar:!0,validator:l({template:o,helpers:n}),schema:s.schema,onSelect:e=>{o.classList.add(e)},onDeselect:e=>{o.classList.remove(e)},elementProps:s,remove:()=>{o.remove()},createEditor:r})}}}},69632(e,t,s){s.d(t,{A:()=>l});var n=s(82001),o=s.n(n),r=s(40935),a=s.n(r)()(o());a.push([e.id,".K7psR4JLWOUIitZzJsh_ {\n position: relative;\n }\n .D3YnVg9f4nr9mHqbRr27 {\n display: none;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n background-color: var(--primary);\n opacity: 0.6;\n }\n \n .K7psR4JLWOUIitZzJsh_:hover .D3YnVg9f4nr9mHqbRr27 {\n display: block;\n }\n ","",{version:3,sources:["webpack://./../web-editors/map-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;IACI,kBAAkB;EACpB;EACA;IACE,aAAa;IACb,WAAW;IACX,YAAY;IACZ,OAAO;IACP,MAAM;IACN,kBAAkB;IAClB,gCAAgC;IAChC,YAAY;EACd;;EAEA;IACE,cAAc;EAChB",sourcesContent:[".root {\n position: relative;\n }\n .cover {\n display: none;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n background-color: var(--primary);\n opacity: 0.6;\n }\n \n .root:hover .cover {\n display: block;\n }\n "],sourceRoot:""}]),a.locals={root:"K7psR4JLWOUIitZzJsh_",cover:"D3YnVg9f4nr9mHqbRr27"};const l=a}}]);
Binary file