@gem-sdk/components 2.0.0-dev.384 → 2.0.0-dev.386

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 (36) hide show
  1. package/dist/cjs/icon/setting/configs/settings.js +5 -2
  2. package/dist/cjs/icon-list-hoz/components/common/getStyle.js +5 -0
  3. package/dist/cjs/icon-list-hoz/setting/configs/settings.js +1 -1
  4. package/dist/cjs/icon-list-hoz/setting/configs/uiV2.js +44 -0
  5. package/dist/cjs/product/components/ProductBadge/common/getStyles.js +3 -2
  6. package/dist/cjs/product/components/ProductProperties/ProductProperties.liquid.js +1 -1
  7. package/dist/cjs/product/components/ProductProperties/ProductPropertyInput/common/getStyles.js +2 -2
  8. package/dist/cjs/product/components/ProductProperties/ProductPropertySelect/common/getStyles.js +2 -2
  9. package/dist/cjs/product/components/ProductProperties/common/getAttrs.js +2 -2
  10. package/dist/cjs/product/components/ProductQuantity/common/getStyles.js +19 -16
  11. package/dist/cjs/product/components/ProductQuantity/index.js +5 -3
  12. package/dist/cjs/product/setting/product-badge/configs/settings.js +8 -4
  13. package/dist/cjs/product/setting/product-badge/configs/uiV2.js +3 -3
  14. package/dist/cjs/product/setting/product-properties/configs/settingsV2.js +5 -20
  15. package/dist/cjs/product/setting/product-properties/configs/uiV2.js +169 -6
  16. package/dist/cjs/product/setting/product-quantity/configs/settings.js +48 -28
  17. package/dist/cjs/product/setting/product-quantity/configs/uiV2.js +54 -19
  18. package/dist/esm/icon/setting/configs/settings.js +5 -2
  19. package/dist/esm/icon-list-hoz/components/common/getStyle.js +6 -1
  20. package/dist/esm/icon-list-hoz/setting/configs/settings.js +1 -1
  21. package/dist/esm/icon-list-hoz/setting/configs/uiV2.js +44 -0
  22. package/dist/esm/product/components/ProductBadge/common/getStyles.js +3 -2
  23. package/dist/esm/product/components/ProductProperties/ProductProperties.liquid.js +1 -1
  24. package/dist/esm/product/components/ProductProperties/ProductPropertyInput/common/getStyles.js +3 -3
  25. package/dist/esm/product/components/ProductProperties/ProductPropertySelect/common/getStyles.js +3 -3
  26. package/dist/esm/product/components/ProductProperties/common/getAttrs.js +2 -2
  27. package/dist/esm/product/components/ProductQuantity/common/getStyles.js +20 -17
  28. package/dist/esm/product/components/ProductQuantity/index.js +5 -3
  29. package/dist/esm/product/setting/product-badge/configs/settings.js +8 -4
  30. package/dist/esm/product/setting/product-badge/configs/uiV2.js +3 -3
  31. package/dist/esm/product/setting/product-properties/configs/settingsV2.js +5 -20
  32. package/dist/esm/product/setting/product-properties/configs/uiV2.js +169 -6
  33. package/dist/esm/product/setting/product-quantity/configs/settings.js +48 -28
  34. package/dist/esm/product/setting/product-quantity/configs/uiV2.js +54 -19
  35. package/dist/types/index.d.ts +4 -3
  36. package/package.json +2 -2
