@gem-sdk/components 2.0.0-dev.349 → 2.0.0-dev.351
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/banner/components/HeroBanner.liquid.js +1 -1
- package/dist/cjs/banner/setting/presets/heroBanner1Col.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerContentLeft.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerContentRight.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerParallax.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerVideo.js +6 -0
- package/dist/cjs/banner/setting/setting.js +9 -5
- package/dist/cjs/marquee/common/index.js +2 -1
- package/dist/cjs/marquee/common/styles.js +10 -10
- package/dist/cjs/marquee/components/Marquee.liquid.js +9 -1
- package/dist/cjs/marquee/components/MarqueeBase.liquid.js +15 -21
- package/dist/esm/banner/components/HeroBanner.liquid.js +1 -1
- package/dist/esm/banner/setting/presets/heroBanner1Col.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerContentLeft.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerContentRight.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerParallax.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerVideo.js +6 -0
- package/dist/esm/banner/setting/setting.js +9 -5
- package/dist/esm/marquee/common/index.js +2 -1
- package/dist/esm/marquee/common/styles.js +10 -10
- package/dist/esm/marquee/components/Marquee.liquid.js +9 -1
- package/dist/esm/marquee/components/MarqueeBase.liquid.js +15 -21
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@ const HeroBanner = (props)=>{
|
|
|
70
70
|
}}
|
|
71
71
|
class="${wrapperClasses}"
|
|
72
72
|
style="${wrapperStyle}"
|
|
73
|
-
gp-data='${core.dataStringify(stateDataHeroBanner)
|
|
73
|
+
gp-data='${core.dataStringify(stateDataHeroBanner)}'
|
|
74
74
|
>
|
|
75
75
|
${system.If(!hasLinkCover, renderInnerHeroBanner())}
|
|
76
76
|
${system.If(hasLinkCover, core.template /* liquid */ `
|
|
@@ -55,15 +55,6 @@ const heroBanner1Col = {
|
|
|
55
55
|
width: '1200px',
|
|
56
56
|
height: '600px'
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
background: {
|
|
60
|
-
desktop: {
|
|
61
|
-
image: {
|
|
62
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
63
|
-
},
|
|
64
|
-
loop: true,
|
|
65
|
-
lazyLoad: false
|
|
66
|
-
}
|
|
67
58
|
}
|
|
68
59
|
},
|
|
69
60
|
childrens: [
|
|
@@ -60,15 +60,6 @@ const heroBannerContentLeft = {
|
|
|
60
60
|
width: '100%',
|
|
61
61
|
height: 'auto'
|
|
62
62
|
}
|
|
63
|
-
},
|
|
64
|
-
background: {
|
|
65
|
-
desktop: {
|
|
66
|
-
image: {
|
|
67
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
68
|
-
},
|
|
69
|
-
loop: true,
|
|
70
|
-
lazyLoad: false
|
|
71
|
-
}
|
|
72
63
|
}
|
|
73
64
|
},
|
|
74
65
|
childrens: [
|
|
@@ -68,15 +68,6 @@ const heroBannerContentRight = {
|
|
|
68
68
|
widthHeightLinked: true,
|
|
69
69
|
width: '100%'
|
|
70
70
|
}
|
|
71
|
-
},
|
|
72
|
-
background: {
|
|
73
|
-
desktop: {
|
|
74
|
-
image: {
|
|
75
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
76
|
-
},
|
|
77
|
-
loop: true,
|
|
78
|
-
lazyLoad: false
|
|
79
|
-
}
|
|
80
71
|
}
|
|
81
72
|
},
|
|
82
73
|
childrens: [
|
|
@@ -55,15 +55,6 @@ const heroBannerParallax = {
|
|
|
55
55
|
width: '1200px',
|
|
56
56
|
height: '600px'
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
background: {
|
|
60
|
-
desktop: {
|
|
61
|
-
image: {
|
|
62
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
63
|
-
},
|
|
64
|
-
loop: true,
|
|
65
|
-
lazyLoad: false
|
|
66
|
-
}
|
|
67
58
|
}
|
|
68
59
|
},
|
|
69
60
|
childrens: [
|
|
@@ -42,6 +42,12 @@ const heroBannerVideo = {
|
|
|
42
42
|
background: {
|
|
43
43
|
desktop: {
|
|
44
44
|
type: 'video',
|
|
45
|
+
image: {
|
|
46
|
+
src: '',
|
|
47
|
+
width: 1920,
|
|
48
|
+
height: 900
|
|
49
|
+
},
|
|
50
|
+
videoType: 'html5',
|
|
45
51
|
video: 'https://youtu.be/KOxfzBp72uk',
|
|
46
52
|
videoHtml5: 'https://media.w3.org/2010/05/sintel/trailer.mp4'
|
|
47
53
|
}
|
|
@@ -414,14 +414,14 @@ const SettingsV2 = [
|
|
|
414
414
|
id: 'background',
|
|
415
415
|
type: 'background-media',
|
|
416
416
|
label: 'Background Color & Image',
|
|
417
|
+
ignoreReRender: true,
|
|
417
418
|
showVideo: true,
|
|
418
419
|
devices: {
|
|
419
420
|
desktop: {
|
|
420
421
|
default: {
|
|
421
422
|
type: 'image',
|
|
422
|
-
color: 'bg-2',
|
|
423
423
|
image: {
|
|
424
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-
|
|
424
|
+
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-c9f109ee-2adf-4ec4-8d26-11a891c50a13.png',
|
|
425
425
|
width: 1920,
|
|
426
426
|
height: 900
|
|
427
427
|
},
|
|
@@ -432,8 +432,8 @@ const SettingsV2 = [
|
|
|
432
432
|
},
|
|
433
433
|
repeat: 'no-repeat',
|
|
434
434
|
attachment: 'scroll',
|
|
435
|
-
video: '
|
|
436
|
-
videoHtml5: '
|
|
435
|
+
video: '',
|
|
436
|
+
videoHtml5: '',
|
|
437
437
|
videoType: 'youtube',
|
|
438
438
|
loop: true,
|
|
439
439
|
lazyLoad: false
|
|
@@ -654,12 +654,16 @@ const SettingsV2 = [
|
|
|
654
654
|
],
|
|
655
655
|
step: 1,
|
|
656
656
|
default: {
|
|
657
|
-
normal: '
|
|
657
|
+
normal: '20%',
|
|
658
658
|
hover: '20%'
|
|
659
659
|
},
|
|
660
660
|
state: {
|
|
661
661
|
normal: true,
|
|
662
662
|
hover: true
|
|
663
|
+
},
|
|
664
|
+
compoDefaultValue: {
|
|
665
|
+
normal: '20%',
|
|
666
|
+
hover: '20%'
|
|
663
667
|
}
|
|
664
668
|
},
|
|
665
669
|
{
|
|
@@ -172,17 +172,17 @@ const getWidthValue = (currentDevice, isFullWidthResponsive)=>{
|
|
|
172
172
|
const isFullWidthByScreen = core.getResponsiveValueByScreen(isFullWidthResponsive, currentDevice);
|
|
173
173
|
return isFullWidthByScreen ? '100%' : 'auto';
|
|
174
174
|
};
|
|
175
|
-
const getWidthMarquee = ()=>{
|
|
175
|
+
const getWidthMarquee = (isFullWidthResponsive)=>{
|
|
176
176
|
return {
|
|
177
177
|
...core.makeStyleResponsive('w', {
|
|
178
|
-
desktop: getWidthValue('desktop'),
|
|
179
|
-
tablet: getWidthValue('tablet'),
|
|
180
|
-
mobile: getWidthValue('mobile')
|
|
178
|
+
desktop: getWidthValue('desktop', isFullWidthResponsive),
|
|
179
|
+
tablet: getWidthValue('tablet', isFullWidthResponsive),
|
|
180
|
+
mobile: getWidthValue('mobile', isFullWidthResponsive)
|
|
181
181
|
}),
|
|
182
182
|
...core.makeStyleResponsive('minw', {
|
|
183
|
-
desktop: getWidthValue('desktop'),
|
|
184
|
-
tablet: getWidthValue('tablet'),
|
|
185
|
-
mobile: getWidthValue('mobile')
|
|
183
|
+
desktop: getWidthValue('desktop', isFullWidthResponsive),
|
|
184
|
+
tablet: getWidthValue('tablet', isFullWidthResponsive),
|
|
185
|
+
mobile: getWidthValue('mobile', isFullWidthResponsive)
|
|
186
186
|
})
|
|
187
187
|
};
|
|
188
188
|
};
|
|
@@ -205,12 +205,12 @@ const getMarqueeBaseStyle = (props)=>{
|
|
|
205
205
|
['--delay']: `${delay}s`,
|
|
206
206
|
['--iteration-count']: loop ? `${loop}` : 'infinite',
|
|
207
207
|
['--min-width']: autoFill ? `auto` : '100%',
|
|
208
|
-
...getWidthMarquee()
|
|
208
|
+
...getWidthMarquee(props?.isFullWidthResponsive)
|
|
209
209
|
};
|
|
210
210
|
};
|
|
211
|
-
const getChildBaseStyle = (direction)=>({
|
|
211
|
+
const getChildBaseStyle = (direction, isFullWidthResponsive)=>({
|
|
212
212
|
['--transform']: direction === 'up' ? 'rotate(90deg)' : direction === 'down' ? 'rotate(-90deg)' : 'none',
|
|
213
|
-
...getWidthMarquee()
|
|
213
|
+
...getWidthMarquee(isFullWidthResponsive)
|
|
214
214
|
});
|
|
215
215
|
|
|
216
216
|
exports.getAlignStyles = getAlignStyles;
|
|
@@ -14,12 +14,19 @@ const Marquee = ({ children, style, builderAttrs, rawChildren, advanced, ...prop
|
|
|
14
14
|
const { iconSeparatorColor, backgroundColor } = styles$1 || {};
|
|
15
15
|
const { iconSeparatorSvg, isShowIconSeparator } = setting || {};
|
|
16
16
|
const itemSize = rawChildren.length;
|
|
17
|
-
const { isFullWidth } = index.useMarqueeLiquidStyles(setting, styles$1);
|
|
17
|
+
const { isFullWidth, getIsFullWidthValue } = index.useMarqueeLiquidStyles(setting, styles$1);
|
|
18
18
|
const { styleHeight, styleWidth, getWidthForWrapperItem, getHeightOfIconSeparatorSize, getWidthOfIconSeparatorSize, getIconPosition, getItemPaddingRightSpacingValue, getWidthForItem } = styles.getMarqueeStyles({
|
|
19
19
|
itemSize,
|
|
20
20
|
setting,
|
|
21
21
|
styles: styles$1
|
|
22
22
|
});
|
|
23
|
+
const isFullWidthResponsive = ()=>{
|
|
24
|
+
return {
|
|
25
|
+
desktop: getIsFullWidthValue('desktop'),
|
|
26
|
+
tablet: getIsFullWidthValue('tablet'),
|
|
27
|
+
mobile: getIsFullWidthValue('mobile')
|
|
28
|
+
};
|
|
29
|
+
};
|
|
23
30
|
const computeAlignClasses = system.createClass(classes.getAlignClasses);
|
|
24
31
|
const computeAlignStyles = system.createStyle(styles.getAlignStyles(styles$1));
|
|
25
32
|
const computedContentStyles = system.createStyle(styles.getContentStyles({
|
|
@@ -72,6 +79,7 @@ const Marquee = ({ children, style, builderAttrs, rawChildren, advanced, ...prop
|
|
|
72
79
|
direction: props.setting?.direction,
|
|
73
80
|
play: (props.setting?.speed ?? 0) > 0,
|
|
74
81
|
pauseOnHover: props.setting?.stopOnHover,
|
|
82
|
+
isFullWidthResponsive: isFullWidthResponsive(),
|
|
75
83
|
children: `
|
|
76
84
|
<div class="${computedFastMarqueeContentClasses}">
|
|
77
85
|
${rawChildren?.length ? core.WrapRenderChildren({
|
|
@@ -7,7 +7,8 @@ var styles = require('../common/styles.js');
|
|
|
7
7
|
var system = require('@gem-sdk/system');
|
|
8
8
|
|
|
9
9
|
const MarqueeBase = (props)=>{
|
|
10
|
-
const { style = {}, autoFill = false, play = true, pauseOnHover = false, pauseOnClick = false, direction = 'left', delay = 0, loop = 0, children } = props ?? {};
|
|
10
|
+
const { style = {}, autoFill = false, play = true, pauseOnHover = false, pauseOnClick = false, direction = 'left', delay = 0, loop = 0, children, isFullWidthResponsive } = props ?? {};
|
|
11
|
+
console.log('isFullWidthResponsive', isFullWidthResponsive);
|
|
11
12
|
const computedContainerBaseStyle = system.createStyle(styles.getContainerBaseStyle({
|
|
12
13
|
style,
|
|
13
14
|
play,
|
|
@@ -19,30 +20,23 @@ const MarqueeBase = (props)=>{
|
|
|
19
20
|
direction,
|
|
20
21
|
delay,
|
|
21
22
|
loop,
|
|
22
|
-
autoFill
|
|
23
|
+
autoFill,
|
|
24
|
+
isFullWidthResponsive
|
|
23
25
|
}));
|
|
24
|
-
const computedChildBaseStyle = system.createStyle(styles.getChildBaseStyle(direction));
|
|
26
|
+
const computedChildBaseStyle = system.createStyle(styles.getChildBaseStyle(direction, isFullWidthResponsive));
|
|
25
27
|
return core.template`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
<div style="${computedContainerBaseStyle}" class="rfm-marquee-container">
|
|
29
|
+
<div class="rfm-marquee" style="${computedMarqueeBaseStyle}">
|
|
28
30
|
<div class="rfm-initial-child-container">
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
${core.template`
|
|
32
|
+
<div style="${computedChildBaseStyle}" class="${`rfm-child`}">
|
|
33
|
+
${children}
|
|
34
|
+
</div>
|
|
35
|
+
`}
|
|
34
36
|
</div>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
${children}
|
|
39
|
-
</div>
|
|
40
|
-
`}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="rfm-marquee placeholder-marquee" style="${computedMarqueeBaseStyle}">
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="rfm-marquee placeholder-marquee" style="${computedMarqueeBaseStyle}"></div>
|
|
39
|
+
</div>
|
|
46
40
|
`;
|
|
47
41
|
};
|
|
48
42
|
|
|
@@ -66,7 +66,7 @@ const HeroBanner = (props)=>{
|
|
|
66
66
|
}}
|
|
67
67
|
class="${wrapperClasses}"
|
|
68
68
|
style="${wrapperStyle}"
|
|
69
|
-
gp-data='${dataStringify(stateDataHeroBanner)
|
|
69
|
+
gp-data='${dataStringify(stateDataHeroBanner)}'
|
|
70
70
|
>
|
|
71
71
|
${If(!hasLinkCover, renderInnerHeroBanner())}
|
|
72
72
|
${If(hasLinkCover, template /* liquid */ `
|
|
@@ -53,15 +53,6 @@ const heroBanner1Col = {
|
|
|
53
53
|
width: '1200px',
|
|
54
54
|
height: '600px'
|
|
55
55
|
}
|
|
56
|
-
},
|
|
57
|
-
background: {
|
|
58
|
-
desktop: {
|
|
59
|
-
image: {
|
|
60
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
61
|
-
},
|
|
62
|
-
loop: true,
|
|
63
|
-
lazyLoad: false
|
|
64
|
-
}
|
|
65
56
|
}
|
|
66
57
|
},
|
|
67
58
|
childrens: [
|
|
@@ -58,15 +58,6 @@ const heroBannerContentLeft = {
|
|
|
58
58
|
width: '100%',
|
|
59
59
|
height: 'auto'
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
background: {
|
|
63
|
-
desktop: {
|
|
64
|
-
image: {
|
|
65
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
66
|
-
},
|
|
67
|
-
loop: true,
|
|
68
|
-
lazyLoad: false
|
|
69
|
-
}
|
|
70
61
|
}
|
|
71
62
|
},
|
|
72
63
|
childrens: [
|
|
@@ -66,15 +66,6 @@ const heroBannerContentRight = {
|
|
|
66
66
|
widthHeightLinked: true,
|
|
67
67
|
width: '100%'
|
|
68
68
|
}
|
|
69
|
-
},
|
|
70
|
-
background: {
|
|
71
|
-
desktop: {
|
|
72
|
-
image: {
|
|
73
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
74
|
-
},
|
|
75
|
-
loop: true,
|
|
76
|
-
lazyLoad: false
|
|
77
|
-
}
|
|
78
69
|
}
|
|
79
70
|
},
|
|
80
71
|
childrens: [
|
|
@@ -53,15 +53,6 @@ const heroBannerParallax = {
|
|
|
53
53
|
width: '1200px',
|
|
54
54
|
height: '600px'
|
|
55
55
|
}
|
|
56
|
-
},
|
|
57
|
-
background: {
|
|
58
|
-
desktop: {
|
|
59
|
-
image: {
|
|
60
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png'
|
|
61
|
-
},
|
|
62
|
-
loop: true,
|
|
63
|
-
lazyLoad: false
|
|
64
|
-
}
|
|
65
56
|
}
|
|
66
57
|
},
|
|
67
58
|
childrens: [
|
|
@@ -40,6 +40,12 @@ const heroBannerVideo = {
|
|
|
40
40
|
background: {
|
|
41
41
|
desktop: {
|
|
42
42
|
type: 'video',
|
|
43
|
+
image: {
|
|
44
|
+
src: '',
|
|
45
|
+
width: 1920,
|
|
46
|
+
height: 900
|
|
47
|
+
},
|
|
48
|
+
videoType: 'html5',
|
|
43
49
|
video: 'https://youtu.be/KOxfzBp72uk',
|
|
44
50
|
videoHtml5: 'https://media.w3.org/2010/05/sintel/trailer.mp4'
|
|
45
51
|
}
|
|
@@ -412,14 +412,14 @@ const SettingsV2 = [
|
|
|
412
412
|
id: 'background',
|
|
413
413
|
type: 'background-media',
|
|
414
414
|
label: 'Background Color & Image',
|
|
415
|
+
ignoreReRender: true,
|
|
415
416
|
showVideo: true,
|
|
416
417
|
devices: {
|
|
417
418
|
desktop: {
|
|
418
419
|
default: {
|
|
419
420
|
type: 'image',
|
|
420
|
-
color: 'bg-2',
|
|
421
421
|
image: {
|
|
422
|
-
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-
|
|
422
|
+
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-c9f109ee-2adf-4ec4-8d26-11a891c50a13.png',
|
|
423
423
|
width: 1920,
|
|
424
424
|
height: 900
|
|
425
425
|
},
|
|
@@ -430,8 +430,8 @@ const SettingsV2 = [
|
|
|
430
430
|
},
|
|
431
431
|
repeat: 'no-repeat',
|
|
432
432
|
attachment: 'scroll',
|
|
433
|
-
video: '
|
|
434
|
-
videoHtml5: '
|
|
433
|
+
video: '',
|
|
434
|
+
videoHtml5: '',
|
|
435
435
|
videoType: 'youtube',
|
|
436
436
|
loop: true,
|
|
437
437
|
lazyLoad: false
|
|
@@ -652,12 +652,16 @@ const SettingsV2 = [
|
|
|
652
652
|
],
|
|
653
653
|
step: 1,
|
|
654
654
|
default: {
|
|
655
|
-
normal: '
|
|
655
|
+
normal: '20%',
|
|
656
656
|
hover: '20%'
|
|
657
657
|
},
|
|
658
658
|
state: {
|
|
659
659
|
normal: true,
|
|
660
660
|
hover: true
|
|
661
|
+
},
|
|
662
|
+
compoDefaultValue: {
|
|
663
|
+
normal: '20%',
|
|
664
|
+
hover: '20%'
|
|
661
665
|
}
|
|
662
666
|
},
|
|
663
667
|
{
|
|
@@ -170,17 +170,17 @@ const getWidthValue = (currentDevice, isFullWidthResponsive)=>{
|
|
|
170
170
|
const isFullWidthByScreen = getResponsiveValueByScreen(isFullWidthResponsive, currentDevice);
|
|
171
171
|
return isFullWidthByScreen ? '100%' : 'auto';
|
|
172
172
|
};
|
|
173
|
-
const getWidthMarquee = ()=>{
|
|
173
|
+
const getWidthMarquee = (isFullWidthResponsive)=>{
|
|
174
174
|
return {
|
|
175
175
|
...makeStyleResponsive('w', {
|
|
176
|
-
desktop: getWidthValue('desktop'),
|
|
177
|
-
tablet: getWidthValue('tablet'),
|
|
178
|
-
mobile: getWidthValue('mobile')
|
|
176
|
+
desktop: getWidthValue('desktop', isFullWidthResponsive),
|
|
177
|
+
tablet: getWidthValue('tablet', isFullWidthResponsive),
|
|
178
|
+
mobile: getWidthValue('mobile', isFullWidthResponsive)
|
|
179
179
|
}),
|
|
180
180
|
...makeStyleResponsive('minw', {
|
|
181
|
-
desktop: getWidthValue('desktop'),
|
|
182
|
-
tablet: getWidthValue('tablet'),
|
|
183
|
-
mobile: getWidthValue('mobile')
|
|
181
|
+
desktop: getWidthValue('desktop', isFullWidthResponsive),
|
|
182
|
+
tablet: getWidthValue('tablet', isFullWidthResponsive),
|
|
183
|
+
mobile: getWidthValue('mobile', isFullWidthResponsive)
|
|
184
184
|
})
|
|
185
185
|
};
|
|
186
186
|
};
|
|
@@ -203,12 +203,12 @@ const getMarqueeBaseStyle = (props)=>{
|
|
|
203
203
|
['--delay']: `${delay}s`,
|
|
204
204
|
['--iteration-count']: loop ? `${loop}` : 'infinite',
|
|
205
205
|
['--min-width']: autoFill ? `auto` : '100%',
|
|
206
|
-
...getWidthMarquee()
|
|
206
|
+
...getWidthMarquee(props?.isFullWidthResponsive)
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
|
-
const getChildBaseStyle = (direction)=>({
|
|
209
|
+
const getChildBaseStyle = (direction, isFullWidthResponsive)=>({
|
|
210
210
|
['--transform']: direction === 'up' ? 'rotate(90deg)' : direction === 'down' ? 'rotate(-90deg)' : 'none',
|
|
211
|
-
...getWidthMarquee()
|
|
211
|
+
...getWidthMarquee(isFullWidthResponsive)
|
|
212
212
|
});
|
|
213
213
|
|
|
214
214
|
export { getAlignStyles, getChildBaseStyle, getContainerBaseStyle, getContentStyles, getFastMarqueeChildrenIconStyles, getItemWrapperStyles, getMarqueeBaseStyle, getMarqueeStyles, getWidthMarquee };
|
|
@@ -10,12 +10,19 @@ const Marquee = ({ children, style, builderAttrs, rawChildren, advanced, ...prop
|
|
|
10
10
|
const { iconSeparatorColor, backgroundColor } = styles || {};
|
|
11
11
|
const { iconSeparatorSvg, isShowIconSeparator } = setting || {};
|
|
12
12
|
const itemSize = rawChildren.length;
|
|
13
|
-
const { isFullWidth } = useMarqueeLiquidStyles(setting, styles);
|
|
13
|
+
const { isFullWidth, getIsFullWidthValue } = useMarqueeLiquidStyles(setting, styles);
|
|
14
14
|
const { styleHeight, styleWidth, getWidthForWrapperItem, getHeightOfIconSeparatorSize, getWidthOfIconSeparatorSize, getIconPosition, getItemPaddingRightSpacingValue, getWidthForItem } = getMarqueeStyles({
|
|
15
15
|
itemSize,
|
|
16
16
|
setting,
|
|
17
17
|
styles
|
|
18
18
|
});
|
|
19
|
+
const isFullWidthResponsive = ()=>{
|
|
20
|
+
return {
|
|
21
|
+
desktop: getIsFullWidthValue('desktop'),
|
|
22
|
+
tablet: getIsFullWidthValue('tablet'),
|
|
23
|
+
mobile: getIsFullWidthValue('mobile')
|
|
24
|
+
};
|
|
25
|
+
};
|
|
19
26
|
const computeAlignClasses = createClass(getAlignClasses);
|
|
20
27
|
const computeAlignStyles = createStyle(getAlignStyles(styles));
|
|
21
28
|
const computedContentStyles = createStyle(getContentStyles({
|
|
@@ -68,6 +75,7 @@ const Marquee = ({ children, style, builderAttrs, rawChildren, advanced, ...prop
|
|
|
68
75
|
direction: props.setting?.direction,
|
|
69
76
|
play: (props.setting?.speed ?? 0) > 0,
|
|
70
77
|
pauseOnHover: props.setting?.stopOnHover,
|
|
78
|
+
isFullWidthResponsive: isFullWidthResponsive(),
|
|
71
79
|
children: `
|
|
72
80
|
<div class="${computedFastMarqueeContentClasses}">
|
|
73
81
|
${rawChildren?.length ? WrapRenderChildren({
|
|
@@ -3,7 +3,8 @@ import { getContainerBaseStyle, getMarqueeBaseStyle, getChildBaseStyle } from '.
|
|
|
3
3
|
import { createStyle } from '@gem-sdk/system';
|
|
4
4
|
|
|
5
5
|
const MarqueeBase = (props)=>{
|
|
6
|
-
const { style = {}, autoFill = false, play = true, pauseOnHover = false, pauseOnClick = false, direction = 'left', delay = 0, loop = 0, children } = props ?? {};
|
|
6
|
+
const { style = {}, autoFill = false, play = true, pauseOnHover = false, pauseOnClick = false, direction = 'left', delay = 0, loop = 0, children, isFullWidthResponsive } = props ?? {};
|
|
7
|
+
console.log('isFullWidthResponsive', isFullWidthResponsive);
|
|
7
8
|
const computedContainerBaseStyle = createStyle(getContainerBaseStyle({
|
|
8
9
|
style,
|
|
9
10
|
play,
|
|
@@ -15,30 +16,23 @@ const MarqueeBase = (props)=>{
|
|
|
15
16
|
direction,
|
|
16
17
|
delay,
|
|
17
18
|
loop,
|
|
18
|
-
autoFill
|
|
19
|
+
autoFill,
|
|
20
|
+
isFullWidthResponsive
|
|
19
21
|
}));
|
|
20
|
-
const computedChildBaseStyle = createStyle(getChildBaseStyle(direction));
|
|
22
|
+
const computedChildBaseStyle = createStyle(getChildBaseStyle(direction, isFullWidthResponsive));
|
|
21
23
|
return template`
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
<div style="${computedContainerBaseStyle}" class="rfm-marquee-container">
|
|
25
|
+
<div class="rfm-marquee" style="${computedMarqueeBaseStyle}">
|
|
24
26
|
<div class="rfm-initial-child-container">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
${template`
|
|
28
|
+
<div style="${computedChildBaseStyle}" class="${`rfm-child`}">
|
|
29
|
+
${children}
|
|
30
|
+
</div>
|
|
31
|
+
`}
|
|
30
32
|
</div>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
${children}
|
|
35
|
-
</div>
|
|
36
|
-
`}
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="rfm-marquee placeholder-marquee" style="${computedMarqueeBaseStyle}">
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="rfm-marquee placeholder-marquee" style="${computedMarqueeBaseStyle}"></div>
|
|
35
|
+
</div>
|
|
42
36
|
`;
|
|
43
37
|
};
|
|
44
38
|
|