@gem-sdk/components 2.0.0-dev.534 → 2.0.0-dev.536

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 (48) hide show
  1. package/dist/cjs/accordion/setting/configs/settings.js +4 -4
  2. package/dist/cjs/accordion/setting/configs/uiV2.js +336 -341
  3. package/dist/cjs/estimate-delivery/components/EstimateDate.js +23 -58
  4. package/dist/cjs/estimate-delivery/components/common/getAdvanced.js +10 -0
  5. package/dist/cjs/estimate-delivery/components/common/getNewSetting.js +86 -0
  6. package/dist/cjs/estimate-delivery/components/common/getStyle.js +10 -0
  7. package/dist/cjs/estimate-delivery/index.js +1 -1
  8. package/dist/cjs/estimate-delivery/setting/configs/settings.js +1 -1
  9. package/dist/cjs/estimate-delivery/setting/configs/uiV1.js +1 -1
  10. package/dist/cjs/estimate-delivery/setting/configs/uiV2.js +1 -1
  11. package/dist/cjs/index.liquid.js +6 -5
  12. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +2 -2
  13. package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +3 -3
  14. package/dist/cjs/product/components/ProductBundle/setting/uiV2.js +2 -1
  15. package/dist/cjs/tab/components/Tabs.js +0 -4
  16. package/dist/cjs/tab/components/common/getStyle.js +4 -11
  17. package/dist/cjs/tab/setting/Tabs.js +2 -1
  18. package/dist/cjs/tab/setting/configs/settings.js +62 -14
  19. package/dist/cjs/tab/setting/configs/uiV2.js +15 -2
  20. package/dist/cjs/text/components/TextInline.js +10 -11
  21. package/dist/cjs/text/components/common/getClasses.js +8 -4
  22. package/dist/cjs/text/components/common/getStyle.js +9 -0
  23. package/dist/esm/accordion/setting/configs/settings.js +4 -4
  24. package/dist/esm/accordion/setting/configs/uiV2.js +336 -341
  25. package/dist/esm/estimate-delivery/components/EstimateDate.js +23 -58
  26. package/dist/esm/estimate-delivery/components/common/getAdvanced.js +8 -0
  27. package/dist/esm/estimate-delivery/components/common/getNewSetting.js +84 -0
  28. package/dist/esm/estimate-delivery/components/common/getStyle.js +8 -0
  29. package/dist/esm/estimate-delivery/index.js +1 -1
  30. package/dist/esm/estimate-delivery/setting/configs/settings.js +1 -1
  31. package/dist/esm/estimate-delivery/setting/configs/uiV1.js +1 -1
  32. package/dist/esm/estimate-delivery/setting/configs/uiV2.js +1 -1
  33. package/dist/esm/index.liquid.js +5 -4
  34. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +2 -2
  35. package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +3 -3
  36. package/dist/esm/product/components/ProductBundle/setting/uiV2.js +2 -1
  37. package/dist/esm/tab/components/Tabs.js +1 -5
  38. package/dist/esm/tab/components/common/getStyle.js +5 -11
  39. package/dist/esm/tab/setting/Tabs.js +2 -1
  40. package/dist/esm/tab/setting/configs/settings.js +62 -14
  41. package/dist/esm/tab/setting/configs/uiV2.js +15 -2
  42. package/dist/esm/text/components/TextInline.js +11 -12
  43. package/dist/esm/text/components/common/getClasses.js +8 -5
  44. package/dist/esm/text/components/common/getStyle.js +9 -1
  45. package/dist/types/index.d.ts +41 -5
  46. package/package.json +2 -2
  47. /package/dist/cjs/estimate-delivery/{const.js → components/common/const.js} +0 -0
  48. /package/dist/esm/estimate-delivery/{const.js → components/common/const.js} +0 -0
