@gem-sdk/components 2.0.0-dev.348 → 2.0.0-dev.350
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/article/setting/ArticleList.js +3 -3
- package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +2 -2
- package/dist/cjs/article/setting/configs/ArticleCategory/presets.js +10 -1
- package/dist/cjs/article/setting/configs/ArticleCategory/uiV2.js +9 -2
- package/dist/cjs/article/setting/configs/ArticleDate/presets.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleExcerpt/settings.js +1 -4
- package/dist/cjs/article/setting/configs/ArticleExcerpt/uiV2.js +15 -0
- package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +11 -11
- package/dist/cjs/article/setting/configs/ArticleReadMore/presets.js +22 -1
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +42 -7
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +73 -103
- package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +15 -8
- 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/article/setting/ArticleList.js +3 -3
- package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +2 -2
- package/dist/esm/article/setting/configs/ArticleCategory/presets.js +10 -1
- package/dist/esm/article/setting/configs/ArticleCategory/uiV2.js +9 -2
- package/dist/esm/article/setting/configs/ArticleDate/presets.js +1 -1
- package/dist/esm/article/setting/configs/ArticleExcerpt/settings.js +1 -4
- package/dist/esm/article/setting/configs/ArticleExcerpt/uiV2.js +15 -0
- package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +11 -11
- package/dist/esm/article/setting/configs/ArticleReadMore/presets.js +22 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +42 -7
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +73 -103
- package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +15 -8
- 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
|
@@ -620,7 +620,7 @@ const config = {
|
|
|
620
620
|
}
|
|
621
621
|
},
|
|
622
622
|
attrs: {
|
|
623
|
-
color: '
|
|
623
|
+
color: 'text-1'
|
|
624
624
|
}
|
|
625
625
|
},
|
|
626
626
|
color: {
|
|
@@ -687,7 +687,7 @@ const config = {
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
attrs: {
|
|
690
|
-
color: '
|
|
690
|
+
color: 'text-1'
|
|
691
691
|
}
|
|
692
692
|
},
|
|
693
693
|
color: {
|
|
@@ -754,7 +754,7 @@ const config = {
|
|
|
754
754
|
}
|
|
755
755
|
},
|
|
756
756
|
attrs: {
|
|
757
|
-
color: '
|
|
757
|
+
color: 'text-1'
|
|
758
758
|
}
|
|
759
759
|
},
|
|
760
760
|
color: {
|
|
@@ -37,7 +37,7 @@ const ArticleAuthorPresets = [
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
attrs: {
|
|
40
|
-
color: '
|
|
40
|
+
color: 'text-1'
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
},
|
|
@@ -45,7 +45,7 @@ const ArticleAuthorPresets = [
|
|
|
45
45
|
'spacing-setting': {
|
|
46
46
|
desktop: {
|
|
47
47
|
margin: {
|
|
48
|
-
bottom:
|
|
48
|
+
bottom: 'var(--g-s-s)'
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
const uiV2 = [
|
|
2
2
|
{
|
|
3
3
|
label: {
|
|
4
|
-
en: '
|
|
4
|
+
en: 'Image'
|
|
5
5
|
},
|
|
6
|
+
conditionDisplay: "shape.shape !== 'original'",
|
|
6
7
|
controls: [
|
|
7
8
|
{
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
label: {
|
|
10
|
+
en: 'Scale'
|
|
10
11
|
},
|
|
11
|
-
|
|
12
|
+
setting: {
|
|
13
|
+
id: 'objectFit'
|
|
14
|
+
}
|
|
12
15
|
}
|
|
13
16
|
]
|
|
14
17
|
},
|
|
15
18
|
{
|
|
16
19
|
label: {
|
|
17
|
-
en: '
|
|
20
|
+
en: 'Size'
|
|
18
21
|
},
|
|
19
|
-
conditionDisplay: "shape.shape !== 'original'",
|
|
20
22
|
controls: [
|
|
21
23
|
{
|
|
22
|
-
label: {
|
|
23
|
-
en: 'Image'
|
|
24
|
-
},
|
|
25
24
|
setting: {
|
|
26
|
-
id: '
|
|
27
|
-
}
|
|
25
|
+
id: 'shape'
|
|
26
|
+
},
|
|
27
|
+
layout: 'vertical'
|
|
28
28
|
}
|
|
29
29
|
]
|
|
30
30
|
},
|
|
@@ -25,7 +25,7 @@ const ArticleReadMorePresets = [
|
|
|
25
25
|
'spacing-setting': {
|
|
26
26
|
desktop: {
|
|
27
27
|
margin: {
|
|
28
|
-
bottom: 'var(--g-s-
|
|
28
|
+
bottom: 'var(--g-s-s)'
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -45,6 +45,27 @@ const ArticleReadMorePresets = [
|
|
|
45
45
|
gap: ''
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
+
typoText: {
|
|
49
|
+
type: 'paragraph-3',
|
|
50
|
+
custom: {
|
|
51
|
+
fontSize: {
|
|
52
|
+
desktop: '12px',
|
|
53
|
+
tablet: '12px',
|
|
54
|
+
mobile: '12px',
|
|
55
|
+
edited: [
|
|
56
|
+
'desktop'
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
lineHeight: {
|
|
60
|
+
desktop: '120%',
|
|
61
|
+
tablet: '120%',
|
|
62
|
+
mobile: '120%'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
attrs: {
|
|
66
|
+
color: 'text-1'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
48
69
|
globalSizeText: {
|
|
49
70
|
desktop: {
|
|
50
71
|
width: 'Auto',
|
|
@@ -157,7 +157,7 @@ const ArticleReadMoreSettings = [
|
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
id: 'background',
|
|
160
|
-
type: 'background',
|
|
160
|
+
type: 'background-media',
|
|
161
161
|
ignoreReRender: true,
|
|
162
162
|
devices: {
|
|
163
163
|
desktop: {
|
|
@@ -178,6 +178,27 @@ const ArticleReadMoreSettings = [
|
|
|
178
178
|
attachment: 'scroll'
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
+
},
|
|
182
|
+
compoDefaultValue: {
|
|
183
|
+
desktop: {
|
|
184
|
+
default: {
|
|
185
|
+
type: 'color',
|
|
186
|
+
color: '#DDDDDD',
|
|
187
|
+
image: {
|
|
188
|
+
src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
|
|
189
|
+
width: 1200,
|
|
190
|
+
height: 480
|
|
191
|
+
},
|
|
192
|
+
size: 'cover',
|
|
193
|
+
position: {
|
|
194
|
+
x: 50,
|
|
195
|
+
y: 50
|
|
196
|
+
},
|
|
197
|
+
repeat: 'no-repeat',
|
|
198
|
+
attachment: 'scroll',
|
|
199
|
+
preload: false
|
|
200
|
+
}
|
|
201
|
+
}
|
|
181
202
|
}
|
|
182
203
|
}
|
|
183
204
|
]
|
|
@@ -406,11 +427,18 @@ const ArticleReadMoreSettings = [
|
|
|
406
427
|
id: 'typoBtn',
|
|
407
428
|
type: 'typography-v2',
|
|
408
429
|
default: {
|
|
409
|
-
type: '
|
|
430
|
+
type: 'subheading-3',
|
|
431
|
+
custom: {
|
|
432
|
+
lineHeight: {
|
|
433
|
+
desktop: '120%',
|
|
434
|
+
tablet: '120%',
|
|
435
|
+
mobile: '120%'
|
|
436
|
+
}
|
|
437
|
+
}
|
|
410
438
|
},
|
|
411
439
|
ignoreReRender: true,
|
|
412
440
|
hiddenSetting: {
|
|
413
|
-
|
|
441
|
+
textAlign: true
|
|
414
442
|
}
|
|
415
443
|
},
|
|
416
444
|
{
|
|
@@ -625,12 +653,19 @@ const ArticleReadMoreSettings = [
|
|
|
625
653
|
id: 'typoText',
|
|
626
654
|
type: 'typography-v2',
|
|
627
655
|
default: {
|
|
628
|
-
type: '
|
|
656
|
+
type: 'subheading-3',
|
|
657
|
+
custom: {
|
|
658
|
+
lineHeight: {
|
|
659
|
+
desktop: '120%',
|
|
660
|
+
tablet: '120%',
|
|
661
|
+
mobile: '120%'
|
|
662
|
+
}
|
|
663
|
+
}
|
|
629
664
|
},
|
|
665
|
+
ignoreReRender: true,
|
|
630
666
|
hiddenSetting: {
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
ignoreReRender: true
|
|
667
|
+
textAlign: true
|
|
668
|
+
}
|
|
634
669
|
},
|
|
635
670
|
{
|
|
636
671
|
id: 'alignText',
|
|
@@ -46,11 +46,6 @@ const uiV2 = [
|
|
|
46
46
|
label: 'Full',
|
|
47
47
|
value: '100%',
|
|
48
48
|
showValue: true
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: 'Default',
|
|
52
|
-
value: 'default',
|
|
53
|
-
showValue: true
|
|
54
49
|
}
|
|
55
50
|
]
|
|
56
51
|
},
|
|
@@ -80,16 +75,6 @@ const uiV2 = [
|
|
|
80
75
|
label: 'Fit content',
|
|
81
76
|
value: 'Auto',
|
|
82
77
|
showValue: true
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: 'Full',
|
|
86
|
-
value: '100%',
|
|
87
|
-
showValue: true
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
label: 'Default',
|
|
91
|
-
value: 'default',
|
|
92
|
-
showValue: true
|
|
93
78
|
}
|
|
94
79
|
]
|
|
95
80
|
},
|
|
@@ -119,6 +104,79 @@ const uiV2 = [
|
|
|
119
104
|
}
|
|
120
105
|
]
|
|
121
106
|
},
|
|
107
|
+
{
|
|
108
|
+
label: {
|
|
109
|
+
en: 'Background'
|
|
110
|
+
},
|
|
111
|
+
controls: [
|
|
112
|
+
{
|
|
113
|
+
setting: {
|
|
114
|
+
id: 'backgroundColor'
|
|
115
|
+
},
|
|
116
|
+
layout: 'vertical'
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
conditionDisplay: `readMoreType == 'button'`,
|
|
122
|
+
controls: [
|
|
123
|
+
{
|
|
124
|
+
label: {
|
|
125
|
+
en: 'Icon'
|
|
126
|
+
},
|
|
127
|
+
setting: {
|
|
128
|
+
id: 'iconVisible'
|
|
129
|
+
},
|
|
130
|
+
options: {
|
|
131
|
+
labelVariant: 'primary',
|
|
132
|
+
toggleStyle: 'switch'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: {
|
|
139
|
+
en: 'Text style'
|
|
140
|
+
},
|
|
141
|
+
conditionDisplay: `readMoreType == 'button'`,
|
|
142
|
+
controls: [
|
|
143
|
+
{
|
|
144
|
+
id: 'typo',
|
|
145
|
+
label: {
|
|
146
|
+
en: 'Basic'
|
|
147
|
+
},
|
|
148
|
+
setting: {
|
|
149
|
+
id: 'typoBtn'
|
|
150
|
+
},
|
|
151
|
+
options: {
|
|
152
|
+
hideLabel: true,
|
|
153
|
+
fullWidth: true,
|
|
154
|
+
updateFields: [
|
|
155
|
+
{
|
|
156
|
+
field: 'attrs.textAlign',
|
|
157
|
+
settingId: 'textAlign'
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
layout: 'vertical',
|
|
162
|
+
controlChangeTrigger: {
|
|
163
|
+
settings: [
|
|
164
|
+
{
|
|
165
|
+
action: {
|
|
166
|
+
controlId: 'textAlign',
|
|
167
|
+
valueFromField: 'attrs.textAlign',
|
|
168
|
+
groupType: 'style',
|
|
169
|
+
controlType: 'style'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
options: {
|
|
174
|
+
noRecordHistory: true
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
122
180
|
{
|
|
123
181
|
label: {
|
|
124
182
|
en: 'Size'
|
|
@@ -227,49 +285,6 @@ const uiV2 = [
|
|
|
227
285
|
}
|
|
228
286
|
]
|
|
229
287
|
},
|
|
230
|
-
{
|
|
231
|
-
label: {
|
|
232
|
-
en: 'Text style'
|
|
233
|
-
},
|
|
234
|
-
conditionDisplay: `readMoreType == 'button'`,
|
|
235
|
-
controls: [
|
|
236
|
-
{
|
|
237
|
-
id: 'typo',
|
|
238
|
-
label: {
|
|
239
|
-
en: 'Basic'
|
|
240
|
-
},
|
|
241
|
-
setting: {
|
|
242
|
-
id: 'typoBtn'
|
|
243
|
-
},
|
|
244
|
-
options: {
|
|
245
|
-
hideLabel: true,
|
|
246
|
-
fullWidth: true,
|
|
247
|
-
updateFields: [
|
|
248
|
-
{
|
|
249
|
-
field: 'attrs.textAlign',
|
|
250
|
-
settingId: 'textAlign'
|
|
251
|
-
}
|
|
252
|
-
]
|
|
253
|
-
},
|
|
254
|
-
layout: 'vertical',
|
|
255
|
-
controlChangeTrigger: {
|
|
256
|
-
settings: [
|
|
257
|
-
{
|
|
258
|
-
action: {
|
|
259
|
-
controlId: 'textAlign',
|
|
260
|
-
valueFromField: 'attrs.textAlign',
|
|
261
|
-
groupType: 'style',
|
|
262
|
-
controlType: 'style'
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
],
|
|
266
|
-
options: {
|
|
267
|
-
noRecordHistory: true
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
]
|
|
272
|
-
},
|
|
273
288
|
{
|
|
274
289
|
label: {
|
|
275
290
|
en: 'Text style'
|
|
@@ -313,23 +328,6 @@ const uiV2 = [
|
|
|
313
328
|
}
|
|
314
329
|
]
|
|
315
330
|
},
|
|
316
|
-
{
|
|
317
|
-
conditionDisplay: `readMoreType == 'button'`,
|
|
318
|
-
controls: [
|
|
319
|
-
{
|
|
320
|
-
label: {
|
|
321
|
-
en: 'Icon'
|
|
322
|
-
},
|
|
323
|
-
setting: {
|
|
324
|
-
id: 'iconVisible'
|
|
325
|
-
},
|
|
326
|
-
options: {
|
|
327
|
-
labelVariant: 'primary',
|
|
328
|
-
toggleStyle: 'switch'
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
]
|
|
332
|
-
},
|
|
333
331
|
{
|
|
334
332
|
conditionDisplay: "iconVisible == true && readMoreType == 'button'",
|
|
335
333
|
controls: [
|
|
@@ -361,34 +359,6 @@ const uiV2 = [
|
|
|
361
359
|
}
|
|
362
360
|
]
|
|
363
361
|
},
|
|
364
|
-
{
|
|
365
|
-
label: {
|
|
366
|
-
en: 'Background'
|
|
367
|
-
},
|
|
368
|
-
conditionDisplay: `readMoreType == 'button'`,
|
|
369
|
-
controls: [
|
|
370
|
-
{
|
|
371
|
-
setting: {
|
|
372
|
-
id: 'backgroundColor'
|
|
373
|
-
},
|
|
374
|
-
layout: 'vertical'
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
label: {
|
|
380
|
-
en: 'Background'
|
|
381
|
-
},
|
|
382
|
-
conditionDisplay: `readMoreType == 'text'`,
|
|
383
|
-
controls: [
|
|
384
|
-
{
|
|
385
|
-
setting: {
|
|
386
|
-
id: 'background'
|
|
387
|
-
},
|
|
388
|
-
layout: 'vertical'
|
|
389
|
-
}
|
|
390
|
-
]
|
|
391
|
-
},
|
|
392
362
|
{
|
|
393
363
|
label: {
|
|
394
364
|
en: 'Hover effect'
|
|
@@ -38,14 +38,6 @@ const uiV2 = [
|
|
|
38
38
|
noRecordHistory: true
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: {
|
|
44
|
-
en: 'SEO'
|
|
45
|
-
},
|
|
46
|
-
setting: {
|
|
47
|
-
id: 'htmlTag'
|
|
48
|
-
}
|
|
49
41
|
}
|
|
50
42
|
]
|
|
51
43
|
},
|
|
@@ -124,6 +116,21 @@ const uiV2 = [
|
|
|
124
116
|
}
|
|
125
117
|
}
|
|
126
118
|
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: {
|
|
122
|
+
en: 'SEO'
|
|
123
|
+
},
|
|
124
|
+
controls: [
|
|
125
|
+
{
|
|
126
|
+
label: {
|
|
127
|
+
en: 'SEO tag'
|
|
128
|
+
},
|
|
129
|
+
setting: {
|
|
130
|
+
id: 'htmlTag'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
127
134
|
}
|
|
128
135
|
];
|
|
129
136
|
|
|
@@ -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
|
|