@gem-sdk/components 2.0.0-dev.423 → 2.0.0-dev.424
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/banner/components/HeroBanner.liquid.js +2 -1
- package/dist/cjs/banner/components/common/getClasses.js +5 -2
- package/dist/cjs/banner/setting/setting.js +1 -3
- package/dist/cjs/banner/setting/uiV2.js +34 -29
- package/dist/esm/banner/components/HeroBanner.liquid.js +2 -1
- package/dist/esm/banner/components/common/getClasses.js +5 -2
- package/dist/esm/banner/setting/setting.js +1 -3
- package/dist/esm/banner/setting/uiV2.js +34 -29
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -28,7 +28,8 @@ const HeroBanner = (props)=>{
|
|
|
28
28
|
contentPosition2Col: styles?.contentPosition2Col,
|
|
29
29
|
aspectRatio: setting?.aspectRatio,
|
|
30
30
|
target: urlData?.target ?? '_blank',
|
|
31
|
-
href: urlData?.href ?? ''
|
|
31
|
+
href: urlData?.href ?? '',
|
|
32
|
+
linkType: link?.type ?? ''
|
|
32
33
|
});
|
|
33
34
|
const hasLinkCover = !!link?.link;
|
|
34
35
|
const attrs = system.createAttr({
|
|
@@ -45,8 +45,11 @@ const getRowClasses = (styles, setting)=>{
|
|
|
45
45
|
const fitContentClass = common.getClassForContentByFitContent(sizeSetting, background);
|
|
46
46
|
const stretchContentClass = common.getClassForStretchContent(verticalAlign);
|
|
47
47
|
const layoutClass = common.getClassSpaceBetween(setting?.layout || {}, styles?.contentPosition1Col || {}, styles?.contentPosition2Col || {});
|
|
48
|
-
const classList = `gp-hero-banner-row gp-
|
|
49
|
-
return
|
|
48
|
+
const classList = `gp-hero-banner-row gp-transition-all gp-duration-300 group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))] ${fitContentClass} ${stretchContentClass}`;
|
|
49
|
+
return {
|
|
50
|
+
...composeClasses(classList),
|
|
51
|
+
...layoutClass
|
|
52
|
+
};
|
|
50
53
|
};
|
|
51
54
|
const getAdaptiveClasses = ()=>{
|
|
52
55
|
const classList = `adaptive-hero-banner`;
|
|
@@ -164,6 +164,7 @@ const SettingsV2 = [
|
|
|
164
164
|
label: 'Speed',
|
|
165
165
|
useOnlyUnitInit: true,
|
|
166
166
|
hideUnit: true,
|
|
167
|
+
isNumber: true,
|
|
167
168
|
min: 0,
|
|
168
169
|
max: 1,
|
|
169
170
|
step: 0.1,
|
|
@@ -670,9 +671,6 @@ const SettingsV2 = [
|
|
|
670
671
|
id: 'overlayColor',
|
|
671
672
|
label: 'Color',
|
|
672
673
|
type: 'color-picker-v2',
|
|
673
|
-
default: {
|
|
674
|
-
normal: '#121212'
|
|
675
|
-
},
|
|
676
674
|
state: {
|
|
677
675
|
normal: true,
|
|
678
676
|
hover: true
|
|
@@ -104,36 +104,41 @@ const SettingUIV2 = [
|
|
|
104
104
|
id: 'background'
|
|
105
105
|
},
|
|
106
106
|
layout: 'vertical'
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
controls: [
|
|
116
|
-
{
|
|
117
|
-
setting: {
|
|
118
|
-
id: 'overlayColor',
|
|
119
|
-
state: 'normal'
|
|
120
|
-
},
|
|
121
|
-
label: {
|
|
122
|
-
en: 'Color'
|
|
123
|
-
}
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
moreSettings: {
|
|
110
|
+
type: 'collapse',
|
|
111
|
+
controls: [
|
|
112
|
+
{
|
|
113
|
+
label: {
|
|
114
|
+
en: 'Overlay'
|
|
124
115
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
116
|
+
type: 'combo',
|
|
117
|
+
comboType: 'color',
|
|
118
|
+
getValueFromSettingID: 'overlayColor.normal',
|
|
119
|
+
controls: [
|
|
120
|
+
{
|
|
121
|
+
setting: {
|
|
122
|
+
id: 'overlayColor',
|
|
123
|
+
state: 'normal'
|
|
124
|
+
},
|
|
125
|
+
label: {
|
|
126
|
+
en: 'Color'
|
|
127
|
+
}
|
|
129
128
|
},
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
{
|
|
130
|
+
setting: {
|
|
131
|
+
id: 'overlayOpacity',
|
|
132
|
+
state: 'normal'
|
|
133
|
+
},
|
|
134
|
+
label: {
|
|
135
|
+
en: 'Opacity'
|
|
136
|
+
}
|
|
132
137
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
137
142
|
},
|
|
138
143
|
{
|
|
139
144
|
label: {
|
|
@@ -247,7 +252,7 @@ const SettingUIV2 = [
|
|
|
247
252
|
{
|
|
248
253
|
type: 'combo',
|
|
249
254
|
fixedValue: 'Effect',
|
|
250
|
-
iconName: 'polaris-
|
|
255
|
+
iconName: 'polaris-check-clicked',
|
|
251
256
|
label: {
|
|
252
257
|
en: 'Hover'
|
|
253
258
|
},
|
|
@@ -311,7 +316,7 @@ const SettingUIV2 = [
|
|
|
311
316
|
label: {
|
|
312
317
|
en: 'Parallax scroll'
|
|
313
318
|
},
|
|
314
|
-
iconName: 'polaris-
|
|
319
|
+
iconName: 'polaris-parallax-effect',
|
|
315
320
|
getValueFromSettingID: 'speedParallax',
|
|
316
321
|
defaultValueWhenClear: 0,
|
|
317
322
|
controls: [
|
|
@@ -24,7 +24,8 @@ const HeroBanner = (props)=>{
|
|
|
24
24
|
contentPosition2Col: styles?.contentPosition2Col,
|
|
25
25
|
aspectRatio: setting?.aspectRatio,
|
|
26
26
|
target: urlData?.target ?? '_blank',
|
|
27
|
-
href: urlData?.href ?? ''
|
|
27
|
+
href: urlData?.href ?? '',
|
|
28
|
+
linkType: link?.type ?? ''
|
|
28
29
|
});
|
|
29
30
|
const hasLinkCover = !!link?.link;
|
|
30
31
|
const attrs = createAttr({
|
|
@@ -43,8 +43,11 @@ const getRowClasses = (styles, setting)=>{
|
|
|
43
43
|
const fitContentClass = getClassForContentByFitContent(sizeSetting, background);
|
|
44
44
|
const stretchContentClass = getClassForStretchContent(verticalAlign);
|
|
45
45
|
const layoutClass = getClassSpaceBetween(setting?.layout || {}, styles?.contentPosition1Col || {}, styles?.contentPosition2Col || {});
|
|
46
|
-
const classList = `gp-hero-banner-row gp-
|
|
47
|
-
return
|
|
46
|
+
const classList = `gp-hero-banner-row gp-transition-all gp-duration-300 group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))] ${fitContentClass} ${stretchContentClass}`;
|
|
47
|
+
return {
|
|
48
|
+
...composeClasses(classList),
|
|
49
|
+
...layoutClass
|
|
50
|
+
};
|
|
48
51
|
};
|
|
49
52
|
const getAdaptiveClasses = ()=>{
|
|
50
53
|
const classList = `adaptive-hero-banner`;
|
|
@@ -162,6 +162,7 @@ const SettingsV2 = [
|
|
|
162
162
|
label: 'Speed',
|
|
163
163
|
useOnlyUnitInit: true,
|
|
164
164
|
hideUnit: true,
|
|
165
|
+
isNumber: true,
|
|
165
166
|
min: 0,
|
|
166
167
|
max: 1,
|
|
167
168
|
step: 0.1,
|
|
@@ -668,9 +669,6 @@ const SettingsV2 = [
|
|
|
668
669
|
id: 'overlayColor',
|
|
669
670
|
label: 'Color',
|
|
670
671
|
type: 'color-picker-v2',
|
|
671
|
-
default: {
|
|
672
|
-
normal: '#121212'
|
|
673
|
-
},
|
|
674
672
|
state: {
|
|
675
673
|
normal: true,
|
|
676
674
|
hover: true
|
|
@@ -102,36 +102,41 @@ const SettingUIV2 = [
|
|
|
102
102
|
id: 'background'
|
|
103
103
|
},
|
|
104
104
|
layout: 'vertical'
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
controls: [
|
|
114
|
-
{
|
|
115
|
-
setting: {
|
|
116
|
-
id: 'overlayColor',
|
|
117
|
-
state: 'normal'
|
|
118
|
-
},
|
|
119
|
-
label: {
|
|
120
|
-
en: 'Color'
|
|
121
|
-
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
moreSettings: {
|
|
108
|
+
type: 'collapse',
|
|
109
|
+
controls: [
|
|
110
|
+
{
|
|
111
|
+
label: {
|
|
112
|
+
en: 'Overlay'
|
|
122
113
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
114
|
+
type: 'combo',
|
|
115
|
+
comboType: 'color',
|
|
116
|
+
getValueFromSettingID: 'overlayColor.normal',
|
|
117
|
+
controls: [
|
|
118
|
+
{
|
|
119
|
+
setting: {
|
|
120
|
+
id: 'overlayColor',
|
|
121
|
+
state: 'normal'
|
|
122
|
+
},
|
|
123
|
+
label: {
|
|
124
|
+
en: 'Color'
|
|
125
|
+
}
|
|
127
126
|
},
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
{
|
|
128
|
+
setting: {
|
|
129
|
+
id: 'overlayOpacity',
|
|
130
|
+
state: 'normal'
|
|
131
|
+
},
|
|
132
|
+
label: {
|
|
133
|
+
en: 'Opacity'
|
|
134
|
+
}
|
|
130
135
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
135
140
|
},
|
|
136
141
|
{
|
|
137
142
|
label: {
|
|
@@ -245,7 +250,7 @@ const SettingUIV2 = [
|
|
|
245
250
|
{
|
|
246
251
|
type: 'combo',
|
|
247
252
|
fixedValue: 'Effect',
|
|
248
|
-
iconName: 'polaris-
|
|
253
|
+
iconName: 'polaris-check-clicked',
|
|
249
254
|
label: {
|
|
250
255
|
en: 'Hover'
|
|
251
256
|
},
|
|
@@ -309,7 +314,7 @@ const SettingUIV2 = [
|
|
|
309
314
|
label: {
|
|
310
315
|
en: 'Parallax scroll'
|
|
311
316
|
},
|
|
312
|
-
iconName: 'polaris-
|
|
317
|
+
iconName: 'polaris-parallax-effect',
|
|
313
318
|
getValueFromSettingID: 'speedParallax',
|
|
314
319
|
defaultValueWhenClear: 0,
|
|
315
320
|
controls: [
|
package/dist/types/index.d.ts
CHANGED