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