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