@gem-sdk/components 2.0.0-dev.512 → 2.0.0-dev.513
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 +2 -2
- package/dist/cjs/banner/setting/setting.js +1 -1
- package/dist/cjs/button/setting/configs/settings.js +2 -2
- package/dist/cjs/carousel/setting/configs/settingV2.js +1 -1
- package/dist/cjs/code/setting/config/setting.js +1 -1
- package/dist/cjs/dialog/setting/configs/settings.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/settings.js +1 -1
- package/dist/cjs/form/setting/form-checkbox/configs/settings.js +1 -1
- package/dist/cjs/form/setting/newsletter/configs/settings.js +1 -1
- package/dist/cjs/grid/row/setting/configs/settings.js +1 -1
- package/dist/cjs/grid/section/setting/configs/settings.js +1 -1
- package/dist/cjs/heading/setting/configs/settings.js +1 -1
- package/dist/cjs/icon/components/Icon.js +2 -2
- package/dist/cjs/icon/components/Icon.liquid.js +2 -2
- package/dist/cjs/icon/setting/configs/settings.js +5 -0
- package/dist/cjs/icon/setting/configs/uiV2.js +13 -3
- package/dist/cjs/icon-list/setting/configs/settings.js +1 -1
- package/dist/cjs/icon-list-hoz/setting/configs/settings.js +6 -4
- package/dist/cjs/icon-list-hoz/setting/configs/uiV2.js +1 -1
- package/dist/cjs/icon-list-v2/setting/configs/settings.js +1 -1
- package/dist/cjs/product/setting/dynamic-checkout/configs/settings.js +2 -2
- package/dist/cjs/product/setting/product-list/configs/settingsV2.js +1 -1
- package/dist/cjs/product/setting/product-view-more/configs/settings.js +2 -2
- package/dist/cjs/sticky/setting/configs/settingsV2.js +1 -1
- package/dist/cjs/tab/components/Tabs.js +3 -4
- package/dist/cjs/tab/components/Tabs.liquid.js +2 -2
- package/dist/cjs/tab/components/common/common.js +8 -14
- package/dist/cjs/tab/components/common/getClasses.js +3 -3
- package/dist/cjs/tab/setting/configs/settings.js +4 -5
- package/dist/cjs/tab/setting/configs/uiV2.js +1 -1
- package/dist/cjs/text/setting/configs/settings.js +1 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +2 -2
- package/dist/esm/banner/setting/setting.js +1 -1
- package/dist/esm/button/setting/configs/settings.js +2 -2
- package/dist/esm/carousel/setting/configs/settingV2.js +1 -1
- package/dist/esm/code/setting/config/setting.js +1 -1
- package/dist/esm/dialog/setting/configs/settings.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/settings.js +1 -1
- package/dist/esm/form/setting/form-checkbox/configs/settings.js +1 -1
- package/dist/esm/form/setting/newsletter/configs/settings.js +1 -1
- package/dist/esm/grid/row/setting/configs/settings.js +1 -1
- package/dist/esm/grid/section/setting/configs/settings.js +1 -1
- package/dist/esm/heading/setting/configs/settings.js +1 -1
- package/dist/esm/icon/components/Icon.js +2 -2
- package/dist/esm/icon/components/Icon.liquid.js +2 -2
- package/dist/esm/icon/setting/configs/settings.js +5 -0
- package/dist/esm/icon/setting/configs/uiV2.js +13 -3
- package/dist/esm/icon-list/setting/configs/settings.js +1 -1
- package/dist/esm/icon-list-hoz/setting/configs/settings.js +6 -4
- package/dist/esm/icon-list-hoz/setting/configs/uiV2.js +1 -1
- package/dist/esm/icon-list-v2/setting/configs/settings.js +1 -1
- package/dist/esm/product/setting/dynamic-checkout/configs/settings.js +2 -2
- package/dist/esm/product/setting/product-list/configs/settingsV2.js +1 -1
- package/dist/esm/product/setting/product-view-more/configs/settings.js +2 -2
- package/dist/esm/sticky/setting/configs/settingsV2.js +1 -1
- package/dist/esm/tab/components/Tabs.js +3 -4
- package/dist/esm/tab/components/Tabs.liquid.js +2 -2
- package/dist/esm/tab/components/common/common.js +9 -14
- package/dist/esm/tab/components/common/getClasses.js +3 -3
- package/dist/esm/tab/setting/configs/settings.js +4 -5
- package/dist/esm/tab/setting/configs/uiV2.js +1 -1
- package/dist/esm/text/setting/configs/settings.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -307,14 +307,14 @@ const ArticleReadMoreSettings = [
|
|
|
307
307
|
default: {
|
|
308
308
|
normal: {
|
|
309
309
|
image: {
|
|
310
|
-
src: 'https://ucarecdn.com/
|
|
310
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
311
311
|
width: 1200,
|
|
312
312
|
height: 480
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
315
|
hover: {
|
|
316
316
|
image: {
|
|
317
|
-
src: 'https://ucarecdn.com/
|
|
317
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
318
318
|
width: 1200,
|
|
319
319
|
height: 480
|
|
320
320
|
}
|
|
@@ -433,7 +433,7 @@ const SettingsV2 = [
|
|
|
433
433
|
default: {
|
|
434
434
|
type: 'image',
|
|
435
435
|
image: {
|
|
436
|
-
src: 'https://
|
|
436
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
437
437
|
width: 1920,
|
|
438
438
|
height: 900
|
|
439
439
|
},
|
|
@@ -339,14 +339,14 @@ const ButtonSettings = [
|
|
|
339
339
|
default: {
|
|
340
340
|
normal: {
|
|
341
341
|
image: {
|
|
342
|
-
src: 'https://ucarecdn.com/
|
|
342
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
343
343
|
width: 1200,
|
|
344
344
|
height: 480
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
hover: {
|
|
348
348
|
image: {
|
|
349
|
-
src: 'https://ucarecdn.com/
|
|
349
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
350
350
|
width: 1200,
|
|
351
351
|
height: 480
|
|
352
352
|
}
|
|
@@ -589,7 +589,7 @@ const CarouselSettingsV2Style = [
|
|
|
589
589
|
desktop: {
|
|
590
590
|
default: {
|
|
591
591
|
image: {
|
|
592
|
-
src: 'https://ucarecdn.com/
|
|
592
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
593
593
|
width: 1200,
|
|
594
594
|
height: 480
|
|
595
595
|
}
|
|
@@ -53,7 +53,7 @@ const SettingCode = [
|
|
|
53
53
|
type: 'color',
|
|
54
54
|
color: '#DDDDDD',
|
|
55
55
|
image: {
|
|
56
|
-
src: 'https://ucarecdn.com/
|
|
56
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
57
57
|
width: 1200,
|
|
58
58
|
height: 480
|
|
59
59
|
},
|
|
@@ -366,7 +366,7 @@ const DialogSettings = [
|
|
|
366
366
|
type: 'color',
|
|
367
367
|
color: 'bg-1',
|
|
368
368
|
image: {
|
|
369
|
-
src: 'https://ucarecdn.com/
|
|
369
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
370
370
|
width: 1200,
|
|
371
371
|
height: 480
|
|
372
372
|
},
|
|
@@ -238,7 +238,7 @@ const EstimateDateSettings = [
|
|
|
238
238
|
type: 'color',
|
|
239
239
|
color: '#DDDDDD',
|
|
240
240
|
image: {
|
|
241
|
-
src: 'https://ucarecdn.com/
|
|
241
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
242
242
|
width: 1200,
|
|
243
243
|
height: 480
|
|
244
244
|
},
|
|
@@ -136,7 +136,7 @@ const FormCheckboxSettings = [
|
|
|
136
136
|
type: 'color',
|
|
137
137
|
color: '#DDDDDD',
|
|
138
138
|
image: {
|
|
139
|
-
src: 'https://ucarecdn.com/
|
|
139
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
140
140
|
width: 1200,
|
|
141
141
|
height: 480
|
|
142
142
|
},
|
|
@@ -102,7 +102,7 @@ const NewsletterSettings = [
|
|
|
102
102
|
type: 'color',
|
|
103
103
|
color: '#E2E2E2',
|
|
104
104
|
image: {
|
|
105
|
-
src: 'https://ucarecdn.com/
|
|
105
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
106
106
|
width: 1200,
|
|
107
107
|
height: 480
|
|
108
108
|
},
|
|
@@ -246,7 +246,7 @@ const RowSettings = [
|
|
|
246
246
|
type: 'color',
|
|
247
247
|
color: '#DDDDDD',
|
|
248
248
|
image: {
|
|
249
|
-
src: 'https://ucarecdn.com/
|
|
249
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
250
250
|
width: 1200,
|
|
251
251
|
height: 480
|
|
252
252
|
},
|
|
@@ -265,7 +265,7 @@ const SectionSettings = [
|
|
|
265
265
|
type: 'color',
|
|
266
266
|
color: '#DDDDDD',
|
|
267
267
|
image: {
|
|
268
|
-
src: 'https://ucarecdn.com/
|
|
268
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
269
269
|
width: 1200,
|
|
270
270
|
height: 480
|
|
271
271
|
},
|
|
@@ -137,7 +137,7 @@ const HeadingSettings = [
|
|
|
137
137
|
type: 'color',
|
|
138
138
|
color: '#DDDDDD',
|
|
139
139
|
image: {
|
|
140
|
-
src: 'https://ucarecdn.com/
|
|
140
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
141
141
|
width: 1200,
|
|
142
142
|
height: 480
|
|
143
143
|
},
|
|
@@ -12,8 +12,8 @@ var classes = require('./common/classes.js');
|
|
|
12
12
|
var Link = require('../../link/components/Link.js');
|
|
13
13
|
|
|
14
14
|
const Icon = ({ styles, builderAttrs, builderProps, setting = {}, style: style$1, children, advanced })=>{
|
|
15
|
-
const { iconSvg, iconLink } = setting;
|
|
16
|
-
const WrapLink = iconLink?.link ? Link.default : React.Fragment;
|
|
15
|
+
const { iconSvg, iconLink, iconLinkEnable } = setting;
|
|
16
|
+
const WrapLink = iconLink?.link && iconLinkEnable ? Link.default : React.Fragment;
|
|
17
17
|
const iconLinkData = iconLink?.link ? {
|
|
18
18
|
setting: {
|
|
19
19
|
type: 'custom',
|
|
@@ -10,9 +10,9 @@ var classes = require('./common/classes.js');
|
|
|
10
10
|
var style = require('./common/style.js');
|
|
11
11
|
|
|
12
12
|
const Icon = ({ style: style$1, builderAttrs, builderProps, setting = {}, styles, advanced })=>{
|
|
13
|
-
const { iconSvg, iconLink } = setting;
|
|
13
|
+
const { iconSvg, iconLink, iconLinkEnable } = setting;
|
|
14
14
|
const { Wrap: WrapLink, urlData } = helpers.getInsertLinkData('div', iconLink);
|
|
15
|
-
const iconLinkData = iconLink?.link ? {
|
|
15
|
+
const iconLinkData = iconLink?.link && iconLinkEnable ? {
|
|
16
16
|
href: urlData.href,
|
|
17
17
|
target: urlData?.target,
|
|
18
18
|
title: iconLink?.title,
|
|
@@ -12,6 +12,11 @@ const IconSettings = [
|
|
|
12
12
|
default: `<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414815326568808">
|
|
13
13
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>`
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
id: 'iconLinkEnable',
|
|
17
|
+
type: 'toggle',
|
|
18
|
+
default: true
|
|
19
|
+
},
|
|
15
20
|
{
|
|
16
21
|
id: 'iconLink',
|
|
17
22
|
type: 'pick-link',
|
|
@@ -111,11 +111,21 @@ const SettingUIV2 = [
|
|
|
111
111
|
]
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
label: {
|
|
115
|
-
en: 'Link'
|
|
116
|
-
},
|
|
117
114
|
controls: [
|
|
118
115
|
{
|
|
116
|
+
label: {
|
|
117
|
+
en: 'Link'
|
|
118
|
+
},
|
|
119
|
+
setting: {
|
|
120
|
+
id: 'iconLinkEnable'
|
|
121
|
+
},
|
|
122
|
+
options: {
|
|
123
|
+
labelVariant: 'primary',
|
|
124
|
+
toggleStyle: 'switch'
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
conditionDisplay: 'iconLinkEnable == true',
|
|
119
129
|
layout: 'vertical',
|
|
120
130
|
setting: {
|
|
121
131
|
id: 'iconLink'
|
|
@@ -62,7 +62,7 @@ const IconListSettings = [
|
|
|
62
62
|
type: 'color',
|
|
63
63
|
color: 'bg-2',
|
|
64
64
|
image: {
|
|
65
|
-
src: 'https://ucarecdn.com/
|
|
65
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
66
66
|
width: 1200,
|
|
67
67
|
height: 480
|
|
68
68
|
},
|
|
@@ -57,7 +57,7 @@ const IconListHozSettings = [
|
|
|
57
57
|
type: 'color',
|
|
58
58
|
color: '#DDDDDD',
|
|
59
59
|
image: {
|
|
60
|
-
src: 'https://ucarecdn.com/
|
|
60
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
61
61
|
width: 1200,
|
|
62
62
|
height: 480
|
|
63
63
|
},
|
|
@@ -74,12 +74,14 @@ const IconListHozSettings = [
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: 'horizontalSpacing',
|
|
77
|
-
|
|
77
|
+
label: 'Icon Spacing',
|
|
78
|
+
default: '4px',
|
|
79
|
+
type: 'input:slider',
|
|
78
80
|
units: [
|
|
79
81
|
'px'
|
|
80
82
|
],
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
min: 0,
|
|
84
|
+
max: 40
|
|
83
85
|
},
|
|
84
86
|
{
|
|
85
87
|
id: 'align',
|
|
@@ -147,7 +147,7 @@ const IconListSettings = [
|
|
|
147
147
|
type: 'color',
|
|
148
148
|
color: '#DDDDDD',
|
|
149
149
|
image: {
|
|
150
|
-
src: 'https://ucarecdn.com/
|
|
150
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
151
151
|
width: 1200,
|
|
152
152
|
height: 480
|
|
153
153
|
},
|
|
@@ -93,14 +93,14 @@ const DynamicCheckoutSettings = [
|
|
|
93
93
|
default: {
|
|
94
94
|
normal: {
|
|
95
95
|
image: {
|
|
96
|
-
src: 'https://ucarecdn.com/
|
|
96
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
97
97
|
width: 1200,
|
|
98
98
|
height: 480
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
hover: {
|
|
102
102
|
image: {
|
|
103
|
-
src: 'https://ucarecdn.com/
|
|
103
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
104
104
|
width: 1200,
|
|
105
105
|
height: 480
|
|
106
106
|
}
|
|
@@ -201,7 +201,7 @@ const ProductListSettingsV2 = [
|
|
|
201
201
|
desktop: {
|
|
202
202
|
default: {
|
|
203
203
|
image: {
|
|
204
|
-
src: 'https://ucarecdn.com/
|
|
204
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
205
205
|
width: 1200,
|
|
206
206
|
height: 480
|
|
207
207
|
},
|
|
@@ -184,14 +184,14 @@ const ProductViewMoreSettings = [
|
|
|
184
184
|
default: {
|
|
185
185
|
normal: {
|
|
186
186
|
image: {
|
|
187
|
-
src: 'https://ucarecdn.com/
|
|
187
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
188
188
|
width: 1200,
|
|
189
189
|
height: 480
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
hover: {
|
|
193
193
|
image: {
|
|
194
|
-
src: 'https://ucarecdn.com/
|
|
194
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
195
195
|
width: 1200,
|
|
196
196
|
height: 480
|
|
197
197
|
}
|
|
@@ -79,7 +79,7 @@ const StickySettingsV2 = [
|
|
|
79
79
|
type: 'color',
|
|
80
80
|
color: '',
|
|
81
81
|
image: {
|
|
82
|
-
src: 'https://ucarecdn.com/
|
|
82
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
83
83
|
width: 1200,
|
|
84
84
|
height: 480
|
|
85
85
|
},
|
|
@@ -7,7 +7,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var useTab = require('./hooks/useTab.js');
|
|
10
|
-
var common = require('./common/common.js');
|
|
11
10
|
var system = require('@gem-sdk/system');
|
|
12
11
|
var getAttr = require('./common/getAttr.js');
|
|
13
12
|
var Text = require('../../text/components/Text.js');
|
|
@@ -17,10 +16,10 @@ var getClasses = require('./common/getClasses.js');
|
|
|
17
16
|
const Tabs = (props)=>{
|
|
18
17
|
const { builderAttrs, builderProps, style, setting, advanced, children } = props;
|
|
19
18
|
const { cssClass } = advanced ?? {};
|
|
20
|
-
const {
|
|
19
|
+
const { panelWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
|
|
21
20
|
const { currentDevice, productID, dispatchEventTabActive, activeTab, setActiveKey, refContainer } = useTab.useTab(setting, builderProps);
|
|
22
21
|
const isNotLiquid = true;
|
|
23
|
-
const ulClass = `wrap-width_full_${currentDevice}_${setting?.position?.[currentDevice]}_${
|
|
22
|
+
const ulClass = `wrap-width_full_${currentDevice}_${setting?.position?.[currentDevice]}_${setting?.panelWidth?.[currentDevice] === '100%'}`;
|
|
24
23
|
if (setting && !setting?.labelWidth) {
|
|
25
24
|
setting.labelWidth = {
|
|
26
25
|
desktop: '200px'
|
|
@@ -50,7 +49,7 @@ const Tabs = (props)=>{
|
|
|
50
49
|
});
|
|
51
50
|
const styleTagClasses = system.createClass({
|
|
52
51
|
...getClasses.getStyleTagClasses({
|
|
53
|
-
|
|
52
|
+
panelWidth,
|
|
54
53
|
builderProps
|
|
55
54
|
})
|
|
56
55
|
});
|
|
@@ -14,7 +14,7 @@ const Tabs = (props)=>{
|
|
|
14
14
|
const { builderProps, style, setting, advanced, rawChildren } = props;
|
|
15
15
|
delete setting?.labelTypoV2?.attrs?.color;
|
|
16
16
|
const { cssClass } = advanced ?? {};
|
|
17
|
-
const {
|
|
17
|
+
const { panelWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
|
|
18
18
|
const stateData = system.createStateOrContext({
|
|
19
19
|
setting,
|
|
20
20
|
builderProps
|
|
@@ -48,7 +48,7 @@ const Tabs = (props)=>{
|
|
|
48
48
|
});
|
|
49
49
|
const styleTagClasses = system.createClass({
|
|
50
50
|
...getClasses.getStyleTagClasses({
|
|
51
|
-
|
|
51
|
+
panelWidth,
|
|
52
52
|
builderProps
|
|
53
53
|
})
|
|
54
54
|
});
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
const makeStyleLayoutFullWidthResponsive = (panelFullWidth, builderProps)=>{
|
|
12
|
-
const fullWidthInherit = makeDeviceFullWidthDefault(panelFullWidth);
|
|
13
|
-
return Object.entries(fullWidthInherit).filter(([, isFullWidth])=>isFullWidth).map(([device])=>`.${builderProps?.uid}
|
|
14
|
-
.wrap-width_full_${device}_top_true { width: 100%; }\n`).join('');
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
|
|
5
|
+
const makeStyleLayoutFullWidthResponsive = (panelWidth, builderProps)=>{
|
|
6
|
+
return core.DEVICES.map((device)=>{
|
|
7
|
+
if (core.getValueByDevice(panelWidth, device) === '100%') return `.${builderProps?.uid}
|
|
8
|
+
.wrap-width_full_${device}_top_true { width: 100%; }\n`;
|
|
9
|
+
}).join('');
|
|
15
10
|
};
|
|
16
11
|
const makeDeviceDefault = (data = {})=>{
|
|
17
12
|
const { desktop = '', tablet = desktop, mobile = tablet || desktop } = data;
|
|
@@ -32,7 +27,7 @@ const getStyleWidthByPositionResponsive = (data)=>{
|
|
|
32
27
|
const key = i;
|
|
33
28
|
if (!data.position[key] || data.position[key] === 'top') {
|
|
34
29
|
const panelWidth = makeDeviceDefault(data.panelWidth);
|
|
35
|
-
|
|
30
|
+
widthStyle[key] = panelWidth?.[key] || 'min-content';
|
|
36
31
|
} else {
|
|
37
32
|
const labelWidth = makeDeviceDefault(data.labelWidth);
|
|
38
33
|
widthStyle[key] = labelWidth?.[key] || 'min-content';
|
|
@@ -76,5 +71,4 @@ exports.getStyleWidthByPositionResponsive = getStyleWidthByPositionResponsive;
|
|
|
76
71
|
exports.getUlClassByPositionResponsive = getUlClassByPositionResponsive;
|
|
77
72
|
exports.getWrapClassByPositionResponsive = getWrapClassByPositionResponsive;
|
|
78
73
|
exports.initialStyles = initialStyles;
|
|
79
|
-
exports.makeDeviceFullWidthDefault = makeDeviceFullWidthDefault;
|
|
80
74
|
exports.makeStyleLayoutFullWidthResponsive = makeStyleLayoutFullWidthResponsive;
|
|
@@ -30,7 +30,7 @@ const getTabListClasses = ({ setting, ulClass })=>{
|
|
|
30
30
|
};
|
|
31
31
|
const getItemClasses = ({ setting, isNotLiquid, isActive, currentDevice })=>{
|
|
32
32
|
const { labelBgColor, labelColor, position } = setting ?? {};
|
|
33
|
-
let classList = 'gp-tab-item gp-flex gp-flex-1 gp-cursor-pointer gp-py-2 gp-px-4 gp-whitespace-nowrap';
|
|
33
|
+
let classList = 'gp-tab-item gp-navs-tab gp-flex gp-flex-1 gp-cursor-pointer gp-py-2 gp-px-4 gp-whitespace-nowrap';
|
|
34
34
|
if (isNotLiquid) {
|
|
35
35
|
if (isActive) {
|
|
36
36
|
classList += ` ${core.getGlobalColorClass('bg', labelBgColor?.active)} ${core.getGlobalColorClass('text', labelColor?.active)}`;
|
|
@@ -49,9 +49,9 @@ const getTabParentListClasses = ()=>{
|
|
|
49
49
|
...core.composeClasses(classList)
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
const getStyleTagClasses = ({
|
|
52
|
+
const getStyleTagClasses = ({ panelWidth, builderProps })=>{
|
|
53
53
|
let classList = '';
|
|
54
|
-
const layoutFullWidthResponsiveClass = common.makeStyleLayoutFullWidthResponsive(
|
|
54
|
+
const layoutFullWidthResponsiveClass = common.makeStyleLayoutFullWidthResponsive(panelWidth, builderProps);
|
|
55
55
|
if (builderProps?.uid) classList += ` .${builderProps?.uid} .gp-tab-item.left p,
|
|
56
56
|
.${builderProps?.uid} .gp-tab-item.right p {
|
|
57
57
|
word-wrap: break-word;
|
|
@@ -33,7 +33,6 @@ const TabsSettings = [
|
|
|
33
33
|
iconViewBox: '0 0 74 48',
|
|
34
34
|
enableItemBackground: true,
|
|
35
35
|
itemPerRow: 2,
|
|
36
|
-
itemSpacing: 'large',
|
|
37
36
|
options: [
|
|
38
37
|
{
|
|
39
38
|
value: 'top',
|
|
@@ -43,12 +42,12 @@ const TabsSettings = [
|
|
|
43
42
|
{
|
|
44
43
|
value: 'left',
|
|
45
44
|
label: 'Left',
|
|
46
|
-
iconName: 'gp-tab-
|
|
45
|
+
iconName: 'gp-tab-left'
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
48
|
value: 'right',
|
|
50
49
|
label: 'Right',
|
|
51
|
-
iconName: 'gp-tab-
|
|
50
|
+
iconName: 'gp-tab-bottom'
|
|
52
51
|
}
|
|
53
52
|
],
|
|
54
53
|
devices: {
|
|
@@ -263,7 +262,7 @@ const TabsSettings = [
|
|
|
263
262
|
],
|
|
264
263
|
devices: {
|
|
265
264
|
desktop: {
|
|
266
|
-
default: '
|
|
265
|
+
default: 'auto'
|
|
267
266
|
}
|
|
268
267
|
}
|
|
269
268
|
},
|
|
@@ -297,7 +296,7 @@ const TabsSettings = [
|
|
|
297
296
|
type: 'color',
|
|
298
297
|
color: '#DDDDDD',
|
|
299
298
|
image: {
|
|
300
|
-
src: 'https://ucarecdn.com/
|
|
299
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
301
300
|
width: 1200,
|
|
302
301
|
height: 1200
|
|
303
302
|
},
|
|
@@ -90,7 +90,7 @@ const TextSettings = [
|
|
|
90
90
|
type: 'color',
|
|
91
91
|
color: '#DDDDDD',
|
|
92
92
|
image: {
|
|
93
|
-
src: 'https://ucarecdn.com/
|
|
93
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
94
94
|
width: 1200,
|
|
95
95
|
height: 480
|
|
96
96
|
},
|
|
@@ -305,14 +305,14 @@ const ArticleReadMoreSettings = [
|
|
|
305
305
|
default: {
|
|
306
306
|
normal: {
|
|
307
307
|
image: {
|
|
308
|
-
src: 'https://ucarecdn.com/
|
|
308
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
309
309
|
width: 1200,
|
|
310
310
|
height: 480
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
hover: {
|
|
314
314
|
image: {
|
|
315
|
-
src: 'https://ucarecdn.com/
|
|
315
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
316
316
|
width: 1200,
|
|
317
317
|
height: 480
|
|
318
318
|
}
|
|
@@ -431,7 +431,7 @@ const SettingsV2 = [
|
|
|
431
431
|
default: {
|
|
432
432
|
type: 'image',
|
|
433
433
|
image: {
|
|
434
|
-
src: 'https://
|
|
434
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
435
435
|
width: 1920,
|
|
436
436
|
height: 900
|
|
437
437
|
},
|
|
@@ -337,14 +337,14 @@ const ButtonSettings = [
|
|
|
337
337
|
default: {
|
|
338
338
|
normal: {
|
|
339
339
|
image: {
|
|
340
|
-
src: 'https://ucarecdn.com/
|
|
340
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
341
341
|
width: 1200,
|
|
342
342
|
height: 480
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
345
|
hover: {
|
|
346
346
|
image: {
|
|
347
|
-
src: 'https://ucarecdn.com/
|
|
347
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
348
348
|
width: 1200,
|
|
349
349
|
height: 480
|
|
350
350
|
}
|
|
@@ -587,7 +587,7 @@ const CarouselSettingsV2Style = [
|
|
|
587
587
|
desktop: {
|
|
588
588
|
default: {
|
|
589
589
|
image: {
|
|
590
|
-
src: 'https://ucarecdn.com/
|
|
590
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
591
591
|
width: 1200,
|
|
592
592
|
height: 480
|
|
593
593
|
}
|
|
@@ -51,7 +51,7 @@ const SettingCode = [
|
|
|
51
51
|
type: 'color',
|
|
52
52
|
color: '#DDDDDD',
|
|
53
53
|
image: {
|
|
54
|
-
src: 'https://ucarecdn.com/
|
|
54
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
55
55
|
width: 1200,
|
|
56
56
|
height: 480
|
|
57
57
|
},
|
|
@@ -364,7 +364,7 @@ const DialogSettings = [
|
|
|
364
364
|
type: 'color',
|
|
365
365
|
color: 'bg-1',
|
|
366
366
|
image: {
|
|
367
|
-
src: 'https://ucarecdn.com/
|
|
367
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
368
368
|
width: 1200,
|
|
369
369
|
height: 480
|
|
370
370
|
},
|
|
@@ -236,7 +236,7 @@ const EstimateDateSettings = [
|
|
|
236
236
|
type: 'color',
|
|
237
237
|
color: '#DDDDDD',
|
|
238
238
|
image: {
|
|
239
|
-
src: 'https://ucarecdn.com/
|
|
239
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
240
240
|
width: 1200,
|
|
241
241
|
height: 480
|
|
242
242
|
},
|
|
@@ -132,7 +132,7 @@ const FormCheckboxSettings = [
|
|
|
132
132
|
type: 'color',
|
|
133
133
|
color: '#DDDDDD',
|
|
134
134
|
image: {
|
|
135
|
-
src: 'https://ucarecdn.com/
|
|
135
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
136
136
|
width: 1200,
|
|
137
137
|
height: 480
|
|
138
138
|
},
|
|
@@ -98,7 +98,7 @@ const NewsletterSettings = [
|
|
|
98
98
|
type: 'color',
|
|
99
99
|
color: '#E2E2E2',
|
|
100
100
|
image: {
|
|
101
|
-
src: 'https://ucarecdn.com/
|
|
101
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
102
102
|
width: 1200,
|
|
103
103
|
height: 480
|
|
104
104
|
},
|
|
@@ -244,7 +244,7 @@ const RowSettings = [
|
|
|
244
244
|
type: 'color',
|
|
245
245
|
color: '#DDDDDD',
|
|
246
246
|
image: {
|
|
247
|
-
src: 'https://ucarecdn.com/
|
|
247
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
248
248
|
width: 1200,
|
|
249
249
|
height: 480
|
|
250
250
|
},
|
|
@@ -263,7 +263,7 @@ const SectionSettings = [
|
|
|
263
263
|
type: 'color',
|
|
264
264
|
color: '#DDDDDD',
|
|
265
265
|
image: {
|
|
266
|
-
src: 'https://ucarecdn.com/
|
|
266
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
267
267
|
width: 1200,
|
|
268
268
|
height: 480
|
|
269
269
|
},
|
|
@@ -135,7 +135,7 @@ const HeadingSettings = [
|
|
|
135
135
|
type: 'color',
|
|
136
136
|
color: '#DDDDDD',
|
|
137
137
|
image: {
|
|
138
|
-
src: 'https://ucarecdn.com/
|
|
138
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
139
139
|
width: 1200,
|
|
140
140
|
height: 480
|
|
141
141
|
},
|
|
@@ -8,8 +8,8 @@ import { getContainerClasses, getIconClasses } from './common/classes.js';
|
|
|
8
8
|
import Link from '../../link/components/Link.js';
|
|
9
9
|
|
|
10
10
|
const Icon = ({ styles, builderAttrs, builderProps, setting = {}, style, children, advanced })=>{
|
|
11
|
-
const { iconSvg, iconLink } = setting;
|
|
12
|
-
const WrapLink = iconLink?.link ? Link : Fragment;
|
|
11
|
+
const { iconSvg, iconLink, iconLinkEnable } = setting;
|
|
12
|
+
const WrapLink = iconLink?.link && iconLinkEnable ? Link : Fragment;
|
|
13
13
|
const iconLinkData = iconLink?.link ? {
|
|
14
14
|
setting: {
|
|
15
15
|
type: 'custom',
|
|
@@ -6,9 +6,9 @@ import { getContainerClasses, getIconClasses } from './common/classes.js';
|
|
|
6
6
|
import { getWrapperStyle, getContainerStyle, getIconStyle } from './common/style.js';
|
|
7
7
|
|
|
8
8
|
const Icon = ({ style, builderAttrs, builderProps, setting = {}, styles, advanced })=>{
|
|
9
|
-
const { iconSvg, iconLink } = setting;
|
|
9
|
+
const { iconSvg, iconLink, iconLinkEnable } = setting;
|
|
10
10
|
const { Wrap: WrapLink, urlData } = getInsertLinkData('div', iconLink);
|
|
11
|
-
const iconLinkData = iconLink?.link ? {
|
|
11
|
+
const iconLinkData = iconLink?.link && iconLinkEnable ? {
|
|
12
12
|
href: urlData.href,
|
|
13
13
|
target: urlData?.target,
|
|
14
14
|
title: iconLink?.title,
|
|
@@ -10,6 +10,11 @@ const IconSettings = [
|
|
|
10
10
|
default: `<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414815326568808">
|
|
11
11
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>`
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
id: 'iconLinkEnable',
|
|
15
|
+
type: 'toggle',
|
|
16
|
+
default: true
|
|
17
|
+
},
|
|
13
18
|
{
|
|
14
19
|
id: 'iconLink',
|
|
15
20
|
type: 'pick-link',
|
|
@@ -109,11 +109,21 @@ const SettingUIV2 = [
|
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
label: {
|
|
113
|
-
en: 'Link'
|
|
114
|
-
},
|
|
115
112
|
controls: [
|
|
116
113
|
{
|
|
114
|
+
label: {
|
|
115
|
+
en: 'Link'
|
|
116
|
+
},
|
|
117
|
+
setting: {
|
|
118
|
+
id: 'iconLinkEnable'
|
|
119
|
+
},
|
|
120
|
+
options: {
|
|
121
|
+
labelVariant: 'primary',
|
|
122
|
+
toggleStyle: 'switch'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
conditionDisplay: 'iconLinkEnable == true',
|
|
117
127
|
layout: 'vertical',
|
|
118
128
|
setting: {
|
|
119
129
|
id: 'iconLink'
|
|
@@ -60,7 +60,7 @@ const IconListSettings = [
|
|
|
60
60
|
type: 'color',
|
|
61
61
|
color: 'bg-2',
|
|
62
62
|
image: {
|
|
63
|
-
src: 'https://ucarecdn.com/
|
|
63
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
64
64
|
width: 1200,
|
|
65
65
|
height: 480
|
|
66
66
|
},
|
|
@@ -55,7 +55,7 @@ const IconListHozSettings = [
|
|
|
55
55
|
type: 'color',
|
|
56
56
|
color: '#DDDDDD',
|
|
57
57
|
image: {
|
|
58
|
-
src: 'https://ucarecdn.com/
|
|
58
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
59
59
|
width: 1200,
|
|
60
60
|
height: 480
|
|
61
61
|
},
|
|
@@ -72,12 +72,14 @@ const IconListHozSettings = [
|
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
id: 'horizontalSpacing',
|
|
75
|
-
|
|
75
|
+
label: 'Icon Spacing',
|
|
76
|
+
default: '4px',
|
|
77
|
+
type: 'input:slider',
|
|
76
78
|
units: [
|
|
77
79
|
'px'
|
|
78
80
|
],
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
min: 0,
|
|
82
|
+
max: 40
|
|
81
83
|
},
|
|
82
84
|
{
|
|
83
85
|
id: 'align',
|
|
@@ -145,7 +145,7 @@ const IconListSettings = [
|
|
|
145
145
|
type: 'color',
|
|
146
146
|
color: '#DDDDDD',
|
|
147
147
|
image: {
|
|
148
|
-
src: 'https://ucarecdn.com/
|
|
148
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
149
149
|
width: 1200,
|
|
150
150
|
height: 480
|
|
151
151
|
},
|
|
@@ -91,14 +91,14 @@ const DynamicCheckoutSettings = [
|
|
|
91
91
|
default: {
|
|
92
92
|
normal: {
|
|
93
93
|
image: {
|
|
94
|
-
src: 'https://ucarecdn.com/
|
|
94
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
95
95
|
width: 1200,
|
|
96
96
|
height: 480
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
hover: {
|
|
100
100
|
image: {
|
|
101
|
-
src: 'https://ucarecdn.com/
|
|
101
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
102
102
|
width: 1200,
|
|
103
103
|
height: 480
|
|
104
104
|
}
|
|
@@ -199,7 +199,7 @@ const ProductListSettingsV2 = [
|
|
|
199
199
|
desktop: {
|
|
200
200
|
default: {
|
|
201
201
|
image: {
|
|
202
|
-
src: 'https://ucarecdn.com/
|
|
202
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
203
203
|
width: 1200,
|
|
204
204
|
height: 480
|
|
205
205
|
},
|
|
@@ -182,14 +182,14 @@ const ProductViewMoreSettings = [
|
|
|
182
182
|
default: {
|
|
183
183
|
normal: {
|
|
184
184
|
image: {
|
|
185
|
-
src: 'https://ucarecdn.com/
|
|
185
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
186
186
|
width: 1200,
|
|
187
187
|
height: 480
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
hover: {
|
|
191
191
|
image: {
|
|
192
|
-
src: 'https://ucarecdn.com/
|
|
192
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
193
193
|
width: 1200,
|
|
194
194
|
height: 480
|
|
195
195
|
}
|
|
@@ -77,7 +77,7 @@ const StickySettingsV2 = [
|
|
|
77
77
|
type: 'color',
|
|
78
78
|
color: '',
|
|
79
79
|
image: {
|
|
80
|
-
src: 'https://ucarecdn.com/
|
|
80
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
81
81
|
width: 1200,
|
|
82
82
|
height: 480
|
|
83
83
|
},
|
|
@@ -3,7 +3,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { filterToolbarPreview } from '@gem-sdk/core';
|
|
4
4
|
import { Children, isValidElement } from 'react';
|
|
5
5
|
import { useTab } from './hooks/useTab.js';
|
|
6
|
-
import { makeDeviceFullWidthDefault } from './common/common.js';
|
|
7
6
|
import { createAttr, createStyle, createClass } from '@gem-sdk/system';
|
|
8
7
|
import { getAttr, getAttrContent } from './common/getAttr.js';
|
|
9
8
|
import Text from '../../text/components/Text.js';
|
|
@@ -13,10 +12,10 @@ import { getClassesWrapper, getContainClasses, getStyleTagClasses, getTabParentL
|
|
|
13
12
|
const Tabs = (props)=>{
|
|
14
13
|
const { builderAttrs, builderProps, style, setting, advanced, children } = props;
|
|
15
14
|
const { cssClass } = advanced ?? {};
|
|
16
|
-
const {
|
|
15
|
+
const { panelWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
|
|
17
16
|
const { currentDevice, productID, dispatchEventTabActive, activeTab, setActiveKey, refContainer } = useTab(setting, builderProps);
|
|
18
17
|
const isNotLiquid = true;
|
|
19
|
-
const ulClass = `wrap-width_full_${currentDevice}_${setting?.position?.[currentDevice]}_${
|
|
18
|
+
const ulClass = `wrap-width_full_${currentDevice}_${setting?.position?.[currentDevice]}_${setting?.panelWidth?.[currentDevice] === '100%'}`;
|
|
20
19
|
if (setting && !setting?.labelWidth) {
|
|
21
20
|
setting.labelWidth = {
|
|
22
21
|
desktop: '200px'
|
|
@@ -46,7 +45,7 @@ const Tabs = (props)=>{
|
|
|
46
45
|
});
|
|
47
46
|
const styleTagClasses = createClass({
|
|
48
47
|
...getStyleTagClasses({
|
|
49
|
-
|
|
48
|
+
panelWidth,
|
|
50
49
|
builderProps
|
|
51
50
|
})
|
|
52
51
|
});
|
|
@@ -10,7 +10,7 @@ const Tabs = (props)=>{
|
|
|
10
10
|
const { builderProps, style, setting, advanced, rawChildren } = props;
|
|
11
11
|
delete setting?.labelTypoV2?.attrs?.color;
|
|
12
12
|
const { cssClass } = advanced ?? {};
|
|
13
|
-
const {
|
|
13
|
+
const { panelWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
|
|
14
14
|
const stateData = createStateOrContext({
|
|
15
15
|
setting,
|
|
16
16
|
builderProps
|
|
@@ -44,7 +44,7 @@ const Tabs = (props)=>{
|
|
|
44
44
|
});
|
|
45
45
|
const styleTagClasses = createClass({
|
|
46
46
|
...getStyleTagClasses({
|
|
47
|
-
|
|
47
|
+
panelWidth,
|
|
48
48
|
builderProps
|
|
49
49
|
})
|
|
50
50
|
});
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
const makeStyleLayoutFullWidthResponsive = (panelFullWidth, builderProps)=>{
|
|
10
|
-
const fullWidthInherit = makeDeviceFullWidthDefault(panelFullWidth);
|
|
11
|
-
return Object.entries(fullWidthInherit).filter(([, isFullWidth])=>isFullWidth).map(([device])=>`.${builderProps?.uid}
|
|
12
|
-
.wrap-width_full_${device}_top_true { width: 100%; }\n`).join('');
|
|
1
|
+
import { DEVICES, getValueByDevice } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const makeStyleLayoutFullWidthResponsive = (panelWidth, builderProps)=>{
|
|
4
|
+
return DEVICES.map((device)=>{
|
|
5
|
+
if (getValueByDevice(panelWidth, device) === '100%') return `.${builderProps?.uid}
|
|
6
|
+
.wrap-width_full_${device}_top_true { width: 100%; }\n`;
|
|
7
|
+
}).join('');
|
|
13
8
|
};
|
|
14
9
|
const makeDeviceDefault = (data = {})=>{
|
|
15
10
|
const { desktop = '', tablet = desktop, mobile = tablet || desktop } = data;
|
|
@@ -30,7 +25,7 @@ const getStyleWidthByPositionResponsive = (data)=>{
|
|
|
30
25
|
const key = i;
|
|
31
26
|
if (!data.position[key] || data.position[key] === 'top') {
|
|
32
27
|
const panelWidth = makeDeviceDefault(data.panelWidth);
|
|
33
|
-
|
|
28
|
+
widthStyle[key] = panelWidth?.[key] || 'min-content';
|
|
34
29
|
} else {
|
|
35
30
|
const labelWidth = makeDeviceDefault(data.labelWidth);
|
|
36
31
|
widthStyle[key] = labelWidth?.[key] || 'min-content';
|
|
@@ -70,4 +65,4 @@ const initialStyles = {
|
|
|
70
65
|
'--hvr-bc': 'unset'
|
|
71
66
|
};
|
|
72
67
|
|
|
73
|
-
export { getStyleWidthByPositionResponsive, getUlClassByPositionResponsive, getWrapClassByPositionResponsive, initialStyles,
|
|
68
|
+
export { getStyleWidthByPositionResponsive, getUlClassByPositionResponsive, getWrapClassByPositionResponsive, initialStyles, makeStyleLayoutFullWidthResponsive };
|
|
@@ -28,7 +28,7 @@ const getTabListClasses = ({ setting, ulClass })=>{
|
|
|
28
28
|
};
|
|
29
29
|
const getItemClasses = ({ setting, isNotLiquid, isActive, currentDevice })=>{
|
|
30
30
|
const { labelBgColor, labelColor, position } = setting ?? {};
|
|
31
|
-
let classList = 'gp-tab-item gp-flex gp-flex-1 gp-cursor-pointer gp-py-2 gp-px-4 gp-whitespace-nowrap';
|
|
31
|
+
let classList = 'gp-tab-item gp-navs-tab gp-flex gp-flex-1 gp-cursor-pointer gp-py-2 gp-px-4 gp-whitespace-nowrap';
|
|
32
32
|
if (isNotLiquid) {
|
|
33
33
|
if (isActive) {
|
|
34
34
|
classList += ` ${getGlobalColorClass('bg', labelBgColor?.active)} ${getGlobalColorClass('text', labelColor?.active)}`;
|
|
@@ -47,9 +47,9 @@ const getTabParentListClasses = ()=>{
|
|
|
47
47
|
...composeClasses(classList)
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
const getStyleTagClasses = ({
|
|
50
|
+
const getStyleTagClasses = ({ panelWidth, builderProps })=>{
|
|
51
51
|
let classList = '';
|
|
52
|
-
const layoutFullWidthResponsiveClass = makeStyleLayoutFullWidthResponsive(
|
|
52
|
+
const layoutFullWidthResponsiveClass = makeStyleLayoutFullWidthResponsive(panelWidth, builderProps);
|
|
53
53
|
if (builderProps?.uid) classList += ` .${builderProps?.uid} .gp-tab-item.left p,
|
|
54
54
|
.${builderProps?.uid} .gp-tab-item.right p {
|
|
55
55
|
word-wrap: break-word;
|
|
@@ -31,7 +31,6 @@ const TabsSettings = [
|
|
|
31
31
|
iconViewBox: '0 0 74 48',
|
|
32
32
|
enableItemBackground: true,
|
|
33
33
|
itemPerRow: 2,
|
|
34
|
-
itemSpacing: 'large',
|
|
35
34
|
options: [
|
|
36
35
|
{
|
|
37
36
|
value: 'top',
|
|
@@ -41,12 +40,12 @@ const TabsSettings = [
|
|
|
41
40
|
{
|
|
42
41
|
value: 'left',
|
|
43
42
|
label: 'Left',
|
|
44
|
-
iconName: 'gp-tab-
|
|
43
|
+
iconName: 'gp-tab-left'
|
|
45
44
|
},
|
|
46
45
|
{
|
|
47
46
|
value: 'right',
|
|
48
47
|
label: 'Right',
|
|
49
|
-
iconName: 'gp-tab-
|
|
48
|
+
iconName: 'gp-tab-bottom'
|
|
50
49
|
}
|
|
51
50
|
],
|
|
52
51
|
devices: {
|
|
@@ -261,7 +260,7 @@ const TabsSettings = [
|
|
|
261
260
|
],
|
|
262
261
|
devices: {
|
|
263
262
|
desktop: {
|
|
264
|
-
default: '
|
|
263
|
+
default: 'auto'
|
|
265
264
|
}
|
|
266
265
|
}
|
|
267
266
|
},
|
|
@@ -295,7 +294,7 @@ const TabsSettings = [
|
|
|
295
294
|
type: 'color',
|
|
296
295
|
color: '#DDDDDD',
|
|
297
296
|
image: {
|
|
298
|
-
src: 'https://ucarecdn.com/
|
|
297
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
299
298
|
width: 1200,
|
|
300
299
|
height: 1200
|
|
301
300
|
},
|
|
@@ -88,7 +88,7 @@ const TextSettings = [
|
|
|
88
88
|
type: 'color',
|
|
89
89
|
color: '#DDDDDD',
|
|
90
90
|
image: {
|
|
91
|
-
src: 'https://ucarecdn.com/
|
|
91
|
+
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
92
92
|
width: 1200,
|
|
93
93
|
height: 480
|
|
94
94
|
},
|
package/dist/types/index.d.ts
CHANGED