@gem-sdk/components 2.0.0-dev.532 → 2.0.0-dev.534
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/dist/cjs/carousel/setting/configs/presets.js +6 -0
- package/dist/cjs/carousel/setting/configs/settingV2.js +8 -6
- package/dist/cjs/carousel/setting/configs/uiV2.js +78 -18
- package/dist/cjs/collection/components/collection-description/common/index.js +0 -2
- package/dist/cjs/collection/components/collection-description/common/styles.js +4 -4
- package/dist/cjs/collection/components/collection-description/components/CollectionDescription.js +5 -5
- package/dist/cjs/collection/components/collection-description/components/CollectionDescription.liquid.js +6 -9
- package/dist/cjs/collection/components/collection-paginator/common/index.js +2 -1
- package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +4 -9
- package/dist/cjs/collection/setting/collection-banner/configs/settings.js +38 -35
- package/dist/cjs/collection/setting/collection-banner/configs/uiV2.js +47 -43
- package/dist/cjs/collection/setting/collection-description/configs/uiV2.js +38 -4
- package/dist/cjs/collection/setting/collection-paginator/configs/settings.js +7 -3
- package/dist/cjs/collection/setting/collection-paginator/configs/uiV2.js +64 -31
- package/dist/cjs/collection/setting/collection-toolbar/configs/settings.js +2 -2
- package/dist/cjs/collection/setting/collection-toolbar/configs/uiV2.js +1 -1
- package/dist/esm/carousel/setting/configs/presets.js +6 -0
- package/dist/esm/carousel/setting/configs/settingV2.js +8 -6
- package/dist/esm/carousel/setting/configs/uiV2.js +78 -18
- package/dist/esm/collection/components/collection-description/common/index.js +1 -2
- package/dist/esm/collection/components/collection-description/common/styles.js +5 -5
- package/dist/esm/collection/components/collection-description/components/CollectionDescription.js +7 -7
- package/dist/esm/collection/components/collection-description/components/CollectionDescription.liquid.js +7 -10
- package/dist/esm/collection/components/collection-paginator/common/index.js +2 -1
- package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +4 -9
- package/dist/esm/collection/setting/collection-banner/configs/settings.js +38 -35
- package/dist/esm/collection/setting/collection-banner/configs/uiV2.js +47 -43
- package/dist/esm/collection/setting/collection-description/configs/uiV2.js +38 -4
- package/dist/esm/collection/setting/collection-paginator/configs/settings.js +7 -3
- package/dist/esm/collection/setting/collection-paginator/configs/uiV2.js +64 -31
- package/dist/esm/collection/setting/collection-toolbar/configs/settings.js +2 -2
- package/dist/esm/collection/setting/collection-toolbar/configs/uiV2.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -228,13 +228,13 @@ const CarouselSettingsV2Setting = [
|
|
|
228
228
|
enableTooltip: true,
|
|
229
229
|
options: [
|
|
230
230
|
{
|
|
231
|
-
label: '
|
|
231
|
+
label: 'Outside',
|
|
232
232
|
value: 'outside',
|
|
233
233
|
type: 'slide-control',
|
|
234
234
|
svgName: 'gp-slide-control-outside'
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
|
-
label: '
|
|
237
|
+
label: 'Inside',
|
|
238
238
|
value: 'inside',
|
|
239
239
|
type: 'slide-control',
|
|
240
240
|
svgName: 'gp-slide-control-inside'
|
|
@@ -251,7 +251,7 @@ const CarouselSettingsV2Setting = [
|
|
|
251
251
|
type: 'icon',
|
|
252
252
|
hideInput: true,
|
|
253
253
|
hideLabel: true,
|
|
254
|
-
default: `<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
254
|
+
default: `<svg data-name="arrow" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
255
255
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.62204 5.13313C7.78476 4.95562 8.04858 4.95562 8.21129 5.13313L12.378 9.67859C12.5407 9.8561 12.5407 10.1439 12.378 10.3214L8.21129 14.8669C8.04858 15.0444 7.78476 15.0444 7.62204 14.8669C7.45932 14.6894 7.45932 14.4016 7.62204 14.224L11.4941 10L7.62204 5.77596C7.45932 5.59845 7.45932 5.31064 7.62204 5.13313Z"/>
|
|
256
256
|
</svg>
|
|
257
257
|
`
|
|
@@ -260,7 +260,8 @@ const CarouselSettingsV2Setting = [
|
|
|
260
260
|
id: 'arrowCustomColor',
|
|
261
261
|
label: 'Icon color',
|
|
262
262
|
type: 'color-picker-v2',
|
|
263
|
-
default: '#
|
|
263
|
+
default: '#121212',
|
|
264
|
+
compoDefaultValue: '#121212'
|
|
264
265
|
},
|
|
265
266
|
{
|
|
266
267
|
id: 'arrowIconSize',
|
|
@@ -355,7 +356,8 @@ const CarouselSettingsV2Setting = [
|
|
|
355
356
|
id: 'arrowBackgroundColor',
|
|
356
357
|
label: 'Background Color',
|
|
357
358
|
type: 'color-picker-v2',
|
|
358
|
-
default: 'transparent'
|
|
359
|
+
default: 'transparent',
|
|
360
|
+
compoDefaultValue: '#E2E2E2'
|
|
359
361
|
},
|
|
360
362
|
{
|
|
361
363
|
id: 'arrowBorder',
|
|
@@ -515,7 +517,7 @@ const CarouselSettingsV2Setting = [
|
|
|
515
517
|
value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_OUT.value
|
|
516
518
|
},
|
|
517
519
|
{
|
|
518
|
-
label: 'Ease in out',
|
|
520
|
+
label: 'Ease in & out',
|
|
519
521
|
value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN_OUT.value
|
|
520
522
|
}
|
|
521
523
|
]
|
|
@@ -221,14 +221,6 @@ const carouselEffectsSettings = {
|
|
|
221
221
|
en: 'Slide effect'
|
|
222
222
|
},
|
|
223
223
|
controls: [
|
|
224
|
-
{
|
|
225
|
-
label: {
|
|
226
|
-
en: 'Slide direction'
|
|
227
|
-
},
|
|
228
|
-
setting: {
|
|
229
|
-
id: 'rtl'
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
224
|
{
|
|
233
225
|
label: {
|
|
234
226
|
en: 'Autoplay'
|
|
@@ -239,7 +231,7 @@ const carouselEffectsSettings = {
|
|
|
239
231
|
},
|
|
240
232
|
{
|
|
241
233
|
label: {
|
|
242
|
-
en: '
|
|
234
|
+
en: 'Delay'
|
|
243
235
|
},
|
|
244
236
|
setting: {
|
|
245
237
|
id: 'autoplayTimeout'
|
|
@@ -257,12 +249,11 @@ const carouselEffectsSettings = {
|
|
|
257
249
|
},
|
|
258
250
|
{
|
|
259
251
|
label: {
|
|
260
|
-
en: '
|
|
252
|
+
en: 'Slide direction'
|
|
261
253
|
},
|
|
262
254
|
setting: {
|
|
263
|
-
id: '
|
|
264
|
-
}
|
|
265
|
-
conditionDisplay: 'autoplay === true'
|
|
255
|
+
id: 'rtl'
|
|
256
|
+
}
|
|
266
257
|
},
|
|
267
258
|
{
|
|
268
259
|
label: {
|
|
@@ -298,6 +289,13 @@ const carouselEffectsSettings = {
|
|
|
298
289
|
setting: {
|
|
299
290
|
id: 'animationMode'
|
|
300
291
|
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
setting: {
|
|
295
|
+
id: 'runPreview'
|
|
296
|
+
},
|
|
297
|
+
layout: 'vertical',
|
|
298
|
+
conditionDisplay: 'autoplay === true'
|
|
301
299
|
}
|
|
302
300
|
]
|
|
303
301
|
}
|
|
@@ -329,8 +327,12 @@ const SettingUIV2 = [
|
|
|
329
327
|
setting: {
|
|
330
328
|
id: 'sneakPeak'
|
|
331
329
|
},
|
|
332
|
-
fixedValue: '
|
|
330
|
+
fixedValue: 'Styled',
|
|
333
331
|
iconName: 'polaris-edit',
|
|
332
|
+
conditionEnable: 'itemNumber > 1',
|
|
333
|
+
options: {
|
|
334
|
+
disableMessage: `Sneak peek doesn't work <br> with 1-column layout`
|
|
335
|
+
},
|
|
334
336
|
controls: [
|
|
335
337
|
{
|
|
336
338
|
layout: 'vertical',
|
|
@@ -508,10 +510,68 @@ const SettingUIV2 = [
|
|
|
508
510
|
},
|
|
509
511
|
controls: [
|
|
510
512
|
{
|
|
511
|
-
|
|
512
|
-
|
|
513
|
+
id: 'Width',
|
|
514
|
+
label: {
|
|
515
|
+
en: 'Width'
|
|
513
516
|
},
|
|
514
|
-
|
|
517
|
+
controlConfig: {
|
|
518
|
+
id: 'width',
|
|
519
|
+
type: 'dropdown:input',
|
|
520
|
+
label: 'Width',
|
|
521
|
+
inputType: 'number',
|
|
522
|
+
units: [
|
|
523
|
+
'px',
|
|
524
|
+
'%'
|
|
525
|
+
],
|
|
526
|
+
hideUnit: false,
|
|
527
|
+
fallbackValue: 'Auto',
|
|
528
|
+
linkWithSetting: {
|
|
529
|
+
name: 'sizeSetting',
|
|
530
|
+
field: 'width'
|
|
531
|
+
},
|
|
532
|
+
displayOptions: [
|
|
533
|
+
{
|
|
534
|
+
label: 'Default',
|
|
535
|
+
value: 'default',
|
|
536
|
+
showValue: true
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
label: 'Full',
|
|
540
|
+
value: '100%',
|
|
541
|
+
showValue: true
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
layout: 'horizontal'
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
id: 'Height',
|
|
549
|
+
label: {
|
|
550
|
+
en: 'Height'
|
|
551
|
+
},
|
|
552
|
+
controlConfig: {
|
|
553
|
+
id: 'height',
|
|
554
|
+
type: 'dropdown:input',
|
|
555
|
+
label: 'height',
|
|
556
|
+
inputType: 'number',
|
|
557
|
+
units: [
|
|
558
|
+
'px'
|
|
559
|
+
],
|
|
560
|
+
hideUnit: false,
|
|
561
|
+
fallbackValue: 'Auto',
|
|
562
|
+
linkWithSetting: {
|
|
563
|
+
name: 'sizeSetting',
|
|
564
|
+
field: 'height'
|
|
565
|
+
},
|
|
566
|
+
displayOptions: [
|
|
567
|
+
{
|
|
568
|
+
label: 'Fit content',
|
|
569
|
+
value: 'Auto',
|
|
570
|
+
showValue: true
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
layout: 'horizontal'
|
|
515
575
|
},
|
|
516
576
|
{
|
|
517
577
|
label: {
|
|
@@ -519,7 +579,7 @@ const SettingUIV2 = [
|
|
|
519
579
|
},
|
|
520
580
|
conditionDisplay: `pageType != "POST_PURCHASE"`,
|
|
521
581
|
controlConfig: {
|
|
522
|
-
id: 'padding',
|
|
582
|
+
id: 'slider-padding',
|
|
523
583
|
type: 'padding-v2',
|
|
524
584
|
linkWithSetting: {
|
|
525
585
|
name: 'spacing-setting',
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
require('@gem-sdk/core');
|
|
4
4
|
var helpers = require('../../../../helpers.js');
|
|
5
5
|
|
|
6
|
-
const getTag = (htmlTag)=>htmlTag === 'html' ? 'div' : 'p';
|
|
7
6
|
const getViewMoreText = ({ setting, builderProps, pageContext, type })=>{
|
|
8
7
|
if (type === 'liquid') {
|
|
9
8
|
return helpers.getDynamicSourceLocales({
|
|
@@ -31,6 +30,5 @@ const getViewLessText = ({ setting, builderProps, pageContext, type })=>{
|
|
|
31
30
|
return setting?.viewLessText;
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
exports.getTag = getTag;
|
|
35
33
|
exports.getViewLessText = getViewLessText;
|
|
36
34
|
exports.getViewMoreText = getViewMoreText;
|
|
@@ -25,9 +25,9 @@ const getMaxHeightStyleDefault = (setting)=>{
|
|
|
25
25
|
const style = core.makeStyleResponsive('maxh', result);
|
|
26
26
|
return style;
|
|
27
27
|
};
|
|
28
|
-
const getDefaultStyleCollectionDes = (setting)=>{
|
|
28
|
+
const getDefaultStyleCollectionDes = ({ setting, renderMaxHeight })=>{
|
|
29
29
|
const appendTypoStyle = core.composeTypographyStyle(setting?.typo, setting?.typography);
|
|
30
|
-
return {
|
|
30
|
+
return core.filterTruthyStyles({
|
|
31
31
|
...core.getStyleShadow({
|
|
32
32
|
value: setting?.typo?.custom?.textShadow,
|
|
33
33
|
styleAppliedFor: 'text-shadow',
|
|
@@ -38,8 +38,8 @@ const getDefaultStyleCollectionDes = (setting)=>{
|
|
|
38
38
|
tt: setting?.transform
|
|
39
39
|
}),
|
|
40
40
|
...appendTypoStyle,
|
|
41
|
-
...getMaxHeightStyleDefault(setting)
|
|
42
|
-
};
|
|
41
|
+
...renderMaxHeight && getMaxHeightStyleDefault(setting)
|
|
42
|
+
});
|
|
43
43
|
};
|
|
44
44
|
const getStyleDefaultViewMore = (setting)=>{
|
|
45
45
|
const appendTypoStyle = core.composeTypographyStyle(setting?.typo, setting?.typography);
|
package/dist/cjs/collection/components/collection-description/components/CollectionDescription.js
CHANGED
|
@@ -14,8 +14,6 @@ var constant = require('../common/constant.js');
|
|
|
14
14
|
|
|
15
15
|
const CollectionDescription = ({ setting, builderProps, pageContext, advanced })=>{
|
|
16
16
|
const collection = core.useCollection();
|
|
17
|
-
const { htmlTag } = setting ?? {};
|
|
18
|
-
const Tag = index.getTag(htmlTag);
|
|
19
17
|
const { ref, open, isShowViewMore, handleToggleShowMore, hasLineClamp } = useDescription.useGpDescription(setting);
|
|
20
18
|
const hasDescriptionHtml = collection?.descriptionHtml;
|
|
21
19
|
const classContainerCollectionDes = system.createClass(classes.getClassContainerCollectionDes({
|
|
@@ -35,8 +33,10 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
35
33
|
} : {}
|
|
36
34
|
});
|
|
37
35
|
const collapseStyle = system.createStyle({
|
|
38
|
-
...styles.getDefaultStyleCollectionDes(
|
|
39
|
-
|
|
36
|
+
...styles.getDefaultStyleCollectionDes({
|
|
37
|
+
setting
|
|
38
|
+
}),
|
|
39
|
+
...!open ? core.makeStyleResponsive('line-clamp', core.makeLineClamp(setting?.lineClamp, setting?.hasLineClamp)) : {}
|
|
40
40
|
});
|
|
41
41
|
const styleViewMore = system.createStyle({
|
|
42
42
|
...styles.getStyleDefaultViewMore(setting)
|
|
@@ -71,7 +71,7 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
71
71
|
system.If(!core.isSafari(), /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
72
72
|
children: gpDescriptionCss
|
|
73
73
|
}), ''),
|
|
74
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
74
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
75
75
|
ref: ref,
|
|
76
76
|
className: classContainerCollectionDes,
|
|
77
77
|
style: collapseStyle,
|
|
@@ -11,8 +11,6 @@ var index = require('../common/index.js');
|
|
|
11
11
|
var constant = require('../common/constant.js');
|
|
12
12
|
|
|
13
13
|
const CollectionDescription = ({ setting, advanced, builderProps, pageContext })=>{
|
|
14
|
-
const { htmlTag } = setting ?? {};
|
|
15
|
-
const Tag = index.getTag(htmlTag);
|
|
16
14
|
const hasDescriptionHtml = 'collection.description != blank';
|
|
17
15
|
const classContainerCollectionDes = system.createClass(classes.getClassContainerCollectionDes({
|
|
18
16
|
setting
|
|
@@ -28,12 +26,12 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
28
26
|
'gp-show-more-icon gp-ml-1': true
|
|
29
27
|
});
|
|
30
28
|
const collapseStyle = system.createStyle({
|
|
31
|
-
...styles.getDefaultStyleCollectionDes(
|
|
29
|
+
...styles.getDefaultStyleCollectionDes({
|
|
30
|
+
setting,
|
|
31
|
+
renderMaxHeight: true
|
|
32
|
+
}),
|
|
32
33
|
...core.makeStyleResponsive('line-clamp', core.makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
33
34
|
});
|
|
34
|
-
const defaultStyle = system.createStyle({
|
|
35
|
-
...styles.getDefaultStyleCollectionDes(setting)
|
|
36
|
-
});
|
|
37
35
|
const styleViewMore = system.createStyle({
|
|
38
36
|
...styles.getStyleDefaultViewMore(setting),
|
|
39
37
|
...styles.getDisplayCollapse(setting),
|
|
@@ -69,7 +67,6 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
69
67
|
viewLessText: viewLessText,
|
|
70
68
|
enableViewMoreIcon: setting?.enableViewMoreIcon
|
|
71
69
|
},
|
|
72
|
-
defaultStyle,
|
|
73
70
|
collapseStyle
|
|
74
71
|
});
|
|
75
72
|
const renderScript = ()=>{
|
|
@@ -84,9 +81,9 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
84
81
|
>
|
|
85
82
|
<style>${textDescriptionCss}</style>
|
|
86
83
|
${system.If(!core.isSafari(), `<style>${gpDescriptionCss}</style>`, ' ')}
|
|
87
|
-
${system.LiquidUnless('collection', `<p>Collection not found</p>`, core.template
|
|
84
|
+
${system.LiquidUnless('collection', `<p>Collection not found</p>`, core.template`<div ${textAttr} class="${classContainerCollectionDes}" style="${collapseStyle}">
|
|
88
85
|
{{collection.description}}
|
|
89
|
-
|
|
86
|
+
</div>
|
|
90
87
|
${system.LiquidIf(hasDescriptionHtml, core.template`<button type="button" class="${classButtonViewMore}" style="${styleViewMore}">
|
|
91
88
|
${system.If(pageContext?.isPreviewing, viewMoreText?.toString() || '', `{{${viewMoreText}}}`)}
|
|
92
89
|
${system.If(setting?.enableViewMoreIcon, core.template`<span class="${showMoreIconClasses}">${constant.ICON_SVG}</span>`, ' ')}
|
|
@@ -43,8 +43,9 @@ const renderPaginatorLive = ({ setting, builderProps, pageContext })=>{
|
|
|
43
43
|
`;
|
|
44
44
|
};
|
|
45
45
|
const renderPaginatorEditor = ({ setting, builderProps, pageContext })=>{
|
|
46
|
-
const { pageQuantity, typo,
|
|
46
|
+
const { pageQuantity, typo, activeColor } = setting ?? {};
|
|
47
47
|
const paginatorItems = [];
|
|
48
|
+
const normalColor = typo?.attrs?.color;
|
|
48
49
|
const pageCount = parseInt(pageQuantity ?? '0');
|
|
49
50
|
let displayPage = 6;
|
|
50
51
|
if (displayPage > pageCount) {
|
package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js
CHANGED
|
@@ -9,14 +9,14 @@ var classes = require('../common/classes.js');
|
|
|
9
9
|
var system = require('@gem-sdk/system');
|
|
10
10
|
|
|
11
11
|
const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
12
|
-
const { typographyPaginator,
|
|
12
|
+
const { typographyPaginator, activeColor, align, typo } = setting ?? {};
|
|
13
13
|
const appendTypoStyle = system.createStyle({
|
|
14
14
|
...core.composeTypographyStyle(typo, typographyPaginator)
|
|
15
15
|
});
|
|
16
16
|
const globalColorStyle = system.createStyle({
|
|
17
|
-
normalColorClass: core.getGlobalColorClass('text',
|
|
17
|
+
normalColorClass: core.getGlobalColorClass('text', typo?.attrs?.color),
|
|
18
18
|
activeColorClass: core.getGlobalColorClass('text', activeColor),
|
|
19
|
-
normalColorStyle: core.getGlobalColorCSSProp(
|
|
19
|
+
normalColorStyle: core.getGlobalColorCSSProp(typo?.attrs?.color) ?? '',
|
|
20
20
|
activeColorStyle: core.getGlobalColorCSSProp(activeColor) ?? ''
|
|
21
21
|
});
|
|
22
22
|
const addedClass = system.createClass({
|
|
@@ -47,12 +47,7 @@ const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
|
47
47
|
uid: builderProps?.uid
|
|
48
48
|
});
|
|
49
49
|
return core.template`
|
|
50
|
-
<gp-collection-paginator
|
|
51
|
-
gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}'
|
|
52
|
-
id="${builderProps?.uid}"
|
|
53
|
-
class="${classPaginator}"
|
|
54
|
-
style="${stylePaginator}"
|
|
55
|
-
>
|
|
50
|
+
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}" class="${classPaginator}" style="${stylePaginator}" >
|
|
56
51
|
<div class="${classPaginatorWrapper}">${paginatorItem}</div>
|
|
57
52
|
</gp-collection-paginator>
|
|
58
53
|
${core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-collection-paginator.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-collection-paginator.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
@@ -67,45 +67,26 @@ const CollectionBannerSettings = [
|
|
|
67
67
|
{
|
|
68
68
|
label: 'Start',
|
|
69
69
|
value: 'start',
|
|
70
|
-
|
|
71
|
-
<path d="M15.5 2.25C15.5 2.52614 15.2761 2.75 15 2.75L2 2.75C1.72386 2.75 1.5 2.52614 1.5 2.25C1.5 1.97386 1.72386 1.75 2 1.75L15 1.75C15.2761 1.75 15.5 1.97386 15.5 2.25Z" fill="currentColor"/>
|
|
72
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 3.25C12.3284 3.25 13 3.92157 13 4.75L13 9.75C13 10.5784 12.3284 11.25 11.5 11.25L10.5 11.25C9.67157 11.25 9 10.5784 9 9.75L9 4.75C9 3.92157 9.67157 3.25 10.5 3.25L11.5 3.25ZM12 4.75C12 4.47386 11.7761 4.25 11.5 4.25L10.5 4.25C10.2239 4.25 10 4.47386 10 4.75L10 9.75C10 10.0261 10.2239 10.25 10.5 10.25L11.5 10.25C11.7761 10.25 12 10.0261 12 9.75L12 4.75Z" fill="currentColor"/>
|
|
73
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.75C8 3.92157 7.32843 3.25 6.5 3.25L5.5 3.25C4.67157 3.25 4 3.92157 4 4.75L4 12.75C4 13.5784 4.67157 14.25 5.5 14.25L6.5 14.25C7.32843 14.25 8 13.5784 8 12.75L8 4.75ZM6.5 4.25C6.77614 4.25 7 4.47386 7 4.75L7 12.75C7 13.0261 6.77614 13.25 6.5 13.25L5.5 13.25C5.22386 13.25 5 13.0261 5 12.75L5 4.75C5 4.47386 5.22386 4.25 5.5 4.25L6.5 4.25Z" fill="currentColor"/>
|
|
74
|
-
</svg>
|
|
75
|
-
`,
|
|
70
|
+
iconName: 'gp-align-top',
|
|
76
71
|
tooltip: 'Align top'
|
|
77
72
|
},
|
|
78
73
|
{
|
|
79
74
|
label: 'Center',
|
|
80
75
|
value: 'center',
|
|
81
|
-
|
|
82
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5 8.5C14.5 8.77614 14.2921 9 14.0357 9L12.1786 9L12.1786 11C12.1786 11.8284 11.555 12.5 10.7857 12.5L9.85714 12.5C9.08789 12.5 8.46429 11.8284 8.46429 11L8.46429 9L7.53571 9L7.53571 12.5C7.53571 13.3284 6.91211 14 6.14286 14L5.21429 14C4.44503 14 3.82143 13.3284 3.82143 12.5L3.82143 9L1.96429 9C1.70787 9 1.5 8.77614 1.5 8.5C1.5 8.22386 1.70787 8 1.96429 8L3.82143 8L3.82143 4.5C3.82143 3.67157 4.44503 3 5.21429 3L6.14286 3C6.91211 3 7.53572 3.67157 7.53572 4.5L7.53571 8L8.46429 8L8.46429 6C8.46429 5.17157 9.08789 4.5 9.85714 4.5L10.7857 4.5C11.555 4.5 12.1786 5.17157 12.1786 6L12.1786 8L14.0357 8C14.2921 8 14.5 8.22386 14.5 8.5ZM4.75 12.5C4.75 12.7761 4.95787 13 5.21429 13L6.14286 13C6.39928 13 6.60714 12.7761 6.60714 12.5L6.60714 4.5C6.60714 4.22386 6.39928 4 6.14286 4L5.21429 4C4.95787 4 4.75 4.22386 4.75 4.5L4.75 12.5ZM9.39286 11L9.39286 6C9.39286 5.72386 9.60073 5.5 9.85714 5.5L10.7857 5.5C11.0421 5.5 11.25 5.72386 11.25 6L11.25 11C11.25 11.2761 11.0421 11.5 10.7857 11.5L9.85714 11.5C9.60073 11.5 9.39286 11.2761 9.39286 11Z" fill="currentColor"/>
|
|
83
|
-
</svg>
|
|
84
|
-
`,
|
|
76
|
+
iconName: 'gp-align-center-vertical',
|
|
85
77
|
tooltip: 'Align center'
|
|
86
78
|
},
|
|
87
79
|
{
|
|
88
80
|
label: 'End',
|
|
89
81
|
value: 'end',
|
|
90
|
-
|
|
91
|
-
<path d="M1.5 14.5C1.5 14.2239 1.72386 14 2 14L15 14C15.2761 14 15.5 14.2239 15.5 14.5C15.5 14.7761 15.2761 15 15 15L2 15C1.72386 15 1.5 14.7761 1.5 14.5Z" fill="currentColor"/>
|
|
92
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
|
|
93
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
|
|
94
|
-
</svg>
|
|
95
|
-
`,
|
|
82
|
+
iconName: 'gp-align-bottom',
|
|
96
83
|
tooltip: 'Align bottom'
|
|
97
84
|
},
|
|
98
85
|
{
|
|
99
86
|
label: 'Between',
|
|
100
87
|
value: 'space-between',
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<path d="M2.00293 1.49805L15.0037 1.49805" stroke="currentColor" stroke-linecap="round"/>
|
|
104
|
-
<rect x="2.5" y="6" width="3" height="12" rx="1" transform="rotate(-90 2.5 6)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
105
|
-
<rect x="2.5" y="13" width="3" height="12" rx="1" transform="rotate(-90 2.5 13)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
106
|
-
</svg>
|
|
107
|
-
`,
|
|
108
|
-
tooltip: 'Distribute vertical spacing'
|
|
88
|
+
tooltip: 'Distribute vertical spacing',
|
|
89
|
+
iconName: 'gp-justify-content-space-between'
|
|
109
90
|
}
|
|
110
91
|
],
|
|
111
92
|
devices: {
|
|
@@ -145,22 +126,25 @@ const CollectionBannerSettings = [
|
|
|
145
126
|
type: 'option:value',
|
|
146
127
|
options: [
|
|
147
128
|
{
|
|
148
|
-
label: '
|
|
149
|
-
value: '
|
|
150
|
-
|
|
129
|
+
label: 'Start',
|
|
130
|
+
value: 'start',
|
|
131
|
+
tooltip: 'Align top',
|
|
132
|
+
iconName: 'gp-align-top'
|
|
151
133
|
},
|
|
152
134
|
{
|
|
153
135
|
label: 'Center',
|
|
154
136
|
value: 'center',
|
|
155
|
-
|
|
137
|
+
tooltip: 'Align vertical center',
|
|
138
|
+
iconName: 'gp-align-center-vertical'
|
|
156
139
|
},
|
|
157
140
|
{
|
|
158
|
-
label: '
|
|
159
|
-
value: '
|
|
160
|
-
|
|
141
|
+
label: 'End',
|
|
142
|
+
value: 'end',
|
|
143
|
+
tooltip: 'Align bottom',
|
|
144
|
+
iconName: 'gp-align-bottom'
|
|
161
145
|
}
|
|
162
146
|
],
|
|
163
|
-
default: '
|
|
147
|
+
default: 'start'
|
|
164
148
|
},
|
|
165
149
|
{
|
|
166
150
|
id: 'fullWidth',
|
|
@@ -195,7 +179,7 @@ const CollectionBannerSettings = [
|
|
|
195
179
|
},
|
|
196
180
|
{
|
|
197
181
|
id: 'verticalGutter',
|
|
198
|
-
type: 'input:
|
|
182
|
+
type: 'input:slider',
|
|
199
183
|
units: [
|
|
200
184
|
'px'
|
|
201
185
|
],
|
|
@@ -216,8 +200,8 @@ const CollectionBannerSettings = [
|
|
|
216
200
|
controls: [
|
|
217
201
|
{
|
|
218
202
|
id: 'background',
|
|
219
|
-
type: '
|
|
220
|
-
|
|
203
|
+
type: 'background-image',
|
|
204
|
+
ignoreReRender: true,
|
|
221
205
|
devices: {
|
|
222
206
|
desktop: {
|
|
223
207
|
default: {
|
|
@@ -236,6 +220,25 @@ const CollectionBannerSettings = [
|
|
|
236
220
|
attachment: 'scroll'
|
|
237
221
|
}
|
|
238
222
|
}
|
|
223
|
+
},
|
|
224
|
+
compoDefaultValue: {
|
|
225
|
+
desktop: {
|
|
226
|
+
default: {
|
|
227
|
+
type: 'image',
|
|
228
|
+
image: {
|
|
229
|
+
src: 'https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-lifestyle-2_large.png',
|
|
230
|
+
width: 1920,
|
|
231
|
+
height: 900
|
|
232
|
+
},
|
|
233
|
+
size: 'cover',
|
|
234
|
+
position: {
|
|
235
|
+
x: 50,
|
|
236
|
+
y: 50
|
|
237
|
+
},
|
|
238
|
+
repeat: 'no-repeat',
|
|
239
|
+
attachment: 'scroll'
|
|
240
|
+
}
|
|
241
|
+
}
|
|
239
242
|
}
|
|
240
243
|
},
|
|
241
244
|
{
|
|
@@ -39,28 +39,43 @@ const SettingUIV2 = [
|
|
|
39
39
|
label: {
|
|
40
40
|
en: 'Image'
|
|
41
41
|
},
|
|
42
|
-
layout: '
|
|
42
|
+
layout: 'horizontal',
|
|
43
43
|
setting: {
|
|
44
44
|
id: 'background'
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
+
type: 'combo',
|
|
49
|
+
comboType: 'color',
|
|
48
50
|
label: {
|
|
49
|
-
en: 'Overlay
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
en: 'Overlay'
|
|
52
|
+
},
|
|
53
|
+
getValueFromSettingID: 'overlayColor.normal',
|
|
54
|
+
disableScrollbar: true,
|
|
55
|
+
compoDefaultValue: '#121212',
|
|
56
|
+
popoverLabel: {
|
|
57
|
+
en: 'Overlay'
|
|
58
|
+
},
|
|
59
|
+
controls: [
|
|
60
|
+
{
|
|
61
|
+
label: {
|
|
62
|
+
en: 'Overlay color'
|
|
63
|
+
},
|
|
64
|
+
setting: {
|
|
65
|
+
id: 'overlayColor',
|
|
66
|
+
state: 'normal'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: {
|
|
71
|
+
en: 'Overlay opacity'
|
|
72
|
+
},
|
|
73
|
+
setting: {
|
|
74
|
+
id: 'overlayOpacity',
|
|
75
|
+
state: 'normal'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
64
79
|
}
|
|
65
80
|
]
|
|
66
81
|
},
|
|
@@ -101,15 +116,6 @@ const SettingUIV2 = [
|
|
|
101
116
|
id: 'width'
|
|
102
117
|
}
|
|
103
118
|
},
|
|
104
|
-
{
|
|
105
|
-
label: {
|
|
106
|
-
en: 'Column gap'
|
|
107
|
-
},
|
|
108
|
-
setting: {
|
|
109
|
-
id: 'verticalGutter'
|
|
110
|
-
},
|
|
111
|
-
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
112
|
-
},
|
|
113
119
|
{
|
|
114
120
|
label: {
|
|
115
121
|
en: 'Content align'
|
|
@@ -117,24 +123,6 @@ const SettingUIV2 = [
|
|
|
117
123
|
setting: {
|
|
118
124
|
id: 'contentPosition'
|
|
119
125
|
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: {
|
|
123
|
-
en: 'Align X'
|
|
124
|
-
},
|
|
125
|
-
conditionDisplay: `layout.display !== 'fill'`,
|
|
126
|
-
setting: {
|
|
127
|
-
id: 'horizontalAlign'
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
label: {
|
|
132
|
-
en: 'Align Y'
|
|
133
|
-
},
|
|
134
|
-
setting: {
|
|
135
|
-
id: 'verticalAlign'
|
|
136
|
-
},
|
|
137
|
-
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
138
126
|
}
|
|
139
127
|
]
|
|
140
128
|
},
|
|
@@ -170,6 +158,22 @@ const SettingUIV2 = [
|
|
|
170
158
|
}
|
|
171
159
|
}
|
|
172
160
|
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: {
|
|
164
|
+
en: 'Align column'
|
|
165
|
+
},
|
|
166
|
+
controls: [
|
|
167
|
+
{
|
|
168
|
+
label: {
|
|
169
|
+
en: 'Vertical'
|
|
170
|
+
},
|
|
171
|
+
setting: {
|
|
172
|
+
id: 'verticalAlign'
|
|
173
|
+
},
|
|
174
|
+
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
175
|
+
}
|
|
176
|
+
]
|
|
173
177
|
}
|
|
174
178
|
];
|
|
175
179
|
|