@gem-sdk/components 2.0.0-dev.369 → 2.0.0-dev.370

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.
@@ -7,6 +7,194 @@ const uiV2 = [
7
7
  },
8
8
  setting: {
9
9
  id: 'readMoreType'
10
+ },
11
+ layout: 'vertical',
12
+ controlChangeTrigger: {
13
+ settings: [
14
+ {
15
+ condition: `readMoreType === 'outline'`,
16
+ source: [
17
+ 'readMoreType'
18
+ ],
19
+ action: {
20
+ controlId: 'borderBtnV2',
21
+ groupType: 'style',
22
+ controlType: 'style',
23
+ newValue: {
24
+ normal: {
25
+ border: 'solid',
26
+ color: '#121212',
27
+ width: '1px',
28
+ borderWidth: '1px',
29
+ borderType: '1px'
30
+ },
31
+ hover: {
32
+ border: 'solid',
33
+ color: '#121212',
34
+ width: '1px',
35
+ borderWidth: '1px',
36
+ borderType: '1px'
37
+ }
38
+ }
39
+ }
40
+ },
41
+ {
42
+ condition: `readMoreType === 'button'`,
43
+ source: [
44
+ 'readMoreType'
45
+ ],
46
+ action: {
47
+ controlId: 'roundedBtnV2',
48
+ groupType: 'style',
49
+ controlType: 'style',
50
+ newValue: {
51
+ normal: {},
52
+ hover: {}
53
+ }
54
+ }
55
+ },
56
+ {
57
+ condition: `readMoreType === 'outline'`,
58
+ source: [
59
+ 'readMoreType'
60
+ ],
61
+ action: {
62
+ controlId: 'backgroundColorV2',
63
+ groupType: 'style',
64
+ controlType: 'style',
65
+ newValue: {
66
+ normal: '#212121',
67
+ hover: '#303030'
68
+ }
69
+ }
70
+ },
71
+ {
72
+ condition: `readMoreType === 'button' || readMoreType === 'rounded'`,
73
+ source: [
74
+ 'readMoreType'
75
+ ],
76
+ action: {
77
+ controlId: 'backgroundColorV2',
78
+ groupType: 'style',
79
+ controlType: 'style',
80
+ newValue: {
81
+ normal: '#212121',
82
+ hover: '#303030'
83
+ }
84
+ }
85
+ },
86
+ {
87
+ condition: `readMoreType === 'outline'`,
88
+ source: [
89
+ 'readMoreType'
90
+ ],
91
+ action: {
92
+ controlId: 'borderBtnV2',
93
+ groupType: 'style',
94
+ controlType: 'style',
95
+ newValue: {
96
+ normal: {},
97
+ hover: {}
98
+ }
99
+ }
100
+ },
101
+ {
102
+ condition: `readMoreType === 'outline'`,
103
+ source: [
104
+ 'readMoreType'
105
+ ],
106
+ action: {
107
+ controlId: 'backgroundColorV2',
108
+ groupType: 'style',
109
+ controlType: 'style',
110
+ newValue: {
111
+ normal: 'transparent',
112
+ hover: '#ECECEC'
113
+ }
114
+ }
115
+ },
116
+ {
117
+ condition: `readMoreType === 'rounded'`,
118
+ source: [
119
+ 'readMoreType'
120
+ ],
121
+ action: {
122
+ controlId: 'roundedBtnV2',
123
+ groupType: 'style',
124
+ controlType: 'style',
125
+ newValue: {
126
+ normal: {
127
+ btrr: '99999px',
128
+ bblr: '99999px',
129
+ bbrr: '99999px',
130
+ btlr: '99999px',
131
+ radiusType: 'circle'
132
+ },
133
+ hover: {
134
+ btrr: '99999px',
135
+ bblr: '99999px',
136
+ bbrr: '99999px',
137
+ btlr: '99999px',
138
+ radiusType: 'circle'
139
+ }
140
+ }
141
+ }
142
+ },
143
+ {
144
+ condition: `readMoreType === 'rounded'`,
145
+ source: [
146
+ 'readMoreType'
147
+ ],
148
+ action: {
149
+ controlId: 'roundedBtnV2',
150
+ groupType: 'style',
151
+ controlType: 'style',
152
+ newValue: {
153
+ normal: {
154
+ btrr: '99999px',
155
+ bblr: '99999px',
156
+ bbrr: '99999px',
157
+ btlr: '99999px',
158
+ radiusType: 'circle'
159
+ },
160
+ hover: {
161
+ btrr: '99999px',
162
+ bblr: '99999px',
163
+ bbrr: '99999px',
164
+ btlr: '99999px',
165
+ radiusType: 'circle'
166
+ }
167
+ }
168
+ }
169
+ },
170
+ {
171
+ condition: `readMoreType !== 'rounded'`,
172
+ source: [
173
+ 'readMoreType'
174
+ ],
175
+ action: {
176
+ controlId: 'roundedBtnV2',
177
+ groupType: 'style',
178
+ controlType: 'style',
179
+ newValue: {
180
+ normal: {},
181
+ hover: {}
182
+ }
183
+ }
184
+ }
185
+ ],
186
+ options: {
187
+ noRecordHistory: true
188
+ }
189
+ }
190
+ },
191
+ {
192
+ label: {
193
+ en: 'Content'
194
+ },
195
+ conditionDisplay: `readMoreType === 'text'`,
196
+ setting: {
197
+ id: 'label'
10
198
  }
11
199
  }
