@innovastudio/contentbuilder 1.5.203 → 1.5.205
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.
package/package.json
CHANGED
|
@@ -48835,7 +48835,7 @@ class ButtonEditor {
|
|
|
48835
48835
|
}
|
|
48836
48836
|
|
|
48837
48837
|
// Build style and attributes based on type
|
|
48838
|
-
if (type === '
|
|
48838
|
+
if (type === 'outline2') {
|
|
48839
48839
|
// Outline button
|
|
48840
48840
|
const borderClass = borderColor ? '' : 'border-current hover:border-current';
|
|
48841
48841
|
classes += ` ${borderClass}`;
|
|
@@ -48845,6 +48845,31 @@ class ButtonEditor {
|
|
|
48845
48845
|
return {
|
|
48846
48846
|
html: `<a href="${href}" role="button" class="${classes}"${styleAttr ? ' ' + styleAttr : ''}>${text}</a>`
|
|
48847
48847
|
};
|
|
48848
|
+
} else if (type === 'outline') {
|
|
48849
|
+
// Solid button with background
|
|
48850
|
+
classes += ' border-current hover:border-transparent';
|
|
48851
|
+
let html = '<a\n';
|
|
48852
|
+
html += ` href="${href}"\n`;
|
|
48853
|
+
html += ' role="button"\n';
|
|
48854
|
+
html += ` class="${classes}"\n`;
|
|
48855
|
+
if (color || bg) {
|
|
48856
|
+
const styles = [];
|
|
48857
|
+
if (color) styles.push(`color: ${color}`);
|
|
48858
|
+
if (bg) styles.push(`background-color: ${bg}`);
|
|
48859
|
+
html += ` style="${styles.join('; ')};"`;
|
|
48860
|
+
}
|
|
48861
|
+
if (bg && hoverBg) {
|
|
48862
|
+
html += `\n data-bg="${bg}"`;
|
|
48863
|
+
html += `\n data-hover-bg="${hoverBg}"`;
|
|
48864
|
+
html += '\n onmouseover="if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');"';
|
|
48865
|
+
html += '\n onmouseout="if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\';"';
|
|
48866
|
+
}
|
|
48867
|
+
html += '>\n';
|
|
48868
|
+
html += ` ${text}\n`;
|
|
48869
|
+
html += '</a>';
|
|
48870
|
+
return {
|
|
48871
|
+
html
|
|
48872
|
+
};
|
|
48848
48873
|
} else if (type === 'solid') {
|
|
48849
48874
|
// Solid button with background
|
|
48850
48875
|
classes += ' border-transparent hover:border-transparent';
|
|
@@ -48887,7 +48912,11 @@ class ButtonEditor {
|
|
|
48887
48912
|
}, {
|
|
48888
48913
|
type: 'outline',
|
|
48889
48914
|
shape: 'rounded',
|
|
48890
|
-
text: 'Read More'
|
|
48915
|
+
text: 'Read More',
|
|
48916
|
+
color: 'rgb(24, 24, 27)',
|
|
48917
|
+
bg: 'transparent',
|
|
48918
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
48919
|
+
customClasses: 'hover:text-white'
|
|
48891
48920
|
}, {
|
|
48892
48921
|
type: 'solid',
|
|
48893
48922
|
shape: 'rounded',
|
|
@@ -48908,7 +48937,8 @@ class ButtonEditor {
|
|
|
48908
48937
|
text: 'Read More',
|
|
48909
48938
|
color: 'rgb(250, 250, 250)',
|
|
48910
48939
|
bg: 'transparent',
|
|
48911
|
-
hoverBg: '
|
|
48940
|
+
hoverBg: '#fff',
|
|
48941
|
+
customClasses: 'hover:text-black'
|
|
48912
48942
|
}, {
|
|
48913
48943
|
type: 'solid',
|
|
48914
48944
|
shape: 'rounded',
|
|
@@ -49025,7 +49055,11 @@ class ButtonEditor {
|
|
|
49025
49055
|
}, {
|
|
49026
49056
|
type: 'outline',
|
|
49027
49057
|
shape: 'slightly-rounded',
|
|
49028
|
-
text: 'Read More'
|
|
49058
|
+
text: 'Read More',
|
|
49059
|
+
color: 'rgb(24, 24, 27)',
|
|
49060
|
+
bg: 'transparent',
|
|
49061
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49062
|
+
customClasses: 'hover:text-white'
|
|
49029
49063
|
}, {
|
|
49030
49064
|
type: 'solid',
|
|
49031
49065
|
shape: 'slightly-rounded',
|
|
@@ -49046,7 +49080,8 @@ class ButtonEditor {
|
|
|
49046
49080
|
text: 'Read More',
|
|
49047
49081
|
color: 'rgb(250, 250, 250)',
|
|
49048
49082
|
bg: 'transparent',
|
|
49049
|
-
hoverBg: '
|
|
49083
|
+
hoverBg: '#fff',
|
|
49084
|
+
customClasses: 'hover:text-black'
|
|
49050
49085
|
}, {
|
|
49051
49086
|
type: 'solid',
|
|
49052
49087
|
shape: 'slightly-rounded',
|
|
@@ -49163,7 +49198,11 @@ class ButtonEditor {
|
|
|
49163
49198
|
}, {
|
|
49164
49199
|
type: 'outline',
|
|
49165
49200
|
shape: 'square',
|
|
49166
|
-
text: 'Read More'
|
|
49201
|
+
text: 'Read More',
|
|
49202
|
+
color: 'rgb(24, 24, 27)',
|
|
49203
|
+
bg: 'transparent',
|
|
49204
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49205
|
+
customClasses: 'hover:text-white'
|
|
49167
49206
|
}, {
|
|
49168
49207
|
type: 'solid',
|
|
49169
49208
|
shape: 'square',
|
|
@@ -49184,7 +49223,8 @@ class ButtonEditor {
|
|
|
49184
49223
|
text: 'Read More',
|
|
49185
49224
|
color: 'rgb(250, 250, 250)',
|
|
49186
49225
|
bg: 'transparent',
|
|
49187
|
-
hoverBg: '
|
|
49226
|
+
hoverBg: '#fff',
|
|
49227
|
+
customClasses: 'hover:text-black'
|
|
49188
49228
|
}, {
|
|
49189
49229
|
type: 'solid',
|
|
49190
49230
|
shape: 'square',
|
|
@@ -49303,7 +49343,11 @@ class ButtonEditor {
|
|
|
49303
49343
|
type: 'outline',
|
|
49304
49344
|
shape: 'rounded',
|
|
49305
49345
|
size: 'small',
|
|
49306
|
-
text: 'Read More'
|
|
49346
|
+
text: 'Read More',
|
|
49347
|
+
color: 'rgb(24, 24, 27)',
|
|
49348
|
+
bg: 'transparent',
|
|
49349
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49350
|
+
customClasses: 'hover:text-white'
|
|
49307
49351
|
}, {
|
|
49308
49352
|
type: 'solid',
|
|
49309
49353
|
shape: 'rounded',
|
|
@@ -49327,7 +49371,8 @@ class ButtonEditor {
|
|
|
49327
49371
|
text: 'Read More',
|
|
49328
49372
|
color: 'rgb(250, 250, 250)',
|
|
49329
49373
|
bg: 'transparent',
|
|
49330
|
-
hoverBg: '
|
|
49374
|
+
hoverBg: '#fff',
|
|
49375
|
+
customClasses: 'hover:text-black'
|
|
49331
49376
|
}, {
|
|
49332
49377
|
type: 'solid',
|
|
49333
49378
|
shape: 'rounded',
|
|
@@ -49449,7 +49494,11 @@ class ButtonEditor {
|
|
|
49449
49494
|
type: 'outline',
|
|
49450
49495
|
shape: 'slightly-rounded',
|
|
49451
49496
|
size: 'small',
|
|
49452
|
-
text: 'Read More'
|
|
49497
|
+
text: 'Read More',
|
|
49498
|
+
color: 'rgb(24, 24, 27)',
|
|
49499
|
+
bg: 'transparent',
|
|
49500
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49501
|
+
customClasses: 'hover:text-white'
|
|
49453
49502
|
}, {
|
|
49454
49503
|
type: 'solid',
|
|
49455
49504
|
shape: 'slightly-rounded',
|
|
@@ -49473,7 +49522,8 @@ class ButtonEditor {
|
|
|
49473
49522
|
text: 'Read More',
|
|
49474
49523
|
color: 'rgb(250, 250, 250)',
|
|
49475
49524
|
bg: 'transparent',
|
|
49476
|
-
hoverBg: '
|
|
49525
|
+
hoverBg: '#fff',
|
|
49526
|
+
customClasses: 'hover:text-black'
|
|
49477
49527
|
}, {
|
|
49478
49528
|
type: 'solid',
|
|
49479
49529
|
shape: 'slightly-rounded',
|
|
@@ -49595,7 +49645,11 @@ class ButtonEditor {
|
|
|
49595
49645
|
type: 'outline',
|
|
49596
49646
|
shape: 'rounded',
|
|
49597
49647
|
size: 'large',
|
|
49598
|
-
text: 'Read More'
|
|
49648
|
+
text: 'Read More',
|
|
49649
|
+
color: 'rgb(24, 24, 27)',
|
|
49650
|
+
bg: 'transparent',
|
|
49651
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49652
|
+
customClasses: 'hover:text-white'
|
|
49599
49653
|
}, {
|
|
49600
49654
|
type: 'solid',
|
|
49601
49655
|
shape: 'rounded',
|
|
@@ -49619,7 +49673,8 @@ class ButtonEditor {
|
|
|
49619
49673
|
text: 'Read More',
|
|
49620
49674
|
color: 'rgb(250, 250, 250)',
|
|
49621
49675
|
bg: 'transparent',
|
|
49622
|
-
hoverBg: '
|
|
49676
|
+
hoverBg: '#fff',
|
|
49677
|
+
customClasses: 'hover:text-black'
|
|
49623
49678
|
}, {
|
|
49624
49679
|
type: 'solid',
|
|
49625
49680
|
shape: 'rounded',
|
|
@@ -49741,7 +49796,11 @@ class ButtonEditor {
|
|
|
49741
49796
|
type: 'outline',
|
|
49742
49797
|
shape: 'slightly-rounded',
|
|
49743
49798
|
size: 'large',
|
|
49744
|
-
text: 'Read More'
|
|
49799
|
+
text: 'Read More',
|
|
49800
|
+
color: 'rgb(24, 24, 27)',
|
|
49801
|
+
bg: 'transparent',
|
|
49802
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49803
|
+
customClasses: 'hover:text-white'
|
|
49745
49804
|
}, {
|
|
49746
49805
|
type: 'solid',
|
|
49747
49806
|
shape: 'slightly-rounded',
|
|
@@ -49765,7 +49824,8 @@ class ButtonEditor {
|
|
|
49765
49824
|
text: 'Read More',
|
|
49766
49825
|
color: 'rgb(250, 250, 250)',
|
|
49767
49826
|
bg: 'transparent',
|
|
49768
|
-
hoverBg: '
|
|
49827
|
+
hoverBg: '#fff',
|
|
49828
|
+
customClasses: 'hover:text-black'
|
|
49769
49829
|
}, {
|
|
49770
49830
|
type: 'solid',
|
|
49771
49831
|
shape: 'slightly-rounded',
|
|
@@ -49887,7 +49947,11 @@ class ButtonEditor {
|
|
|
49887
49947
|
type: 'outline',
|
|
49888
49948
|
shape: 'square',
|
|
49889
49949
|
size: 'large',
|
|
49890
|
-
text: 'Read More'
|
|
49950
|
+
text: 'Read More',
|
|
49951
|
+
color: 'rgb(24, 24, 27)',
|
|
49952
|
+
bg: 'transparent',
|
|
49953
|
+
hoverBg: 'rgb(24, 24, 27)',
|
|
49954
|
+
customClasses: 'hover:text-white'
|
|
49891
49955
|
}, {
|
|
49892
49956
|
type: 'solid',
|
|
49893
49957
|
shape: 'square',
|
|
@@ -49911,7 +49975,8 @@ class ButtonEditor {
|
|
|
49911
49975
|
text: 'Read More',
|
|
49912
49976
|
color: 'rgb(250, 250, 250)',
|
|
49913
49977
|
bg: 'transparent',
|
|
49914
|
-
hoverBg: '
|
|
49978
|
+
hoverBg: '#fff',
|
|
49979
|
+
customClasses: 'hover:text-black'
|
|
49915
49980
|
}, {
|
|
49916
49981
|
type: 'solid',
|
|
49917
49982
|
shape: 'square',
|
|
@@ -100045,6 +100110,9 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
|
|
|
100045
100110
|
if (this.opts.onBlockCanvasAdd) this.opts.onBlockCanvasAdd();
|
|
100046
100111
|
this.opts.onChange();
|
|
100047
100112
|
this.opts.onRender();
|
|
100113
|
+
|
|
100114
|
+
// Reinit after drag drop block
|
|
100115
|
+
if (this.win.builderRuntime) this.win.builderRuntime.reinitialize();
|
|
100048
100116
|
}
|
|
100049
100117
|
|
|
100050
100118
|
// destroy
|