@gem-sdk/components 2.0.0-dev.500 → 2.0.0-dev.502
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/carousel/root/common/getStyle.js +3 -3
- package/dist/cjs/carousel/setting/configs/settingV2.js +7 -7
- package/dist/cjs/image/components/AdaptiveImage.js +2 -1
- package/dist/cjs/product/components/ProductList/common/getStyle.js +3 -3
- package/dist/cjs/product/components/ProductList/common/index.js +2 -0
- package/dist/cjs/product/components/ProductQuantity/common/getClasses.js +1 -1
- package/dist/cjs/product/setting/product-price/configs/uiV2.js +4 -0
- package/dist/cjs/product/setting/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/product/setting/product-quantity/configs/uiV2.js +4 -2
- package/dist/cjs/product/setting/product-sku/configs/uiV2.js +4 -0
- package/dist/cjs/product/setting/product-title/configs/uiV2.js +9 -5
- package/dist/cjs/product/setting/product-vendor/configs/uiV2.js +4 -0
- package/dist/cjs/tab/components/Tabs.js +4 -0
- package/dist/cjs/tab/components/common/getClasses.js +1 -1
- package/dist/cjs/tab/components/common/getStyle.js +9 -0
- package/dist/cjs/tab/setting/configs/settings.js +54 -0
- package/dist/cjs/tab/setting/configs/uiV2.js +59 -0
- package/dist/esm/carousel/root/common/getStyle.js +4 -4
- package/dist/esm/carousel/setting/configs/settingV2.js +7 -7
- package/dist/esm/image/components/AdaptiveImage.js +2 -1
- package/dist/esm/product/components/ProductList/common/getStyle.js +4 -4
- package/dist/esm/product/components/ProductList/common/index.js +2 -0
- package/dist/esm/product/components/ProductQuantity/common/getClasses.js +1 -1
- package/dist/esm/product/setting/product-price/configs/uiV2.js +4 -0
- package/dist/esm/product/setting/product-quantity/configs/settings.js +1 -1
- package/dist/esm/product/setting/product-quantity/configs/uiV2.js +4 -2
- package/dist/esm/product/setting/product-sku/configs/uiV2.js +4 -0
- package/dist/esm/product/setting/product-title/configs/uiV2.js +9 -5
- package/dist/esm/product/setting/product-vendor/configs/uiV2.js +4 -0
- package/dist/esm/tab/components/Tabs.js +5 -1
- package/dist/esm/tab/components/common/getClasses.js +1 -1
- package/dist/esm/tab/components/common/getStyle.js +10 -2
- package/dist/esm/tab/setting/configs/settings.js +54 -0
- package/dist/esm/tab/setting/configs/uiV2.js +59 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +2 -2
|
@@ -34,9 +34,9 @@ const getStyle = (props)=>{
|
|
|
34
34
|
...style,
|
|
35
35
|
...styleHeight,
|
|
36
36
|
...styleWidth,
|
|
37
|
-
...core.
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
...core.getBgByDevice({
|
|
38
|
+
backgroundColor: styles?.backgroundColor,
|
|
39
|
+
backgroundImage: styles?.backgroundImage
|
|
40
40
|
})
|
|
41
41
|
});
|
|
42
42
|
const wrapperInnerStyle = system.createStyle({
|
|
@@ -425,15 +425,15 @@ const CarouselSettingsV2Setting = [
|
|
|
425
425
|
label: 'Direction',
|
|
426
426
|
type: 'option:value',
|
|
427
427
|
options: [
|
|
428
|
-
{
|
|
429
|
-
value: true,
|
|
430
|
-
label: 'Left to right',
|
|
431
|
-
iconName: 'polaris-arrow-right'
|
|
432
|
-
},
|
|
433
428
|
{
|
|
434
429
|
value: false,
|
|
435
430
|
iconName: 'polaris-arrow-left',
|
|
436
431
|
label: 'Right to left'
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
value: true,
|
|
435
|
+
label: 'Left to right',
|
|
436
|
+
iconName: 'polaris-arrow-right'
|
|
437
437
|
}
|
|
438
438
|
],
|
|
439
439
|
default: false
|
|
@@ -476,7 +476,7 @@ const CarouselSettingsV2Setting = [
|
|
|
476
476
|
type: 'toggle',
|
|
477
477
|
devices: {
|
|
478
478
|
desktop: {
|
|
479
|
-
default:
|
|
479
|
+
default: true
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
},
|
|
@@ -486,7 +486,7 @@ const CarouselSettingsV2Setting = [
|
|
|
486
486
|
type: 'toggle',
|
|
487
487
|
devices: {
|
|
488
488
|
desktop: {
|
|
489
|
-
default:
|
|
489
|
+
default: true
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
},
|
|
@@ -56,7 +56,8 @@ const AdaptiveImage = (props)=>{
|
|
|
56
56
|
...loadingAttrs,
|
|
57
57
|
alt: alt,
|
|
58
58
|
style: adaptiveImageStyles,
|
|
59
|
-
className: adaptiveImageClasses
|
|
59
|
+
className: adaptiveImageClasses,
|
|
60
|
+
draggable: "false"
|
|
60
61
|
});
|
|
61
62
|
};
|
|
62
63
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -11,9 +11,9 @@ const getStyle = (props)=>{
|
|
|
11
11
|
const itemPadding = core.makeGlobalSize(styles?.itemPadding);
|
|
12
12
|
const productListStyle = system.createStyle({
|
|
13
13
|
...style,
|
|
14
|
-
...core.
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
...core.getBgByDevice({
|
|
15
|
+
backgroundColor: styles?.backgroundColor,
|
|
16
|
+
backgroundImage: styles?.backgroundImage
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
const productListWrapStyle = system.createStyle({
|
|
@@ -30,7 +30,7 @@ const getButtonClass = ({ borderBtn, buttonBackgroundColor, iconColor, buttonSid
|
|
|
30
30
|
};
|
|
31
31
|
const getContainerClasses = (advanceClass)=>{
|
|
32
32
|
return {
|
|
33
|
-
...core.composeClasses(`gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${advanceClass ?? ''}`)
|
|
33
|
+
...core.composeClasses(`wc_quantity_selector gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${advanceClass ?? ''}`)
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
const getWrapperClasses = ()=>{
|
|
@@ -151,7 +151,7 @@ const SettingUIV2 = [
|
|
|
151
151
|
controlChangeTrigger: {
|
|
152
152
|
settings: [
|
|
153
153
|
{
|
|
154
|
-
condition: 'hasButton',
|
|
154
|
+
condition: 'hasButton === true',
|
|
155
155
|
source: [
|
|
156
156
|
'hasButton'
|
|
157
157
|
],
|
|
@@ -347,7 +347,7 @@ const SettingUIV2 = [
|
|
|
347
347
|
},
|
|
348
348
|
type: 'combo',
|
|
349
349
|
isHideClear: true,
|
|
350
|
-
conditionDisplay: 'hasButton',
|
|
350
|
+
conditionDisplay: 'hasButton === true',
|
|
351
351
|
comboType: 'color',
|
|
352
352
|
getValueFromSettingID: 'dividerColor.normal',
|
|
353
353
|
controls: [
|
|
@@ -409,6 +409,8 @@ const SettingUIV2 = [
|
|
|
409
409
|
},
|
|
410
410
|
type: 'combo',
|
|
411
411
|
iconName: 'polaris-edit',
|
|
412
|
+
getValueFromSettingID: 'dividerColor.hover',
|
|
413
|
+
comboType: 'color',
|
|
412
414
|
isHideClear: true,
|
|
413
415
|
controls: [
|
|
414
416
|
{
|
|
@@ -18,6 +18,10 @@ const SettingUIV2 = [
|
|
|
18
18
|
field: 'attrs.color',
|
|
19
19
|
settingId: 'color',
|
|
20
20
|
state: 'normal'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
field: 'attrs.textAlign',
|
|
24
|
+
settingId: 'textAlign'
|
|
21
25
|
}
|
|
22
26
|
]
|
|
23
27
|
},
|
|
@@ -82,21 +86,21 @@ const SettingUIV2 = [
|
|
|
82
86
|
]
|
|
83
87
|
},
|
|
84
88
|
{
|
|
89
|
+
label: {
|
|
90
|
+
en: 'Display option'
|
|
91
|
+
},
|
|
85
92
|
controls: [
|
|
86
93
|
{
|
|
87
94
|
label: {
|
|
88
|
-
en: 'Max
|
|
95
|
+
en: 'Max line'
|
|
89
96
|
},
|
|
90
97
|
setting: {
|
|
91
98
|
id: 'hasLineClamp'
|
|
92
|
-
},
|
|
93
|
-
options: {
|
|
94
|
-
labelVariant: 'primary'
|
|
95
99
|
}
|
|
96
100
|
},
|
|
97
101
|
{
|
|
98
102
|
label: {
|
|
99
|
-
en: '
|
|
103
|
+
en: 'Number of lines'
|
|
100
104
|
},
|
|
101
105
|
setting: {
|
|
102
106
|
id: 'lineClamp'
|
|
@@ -34,6 +34,9 @@ const Tabs = (props)=>{
|
|
|
34
34
|
const wrapperStyle = system.createStyle({
|
|
35
35
|
...getStyle.getStyleWrapper(setting, style)
|
|
36
36
|
});
|
|
37
|
+
const containStyle = system.createStyle({
|
|
38
|
+
...getStyle.getContainStyle(setting)
|
|
39
|
+
});
|
|
37
40
|
const wrapperClasses = system.createClass({
|
|
38
41
|
...getClasses.getClassesWrapper({
|
|
39
42
|
builderProps,
|
|
@@ -150,6 +153,7 @@ const Tabs = (props)=>{
|
|
|
150
153
|
}),
|
|
151
154
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
152
155
|
className: containClasses,
|
|
156
|
+
style: containStyle,
|
|
153
157
|
children: [
|
|
154
158
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
155
159
|
className: tabParentListClasses,
|
|
@@ -13,7 +13,7 @@ const getClassesWrapper = ({ builderProps, advancedCssClass })=>{
|
|
|
13
13
|
};
|
|
14
14
|
const getContainClasses = ({ setting })=>{
|
|
15
15
|
const { position } = setting ?? {};
|
|
16
|
-
let classList = 'gp-flex
|
|
16
|
+
let classList = 'gp-flex ';
|
|
17
17
|
if (common.getWrapClassByPositionResponsive(position)) classList += ` ${common.getWrapClassByPositionResponsive(position)}`;
|
|
18
18
|
return {
|
|
19
19
|
...core.composeClasses(classList)
|
|
@@ -17,6 +17,14 @@ const getStyleWrapper = (setting, style)=>{
|
|
|
17
17
|
};
|
|
18
18
|
return helpers.filterTruthyStyles(composeStyles);
|
|
19
19
|
};
|
|
20
|
+
const getContainStyle = (setting)=>{
|
|
21
|
+
const { containWidth, align } = setting ?? {};
|
|
22
|
+
const composeStyles = {
|
|
23
|
+
...core.makeStyleResponsive('js', align),
|
|
24
|
+
...core.makeStyleResponsive('w', core.makeWidth(containWidth))
|
|
25
|
+
};
|
|
26
|
+
return helpers.filterTruthyStyles(composeStyles);
|
|
27
|
+
};
|
|
20
28
|
const getTabListStyle = (setting)=>{
|
|
21
29
|
const { position, panelFullWidth, panelWidth, labelWidth } = setting ?? {};
|
|
22
30
|
const composeStyles = {
|
|
@@ -90,6 +98,7 @@ const getTabItemStyle = (style)=>{
|
|
|
90
98
|
};
|
|
91
99
|
|
|
92
100
|
exports.getContainContentStyle = getContainContentStyle;
|
|
101
|
+
exports.getContainStyle = getContainStyle;
|
|
93
102
|
exports.getItemStyle = getItemStyle;
|
|
94
103
|
exports.getStyleWrapper = getStyleWrapper;
|
|
95
104
|
exports.getTabItemStyle = getTabItemStyle;
|
|
@@ -149,6 +149,13 @@ const TabsSettings = [
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
+
{
|
|
153
|
+
id: 'padding',
|
|
154
|
+
type: 'padding-v2',
|
|
155
|
+
devices: {
|
|
156
|
+
desktop: {}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
152
159
|
{
|
|
153
160
|
id: 'labelAlign',
|
|
154
161
|
type: 'option:value',
|
|
@@ -246,6 +253,20 @@ const TabsSettings = [
|
|
|
246
253
|
}
|
|
247
254
|
]
|
|
248
255
|
},
|
|
256
|
+
{
|
|
257
|
+
id: 'containWidth',
|
|
258
|
+
type: 'input:unit',
|
|
259
|
+
placeholder: 'Auto',
|
|
260
|
+
units: [
|
|
261
|
+
'px',
|
|
262
|
+
'%'
|
|
263
|
+
],
|
|
264
|
+
devices: {
|
|
265
|
+
desktop: {
|
|
266
|
+
default: '1200px'
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
249
270
|
{
|
|
250
271
|
id: 'background',
|
|
251
272
|
type: 'background-media',
|
|
@@ -290,6 +311,39 @@ const TabsSettings = [
|
|
|
290
311
|
}
|
|
291
312
|
}
|
|
292
313
|
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: 'align',
|
|
317
|
+
label: 'Align',
|
|
318
|
+
type: 'option:value',
|
|
319
|
+
options: [
|
|
320
|
+
{
|
|
321
|
+
label: 'Left',
|
|
322
|
+
value: 'left',
|
|
323
|
+
type: 'align',
|
|
324
|
+
tooltip: 'Align left',
|
|
325
|
+
iconName: 'gp-align-left'
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
label: 'Center',
|
|
329
|
+
value: 'center',
|
|
330
|
+
type: 'align',
|
|
331
|
+
tooltip: 'Align center',
|
|
332
|
+
iconName: 'gp-align-center'
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
label: 'Right',
|
|
336
|
+
value: 'right',
|
|
337
|
+
type: 'align',
|
|
338
|
+
tooltip: 'Align right',
|
|
339
|
+
iconName: 'gp-align-right'
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
devices: {
|
|
343
|
+
desktop: {
|
|
344
|
+
default: 'left'
|
|
345
|
+
}
|
|
346
|
+
}
|
|
293
347
|
}
|
|
294
348
|
]
|
|
295
349
|
}
|
|
@@ -233,6 +233,47 @@ const SettingUIV2 = [
|
|
|
233
233
|
]
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
|
+
{
|
|
237
|
+
label: {
|
|
238
|
+
en: 'Size'
|
|
239
|
+
},
|
|
240
|
+
controls: [
|
|
241
|
+
{
|
|
242
|
+
id: 'containWidth',
|
|
243
|
+
label: {
|
|
244
|
+
en: 'Width'
|
|
245
|
+
},
|
|
246
|
+
controlConfig: {
|
|
247
|
+
id: 'containWidth',
|
|
248
|
+
type: 'dropdown:input',
|
|
249
|
+
label: 'Width',
|
|
250
|
+
inputType: 'number',
|
|
251
|
+
units: [
|
|
252
|
+
'px',
|
|
253
|
+
'%'
|
|
254
|
+
],
|
|
255
|
+
hideUnit: false,
|
|
256
|
+
linkWithSetting: {
|
|
257
|
+
name: 'containWidth'
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
layout: 'horizontal'
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: {
|
|
264
|
+
en: 'Padding'
|
|
265
|
+
},
|
|
266
|
+
controlConfig: {
|
|
267
|
+
id: 'padding',
|
|
268
|
+
type: 'padding-v2',
|
|
269
|
+
linkWithSetting: {
|
|
270
|
+
name: 'spacing-setting',
|
|
271
|
+
field: 'padding'
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
},
|
|
236
277
|
{
|
|
237
278
|
label: {
|
|
238
279
|
en: 'Background'
|
|
@@ -338,6 +379,24 @@ const SettingUIV2 = [
|
|
|
338
379
|
}
|
|
339
380
|
}
|
|
340
381
|
]
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
controls: [
|
|
385
|
+
{
|
|
386
|
+
label: {
|
|
387
|
+
en: 'Align'
|
|
388
|
+
},
|
|
389
|
+
setting: {
|
|
390
|
+
id: 'align'
|
|
391
|
+
},
|
|
392
|
+
options: {
|
|
393
|
+
labelVariant: 'primary',
|
|
394
|
+
fullWidth: true,
|
|
395
|
+
disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
|
|
396
|
+
},
|
|
397
|
+
conditionEnable: '!(parseInt(containWidth) >= 100 && containWidth?.includes("%"))'
|
|
398
|
+
}
|
|
399
|
+
]
|
|
341
400
|
}
|
|
342
401
|
];
|
|
343
402
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeStyleResponsive, getHeightByShapeGlobalSize, makeStyleWithDefault, getWidthByShapeGlobalSize,
|
|
1
|
+
import { makeStyleResponsive, getHeightByShapeGlobalSize, makeStyleWithDefault, getWidthByShapeGlobalSize, getBgByDevice, makeContainerWidthOrHeight, getResponsiveValueByScreen } from '@gem-sdk/core';
|
|
2
2
|
import { createStyle } from '@gem-sdk/system';
|
|
3
3
|
|
|
4
4
|
const getStyle = (props)=>{
|
|
@@ -32,9 +32,9 @@ const getStyle = (props)=>{
|
|
|
32
32
|
...style,
|
|
33
33
|
...styleHeight,
|
|
34
34
|
...styleWidth,
|
|
35
|
-
...
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
...getBgByDevice({
|
|
36
|
+
backgroundColor: styles?.backgroundColor,
|
|
37
|
+
backgroundImage: styles?.backgroundImage
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
40
|
const wrapperInnerStyle = createStyle({
|
|
@@ -423,15 +423,15 @@ const CarouselSettingsV2Setting = [
|
|
|
423
423
|
label: 'Direction',
|
|
424
424
|
type: 'option:value',
|
|
425
425
|
options: [
|
|
426
|
-
{
|
|
427
|
-
value: true,
|
|
428
|
-
label: 'Left to right',
|
|
429
|
-
iconName: 'polaris-arrow-right'
|
|
430
|
-
},
|
|
431
426
|
{
|
|
432
427
|
value: false,
|
|
433
428
|
iconName: 'polaris-arrow-left',
|
|
434
429
|
label: 'Right to left'
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
value: true,
|
|
433
|
+
label: 'Left to right',
|
|
434
|
+
iconName: 'polaris-arrow-right'
|
|
435
435
|
}
|
|
436
436
|
],
|
|
437
437
|
default: false
|
|
@@ -474,7 +474,7 @@ const CarouselSettingsV2Setting = [
|
|
|
474
474
|
type: 'toggle',
|
|
475
475
|
devices: {
|
|
476
476
|
desktop: {
|
|
477
|
-
default:
|
|
477
|
+
default: true
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
},
|
|
@@ -484,7 +484,7 @@ const CarouselSettingsV2Setting = [
|
|
|
484
484
|
type: 'toggle',
|
|
485
485
|
devices: {
|
|
486
486
|
desktop: {
|
|
487
|
-
default:
|
|
487
|
+
default: true
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeGlobalSize,
|
|
1
|
+
import { makeGlobalSize, getBgByDevice, makeStyleResponsive, getResponsiveValueByScreen, makeStyle, getSingleColorVariable, getRadiusStyleActiveState, getStyleShadow, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
|
|
2
2
|
import { createStyle } from '@gem-sdk/system';
|
|
3
3
|
import { getInitialWidthForCarouselItem } from '../../../../carousel/components/common/carousel.js';
|
|
4
4
|
import { createStyleObject } from '../../../../grid/row/commons/helpers.js';
|
|
@@ -9,9 +9,9 @@ const getStyle = (props)=>{
|
|
|
9
9
|
const itemPadding = makeGlobalSize(styles?.itemPadding);
|
|
10
10
|
const productListStyle = createStyle({
|
|
11
11
|
...style,
|
|
12
|
-
...
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
...getBgByDevice({
|
|
13
|
+
backgroundColor: styles?.backgroundColor,
|
|
14
|
+
backgroundImage: styles?.backgroundImage
|
|
15
15
|
})
|
|
16
16
|
});
|
|
17
17
|
const productListWrapStyle = createStyle({
|
|
@@ -28,7 +28,7 @@ const getButtonClass = ({ borderBtn, buttonBackgroundColor, iconColor, buttonSid
|
|
|
28
28
|
};
|
|
29
29
|
const getContainerClasses = (advanceClass)=>{
|
|
30
30
|
return {
|
|
31
|
-
...composeClasses(`gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${advanceClass ?? ''}`)
|
|
31
|
+
...composeClasses(`wc_quantity_selector gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${advanceClass ?? ''}`)
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
const getWrapperClasses = ()=>{
|
|
@@ -149,7 +149,7 @@ const SettingUIV2 = [
|
|
|
149
149
|
controlChangeTrigger: {
|
|
150
150
|
settings: [
|
|
151
151
|
{
|
|
152
|
-
condition: 'hasButton',
|
|
152
|
+
condition: 'hasButton === true',
|
|
153
153
|
source: [
|
|
154
154
|
'hasButton'
|
|
155
155
|
],
|
|
@@ -345,7 +345,7 @@ const SettingUIV2 = [
|
|
|
345
345
|
},
|
|
346
346
|
type: 'combo',
|
|
347
347
|
isHideClear: true,
|
|
348
|
-
conditionDisplay: 'hasButton',
|
|
348
|
+
conditionDisplay: 'hasButton === true',
|
|
349
349
|
comboType: 'color',
|
|
350
350
|
getValueFromSettingID: 'dividerColor.normal',
|
|
351
351
|
controls: [
|
|
@@ -407,6 +407,8 @@ const SettingUIV2 = [
|
|
|
407
407
|
},
|
|
408
408
|
type: 'combo',
|
|
409
409
|
iconName: 'polaris-edit',
|
|
410
|
+
getValueFromSettingID: 'dividerColor.hover',
|
|
411
|
+
comboType: 'color',
|
|
410
412
|
isHideClear: true,
|
|
411
413
|
controls: [
|
|
412
414
|
{
|
|
@@ -16,6 +16,10 @@ const SettingUIV2 = [
|
|
|
16
16
|
field: 'attrs.color',
|
|
17
17
|
settingId: 'color',
|
|
18
18
|
state: 'normal'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
field: 'attrs.textAlign',
|
|
22
|
+
settingId: 'textAlign'
|
|
19
23
|
}
|
|
20
24
|
]
|
|
21
25
|
},
|
|
@@ -80,21 +84,21 @@ const SettingUIV2 = [
|
|
|
80
84
|
]
|
|
81
85
|
},
|
|
82
86
|
{
|
|
87
|
+
label: {
|
|
88
|
+
en: 'Display option'
|
|
89
|
+
},
|
|
83
90
|
controls: [
|
|
84
91
|
{
|
|
85
92
|
label: {
|
|
86
|
-
en: 'Max
|
|
93
|
+
en: 'Max line'
|
|
87
94
|
},
|
|
88
95
|
setting: {
|
|
89
96
|
id: 'hasLineClamp'
|
|
90
|
-
},
|
|
91
|
-
options: {
|
|
92
|
-
labelVariant: 'primary'
|
|
93
97
|
}
|
|
94
98
|
},
|
|
95
99
|
{
|
|
96
100
|
label: {
|
|
97
|
-
en: '
|
|
101
|
+
en: 'Number of lines'
|
|
98
102
|
},
|
|
99
103
|
setting: {
|
|
100
104
|
id: 'lineClamp'
|
|
@@ -7,7 +7,7 @@ import { makeDeviceFullWidthDefault } from './common/common.js';
|
|
|
7
7
|
import { createAttr, createStyle, createClass } from '@gem-sdk/system';
|
|
8
8
|
import { getAttr, getAttrContent } from './common/getAttr.js';
|
|
9
9
|
import Text from '../../text/components/Text.js';
|
|
10
|
-
import { getStyleWrapper, getTabParentListStyle, getTabListStyle, getContainContentStyle, getItemStyle } from './common/getStyle.js';
|
|
10
|
+
import { getStyleWrapper, getContainStyle, getTabParentListStyle, getTabListStyle, getContainContentStyle, getItemStyle } from './common/getStyle.js';
|
|
11
11
|
import { getClassesWrapper, getContainClasses, getStyleTagClasses, getTabParentListClasses, getTabListClasses, getWrapperContentClasses, getContainContentClasses, getTextClasses, getItemClasses } from './common/getClasses.js';
|
|
12
12
|
|
|
13
13
|
const Tabs = (props)=>{
|
|
@@ -30,6 +30,9 @@ const Tabs = (props)=>{
|
|
|
30
30
|
const wrapperStyle = createStyle({
|
|
31
31
|
...getStyleWrapper(setting, style)
|
|
32
32
|
});
|
|
33
|
+
const containStyle = createStyle({
|
|
34
|
+
...getContainStyle(setting)
|
|
35
|
+
});
|
|
33
36
|
const wrapperClasses = createClass({
|
|
34
37
|
...getClassesWrapper({
|
|
35
38
|
builderProps,
|
|
@@ -146,6 +149,7 @@ const Tabs = (props)=>{
|
|
|
146
149
|
}),
|
|
147
150
|
/*#__PURE__*/ jsxs("div", {
|
|
148
151
|
className: containClasses,
|
|
152
|
+
style: containStyle,
|
|
149
153
|
children: [
|
|
150
154
|
/*#__PURE__*/ jsx("div", {
|
|
151
155
|
className: tabParentListClasses,
|
|
@@ -11,7 +11,7 @@ const getClassesWrapper = ({ builderProps, advancedCssClass })=>{
|
|
|
11
11
|
};
|
|
12
12
|
const getContainClasses = ({ setting })=>{
|
|
13
13
|
const { position } = setting ?? {};
|
|
14
|
-
let classList = 'gp-flex
|
|
14
|
+
let classList = 'gp-flex ';
|
|
15
15
|
if (getWrapClassByPositionResponsive(position)) classList += ` ${getWrapClassByPositionResponsive(position)}`;
|
|
16
16
|
return {
|
|
17
17
|
...composeClasses(classList)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getStyleBackgroundByDevice, getGradientBgrStyleByDevice, makeStyleResponsive, makeStyle, getSingleColorVariable, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
|
|
1
|
+
import { getStyleBackgroundByDevice, getGradientBgrStyleByDevice, makeStyleResponsive, makeWidth, makeStyle, getSingleColorVariable, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
|
|
2
2
|
import { filterTruthyStyles } from '../../../helpers.js';
|
|
3
3
|
import { getStyleWidthByPositionResponsive, initialStyles } from './common.js';
|
|
4
4
|
|
|
@@ -15,6 +15,14 @@ const getStyleWrapper = (setting, style)=>{
|
|
|
15
15
|
};
|
|
16
16
|
return filterTruthyStyles(composeStyles);
|
|
17
17
|
};
|
|
18
|
+
const getContainStyle = (setting)=>{
|
|
19
|
+
const { containWidth, align } = setting ?? {};
|
|
20
|
+
const composeStyles = {
|
|
21
|
+
...makeStyleResponsive('js', align),
|
|
22
|
+
...makeStyleResponsive('w', makeWidth(containWidth))
|
|
23
|
+
};
|
|
24
|
+
return filterTruthyStyles(composeStyles);
|
|
25
|
+
};
|
|
18
26
|
const getTabListStyle = (setting)=>{
|
|
19
27
|
const { position, panelFullWidth, panelWidth, labelWidth } = setting ?? {};
|
|
20
28
|
const composeStyles = {
|
|
@@ -87,4 +95,4 @@ const getTabItemStyle = (style)=>{
|
|
|
87
95
|
return filterTruthyStyles(composeStyles);
|
|
88
96
|
};
|
|
89
97
|
|
|
90
|
-
export { getContainContentStyle, getItemStyle, getStyleWrapper, getTabItemStyle, getTabListStyle, getTabParentListStyle };
|
|
98
|
+
export { getContainContentStyle, getContainStyle, getItemStyle, getStyleWrapper, getTabItemStyle, getTabListStyle, getTabParentListStyle };
|
|
@@ -147,6 +147,13 @@ const TabsSettings = [
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
id: 'padding',
|
|
152
|
+
type: 'padding-v2',
|
|
153
|
+
devices: {
|
|
154
|
+
desktop: {}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
150
157
|
{
|
|
151
158
|
id: 'labelAlign',
|
|
152
159
|
type: 'option:value',
|
|
@@ -244,6 +251,20 @@ const TabsSettings = [
|
|
|
244
251
|
}
|
|
245
252
|
]
|
|
246
253
|
},
|
|
254
|
+
{
|
|
255
|
+
id: 'containWidth',
|
|
256
|
+
type: 'input:unit',
|
|
257
|
+
placeholder: 'Auto',
|
|
258
|
+
units: [
|
|
259
|
+
'px',
|
|
260
|
+
'%'
|
|
261
|
+
],
|
|
262
|
+
devices: {
|
|
263
|
+
desktop: {
|
|
264
|
+
default: '1200px'
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
247
268
|
{
|
|
248
269
|
id: 'background',
|
|
249
270
|
type: 'background-media',
|
|
@@ -288,6 +309,39 @@ const TabsSettings = [
|
|
|
288
309
|
}
|
|
289
310
|
}
|
|
290
311
|
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: 'align',
|
|
315
|
+
label: 'Align',
|
|
316
|
+
type: 'option:value',
|
|
317
|
+
options: [
|
|
318
|
+
{
|
|
319
|
+
label: 'Left',
|
|
320
|
+
value: 'left',
|
|
321
|
+
type: 'align',
|
|
322
|
+
tooltip: 'Align left',
|
|
323
|
+
iconName: 'gp-align-left'
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
label: 'Center',
|
|
327
|
+
value: 'center',
|
|
328
|
+
type: 'align',
|
|
329
|
+
tooltip: 'Align center',
|
|
330
|
+
iconName: 'gp-align-center'
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
label: 'Right',
|
|
334
|
+
value: 'right',
|
|
335
|
+
type: 'align',
|
|
336
|
+
tooltip: 'Align right',
|
|
337
|
+
iconName: 'gp-align-right'
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
devices: {
|
|
341
|
+
desktop: {
|
|
342
|
+
default: 'left'
|
|
343
|
+
}
|
|
344
|
+
}
|
|
291
345
|
}
|
|
292
346
|
]
|
|
293
347
|
}
|
|
@@ -231,6 +231,47 @@ const SettingUIV2 = [
|
|
|
231
231
|
]
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
|
+
{
|
|
235
|
+
label: {
|
|
236
|
+
en: 'Size'
|
|
237
|
+
},
|
|
238
|
+
controls: [
|
|
239
|
+
{
|
|
240
|
+
id: 'containWidth',
|
|
241
|
+
label: {
|
|
242
|
+
en: 'Width'
|
|
243
|
+
},
|
|
244
|
+
controlConfig: {
|
|
245
|
+
id: 'containWidth',
|
|
246
|
+
type: 'dropdown:input',
|
|
247
|
+
label: 'Width',
|
|
248
|
+
inputType: 'number',
|
|
249
|
+
units: [
|
|
250
|
+
'px',
|
|
251
|
+
'%'
|
|
252
|
+
],
|
|
253
|
+
hideUnit: false,
|
|
254
|
+
linkWithSetting: {
|
|
255
|
+
name: 'containWidth'
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
layout: 'horizontal'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
label: {
|
|
262
|
+
en: 'Padding'
|
|
263
|
+
},
|
|
264
|
+
controlConfig: {
|
|
265
|
+
id: 'padding',
|
|
266
|
+
type: 'padding-v2',
|
|
267
|
+
linkWithSetting: {
|
|
268
|
+
name: 'spacing-setting',
|
|
269
|
+
field: 'padding'
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
},
|
|
234
275
|
{
|
|
235
276
|
label: {
|
|
236
277
|
en: 'Background'
|
|
@@ -336,6 +377,24 @@ const SettingUIV2 = [
|
|
|
336
377
|
}
|
|
337
378
|
}
|
|
338
379
|
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
controls: [
|
|
383
|
+
{
|
|
384
|
+
label: {
|
|
385
|
+
en: 'Align'
|
|
386
|
+
},
|
|
387
|
+
setting: {
|
|
388
|
+
id: 'align'
|
|
389
|
+
},
|
|
390
|
+
options: {
|
|
391
|
+
labelVariant: 'primary',
|
|
392
|
+
fullWidth: true,
|
|
393
|
+
disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
|
|
394
|
+
},
|
|
395
|
+
conditionEnable: '!(parseInt(containWidth) >= 100 && containWidth?.includes("%"))'
|
|
396
|
+
}
|
|
397
|
+
]
|
|
339
398
|
}
|
|
340
399
|
];
|
|
341
400
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4207,11 +4207,14 @@ type TabsProps = BasePropsWrap<{
|
|
|
4207
4207
|
panelWidth?: ObjectDevices$1<string>;
|
|
4208
4208
|
panelAlign?: ObjectDevices$1<AlignProp>;
|
|
4209
4209
|
labelAlign?: ObjectDevices$1<AlignProp>;
|
|
4210
|
+
align?: ObjectDevices$1<AlignProp>;
|
|
4210
4211
|
labelWidth?: ObjectDevices$1<string>;
|
|
4212
|
+
containWidth?: ObjectDevices$1<string>;
|
|
4211
4213
|
labelColor?: StateProp<ColorValueType$1>;
|
|
4212
4214
|
labelBgColor?: StateProp<ColorValueType$1>;
|
|
4213
4215
|
borderTab?: StateProp<Border>;
|
|
4214
4216
|
background?: ObjectDevices$1<Background>;
|
|
4217
|
+
padding?: ObjectDevices$1<SizeSettingGlobal>;
|
|
4215
4218
|
}> & {
|
|
4216
4219
|
children?: React.ReactNode;
|
|
4217
4220
|
rawChildren?: any[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.502",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@gem-sdk/core": "2.0.0-dev.497",
|
|
27
|
-
"@gem-sdk/styles": "2.0.0-dev.
|
|
27
|
+
"@gem-sdk/styles": "2.0.0-dev.501",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.464",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|
|
30
30
|
},
|