12
200
  ]
@@ -15,7 +203,7 @@ const uiV2 = [
15
203
  label: {
16
204
  en: 'Size'
17
205
  },
18
- conditionDisplay: `readMoreType == 'button'`,
206
+ conditionDisplay: `readMoreType !== 'text'`,
19
207
  controls: [
20
208
  {
21
209
  id: 'Width',
@@ -104,79 +292,6 @@ const uiV2 = [
104
292
  }
105
293
  ]
106
294
  },
107
- {
108
- label: {
109
- en: 'Background'
110
- },
111
- controls: [
112
- {
113
- setting: {
114
- id: 'backgroundColor'
115
- },
116
- layout: 'vertical'
117
- }
118
- ]
119
- },
120
- {
121
- conditionDisplay: `readMoreType == 'button'`,
122
- controls: [
123
- {
124
- label: {
125
- en: 'Icon'
126
- },
127
- setting: {
128
- id: 'iconVisible'
129
- },
130
- options: {
131
- labelVariant: 'primary',
132
- toggleStyle: 'switch'
133
- }
134
- }
135
- ]
136
- },
137
- {
138
- label: {
139
- en: 'Text style'
140
- },
141
- conditionDisplay: `readMoreType == 'button'`,
142
- controls: [
143
- {
144
- id: 'typo',
145
- label: {
146
- en: 'Basic'
147
- },
148
- setting: {
149
- id: 'typoBtn'
150
- },
151
- options: {
152
- hideLabel: true,
153
- fullWidth: true,
154
- updateFields: [
155
- {
156
- field: 'attrs.textAlign',
157
- settingId: 'textAlign'
158
- }
159
- ]
160
- },
161
- layout: 'vertical',
162
- controlChangeTrigger: {
163
- settings: [
164
- {
165
- action: {
166
- controlId: 'textAlign',
167
- valueFromField: 'attrs.textAlign',
168
- groupType: 'style',
169
- controlType: 'style'
170
- }
171
- }
172
- ],
173
- options: {
174
- noRecordHistory: true
175
- }
176
- }
177
- }
178
- ]
179
- },
180
295
  {
181
296
  label: {
182
297
  en: 'Size'
@@ -285,11 +400,154 @@ const uiV2 = [
285
400
  }
286
401
  ]
287
402
  },
403
+ {
404
+ label: {
405
+ en: 'Background'
406
+ },
407
+ controls: [
408
+ {
409
+ label: {
410
+ en: 'Color'
411
+ },
412
+ setting: {
413
+ id: 'backgroundColorV2',
414
+ state: 'normal'
415
+ }
416
+ },
417
+ {
418
+ label: {
419
+ en: 'Image'
420
+ },
421
+ setting: {
422
+ id: 'backgroundImage',
423
+ state: 'normal'
424
+ }
425
+ }
426
+ ]
427
+ },
428
+ {
429
+ label: {
430
+ en: 'Shape'
431
+ },
432
+ controls: [
433
+ {
434
+ label: {
435
+ en: 'Border'
436
+ },
437
+ setting: {
438
+ id: 'borderBtnV2',
439
+ state: 'normal'
440
+ }
441
+ },
442
+ {
443
+ label: {
444
+ en: 'Corner'
445
+ },
446
+ setting: {
447
+ id: 'roundedBtnV2',
448
+ state: 'normal'
449
+ }
450
+ },
451
+ {
452
+ label: {
453
+ en: 'Shadow'
454
+ },
455
+ setting: {
456
+ id: 'boxShadowBtnV2',
457
+ state: 'normal'
458
+ },
459
+ controlConfig: {
460
+ id: 'boxShadowBtnV2',
461
+ type: 'shadow-v2'
462
+ }
463
+ }
464
+ ]
465
+ },
466
+ {
467
+ controls: [
468
+ {
469
+ label: {
470
+ en: 'Icon'
471
+ },
472
+ setting: {
473
+ id: 'iconVisible'
474
+ },
475
+ options: {
476
+ labelVariant: 'primary',
477
+ toggleStyle: 'switch'
478
+ }
479
+ },
480
+ {
481
+ label: {
482
+ en: 'Icon'
483
+ },
484
+ setting: {
485
+ id: 'iconSvg'
486
+ },
487
+ conditionDisplay: 'iconVisible == true'
488
+ },
489
+ // {
490
+ // label: {
491
+ // en: 'Icon',
492
+ // },
493
+ // controlConfig: {
494
+ // id: 'iconColor',
495
+ // type: 'color-picker-v2',
496
+ // linkWithSetting: {
497
+ // name: 'textColorTextState',
498
+ // field: 'normal',
499
+ // },
500
+ // },
501
+ // conditionDisplay: 'iconVisible == true',
502
+ // },
503
+ // {
504
+ // label: {
505
+ // en: 'Size',
506
+ // },
507
+ // conditionDisplay: 'iconVisible == true',
508
+ // controlConfig: {
509
+ // id: 'iconSize',
510
+ // type: 'input:stepper',
511
+ // includeUnit: 'px',
512
+ // linkWithSetting: {
513
+ // name: 'iconSize',
514
+ // field: 'width',
515
+ // },
516
+ // compoDefaultValue: {
517
+ // default: {
518
+ // value: 16,
519
+ // unit: 'px',
520
+ // },
521
+ // },
522
+ // },
523
+ // },
524
+ {
525
+ type: 'control',
526
+ label: {
527
+ en: 'Position'
528
+ },
529
+ setting: {
530
+ id: 'iconAlign'
531
+ },
532
+ conditionDisplay: 'iconVisible == true'
533
+ },
534
+ {
535
+ type: 'control',
536
+ label: {
537
+ en: 'Gap'
538
+ },
539
+ setting: {
540
+ id: 'spacing'
541
+ },
542
+ conditionDisplay: 'iconVisible == true'
543
+ }
544
+ ]
545
+ },
288
546
  {
289
547
  label: {
290
548
  en: 'Text style'
291
549
  },
292
- conditionDisplay: `readMoreType == 'text'`,
550
+ conditionDisplay: `readMoreType !== 'text'`,
293
551
  controls: [
294
552
  {
295
553
  id: 'typo',
@@ -297,7 +555,7 @@ const uiV2 = [
297
555
  en: 'Basic'
298
556
  },
299
557
  setting: {
300
- id: 'typoText'
558
+ id: 'typoBtn'
301
559
  },
302
560
  options: {
303
561
  hideLabel: true,
@@ -329,32 +587,44 @@ const uiV2 = [
329
587
  ]
330
588
  },
331
589
  {
332
- conditionDisplay: "iconVisible == true && readMoreType == 'button'",
590
+ label: {
591
+ en: 'Text style'
592
+ },
593
+ conditionDisplay: `readMoreType == 'text'`,
333
594
  controls: [
334
595
  {
596
+ id: 'typo',
335
597
  label: {
336
- en: 'Choose icon'
598
+ en: 'Basic'
337
599
  },
338
600
  setting: {
339
- id: 'iconSvg'
340
- }
341
- },
342
- {
343
- type: 'control',
344
- label: {
345
- en: 'Position'
601
+ id: 'typoText'
346
602
  },
347
- setting: {
348
- id: 'iconAlign'
349
- }
350
- },
351
- {
352
- type: 'control',
353
- label: {
354
- en: 'Spacing'
603
+ options: {
604
+ hideLabel: true,
605
+ fullWidth: true,
606
+ updateFields: [
607
+ {
608
+ field: 'attrs.textAlign',
609
+ settingId: 'textAlign'
610
+ }
611
+ ]
355
612
  },
356
- setting: {
357
- id: 'iconSpacing'
613
+ layout: 'vertical',
614
+ controlChangeTrigger: {
615
+ settings: [
616
+ {
617
+ action: {
618
+ controlId: 'textAlign',
619
+ valueFromField: 'attrs.textAlign',
620
+ groupType: 'style',
621
+ controlType: 'style'
622
+ }
623
+ }
624
+ ],
625
+ options: {
626
+ noRecordHistory: true
627
+ }
358
628
  }
359
629
  }
360
630
  ]
@@ -363,7 +633,7 @@ const uiV2 = [
363
633
  label: {
364
634
  en: 'Hover effect'
365
635
  },
366
- conditionDisplay: `readMoreType == 'button'`,
636
+ conditionDisplay: `readMoreType !== 'text'`,
367
637
  controls: [
368
638
  {
369
639
  label: {
@@ -400,6 +670,19 @@ const uiV2 = [
400
670
  id: 'roundedBtnV2',
401
671
  state: 'hover'
402
672
  }
673
+ },
674
+ {
675
+ label: {
676
+ en: 'Shadow'
677
+ },
678
+ setting: {
679
+ id: 'boxShadowBtnV2',
680
+ state: 'hover'
681
+ },
682
+ controlConfig: {
683
+ id: 'boxShadowBtnV2',
684
+ type: 'shadow-v2'
685
+ }
403
686
  }
404
687
  ]
405
688
  },
@@ -429,7 +712,7 @@ const uiV2 = [
429
712
  setting: {
430
713
  id: 'alignBtn'
431
714
  },
432
- conditionDisplay: `readMoreType == 'button'`,
715
+ conditionDisplay: `readMoreType !== 'text'`,
433
716
  conditionEnable: "globalSizeBtn.width !== '100%'",
434
717
  options: {
435
718
  labelVariant: 'primary',
@@ -417,7 +417,7 @@ type ArticleDateProps = BaseProps<TextProps['setting'] & {
417
417
  dateFormat?: string;
418
418
  }, TextProps['styles']>;
419
419
  type ArticleReadMoreSetting = TextProps['setting'] & ButtonProps['setting'] & {
420
- readMoreType: 'text' | 'button';
420
+ readMoreType: 'text' | 'button' | 'rounded' | 'outline';
421
421
  label: string | React.ReactNode;
422
422
  };
423
423
  type ArticleReadMoreStyles = TextProps['styles'] & ButtonProps['styles'] & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.369",
3
+ "version": "2.0.0-dev.370",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",