@gem-sdk/components 2.0.0-dev.680 → 2.0.0-dev.681
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/header/components/Header.js +1 -1
- package/dist/cjs/header/components/kind/basic/DesktopMenuItem.js +3 -3
- package/dist/cjs/header/setting/settings.js +3 -3
- package/dist/cjs/header/setting/uiV2.js +26 -2
- package/dist/esm/header/components/Header.js +1 -1
- package/dist/esm/header/components/kind/basic/DesktopMenuItem.js +3 -3
- package/dist/esm/header/setting/settings.js +3 -3
- package/dist/esm/header/setting/uiV2.js +26 -2
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ const Header = ({ builderAttrs, builderProps, style, setting, styles, children }
|
|
|
21
21
|
if (builderProps?.isPreview && isSalesPage) return null;
|
|
22
22
|
return /*#__PURE__*/ jsxRuntime.jsxs("nav", {
|
|
23
23
|
"data-id": builderProps?.uid,
|
|
24
|
-
className: core.cls('gp-w-full gp-z-10', builderProps?.uid),
|
|
24
|
+
className: core.cls('gp-w-full gp-z-10 hover:gp-z-50', builderProps?.uid),
|
|
25
25
|
...builderAttrs,
|
|
26
26
|
style: {
|
|
27
27
|
...style,
|
|
@@ -15,7 +15,7 @@ const DesktopMenuItem = ({ id, menu, arrow, textColor, menuTextColor, depth = 0,
|
|
|
15
15
|
const renderChild = !!item?.childrens?.length && !lastDepth;
|
|
16
16
|
const hasCaret = renderChild && !!arrow;
|
|
17
17
|
return /*#__PURE__*/ jsxRuntime.jsxs("li", {
|
|
18
|
-
className: core.cls('gp-group gp-relative gp-inline-flex gp-flex-1 gp-cursor-pointer gp-items-center gp-gap-2 gp-whitespace-nowrap gp-px-4 gp-py-2 gp-transition-colors gp-duration-300 !gp-max-w-fit', {
|
|
18
|
+
className: core.cls('gp-group gp-relative gp-inline-flex gp-flex-1 gp-cursor-pointer gp-items-center gp-gap-2 gp-whitespace-nowrap gp-px-4 gp-py-2 gp-transition-colors gp-duration-300 !gp-max-w-fit hover:gp-z-50', {
|
|
19
19
|
'gp-justify-center': depth === 0,
|
|
20
20
|
'gp-min-w-[200px] gp-border-b last:gp-border-b-transparent': depth > 0
|
|
21
21
|
}),
|
|
@@ -40,12 +40,12 @@ const DesktopMenuItem = ({ id, menu, arrow, textColor, menuTextColor, depth = 0,
|
|
|
40
40
|
})
|
|
41
41
|
}),
|
|
42
42
|
renderChild && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
43
|
-
className: core.cls('gp-invisible gp-absolute gp-min-w-max gp-opacity-0 gp-transition-all gp-duration-300 gp-ease-in-out [li:hover>div&]:gp-visible [li:hover>div&]:gp-opacity-100', {
|
|
43
|
+
className: core.cls('gp-invisible gp-absolute gp-min-w-max gp-opacity-0 gp-transition-all gp-duration-300 gp-ease-in-out [li:hover>div&]:gp-visible [li:hover>div&]:gp-opacity-100 gp-z-[100]', {
|
|
44
44
|
'gp-left-0 gp-top-full': depth === 0,
|
|
45
45
|
'gp-left-full gp-top-0 gp-translate-y-4 [li:hover>div&]:gp-translate-y-0': depth === 1
|
|
46
46
|
}),
|
|
47
47
|
children: /*#__PURE__*/ jsxRuntime.jsx("ul", {
|
|
48
|
-
className: core.cls('gp-flex gp-flex-col gp-shadow-card-2', {
|
|
48
|
+
className: core.cls('gp-flex gp-flex-col gp-shadow-card-2 gp-relative', {
|
|
49
49
|
'gp-ml-4': depth === 1
|
|
50
50
|
}),
|
|
51
51
|
style: {
|
|
@@ -135,7 +135,7 @@ const HeaderSettings = [
|
|
|
135
135
|
devices: {
|
|
136
136
|
desktop: {
|
|
137
137
|
default: {
|
|
138
|
-
src: 'https://ucarecdn.com/
|
|
138
|
+
src: 'https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/',
|
|
139
139
|
width: 800,
|
|
140
140
|
height: 533
|
|
141
141
|
}
|
|
@@ -260,7 +260,7 @@ const HeaderSettings = [
|
|
|
260
260
|
id: 'arrow',
|
|
261
261
|
label: 'Arrow Icon',
|
|
262
262
|
type: 'icon',
|
|
263
|
-
default: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="#F9F9F9"/></svg>`
|
|
263
|
+
default: `<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="#F9F9F9"/></svg>`
|
|
264
264
|
},
|
|
265
265
|
// {
|
|
266
266
|
// id: 'buyNow',
|
|
@@ -300,7 +300,7 @@ const HeaderSettings = [
|
|
|
300
300
|
id: 'cartIcon',
|
|
301
301
|
label: 'Cart Icon',
|
|
302
302
|
type: 'icon',
|
|
303
|
-
default: `<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>`
|
|
303
|
+
default: `<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>`
|
|
304
304
|
}
|
|
305
305
|
]
|
|
306
306
|
}
|
|
@@ -88,7 +88,7 @@ const SettingUIV2 = [
|
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
label: {
|
|
91
|
-
en: '
|
|
91
|
+
en: 'Menu item style'
|
|
92
92
|
},
|
|
93
93
|
controls: [
|
|
94
94
|
{
|
|
@@ -235,7 +235,7 @@ const SettingUIV2 = [
|
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
label: {
|
|
238
|
-
en: 'Icon
|
|
238
|
+
en: 'Icon color'
|
|
239
239
|
},
|
|
240
240
|
setting: {
|
|
241
241
|
id: 'cartIconColor',
|
|
@@ -296,6 +296,21 @@ const SettingUIV2 = [
|
|
|
296
296
|
]
|
|
297
297
|
},
|
|
298
298
|
layout: 'horizontal'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
label: {
|
|
302
|
+
en: 'Padding',
|
|
303
|
+
cn: '填充',
|
|
304
|
+
es: 'Relleno'
|
|
305
|
+
},
|
|
306
|
+
controlConfig: {
|
|
307
|
+
id: 'padding',
|
|
308
|
+
type: 'padding-v2',
|
|
309
|
+
linkWithSetting: {
|
|
310
|
+
name: 'spacing-setting',
|
|
311
|
+
field: 'padding'
|
|
312
|
+
}
|
|
313
|
+
}
|
|
299
314
|
}
|
|
300
315
|
]
|
|
301
316
|
},
|
|
@@ -407,6 +422,15 @@ const SettingUIV2 = [
|
|
|
407
422
|
setting: {
|
|
408
423
|
id: 'breakpoint'
|
|
409
424
|
}
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
layout: 'vertical',
|
|
428
|
+
controlConfig: {
|
|
429
|
+
id: 'showMenuIconBanner',
|
|
430
|
+
type: 'banner',
|
|
431
|
+
message: `The devices that will show menu icon.`,
|
|
432
|
+
closable: true
|
|
433
|
+
}
|
|
410
434
|
}
|
|
411
435
|
]
|
|
412
436
|
}
|
|
@@ -17,7 +17,7 @@ const Header = ({ builderAttrs, builderProps, style, setting, styles, children }
|
|
|
17
17
|
if (builderProps?.isPreview && isSalesPage) return null;
|
|
18
18
|
return /*#__PURE__*/ jsxs("nav", {
|
|
19
19
|
"data-id": builderProps?.uid,
|
|
20
|
-
className: cls('gp-w-full gp-z-10', builderProps?.uid),
|
|
20
|
+
className: cls('gp-w-full gp-z-10 hover:gp-z-50', builderProps?.uid),
|
|
21
21
|
...builderAttrs,
|
|
22
22
|
style: {
|
|
23
23
|
...style,
|
|
@@ -11,7 +11,7 @@ const DesktopMenuItem = ({ id, menu, arrow, textColor, menuTextColor, depth = 0,
|
|
|
11
11
|
const renderChild = !!item?.childrens?.length && !lastDepth;
|
|
12
12
|
const hasCaret = renderChild && !!arrow;
|
|
13
13
|
return /*#__PURE__*/ jsxs("li", {
|
|
14
|
-
className: cls('gp-group gp-relative gp-inline-flex gp-flex-1 gp-cursor-pointer gp-items-center gp-gap-2 gp-whitespace-nowrap gp-px-4 gp-py-2 gp-transition-colors gp-duration-300 !gp-max-w-fit', {
|
|
14
|
+
className: cls('gp-group gp-relative gp-inline-flex gp-flex-1 gp-cursor-pointer gp-items-center gp-gap-2 gp-whitespace-nowrap gp-px-4 gp-py-2 gp-transition-colors gp-duration-300 !gp-max-w-fit hover:gp-z-50', {
|
|
15
15
|
'gp-justify-center': depth === 0,
|
|
16
16
|
'gp-min-w-[200px] gp-border-b last:gp-border-b-transparent': depth > 0
|
|
17
17
|
}),
|
|
@@ -36,12 +36,12 @@ const DesktopMenuItem = ({ id, menu, arrow, textColor, menuTextColor, depth = 0,
|
|
|
36
36
|
})
|
|
37
37
|
}),
|
|
38
38
|
renderChild && /*#__PURE__*/ jsx("div", {
|
|
39
|
-
className: cls('gp-invisible gp-absolute gp-min-w-max gp-opacity-0 gp-transition-all gp-duration-300 gp-ease-in-out [li:hover>div&]:gp-visible [li:hover>div&]:gp-opacity-100', {
|
|
39
|
+
className: cls('gp-invisible gp-absolute gp-min-w-max gp-opacity-0 gp-transition-all gp-duration-300 gp-ease-in-out [li:hover>div&]:gp-visible [li:hover>div&]:gp-opacity-100 gp-z-[100]', {
|
|
40
40
|
'gp-left-0 gp-top-full': depth === 0,
|
|
41
41
|
'gp-left-full gp-top-0 gp-translate-y-4 [li:hover>div&]:gp-translate-y-0': depth === 1
|
|
42
42
|
}),
|
|
43
43
|
children: /*#__PURE__*/ jsx("ul", {
|
|
44
|
-
className: cls('gp-flex gp-flex-col gp-shadow-card-2', {
|
|
44
|
+
className: cls('gp-flex gp-flex-col gp-shadow-card-2 gp-relative', {
|
|
45
45
|
'gp-ml-4': depth === 1
|
|
46
46
|
}),
|
|
47
47
|
style: {
|
|
@@ -133,7 +133,7 @@ const HeaderSettings = [
|
|
|
133
133
|
devices: {
|
|
134
134
|
desktop: {
|
|
135
135
|
default: {
|
|
136
|
-
src: 'https://ucarecdn.com/
|
|
136
|
+
src: 'https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/',
|
|
137
137
|
width: 800,
|
|
138
138
|
height: 533
|
|
139
139
|
}
|
|
@@ -258,7 +258,7 @@ const HeaderSettings = [
|
|
|
258
258
|
id: 'arrow',
|
|
259
259
|
label: 'Arrow Icon',
|
|
260
260
|
type: 'icon',
|
|
261
|
-
default: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="#F9F9F9"/></svg>`
|
|
261
|
+
default: `<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="#F9F9F9"/></svg>`
|
|
262
262
|
},
|
|
263
263
|
// {
|
|
264
264
|
// id: 'buyNow',
|
|
@@ -298,7 +298,7 @@ const HeaderSettings = [
|
|
|
298
298
|
id: 'cartIcon',
|
|
299
299
|
label: 'Cart Icon',
|
|
300
300
|
type: 'icon',
|
|
301
|
-
default: `<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>`
|
|
301
|
+
default: `<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>`
|
|
302
302
|
}
|
|
303
303
|
]
|
|
304
304
|
}
|
|
@@ -86,7 +86,7 @@ const SettingUIV2 = [
|
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
label: {
|
|
89
|
-
en: '
|
|
89
|
+
en: 'Menu item style'
|
|
90
90
|
},
|
|
91
91
|
controls: [
|
|
92
92
|
{
|
|
@@ -233,7 +233,7 @@ const SettingUIV2 = [
|
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
235
|
label: {
|
|
236
|
-
en: 'Icon
|
|
236
|
+
en: 'Icon color'
|
|
237
237
|
},
|
|
238
238
|
setting: {
|
|
239
239
|
id: 'cartIconColor',
|
|
@@ -294,6 +294,21 @@ const SettingUIV2 = [
|
|
|
294
294
|
]
|
|
295
295
|
},
|
|
296
296
|
layout: 'horizontal'
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
label: {
|
|
300
|
+
en: 'Padding',
|
|
301
|
+
cn: '填充',
|
|
302
|
+
es: 'Relleno'
|
|
303
|
+
},
|
|
304
|
+
controlConfig: {
|
|
305
|
+
id: 'padding',
|
|
306
|
+
type: 'padding-v2',
|
|
307
|
+
linkWithSetting: {
|
|
308
|
+
name: 'spacing-setting',
|
|
309
|
+
field: 'padding'
|
|
310
|
+
}
|
|
311
|
+
}
|
|
297
312
|
}
|
|
298
313
|
]
|
|
299
314
|
},
|
|
@@ -405,6 +420,15 @@ const SettingUIV2 = [
|
|
|
405
420
|
setting: {
|
|
406
421
|
id: 'breakpoint'
|
|
407
422
|
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
layout: 'vertical',
|
|
426
|
+
controlConfig: {
|
|
427
|
+
id: 'showMenuIconBanner',
|
|
428
|
+
type: 'banner',
|
|
429
|
+
message: `The devices that will show menu icon.`,
|
|
430
|
+
closable: true
|
|
431
|
+
}
|
|
408
432
|
}
|
|
409
433
|
]
|
|
410
434
|
}
|