@gem-sdk/components 2.0.0-dev.460 → 2.0.0-dev.462

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 (39) hide show
  1. package/dist/cjs/form/components/form-dropdown/common/composeClasses.js +1 -1
  2. package/dist/cjs/form/components/form-dropdown/common/composeStyles.js +1 -34
  3. package/dist/cjs/form/components/form-dropdown/hooks/index.js +2 -2
  4. package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +9 -7
  5. package/dist/cjs/form/components/newsletter/common/composeAttrs.js +6 -1
  6. package/dist/cjs/form/components/newsletter/common/composeStyles.js +10 -4
  7. package/dist/cjs/form/setting/form-checkbox/configs/uiV2.js +3 -0
  8. package/dist/cjs/form/setting/form-textarea/configs/uiV2.js +3 -0
  9. package/dist/cjs/form/setting/text-field/configs/uiV2.js +3 -0
  10. package/dist/cjs/marquee/setting/Marquee.js +1 -3
  11. package/dist/cjs/marquee/setting/configs/presets.js +10 -10
  12. package/dist/cjs/marquee/setting/configs/settingsV2.js +42 -40
  13. package/dist/cjs/marquee/setting/configs/uiV2.js +137 -34
  14. package/dist/cjs/product/components/ProductVariants/components/variants/index.js +4 -1
  15. package/dist/cjs/product/setting/product-list/configs/presets.js +4 -6
  16. package/dist/cjs/product/setting/product-title/configs/settings.js +2 -2
  17. package/dist/cjs/product/setting/product-variant/configs/settings.js +9 -7
  18. package/dist/cjs/product/setting/product-variant/configs/uiV2.js +0 -3
  19. package/dist/esm/form/components/form-dropdown/common/composeClasses.js +1 -1
  20. package/dist/esm/form/components/form-dropdown/common/composeStyles.js +3 -35
  21. package/dist/esm/form/components/form-dropdown/hooks/index.js +2 -2
  22. package/dist/esm/form/components/newsletter/Newsletter.liquid.js +9 -7
  23. package/dist/esm/form/components/newsletter/common/composeAttrs.js +6 -1
  24. package/dist/esm/form/components/newsletter/common/composeStyles.js +10 -4
  25. package/dist/esm/form/setting/form-checkbox/configs/uiV2.js +3 -0
  26. package/dist/esm/form/setting/form-textarea/configs/uiV2.js +3 -0
  27. package/dist/esm/form/setting/text-field/configs/uiV2.js +3 -0
  28. package/dist/esm/marquee/setting/Marquee.js +1 -3
  29. package/dist/esm/marquee/setting/configs/presets.js +10 -10
  30. package/dist/esm/marquee/setting/configs/settingsV2.js +42 -40
  31. package/dist/esm/marquee/setting/configs/uiV2.js +137 -34
  32. package/dist/esm/product/components/ProductVariants/components/variants/index.js +4 -1
  33. package/dist/esm/product/setting/product-list/configs/presets.js +4 -6
  34. package/dist/esm/product/setting/product-title/configs/settings.js +2 -2
  35. package/dist/esm/product/setting/product-variant/configs/settings.js +9 -7
  36. package/dist/esm/product/setting/product-variant/configs/uiV2.js +0 -3
  37. package/package.json +2 -2
  38. package/dist/cjs/marquee/setting/configs/settings.js +0 -318
  39. package/dist/esm/marquee/setting/configs/settings.js +0 -316
