@gem-sdk/components 2.0.0-dev.458 → 2.0.0-dev.461

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 (34) hide show
  1. package/dist/cjs/breadcrumb/components/Breadcrumb.js +1 -0
  2. package/dist/cjs/breadcrumb/components/Breadcrumb.liquid.js +1 -0
  3. package/dist/cjs/breadcrumb/setting/configs/settings.js +29 -2
  4. package/dist/cjs/breadcrumb/setting/configs/uiV2.js +230 -114
  5. package/dist/cjs/coupon/setting/config/settings.js +0 -11
  6. package/dist/cjs/marquee/setting/Marquee.js +1 -3
  7. package/dist/cjs/marquee/setting/configs/presets.js +10 -10
  8. package/dist/cjs/marquee/setting/configs/settingsV2.js +42 -40
  9. package/dist/cjs/marquee/setting/configs/uiV2.js +137 -34
  10. package/dist/cjs/product/components/ProductVariants/components/variants/index.js +4 -1
  11. package/dist/cjs/product/setting/product/configs/settings.js +1 -1
  12. package/dist/cjs/product/setting/product-variant/configs/settings.js +9 -7
  13. package/dist/cjs/product/setting/product-variant/configs/uiV2.js +0 -3
  14. package/dist/cjs/sticky/components/Sticky.js +0 -2
  15. package/dist/cjs/sticky/components/Sticky.liquid.js +1 -2
  16. package/dist/esm/breadcrumb/components/Breadcrumb.js +2 -1
  17. package/dist/esm/breadcrumb/components/Breadcrumb.liquid.js +2 -1
  18. package/dist/esm/breadcrumb/setting/configs/settings.js +29 -2
  19. package/dist/esm/breadcrumb/setting/configs/uiV2.js +230 -114
  20. package/dist/esm/coupon/setting/config/settings.js +0 -11
  21. package/dist/esm/marquee/setting/Marquee.js +1 -3
  22. package/dist/esm/marquee/setting/configs/presets.js +10 -10
  23. package/dist/esm/marquee/setting/configs/settingsV2.js +42 -40
  24. package/dist/esm/marquee/setting/configs/uiV2.js +137 -34
  25. package/dist/esm/product/components/ProductVariants/components/variants/index.js +4 -1
  26. package/dist/esm/product/setting/product/configs/settings.js +1 -1
  27. package/dist/esm/product/setting/product-variant/configs/settings.js +9 -7
  28. package/dist/esm/product/setting/product-variant/configs/uiV2.js +0 -3
  29. package/dist/esm/sticky/components/Sticky.js +2 -4
  30. package/dist/esm/sticky/components/Sticky.liquid.js +1 -2
  31. package/dist/types/index.d.ts +1 -0
  32. package/package.json +2 -2
  33. package/dist/cjs/marquee/setting/configs/settings.js +0 -318
  34. package/dist/esm/marquee/setting/configs/settings.js +0 -316
