@gem-sdk/components 2.0.0-dev.731 → 2.0.0-dev.733
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/product/setting/product-list/configs/settingsV2.js +8 -1
- package/dist/cjs/product/setting/product-quantity/configs/uiV2.js +2 -1
- package/dist/cjs/sticky/components/hooks/useSticky.js +6 -2
- package/dist/esm/product/setting/product-list/configs/settingsV2.js +8 -1
- package/dist/esm/product/setting/product-quantity/configs/uiV2.js +2 -1
- package/dist/esm/sticky/components/hooks/useSticky.js +6 -2
- package/package.json +4 -3
|
@@ -202,13 +202,20 @@ const ProductListSettingsV2 = [
|
|
|
202
202
|
compoDefaultValue: {
|
|
203
203
|
desktop: {
|
|
204
204
|
default: {
|
|
205
|
+
type: 'image',
|
|
205
206
|
image: {
|
|
206
207
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
207
208
|
width: 1200,
|
|
208
209
|
height: 480
|
|
209
210
|
},
|
|
210
211
|
repeat: 'no-repeat',
|
|
211
|
-
size: 'cover'
|
|
212
|
+
size: 'cover',
|
|
213
|
+
position: {
|
|
214
|
+
x: 50,
|
|
215
|
+
y: 50
|
|
216
|
+
},
|
|
217
|
+
attachment: 'scroll',
|
|
218
|
+
preload: false
|
|
212
219
|
}
|
|
213
220
|
}
|
|
214
221
|
}
|
|
@@ -68,13 +68,17 @@ const useSticky = (setting)=>{
|
|
|
68
68
|
const getCSSPosition = (position)=>{
|
|
69
69
|
return position == 'top' ? 'sticky' : 'fixed';
|
|
70
70
|
};
|
|
71
|
-
const positionStyle = ()=>{
|
|
71
|
+
const positionStyle = React.useMemo(()=>{
|
|
72
72
|
return {
|
|
73
73
|
[`--pos`]: getCSSPosition(position?.desktop),
|
|
74
74
|
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop),
|
|
75
75
|
[`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop)
|
|
76
76
|
};
|
|
77
|
-
}
|
|
77
|
+
}, [
|
|
78
|
+
position?.desktop,
|
|
79
|
+
position?.mobile,
|
|
80
|
+
position?.tablet
|
|
81
|
+
]);
|
|
78
82
|
return {
|
|
79
83
|
w,
|
|
80
84
|
displayStyle,
|
|
@@ -200,13 +200,20 @@ const ProductListSettingsV2 = [
|
|
|
200
200
|
compoDefaultValue: {
|
|
201
201
|
desktop: {
|
|
202
202
|
default: {
|
|
203
|
+
type: 'image',
|
|
203
204
|
image: {
|
|
204
205
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
205
206
|
width: 1200,
|
|
206
207
|
height: 480
|
|
207
208
|
},
|
|
208
209
|
repeat: 'no-repeat',
|
|
209
|
-
size: 'cover'
|
|
210
|
+
size: 'cover',
|
|
211
|
+
position: {
|
|
212
|
+
x: 50,
|
|
213
|
+
y: 50
|
|
214
|
+
},
|
|
215
|
+
attachment: 'scroll',
|
|
216
|
+
preload: false
|
|
210
217
|
}
|
|
211
218
|
}
|
|
212
219
|
}
|
|
@@ -64,13 +64,17 @@ const useSticky = (setting)=>{
|
|
|
64
64
|
const getCSSPosition = (position)=>{
|
|
65
65
|
return position == 'top' ? 'sticky' : 'fixed';
|
|
66
66
|
};
|
|
67
|
-
const positionStyle = ()=>{
|
|
67
|
+
const positionStyle = useMemo(()=>{
|
|
68
68
|
return {
|
|
69
69
|
[`--pos`]: getCSSPosition(position?.desktop),
|
|
70
70
|
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop),
|
|
71
71
|
[`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop)
|
|
72
72
|
};
|
|
73
|
-
}
|
|
73
|
+
}, [
|
|
74
|
+
position?.desktop,
|
|
75
|
+
position?.mobile,
|
|
76
|
+
position?.tablet
|
|
77
|
+
]);
|
|
74
78
|
return {
|
|
75
79
|
w,
|
|
76
80
|
displayStyle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.733",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
28
|
+
"@gem-sdk/core": "2.0.0-dev.733",
|
|
29
29
|
"@gem-sdk/styles": "2.0.0-dev.703",
|
|
30
30
|
"@gem-sdk/system": "2.0.0-dev.695",
|
|
31
31
|
"@types/react-transition-group": "^4.4.5",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"@gem-sdk/keen-slider": "^6.8.8",
|
|
36
36
|
"node-html-parser": "^6.1.13",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"react-youtube": "^10.1.0"
|
|
38
|
+
"react-youtube": "^10.1.0",
|
|
39
|
+
"swiper": "^11.2.8"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"next": ">=13"
|