@gem-sdk/components 2.0.0-dev.703 → 2.0.0-dev.704
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.
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +86 -134
- package/dist/cjs/button/components/common/helpers.js +2 -9
- package/dist/cjs/button/components/common/styles.js +14 -81
- package/dist/cjs/button/setting/configs/settings.js +85 -133
- package/dist/cjs/coupon/common/classes.js +3 -12
- package/dist/cjs/coupon/common/styles.js +7 -17
- package/dist/cjs/coupon/setting/config/settings.js +60 -100
- package/dist/cjs/form/setting/submit-button/configs/settings.js +103 -250
- package/dist/cjs/product/components/DynamicCheckout/common/styles.js +12 -12
- package/dist/cjs/product/components/ProductButton/common/styles.js +4 -14
- package/dist/cjs/product/components/ProductImagesV2/common/common.js +1 -1
- package/dist/cjs/product/setting/dynamic-checkout/configs/settings.js +86 -134
- package/dist/cjs/product/setting/product-button/configs/settings.js +142 -222
- package/dist/cjs/product/setting/product-view-more/configs/settings.js +100 -148
- package/dist/cjs/third-party/setting/Selleasy/index.js +5 -5
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +86 -134
- package/dist/esm/button/components/common/helpers.js +2 -9
- package/dist/esm/button/components/common/styles.js +16 -81
- package/dist/esm/button/setting/configs/settings.js +85 -133
- package/dist/esm/coupon/common/classes.js +3 -12
- package/dist/esm/coupon/common/styles.js +7 -17
- package/dist/esm/coupon/setting/config/settings.js +60 -100
- package/dist/esm/form/setting/submit-button/configs/settings.js +103 -250
- package/dist/esm/product/components/DynamicCheckout/common/styles.js +12 -12
- package/dist/esm/product/components/ProductButton/common/styles.js +4 -14
- package/dist/esm/product/components/ProductImagesV2/common/common.js +1 -1
- package/dist/esm/product/setting/dynamic-checkout/configs/settings.js +86 -134
- package/dist/esm/product/setting/product-button/configs/settings.js +142 -222
- package/dist/esm/product/setting/product-view-more/configs/settings.js +100 -148
- package/dist/esm/third-party/setting/Selleasy/index.js +5 -5
- package/dist/types/index.d.ts +23 -23
- package/package.json +2 -2
|
@@ -267,65 +267,49 @@ const ArticleReadMoreSettings = [
|
|
|
267
267
|
{
|
|
268
268
|
id: 'borderBtnV2',
|
|
269
269
|
type: 'border-v2',
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
color: '#121212',
|
|
287
|
-
isCustom: true
|
|
288
|
-
}
|
|
289
|
-
}
|
|
270
|
+
default: {
|
|
271
|
+
normal: {
|
|
272
|
+
borderType: 'none',
|
|
273
|
+
border: 'none',
|
|
274
|
+
borderWidth: '1px',
|
|
275
|
+
width: '1px 1px 1px 1px',
|
|
276
|
+
color: '#121212',
|
|
277
|
+
isCustom: true
|
|
278
|
+
},
|
|
279
|
+
hover: {
|
|
280
|
+
borderType: 'none',
|
|
281
|
+
border: 'none',
|
|
282
|
+
borderWidth: '1px',
|
|
283
|
+
width: '1px 1px 1px 1px',
|
|
284
|
+
color: '#121212',
|
|
285
|
+
isCustom: true
|
|
290
286
|
}
|
|
291
287
|
},
|
|
292
288
|
compoDefaultValue: {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
width: '1px',
|
|
305
|
-
borderWidth: '1px'
|
|
306
|
-
}
|
|
307
|
-
}
|
|
289
|
+
normal: {
|
|
290
|
+
border: 'solid',
|
|
291
|
+
color: '#121212',
|
|
292
|
+
width: '1px',
|
|
293
|
+
borderWidth: '1px'
|
|
294
|
+
},
|
|
295
|
+
hover: {
|
|
296
|
+
border: 'solid',
|
|
297
|
+
color: '#121212',
|
|
298
|
+
width: '1px',
|
|
299
|
+
borderWidth: '1px'
|
|
308
300
|
}
|
|
309
301
|
}
|
|
310
302
|
},
|
|
311
303
|
{
|
|
312
304
|
id: 'backgroundColorV2',
|
|
313
305
|
type: 'color-picker-v2',
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
normal: 'brand',
|
|
318
|
-
hover: 'highlight'
|
|
319
|
-
}
|
|
320
|
-
}
|
|
306
|
+
default: {
|
|
307
|
+
normal: 'brand',
|
|
308
|
+
hover: 'highlight'
|
|
321
309
|
},
|
|
322
310
|
compoDefaultValue: {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
normal: 'brand',
|
|
326
|
-
hover: 'highlight'
|
|
327
|
-
}
|
|
328
|
-
}
|
|
311
|
+
normal: 'brand',
|
|
312
|
+
hover: 'highlight'
|
|
329
313
|
}
|
|
330
314
|
},
|
|
331
315
|
{
|
|
@@ -344,31 +328,23 @@ const ArticleReadMoreSettings = [
|
|
|
344
328
|
{
|
|
345
329
|
id: 'backgroundImage',
|
|
346
330
|
type: 'background-image',
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
normal: {},
|
|
351
|
-
hover: {}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
331
|
+
default: {
|
|
332
|
+
normal: {},
|
|
333
|
+
hover: {}
|
|
354
334
|
},
|
|
355
335
|
compoDefaultValue: {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
width: 1200,
|
|
369
|
-
height: 480
|
|
370
|
-
}
|
|
371
|
-
}
|
|
336
|
+
normal: {
|
|
337
|
+
image: {
|
|
338
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
339
|
+
width: 1200,
|
|
340
|
+
height: 480
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
hover: {
|
|
344
|
+
image: {
|
|
345
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
346
|
+
width: 1200,
|
|
347
|
+
height: 480
|
|
372
348
|
}
|
|
373
349
|
}
|
|
374
350
|
}
|
|
@@ -389,19 +365,11 @@ const ArticleReadMoreSettings = [
|
|
|
389
365
|
{
|
|
390
366
|
id: 'textColorHover',
|
|
391
367
|
type: 'color-picker-v2',
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
default: {
|
|
395
|
-
hover: 'text-3'
|
|
396
|
-
}
|
|
397
|
-
}
|
|
368
|
+
default: {
|
|
369
|
+
hover: 'text-3'
|
|
398
370
|
},
|
|
399
371
|
compoDefaultValue: {
|
|
400
|
-
|
|
401
|
-
default: {
|
|
402
|
-
hover: 'text-3'
|
|
403
|
-
}
|
|
404
|
-
}
|
|
372
|
+
hover: 'text-3'
|
|
405
373
|
},
|
|
406
374
|
enableGradient: true
|
|
407
375
|
},
|
|
@@ -422,69 +390,53 @@ const ArticleReadMoreSettings = [
|
|
|
422
390
|
{
|
|
423
391
|
id: 'roundedBtnV2',
|
|
424
392
|
type: 'corner-v2',
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
btlr: '0px',
|
|
440
|
-
radiusType: 'none'
|
|
441
|
-
}
|
|
442
|
-
}
|
|
393
|
+
default: {
|
|
394
|
+
normal: {
|
|
395
|
+
btrr: '0px',
|
|
396
|
+
bblr: '0px',
|
|
397
|
+
bbrr: '0px',
|
|
398
|
+
btlr: '0px',
|
|
399
|
+
radiusType: 'none'
|
|
400
|
+
},
|
|
401
|
+
hover: {
|
|
402
|
+
btrr: '0px',
|
|
403
|
+
bblr: '0px',
|
|
404
|
+
bbrr: '0px',
|
|
405
|
+
btlr: '0px',
|
|
406
|
+
radiusType: 'none'
|
|
443
407
|
}
|
|
444
408
|
},
|
|
445
409
|
compoDefaultValue: {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
btlr: '8px',
|
|
460
|
-
radiusType: 'rounded'
|
|
461
|
-
}
|
|
462
|
-
}
|
|
410
|
+
normal: {
|
|
411
|
+
btrr: '8px',
|
|
412
|
+
bblr: '8px',
|
|
413
|
+
bbrr: '8px',
|
|
414
|
+
btlr: '8px',
|
|
415
|
+
radiusType: 'rounded'
|
|
416
|
+
},
|
|
417
|
+
hover: {
|
|
418
|
+
btrr: '8px',
|
|
419
|
+
bblr: '8px',
|
|
420
|
+
bbrr: '8px',
|
|
421
|
+
btlr: '8px',
|
|
422
|
+
radiusType: 'rounded'
|
|
463
423
|
}
|
|
464
424
|
}
|
|
465
425
|
},
|
|
466
426
|
{
|
|
467
427
|
id: 'boxShadowBtnV2',
|
|
468
428
|
type: 'shadow-v2',
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
default: {
|
|
472
|
-
normal: {}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
429
|
+
default: {
|
|
430
|
+
normal: {}
|
|
475
431
|
},
|
|
476
432
|
compoDefaultValue: {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
color: 'rgba(18, 18, 18, 0.2)',
|
|
485
|
-
angle: 45
|
|
486
|
-
}
|
|
487
|
-
}
|
|
433
|
+
normal: {
|
|
434
|
+
type: 'shadow-2',
|
|
435
|
+
distance: '12px',
|
|
436
|
+
blur: '12px',
|
|
437
|
+
spread: '0px',
|
|
438
|
+
color: 'rgba(18, 18, 18, 0.2)',
|
|
439
|
+
angle: 45
|
|
488
440
|
}
|
|
489
441
|
}
|
|
490
442
|
}
|
|
@@ -14,15 +14,8 @@ const getCleanedStyles = (styles, disabled)=>{
|
|
|
14
14
|
'hover',
|
|
15
15
|
'focus'
|
|
16
16
|
];
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'mobile',
|
|
20
|
-
'desktop'
|
|
21
|
-
];
|
|
22
|
-
devices.forEach((device)=>{
|
|
23
|
-
states.forEach((state)=>{
|
|
24
|
-
delete cleanedStyles?.backgroundColorV2?.[device]?.[state];
|
|
25
|
-
});
|
|
17
|
+
states.forEach((state)=>{
|
|
18
|
+
delete cleanedStyles?.backgroundColorV2?.[state];
|
|
26
19
|
});
|
|
27
20
|
return cleanedStyles;
|
|
28
21
|
};
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@gem-sdk/core');
|
|
4
4
|
|
|
5
|
-
const MEDIA_QUERIES = {
|
|
6
|
-
TABLET: '@media only screen and (max-width: 1024px) and (min-width: 768px)',
|
|
7
|
-
MOBILE: '@media only screen and (max-width: 767px)'
|
|
8
|
-
};
|
|
9
5
|
const getButtonWrapperStyles = (style, styles)=>({
|
|
10
6
|
...style,
|
|
11
7
|
...core.makeStyleResponsive('ta', styles?.align)
|
|
@@ -32,9 +28,7 @@ const isEnableShadowStateForDevice = (deviceStyles)=>({
|
|
|
32
28
|
const getShadowStyles = (styles)=>{
|
|
33
29
|
const { boxShadowBtnV2 } = styles || {};
|
|
34
30
|
return {
|
|
35
|
-
...core.getStyleShadowState(boxShadowBtnV2
|
|
36
|
-
...core.getStyleShadowState(boxShadowBtnV2?.tablet, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2?.tablet), 'tablet'),
|
|
37
|
-
...core.getStyleShadowState(boxShadowBtnV2?.mobile, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2?.mobile), 'mobile')
|
|
31
|
+
...core.getStyleShadowState(boxShadowBtnV2, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2))
|
|
38
32
|
};
|
|
39
33
|
};
|
|
40
34
|
const getRadiusStyles = (styles)=>core.composeRadius(styles?.roundedBtnV2);
|
|
@@ -63,7 +57,7 @@ const getTypographyStyles = (styles)=>{
|
|
|
63
57
|
delete otherProps['--c'];
|
|
64
58
|
return {
|
|
65
59
|
textColorStyle: {
|
|
66
|
-
...core.
|
|
60
|
+
...core.makeStyleState('c', styles?.textColorHover),
|
|
67
61
|
...colorObj
|
|
68
62
|
},
|
|
69
63
|
withoutTextColorStyles: otherProps
|
|
@@ -79,90 +73,31 @@ const getTypoStyles = (styles)=>{
|
|
|
79
73
|
})
|
|
80
74
|
};
|
|
81
75
|
};
|
|
82
|
-
/**
|
|
83
|
-
* Process hover color for a single device
|
|
84
|
-
*/ const processDeviceHoverColor = (deviceStyle)=>{
|
|
85
|
-
if (!deviceStyle?.hover) return deviceStyle;
|
|
86
|
-
return {
|
|
87
|
-
...deviceStyle,
|
|
88
|
-
hover: core.getSingleColorVariable(deviceStyle.hover)
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Process hover colors for all responsive devices
|
|
93
|
-
*/ const processResponsiveHoverColors = (responsiveStyle)=>{
|
|
94
|
-
if (!responsiveStyle) return {};
|
|
95
|
-
const devices = [
|
|
96
|
-
'desktop',
|
|
97
|
-
'tablet',
|
|
98
|
-
'mobile'
|
|
99
|
-
];
|
|
100
|
-
return devices.reduce((acc, device)=>{
|
|
101
|
-
const processedStyle = processDeviceHoverColor(responsiveStyle[device]);
|
|
102
|
-
if (processedStyle) {
|
|
103
|
-
acc[device] = processedStyle;
|
|
104
|
-
}
|
|
105
|
-
return acc;
|
|
106
|
-
}, {});
|
|
107
|
-
};
|
|
108
76
|
const getBackgroundStyles = (styles)=>{
|
|
109
77
|
return {
|
|
110
|
-
...core.
|
|
111
|
-
...core.
|
|
78
|
+
...core.getStyleBackgroundImage(styles?.backgroundImage),
|
|
79
|
+
...core.getGlobalColorStateStyle('bg', styles?.backgroundColorV2)
|
|
112
80
|
};
|
|
113
81
|
};
|
|
114
82
|
const getCustomCssStyles = ({ styles, uid, builderAttrs })=>{
|
|
115
83
|
if (!uid) return '';
|
|
116
84
|
const { borderBtnV2, roundedBtnV2 } = styles ?? {};
|
|
117
|
-
const borderCornerStyles = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
builderAttrs
|
|
124
|
-
}),
|
|
125
|
-
tablet: generateBorderCornerStyles({
|
|
126
|
-
uid,
|
|
127
|
-
device: 'tablet',
|
|
128
|
-
borderBtn: borderBtnV2,
|
|
129
|
-
roundedBtn: roundedBtnV2,
|
|
130
|
-
builderAttrs
|
|
131
|
-
}),
|
|
132
|
-
mobile: generateBorderCornerStyles({
|
|
133
|
-
uid,
|
|
134
|
-
device: 'mobile',
|
|
135
|
-
borderBtn: borderBtnV2,
|
|
136
|
-
roundedBtn: roundedBtnV2,
|
|
137
|
-
builderAttrs
|
|
138
|
-
})
|
|
139
|
-
};
|
|
85
|
+
const borderCornerStyles = generateBorderCornerStyles({
|
|
86
|
+
uid,
|
|
87
|
+
borderBtn: borderBtnV2,
|
|
88
|
+
roundedBtn: roundedBtnV2,
|
|
89
|
+
builderAttrs
|
|
90
|
+
});
|
|
140
91
|
return `
|
|
141
|
-
${borderCornerStyles.
|
|
142
|
-
${borderCornerStyles.
|
|
143
|
-
|
|
144
|
-
${MEDIA_QUERIES.TABLET} {
|
|
145
|
-
${borderCornerStyles.tablet.normalStyles}
|
|
146
|
-
${borderCornerStyles.tablet.hoverStyles}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
${MEDIA_QUERIES.MOBILE} {
|
|
150
|
-
${borderCornerStyles.mobile.normalStyles}
|
|
151
|
-
${borderCornerStyles.mobile.hoverStyles}
|
|
152
|
-
}
|
|
92
|
+
${borderCornerStyles.normalStyles}
|
|
93
|
+
${borderCornerStyles.hoverStyles}
|
|
153
94
|
`.trim();
|
|
154
95
|
};
|
|
155
|
-
const generateBorderCornerStyles = ({ uid,
|
|
96
|
+
const generateBorderCornerStyles = ({ uid, borderBtn, roundedBtn, builderAttrs })=>{
|
|
156
97
|
const tag = builderAttrs?.['data-component-tag'];
|
|
157
98
|
const getResponsiveStyles = ({ styleObj, state })=>{
|
|
158
99
|
if (!styleObj) return undefined;
|
|
159
|
-
|
|
160
|
-
return styleObj.mobile?.[state] || styleObj.tablet?.[state] || styleObj.desktop?.[state];
|
|
161
|
-
}
|
|
162
|
-
if (device === 'tablet') {
|
|
163
|
-
return styleObj.tablet?.[state] || styleObj.desktop?.[state];
|
|
164
|
-
}
|
|
165
|
-
return styleObj.desktop?.[state];
|
|
100
|
+
return styleObj?.[state];
|
|
166
101
|
};
|
|
167
102
|
const normalBorder = getResponsiveStyles({
|
|
168
103
|
styleObj: borderBtn,
|
|
@@ -223,5 +158,3 @@ exports.getCustomCssStyles = getCustomCssStyles;
|
|
|
223
158
|
exports.getRadiusStyles = getRadiusStyles;
|
|
224
159
|
exports.getShadowStyles = getShadowStyles;
|
|
225
160
|
exports.getTypoStyles = getTypoStyles;
|
|
226
|
-
exports.processDeviceHoverColor = processDeviceHoverColor;
|
|
227
|
-
exports.processResponsiveHoverColors = processResponsiveHoverColors;
|