@@ -1,204 +1,320 @@
1
1
  const SettingUIV2 = [
2
2
  {
3
+ label: {
4
+ en: 'Separator Icon'
5
+ },
3
6
  controls: [
4
7
  {
5
8
  label: {
6
- en: 'Hide current page'
9
+ en: 'Icon'
7
10
  },
8
11
  setting: {
9
- id: 'hideCurrentPage'
12
+ id: 'iconSvg'
13
+ }
14
+ },
15
+ {
16
+ label: {
17
+ en: 'Color'
10
18
  },
11
- options: {
12
- labelVariant: 'primary',
13
- toggleStyle: 'switch'
19
+ setting: {
20
+ id: 'color'
21
+ }
22
+ },
23
+ {
24
+ label: {
25
+ en: 'Size'
26
+ },
27
+ setting: {
28
+ id: 'iconWidth'
14
29
  }
15
30
  }
16
31
  ]
17
32
  },
18
33
  {
19
34
  label: {
20
- en: 'Item'
35
+ en: 'Text style'
21
36
  },
22
37
  controls: [
23
38
  {
24
- label: {
25
- en: 'Text style'
39
+ setting: {
40
+ id: 'typo'
26
41
  },
27
- type: 'combo',
28
- iconName: 'polaris-text-title',
29
- fixedValue: 'Edit...',
30
- isHideClear: true,
31
- controls: [
32
- {
33
- setting: {
34
- id: 'typo'
42
+ layout: 'vertical',
43
+ options: {
44
+ updateFields: [
45
+ {
46
+ field: 'attrs.color',
47
+ settingId: 'labelColor',
48
+ state: 'normal'
35
49
  },
36
- layout: 'vertical',
37
- options: {
38
- updateFields: [
39
- {
40
- field: 'attrs.color',
41
- settingId: 'labelColor',
42
- state: 'normal'
43
- },
44
- {
45
- field: 'custom.fontWeight',
46
- settingId: 'fontWeight',
47
- state: 'normal'
48
- }
49
- ]
50
+ {
51
+ field: 'custom.fontWeight',
52
+ settingId: 'fontWeight',
53
+ state: 'normal'
54
+ }
55
+ ]
56
+ },
57
+ controlChangeTrigger: {
58
+ settings: [
59
+ {
60
+ action: {
61
+ controlId: 'labelColor',
62
+ valueFromField: 'attrs.color',
63
+ groupType: 'setting',
64
+ controlType: 'setting',
65
+ removeDevice: true,
66
+ state: 'normal'
67
+ }
50
68
  },
51
- controlChangeTrigger: {
52
- settings: [
53
- {
54
- action: {
55
- controlId: 'labelColor',
56
- valueFromField: 'attrs.color',
57
- groupType: 'setting',
58
- controlType: 'setting',
59
- removeDevice: true,
60
- state: 'normal'
61
- }
62
- },
63
- {
64
- action: {
65
- controlId: 'fontWeight',
66
- valueFromField: 'custom.fontWeight',
67
- groupType: 'setting',
68
- controlType: 'setting',
69
- removeDevice: true,
70
- state: 'normal'
71
- }
72
- }
73
- ],
74
- options: {
75
- noRecordHistory: true
69
+ {
70
+ action: {
71
+ controlId: 'fontWeight',
72
+ valueFromField: 'custom.fontWeight',
73
+ groupType: 'setting',
74
+ controlType: 'setting',
75
+ removeDevice: true,
76
+ state: 'normal'
76
77
  }
77
78
  }
79
+ ],
80
+ options: {
81
+ noRecordHistory: true
78
82
  }
79
- ]
80
- },
83
+ }
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ label: {
89
+ en: 'Item spacing'
90
+ },
91
+ controls: [
81
92
  {
82
93
  label: {
83
- en: 'Effect'
94
+ en: 'Gap'
84
95
  },
85
- type: 'combo',
86
- iconName: 'polaris-edit',
87
- fixedValue: 'Hover',
88
- isHideClear: true,
89
- popoverLabel: {
90
- en: 'Hover'
96
+ setting: {
97
+ id: 'spacing'
98
+ }
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ label: {
104
+ en: 'Size'
105
+ },
106
+ controls: [
107
+ {
108
+ label: {
109
+ en: 'Padding'
91
110
  },
92
- controls: [
93
- {
94
- label: {
95
- en: 'Text color'
96
- },
97
- setting: {
98
- id: 'labelColor',
99
- state: 'hover'
100
- }
111
+ controlConfig: {
112
+ id: 'padding',
113
+ type: 'padding-v2',
114
+ linkWithSetting: {
115
+ name: 'globalSize',
116
+ field: 'padding'
101
117
  },
102
- {
103
- label: {
104
- en: 'Font weight'
105
- },
106
- setting: {
107
- id: 'fontWeight',
108
- state: 'hover'
118
+ compoDefaultValue: {
119
+ desktop: {
120
+ default: {
121
+ type: 'custom',
122
+ top: '4px',
123
+ bottom: '4px',
124
+ left: '16px',
125
+ right: '16px'
126
+ }
109
127
  }
110
128
  }
111
- ]
129
+ }
112
130
  }
113
131
  ]
114
132
  },
115
133
  {
116
134
  label: {
117
- en: 'Item spacing'
135
+ en: 'Background'
118
136
  },
119
137
  controls: [
120
138
  {
121
139
  label: {
122
- en: 'Spacing'
140
+ en: 'Color'
123
141
  },
124
- setting: {
125
- id: 'spacing'
142
+ controlConfig: {
143
+ id: 'background-color',
144
+ type: 'color-picker-v2',
145
+ linkWithSetting: {
146
+ name: 'background',
147
+ field: 'color'
148
+ },
149
+ compoDefaultValue: {
150
+ desktop: {
151
+ default: '#ffffff'
152
+ }
153
+ }
126
154
  }
127
155
  }
128
156
  ]
129
157
  },
130
158
  {
131
159
  label: {
132
- en: 'Separator Icon'
160
+ en: 'Shape'
133
161
  },
134
162
  controls: [
135
163
  {
136
164
  label: {
137
- en: 'Choose icon'
165
+ en: 'Border'
138
166
  },
139
167
  setting: {
140
- id: 'iconSvg'
168
+ id: 'border',
169
+ state: 'normal'
141
170
  }
142
171
  },
143
172
  {
144
173
  label: {
145
- en: 'Size'
174
+ en: 'Corner'
146
175
  },
147
176
  setting: {
148
- id: 'iconWidth'
177
+ id: 'rounded',
178
+ state: 'normal'
149
179
  }
150
180
  },
151
181
  {
152
182
  label: {
153
- en: 'Icon color'
183
+ en: 'Shadow'
154
184
  },
155
185
  setting: {
156
- id: 'color'
186
+ id: 'boxShadow',
187
+ state: 'normal'
188
+ },
189
+ options: {
190
+ updateFields: [
191
+ {
192
+ field: 'enable',
193
+ settingId: 'hasBoxShadow',
194
+ state: 'normal'
195
+ }
196
+ ]
197
+ },
198
+ controlChangeTrigger: {
199
+ settings: [
200
+ {
201
+ condition: `boxShadow.normal.enable === true`,
202
+ source: [
203
+ 'boxShadow',
204
+ 'hasBoxShadow'
205
+ ],
206
+ action: {
207
+ controlId: 'hasBoxShadow',
208
+ groupType: 'advanced',
209
+ controlType: 'advanced',
210
+ state: 'normal',
211
+ newValue: true
212
+ }
213
+ },
214
+ {
215
+ condition: `boxShadow.normal.enable === false`,
216
+ source: [
217
+ 'boxShadow',
218
+ 'hasBoxShadow'
219
+ ],
220
+ action: {
221
+ controlId: 'hasBoxShadow',
222
+ groupType: 'advanced',
223
+ controlType: 'advanced',
224
+ state: 'normal',
225
+ newValue: false
226
+ }
227
+ }
228
+ ],
229
+ options: {
230
+ noRecordHistory: true
231
+ }
157
232
  }
158
233
  }
159
234
  ]
160
235
  },
161
236
  {
162
237
  label: {
163
- en: 'Background'
238
+ en: 'Effect'
164
239
  },
165
240
  controls: [
166
241
  {
167
242
  label: {
168
- en: 'Color'
243
+ en: 'Hover'
169
244
  },
170
- controlConfig: {
171
- id: 'background-color',
172
- type: 'color-picker-v2',
173
- linkWithSetting: {
174
- name: 'background',
175
- field: 'color'
245
+ type: 'combo',
246
+ iconName: 'polaris-check-hover',
247
+ fixedValue: 'Enabled',
248
+ isHideClear: true,
249
+ popoverLabel: {
250
+ en: 'Hover'
251
+ },
252
+ controls: [
253
+ {
254
+ label: {
255
+ en: 'Text color'
256
+ },
257
+ setting: {
258
+ id: 'labelColor',
259
+ state: 'hover'
260
+ }
261
+ },
262
+ {
263
+ label: {
264
+ en: 'Font weight'
265
+ },
266
+ setting: {
267
+ id: 'fontWeight',
268
+ state: 'hover'
269
+ }
176
270
  }
177
- }
271
+ ]
272
+ },
273
+ {
274
+ label: {
275
+ en: 'Active'
276
+ },
277
+ type: 'combo',
278
+ iconName: 'polaris-status-active',
279
+ fixedValue: 'Enabled',
280
+ isHideClear: true,
281
+ popoverLabel: {
282
+ en: 'Active'
283
+ },
284
+ controls: [
285
+ {
286
+ label: {
287
+ en: 'Text color'
288
+ },
289
+ setting: {
290
+ id: 'labelColor',
291
+ state: 'active'
292
+ }
293
+ },
294
+ {
295
+ label: {
296
+ en: 'Font weight'
297
+ },
298
+ setting: {
299
+ id: 'fontWeight',
300
+ state: 'active'
301
+ }
302
+ }
303
+ ]
178
304
  }
179
305
  ]
180
306
  },
181
307
  {
182
308
  label: {
183
- en: 'Active item'
309
+ en: 'Display option'
184
310
  },
185
311
  controls: [
186
312
  {
187
313
  label: {
188
- en: 'Text color'
314
+ en: 'Current page'
189
315
  },
190
316
  setting: {
191
- id: 'labelColor',
192
- state: 'active'
193
- }
194
- },
195
- {
196
- label: {
197
- en: 'Font weight'
198
- },
199
- setting: {
200
- id: 'fontWeight',
201
- state: 'active'
317
+ id: 'hideCurrentPage'
202
318
  }
203
319
  }
204
320
  ]
@@ -685,17 +685,6 @@ const CouponPresets = [
685
685
  }
686
686
  }
687
687
  },
688
- rounded: {
689
- desktop: {
690
- normal: {
691
- btrr: '0px',
692
- bblr: '0px',
693
- bbrr: '0px',
694
- btlr: '0px',
695
- radiusType: 'custom'
696
- }
697
- }
698
- },
699
688
  hasBoxShadow: {
700
689
  desktop: {
701
690
  normal: false
@@ -1,5 +1,4 @@
1
1
  import { MarqueePresets } from './configs/presets.js';
2
- import { MarqueeSettings } from './configs/settings.js';
3
2
  import { MarqueeSettingsV2 } from './configs/settingsV2.js';
4
3
  import { SettingUIV1 } from './configs/uiV1.js';
5
4
  import { SettingUIV2 } from './configs/uiV2.js';
@@ -12,8 +11,7 @@ const config = {
12
11
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.96586 7.25C4.96586 6.14543 5.86129 5.25 6.96586 5.25H17.0346C18.1391 5.25 19.0346 6.14543 19.0346 7.25V16.7484C19.0346 17.853 18.1391 18.7484 17.0346 18.7484H6.96586C5.86129 18.7484 4.96586 17.853 4.96586 16.7484V7.25ZM9.36039 6.25H6.96586C6.41357 6.25 5.96586 6.69772 5.96586 7.25V16.7484C5.96586 17.3007 6.41357 17.7484 6.96586 17.7484H9.36039L9.36039 6.25ZM10.3604 17.7484V6.25H14.1455V17.7484H10.3604ZM15.1455 17.7484H17.0346C17.5869 17.7484 18.0346 17.3007 18.0346 16.7484V7.25C18.0346 6.69771 17.5869 6.25 17.0346 6.25H15.1455V17.7484ZM3.31666 10.5447C3.51708 10.7346 3.52555 11.0511 3.33558 11.2515L2.61349 12.0133L3.33449 12.7691C3.52509 12.969 3.51762 13.2854 3.31781 13.4761C3.118 13.6667 2.8015 13.6592 2.6109 13.4594L1.693 12.4971C1.43561 12.2273 1.43493 11.803 1.69148 11.5324L2.60981 10.5636C2.79978 10.3632 3.11625 10.3547 3.31666 10.5447ZM20.6827 10.5458C20.8825 10.3552 21.199 10.3627 21.3896 10.5625L22.3075 11.5247C22.5649 11.7946 22.5656 12.2188 22.309 12.4894L21.3907 13.4583C21.2007 13.6587 20.8843 13.6672 20.6839 13.4772C20.4834 13.2872 20.475 12.9707 20.6649 12.7703L21.387 12.0085L20.666 11.2527C20.4754 11.0529 20.4829 10.7364 20.6827 10.5458ZM21.5839 12.215C21.5838 12.2149 21.584 12.2151 21.5839 12.215V12.215Z" fill="white"/>
13
12
  </svg>
14
13
  `,
15
- settings: MarqueeSettings,
16
- settingsV2: MarqueeSettingsV2,
14
+ settings: MarqueeSettingsV2,
17
15
  ui: SettingUIV1,
18
16
  uiV2: SettingUIV2,
19
17
  editorConfigs: {
@@ -39,11 +39,11 @@ const MarqueePresets = [
39
39
  'spacing-setting': {
40
40
  desktop: {
41
41
  padding: {
42
- top: '12px',
43
- bottom: '12px'
44
- },
45
- margin: {
46
- bottom: '16px'
42
+ type: 'custom',
43
+ top: '16px',
44
+ bottom: '16px',
45
+ left: '0px',
46
+ right: '0px'
47
47
  }
48
48
  }
49
49
  }
@@ -121,11 +121,11 @@ const MarqueePresets = [
121
121
  'spacing-setting': {
122
122
  desktop: {
123
123
  padding: {
124
- top: '12px',
125
- bottom: '12px'
126
- },
127
- margin: {
128
- bottom: '16px'
124
+ type: 'custom',
125
+ top: '16px',
126
+ bottom: '16px',
127
+ left: '0px',
128
+ right: '0px'
129
129
  }
130
130
  }
131
131
  }
@@ -4,6 +4,40 @@ const MarqueeSettingsV2 = [
4
4
  {
5
5
  id: 'setting',
6
6
  controls: [
7
+ {
8
+ id: 'itemWidthType',
9
+ type: 'select',
10
+ label: 'Aspect Ratio',
11
+ isFullWidth: true,
12
+ options: [
13
+ {
14
+ label: 'Fit to content',
15
+ value: 'FIT_CONTENT',
16
+ note: 'Match the width of the element inside'
17
+ },
18
+ {
19
+ label: 'Based on the item count',
20
+ value: 'BASE_ON_NUMBER_OF_ITEMS',
21
+ note: 'Max item width is screen width divided by the number of items'
22
+ },
23
+ {
24
+ label: 'Custom',
25
+ value: 'CUSTOM',
26
+ note: 'Set the max width as you want'
27
+ }
28
+ ],
29
+ devices: {
30
+ desktop: {
31
+ default: 'FIT_CONTENT'
32
+ },
33
+ tablet: {
34
+ default: 'FIT_CONTENT'
35
+ },
36
+ mobile: {
37
+ default: 'CUSTOM'
38
+ }
39
+ }
40
+ },
7
41
  {
8
42
  id: 'activeItem',
9
43
  type: 'input',
@@ -43,7 +77,7 @@ const MarqueeSettingsV2 = [
43
77
  id: 'stopOnHover',
44
78
  label: 'stopOnHover',
45
79
  type: 'toggle',
46
- default: false
80
+ default: true
47
81
  },
48
82
  {
49
83
  id: 'speed',
@@ -88,40 +122,6 @@ const MarqueeSettingsV2 = [
88
122
  label: 'hasItemShadow',
89
123
  type: 'toggle',
90
124
  default: false
91
- },
92
- {
93
- id: 'itemWidthType',
94
- type: 'select',
95
- label: 'Aspect Ratio',
96
- isFullWidth: true,
97
- options: [
98
- {
99
- label: 'Fit to content',
100
- value: 'FIT_CONTENT',
101
- note: 'Match the width of the element inside'
102
- },
103
- {
104
- label: 'Based on the item count',
105
- value: 'BASE_ON_NUMBER_OF_ITEMS',
106
- note: 'Max item width is screen width divided by the number of items'
107
- },
108
- {
109
- label: 'Custom',
110
- value: 'CUSTOM',
111
- note: 'Set the max width as you want'
112
- }
113
- ],
114
- devices: {
115
- desktop: {
116
- default: 'BASE_ON_NUMBER_OF_ITEMS'
117
- },
118
- tablet: {
119
- default: 'BASE_ON_NUMBER_OF_ITEMS'
120
- },
121
- mobile: {
122
- default: 'CUSTOM'
123
- }
124
- }
125
125
  }
126
126
  ]
127
127
  },
@@ -153,15 +153,17 @@ const MarqueeSettingsV2 = [
153
153
  {
154
154
  id: 'itemSpacing',
155
155
  label: 'Spacing',
156
- type: 'input:unit',
156
+ type: 'input:slider',
157
157
  units: [
158
158
  'px'
159
159
  ],
160
- placeholder: 'Auto',
161
160
  min: 0,
161
+ max: 100,
162
+ step: 1,
163
+ placeholder: 'Auto',
162
164
  devices: {
163
165
  desktop: {
164
- default: '48px'
166
+ default: '60px'
165
167
  }
166
168
  }
167
169
  },
@@ -219,9 +221,9 @@ const MarqueeSettingsV2 = [
219
221
  }
220
222
  },
221
223
  hiddenSettings: [
222
- 'padding',
223
224
  'gap',
224
- 'shape'
225
+ 'shape',
226
+ 'padding'
225
227
  ]
226
228
  },
227
229
  {