@gem-sdk/components 2.0.0-dev.474 → 2.0.0-dev.475

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 (22) hide show
  1. package/dist/cjs/carousel/setting/configs/settingV2.js +732 -728
  2. package/dist/cjs/carousel/setting/configs/uiV2.js +304 -298
  3. package/dist/cjs/product/components/ProductList/ProductListGridLayout.js +11 -6
  4. package/dist/cjs/product/components/ProductList/ProductListItem.liquid.js +3 -0
  5. package/dist/cjs/product/components/ProductList/common/getStyle.js +33 -1
  6. package/dist/cjs/product/components/ProductList/common/index.js +2 -25
  7. package/dist/cjs/product/setting/ProductList.js +1 -3
  8. package/dist/cjs/product/setting/product-list/configs/settingsV2.js +17 -203
  9. package/dist/cjs/product/setting/product-list/configs/uiV2.js +100 -137
  10. package/dist/esm/carousel/setting/configs/settingV2.js +731 -729
  11. package/dist/esm/carousel/setting/configs/uiV2.js +302 -299
  12. package/dist/esm/product/components/ProductList/ProductListGridLayout.js +11 -6
  13. package/dist/esm/product/components/ProductList/ProductListItem.liquid.js +3 -0
  14. package/dist/esm/product/components/ProductList/common/getStyle.js +34 -2
  15. package/dist/esm/product/components/ProductList/common/index.js +2 -25
  16. package/dist/esm/product/setting/ProductList.js +1 -3
  17. package/dist/esm/product/setting/product-list/configs/settingsV2.js +17 -203
  18. package/dist/esm/product/setting/product-list/configs/uiV2.js +100 -137
  19. package/dist/types/index.d.ts +2 -5
  20. package/package.json +1 -1
  21. package/dist/cjs/product/setting/product-list/configs/settings.js +0 -496
  22. package/dist/esm/product/setting/product-list/configs/settings.js +0 -494
@@ -2,783 +2,787 @@
2
2
 
3
3
  var AnimationPlugin = require('../../components/plugins/AnimationPlugin.js');
4
4
 
