@gem-sdk/components 2.0.0-dev.475 → 2.0.0-dev.477
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/setting/configs/settingV2.js +5 -2
- package/dist/cjs/coupon/setting/config/settings.js +9 -9
- package/dist/cjs/sticky/components/common/styles.js +3 -3
- package/dist/cjs/sticky/components/hooks/useSticky.js +3 -3
- package/dist/esm/carousel/setting/configs/settingV2.js +5 -2
- package/dist/esm/coupon/setting/config/settings.js +9 -9
- package/dist/esm/sticky/components/common/styles.js +4 -4
- package/dist/esm/sticky/components/hooks/useSticky.js +3 -3
- package/package.json +1 -1
|
@@ -171,8 +171,9 @@ const CarouselSettingsV2Setting = [
|
|
|
171
171
|
{
|
|
172
172
|
id: 'dotGapToCarousel',
|
|
173
173
|
label: 'Gap to carousel',
|
|
174
|
-
type: 'input:
|
|
174
|
+
type: 'input:slider',
|
|
175
175
|
min: 0,
|
|
176
|
+
max: 120,
|
|
176
177
|
devices: {
|
|
177
178
|
desktop: {
|
|
178
179
|
default: 16
|
|
@@ -740,7 +741,9 @@ const CarouselSettingsV2Style = [
|
|
|
740
741
|
{
|
|
741
742
|
id: 'spacing',
|
|
742
743
|
label: 'Items spacing',
|
|
743
|
-
type: 'input:
|
|
744
|
+
type: 'input:slider',
|
|
745
|
+
min: 1,
|
|
746
|
+
max: 120,
|
|
744
747
|
devices: {
|
|
745
748
|
desktop: {
|
|
746
749
|
default: 16
|
|
@@ -6,22 +6,22 @@ const CouponSettings = [
|
|
|
6
6
|
controls: [
|
|
7
7
|
{
|
|
8
8
|
id: 'couponLayout',
|
|
9
|
-
label: '
|
|
10
|
-
type: 'layout-
|
|
11
|
-
iconViewBox: '0 0
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
label: 'Layout',
|
|
10
|
+
type: 'layout-selector',
|
|
11
|
+
iconViewBox: '0 0 80 48',
|
|
12
|
+
itemPerRow: 2,
|
|
13
|
+
itemSpacing: 'large',
|
|
14
14
|
default: 'icon',
|
|
15
15
|
options: [
|
|
16
16
|
{
|
|
17
|
-
label: '
|
|
17
|
+
label: 'Secondary',
|
|
18
18
|
value: 'none',
|
|
19
|
-
|
|
19
|
+
iconName: 'coupon-code-layout'
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
label: '
|
|
22
|
+
label: 'Icon',
|
|
23
23
|
value: 'icon',
|
|
24
|
-
|
|
24
|
+
iconName: 'coupon-code-no-icon-layout'
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
},
|
|
@@ -15,7 +15,7 @@ const getDisplayStyle = (device, display, position)=>{
|
|
|
15
15
|
return style;
|
|
16
16
|
};
|
|
17
17
|
const getCSSPosition = (position, device)=>{
|
|
18
|
-
if (device === '-mobile') {
|
|
18
|
+
if (device === '-mobile' || device === '-tablet') {
|
|
19
19
|
return 'fixed';
|
|
20
20
|
}
|
|
21
21
|
return position == 'top' ? 'sticky' : 'fixed';
|
|
@@ -44,8 +44,8 @@ const getContentStyles = (args)=>{
|
|
|
44
44
|
}),
|
|
45
45
|
...core.makeStyleResponsive('w', width),
|
|
46
46
|
...filterStyles(style),
|
|
47
|
-
...core.
|
|
48
|
-
...core.
|
|
47
|
+
...core.getStyleBackgroundByDevice(background),
|
|
48
|
+
...core.getGradientBgrStyleByDevice(background)
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
const getStylePadding = (style)=>{
|
|
@@ -10,8 +10,8 @@ const useSticky = (setting)=>{
|
|
|
10
10
|
const w = core.makeStyleResponsive('w', width);
|
|
11
11
|
const sidebarMode = core.usePageStore((s)=>s.sidebarMode === 'interaction');
|
|
12
12
|
const currentDevice = core.useCurrentDevice();
|
|
13
|
-
const getCSSPosition = (position,
|
|
14
|
-
if (
|
|
13
|
+
const getCSSPosition = (position, forceFixed)=>{
|
|
14
|
+
if (forceFixed) {
|
|
15
15
|
return 'fixed';
|
|
16
16
|
}
|
|
17
17
|
return position == 'top' ? 'sticky' : 'fixed';
|
|
@@ -61,7 +61,7 @@ const useSticky = (setting)=>{
|
|
|
61
61
|
const positionStyle = React.useMemo(()=>{
|
|
62
62
|
return {
|
|
63
63
|
[`--pos`]: getCSSPosition(position?.desktop),
|
|
64
|
-
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop),
|
|
64
|
+
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop, true),
|
|
65
65
|
[`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop, true)
|
|
66
66
|
};
|
|
67
67
|
}, [
|
|
@@ -169,8 +169,9 @@ const CarouselSettingsV2Setting = [
|
|
|
169
169
|
{
|
|
170
170
|
id: 'dotGapToCarousel',
|
|
171
171
|
label: 'Gap to carousel',
|
|
172
|
-
type: 'input:
|
|
172
|
+
type: 'input:slider',
|
|
173
173
|
min: 0,
|
|
174
|
+
max: 120,
|
|
174
175
|
devices: {
|
|
175
176
|
desktop: {
|
|
176
177
|
default: 16
|
|
@@ -738,7 +739,9 @@ const CarouselSettingsV2Style = [
|
|
|
738
739
|
{
|
|
739
740
|
id: 'spacing',
|
|
740
741
|
label: 'Items spacing',
|
|
741
|
-
type: 'input:
|
|
742
|
+
type: 'input:slider',
|
|
743
|
+
min: 1,
|
|
744
|
+
max: 120,
|
|
742
745
|
devices: {
|
|
743
746
|
desktop: {
|
|
744
747
|
default: 16
|
|
@@ -4,22 +4,22 @@ const CouponSettings = [
|
|
|
4
4
|
controls: [
|
|
5
5
|
{
|
|
6
6
|
id: 'couponLayout',
|
|
7
|
-
label: '
|
|
8
|
-
type: 'layout-
|
|
9
|
-
iconViewBox: '0 0
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
label: 'Layout',
|
|
8
|
+
type: 'layout-selector',
|
|
9
|
+
iconViewBox: '0 0 80 48',
|
|
10
|
+
itemPerRow: 2,
|
|
11
|
+
itemSpacing: 'large',
|
|
12
12
|
default: 'icon',
|
|
13
13
|
options: [
|
|
14
14
|
{
|
|
15
|
-
label: '
|
|
15
|
+
label: 'Secondary',
|
|
16
16
|
value: 'none',
|
|
17
|
-
|
|
17
|
+
iconName: 'coupon-code-layout'
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
label: '
|
|
20
|
+
label: 'Icon',
|
|
21
21
|
value: 'icon',
|
|
22
|
-
|
|
22
|
+
iconName: 'coupon-code-no-icon-layout'
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeStyle, makeStyleResponsive,
|
|
1
|
+
import { makeStyle, makeStyleResponsive, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import { ELEMENT_Z_INDEX } from '../../../common/const.js';
|
|
@@ -13,7 +13,7 @@ const getDisplayStyle = (device, display, position)=>{
|
|
|
13
13
|
return style;
|
|
14
14
|
};
|
|
15
15
|
const getCSSPosition = (position, device)=>{
|
|
16
|
-
if (device === '-mobile') {
|
|
16
|
+
if (device === '-mobile' || device === '-tablet') {
|
|
17
17
|
return 'fixed';
|
|
18
18
|
}
|
|
19
19
|
return position == 'top' ? 'sticky' : 'fixed';
|
|
@@ -42,8 +42,8 @@ const getContentStyles = (args)=>{
|
|
|
42
42
|
}),
|
|
43
43
|
...makeStyleResponsive('w', width),
|
|
44
44
|
...filterStyles(style),
|
|
45
|
-
...
|
|
46
|
-
...
|
|
45
|
+
...getStyleBackgroundByDevice(background),
|
|
46
|
+
...getGradientBgrStyleByDevice(background)
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
const getStylePadding = (style)=>{
|
|
@@ -6,8 +6,8 @@ const useSticky = (setting)=>{
|
|
|
6
6
|
const w = makeStyleResponsive('w', width);
|
|
7
7
|
const sidebarMode = usePageStore((s)=>s.sidebarMode === 'interaction');
|
|
8
8
|
const currentDevice = useCurrentDevice();
|
|
9
|
-
const getCSSPosition = (position,
|
|
10
|
-
if (
|
|
9
|
+
const getCSSPosition = (position, forceFixed)=>{
|
|
10
|
+
if (forceFixed) {
|
|
11
11
|
return 'fixed';
|
|
12
12
|
}
|
|
13
13
|
return position == 'top' ? 'sticky' : 'fixed';
|
|
@@ -57,7 +57,7 @@ const useSticky = (setting)=>{
|
|
|
57
57
|
const positionStyle = useMemo(()=>{
|
|
58
58
|
return {
|
|
59
59
|
[`--pos`]: getCSSPosition(position?.desktop),
|
|
60
|
-
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop),
|
|
60
|
+
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop, true),
|
|
61
61
|
[`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop, true)
|
|
62
62
|
};
|
|
63
63
|
}, [
|