@gem-sdk/components 2.0.0-dev.382 → 2.0.0-dev.383

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.
@@ -182,9 +182,49 @@ const SettingUIV2 = [
182
182
  id: 'boxShadowBtnV2',
183
183
  state: 'normal'
184
184
  },
185
- controlConfig: {
186
- id: 'boxShadowBtnV2',
187
- type: 'shadow-v2'
185
+ options: {
186
+ updateFields: [
187
+ {
188
+ field: 'enable',
189
+ settingId: 'hasBoxShadowBtn',
190
+ state: 'normal'
191
+ }
192
+ ]
193
+ },
194
+ controlChangeTrigger: {
195
+ settings: [
196
+ {
197
+ condition: `boxShadowBtnV2.normal.enable === true`,
198
+ source: [
199
+ 'boxShadowBtnV2',
200
+ 'hasBoxShadowBtn'
201
+ ],
202
+ action: {
203
+ controlId: 'hasBoxShadowBtn',
204
+ groupType: 'advanced',
205
+ controlType: 'advanced',
206
+ state: 'normal',
207
+ newValue: true
208
+ }
209
+ },
210
+ {
211
+ condition: `boxShadowBtnV2.normal.enable === false`,
212
+ source: [
213
+ 'boxShadowBtnV2',
214
+ 'hasBoxShadowBtn'
215
+ ],
216
+ action: {
217
+ controlId: 'hasBoxShadowBtn',
218
+ groupType: 'advanced',
219
+ controlType: 'advanced',
220
+ state: 'normal',
221
+ newValue: false
222
+ }
223
+ }
224
+ ],
225
+ options: {
226
+ noRecordHistory: true
227
+ }
188
228
  }
189
229
  }
190
230
  ]
@@ -345,9 +385,49 @@ const SettingUIV2 = [
345
385
  id: 'boxShadowBtnV2',
346
386
  state: 'hover'
347
387
  },
348
- controlConfig: {
349
- id: 'boxShadowBtnV2',
350
- type: 'shadow-v2'
388
+ options: {
389
+ updateFields: [
390
+ {
391
+ field: 'enable',
392
+ settingId: 'hasBoxShadowBtn',
393
+ state: 'hover'
394
+ }
395
+ ]
396
+ },
397
+ controlChangeTrigger: {
398
+ settings: [
399
+ {
400
+ condition: `boxShadowBtnV2.hover.enable === true`,
401
+ source: [
402
+ 'boxShadowBtnV2',
403
+ 'hasBoxShadowBtn'
404
+ ],
405
+ action: {
406
+ controlId: 'hasBoxShadowBtn',
407
+ groupType: 'advanced',
408
+ controlType: 'advanced',
409
+ state: 'hover',
410
+ newValue: true
411
+ }
412
+ },
413
+ {
414
+ condition: `boxShadowBtnV2.normal.enable === false`,
415
+ source: [
416
+ 'boxShadowBtnV2',
417
+ 'hasBoxShadowBtn'
418
+ ],
419
+ action: {
420
+ controlId: 'hasBoxShadowBtn',
421
+ groupType: 'advanced',
422
+ controlType: 'advanced',
423
+ state: 'normal',
424
+ newValue: false
425
+ }
426
+ }
427
+ ],
428
+ options: {
429
+ noRecordHistory: true
430
+ }
351
431
  }
352
432
  }
353
433
  ]
@@ -97,9 +97,49 @@ const SettingUIV2 = [
97
97
  id: 'boxShadow',
98
98
  state: 'normal'
99
99
  },
100
- controlConfig: {
101
- id: 'boxShadow',
102
- type: 'shadow-v2'
100
+ options: {
101
+ updateFields: [
102
+ {
103
+ field: 'enable',
104
+ settingId: 'hasBoxShadow',
105
+ state: 'normal'
106
+ }
107
+ ]
108
+ },
109
+ controlChangeTrigger: {
110
+ settings: [
111
+ {
112
+ condition: `boxShadow.normal.enable === true`,
113
+ source: [
114
+ 'boxShadow',
115
+ 'hasBoxShadow'
116
+ ],
117
+ action: {
118
+ controlId: 'hasBoxShadow',
119
+ groupType: 'advanced',
120
+ controlType: 'advanced',
121
+ state: 'normal',
122
+ newValue: true
123
+ }
124
+ },
125
+ {
126
+ condition: `boxShadow.normal.enable === false`,
127
+ source: [
128
+ 'boxShadow',
129
+ 'hasBoxShadow'
130
+ ],
131
+ action: {
132
+ controlId: 'hasBoxShadow',
133
+ groupType: 'advanced',
134
+ controlType: 'advanced',
135
+ state: 'normal',
136
+ newValue: false
137
+ }
138
+ }
139
+ ],
140
+ options: {
141
+ noRecordHistory: true
142
+ }
103
143
  }
104
144
  }