@@ -175,6 +175,50 @@ const SettingUIV2 = [
175
175
  setting: {
176
176
  id: 'shadowInput',
177
177
  state: 'normal'
178
+ },
179
+ options: {
180
+ updateFields: [
181
+ {
182
+ field: 'normal.enable',
183
+ settingId: 'hasShadowInput',
184
+ state: 'normal'
185
+ }
186
+ ]
187
+ },
188
+ controlChangeTrigger: {
189
+ settings: [
190
+ {
191
+ condition: `shadowInput.normal.enable === true`,
192
+ source: [
193
+ 'shadowInput',
194
+ 'hasShadowInput'
195
+ ],
196
+ action: {
197
+ controlId: 'hasShadowInput',
198
+ groupType: 'style',
199
+ controlType: 'style',
200
+ state: 'normal',
201
+ newValue: true
202
+ }
203
+ },
204
+ {
205
+ condition: `shadowInput.normal.enable === false`,
206
+ source: [
207
+ 'shadowInput',
208
+ 'hasShadowInput'
209
+ ],
210
+ action: {
211
+ controlId: 'hasShadowInput',
212
+ groupType: 'style',
213
+ controlType: 'style',
214
+ state: 'normal',
215
+ newValue: false
216
+ }
217
+ }
218
+ ],
219
+ options: {
220
+ noRecordHistory: true
221
+ }
178
222
  }
179
223
  }
180
224
  ]
@@ -218,6 +262,9 @@ const SettingUIV2 = [
218
262
  label: {
219
263
  en: 'Placeholder'
220
264
  },
265
+ popoverLabel: {
266
+ en: 'Content'
267
+ },
221
268
  iconName: 'polaris-text-block',
222
269
  getValueFromSettingID: 'placeholder',
223
270
  isHideClear: true,
@@ -228,7 +275,8 @@ const SettingUIV2 = [
228
275
  },
229
276
  setting: {
230
277
  id: 'placeholder'
231
- }
278
+ },
279
+ layout: 'vertical'
232
280
  }
233
281
  ]
234
282
  },
@@ -335,7 +383,8 @@ const SettingUIV2 = [
335
383
  },
336
384
  setting: {
337
385
  id: 'label'
338
- }
386
+ },
387
+ layout: 'vertical'
339
388
  }
340
389
  ]
341
390
  },
@@ -424,6 +473,50 @@ const SettingUIV2 = [
424
473
  setting: {
425
474
  id: 'shadowInput',
426
475
  state: 'hover'
476
+ },
477
+ options: {
478
+ updateFields: [
479
+ {
480
+ field: 'hover.enable',
481
+ settingId: 'hasShadowInput',
482
+ state: 'hover'
483
+ }
484
+ ]
485
+ },
486
+ controlChangeTrigger: {
487
+ settings: [
488
+ {
489
+ condition: `shadowInput.hover.enable === true`,
490
+ source: [
491
+ 'shadowInput',
492
+ 'hasShadowInput'
493
+ ],
494
+ action: {
495
+ controlId: 'hasShadowInput',
496
+ groupType: 'style',
497
+ controlType: 'style',
498
+ state: 'hover',
499
+ newValue: true
500
+ }
501
+ },
502
+ {
503
+ condition: `shadowInput.hover.enable === false`,
504
+ source: [
505
+ 'shadowInput',
506
+ 'hasShadowInput'
507
+ ],
508
+ action: {
509
+ controlId: 'hasShadowInput',
510
+ groupType: 'style',
511
+ controlType: 'style',
512
+ state: 'hover',
513
+ newValue: false
514
+ }
515
+ }
516
+ ],
517
+ options: {
518
+ noRecordHistory: true
519
+ }
427
520
  }
428
521
  }
429
522
  ]
@@ -505,6 +598,50 @@ const SettingUIV2 = [
505
598
  setting: {
506
599
  id: 'shadowInput',
507
600
  state: 'focus'
601
+ },
602
+ options: {
603
+ updateFields: [
604
+ {
605
+ field: 'focus.enable',
606
+ settingId: 'hasShadowInput',
607
+ state: 'focus'
608
+ }
609
+ ]
610
+ },
611
+ controlChangeTrigger: {
612
+ settings: [
613
+ {
614
+ condition: `shadowInput.focus.enable === true`,
615
+ source: [
616
+ 'shadowInput',
617
+ 'hasShadowInput'
618
+ ],
619
+ action: {
620
+ controlId: 'hasShadowInput',
621
+ groupType: 'style',
622
+ controlType: 'style',
623
+ state: 'focus',
624
+ newValue: true
625
+ }
626
+ },
627
+ {
628
+ condition: `shadowInput.focus.enable === false`,
629
+ source: [
630
+ 'shadowInput',
631
+ 'hasShadowInput'
632
+ ],
633
+ action: {
634
+ controlId: 'hasShadowInput',
635
+ groupType: 'style',
636
+ controlType: 'style',
637
+ state: 'focus',
638
+ newValue: false
639
+ }
640
+ }
641
+ ],
642
+ options: {
643
+ noRecordHistory: true
644
+ }
508
645
  }
509
646
  }
