@gem-sdk/components 2.0.0-dev.533 → 2.0.0-dev.535
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/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/cjs/estimate-delivery/components/EstimateDate.js +23 -58
- package/dist/cjs/estimate-delivery/components/common/getAdvanced.js +10 -0
- package/dist/cjs/estimate-delivery/components/common/getNewSetting.js +86 -0
- package/dist/cjs/estimate-delivery/components/common/getStyle.js +10 -0
- package/dist/cjs/estimate-delivery/index.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/settings.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/uiV1.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/uiV2.js +1 -1
- package/dist/cjs/index.liquid.js +6 -5
- package/dist/cjs/tab/components/Tabs.js +0 -4
- package/dist/cjs/tab/components/common/getStyle.js +4 -11
- package/dist/cjs/tab/setting/Tabs.js +2 -1
- package/dist/cjs/tab/setting/configs/settings.js +62 -14
- package/dist/cjs/tab/setting/configs/uiV2.js +15 -2
- package/dist/cjs/text/components/TextInline.js +10 -11
- package/dist/cjs/text/components/common/getClasses.js +8 -4
- package/dist/cjs/text/components/common/getStyle.js +9 -0
- 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/esm/estimate-delivery/components/EstimateDate.js +23 -58
- package/dist/esm/estimate-delivery/components/common/getAdvanced.js +8 -0
- package/dist/esm/estimate-delivery/components/common/getNewSetting.js +84 -0
- package/dist/esm/estimate-delivery/components/common/getStyle.js +8 -0
- package/dist/esm/estimate-delivery/index.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/settings.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/uiV1.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/uiV2.js +1 -1
- package/dist/esm/index.liquid.js +5 -4
- package/dist/esm/tab/components/Tabs.js +1 -5
- package/dist/esm/tab/components/common/getStyle.js +5 -11
- package/dist/esm/tab/setting/Tabs.js +2 -1
- package/dist/esm/tab/setting/configs/settings.js +62 -14
- package/dist/esm/tab/setting/configs/uiV2.js +15 -2
- package/dist/esm/text/components/TextInline.js +11 -12
- package/dist/esm/text/components/common/getClasses.js +8 -5
- package/dist/esm/text/components/common/getStyle.js +9 -1
- package/dist/types/index.d.ts +43 -7
- package/package.json +2 -2
- /package/dist/cjs/estimate-delivery/{const.js → components/common/const.js} +0 -0
- /package/dist/esm/estimate-delivery/{const.js → components/common/const.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { composeTypographyStyle, getStyleShadow, makeStyleResponsive, makeStyle, getGlobalColorStyle, getResponsiveValueByScreen } from '@gem-sdk/core';
|
|
1
|
+
import { composeTypographyStyle, filterTruthyStyles, getStyleShadow, makeStyleResponsive, makeStyle, getGlobalColorStyle, getResponsiveValueByScreen } from '@gem-sdk/core';
|
|
2
2
|
import { DESCRIPTION_LINE_HEIGHT_DEFAULT } from './constant.js';
|
|
3
3
|
import { getDisplayStyle } from '../../../../helpers.js';
|
|
4
4
|
|
|
@@ -23,9 +23,9 @@ const getMaxHeightStyleDefault = (setting)=>{
|
|
|
23
23
|
const style = makeStyleResponsive('maxh', result);
|
|
24
24
|
return style;
|
|
25
25
|
};
|
|
26
|
-
const getDefaultStyleCollectionDes = (setting)=>{
|
|
26
|
+
const getDefaultStyleCollectionDes = ({ setting, renderMaxHeight })=>{
|
|
27
27
|
const appendTypoStyle = composeTypographyStyle(setting?.typo, setting?.typography);
|
|
28
|
-
return {
|
|
28
|
+
return filterTruthyStyles({
|
|
29
29
|
...getStyleShadow({
|
|
30
30
|
value: setting?.typo?.custom?.textShadow,
|
|
31
31
|
styleAppliedFor: 'text-shadow',
|
|
@@ -36,8 +36,8 @@ const getDefaultStyleCollectionDes = (setting)=>{
|
|
|
36
36
|
tt: setting?.transform
|
|
37
37
|
}),
|
|
38
38
|
...appendTypoStyle,
|
|
39
|
-
...getMaxHeightStyleDefault(setting)
|
|
40
|
-
};
|
|
39
|
+
...renderMaxHeight && getMaxHeightStyleDefault(setting)
|
|
40
|
+
});
|
|
41
41
|
};
|
|
42
42
|
const getStyleDefaultViewMore = (setting)=>{
|
|
43
43
|
const appendTypoStyle = composeTypographyStyle(setting?.typo, setting?.typography);
|
package/dist/esm/collection/components/collection-description/components/CollectionDescription.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useCollection, makeLineClamp, isSafari } from '@gem-sdk/core';
|
|
3
|
+
import { useCollection, makeStyleResponsive, makeLineClamp, isSafari } from '@gem-sdk/core';
|
|
4
4
|
import { getDefaultStyleCollectionDes, getStyleDefaultViewMore, getStaticCss } from '../common/styles.js';
|
|
5
5
|
import { getClassContainerCollectionDes, getClassButtonViewMore } from '../common/classes.js';
|
|
6
6
|
import { createClass, createStyle, createAttr, If } from '@gem-sdk/system';
|
|
7
|
-
import { getViewLessText, getViewMoreText
|
|
7
|
+
import { getViewLessText, getViewMoreText } from '../common/index.js';
|
|
8
8
|
import { useGpDescription } from '../hook/useDescription.js';
|
|
9
9
|
import { ICON_SVG } from '../common/constant.js';
|
|
10
10
|
|
|
11
11
|
const CollectionDescription = ({ setting, builderProps, pageContext, advanced })=>{
|
|
12
12
|
const collection = useCollection();
|
|
13
|
-
const { htmlTag } = setting ?? {};
|
|
14
|
-
const Tag = getTag(htmlTag);
|
|
15
13
|
const { ref, open, isShowViewMore, handleToggleShowMore, hasLineClamp } = useGpDescription(setting);
|
|
16
14
|
const hasDescriptionHtml = collection?.descriptionHtml;
|
|
17
15
|
const classContainerCollectionDes = createClass(getClassContainerCollectionDes({
|
|
@@ -31,8 +29,10 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
31
29
|
} : {}
|
|
32
30
|
});
|
|
33
31
|
const collapseStyle = createStyle({
|
|
34
|
-
...getDefaultStyleCollectionDes(
|
|
35
|
-
|
|
32
|
+
...getDefaultStyleCollectionDes({
|
|
33
|
+
setting
|
|
34
|
+
}),
|
|
35
|
+
...!open ? makeStyleResponsive('line-clamp', makeLineClamp(setting?.lineClamp, setting?.hasLineClamp)) : {}
|
|
36
36
|
});
|
|
37
37
|
const styleViewMore = createStyle({
|
|
38
38
|
...getStyleDefaultViewMore(setting)
|
|
@@ -67,7 +67,7 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
67
67
|
If(!isSafari(), /*#__PURE__*/ jsx("style", {
|
|
68
68
|
children: gpDescriptionCss
|
|
69
69
|
}), ''),
|
|
70
|
-
/*#__PURE__*/ jsx(
|
|
70
|
+
/*#__PURE__*/ jsx("div", {
|
|
71
71
|
ref: ref,
|
|
72
72
|
className: classContainerCollectionDes,
|
|
73
73
|
style: collapseStyle,
|
|
@@ -3,12 +3,10 @@ import { getSettingPreloadData } from '../../../../helpers.js';
|
|
|
3
3
|
import { getDefaultStyleCollectionDes, getStyleDefaultViewMore, getDisplayCollapse, getStaticCss } from '../common/styles.js';
|
|
4
4
|
import { createClass, createStyle, createAttr, createStateOrContext, If, Liquid, LiquidUnless, LiquidIf } from '@gem-sdk/system';
|
|
5
5
|
import { getClassContainerCollectionDes, getClassButtonViewMore } from '../common/classes.js';
|
|
6
|
-
import { getViewLessText, getViewMoreText
|
|
6
|
+
import { getViewLessText, getViewMoreText } from '../common/index.js';
|
|
7
7
|
import { ICON_SVG } from '../common/constant.js';
|
|
8
8
|
|
|
9
9
|
const CollectionDescription = ({ setting, advanced, builderProps, pageContext })=>{
|
|
10
|
-
const { htmlTag } = setting ?? {};
|
|
11
|
-
const Tag = getTag(htmlTag);
|
|
12
10
|
const hasDescriptionHtml = 'collection.description != blank';
|
|
13
11
|
const classContainerCollectionDes = createClass(getClassContainerCollectionDes({
|
|
14
12
|
setting
|
|
@@ -24,12 +22,12 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
24
22
|
'gp-show-more-icon gp-ml-1': true
|
|
25
23
|
});
|
|
26
24
|
const collapseStyle = createStyle({
|
|
27
|
-
...getDefaultStyleCollectionDes(
|
|
25
|
+
...getDefaultStyleCollectionDes({
|
|
26
|
+
setting,
|
|
27
|
+
renderMaxHeight: true
|
|
28
|
+
}),
|
|
28
29
|
...makeStyleResponsive('line-clamp', makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
29
30
|
});
|
|
30
|
-
const defaultStyle = createStyle({
|
|
31
|
-
...getDefaultStyleCollectionDes(setting)
|
|
32
|
-
});
|
|
33
31
|
const styleViewMore = createStyle({
|
|
34
32
|
...getStyleDefaultViewMore(setting),
|
|
35
33
|
...getDisplayCollapse(setting),
|
|
@@ -65,7 +63,6 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
65
63
|
viewLessText: viewLessText,
|
|
66
64
|
enableViewMoreIcon: setting?.enableViewMoreIcon
|
|
67
65
|
},
|
|
68
|
-
defaultStyle,
|
|
69
66
|
collapseStyle
|
|
70
67
|
});
|
|
71
68
|
const renderScript = ()=>{
|
|
@@ -80,9 +77,9 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
80
77
|
>
|
|
81
78
|
<style>${textDescriptionCss}</style>
|
|
82
79
|
${If(!isSafari(), `<style>${gpDescriptionCss}</style>`, ' ')}
|
|
83
|
-
${LiquidUnless('collection', `<p>Collection not found</p>`, template
|
|
80
|
+
${LiquidUnless('collection', `<p>Collection not found</p>`, template`<div ${textAttr} class="${classContainerCollectionDes}" style="${collapseStyle}">
|
|
84
81
|
{{collection.description}}
|
|
85
|
-
|
|
82
|
+
</div>
|
|
86
83
|
${LiquidIf(hasDescriptionHtml, template`<button type="button" class="${classButtonViewMore}" style="${styleViewMore}">
|
|
87
84
|
${If(pageContext?.isPreviewing, viewMoreText?.toString() || '', `{{${viewMoreText}}}`)}
|
|
88
85
|
${If(setting?.enableViewMoreIcon, template`<span class="${showMoreIconClasses}">${ICON_SVG}</span>`, ' ')}
|
|
@@ -41,8 +41,9 @@ const renderPaginatorLive = ({ setting, builderProps, pageContext })=>{
|
|
|
41
41
|
`;
|
|
42
42
|
};
|
|
43
43
|
const renderPaginatorEditor = ({ setting, builderProps, pageContext })=>{
|
|
44
|
-
const { pageQuantity, typo,
|
|
44
|
+
const { pageQuantity, typo, activeColor } = setting ?? {};
|
|
45
45
|
const paginatorItems = [];
|
|
46
|
+
const normalColor = typo?.attrs?.color;
|
|
46
47
|
const pageCount = parseInt(pageQuantity ?? '0');
|
|
47
48
|
let displayPage = 6;
|
|
48
49
|
if (displayPage > pageCount) {
|
package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js
CHANGED
|
@@ -5,14 +5,14 @@ import { customClass, getPaginatorWrapperClass, getPaginatorClass } from '../com
|
|
|
5
5
|
import { createStyle, createClass, createStateOrContext } from '@gem-sdk/system';
|
|
6
6
|
|
|
7
7
|
const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
8
|
-
const { typographyPaginator,
|
|
8
|
+
const { typographyPaginator, activeColor, align, typo } = setting ?? {};
|
|
9
9
|
const appendTypoStyle = createStyle({
|
|
10
10
|
...composeTypographyStyle(typo, typographyPaginator)
|
|
11
11
|
});
|
|
12
12
|
const globalColorStyle = createStyle({
|
|
13
|
-
normalColorClass: getGlobalColorClass('text',
|
|
13
|
+
normalColorClass: getGlobalColorClass('text', typo?.attrs?.color),
|
|
14
14
|
activeColorClass: getGlobalColorClass('text', activeColor),
|
|
15
|
-
normalColorStyle: getGlobalColorCSSProp(
|
|
15
|
+
normalColorStyle: getGlobalColorCSSProp(typo?.attrs?.color) ?? '',
|
|
16
16
|
activeColorStyle: getGlobalColorCSSProp(activeColor) ?? ''
|
|
17
17
|
});
|
|
18
18
|
const addedClass = createClass({
|
|
@@ -43,12 +43,7 @@ const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
|
43
43
|
uid: builderProps?.uid
|
|
44
44
|
});
|
|
45
45
|
return template`
|
|
46
|
-
<gp-collection-paginator
|
|
47
|
-
gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}'
|
|
48
|
-
id="${builderProps?.uid}"
|
|
49
|
-
class="${classPaginator}"
|
|
50
|
-
style="${stylePaginator}"
|
|
51
|
-
>
|
|
46
|
+
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}" class="${classPaginator}" style="${stylePaginator}" >
|
|
52
47
|
<div class="${classPaginatorWrapper}">${paginatorItem}</div>
|
|
53
48
|
</gp-collection-paginator>
|
|
54
49
|
${RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-collection-paginator.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-collection-paginator.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
@@ -65,45 +65,26 @@ const CollectionBannerSettings = [
|
|
|
65
65
|
{
|
|
66
66
|
label: 'Start',
|
|
67
67
|
value: 'start',
|
|
68
|
-
|
|
69
|
-
<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"/>
|
|
70
|
-
<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"/>
|
|
71
|
-
<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"/>
|
|
72
|
-
</svg>
|
|
73
|
-
`,
|
|
68
|
+
iconName: 'gp-align-top',
|
|
74
69
|
tooltip: 'Align top'
|
|
75
70
|
},
|
|
76
71
|
{
|
|
77
72
|
label: 'Center',
|
|
78
73
|
value: 'center',
|
|
79
|
-
|
|
80
|
-
<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"/>
|
|
81
|
-
</svg>
|
|
82
|
-
`,
|
|
74
|
+
iconName: 'gp-align-center-vertical',
|
|
83
75
|
tooltip: 'Align center'
|
|
84
76
|
},
|
|
85
77
|
{
|
|
86
78
|
label: 'End',
|
|
87
79
|
value: 'end',
|
|
88
|
-
|
|
89
|
-
<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"/>
|
|
90
|
-
<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"/>
|
|
91
|
-
<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"/>
|
|
92
|
-
</svg>
|
|
93
|
-
`,
|
|
80
|
+
iconName: 'gp-align-bottom',
|
|
94
81
|
tooltip: 'Align bottom'
|
|
95
82
|
},
|
|
96
83
|
{
|
|
97
84
|
label: 'Between',
|
|
98
85
|
value: 'space-between',
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<path d="M2.00293 1.49805L15.0037 1.49805" stroke="currentColor" stroke-linecap="round"/>
|
|
102
|
-
<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"/>
|
|
103
|
-
<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"/>
|
|
104
|
-
</svg>
|
|
105
|
-
`,
|
|
106
|
-
tooltip: 'Distribute vertical spacing'
|
|
86
|
+
tooltip: 'Distribute vertical spacing',
|
|
87
|
+
iconName: 'gp-justify-content-space-between'
|
|
107
88
|
}
|
|
108
89
|
],
|
|
109
90
|
devices: {
|
|
@@ -143,22 +124,25 @@ const CollectionBannerSettings = [
|
|
|
143
124
|
type: 'option:value',
|
|
144
125
|
options: [
|
|
145
126
|
{
|
|
146
|
-
label: '
|
|
147
|
-
value: '
|
|
148
|
-
|
|
127
|
+
label: 'Start',
|
|
128
|
+
value: 'start',
|
|
129
|
+
tooltip: 'Align top',
|
|
130
|
+
iconName: 'gp-align-top'
|
|
149
131
|
},
|
|
150
132
|
{
|
|
151
133
|
label: 'Center',
|
|
152
134
|
value: 'center',
|
|
153
|
-
|
|
135
|
+
tooltip: 'Align vertical center',
|
|
136
|
+
iconName: 'gp-align-center-vertical'
|
|
154
137
|
},
|
|
155
138
|
{
|
|
156
|
-
label: '
|
|
157
|
-
value: '
|
|
158
|
-
|
|
139
|
+
label: 'End',
|
|
140
|
+
value: 'end',
|
|
141
|
+
tooltip: 'Align bottom',
|
|
142
|
+
iconName: 'gp-align-bottom'
|
|
159
143
|
}
|
|
160
144
|
],
|
|
161
|
-
default: '
|
|
145
|
+
default: 'start'
|
|
162
146
|
},
|
|
163
147
|
{
|
|
164
148
|
id: 'fullWidth',
|
|
@@ -193,7 +177,7 @@ const CollectionBannerSettings = [
|
|
|
193
177
|
},
|
|
194
178
|
{
|
|
195
179
|
id: 'verticalGutter',
|
|
196
|
-
type: 'input:
|
|
180
|
+
type: 'input:slider',
|
|
197
181
|
units: [
|
|
198
182
|
'px'
|
|
199
183
|
],
|
|
@@ -214,8 +198,8 @@ const CollectionBannerSettings = [
|
|
|
214
198
|
controls: [
|
|
215
199
|
{
|
|
216
200
|
id: 'background',
|
|
217
|
-
type: '
|
|
218
|
-
|
|
201
|
+
type: 'background-image',
|
|
202
|
+
ignoreReRender: true,
|
|
219
203
|
devices: {
|
|
220
204
|
desktop: {
|
|
221
205
|
default: {
|
|
@@ -234,6 +218,25 @@ const CollectionBannerSettings = [
|
|
|
234
218
|
attachment: 'scroll'
|
|
235
219
|
}
|
|
236
220
|
}
|
|
221
|
+
},
|
|
222
|
+
compoDefaultValue: {
|
|
223
|
+
desktop: {
|
|
224
|
+
default: {
|
|
225
|
+
type: 'image',
|
|
226
|
+
image: {
|
|
227
|
+
src: 'https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-lifestyle-2_large.png',
|
|
228
|
+
width: 1920,
|
|
229
|
+
height: 900
|
|
230
|
+
},
|
|
231
|
+
size: 'cover',
|
|
232
|
+
position: {
|
|
233
|
+
x: 50,
|
|
234
|
+
y: 50
|
|
235
|
+
},
|
|
236
|
+
repeat: 'no-repeat',
|
|
237
|
+
attachment: 'scroll'
|
|
238
|
+
}
|
|
239
|
+
}
|
|
237
240
|
}
|
|
238
241
|
},
|
|
239
242
|
{
|
|
@@ -37,28 +37,43 @@ const SettingUIV2 = [
|
|
|
37
37
|
label: {
|
|
38
38
|
en: 'Image'
|
|
39
39
|
},
|
|
40
|
-
layout: '
|
|
40
|
+
layout: 'horizontal',
|
|
41
41
|
setting: {
|
|
42
42
|
id: 'background'
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
+
type: 'combo',
|
|
47
|
+
comboType: 'color',
|
|
46
48
|
label: {
|
|
47
|
-
en: 'Overlay
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
en: 'Overlay'
|
|
50
|
+
},
|
|
51
|
+
getValueFromSettingID: 'overlayColor.normal',
|
|
52
|
+
disableScrollbar: true,
|
|
53
|
+
compoDefaultValue: '#121212',
|
|
54
|
+
popoverLabel: {
|
|
55
|
+
en: 'Overlay'
|
|
56
|
+
},
|
|
57
|
+
controls: [
|
|
58
|
+
{
|
|
59
|
+
label: {
|
|
60
|
+
en: 'Overlay color'
|
|
61
|
+
},
|
|
62
|
+
setting: {
|
|
63
|
+
id: 'overlayColor',
|
|
64
|
+
state: 'normal'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: {
|
|
69
|
+
en: 'Overlay opacity'
|
|
70
|
+
},
|
|
71
|
+
setting: {
|
|
72
|
+
id: 'overlayOpacity',
|
|
73
|
+
state: 'normal'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
62
77
|
}
|
|
63
78
|
]
|
|
64
79
|
},
|
|
@@ -99,15 +114,6 @@ const SettingUIV2 = [
|
|
|
99
114
|
id: 'width'
|
|
100
115
|
}
|
|
101
116
|
},
|
|
102
|
-
{
|
|
103
|
-
label: {
|
|
104
|
-
en: 'Column gap'
|
|
105
|
-
},
|
|
106
|
-
setting: {
|
|
107
|
-
id: 'verticalGutter'
|
|
108
|
-
},
|
|
109
|
-
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
110
|
-
},
|
|
111
117
|
{
|
|
112
118
|
label: {
|
|
113
119
|
en: 'Content align'
|
|
@@ -115,24 +121,6 @@ const SettingUIV2 = [
|
|
|
115
121
|
setting: {
|
|
116
122
|
id: 'contentPosition'
|
|
117
123
|
}
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
label: {
|
|
121
|
-
en: 'Align X'
|
|
122
|
-
},
|
|
123
|
-
conditionDisplay: `layout.display !== 'fill'`,
|
|
124
|
-
setting: {
|
|
125
|
-
id: 'horizontalAlign'
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: {
|
|
130
|
-
en: 'Align Y'
|
|
131
|
-
},
|
|
132
|
-
setting: {
|
|
133
|
-
id: 'verticalAlign'
|
|
134
|
-
},
|
|
135
|
-
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
136
124
|
}
|
|
137
125
|
]
|
|
138
126
|
},
|
|
@@ -168,6 +156,22 @@ const SettingUIV2 = [
|
|
|
168
156
|
}
|
|
169
157
|
}
|
|
170
158
|
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: {
|
|
162
|
+
en: 'Align column'
|
|
163
|
+
},
|
|
164
|
+
controls: [
|
|
165
|
+
{
|
|
166
|
+
label: {
|
|
167
|
+
en: 'Vertical'
|
|
168
|
+
},
|
|
169
|
+
setting: {
|
|
170
|
+
id: 'verticalAlign'
|
|
171
|
+
},
|
|
172
|
+
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
173
|
+
}
|
|
174
|
+
]
|
|
171
175
|
}
|
|
172
176
|
];
|
|
173
177
|
|
|
@@ -74,21 +74,55 @@ const SettingUIV2 = [
|
|
|
74
74
|
conditionDisplay: 'hasLineClamp == true'
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
+
type: 'combo',
|
|
77
78
|
label: {
|
|
78
79
|
en: 'Show more label'
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
iconName: 'polaris-text-block',
|
|
82
|
+
getValueFromSettingID: 'viewMoreText',
|
|
83
|
+
isHideClear: true,
|
|
84
|
+
disableScrollbar: true,
|
|
85
|
+
compoDefaultValue: 'Show more',
|
|
86
|
+
popoverLabel: {
|
|
87
|
+
en: 'Show more label'
|
|
82
88
|
},
|
|
89
|
+
controls: [
|
|
90
|
+
{
|
|
91
|
+
layout: 'vertical',
|
|
92
|
+
label: {
|
|
93
|
+
en: 'Content'
|
|
94
|
+
},
|
|
95
|
+
setting: {
|
|
96
|
+
id: 'viewMoreText'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
83
100
|
conditionDisplay: 'hasLineClamp == true'
|
|
84
101
|
},
|
|
85
102
|
{
|
|
103
|
+
type: 'combo',
|
|
86
104
|
label: {
|
|
87
105
|
en: 'Show less label'
|
|
88
106
|
},
|
|
89
|
-
|
|
90
|
-
|
|
107
|
+
iconName: 'polaris-text-block',
|
|
108
|
+
getValueFromSettingID: 'viewLessText',
|
|
109
|
+
isHideClear: true,
|
|
110
|
+
disableScrollbar: true,
|
|
111
|
+
compoDefaultValue: 'Show more',
|
|
112
|
+
popoverLabel: {
|
|
113
|
+
en: 'Show less label'
|
|
91
114
|
},
|
|
115
|
+
controls: [
|
|
116
|
+
{
|
|
117
|
+
layout: 'vertical',
|
|
118
|
+
label: {
|
|
119
|
+
en: 'Content'
|
|
120
|
+
},
|
|
121
|
+
setting: {
|
|
122
|
+
id: 'viewLessText'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
],
|
|
92
126
|
conditionDisplay: 'hasLineClamp == true'
|
|
93
127
|
},
|
|
94
128
|
{
|
|
@@ -9,7 +9,7 @@ const CollectionPaginatorSettings = [
|
|
|
9
9
|
controls: [
|
|
10
10
|
{
|
|
11
11
|
id: 'pageQuantity',
|
|
12
|
-
type: 'input',
|
|
12
|
+
type: 'input:stepper',
|
|
13
13
|
label: 'Page quantity',
|
|
14
14
|
default: '10'
|
|
15
15
|
}
|
|
@@ -97,10 +97,14 @@ const CollectionPaginatorSettings = [
|
|
|
97
97
|
type: 'typography-v2',
|
|
98
98
|
label: 'Text styles',
|
|
99
99
|
default: {
|
|
100
|
-
type: 'paragraph-1'
|
|
100
|
+
type: 'paragraph-1',
|
|
101
|
+
attrs: {
|
|
102
|
+
color: '#4D4D4D'
|
|
103
|
+
}
|
|
101
104
|
},
|
|
102
105
|
hiddenSetting: {
|
|
103
|
-
|
|
106
|
+
textAlign: true,
|
|
107
|
+
textShadow: true
|
|
104
108
|
},
|
|
105
109
|
ignoreReRender: true
|
|
106
110
|
},
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
const SettingUIV2 = [
|
|
2
|
-
{
|
|
3
|
-
label: {
|
|
4
|
-
en: 'Preview mode'
|
|
5
|
-
},
|
|
6
|
-
controls: [
|
|
7
|
-
{
|
|
8
|
-
label: {
|
|
9
|
-
en: 'Page quantity'
|
|
10
|
-
},
|
|
11
|
-
setting: {
|
|
12
|
-
id: 'pageQuantity'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
2
|
{
|
|
18
3
|
label: {
|
|
19
4
|
en: 'Display'
|
|
@@ -57,24 +42,73 @@ const SettingUIV2 = [
|
|
|
57
42
|
},
|
|
58
43
|
{
|
|
59
44
|
label: {
|
|
60
|
-
en: '
|
|
45
|
+
en: 'Preview mode'
|
|
61
46
|
},
|
|
62
47
|
controls: [
|
|
63
48
|
{
|
|
64
49
|
label: {
|
|
65
|
-
en: '
|
|
50
|
+
en: 'Page quantity'
|
|
66
51
|
},
|
|
67
52
|
setting: {
|
|
68
|
-
id: '
|
|
53
|
+
id: 'pageQuantity'
|
|
69
54
|
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: {
|
|
60
|
+
en: 'Text'
|
|
61
|
+
},
|
|
62
|
+
controls: [
|
|
63
|
+
{
|
|
64
|
+
type: 'combo',
|
|
65
|
+
label: {
|
|
66
|
+
en: 'Previous'
|
|
67
|
+
},
|
|
68
|
+
iconName: 'polaris-text-block',
|
|
69
|
+
getValueFromSettingID: 'previousText',
|
|
70
|
+
isHideClear: true,
|
|
71
|
+
disableScrollbar: true,
|
|
72
|
+
compoDefaultValue: 'PREVIOUS',
|
|
73
|
+
popoverLabel: {
|
|
74
|
+
en: 'Previous'
|
|
75
|
+
},
|
|
76
|
+
controls: [
|
|
77
|
+
{
|
|
78
|
+
layout: 'vertical',
|
|
79
|
+
label: {
|
|
80
|
+
en: 'Content'
|
|
81
|
+
},
|
|
82
|
+
setting: {
|
|
83
|
+
id: 'previousText'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]
|
|
70
87
|
},
|
|
71
88
|
{
|
|
89
|
+
type: 'combo',
|
|
72
90
|
label: {
|
|
73
91
|
en: 'Next'
|
|
74
92
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
93
|
+
iconName: 'polaris-text-block',
|
|
94
|
+
getValueFromSettingID: 'nextText',
|
|
95
|
+
isHideClear: true,
|
|
96
|
+
disableScrollbar: true,
|
|
97
|
+
compoDefaultValue: 'NEXT',
|
|
98
|
+
popoverLabel: {
|
|
99
|
+
en: 'Next'
|
|
100
|
+
},
|
|
101
|
+
controls: [
|
|
102
|
+
{
|
|
103
|
+
layout: 'vertical',
|
|
104
|
+
label: {
|
|
105
|
+
en: 'Content'
|
|
106
|
+
},
|
|
107
|
+
setting: {
|
|
108
|
+
id: 'nextText'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
78
112
|
}
|
|
79
113
|
]
|
|
80
114
|
},
|
|
@@ -88,18 +122,17 @@ const SettingUIV2 = [
|
|
|
88
122
|
id: 'typo'
|
|
89
123
|
},
|
|
90
124
|
layout: 'vertical'
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
label: {
|
|
130
|
+
en: 'Active effect'
|
|
131
|
+
},
|
|
132
|
+
controls: [
|
|
100
133
|
{
|
|
101
134
|
label: {
|
|
102
|
-
en: '
|
|
135
|
+
en: 'Text color'
|
|
103
136
|
},
|
|
104
137
|
setting: {
|
|
105
138
|
id: 'activeColor'
|
|
@@ -28,7 +28,7 @@ const CollectionToolbarSettings = [
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
id: 'sortingText',
|
|
31
|
-
label: '
|
|
31
|
+
label: 'Option text',
|
|
32
32
|
type: 'group',
|
|
33
33
|
controls: [
|
|
34
34
|
{
|
|
@@ -112,7 +112,7 @@ const CollectionToolbarSettings = [
|
|
|
112
112
|
type: 'option:value',
|
|
113
113
|
devices: {
|
|
114
114
|
desktop: {
|
|
115
|
-
default: '
|
|
115
|
+
default: 'center'
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
options: [
|