105
145
  ]
@@ -94,7 +94,7 @@ const config = {
94
94
  desktop: 'auto'
95
95
  },
96
96
  align: {
97
- desktop: 'center'
97
+ desktop: 'left'
98
98
  }
99
99
  },
100
100
  advanced: {
@@ -250,6 +250,19 @@ const ButtonSettings = [
250
250
  hover: true
251
251
  }
252
252
  },
253
+ {
254
+ id: 'hasBoxShadowBtn',
255
+ type: 'toggle',
256
+ label: 'Enable Button Shadow',
257
+ default: {
258
+ normal: false,
259
+ hover: false
260
+ },
261
+ state: {
262
+ normal: true,
263
+ hover: true
264
+ }
265
+ },
253
266
  {
254
267
  id: 'boxShadowBtnV2',
255
268
  type: 'shadow-v2',
@@ -386,7 +399,7 @@ const ButtonSettings = [
386
399
  default: {
387
400
  type: 'paragraph-1',
388
401
  attrs: {
389
- color: 'text-1'
402
+ color: 'text-3'
390
403
  }
391
404
  },
392
405
  ignoreReRender: true,
@@ -152,9 +152,49 @@ const SettingUIV2 = [
152
152
  id: 'boxShadowBtnV2',
153
153
  state: 'normal'
154
154
  },
155
- controlConfig: {
156
- id: 'boxShadowBtnV2',
157
- type: 'shadow-v2'
155
+ options: {
156
+ updateFields: [
157
+ {
158
+ field: 'enable',
159
+ settingId: 'hasBoxShadowBtn',
160
+ state: 'normal'
161
+ }
162
+ ]
163
+ },
164
+ controlChangeTrigger: {
165
+ settings: [
166
+ {
167
+ condition: `boxShadowBtnV2.normal.enable === true`,
168
+ source: [
169
+ 'boxShadowBtnV2',
170
+ 'hasBoxShadowBtn'
171
+ ],
172
+ action: {
173
+ controlId: 'hasBoxShadowBtn',
174
+ groupType: 'advanced',
175
+ controlType: 'advanced',
176
+ state: 'normal',
177
+ newValue: true
178
+ }
179
+ },
180
+ {
181
+ condition: `boxShadowBtnV2.normal.enable === false`,
182
+ source: [
183
+ 'boxShadowBtnV2',
184
+ 'hasBoxShadowBtn'
185
+ ],
186
+ action: {
187
+ controlId: 'hasBoxShadowBtn',
188
+ groupType: 'advanced',
189
+ controlType: 'advanced',
190
+ state: 'normal',
191
+ newValue: false
192
+ }
193
+ }
194
+ ],
195
+ options: {
196
+ noRecordHistory: true
197
+ }
158
198
  }
159
199
  }
160
200
  ]
@@ -288,39 +328,84 @@ const SettingUIV2 = [
288
328
  id: 'textColorHover',
289
329
  state: 'hover'
290
330
  }
291
- },
292
- {
293
- label: {
294
- en: 'Border'
295
- },
296
- setting: {
297
- id: 'borderBtnV2',
298
- state: 'hover'
299
- }
300
- },
301
- {
302
- label: {
303
- en: 'Corner'
304
- },
305
- setting: {
306
- id: 'roundedBtnV2',
307
- state: 'hover'
308
- }
309
- },
310
- {
311
- label: {
312
- en: 'Shadow'
331
+ }
332
+ ],
333
+ moreSettings: {
334
+ type: 'collapse',
335
+ controls: [
336
+ {
337
+ label: {
338
+ en: 'Border'
339
+ },
340
+ setting: {
341
+ id: 'borderBtnV2',
342
+ state: 'hover'
343
+ }
313
344
  },
314
- setting: {
315
- id: 'boxShadowBtnV2',
316
- state: 'hover'
345
+ {
346
+ label: {
347
+ en: 'Corner'
348
+ },
349
+ setting: {
350
+ id: 'roundedBtnV2',
351
+ state: 'hover'
352
+ }
317
353
  },
318
- controlConfig: {
319
- id: 'boxShadowBtnV2',
320
- type: 'shadow-v2'
354
+ {
355
+ label: {
356
+ en: 'Shadow'
357
+ },
358
+ setting: {
359
+ id: 'boxShadowBtnV2',
360
+ state: 'hover'
361
+ },
362
+ options: {
363
+ updateFields: [
364
+ {
365
+ field: 'enable',
366
+ settingId: 'hasBoxShadowBtn',
367
+ state: 'hover'
368
+ }
369
+ ]
370
+ },
371
+ controlChangeTrigger: {
372
+ settings: [
373
+ {
374
+ condition: `boxShadowBtnV2.hover.enable === true`,
375
+ source: [
376
+ 'boxShadowBtnV2',
377
+ 'hasBoxShadowBtn'
378
+ ],
379
+ action: {
380
+ controlId: 'hasBoxShadowBtn',
381
+ groupType: 'advanced',
382
+ controlType: 'advanced',
383
+ state: 'hover',
384
+ newValue: true
385
+ }
386
+ },
387
+ {
388
+ condition: `boxShadowBtnV2.hover.enable === false`,
389
+ source: [
390
+ 'boxShadowBtnV2',
391
+ 'hasBoxShadowBtn'
392
+ ],
393
+ action: {
394
+ controlId: 'hasBoxShadowBtn',
395
+ groupType: 'advanced',
396
+ controlType: 'advanced',
397
+ state: 'hover',
398
+ newValue: false
399
+ }
400
+ }
401
+ ],
402
+ options: {
403
+ noRecordHistory: true
404
+ }
405
+ }
321
406
  }
322
- }
323
- ]
407
+ ]
408
+ }
324
409
  },
