@gem-sdk/components 2.0.0-dev.483 → 2.0.0-dev.484
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/icon-list/setting/configs/settings.js +14 -2
- package/dist/cjs/icon-list/setting/configs/uiV2.js +1 -1
- package/dist/cjs/sticky/components/common/styles.js +1 -7
- package/dist/cjs/sticky/components/hooks/useSticky.js +4 -14
- package/dist/cjs/sticky/setting/configs/settingsV2.js +1 -1
- package/dist/cjs/sticky/setting/preset-config.js +6 -1
- package/dist/esm/icon-list/setting/configs/settings.js +14 -2
- package/dist/esm/icon-list/setting/configs/uiV2.js +1 -1
- package/dist/esm/sticky/components/common/styles.js +1 -7
- package/dist/esm/sticky/components/hooks/useSticky.js +4 -14
- package/dist/esm/sticky/setting/configs/settingsV2.js +1 -1
- package/dist/esm/sticky/setting/preset-config.js +6 -1
- package/package.json +1 -1
|
@@ -148,7 +148,13 @@ const IconListSettings = [
|
|
|
148
148
|
devices: {
|
|
149
149
|
desktop: {
|
|
150
150
|
default: {
|
|
151
|
-
padding: {
|
|
151
|
+
padding: {
|
|
152
|
+
type: 'medium',
|
|
153
|
+
top: '8px',
|
|
154
|
+
bottom: '8px',
|
|
155
|
+
left: '12px',
|
|
156
|
+
right: '12px'
|
|
157
|
+
}
|
|
152
158
|
}
|
|
153
159
|
}
|
|
154
160
|
},
|
|
@@ -239,7 +245,13 @@ const IconListSettings = [
|
|
|
239
245
|
desktop: {
|
|
240
246
|
default: {
|
|
241
247
|
width: '100%',
|
|
242
|
-
padding: {
|
|
248
|
+
padding: {
|
|
249
|
+
type: 'medium',
|
|
250
|
+
top: '8px',
|
|
251
|
+
bottom: '8px',
|
|
252
|
+
left: '12px',
|
|
253
|
+
right: '12px'
|
|
254
|
+
}
|
|
243
255
|
}
|
|
244
256
|
},
|
|
245
257
|
mobile: {
|
|
@@ -9,17 +9,11 @@ const getDisplayStyle = (device, display, position)=>{
|
|
|
9
9
|
const style = {
|
|
10
10
|
[`--top${device}`]: 'auto',
|
|
11
11
|
[`--${position + device}`]: '0',
|
|
12
|
-
[`--pos${device}`]:
|
|
12
|
+
[`--pos${device}`]: 'fixed'
|
|
13
13
|
};
|
|
14
14
|
if (display === 'after-first-cart-button') style[`--d${device}`] = 'none';
|
|
15
15
|
return style;
|
|
16
16
|
};
|
|
17
|
-
const getCSSPosition = (position, device)=>{
|
|
18
|
-
if (device === '-mobile' || device === '-tablet') {
|
|
19
|
-
return 'fixed';
|
|
20
|
-
}
|
|
21
|
-
return position == 'top' ? 'sticky' : 'fixed';
|
|
22
|
-
};
|
|
23
17
|
const displayConditionStyle = (display, position)=>{
|
|
24
18
|
return {
|
|
25
19
|
...getDisplayStyle('', display?.desktop, position?.desktop),
|
|
@@ -10,12 +10,6 @@ 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, forceFixed)=>{
|
|
14
|
-
if (forceFixed) {
|
|
15
|
-
return 'fixed';
|
|
16
|
-
}
|
|
17
|
-
return position == 'top' ? 'sticky' : 'fixed';
|
|
18
|
-
};
|
|
19
13
|
const getCSSAlignByDevice = (position, device)=>{
|
|
20
14
|
return {
|
|
21
15
|
[`--left${device}`]: position == 'top' ? '0' : '50%',
|
|
@@ -60,15 +54,11 @@ const useSticky = (setting)=>{
|
|
|
60
54
|
]);
|
|
61
55
|
const positionStyle = React.useMemo(()=>{
|
|
62
56
|
return {
|
|
63
|
-
[`--pos`]:
|
|
64
|
-
[`--pos-tablet`]:
|
|
65
|
-
[`--pos-mobile`]:
|
|
57
|
+
[`--pos`]: 'fixed',
|
|
58
|
+
[`--pos-tablet`]: 'fixed',
|
|
59
|
+
[`--pos-mobile`]: 'fixed'
|
|
66
60
|
};
|
|
67
|
-
}, [
|
|
68
|
-
position?.desktop,
|
|
69
|
-
position?.mobile,
|
|
70
|
-
position?.tablet
|
|
71
|
-
]);
|
|
61
|
+
}, []);
|
|
72
62
|
return {
|
|
73
63
|
w,
|
|
74
64
|
displayStyle,
|
|
@@ -23,6 +23,11 @@ const StickyPreset = {
|
|
|
23
23
|
{
|
|
24
24
|
tag: 'Sticky',
|
|
25
25
|
label: 'Sticky',
|
|
26
|
+
settings: {
|
|
27
|
+
width: {
|
|
28
|
+
desktop: '100%'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
26
31
|
advanced: {
|
|
27
32
|
hasBoxShadow: {
|
|
28
33
|
desktop: {
|
|
@@ -32,7 +37,7 @@ const StickyPreset = {
|
|
|
32
37
|
boxShadow: {
|
|
33
38
|
desktop: {
|
|
34
39
|
normal: {
|
|
35
|
-
type: 'shadow-
|
|
40
|
+
type: 'shadow-2',
|
|
36
41
|
distance: '0px',
|
|
37
42
|
blur: '10px',
|
|
38
43
|
spread: '0px',
|
|
@@ -146,7 +146,13 @@ const IconListSettings = [
|
|
|
146
146
|
devices: {
|
|
147
147
|
desktop: {
|
|
148
148
|
default: {
|
|
149
|
-
padding: {
|
|
149
|
+
padding: {
|
|
150
|
+
type: 'medium',
|
|
151
|
+
top: '8px',
|
|
152
|
+
bottom: '8px',
|
|
153
|
+
left: '12px',
|
|
154
|
+
right: '12px'
|
|
155
|
+
}
|
|
150
156
|
}
|
|
151
157
|
}
|
|
152
158
|
},
|
|
@@ -237,7 +243,13 @@ const IconListSettings = [
|
|
|
237
243
|
desktop: {
|
|
238
244
|
default: {
|
|
239
245
|
width: '100%',
|
|
240
|
-
padding: {
|
|
246
|
+
padding: {
|
|
247
|
+
type: 'medium',
|
|
248
|
+
top: '8px',
|
|
249
|
+
bottom: '8px',
|
|
250
|
+
left: '12px',
|
|
251
|
+
right: '12px'
|
|
252
|
+
}
|
|
241
253
|
}
|
|
242
254
|
},
|
|
243
255
|
mobile: {
|
|
@@ -7,17 +7,11 @@ const getDisplayStyle = (device, display, position)=>{
|
|
|
7
7
|
const style = {
|
|
8
8
|
[`--top${device}`]: 'auto',
|
|
9
9
|
[`--${position + device}`]: '0',
|
|
10
|
-
[`--pos${device}`]:
|
|
10
|
+
[`--pos${device}`]: 'fixed'
|
|
11
11
|
};
|
|
12
12
|
if (display === 'after-first-cart-button') style[`--d${device}`] = 'none';
|
|
13
13
|
return style;
|
|
14
14
|
};
|
|
15
|
-
const getCSSPosition = (position, device)=>{
|
|
16
|
-
if (device === '-mobile' || device === '-tablet') {
|
|
17
|
-
return 'fixed';
|
|
18
|
-
}
|
|
19
|
-
return position == 'top' ? 'sticky' : 'fixed';
|
|
20
|
-
};
|
|
21
15
|
const displayConditionStyle = (display, position)=>{
|
|
22
16
|
return {
|
|
23
17
|
...getDisplayStyle('', display?.desktop, position?.desktop),
|
|
@@ -6,12 +6,6 @@ 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, forceFixed)=>{
|
|
10
|
-
if (forceFixed) {
|
|
11
|
-
return 'fixed';
|
|
12
|
-
}
|
|
13
|
-
return position == 'top' ? 'sticky' : 'fixed';
|
|
14
|
-
};
|
|
15
9
|
const getCSSAlignByDevice = (position, device)=>{
|
|
16
10
|
return {
|
|
17
11
|
[`--left${device}`]: position == 'top' ? '0' : '50%',
|
|
@@ -56,15 +50,11 @@ const useSticky = (setting)=>{
|
|
|
56
50
|
]);
|
|
57
51
|
const positionStyle = useMemo(()=>{
|
|
58
52
|
return {
|
|
59
|
-
[`--pos`]:
|
|
60
|
-
[`--pos-tablet`]:
|
|
61
|
-
[`--pos-mobile`]:
|
|
53
|
+
[`--pos`]: 'fixed',
|
|
54
|
+
[`--pos-tablet`]: 'fixed',
|
|
55
|
+
[`--pos-mobile`]: 'fixed'
|
|
62
56
|
};
|
|
63
|
-
}, [
|
|
64
|
-
position?.desktop,
|
|
65
|
-
position?.mobile,
|
|
66
|
-
position?.tablet
|
|
67
|
-
]);
|
|
57
|
+
}, []);
|
|
68
58
|
return {
|
|
69
59
|
w,
|
|
70
60
|
displayStyle,
|
|
@@ -21,6 +21,11 @@ const StickyPreset = {
|
|
|
21
21
|
{
|
|
22
22
|
tag: 'Sticky',
|
|
23
23
|
label: 'Sticky',
|
|
24
|
+
settings: {
|
|
25
|
+
width: {
|
|
26
|
+
desktop: '100%'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
24
29
|
advanced: {
|
|
25
30
|
hasBoxShadow: {
|
|
26
31
|
desktop: {
|
|
@@ -30,7 +35,7 @@ const StickyPreset = {
|
|
|
30
35
|
boxShadow: {
|
|
31
36
|
desktop: {
|
|
32
37
|
normal: {
|
|
33
|
-
type: 'shadow-
|
|
38
|
+
type: 'shadow-2',
|
|
34
39
|
distance: '0px',
|
|
35
40
|
blur: '10px',
|
|
36
41
|
spread: '0px',
|