@@ -1,17 +1,4 @@
1
1
  const SettingUIV2 = [
2
- {
3
- label: {
4
- en: 'Layout'
5
- },
6
- controls: [
7
- {
8
- setting: {
9
- id: 'layoutHeader'
10
- },
11
- layout: 'vertical'
12
- }
13
- ]
14
- },
15
2
  {
16
3
  label: {
17
4
  en: 'Item management'
@@ -34,454 +21,461 @@ const SettingUIV2 = [
34
21
  controls: [
35
22
  {
36
23
  label: {
37
- en: 'Item gap'
24
+ en: 'Background'
38
25
  },
39
- controlConfig: {
40
- id: 'gap',
41
- type: 'input:slider',
42
- units: [
43
- 'px'
44
- ],
45
- min: 0,
46
- max: 100,
47
- step: 1,
48
- linkWithSetting: {
49
- name: 'contentSizePadding',
50
- field: 'gap'
51
- }
26
+ setting: {
27
+ id: 'backgroundContent'
52
28
  }
53
29
  },
54
30
  {
55
31
  label: {
56
- en: 'Header'
32
+ en: 'Border'
33
+ },
34
+ setting: {
35
+ id: 'borderContent'
36
+ }
37
+ },
38
+ {
39
+ label: {
40
+ en: 'Corner'
41
+ },
42
+ setting: {
43
+ id: 'roundedContent'
44
+ }
45
+ },
46
+ {
47
+ label: {
48
+ en: 'Shadow'
49
+ },
50
+ setting: {
51
+ id: 'accordionShadow'
52
+ }
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ label: {
58
+ en: 'Item header'
59
+ },
60
+ controls: [
61
+ {
62
+ label: {
63
+ en: 'Title icon'
57
64
  },
58
65
  type: 'combo',
59
- iconName: 'polaris-edit',
60
- fixedValue: 'Edit',
66
+ iconName: 'polaris-icons',
67
+ fixedValue: 'Edited',
61
68
  isHideClear: true,
69
+ popoverLabel: {
70
+ en: 'Title icon'
71
+ },
62
72
  controls: [
63
73
  {
64
74
  label: {
65
- en: 'Background'
75
+ en: 'Layout'
66
76
  },
67
77
  setting: {
68
- id: 'bgColor',
69
- state: 'normal'
70
- }
78
+ id: 'layoutHeader'
79
+ },
80
+ layout: 'vertical'
71
81
  },
72
82
  {
73
- label: {
74
- en: 'Height'
83
+ layout: 'vertical',
84
+ setting: {
85
+ id: 'childConfig'
75
86
  },
76
- controlConfig: {
77
- id: 'height',
78
- type: 'dropdown:input',
79
- inputType: 'number',
80
- units: [
81
- 'px'
82
- ],
83
- linkWithSetting: {
84
- name: 'widthHeightSize',
85
- field: 'height'
86
- },
87
- displayOptions: [
88
- {
89
- label: 'Fit content',
90
- value: 'Auto'
91
- },
92
- {
93
- label: 'Small',
94
- value: '32px'
95
- },
96
- {
97
- label: 'Medium',
98
- value: '48px'
99
- },
100
- {
101
- label: 'Large',
102
- value: '64px'
103
- }
104
- ]
105
- }
87
+ conditionDisplay: 'layoutHeader !== "text-only"'
106
88
  },
107
89
  {
108
90
  label: {
109
- en: 'Padding'
91
+ en: 'Gap to text'
110
92
  },
93
+ conditionDisplay: 'layoutHeader !== "text-only"',
111
94
  controlConfig: {
112
- id: 'headerContentPadding',
113
- type: 'padding-v2',
95
+ id: 'gap',
96
+ type: 'input:slider',
97
+ units: [
98
+ 'px'
99
+ ],
100
+ min: 0,
101
+ max: 100,
102
+ step: 1,
114
103
  linkWithSetting: {
115
- name: 'headerContentPadding',
116
- field: 'padding'
104
+ name: 'iconGlobalSize',
105
+ field: 'gap'
117
106
  }
118
107
  }
119
108
  },
120
109
  {
121
110
  label: {
122
- en: 'Border'
111
+ en: 'Size'
123
112
  },
124
113
  setting: {
125
- id: 'headerBorder',
126
- state: 'normal'
127
- }
114
+ id: 'configIconSize'
115
+ },
116
+ conditionDisplay: 'layoutHeader !== "text-only"'
128
117
  },
129
118
  {
119
+ conditionDisplay: 'layoutHeader !== "text-only"',
130
120
  label: {
131
- en: 'Alignment'
121
+ en: 'Color'
132
122
  },
133
123
  setting: {
134
- id: 'alignment'
124
+ id: 'iconColor',
125
+ state: 'normal'
135
126
  }
136
127
  }
137
128
  ]
138
129
  },
139
130
  {
140
131
  label: {
141
- en: 'Content'
132
+ en: 'Title'
142
133
  },
143
134
  type: 'combo',
144
- iconName: 'polaris-edit',
145
- fixedValue: 'Edit',
135
+ iconName: 'polaris-text-title',
136
+ fixedValue: 'Edit...',
146
137
  isHideClear: true,
138
+ popoverLabel: {
139
+ en: 'Title'
140
+ },
147
141
  controls: [
148
142
  {
149
- label: {
150
- en: 'Padding'
143
+ setting: {
144
+ id: 'titleTypo'
151
145
  },
152
- controlConfig: {
153
- id: 'contentSizePadding',
154
- type: 'padding-v2',
155
- linkWithSetting: {
156
- name: 'contentSizePadding',
157
- field: 'padding'
146
+ layout: 'vertical',
147
+ options: {
148
+ updateFields: [
149
+ {
150
+ field: 'attrs.color',
151
+ settingId: 'textColor',
152
+ state: 'normal'
153
+ }
154
+ ]
155
+ },
156
+ controlChangeTrigger: {
157
+ settings: [
158
+ {
159
+ action: {
160
+ controlId: 'textColor',
161
+ valueFromField: 'attrs.color',
162
+ groupType: 'style',
163
+ controlType: 'style',
164
+ removeDevice: true,
165
+ state: 'normal'
166
+ }
167
+ }
168
+ ],
169
+ options: {
170
+ noRecordHistory: true
158
171
  }
159
172
  }
160
173
  }
161
174
  ]
162
- }
163
- ],
164
- moreSettings: {
165
- type: 'collapse',
166
- controls: [
167
- {
168
- label: {
169
- en: 'Border'
170
- },
171
- setting: {
172
- id: 'borderContent'
173
- }
175
+ },
176
+ {
177
+ label: {
178
+ en: 'Expand icon'
174
179
  },
175
- {
176
- label: {
177
- en: 'Corner'
178
- },
179
- setting: {
180
- id: 'roundedContent'
181
- }
180
+ type: 'combo',
181
+ iconName: 'polaris-icons',
182
+ fixedValue: 'Edited',
183
+ isHideClear: true,
184
+ popoverLabel: {
185
+ en: 'Expand icon'
182
186
  },
183
- {
184
- label: {
185
- en: 'Shadow'
187
+ controls: [
188
+ {
189
+ label: {
190
+ en: 'When expanded'
191
+ },
192
+ setting: {
193
+ id: 'iconExpand'
194
+ }
186
195
  },
187
- setting: {
188
- id: 'accordionShadow'
196
+ {
197
+ label: {
198
+ en: 'When collapsed'
199
+ },
200
+ setting: {
201
+ id: 'iconCollapse'
202
+ }
203
+ },
204
+ {
205
+ label: {
206
+ en: 'Position'
207
+ },
208
+ setting: {
209
+ id: 'iconPosition'
210
+ }
211
+ },
212
+ {
213
+ label: {
214
+ en: 'Size'
215
+ },
216
+ setting: {
217
+ id: 'iconCollapseSize'
218
+ }
219
+ },
220
+ {
221
+ label: {
222
+ en: 'Color'
223
+ },
224
+ setting: {
225
+ id: 'color',
226
+ state: 'normal'
227
+ }
189
228
  }
229
+ ]
230
+ },
231
+ {
232
+ label: {
233
+ en: 'Height'
190
234
  },
191
- {
192
- label: {
193
- en: 'Effect'
194
- },
195
- type: 'combo',
196
- iconName: 'polaris-edit',
197
- fixedValue: 'Hover',
198
- isHideClear: true,
199
- popoverLabel: {
200
- en: 'Hover effect'
235
+ controlConfig: {
236
+ id: 'height',
237
+ type: 'dropdown:input',
238
+ inputType: 'number',
239
+ units: [
240
+ 'px'
241
+ ],
242
+ linkWithSetting: {
243
+ name: 'widthHeightSize',
244
+ field: 'height'
201
245
  },
202
- controls: [
246
+ displayOptions: [
203
247
  {
204
- label: {
205
- en: 'Header BG'
206
- },
207
- setting: {
208
- id: 'bgColor',
209
- state: 'hover'
210
- }
248
+ label: 'Fit content',
249
+ value: 'Auto'
211
250
  },
212
251
  {
213
- label: {
214
- en: 'Border'
215
- },
216
- setting: {
217
- id: 'headerBorder',
218
- state: 'hover'
219
- }
252
+ label: 'Small',
253
+ value: '32px'
220
254
  },
221
255
  {
222
- label: {
223
- en: 'Text color'
224
- },
225
- setting: {
226
- id: 'textColor',
227
- state: 'hover'
228
- }
229
- }
230
- ]
231
- }
232
- ]
233
- }
234
- },
235
- {
236
- label: {
237
- en: 'Text style'
238
- },
239
- controls: [
240
- {
241
- setting: {
242
- id: 'titleTypo'
243
- },
244
- layout: 'vertical',
245
- options: {
246
- updateFields: [
256
+ label: 'Medium',
257
+ value: '48px'
258
+ },
247
259
  {
248
- field: 'attrs.color',
249
- settingId: 'textColor',
250
- state: 'normal'
260
+ label: 'Large',
261
+ value: '64px'
251
262
  }
252
263
  ]
253
- },
254
- controlChangeTrigger: {
255
- settings: [
256
- {
257
- action: {
258
- controlId: 'textColor',
259
- valueFromField: 'attrs.color',
260
- groupType: 'style',
261
- controlType: 'style',
262
- removeDevice: true,
263
- state: 'normal'
264
- }
265
- }
266
- ],
267
- options: {
268
- noRecordHistory: true
269
- }
270
- }
271
- }
272
- ]
273
- },
274
- {
275
- label: {
276
- en: 'Collapse/Expand icon'
277
- },
278
- controls: [
279
- {
280
- label: {
281
- en: 'Collapse'
282
- },
283
- setting: {
284
- id: 'iconCollapse'
285
264
  }
286
265
  },
287
266
  {
288
267
  label: {
289
- en: 'Expand'
268
+ en: 'Padding'
290
269
  },
291
- setting: {
292
- id: 'iconExpand'
270
+ controlConfig: {
271
+ id: 'header-content-padding',
272
+ type: 'padding-v2',
273
+ linkWithSetting: {
274
+ name: 'headerContentPadding',
275
+ field: 'padding'
276
+ }
293
277
  }
294
278
  },
295
279
  {
296
280
  label: {
297
- en: 'Color'
281
+ en: 'Background'
298
282
  },
299
283
  setting: {
300
- id: 'color',
284
+ id: 'bgColor',
301
285
  state: 'normal'
302
286
  }
303
- },
304
- {
305
- label: {
306
- en: 'Size'
307
- },
308
- setting: {
309
- id: 'iconCollapseSize'
310
- }
311
287
  }
312
288
  ],
313
289
  moreSettings: {
314
- type: 'collapse',
315
290
  controls: [
316
291
  {
317
- type: 'control',
318
292
  label: {
319
- en: 'Position'
293
+ en: 'Border'
320
294
  },
321
295
  setting: {
322
- id: 'iconPosition'
296
+ id: 'headerBorder',
297
+ state: 'normal'
323
298
  }
324
299
  },
325
300
  {
326
301
  label: {
327
- en: 'Effect'
302
+ en: 'Alignment'
328
303
  },
329
- type: 'combo',
330
- iconName: 'polaris-edit',
331
- fixedValue: 'Hover',
332
- isHideClear: true,
333
- popoverLabel: {
334
- en: 'Icon hover'
335
- },
336
- controls: [
337
- {
338
- label: {
339
- en: 'Color'
340
- },
341
- setting: {
342
- id: 'color',
343
- state: 'hover'
344
- }
345
- }
346
- ]
304
+ setting: {
305
+ id: 'alignment'
306
+ }
347
307
  }
348
308
  ]
349
309
  }
350
310
  },
351
311
  {
352
312
  label: {
353
- en: 'Additional icon'
313
+ en: 'Item content'
354
314
  },
355
- conditionDisplay: 'layoutHeader !== "text-only"',
356
315
  controls: [
357
316
  {
358
317
  label: {
359
- en: 'Additional'
318
+ en: 'Padding'
360
319
  },
361
- type: 'combo',
362
- iconName: 'polaris-list-bulleted',
363
- fixedValue: 'Icons',
364
- isHideClear: true,
365
- popoverLabel: {
366
- en: 'Additional icon'
367
- },
368
- controls: [
369
- {
370
- layout: 'vertical',
371
- setting: {
372
- id: 'childConfig'
373
- }
320
+ controlConfig: {
321
+ id: 'content-content-padding',
322
+ type: 'padding-v2',
323
+ linkWithSetting: {
324
+ name: 'contentSizePadding',
325
+ field: 'padding'
374
326
  }
375
- ]
376
- },
377
- {
378
- label: {
379
- en: 'Icon color'
380
- },
381
- setting: {
382
- id: 'iconColor',
383
- state: 'normal'
384
- }
385
- },
386
- {
387
- label: {
388
- en: 'Size'
389
- },
390
- setting: {
391
- id: 'configIconSize'
392
327
  }
393
- },
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ label: {
333
+ en: 'Item spacing'
334
+ },
335
+ controls: [
394
336
  {
395
337
  label: {
396
338
  en: 'Gap'
397
339
  },
398
340
  controlConfig: {
399
- id: 'iconGap',
400
- type: 'input:unit',
341
+ id: 'gap',
342
+ type: 'input:slider',
401
343
  units: [
402
344
  'px'
403
345
  ],
346
+ min: 0,
347
+ max: 100,
348
+ step: 1,
404
349
  linkWithSetting: {
405
- name: 'iconGlobalSize',
350
+ name: 'contentSizePadding',
406
351
  field: 'gap'
407
352
  }
408
353
  }
409
- },
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ label: {
359
+ en: 'Effect'
360
+ },
361
+ controls: [
410
362
  {
411
363
  label: {
412
- en: 'Effect'
364
+ en: 'Hover'
413
365
  },
414
366
  type: 'combo',
415
- iconName: 'polaris-edit',
416
- fixedValue: 'Hover',
367
+ iconName: 'polaris-check-hover',
368
+ fixedValue: 'Styled',
417
369
  isHideClear: true,
418
370
  popoverLabel: {
419
- en: 'Icon hover'
371
+ en: 'Hover'
420
372
  },
421
373
  controls: [
422
374
  {
423
375
  label: {
424
- en: 'Icon color'
376
+ en: 'Title icon'
425
377
  },
426
378
  setting: {
427
379
  id: 'iconColor',
428
380
  state: 'hover'
429
381
  }
382
+ },
383
+ {
384
+ label: {
385
+ en: 'Title'
386
+ },
387
+ setting: {
388
+ id: 'textColor',
389
+ state: 'hover'
390
+ }
391
+ },
392
+ {
393
+ label: {
394
+ en: 'Expand icon'
395
+ },
396
+ setting: {
397
+ id: 'color',
398
+ state: 'hover'
399
+ }
400
+ },
401
+ {
402
+ label: {
403
+ en: 'Header color'
404
+ },
405
+ setting: {
406
+ id: 'bgColor',
407
+ state: 'hover'
408
+ }
409
+ },
410
+ {
411
+ label: {
412
+ en: 'Border'
413
+ },
414
+ setting: {
415
+ id: 'headerBorder',
416
+ state: 'hover'
417
+ }
430
418
  }
431
419
  ]
432
- }
433
- ]
434
- },
435
- {
436
- label: {
437
- en: 'Item expanded style'
438
- },
439
- controls: [
440
- {
441
- label: {
442
- en: 'Background'
443
- },
444
- setting: {
445
- id: 'bgColor',
446
- state: 'active'
447
- }
448
- },
449
- {
450
- label: {
451
- en: 'Icon color'
452
- },
453
- setting: {
454
- id: 'iconColor',
455
- state: 'active'
456
- },
457
- conditionEnable: "layoutHeader !== 'text-only'"
458
420
  },
459
421
  {
460
422
  label: {
461
- en: 'Text color'
423
+ en: 'Expand style'
462
424
  },
463
- setting: {
464
- id: 'textColor',
465
- state: 'active'
466
- }
467
- },
468
- {
469
- label: {
470
- en: 'Collapsible icon color'
471
- },
472
- setting: {
473
- id: 'color',
474
- state: 'active'
475
- }
476
- },
477
- {
478
- label: {
479
- en: 'Header border'
425
+ type: 'combo',
426
+ iconName: 'polaris-status-active',
427
+ fixedValue: 'Styled',
428
+ isHideClear: true,
429
+ popoverLabel: {
430
+ en: 'Expand style'
480
431
  },
481
- setting: {
482
- id: 'headerBorder',
483
- state: 'active'
484
- }
432
+ controls: [
433
+ {
434
+ label: {
435
+ en: 'Title icon'
436
+ },
437
+ setting: {
438
+ id: 'iconColor',
439
+ state: 'active'
440
+ }
441
+ },
442
+ {
443
+ label: {
444
+ en: 'Title'
445
+ },
446
+ setting: {
447
+ id: 'textColor',
448
+ state: 'active'
449
+ }
450
+ },
451
+ {
452
+ label: {
453
+ en: 'Expand icon'
454
+ },
455
+ setting: {
456
+ id: 'color',
457
+ state: 'active'
458
+ }
459
+ },
460
+ {
461
+ label: {
462
+ en: 'Header color'
463
+ },
464
+ setting: {
465
+ id: 'bgColor',
466
+ state: 'active'
467
+ }
468
+ },
469
+ {
470
+ label: {
471
+ en: 'Border'
472
+ },
473
+ setting: {
474
+ id: 'headerBorder',
475
+ state: 'active'
476
+ }
477
+ }
478
+ ]
485
479
  }
486
480
  ]
487
481
  },
@@ -496,30 +490,31 @@ const SettingUIV2 = [
496
490
  },
497
491
  controlConfig: {
498
492
  id: 'width',
499
- type: 'input:unit',
493
+ type: 'dropdown:input',
494
+ label: 'Width',
495
+ inputType: 'number',
500
496
  units: [
501
497
  'px',
502
498
  '%'
503
499
  ],
500
+ hideUnit: false,
501
+ fallbackValue: 'Auto',
504
502
  linkWithSetting: {
505
503
  name: 'widthHeightSize',
506
504
  field: 'width'
507
- }
508
- }
509
- }
510
- ]
511
- },
512
- {
513
- label: {
514
- en: 'Background'
515
- },
516
- controls: [
517
- {
518
- label: {
519
- en: 'Color'
520
- },
521
- setting: {
522
- id: 'backgroundContent'
505
+ },
506
+ displayOptions: [
507
+ {
508
+ label: 'Full',
509
+ value: '100%',
510
+ showValue: true
511
+ },
512
+ {
513
+ label: 'Fit content',
514
+ value: '1200px',
515
+ showValue: true
516
+ }
517
+ ]
523
518
  }
524
519
  }
525
520
  ]