325
410
  {
326
411
  controls: [
@@ -223,11 +223,52 @@ const SettingUIV2 = [
223
223
  label: {
224
224
  en: 'Shadow'
225
225
  },
226
- controlConfig: {
226
+ setting: {
227
227
  id: 'shadow',
228
- type: 'shadow-v2',
229
- linkWithSetting: {
230
- name: 'shadow'
228
+ state: 'normal'
229
+ },
230
+ options: {
231
+ updateFields: [
232
+ {
233
+ field: 'enable',
234
+ settingId: 'hasActiveShadow',
235
+ state: 'normal'
236
+ }
237
+ ]
238
+ },
239
+ controlChangeTrigger: {
240
+ settings: [
241
+ {
242
+ condition: `shadow.normal.enable === true`,
243
+ source: [
244
+ 'shadow',
245
+ 'hasActiveShadow'
246
+ ],
247
+ action: {
248
+ controlId: 'hasActiveShadow',
249
+ groupType: 'advanced',
250
+ controlType: 'advanced',
251
+ state: 'normal',
252
+ newValue: true
253
+ }
254
+ },
255
+ {
256
+ condition: `shadow.normal.enable === false`,
257
+ source: [
258
+ 'shadow',
259
+ 'hasActiveShadow'
260
+ ],
261
+ action: {
262
+ controlId: 'hasActiveShadow',
263
+ groupType: 'advanced',
264
+ controlType: 'advanced',
265
+ state: 'normal',
266
+ newValue: false
267
+ }
268
+ }
269
+ ],
270
+ options: {
271
+ noRecordHistory: true
231
272
  }
232
273
  }
233
274
  }
@@ -357,6 +357,50 @@ const SettingUIV2 = [
357
357
  setting: {
358
358
  id: 'boxShadow',
359
359
  state: 'normal'
360
+ },
361
+ options: {
362
+ updateFields: [
363
+ {
364
+ field: 'enable',
365
+ settingId: 'hasBoxShadow',
366
+ state: 'normal'
367
+ }
368
+ ]
369
+ },
370
+ controlChangeTrigger: {
371
+ settings: [
372
+ {
373
+ condition: `boxShadow.normal.enable === true`,
374
+ source: [
375
+ 'boxShadow',
376
+ 'hasBoxShadow'
377
+ ],
378
+ action: {
379
+ controlId: 'hasBoxShadow',
380
+ groupType: 'advanced',
381
+ controlType: 'advanced',
382
+ state: 'normal',
383
+ newValue: true
384
+ }
385
+ },
386
+ {
387
+ condition: `boxShadow.normal.enable === false`,
388
+ source: [
389
+ 'boxShadow',
390
+ 'hasBoxShadow'
391
+ ],
392
+ action: {
393
+ controlId: 'hasBoxShadow',
394
+ groupType: 'advanced',
395
+ controlType: 'advanced',
396
+ state: 'normal',
397
+ newValue: false
398
+ }
399
+ }
400
+ ],
401
+ options: {
402
+ noRecordHistory: true
403
+ }
360
404
  }
361
405
  }
362
406
  ]
@@ -22,7 +22,7 @@ const DynamicCheckoutSettings = [
22
22
  default: {
23
23
  type: 'paragraph-1',
24
24
  attrs: {
25
- color: 'text-1'
25
+ color: 'text-3'
26
26
  }
27
27
  },
28
28
  hiddenSetting: {
@@ -180,9 +180,49 @@ const SettingUIV2 = [
180
180
  id: 'boxShadowBtnV2',
181
181
  state: 'normal'
182
182
  },
183
- controlConfig: {
184
- id: 'boxShadowBtnV2',
185
- type: 'shadow-v2'
183
+ options: {
184
+ updateFields: [
185
+ {
186
+ field: 'enable',
187
+ settingId: 'hasBoxShadowBtn',
188
+ state: 'normal'
189
+ }
190
+ ]
191
+ },
192
+ controlChangeTrigger: {
193
+ settings: [
194
+ {
195
+ condition: `boxShadowBtnV2.normal.enable === true`,
196
+ source: [
197
+ 'boxShadowBtnV2',
198
+ 'hasBoxShadowBtn'
199
+ ],
200
+ action: {
201
+ controlId: 'hasBoxShadowBtn',
202
+ groupType: 'advanced',
203
+ controlType: 'advanced',
204
+ state: 'normal',
205
+ newValue: true
206
+ }
207
+ },
208
+ {
209
+ condition: `boxShadowBtnV2.normal.enable === false`,
210
+ source: [
211
+ 'boxShadowBtnV2',
212
+ 'hasBoxShadowBtn'
213
+ ],
214
+ action: {
215
+ controlId: 'hasBoxShadowBtn',
216
+ groupType: 'advanced',
217
+ controlType: 'advanced',
218
+ state: 'normal',
219
+ newValue: false
220
+ }
221
+ }
222
+ ],
223
+ options: {
224
+ noRecordHistory: true
225
+ }
186
226
  }
187
227
  }
188
228
  ]
@@ -303,39 +343,84 @@ const SettingUIV2 = [
303
343
  id: 'textColorHover',
304
344
  state: 'hover'
305
345
  }
306
- },
307
- {
308
- label: {
309
- en: 'Border'
310
- },
311
- setting: {
312
- id: 'borderBtnV2',
313
- state: 'hover'
314
- }
315
- },
316
- {
317
- label: {
318
- en: 'Corner'
319
- },
320
- setting: {
321
- id: 'roundedBtnV2',
322
- state: 'hover'
323
- }
324
- },
325
- {
326
- label: {
327
- en: 'Shadow'
346
+ }
347
+ ],
348
+ moreSettings: {
349
+ type: 'collapse',
350
+ controls: [
351
+ {
352
+ label: {
353
+ en: 'Border'
354
+ },
355
+ setting: {
356
+ id: 'borderBtnV2',
357
+ state: 'hover'
358
+ }
328
359
  },
329
- setting: {
330
- id: 'boxShadowBtnV2',
331
- state: 'hover'
360
+ {
361
+ label: {
362
+ en: 'Corner'
363
+ },
364
+ setting: {
365
+ id: 'roundedBtnV2',
366
+ state: 'hover'
367
+ }
332
368
  },
333
- controlConfig: {
334
- id: 'boxShadowBtnV2',
335
- type: 'shadow-v2'
369
+ {
370
+ label: {
371
+ en: 'Shadow'
372
+ },
373
+ setting: {
374
+ id: 'boxShadowBtnV2',
375
+ state: 'hover'
376
+ },
377
+ options: {
378
+ updateFields: [
379
+ {
380
+ field: 'enable',
381
+ settingId: 'hasBoxShadowBtn',
382
+ state: 'hover'
383
+ }
384
+ ]
385
+ },
386
+ controlChangeTrigger: {
387
+ settings: [
388
+ {
389
+ condition: `boxShadowBtnV2.hover.enable === true`,
390
+ source: [
391
+ 'boxShadowBtnV2',
392
+ 'hasBoxShadowBtn'
393
+ ],
394
+ action: {
395
+ controlId: 'hasBoxShadowBtn',
396
+ groupType: 'advanced',
397
+ controlType: 'advanced',
398
+ state: 'hover',
399
+ newValue: true
400
+ }
401
+ },
402
+ {
403
+ condition: `boxShadowBtnV2.hover.enable === false`,
404
+ source: [
405
+ 'boxShadowBtnV2',
406
+ 'hasBoxShadowBtn'
407
+ ],
408
+ action: {
409
+ controlId: 'hasBoxShadowBtn',
410
+ groupType: 'advanced',
411
+ controlType: 'advanced',
412
+ state: 'hover',
413
+ newValue: false
414
+ }
415
+ }
416
+ ],
417
+ options: {
418
+ noRecordHistory: true
419
+ }
420
+ }
336
421
  }
337
- }
338
- ]
422
+ ]
423
+ }
339
424
  },
340
425
  // {
341
426
  // label: {