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