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

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