510
647
  ]
@@ -538,8 +675,12 @@ const SettingUIV2 = [
538
675
  type: 'combo',
539
676
  isHideClear: true,
540
677
  getValueFromSettingID: 'name',
678
+ iconName: 'polaris-text-block',
541
679
  controls: [
542
680
  {
681
+ label: {
682
+ en: 'Content'
683
+ },
543
684
  setting: {
544
685
  id: 'name'
545
686
  },
@@ -583,6 +724,24 @@ const SettingUIV2 = [
583
724
  id: 'maxChar'
584
725
  }
585
726
  },
727
+ {
728
+ label: {
729
+ en: 'Min number value'
730
+ },
731
+ conditionDisplay: 'numberOnly === true && ["text", "textarea"].includes(type)',
732
+ setting: {
733
+ id: 'minNumber'
734
+ }
735
+ },
736
+ {
737
+ label: {
738
+ en: 'Max number value'
739
+ },
740
+ conditionDisplay: 'numberOnly === true && ["text", "textarea"].includes(type)',
741
+ setting: {
742
+ id: 'maxNumber'
743
+ }
744
+ },
586
745
  {
587
746
  label: {
588
747
  en: 'Predefine value'
@@ -623,7 +782,8 @@ const SettingUIV2 = [
623
782
  },
624
783
  setting: {
625
784
  id: 'invalidLengthMessage'
626
- }
785
+ },
786
+ layout: 'vertical'
627
787
  }
628
788
  ]
629
789
  },
@@ -643,7 +803,8 @@ const SettingUIV2 = [
643
803
  },
644
804
  setting: {
645
805
  id: 'invalidNumberMessage'
646
- }
806
+ },
807
+ layout: 'vertical'
647
808
  }
648
809
  ]
649
810
  },
@@ -663,7 +824,8 @@ const SettingUIV2 = [
663
824
  },
664
825
  setting: {
665
826
  id: 'invalidEmailMessage'
666
- }
827
+ },
828
+ layout: 'vertical'
667
829
  }
668
830
  ]
669
831
  },
@@ -683,7 +845,8 @@ const SettingUIV2 = [
683
845
  },
684
846
  setting: {
685
847
  id: 'requiredMessage'
686
- }
848
+ },
849
+ layout: 'vertical'
687
850
  }
688
851
  ]
689
852
  }