5
- const CarouselSettingsV2 = [
5
+ const CarouselSettingsV2Setting = [
6
6
  {
7
- id: 'setting',
8
- controls: [
9
- {
10
- id: 'itemNumber',
11
- label: '',
12
- type: 'carousel-layout-selector',
13
- devices: {
14
- desktop: {
15
- default: 4
16
- },
17
- tablet: {
18
- default: 2
19
- },
20
- mobile: {
21
- default: 2
22
- }
23
- }
24
- },
25
- {
26
- id: 'sneakPeak',
27
- label: 'Sneak peak',
28
- type: 'sneak-peak',
29
- devices: {
30
- desktop: {
31
- default: false
32
- }
33
- }
34
- },
35
- {
36
- id: 'sneakPeakType',
37
- label: '',
38
- type: 'sneak-peak-type',
39
- itemPerRow: 2,
40
- iconViewBox: '0 0 118 52',
41
- enableItemBackground: true,
42
- enableTooltip: true,
43
- options: [
44
- {
45
- value: 'forward',
46
- type: 'sneak-peak-offset'
47
- },
48
- {
49
- value: 'center',
50
- type: 'sneak-peak-offset'
51
- }
52
- ],
53
- devices: {
54
- desktop: {
55
- default: 'forward'
56
- }
57
- }
58
- },
7
+ id: 'itemNumber',
8
+ label: '',
9
+ type: 'carousel-layout-selector',
10
+ devices: {
11
+ desktop: {
12
+ default: 4
13
+ },
14
+ tablet: {
15
+ default: 2
16
+ },
17
+ mobile: {
18
+ default: 2
19
+ }
20
+ }
21
+ },
22
+ {
23
+ id: 'sneakPeak',
24
+ label: 'Sneak peak',
25
+ type: 'sneak-peak',
26
+ devices: {
27
+ desktop: {
28
+ default: false
29
+ }
30
+ }
31
+ },
32
+ {
33
+ id: 'sneakPeakType',
34
+ label: '',
35
+ type: 'sneak-peak-type',
36
+ itemPerRow: 2,
37
+ iconViewBox: '0 0 118 52',
38
+ enableItemBackground: true,
39
+ enableTooltip: true,
40
+ options: [
59
41
  {
60
- id: 'sneakPeakOffsetForward',
61
- label: 'Ratio',
62
- type: 'input:slider',
63
- min: 1,
64
- max: 100,
65
- devices: {
66
- desktop: {
67
- default: 50
68
- }
69
- }
42
+ value: 'forward',
43
+ type: 'sneak-peak-offset'
70
44
  },
71
45
  {
72
- id: 'sneakPeakOffsetCenter',
73
- label: 'Ratio',
74
- type: 'input:slider',
75
- min: 1,
76
- max: 100,
77
- devices: {
78
- desktop: {
79
- default: 50
80
- }
81
- }
82
- },
46
+ value: 'center',
47
+ type: 'sneak-peak-offset'
48
+ }
49
+ ],
50
+ devices: {
51
+ desktop: {
52
+ default: 'forward'
53
+ }
54
+ }
55
+ },
56
+ {
57
+ id: 'sneakPeakOffsetForward',
58
+ label: 'Ratio',
59
+ type: 'input:slider',
60
+ min: 1,
61
+ max: 100,
62
+ devices: {
63
+ desktop: {
64
+ default: 50
65
+ }
66
+ }
67
+ },
68
+ {
69
+ id: 'sneakPeakOffsetCenter',
70
+ label: 'Ratio',
71
+ type: 'input:slider',
72
+ min: 1,
73
+ max: 100,
74
+ devices: {
75
+ desktop: {
76
+ default: 50
77
+ }
78
+ }
79
+ },
80
+ {
81
+ id: 'childItem',
82
+ label: 'Item management',
83
+ type: 'child-item',
84
+ default: [
85
+ 'Slide 1',
86
+ 'Slide 2',
87
+ 'Slide 3',
88
+ 'Slide 4',
89
+ 'Slide 5',
90
+ 'Slide 6'
91
+ ]
92
+ },
93
+ {
94
+ id: 'vertical',
95
+ label: 'Vertical layout',
96
+ type: 'toggle',
97
+ devices: {
98
+ desktop: {
99
+ default: false
100
+ }
101
+ }
102
+ },
103
+ {
104
+ id: 'controlOverContent',
105
+ label: 'Next & previous position',
106
+ type: 'segment',
107
+ options: [
83
108
  {
84
- id: 'childItem',
85
- label: 'Item management',
86
- type: 'child-item',
87
- default: [
88
- 'Slide 1',
89
- 'Slide 2',
90
- 'Slide 3',
91
- 'Slide 4',
92
- 'Slide 5',
93
- 'Slide 6'
94
- ]
109
+ label: 'Inside',
110
+ value: true
95
111
  },
96
112
  {
97
- id: 'vertical',
98
- label: 'Vertical layout',
99
- type: 'toggle',
100
- devices: {
101
- desktop: {
102
- default: false
113
+ label: 'Outside',
114
+ value: false
115
+ }
116
+ ],
117
+ devices: {
118
+ desktop: {
119
+ default: true
120
+ }
121
+ }
122
+ },
123
+ {
124
+ id: 'dot',
125
+ label: 'Dots',
126
+ type: 'toggle',
127
+ devices: {
128
+ desktop: {
129
+ default: true
130
+ }
131
+ }
132
+ },
133
+ {
134
+ id: 'dotStyle',
135
+ label: 'Dot style',
136
+ type: 'option:illustration',
137
+ iconViewBox: '0 0 77 48',
138
+ enableItemBackground: true,
139
+ enableTooltip: true,
140
+ options: [
141
+ {
142
+ label: 'Inside',
143
+ value: 'inside',
144
+ type: 'carousel-dot',
145
+ svgName: 'gp-carousel-dot-inside'
146
+ },
147
+ {
148
+ label: 'Outside',
149
+ value: 'outside',
150
+ type: 'carousel-dot',
151
+ svgName: 'gp-carousel-dot-outside'
152
+ }
153
+ ],
154
+ devices: {
155
+ desktop: {
156
+ default: 'inside'
157
+ }
158
+ }
159
+ },
160
+ {
161
+ id: 'dotSize',
162
+ label: 'Dots size',
163
+ type: 'input:stepper',
164
+ min: 1,
165
+ devices: {
166
+ desktop: {
167
+ default: 12
168
+ }
169
+ }
170
+ },
171
+ {
172
+ id: 'dotGapToCarousel',
173
+ label: 'Gap to carousel',
174
+ type: 'input:number',
175
+ min: 0,
176
+ devices: {
177
+ desktop: {
178
+ default: 16
179
+ }
180
+ }
181
+ },
182
+ {
183
+ id: 'dotColor',
184
+ label: 'Dot color',
185
+ type: 'color-picker-v2',
186
+ devices: {
187
+ desktop: {
188
+ default: 'bg-1'
189
+ }
190
+ }
191
+ },
192
+ {
193
+ id: 'dotActiveColor',
194
+ label: 'Dot color active',
195
+ type: 'color-picker-v2',
196
+ devices: {
197
+ desktop: {
198
+ default: 'line-3'
199
+ }
200
+ }
201
+ },
202
+ {
203
+ id: 'navigationEnable',
204
+ type: 'toggle',
205
+ devices: {
206
+ desktop: {
207
+ default: true
208
+ }
209
+ }
210
+ },
211
+ {
212
+ id: 'navigationStyle',
213
+ type: 'option:illustration',
214
+ iconViewBox: '0 0 77 48',
215
+ enableItemBackground: true,
216
+ label: 'Navigation style',
217
+ enableTooltip: true,
218
+ options: [
219
+ {
220
+ label: 'Display outside navigation',
221
+ value: 'outside',
222
+ type: 'slide-control',
223
+ svgName: 'gp-slide-control-outside'
224
+ },
225
+ {
226
+ label: 'Display inside navigation',
227
+ value: 'inside',
228
+ type: 'slide-control',
229
+ svgName: 'gp-slide-control-inside'
230
+ }
231
+ ],
232
+ devices: {
233
+ desktop: {
234
+ default: 'inside'
235
+ }
236
+ }
237
+ },
238
+ {
239
+ id: 'arrowCustom',
240
+ type: 'icon',
241
+ hideInput: true,
242
+ hideLabel: true,
243
+ default: `<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
244
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.62204 5.13313C7.78476 4.95562 8.04858 4.95562 8.21129 5.13313L12.378 9.67859C12.5407 9.8561 12.5407 10.1439 12.378 10.3214L8.21129 14.8669C8.04858 15.0444 7.78476 15.0444 7.62204 14.8669C7.45932 14.6894 7.45932 14.4016 7.62204 14.224L11.4941 10L7.62204 5.77596C7.45932 5.59845 7.45932 5.31064 7.62204 5.13313Z"/>
245
+ </svg>
246
+ `
247
+ },
248
+ {
249
+ id: 'arrowCustomColor',
250
+ label: 'Icon color',
251
+ type: 'color-picker-v2',
252
+ default: '#000000'
253
+ },
254
+ {
255
+ id: 'arrowIconSize',
256
+ label: 'Number per show',
257
+ type: 'input:stepper',
258
+ min: 1,
259
+ devices: {
260
+ desktop: {
261
+ default: 24
262
+ }
263
+ }
264
+ },
265
+ {
266
+ id: 'arrowButtonSize',
267
+ type: 'size-setting',
268
+ label: '',
269
+ devices: {
270
+ desktop: {
271
+ default: {
272
+ shapeValue: '1/1',
273
+ shapeLinked: true,
274
+ width: undefined,
275
+ height: undefined,
276
+ padding: {
277
+ linked: true
103
278
  }
104
279
  }
105
- },
106
- {
107
- id: 'controlOverContent',
108
- label: 'Next & previous position',
109
- type: 'segment',
110
- options: [
111
- {
112
- label: 'Inside',
113
- value: true
114
- },
115
- {
116
- label: 'Outside',
117
- value: false
118
- }
280
+ }
281
+ },
282
+ lockShapeValue: true,
283
+ hiddenShowMore: true,
284
+ hiddenSettings: [
285
+ 'gap',
286
+ 'proportion',
287
+ 'padding'
288
+ ],
289
+ settingConfig: {
290
+ width: {
291
+ name: 'Width',
292
+ units: [
293
+ 'px'
119
294
  ],
120
- devices: {
121
- desktop: {
122
- default: true
123
- }
124
- }
125
- },
126
- {
127
- id: 'dot',
128
- label: 'Dots',
129
- type: 'toggle',
130
- devices: {
131
- desktop: {
132
- default: true
133
- }
134
- }
135
- },
136
- {
137
- id: 'dotStyle',
138
- label: 'Dot style',
139
- type: 'option:illustration',
140
- iconViewBox: '0 0 77 48',
141
- enableItemBackground: true,
142
- enableTooltip: true,
143
- options: [
144
- {
145
- label: 'Inside',
146
- value: 'inside',
147
- type: 'carousel-dot',
148
- svgName: 'gp-carousel-dot-inside'
149
- },
150
- {
151
- label: 'Outside',
152
- value: 'outside',
153
- type: 'carousel-dot',
154
- svgName: 'gp-carousel-dot-outside'
155
- }
295
+ displayOptions: [
296
+ 'small',
297
+ 'medium',
298
+ 'large'
156
299
  ],
157
- devices: {
158
- desktop: {
159
- default: 'inside'
160
- }
300
+ sizeConfig: {
301
+ small: '24px',
302
+ medium: '32px',
303
+ large: '40px'
161
304
  }
162
305
  },
163
- {
164
- id: 'dotSize',
165
- label: 'Dots size',
166
- type: 'input:stepper',
167
- min: 1,
168
- devices: {
169
- desktop: {
170
- default: 12
171
- }
172
- }
173
- },
174
- {
175
- id: 'dotGapToCarousel',
176
- label: 'Gap to carousel',
177
- type: 'input:number',
178
- min: 0,
179
- devices: {
180
- desktop: {
181
- default: 16
182
- }
183
- }
184
- },
185
- {
186
- id: 'dotColor',
187
- label: 'Dot color',
188
- type: 'color-picker-v2',
189
- devices: {
190
- desktop: {
191
- default: 'bg-1'
192
- }
193
- }
194
- },
195
- {
196
- id: 'dotActiveColor',
197
- label: 'Dot color active',
198
- type: 'color-picker-v2',
199
- devices: {
200
- desktop: {
201
- default: 'line-3'
202
- }
203
- }
204
- },
205
- {
206
- id: 'navigationEnable',
207
- type: 'toggle',
208
- devices: {
209
- desktop: {
210
- default: true
211
- }
212
- }
213
- },
214
- {
215
- id: 'navigationStyle',
216
- type: 'option:illustration',
217
- iconViewBox: '0 0 77 48',
218
- enableItemBackground: true,
219
- label: 'Navigation style',
220
- enableTooltip: true,
221
- options: [
222
- {
223
- label: 'Display outside navigation',
224
- value: 'outside',
225
- type: 'slide-control',
226
- svgName: 'gp-slide-control-outside'
227
- },
228
- {
229
- label: 'Display inside navigation',
230
- value: 'inside',
231
- type: 'slide-control',
232
- svgName: 'gp-slide-control-inside'
233
- }
306
+ height: {
307
+ name: 'Height',
308
+ units: [
309
+ 'px'
234
310
  ],
235
- devices: {
236
- desktop: {
237
- default: 'inside'
238
- }
239
- }
240
- },
241
- {
242
- id: 'arrowCustom',
243
- type: 'icon',
244
- hideInput: true,
245
- hideLabel: true,
246
- default: `<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
247
- <path fill-rule="evenodd" clip-rule="evenodd" d="M7.62204 5.13313C7.78476 4.95562 8.04858 4.95562 8.21129 5.13313L12.378 9.67859C12.5407 9.8561 12.5407 10.1439 12.378 10.3214L8.21129 14.8669C8.04858 15.0444 7.78476 15.0444 7.62204 14.8669C7.45932 14.6894 7.45932 14.4016 7.62204 14.224L11.4941 10L7.62204 5.77596C7.45932 5.59845 7.45932 5.31064 7.62204 5.13313Z"/>
248
- </svg>
249
- `
250
- },
251
- {
252
- id: 'arrowCustomColor',
253
- label: 'Icon color',
254
- type: 'color-picker-v2',
255
- default: '#000000'
256
- },
257
- {
258
- id: 'arrowIconSize',
259
- label: 'Number per show',
260
- type: 'input:stepper',
261
- min: 1,
262
- devices: {
263
- desktop: {
264
- default: 24
265
- }
311
+ displayOptions: [
312
+ 'small',
313
+ 'medium',
314
+ 'large',
315
+ 'full-height'
316
+ ],
317
+ sizeConfig: {
318
+ small: '24px',
319
+ medium: '32px',
320
+ large: '40px',
321
+ full: '100%'
266
322
  }
267
323
  },
268
- {
269
- id: 'arrowButtonSize',
270
- type: 'size-setting',
271
- label: '',
272
- devices: {
273
- desktop: {
274
- default: {
275
- shapeValue: '1/1',
276
- shapeLinked: true,
277
- width: '32px',
278
- height: '32px',
279
- padding: {
280
- linked: true
281
- }
282
- }
283
- }
284
- },
285
- lockShapeValue: true,
286
- hiddenShowMore: true,
287
- hiddenSettings: [
288
- 'gap',
289
- 'proportion',
290
- 'padding'
291
- ],
292
- settingConfig: {
293
- width: {
294
- name: 'Width',
295
- units: [
296
- 'px'
297
- ],
298
- displayOptions: [
299
- 'small',
300
- 'medium',
301
- 'large'
302
- ],
303
- sizeConfig: {
304
- small: '24px',
305
- medium: '32px',
306
- large: '40px'
307
- }
324
+ padding: {
325
+ paddingConfig: {
326
+ small: {
327
+ vertical: '2px',
328
+ horizontal: '2px'
308
329
  },
309
- height: {
310
- name: 'Height',
311
- units: [
312
- 'px'
313
- ],
314
- displayOptions: [
315
- 'small',
316
- 'medium',
317
- 'large',
318
- 'full-height'
319
- ],
320
- sizeConfig: {
321
- small: '24px',
322
- medium: '32px',
323
- large: '40px',
324
- full: '100%'
325
- }
330
+ medium: {
331
+ vertical: '4px',
332
+ horizontal: '4px'
326
333
  },
327
- padding: {
328
- paddingConfig: {
329
- small: {
330
- vertical: '2px',
331
- horizontal: '2px'
332
- },
333
- medium: {
334
- vertical: '4px',
335
- horizontal: '4px'
336
- },
337
- large: {
338
- vertical: '8px',
339
- horizontal: '8px'
340
- }
341
- }
342
- }
343
- },
344
- sizePaddingInput: 'small'
345
- },
346
- {
347
- id: 'arrowBackgroundColor',
348
- label: 'Background Color',
349
- type: 'color-picker-v2',
350
- default: 'transparent'
351
- },
352
- {
353
- id: 'arrowBorder',
354
- type: 'border-v2',
355
- label: 'Border',
356
- devices: {
357
- desktop: {
358
- default: {
359
- borderType: 'none',
360
- border: 'none',
361
- borderWidth: '1px',
362
- width: '1px 1px 1px 1px',
363
- isCustom: true
364
- }
334
+ large: {
335
+ vertical: '8px',
336
+ horizontal: '8px'
365
337
  }
366
338
  }
367
- },
368
- {
369
- id: 'arrowShadow',
370
- type: 'shadow-v2',
371
- devices: {
372
- desktop: {
373
- default: {
374
- type: 'none',
375
- distance: '4px',
376
- blur: '12px',
377
- spread: '0px',
378
- color: 'rgba(0, 0, 0, 0.20)',
379
- angle: 90
380
- }
381
- }
339
+ }
340
+ },
341
+ sizePaddingInput: 'small'
342
+ },
343
+ {
344
+ id: 'arrowBackgroundColor',
345
+ label: 'Background Color',
346
+ type: 'color-picker-v2',
347
+ default: 'transparent'
348
+ },
349
+ {
350
+ id: 'arrowBorder',
351
+ type: 'border-v2',
352
+ label: 'Border',
353
+ devices: {
354
+ desktop: {
355
+ default: {
356
+ borderType: 'none',
357
+ border: 'none',
358
+ borderWidth: '1px',
359
+ width: '1px 1px 1px 1px',
360
+ isCustom: true
382
361
  }
383
- },
384
- {
385
- id: 'roundedArrow',
386
- type: 'corner-v2',
387
- label: 'Border Radius',
388
- devices: {
389
- desktop: {
390
- default: {
391
- btrr: '0px',
392
- bblr: '0px',
393
- bbrr: '0px',
394
- btlr: '0px',
395
- radiusType: 'none'
396
- }
397
- }
398
- },
399
- compoDefaultValue: {
400
- desktop: {
401
- default: {
402
- btrr: '8px',
403
- bblr: '8px',
404
- bbrr: '8px',
405
- btlr: '8px',
406
- radiusType: 'rounded'
407
- }
408
- }
362
+ }
363
+ }
364
+ },
365
+ {
366
+ id: 'arrowShadow',
367
+ type: 'shadow-v2',
368
+ devices: {
369
+ desktop: {
370
+ default: {
371
+ type: 'none',
372
+ distance: '4px',
373
+ blur: '12px',
374
+ spread: '0px',
375
+ color: 'rgba(0, 0, 0, 0.20)',
376
+ angle: 90
409
377
  }
410
- },
411
- {
412
- id: 'arrowGapToEachSide',
413
- label: 'Gap to each side',
414
- type: 'input:slider',
415
- min: 0,
416
- max: 120,
417
- default: '16'
418
- },
419
- {
420
- id: 'showWhenHover',
421
- label: 'Only show when hover',
422
- type: 'toggle',
423
- default: false
424
- },
378
+ }
379
+ }
380
+ },
381
+ {
382
+ id: 'roundedArrow',
383
+ type: 'corner-v2',
384
+ label: 'Border Radius',
385
+ devices: {
386
+ desktop: {
387
+ default: {
388
+ btrr: '0px',
389
+ bblr: '0px',
390
+ bbrr: '0px',
391
+ btlr: '0px',
392
+ radiusType: 'none'
393
+ }
394
+ }
395
+ },
396
+ compoDefaultValue: {
397
+ desktop: {
398
+ default: {
399
+ btrr: '8px',
400
+ bblr: '8px',
401
+ bbrr: '8px',
402
+ btlr: '8px',
403
+ radiusType: 'rounded'
404
+ }
405
+ }
406
+ }
407
+ },
408
+ {
409
+ id: 'arrowGapToEachSide',
410
+ label: 'Gap to each side',
411
+ type: 'input:slider',
412
+ min: 0,
413
+ max: 120,
414
+ default: '16'
415
+ },
416
+ {
417
+ id: 'showWhenHover',
418
+ label: 'Only show when hover',
419
+ type: 'toggle',
420
+ default: false
421
+ },
422
+ {
423
+ id: 'rtl',
424
+ label: 'Direction',
425
+ type: 'option:value',
426
+ options: [
425
427
  {
426
- id: 'rtl',
427
- label: 'Direction',
428
- type: 'option:value',
429
- options: [
430
- {
431
- value: true,
432
- label: 'Left to right',
433
- iconName: 'polaris-arrow-right'
434
- },
435
- {
436
- value: false,
437
- iconName: 'polaris-arrow-left',
438
- label: 'Right to left'
439
- }
440
- ],
441
- default: false
428
+ value: true,
429
+ label: 'Left to right',
430
+ iconName: 'polaris-arrow-right'
442
431
  },
443
432
  {
444
- id: 'autoplay',
445
- label: 'Autoplay',
446
- type: 'toggle',
433
+ value: false,
434
+ iconName: 'polaris-arrow-left',
435
+ label: 'Right to left'
436
+ }
437
+ ],
438
+ default: false
439
+ },
440
+ {
441
+ id: 'autoplay',
442
+ label: 'Autoplay',
443
+ type: 'toggle',
444
+ default: false
445
+ },
446
+ {
447
+ id: 'autoplayTimeout',
448
+ label: 'Time out',
449
+ type: 'input:slider',
450
+ min: 1,
451
+ max: 10,
452
+ step: 0.1,
453
+ default: 2,
454
+ hide: true,
455
+ hideUnit: true,
456
+ useOnlyUnitInit: true,
457
+ ignoreMax: true
458
+ },
459
+ {
460
+ id: 'pauseOnHover',
461
+ label: 'Pause On Hover',
462
+ type: 'toggle',
463
+ default: true,
464
+ hide: true
465
+ },
466
+ {
467
+ id: 'runPreview',
468
+ type: 'play-pause',
469
+ hideLabel: true,
470
+ default: false
471
+ },
472
+ {
473
+ id: 'enableDrag',
474
+ label: 'Drag to scroll',
475
+ type: 'toggle',
476
+ devices: {
477
+ desktop: {
447
478
  default: false
448
- },
449
- {
450
- id: 'autoplayTimeout',
451
- label: 'Time out',
452
- type: 'input:slider',
453
- min: 1,
454
- max: 10,
455
- step: 0.1,
456
- default: 2,
457
- hide: true,
458
- hideUnit: true,
459
- useOnlyUnitInit: true,
460
- ignoreMax: true
461
- },
462
- {
463
- id: 'pauseOnHover',
464
- label: 'Pause On Hover',
465
- type: 'toggle',
466
- default: true,
467
- hide: true
468
- },
469
- {
470
- id: 'runPreview',
471
- type: 'play-pause',
472
- hideLabel: true,
479
+ }
480
+ }
481
+ },
482
+ {
483
+ id: 'loop',
484
+ label: 'Infinity loop',
485
+ type: 'toggle',
486
+ devices: {
487
+ desktop: {
473
488
  default: false
474
- },
475
- {
476
- id: 'enableDrag',
477
- label: 'Drag to scroll',
478
- type: 'toggle',
479
- devices: {
480
- desktop: {
481
- default: false
482
- }
483
- }
484
- },
485
- {
486
- id: 'loop',
487
- label: 'Infinity loop',
488
- type: 'toggle',
489
- devices: {
490
- desktop: {
491
- default: false
492
- }
493
- }
494
- },
489
+ }
490
+ }
491
+ },
492
+ {
493
+ id: 'animationMode',
494
+ label: 'Animation',
495
+ type: 'select',
496
+ default: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN.value,
497
+ options: [
495
498
  {
496
- id: 'animationMode',
497
- label: 'Animation',
498
- type: 'select',
499
- default: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN.value,
500
- options: [
501
- {
502
- label: 'Ease in',
503
- value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN.value
504
- },
505
- {
506
- label: 'Ease out',
507
- value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_OUT.value
508
- },
509
- {
510
- label: 'Ease in out',
511
- value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN_OUT.value
512
- }
513
- ]
499
+ label: 'Ease in',
500
+ value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN.value
514
501
  },
515
502
  {
516
- id: 'background',
517
- type: 'background-media-combo',
518
- devices: {
519
- desktop: {
520
- default: {
521
- type: 'color',
522
- color: undefined,
523
- image: {
524
- src: '',
525
- width: 0,
526
- height: 0
527
- },
528
- size: 'cover',
529
- position: {
530
- x: 50,
531
- y: 50
532
- },
533
- repeat: 'no-repeat',
534
- attachment: 'scroll'
535
- }
536
- }
537
- },
538
- compoDefaultValue: {
539
- desktop: {
540
- default: {
541
- type: 'color',
542
- color: '#0D0D0D',
543
- image: {
544
- src: '',
545
- width: 0,
546
- height: 0
547
- },
548
- size: 'cover',
549
- position: {
550
- x: 50,
551
- y: 50
552
- },
553
- repeat: 'no-repeat',
554
- attachment: 'scroll'
555
- }
556
- }
557
- }
503
+ label: 'Ease out',
504
+ value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_OUT.value
558
505
  },
559
506
  {
560
- id: 'label',
561
- label: 'Option Label',
562
- type: 'toggle',
563
- default: true
507
+ label: 'Ease in out',
508
+ value: AnimationPlugin.CAROUSEL_ANIMATION.EASE_IN_OUT.value
564
509
  }
565
510
  ]
566
511
  },
567
512
  {
568
- id: 'style',
569
- controls: [
570
- {
571
- id: 'backgroundColor',
572
- type: 'color-picker-v2',
573
- devices: {
574
- desktop: {
575
- default: undefined
576
- }
577
- },
578
- compoDefaultValue: {
579
- desktop: {
580
- default: '#0D0D0D'
581
- }
582
- },
583
- enableGradient: true
584
- },
585
- {
586
- id: 'backgroundImage',
587
- type: 'background-image',
588
- devices: {
589
- desktop: {
590
- default: {}
591
- }
592
- },
593
- compoDefaultValue: {
594
- desktop: {
595
- default: {
596
- image: {
597
- src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
598
- width: 1200,
599
- height: 480
600
- }
601
- }
602
- }
603
- }
604
- },
605
- {
606
- id: 'playSpeed',
607
- label: 'Slide speed',
608
- type: 'input:slider',
609
- useOnlyUnitInit: true,
610
- min: 100,
611
- max: 5000,
612
- step: 50,
613
- units: [
614
- 'ms'
615
- ],
616
- showDefaultUnit: true,
617
- isNumber: true,
618
- default: 500
619
- },
620
- {
621
- id: 'sizeSetting',
622
- type: 'size-setting',
623
- label: '',
624
- devices: {
625
- desktop: {
626
- default: {
627
- shapeLinked: false,
628
- width: 'default',
629
- height: 'auto'
630
- }
631
- }
632
- },
633
- settingConfig: {
634
- width: {
635
- displayOptions: [
636
- 'full',
637
- 'default'
638
- ],
639
- name: 'Width'
640
- },
641
- height: {
642
- displayOptions: [
643
- 'auto',
644
- 'small',
645
- 'medium',
646
- 'large'
647
- ],
648
- name: 'Height',
649
- sizeConfig: {
650
- small: '300px',
651
- medium: '500px',
652
- large: '700px'
653
- }
654
- }
655
- },
656
- hiddenSettings: [
657
- 'padding',
658
- 'gap',
659
- 'shape'
660
- ]
661
- },
662
- {
663
- id: 'align',
664
- label: 'Align',
665
- type: 'option:value',
666
- options: [
667
- {
668
- label: 'Left',
669
- value: 'left',
670
- type: 'align',
671
- tooltip: 'Align left',
672
- iconName: 'gp-align-left'
513
+ id: 'background',
514
+ type: 'background-media-combo',
515
+ devices: {
516
+ desktop: {
517
+ default: {
518
+ type: 'color',
519
+ color: undefined,
520
+ image: {
521
+ src: '',
522
+ width: 0,
523
+ height: 0
673
524
  },
674
- {
675
- label: 'Center',
676
- value: 'center',
677
- type: 'align',
678
- tooltip: 'Align center',
679
- iconName: 'gp-align-center'
525
+ size: 'cover',
526
+ position: {
527
+ x: 50,
528
+ y: 50
680
529
  },
681
- {
682
- label: 'Right',
683
- value: 'right',
684
- type: 'align',
685
- tooltip: 'Align right',
686
- iconName: 'gp-align-right'
687
- }
688
- ],
689
- devices: {
690
- desktop: {
691
- default: 'center'
692
- }
530
+ repeat: 'no-repeat',
531
+ attachment: 'scroll'
693
532
  }
694
- },
695
- {
696
- id: 'borderContent',
697
- type: 'border-v2',
698
- label: 'Border',
533
+ }
534
+ },
535
+ compoDefaultValue: {
536
+ desktop: {
699
537
  default: {
700
- borderType: 'none',
701
- border: 'none',
702
- width: '1px 1px 1px 1px',
703
- position: 'all',
704
- borderWidth: '1px',
705
- color: '#121212',
706
- isCustom: true
538
+ type: 'color',
539
+ color: '#0D0D0D',
540
+ image: {
541
+ src: '',
542
+ width: 0,
543
+ height: 0
544
+ },
545
+ size: 'cover',
546
+ position: {
547
+ x: 50,
548
+ y: 50
549
+ },
550
+ repeat: 'no-repeat',
551
+ attachment: 'scroll'
707
552
  }
708
- },
709
- {
710
- id: 'roundedContent',
711
- type: 'corner-v2',
712
- label: 'Corner',
553
+ }
554
+ }
555
+ },
556
+ {
557
+ id: 'label',
558
+ label: 'Option Label',
559
+ type: 'toggle',
560
+ default: true
561
+ }
562
+ ];
563
+ const CarouselSettingsV2Style = [
564
+ {
565
+ id: 'backgroundColor',
566
+ type: 'color-picker-v2',
567
+ devices: {
568
+ desktop: {
569
+ default: undefined
570
+ }
571
+ },
572
+ compoDefaultValue: {
573
+ desktop: {
574
+ default: '#0D0D0D'
575
+ }
576
+ },
577
+ enableGradient: true
578
+ },
579
+ {
580
+ id: 'backgroundImage',
581
+ type: 'background-image',
582
+ devices: {
583
+ desktop: {
584
+ default: {}
585
+ }
586
+ },
587
+ compoDefaultValue: {
588
+ desktop: {
713
589
  default: {
714
- radiusType: 'none'
590
+ image: {
591
+ src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
592
+ width: 1200,
593
+ height: 480
594
+ }
715
595
  }
716
- },
717
- {
718
- id: 'hasActiveShadow',
719
- type: 'toggle',
720
- label: 'Enable Button Shadow',
721
- default: false
722
- },
723
- {
724
- id: 'carouselShadow',
725
- type: 'shadow-v2',
726
- label: 'Button Shadow',
596
+ }
597
+ }
598
+ },
599
+ {
600
+ id: 'playSpeed',
601
+ label: 'Slide speed',
602
+ type: 'input:slider',
603
+ useOnlyUnitInit: true,
604
+ min: 100,
605
+ max: 5000,
606
+ step: 50,
607
+ units: [
608
+ 'ms'
609
+ ],
610
+ showDefaultUnit: true,
611
+ isNumber: true,
612
+ default: 500
613
+ },
614
+ {
615
+ id: 'sizeSetting',
616
+ type: 'size-setting',
617
+ label: '',
618
+ devices: {
619
+ desktop: {
727
620
  default: {
728
- type: 'shadow-1',
729
- distance: '4px',
730
- blur: '12px',
731
- spread: '0px',
732
- color: '#121212',
733
- angle: 90,
734
- enable: false
735
- },
736
- compoDefaultValue: {
737
- type: 'shadow-1',
738
- distance: '4px',
739
- blur: '4px',
740
- spread: '0px',
741
- color: '#121212',
742
- angle: 45,
743
- enable: true
621
+ shapeLinked: false,
622
+ width: 'default',
623
+ height: 'auto'
744
624
  }
745
- },
746
- {
747
- id: 'spacing',
748
- label: 'Items spacing',
749
- type: 'input:number',
750
- devices: {
751
- desktop: {
752
- default: 16
753
- }
754
- }
755
- },
756
- {
757
- id: 'itemPadding',
758
- type: 'size-setting',
759
- devices: {
760
- desktop: {
761
- default: {
762
- padding: {
763
- type: 'custom',
764
- top: '0px',
765
- left: '0px',
766
- bottom: '0px',
767
- right: '0px'
768
- }
769
- }
770
- }
771
- },
772
- hiddenSettings: [
773
- 'shape',
774
- 'gap',
775
- 'width',
776
- 'height'
625
+ }
626
+ },
627
+ settingConfig: {
628
+ width: {
629
+ displayOptions: [
630
+ 'full',
631
+ 'default'
777
632
  ],
778
- hiddenShowMore: true
633
+ name: 'Width'
634
+ },
635
+ height: {
636
+ displayOptions: [
637
+ 'auto',
638
+ 'small',
639
+ 'medium',
640
+ 'large'
641
+ ],
642
+ name: 'Height',
643
+ sizeConfig: {
644
+ small: '300px',
645
+ medium: '500px',
646
+ large: '700px'
647
+ }
779
648
  }
649
+ },
650
+ hiddenSettings: [
651
+ 'padding',
652
+ 'gap',
653
+ 'shape'
780
654
  ]
655
+ },
656
+ {
657
+ id: 'align',
658
+ label: 'Align',
659
+ type: 'option:value',
660
+ options: [
661
+ {
662
+ label: 'Left',
663
+ value: 'left',
664
+ type: 'align',
665
+ tooltip: 'Align left',
666
+ iconName: 'gp-align-left'
667
+ },
668
+ {
669
+ label: 'Center',
670
+ value: 'center',
671
+ type: 'align',
672
+ tooltip: 'Align center',
673
+ iconName: 'gp-align-center'
674
+ },
675
+ {
676
+ label: 'Right',
677
+ value: 'right',
678
+ type: 'align',
679
+ tooltip: 'Align right',
680
+ iconName: 'gp-align-right'
681
+ }
682
+ ],
683
+ devices: {
684
+ desktop: {
685
+ default: 'center'
686
+ }
687
+ }
688
+ },
689
+ {
690
+ id: 'borderContent',
691
+ type: 'border-v2',
692
+ label: 'Border',
693
+ default: {
694
+ borderType: 'none',
695
+ border: 'none',
696
+ width: '1px 1px 1px 1px',
697
+ position: 'all',
698
+ borderWidth: '1px',
699
+ color: '#121212',
700
+ isCustom: true
701
+ }
702
+ },
703
+ {
704
+ id: 'roundedContent',
705
+ type: 'corner-v2',
706
+ label: 'Corner',
707
+ default: {
708
+ radiusType: 'none'
709
+ }
710
+ },
711
+ {
712
+ id: 'hasActiveShadow',
713
+ type: 'toggle',
714
+ label: 'Enable Button Shadow',
715
+ default: false
716
+ },
717
+ {
718
+ id: 'carouselShadow',
719
+ type: 'shadow-v2',
720
+ label: 'Button Shadow',
721
+ default: {
722
+ type: 'shadow-1',
723
+ distance: '4px',
724
+ blur: '12px',
725
+ spread: '0px',
726
+ color: '#121212',
727
+ angle: 90,
728
+ enable: false
729
+ },
730
+ compoDefaultValue: {
731
+ type: 'shadow-1',
732
+ distance: '4px',
733
+ blur: '4px',
734
+ spread: '0px',
735
+ color: '#121212',
736
+ angle: 45,
737
+ enable: true
738
+ }
739
+ },
740
+ {
741
+ id: 'spacing',
742
+ label: 'Items spacing',
743
+ type: 'input:number',
744
+ devices: {
745
+ desktop: {
746
+ default: 16
747
+ }
748
+ }
749
+ },
750
+ {
751
+ id: 'itemPadding',
752
+ type: 'size-setting',
753
+ devices: {
754
+ desktop: {
755
+ default: {
756
+ padding: {
757
+ type: 'custom',
758
+ top: '0px',
759
+ left: '0px',
760
+ bottom: '0px',
761
+ right: '0px'
762
+ }
763
+ }
764
+ }
765
+ },
766
+ hiddenSettings: [
767
+ 'shape',
768
+ 'gap',
769
+ 'width',
770
+ 'height'
771
+ ],
772
+ hiddenShowMore: true
773
+ }
774
+ ];
775
+ const CarouselSettingsV2 = [
776
+ {
777
+ id: 'setting',
778
+ controls: CarouselSettingsV2Setting
779
+ },
780
+ {
781
+ id: 'style',
782
+ controls: CarouselSettingsV2Style
781
783
  }
782
784
  ];
783
785
 
784
786
  exports.CarouselSettingsV2 = CarouselSettingsV2;
787
+ exports.CarouselSettingsV2Setting = CarouselSettingsV2Setting;
788
+ exports.CarouselSettingsV2Style = CarouselSettingsV2Style;