@@ -6,7 +6,7 @@ const SettingUIV2 = [
6
6
  controls: [
7
7
  {
8
8
  label: {
9
- en: 'Items'
9
+ en: 'Order'
10
10
  },
11
11
  setting: {
12
12
  id: 'childItem'
@@ -16,7 +16,22 @@ const SettingUIV2 = [
16
16
  },
17
17
  {
18
18
  label: {
19
- en: 'Item'
19
+ en: 'Item spacing'
20
+ },
21
+ controls: [
22
+ {
23
+ label: {
24
+ en: 'Gap'
25
+ },
26
+ setting: {
27
+ id: 'itemSpacing'
28
+ }
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ label: {
34
+ en: 'Item style'
20
35
  },
21
36
  controls: [
22
37
  {
@@ -25,8 +40,7 @@ const SettingUIV2 = [
25
40
  },
26
41
  label: {
27
42
  en: 'Max width'
28
- },
29
- layout: 'vertical'
43
+ }
30
44
  },
31
45
  {
32
46
  layout: 'vertical',
@@ -77,26 +91,11 @@ const SettingUIV2 = [
77
91
  ]
78
92
  }
79
93
  },
80
- {
81
- label: {
82
- en: 'Item spacing'
83
- },
84
- controls: [
85
- {
86
- label: {
87
- en: 'Gap'
88
- },
89
- setting: {
90
- id: 'itemSpacing'
91
- }
92
- }
93
- ]
94
- },
95
94
  {
96
95
  controls: [
97
96
  {
98
97
  label: {
99
- en: 'Icon separator'
98
+ en: 'Separator'
100
99
  },
101
100
  setting: {
102
101
  id: 'isShowIconSeparator'
@@ -112,7 +111,7 @@ const SettingUIV2 = [
112
111
  },
113
112
  conditionDisplay: 'isShowIconSeparator == true',
114
113
  label: {
115
- en: 'Choose'
114
+ en: 'Icon'
116
115
  }
117
116
  },
118
117
  {
@@ -135,6 +134,43 @@ const SettingUIV2 = [
135
134
  }
136
135
  ]
137
136
  },
137
+ {
138
+ label: {
139
+ en: 'Marquee effect'
140
+ },
141
+ controls: [
142
+ {
143
+ label: {
144
+ en: 'Direction'
145
+ },
146
+ setting: {
147
+ id: 'direction'
148
+ }
149
+ },
150
+ {
151
+ label: {
152
+ en: 'Stop on hover'
153
+ },
154
+ setting: {
155
+ id: 'stopOnHover'
156
+ }
157
+ },
158
+ {
159
+ label: {
160
+ en: 'Speed'
161
+ },
162
+ setting: {
163
+ id: 'speed'
164
+ }
165
+ },
166
+ {
167
+ setting: {
168
+ id: 'isPreview'
169
+ },
170
+ layout: 'vertical'
171
+ }
172
+ ]
173
+ },
138
174
  {
139
175
  label: {
140
176
  en: 'Size'
@@ -198,6 +234,32 @@ const SettingUIV2 = [
198
234
  }
199
235
  ]
200
236
  }
237
+ },
238
+ {
239
+ label: {
240
+ en: 'Padding'
241
+ },
242
+ controlConfig: {
243
+ id: 'padding',
244
+ type: 'padding-v2',
245
+ linkWithSetting: {
246
+ name: 'spacing-setting',
247
+ field: 'padding'
248
+ },
249
+ compoDefaultValue: {
250
+ desktop: {
251
+ default: {
252
+ padding: {
253
+ type: 'custom',
254
+ top: '16px',
255
+ bottom: '16px',
256
+ left: '0px',
257
+ right: '0px'
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
201
263
  }
202
264
  ]
203
265
  },
@@ -218,38 +280,79 @@ const SettingUIV2 = [
218
280
  },
219
281
  {
220
282
  label: {
221
- en: 'Interaction'
283
+ en: 'Shape'
222
284
  },
223
285
  controls: [
224
286
  {
225
287
  label: {
226
- en: 'Stop on hover'
288
+ en: 'Border'
227
289
  },
228
290
  setting: {
229
- id: 'stopOnHover'
291
+ id: 'border',
292
+ state: 'normal'
230
293
  }
231
294
  },
232
295
  {
233
296
  label: {
234
- en: 'Speed'
297
+ en: 'Corner'
235
298
  },
236
299
  setting: {
237
- id: 'speed'
300
+ id: 'rounded',
301
+ state: 'normal'
238
302
  }
239
303
  },
240
304
  {
241
305
  label: {
242
- en: 'Direction'
306
+ en: 'Shadow'
243
307
  },
244
308
  setting: {
245
- id: 'direction'
246
- }
247
- },
248
- {
249
- setting: {
250
- id: 'isPreview'
309
+ id: 'boxShadow',
310
+ state: 'normal'
251
311
  },
252
- layout: 'vertical'
312
+ options: {
313
+ updateFields: [
314
+ {
315
+ field: 'enable',
316
+ settingId: 'hasBoxShadow',
317
+ state: 'normal'
318
+ }
319
+ ]
320
+ },
321
+ controlChangeTrigger: {
322
+ settings: [
323
+ {
324
+ condition: `boxShadow.normal.enable === true`,
325
+ source: [
326
+ 'boxShadow',
327
+ 'hasBoxShadow'
328
+ ],
329
+ action: {
330
+ controlId: 'hasBoxShadow',
331
+ groupType: 'advanced',
332
+ controlType: 'advanced',
333
+ state: 'normal',
334
+ newValue: true
335
+ }
336
+ },
337
+ {
338
+ condition: `boxShadow.normal.enable === false`,
339
+ source: [
340
+ 'boxShadow',
341
+ 'hasBoxShadow'
342
+ ],
343
+ action: {
344
+ controlId: 'hasBoxShadow',
345
+ groupType: 'advanced',
346
+ controlType: 'advanced',
347
+ state: 'normal',
348
+ newValue: false
349
+ }
350
+ }
351
+ ],
352
+ options: {
353
+ noRecordHistory: true
354
+ }
355
+ }
253
356
  }
254
357
  ]
255
358
  },
@@ -71,7 +71,10 @@ const VariantItem = (props)=>{
71
71
  window.dispatchEvent(changeSelectedOptionEvent);
72
72
  }
73
73
  };
74
- const labelClass = createClass(getVariantItemLabelClass(props));
74
+ const labelClass = createClass(getVariantItemLabelClass({
75
+ ...props,
76
+ available
77
+ }));
75
78
  const tooltipClass = createClass(getTooltipClass());
76
79
  const tooltipSvgClass = createClass(getTooltipSvgClass());
77
80
  const variantOptionClass = createClass(getVariantOptionClass());
@@ -145,7 +145,7 @@ const ProductListPreset = [
145
145
  },
146
146
  styles: {
147
147
  typo: {
148
- type: 'subheading-2'
148
+ type: 'subheading-1'
149
149
  },
150
150
  textAlign: {
151
151
  desktop: 'left'
@@ -154,8 +154,7 @@ const ProductListPreset = [
154
154
  desktop: true
155
155
  },
156
156
  lineClamp: {
157
- desktop: 2,
158
- mobile: 0
157
+ desktop: 2
159
158
  },
160
159
  color: {
161
160
  normal: 'text-1'
@@ -536,7 +535,7 @@ const ProductListPreset = [
536
535
  },
537
536
  styles: {
538
537
  typo: {
539
- type: 'subheading-2'
538
+ type: 'subheading-1'
540
539
  },
541
540
  textAlign: {
542
541
  desktop: 'left'
@@ -545,8 +544,7 @@ const ProductListPreset = [
545
544
  desktop: true
546
545
  },
547
546
  lineClamp: {
548
- desktop: 2,
549
- mobile: 0
547
+ desktop: 2
550
548
  },
551
549
  color: {
552
550
  normal: 'text-1'
@@ -54,7 +54,7 @@ const ProductTitleSettings = [
54
54
  id: 'typo',
55
55
  type: 'typography-v2',
56
56
  default: {
57
- type: 'subheading-3',
57
+ type: 'heading-2',
58
58
  attrs: {
59
59
  transform: 'none'
60
60
  }
@@ -121,7 +121,7 @@ const ProductTitleSettings = [
121
121
  disableDecimal: true,
122
122
  devices: {
123
123
  desktop: {
124
- default: 12
124
+ default: 2
125
125
  }
126
126
  },
127
127
  hide: true
@@ -181,7 +181,7 @@ const ProductVariantSettings = [
181
181
  {
182
182
  id: 'layout',
183
183
  label: 'Layout',
184
- type: 'layout-segment',
184
+ type: 'option:illustration',
185
185
  iconViewBox: '0 0 66 45',
186
186
  enableItemBackground: true,
187
187
  devices: {
@@ -190,15 +190,17 @@ const ProductVariantSettings = [
190
190
  }
191
191
  },
192
192
  options: [
193
- {
194
- label: 'Horizontal',
195
- value: 'horizontal',
196
- type: 'arrange'
197
- },
198
193
  {
199
194
  label: 'Vertical',
200
195
  value: 'vertical',
201
- type: 'arrange'
196
+ type: 'arrange',
197
+ svgName: 'gp-arrange-vertical'
198
+ },
199
+ {
200
+ label: 'Horizontal',
201
+ value: 'horizontal',
202
+ type: 'arrange',
203
+ svgName: 'gp-arrange-horizontal'
202
204
  }
203
205
  ]
204
206
  },
@@ -84,9 +84,6 @@ const SettingUIV2 = [
84
84
  ]
85
85
  },
86
86
  {
87
- label: {
88
- en: 'Variant style'
89
- },
90
87
  conditionDisplay: "optionType === 'singleOption'",
91
88
  controls: [
92
89
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.460",
3
+ "version": "2.0.0-dev.462",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,7 +23,7 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.460",
26
+ "@gem-sdk/core": "2.0.0-dev.462",
27
27
  "@gem-sdk/styles": "2.0.0-dev.381",
28
28
  "@gem-sdk/system": "2.0.0-dev.451",
29
29
  "@types/react-transition-group": "^4.4.5"
@@ -1,318 +0,0 @@
1
- 'use strict';
2
-
3
- var childTemplate = require('./childTemplate.js');
4
-
5
- const MarqueeSettings = [
6
- {
7
- id: 'setting',
8
- controls: [
9
- {
10
- id: 'activeItem',
11
- type: 'input',
12
- default: '0'
13
- },
14
- {
15
- id: 'hoverItem',
16
- type: 'input',
17
- default: '0'
18
- },
19
- {
20
- id: 'childItem',
21
- label: 'Item management',
22
- type: 'child-item',
23
- childTemplate: childTemplate.ChildTemplate,
24
- default: [
25
- 'Item 1',
26
- 'Item 2',
27
- 'Item 3',
28
- 'Item 4'
29
- ]
30
- },
31
- {
32
- id: 'isShowIconSeparator',
33
- label: 'isShowIconSeparator',
34
- type: 'toggle',
35
- default: false
36
- },
37
- {
38
- id: 'iconSeparatorSvg',
39
- label: 'iconSeparatorSvg',
40
- type: 'icon',
41
- default: `<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor">
42
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"></path></svg>`
43
- },
44
- {
45
- id: 'stopOnHover',
46
- label: 'stopOnHover',
47
- type: 'toggle',
48
- default: false
49
- },
50
- {
51
- id: 'speed',
52
- label: 'speed',
53
- type: 'input:slider',
54
- hideInput: true,
55
- useOnlyUnitInit: true,
56
- hideUnit: true,
57
- min: 0,
58
- max: 4,
59
- step: 0.1,
60
- default: 1
61
- },
62
- {
63
- id: 'direction',
64
- label: 'direction',
65
- type: 'option:value',
66
- options: [
67
- {
68
- label: 'Left',
69
- value: 'left',
70
- type: 'direction',
71
- tooltip: 'Left'
72
- },
73
- {
74
- label: 'Right',
75
- value: 'right',
76
- type: 'direction',
77
- tooltip: 'Right'
78
- }
79
- ],
80
- default: 'left'
81
- },
82
- {
83
- id: 'isPreview',
84
- type: 'play-pause',
85
- hideLabel: true,
86
- default: false
87
- },
88
- {
89
- id: 'hasItemShadow',
90
- label: 'hasItemShadow',
91
- type: 'toggle',
92
- default: false
93
- },
94
- {
95
- id: 'itemWidthType',
96
- type: 'select',
97
- label: 'Aspect Ratio',
98
- isFullWidth: true,
99
- options: [
100
- {
101
- label: 'Fit to content',
102
- value: 'FIT_CONTENT',
103
- note: 'Match the width of the element inside'
104
- },
105
- {
106
- label: 'Based on the item count',
107
- value: 'BASE_ON_NUMBER_OF_ITEMS',
108
- note: 'Max item width is screen width divided by the number of items'
109
- },
110
- {
111
- label: 'Custom',
112
- value: 'CUSTOM',
113
- note: 'Set the max width as you want'
114
- }
115
- ],
116
- devices: {
117
- desktop: {
118
- default: 'BASE_ON_NUMBER_OF_ITEMS'
119
- },
120
- tablet: {
121
- default: 'BASE_ON_NUMBER_OF_ITEMS'
122
- },
123
- mobile: {
124
- default: 'CUSTOM'
125
- }
126
- }
127
- }
128
- ]
129
- },
130
- {
131
- id: 'style',
132
- controls: [
133
- {
134
- id: 'iconSeparatorSize',
135
- label: 'iconSeparatorSize',
136
- type: 'input:stepper',
137
- devices: {
138
- desktop: {
139
- default: 24
140
- },
141
- tablet: {
142
- default: 24
143
- },
144
- mobile: {
145
- default: 24
146
- }
147
- }
148
- },
149
- {
150
- id: 'iconSeparatorColor',
151
- label: 'iconSeparatorColor',
152
- type: 'color-picker-v2',
153
- default: '#0C0C0C'
154
- },
155
- {
156
- id: 'itemSpacing',
157
- label: 'Spacing',
158
- type: 'input:unit',
159
- units: [
160
- 'px'
161
- ],
162
- placeholder: 'Auto',
163
- min: 0,
164
- devices: {
165
- desktop: {
166
- default: '48px'
167
- }
168
- }
169
- },
170
- {
171
- id: 'itemMaxWidth',
172
- label: 'itemMaxWidth',
173
- type: 'input:unit',
174
- units: [
175
- 'px'
176
- ],
177
- placeholder: 'Auto',
178
- min: 40,
179
- devices: {
180
- desktop: {
181
- default: '300px'
182
- },
183
- tablet: {
184
- default: '300px'
185
- },
186
- mobile: {
187
- default: '150px'
188
- }
189
- }
190
- },
191
- {
192
- id: 'sizeSetting',
193
- type: 'size-setting',
194
- label: '',
195
- devices: {
196
- desktop: {
197
- default: {
198
- shapeLinked: false,
199
- width: '100%',
200
- height: 'auto'
201
- }
202
- }
203
- },
204
- settingConfig: {
205
- width: {
206
- name: 'Width'
207
- },
208
- height: {
209
- displayOptions: [
210
- 'auto',
211
- 'small',
212
- 'medium',
213
- 'large'
214
- ],
215
- name: 'Height',
216
- sizeConfig: {
217
- small: '32px',
218
- medium: '64px',
219
- large: '96px'
220
- }
221
- }
222
- },
223
- hiddenSettings: [
224
- 'padding',
225
- 'gap',
226
- 'shape'
227
- ]
228
- },
229
- {
230
- id: 'itemBorderStyle',
231
- type: 'border',
232
- label: 'Border',
233
- default: {
234
- borderType: 'none',
235
- border: 'none',
236
- borderWidth: '1px',
237
- width: '1px 1px 1px 1px',
238
- isCustom: false,
239
- color: '#000000'
240
- }
241
- },
242
- {
243
- id: 'itemCorner',
244
- type: 'radius-preset',
245
- label: 'Border Radius',
246
- default: {
247
- radiusType: 'none'
248
- }
249
- },
250
- {
251
- id: 'itemBackgroundColor',
252
- type: 'color-picker-v2',
253
- devices: {
254
- desktop: {
255
- default: 'transparent'
256
- }
257
- }
258
- },
259
- {
260
- id: 'backgroundColor',
261
- type: 'color-picker-v2',
262
- devices: {
263
- desktop: {
264
- default: 'transparent'
265
- }
266
- }
267
- },
268
- {
269
- id: 'align',
270
- label: 'Alignment',
271
- type: 'option:value',
272
- options: [
273
- {
274
- label: 'Left',
275
- value: 'left',
276
- type: 'align',
277
- tooltip: 'Align left',
278
- iconName: 'gp-align-left'
279
- },
280
- {
281
- label: 'Center',
282
- value: 'center',
283
- type: 'align',
284
- tooltip: 'Align center',
285
- iconName: 'gp-align-center'
286
- },
287
- {
288
- label: 'Right',
289
- value: 'right',
290
- type: 'align',
291
- tooltip: 'Align right',
292
- iconName: 'gp-align-right'
293
- }
294
- ],
295
- devices: {
296
- desktop: {
297
- default: 'center'
298
- }
299
- }
300
- },
301
- {
302
- id: 'itemShadow',
303
- type: 'shadow-v2',
304
- label: 'Button Shadow',
305
- default: {
306
- type: 'none',
307
- distance: '4px',
308
- blur: '12px',
309
- spread: '0px',
310
- color: '#121212',
311
- angle: 90
312
- }
313
- }
314
- ]
315
- }
316
- ];
317
-
318
- exports.MarqueeSettings = MarqueeSettings;