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