@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.
@@ -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: {
@@ -42,7 +42,7 @@ const SettingUIV2 = [
42
42
  en: 'Padding'
43
43
  },
44
44
  controlConfig: {
45
- id: 'padding',
45
+ id: 'padding-item-padding',
46
46
  type: 'padding-v2',
47
47
  linkWithSetting: {
48
48
  name: 'itemPadding',
@@ -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}`]: getCSSPosition(position, 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`]: getCSSPosition(position?.desktop),
64
- [`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop, true),
65
- [`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop, true)
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,
@@ -106,7 +106,7 @@ const StickySettingsV2 = [
106
106
  id: 'position',
107
107
  label: 'Layout',
108
108
  type: 'layout-selector',
109
- iconViewBox: '0 0 80 48',
109
+ iconViewBox: '0 0 76 48',
110
110
  itemPerRow: 2,
111
111
  itemSpacing: 'large',
112
112
  options: [
@@ -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-1',
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: {
@@ -40,7 +40,7 @@ const SettingUIV2 = [
40
40
  en: 'Padding'
41
41
  },
42
42
  controlConfig: {
43
- id: 'padding',
43
+ id: 'padding-item-padding',
44
44
  type: 'padding-v2',
45
45
  linkWithSetting: {
46
46
  name: 'itemPadding',
@@ -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}`]: getCSSPosition(position, 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`]: getCSSPosition(position?.desktop),
60
- [`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop, true),
61
- [`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop, true)
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,
@@ -104,7 +104,7 @@ const StickySettingsV2 = [
104
104
  id: 'position',
105
105
  label: 'Layout',
106
106
  type: 'layout-selector',
107
- iconViewBox: '0 0 80 48',
107
+ iconViewBox: '0 0 76 48',
108
108
  itemPerRow: 2,
109
109
  itemSpacing: 'large',
110
110
  options: [
@@ -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-1',
38
+ type: 'shadow-2',
34
39
  distance: '0px',
35
40
  blur: '10px',
36
41
  spread: '0px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.483",
3
+ "version": "2.0.0-dev.484",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",