@@ -214,37 +214,32 @@ const ProductQuantitySettings = [
214
214
  id: 'typo',
215
215
  type: 'typography-v2',
216
216
  default: {
217
- normal: {
218
- type: 'paragraph-1',
219
- attrs: {
220
- color: '#121212'
217
+ type: 'paragraph-1',
218
+ attrs: {
219
+ color: '#121212'
220
+ },
221
+ custom: {
222
+ fontSize: {
223
+ desktop: '16px',
224
+ tablet: '16px',
225
+ mobile: '14px'
226
+ },
227
+ lineHeight: {
228
+ desktop: '120%',
229
+ tablet: '180%',
230
+ mobile: '180%'
231
+ },
232
+ fontWeight: '400',
233
+ fontFamily: {
234
+ value: 'Assistant',
235
+ type: 'google'
221
236
  },
222
- custom: {
223
- fontSize: {
224
- desktop: '16px',
225
- tablet: '16px',
226
- mobile: '14px'
227
- },
228
- lineHeight: {
229
- desktop: '120%',
230
- tablet: '180%',
231
- mobile: '180%'
232
- },
233
- fontWeight: '400',
234
- fontFamily: {
235
- value: 'Assistant',
236
- type: 'google'
237
- },
238
- textShadow: {
239
- type: 'none'
240
- }
237
+ hasShadowText: false,
238
+ textShadow: {
239
+ enable: false
241
240
  }
242
241
  }
243
242
  },
244
- state: {
245
- normal: true,
246
- hover: true
247
- },
248
243
  ignoreReRender: true,
249
244
  hiddenSetting: {
250
245
  transform: true,
@@ -411,7 +406,32 @@ const ProductQuantitySettings = [
411
406
  }
412
407
  },
413
408
  {
414
- id: 'boxShadow',
409
+ id: 'buttonBoxShadow',
410
+ type: 'shadow-v2',
411
+ devices: {
412
+ desktop: {
413
+ default: {
414
+ normal: {}
415
+ }
416
+ }
417
+ },
418
+ compoDefaultValue: {
419
+ desktop: {
420
+ default: {
421
+ normal: {
422
+ type: 'shadow-1',
423
+ distance: '4px',
424
+ blur: '4px',
425
+ spread: '0px',
426
+ color: '#121212',
427
+ angle: 90
428
+ }
429
+ }
430
+ }
431
+ }
432
+ },
433
+ {
434
+ id: 'inputBoxShadow',
415
435
  type: 'shadow-v2',
416
436
  devices: {
417
437
  desktop: {
@@ -271,7 +271,7 @@ const SettingUIV2 = [
271
271
  en: 'Shadow'
272
272
  },
273
273
  setting: {
274
- id: 'boxShadow',
274
+ id: 'buttonBoxShadow',
275
275
  state: 'hover'
276
276
  }
277
277
  }
@@ -305,15 +305,14 @@ const SettingUIV2 = [
305
305
  controls: [
306
306
  {
307
307
  setting: {
308
- id: 'typo',
309
- state: 'normal'
308
+ id: 'typo'
310
309
  },
311
310
  layout: 'vertical',
312
311
  options: {
313
312
  updateFields: [
314
313
  {
315
314
  field: 'attrs.color',
316
- settingId: 'inputColor',
315
+ settingId: 'textColor',
317
316
  state: 'normal'
318
317
  }
319
318
  ]
@@ -322,7 +321,7 @@ const SettingUIV2 = [
322
321
  settings: [
323
322
  {
324
323
  action: {
325
- controlId: 'inputColor',
324
+ controlId: 'textColor',
326
325
  valueFromField: 'attrs.color',
327
326
  groupType: 'style',
328
327
  controlType: 'style',
@@ -392,13 +391,9 @@ const SettingUIV2 = [
392
391
  label: {
393
392
  en: 'Text color'
394
393
  },
395
- controlConfig: {
396
- id: 'input-color-hover',
397
- type: 'color-picker-v2',
398
- linkWithSetting: {
399
- name: 'typo',
400
- field: 'hover.attrs.color'
401
- }
394
+ setting: {
395
+ id: 'textColor',
396
+ state: 'hover'
402
397
  }
403
398
  },
404
399
  {
@@ -434,13 +429,9 @@ const SettingUIV2 = [
434
429
  label: {
435
430
  en: 'Shadow'
436
431
  },
437
- controlConfig: {
438
- id: 'input-shadow-hover',
439
- type: 'shadow-v2',
440
- linkWithSetting: {
441
- name: 'typo',
442
- field: 'hover.attrs.textShadow'
443
- }
432
+ setting: {
433
+ id: 'inputBoxShadow',
434
+ state: 'hover'
444
435
  }
445
436
  }
446
437
  ]
@@ -529,6 +520,50 @@ const SettingUIV2 = [
529
520
  setting: {
530
521
  id: 'boxShadow',
531
522
  state: 'normal'
523
+ },
524
+ options: {
525
+ updateFields: [
526
+ {
527
+ field: 'normal.enable',
528
+ settingId: 'advanced.hasBoxShadow',
529
+ state: 'normal'
530
+ }
531
+ ]
532
+ },
533
+ controlChangeTrigger: {
534
+ settings: [
535
+ {
536
+ condition: `boxShadow.normal.enable === true`,
537
+ source: [
538
+ 'boxShadow',
539
+ 'hasBoxShadow'
540
+ ],
541
+ action: {
542
+ controlId: 'hasBoxShadow',
543
+ groupType: 'advanced',
544
+ controlType: 'advanced',
545
+ state: 'normal',
546
+ newValue: true
547
+ }
548
+ },
549
+ {
550
+ condition: `boxShadow.normal.enable === false`,
551
+ source: [
552
+ 'boxShadow',
553
+ 'hasBoxShadow'
554
+ ],
555
+ action: {
556
+ controlId: 'hasBoxShadow',
557
+ groupType: 'advanced',
558
+ controlType: 'advanced',
559
+ state: 'normal',
560
+ newValue: false
561
+ }
562
+ }
563
+ ],
564
+ options: {
565
+ noRecordHistory: true
566
+ }
532
567
  }
533
568
  }
534
569
  ]
@@ -3570,7 +3570,7 @@ type ProductPropertiesProps = BaseProps<{
3570
3570
  height?: ObjectDevices$1<string | number | undefined>;
3571
3571
  borderInput?: ObjectDevices$1<StateProp<Border>>;
3572
3572
  hasShadowInput?: StateProp<boolean>;
3573
- shadowInput?: ObjectDevices$1<StateProp<ShadowProps$1>>;
3573
+ shadowInput?: StateProp<ShadowProps$1>;
3574
3574
  borderRadius?: ObjectDevices$1<StateProp<CornerRadius>>;
3575
3575
  spacing?: string;
3576
3576
  textAlign?: ObjectDevices$1<AlignProp>;
@@ -3989,7 +3989,7 @@ type ProductQuantityProps = BaseProps<{
3989
3989
  * @deprecated use `typo` instead
3990
3990
  */
3991
3991
  typography?: TypographySetting$1;
3992
- typo?: StateProp<TypographySettingV2>;
3992
+ typo?: TypographySettingV2;
3993
3993
  align?: ObjectDevices$1<AlignProp>;
3994
3994
  inputBackgroundColor?: StateProp<ColorValueType$1>;
3995
3995
  textColor?: StateProp<ColorValueType$1>;
@@ -3998,7 +3998,8 @@ type ProductQuantityProps = BaseProps<{
3998
3998
  borderBtn?: ObjectDevices$1<StateProp<Border>>;
3999
3999
  iconSizeCustom?: ObjectDevices$1<number>;
4000
4000
  corner?: ObjectDevices$1<StateProp<CornerRadius>>;
4001
- boxShadow?: ObjectDevices$1<StateProp<ShadowProps$1>>;
4001
+ buttonBoxShadow?: ObjectDevices$1<StateProp<ShadowProps$1>>;
4002
+ inputBoxShadow?: ObjectDevices$1<StateProp<ShadowProps$1>>;
4002
4003
  backgroundColor?: StateProp<ColorValueType$1>;
4003
4004
  dividerColor?: ObjectDevices$1<StateProp<ColorValueType$1>>;
4004
4005
  dividerStroke?: ObjectDevices$1<StateProp<number>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.384",
3
+ "version": "2.0.0-dev.386",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -22,7 +22,7 @@
22
22
  "relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
23
23
  },
24
24
  "devDependencies": {
25
- "@gem-sdk/core": "2.0.0-dev.380",
25
+ "@gem-sdk/core": "2.0.0-dev.386",
26
26
  "@gem-sdk/styles": "2.0.0-dev.381",
27
27
  "@gem-sdk/system": "2.0.0-dev.371",
28
28
  "@types/react-transition-group": "^4.4.5"