@gem-sdk/components 2.0.0-dev.424 → 2.0.0-dev.426

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.
@@ -3,24 +3,34 @@
3
3
  var core = require('@gem-sdk/core');
4
4
 
5
5
  const getContainerStyles = (style, styles, extraData)=>{
6
- const { align, background } = styles || {};
6
+ const { align, background, globalSize } = styles || {};
7
+ const composePadding = core.makeGlobalSize(globalSize);
7
8
  return {
8
9
  ...style,
9
10
  ...extraData?.advancedClasses,
11
+ ...composePadding.width,
12
+ ...composePadding.padding,
10
13
  ...core.makeStyleResponsive('ta', align),
11
14
  ...core.getStyleBackgroundByDevice(background, {
12
15
  liquid: extraData?.isLiquid
13
- })
16
+ }),
17
+ ...core.getGradientBgrStyleByDevice(background)
14
18
  };
15
19
  };
16
- const getItemStyles = (horizontalSpacing)=>{
20
+ const getItemStyles = (parentStyles)=>{
21
+ const composePadding = core.makeGlobalSize(parentStyles?.itemPadding);
17
22
  return {
18
- ...core.makeStyleResponsive('cg', horizontalSpacing)
23
+ ...composePadding.padding,
24
+ ...core.getResponsiveStyleShadowWithoutState(parentStyles?.itemBoxShadow, 'box-shadow', parentStyles?.itemBoxShadow),
25
+ ...core.composeRadiusResponsive(parentStyles?.itemRounded),
26
+ ...core.composeBorderResponsive(parentStyles?.itemBorder),
27
+ ...core.getGlobalColorResponsiveStyle('bgc', parentStyles?.itemBackgroundColor),
28
+ ...core.makeStyleResponsive('cg', parentStyles?.horizontalSpacing)
19
29
  };
20
30
  };
21
- const getUlStyles = (verticalSpacing)=>{
31
+ const getUlStyles = (parentStyles)=>{
22
32
  return {
23
- ...core.makeStyleResponsive('rg', verticalSpacing)
33
+ ...core.makeStyleResponsive('gg', parentStyles?.verticalSpacing)
24
34
  };
25
35
  };
26
36
 
@@ -13,13 +13,13 @@ var classes = require('../common/classes.js');
13
13
 
14
14
  const IconList = ({ style, setting, children, styles: styles$1, builderProps, advanced })=>{
15
15
  const { preload } = setting || {};
16
- const { background, horizontalSpacing, verticalSpacing } = styles$1 ?? {};
16
+ const { background } = styles$1 ?? {};
17
17
  const advancedStyle = core.composeAdvanceStyle(advanced);
18
18
  const computedContainerStyles = system.createStyle(styles.getContainerStyles(style, styles$1, {
19
19
  advancedClasses: advancedStyle
20
20
  }));
21
21
  const computedUlClasses = system.createClass(classes.getUlClasses(advanced?.cssClass));
22
- const computedUlStyles = system.createStyle(styles.getUlStyles(verticalSpacing));
22
+ const computedUlStyles = system.createStyle(styles.getUlStyles(styles$1));
23
23
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
24
24
  children: [
25
25
  system.If(preload, /*#__PURE__*/ jsxRuntime.jsxs(Head, {
@@ -56,7 +56,7 @@ const IconList = ({ style, setting, children, styles: styles$1, builderProps, ad
56
56
  return /*#__PURE__*/ jsxRuntime.jsx(child.type, {
57
57
  ...child.props,
58
58
  parentUid: builderProps?.uid,
59
- horizontalSpacing: horizontalSpacing,
59
+ parentStyles: styles$1,
60
60
  dataIndex: key
61
61
  });
62
62
  }
@@ -10,14 +10,14 @@ var classes = require('../common/classes.js');
10
10
 
11
11
  const IconList = ({ builderProps, style, setting, rawChildren, styles: styles$1, advanced })=>{
12
12
  const { preload } = setting || {};
13
- const { background, horizontalSpacing, verticalSpacing } = styles$1 || {};
13
+ const { background } = styles$1 || {};
14
14
  const advancedStyle = core.composeAdvanceStyle(advanced);
15
15
  const computedContainerStyles = system.createStyle(styles.getContainerStyles(style, styles$1, {
16
16
  advancedClasses: advancedStyle,
17
17
  isLiquid: true
18
18
  }));
19
19
  const computedUlClasses = system.createClass(classes.getUlClasses(advanced?.cssClass));
20
- const computedUlStyles = system.createStyle(styles.getUlStyles(verticalSpacing));
20
+ const computedUlStyles = system.createStyle(styles.getUlStyles(styles$1));
21
21
  return core.template`
22
22
  ${system.If(!!preload, `${system.If(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}
23
23
  ${system.If(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}
@@ -37,9 +37,9 @@ const IconList = ({ builderProps, style, setting, rawChildren, styles: styles$1,
37
37
  if (child) {
38
38
  return core.RenderChildren({
39
39
  ...child,
40
- horizontalSpacing: horizontalSpacing,
41
40
  dataIndex: index,
42
- parentUid: builderProps?.uid
41
+ parentUid: builderProps?.uid,
42
+ parentStyles: styles$1
43
43
  });
44
44
  }
45
45
  }))}
@@ -11,7 +11,7 @@ var classes = require('../common/classes.js');
11
11
  var attrs = require('../common/attrs.js');
12
12
  var styles = require('../common/styles.js');
13
13
 
14
- const IconListItem = ({ children, horizontalSpacing, parentUid, builderProps, dataIndex })=>{
14
+ const IconListItem = ({ children, parentUid, builderProps, dataIndex, parentStyles })=>{
15
15
  if (core.isEmptyChildren(children)) {
16
16
  return null;
17
17
  }
@@ -19,7 +19,7 @@ const IconListItem = ({ children, horizontalSpacing, parentUid, builderProps, da
19
19
  const computedItemAttrs = system.createAttr({
20
20
  ...attrs.getItemAttrs(builderProps?.uid, dataIndex)
21
21
  });
22
- const computedItemStyles = system.createStyle(styles.getItemStyles(horizontalSpacing));
22
+ const computedItemStyles = system.createStyle(styles.getItemStyles(parentStyles));
23
23
  return /*#__PURE__*/ jsxRuntime.jsx("li", {
24
24
  className: computedItemClasses,
25
25
  ...computedItemAttrs,
@@ -8,7 +8,7 @@ var classes = require('../common/classes.js');
8
8
  var attrs = require('../common/attrs.js');
9
9
  var styles = require('../common/styles.js');
10
10
 
11
- const IconListItem = ({ children, horizontalSpacing, dataIndex, parentUid, builderProps })=>{
11
+ const IconListItem = ({ children, dataIndex, parentUid, builderProps, parentStyles })=>{
12
12
  if (core.isEmptyChildren(children)) {
13
13
  return null;
14
14
  }
@@ -16,7 +16,7 @@ const IconListItem = ({ children, horizontalSpacing, dataIndex, parentUid, build
16
16
  const computedItemAttrs = system.createAttr({
17
17
  ...attrs.getItemAttrs(builderProps?.uid, dataIndex)
18
18
  });
19
- const computedItemStyles = system.createStyle(styles.getItemStyles(horizontalSpacing));
19
+ const computedItemStyles = system.createStyle(styles.getItemStyles(parentStyles));
20
20
  return core.template`
21
21
  <li
22
22
  ${computedItemAttrs}
@@ -106,7 +106,8 @@ const config = {
106
106
  settings: {
107
107
  childItem: [
108
108
  'Icon 1',
109
- 'Icon 2'
109
+ 'Icon 2',
110
+ 'Icon 3'
110
111
  ],
111
112
  presetId: 'icon-list-ver1-2-image'
112
113
  },
@@ -121,6 +122,7 @@ const config = {
121
122
  },
122
123
  childrens: [
123
124
  ItemTemplate.itemChildrenTemplateImage('https://ucarecdn.com/3257c87e-309b-47fb-9768-afe83fdfc2f1/-/format/auto/'),
125
+ ItemTemplate.itemChildrenTemplateImage('https://ucarecdn.com/07ff9dcd-e56b-4722-a176-fefe7a15e136/-/format/auto/'),
124
126
  ItemTemplate.itemChildrenTemplateImage('https://ucarecdn.com/07ff9dcd-e56b-4722-a176-fefe7a15e136/-/format/auto/')
125
127
  ]
126
128
  }
@@ -12,7 +12,8 @@ const IconListSettings = [
12
12
  type: 'child-item',
13
13
  default: [
14
14
  'Icon 1',
15
- 'Icon 2'
15
+ 'Icon 2',
16
+ 'Icon 3'
16
17
  ],
17
18
  childTemplate: {
18
19
  default: ItemTemplate.itemControlTemplate,
@@ -59,7 +60,7 @@ const IconListSettings = [
59
60
  desktop: {
60
61
  default: {
61
62
  type: 'color',
62
- color: '#DDDDDD',
63
+ color: 'bg-2',
63
64
  image: {
64
65
  src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
65
66
  width: 1200,
@@ -112,28 +113,154 @@ const IconListSettings = [
112
113
  {
113
114
  id: 'horizontalSpacing',
114
115
  label: 'Horizontal Spacing',
115
- type: 'input:unit',
116
+ type: 'input:slider',
116
117
  units: [
117
118
  'px'
118
119
  ],
120
+ step: 1,
121
+ min: 0,
122
+ max: 40,
119
123
  devices: {
120
124
  desktop: {
121
- default: '16'
125
+ default: '12px'
122
126
  }
123
127
  }
124
128
  },
125
129
  {
126
130
  id: 'verticalSpacing',
127
131
  label: 'Vertical Spacing',
128
- type: 'input:unit',
132
+ type: 'input:slider',
129
133
  units: [
130
134
  'px'
131
135
  ],
136
+ step: 1,
137
+ min: 0,
138
+ max: 40,
132
139
  devices: {
133
140
  desktop: {
134
- default: '16'
141
+ default: '12px'
135
142
  }
136
143
  }
144
+ },
145
+ {
146
+ id: 'itemPadding',
147
+ type: 'size-setting',
148
+ devices: {
149
+ desktop: {
150
+ default: {
151
+ padding: {}
152
+ }
153
+ }
154
+ },
155
+ hiddenSettings: [
156
+ 'shape',
157
+ 'gap',
158
+ 'height',
159
+ 'width'
160
+ ]
161
+ },
162
+ {
163
+ id: 'itemBackgroundColor',
164
+ type: 'color-picker-v2',
165
+ devices: {
166
+ desktop: {
167
+ default: 'transparent'
168
+ }
169
+ },
170
+ compoDefaultValue: {
171
+ desktop: {
172
+ default: 'bg-2'
173
+ }
174
+ },
175
+ enableGradient: true
176
+ },
177
+ {
178
+ id: 'itemBorder',
179
+ type: 'border-v2',
180
+ devices: {
181
+ desktop: {
182
+ default: {}
183
+ }
184
+ },
185
+ compoDefaultValue: {
186
+ desktop: {
187
+ default: {
188
+ border: 'solid',
189
+ color: '#121212',
190
+ width: '1px',
191
+ borderWidth: '1px'
192
+ }
193
+ }
194
+ }
195
+ },
196
+ {
197
+ id: 'itemRounded',
198
+ type: 'corner-v2',
199
+ devices: {
200
+ desktop: {}
201
+ },
202
+ compoDefaultValue: {
203
+ desktop: {
204
+ default: {
205
+ btrr: '8px',
206
+ bblr: '8px',
207
+ bbrr: '8px',
208
+ btlr: '8px',
209
+ radiusType: 'rounded'
210
+ }
211
+ }
212
+ }
213
+ },
214
+ {
215
+ id: 'itemBoxShadow',
216
+ type: 'shadow-v2',
217
+ devices: {
218
+ desktop: {
219
+ default: {}
220
+ }
221
+ },
222
+ compoDefaultValue: {
223
+ desktop: {
224
+ default: {
225
+ type: 'shadow-1',
226
+ distance: '4px',
227
+ blur: '4px',
228
+ spread: '0px',
229
+ color: '#121212',
230
+ angle: 45
231
+ }
232
+ }
233
+ }
234
+ },
235
+ {
236
+ id: 'globalSize',
237
+ type: 'size-setting',
238
+ devices: {
239
+ desktop: {
240
+ default: {
241
+ width: '100%',
242
+ padding: {}
243
+ }
244
+ },
245
+ mobile: {
246
+ default: {
247
+ width: '100%'
248
+ }
249
+ }
250
+ },
251
+ settingConfig: {
252
+ width: {
253
+ displayOptions: [
254
+ 'full',
255
+ 'auto'
256
+ ]
257
+ }
258
+ },
259
+ hiddenSettings: [
260
+ 'shape',
261
+ 'gap',
262
+ 'height'
263
+ ]
137
264
  }
138
265
  ]
139
266
  }
@@ -8,7 +8,7 @@ const SettingUIV2 = [
8
8
  controls: [
9
9
  {
10
10
  label: {
11
- en: 'Items'
11
+ en: 'Order'
12
12
  },
13
13
  setting: {
14
14
  id: 'childItem'
@@ -16,10 +16,85 @@ const SettingUIV2 = [
16
16
  }
17
17
  ]
18
18
  },
19
+ {
20
+ label: {
21
+ en: 'Item spacing'
22
+ },
23
+ controls: [
24
+ {
25
+ label: {
26
+ en: 'Gap'
27
+ },
28
+ setting: {
29
+ id: 'verticalSpacing'
30
+ }
31
+ }
32
+ ]
33
+ },
19
34
  {
20
35
  label: {
21
36
  en: 'Item style'
22
37
  },
38
+ moreSettings: {
39
+ controls: [
40
+ {
41
+ label: {
42
+ en: 'Padding'
43
+ },
44
+ controlConfig: {
45
+ id: 'padding',
46
+ type: 'padding-v2',
47
+ linkWithSetting: {
48
+ name: 'itemPadding',
49
+ field: 'padding'
50
+ },
51
+ compoDefaultValue: {
52
+ desktop: {
53
+ default: {
54
+ type: 'medium',
55
+ top: '8px',
56
+ bottom: '8px',
57
+ left: '12px',
58
+ right: '12px'
59
+ }
60
+ }
61
+ }
62
+ }
63
+ },
64
+ {
65
+ label: {
66
+ en: 'Background'
67
+ },
68
+ setting: {
69
+ id: 'itemBackgroundColor'
70
+ }
71
+ },
72
+ {
73
+ label: {
74
+ en: 'Border'
75
+ },
76
+ setting: {
77
+ id: 'itemBorder'
78
+ }
79
+ },
80
+ {
81
+ label: {
82
+ en: 'Corner'
83
+ },
84
+ setting: {
85
+ id: 'itemRounded'
86
+ }
87
+ },
88
+ {
89
+ label: {
90
+ en: 'Shadow'
91
+ },
92
+ setting: {
93
+ id: 'itemBoxShadow'
94
+ }
95
+ }
96
+ ]
97
+ },
23
98
  controls: [
24
99
  {
25
100
  label: {
@@ -33,15 +108,66 @@ const SettingUIV2 = [
33
108
  },
34
109
  {
35
110
  label: {
36
- en: 'Item gap'
111
+ en: 'Size'
37
112
  },
38
113
  controls: [
39
114
  {
115
+ id: 'Width',
40
116
  label: {
41
- en: 'Gap'
117
+ en: 'Width'
42
118
  },
43
- setting: {
44
- id: 'horizontalSpacing'
119
+ controlConfig: {
120
+ id: 'width',
121
+ type: 'dropdown:input',
122
+ label: 'Width',
123
+ inputType: 'number',
124
+ units: [
125
+ 'px',
126
+ '%'
127
+ ],
128
+ hideUnit: false,
129
+ fallbackValue: 'Auto',
130
+ linkWithSetting: {
131
+ name: 'globalSize',
132
+ field: 'width'
133
+ },
134
+ displayOptions: [
135
+ {
136
+ label: 'Fit content',
137
+ value: 'Auto',
138
+ showValue: true
139
+ },
140
+ {
141
+ label: 'Full',
142
+ value: '100%',
143
+ showValue: true
144
+ }
145
+ ]
146
+ },
147
+ layout: 'horizontal'
148
+ },
149
+ {
150
+ label: {
151
+ en: 'Padding'
152
+ },
153
+ controlConfig: {
154
+ id: 'padding',
155
+ type: 'padding-v2',
156
+ linkWithSetting: {
157
+ name: 'globalSize',
158
+ field: 'padding'
159
+ },
160
+ compoDefaultValue: {
161
+ desktop: {
162
+ default: {
163
+ type: 'medium',
164
+ top: '16px',
165
+ bottom: '12px',
166
+ left: '16px',
167
+ right: '16px'
168
+ }
169
+ }
170
+ }
45
171
  }
46
172
  }
47
173
  ]
@@ -113,6 +239,50 @@ const SettingUIV2 = [
113
239
  setting: {
114
240
  id: 'boxShadow',
115
241
  state: 'normal'
242
+ },
243
+ options: {
244
+ updateFields: [
245
+ {
246
+ field: 'normal.enable',
247
+ settingId: 'hasBoxShadow',
248
+ state: 'normal'
249
+ }
250
+ ]
251
+ },
252
+ controlChangeTrigger: {
253
+ settings: [
254
+ {
255
+ condition: `boxShadow.normal.enable === true`,
256
+ source: [
257
+ 'boxShadow',
258
+ 'hasBoxShadow'
259
+ ],
260
+ action: {
261
+ controlId: 'hasBoxShadow',
262
+ groupType: 'advanced',
263
+ controlType: 'advanced',
264
+ state: 'normal',
265
+ newValue: true
266
+ }
267
+ },
268
+ {
269
+ condition: `boxShadow.normal.enable === false`,
270
+ source: [
271
+ 'boxShadow',
272
+ 'hasBoxShadow'
273
+ ],
274
+ action: {
275
+ controlId: 'hasBoxShadow',
276
+ groupType: 'advanced',
277
+ controlType: 'advanced',
278
+ state: 'normal',
279
+ newValue: false
280
+ }
281
+ }
282
+ ],
283
+ options: {
284
+ noRecordHistory: true
285
+ }
116
286
  }
117
287
  }
118
288
  ]
@@ -56,7 +56,10 @@ const ProductTitleSettings = [
56
56
  id: 'typo',
57
57
  type: 'typography-v2',
58
58
  default: {
59
- type: 'subheading-3'
59
+ type: 'subheading-3',
60
+ attrs: {
61
+ transform: 'none'
62
+ }
60
63
  },
61
64
  ignoreReRender: true,
62
65
  hiddenSetting: {
@@ -1,24 +1,34 @@
1
- import { makeStyleResponsive, getStyleBackgroundByDevice } from '@gem-sdk/core';
1
+ import { makeGlobalSize, makeStyleResponsive, getStyleBackgroundByDevice, getGradientBgrStyleByDevice, getResponsiveStyleShadowWithoutState, composeRadiusResponsive, composeBorderResponsive, getGlobalColorResponsiveStyle } from '@gem-sdk/core';
2
2
 
3
3
  const getContainerStyles = (style, styles, extraData)=>{
4
- const { align, background } = styles || {};
4
+ const { align, background, globalSize } = styles || {};
5
+ const composePadding = makeGlobalSize(globalSize);
5
6
  return {
6
7
  ...style,
7
8
  ...extraData?.advancedClasses,
9
+ ...composePadding.width,
10
+ ...composePadding.padding,
8
11
  ...makeStyleResponsive('ta', align),
9
12
  ...getStyleBackgroundByDevice(background, {
10
13
  liquid: extraData?.isLiquid
11
- })
14
+ }),
15
+ ...getGradientBgrStyleByDevice(background)
12
16
  };
13
17
  };
14
- const getItemStyles = (horizontalSpacing)=>{
18
+ const getItemStyles = (parentStyles)=>{
19
+ const composePadding = makeGlobalSize(parentStyles?.itemPadding);
15
20
  return {
16
- ...makeStyleResponsive('cg', horizontalSpacing)
21
+ ...composePadding.padding,
22
+ ...getResponsiveStyleShadowWithoutState(parentStyles?.itemBoxShadow, 'box-shadow', parentStyles?.itemBoxShadow),
23
+ ...composeRadiusResponsive(parentStyles?.itemRounded),
24
+ ...composeBorderResponsive(parentStyles?.itemBorder),
25
+ ...getGlobalColorResponsiveStyle('bgc', parentStyles?.itemBackgroundColor),
26
+ ...makeStyleResponsive('cg', parentStyles?.horizontalSpacing)
17
27
  };
18
28
  };
19
- const getUlStyles = (verticalSpacing)=>{
29
+ const getUlStyles = (parentStyles)=>{
20
30
  return {
21
- ...makeStyleResponsive('rg', verticalSpacing)
31
+ ...makeStyleResponsive('gg', parentStyles?.verticalSpacing)
22
32
  };
23
33
  };
24
34
 
@@ -9,13 +9,13 @@ import { getUlClasses } from '../common/classes.js';
9
9
 
10
10
  const IconList = ({ style, setting, children, styles, builderProps, advanced })=>{
11
11
  const { preload } = setting || {};
12
- const { background, horizontalSpacing, verticalSpacing } = styles ?? {};
12
+ const { background } = styles ?? {};
13
13
  const advancedStyle = composeAdvanceStyle(advanced);
14
14
  const computedContainerStyles = createStyle(getContainerStyles(style, styles, {
15
15
  advancedClasses: advancedStyle
16
16
  }));
17
17
  const computedUlClasses = createClass(getUlClasses(advanced?.cssClass));
18
- const computedUlStyles = createStyle(getUlStyles(verticalSpacing));
18
+ const computedUlStyles = createStyle(getUlStyles(styles));
19
19
  return /*#__PURE__*/ jsxs(Fragment, {
20
20
  children: [
21
21
  If(preload, /*#__PURE__*/ jsxs(Head, {
@@ -52,7 +52,7 @@ const IconList = ({ style, setting, children, styles, builderProps, advanced })=
52
52
  return /*#__PURE__*/ jsx(child.type, {
53
53
  ...child.props,
54
54
  parentUid: builderProps?.uid,
55
- horizontalSpacing: horizontalSpacing,
55
+ parentStyles: styles,
56
56
  dataIndex: key
57
57
  });
58
58
  }
@@ -6,14 +6,14 @@ import { getUlClasses } from '../common/classes.js';
6
6
 
7
7
  const IconList = ({ builderProps, style, setting, rawChildren, styles, advanced })=>{
8
8
  const { preload } = setting || {};
9
- const { background, horizontalSpacing, verticalSpacing } = styles || {};
9
+ const { background } = styles || {};
10
10
  const advancedStyle = composeAdvanceStyle(advanced);
11
11
  const computedContainerStyles = createStyle(getContainerStyles(style, styles, {
12
12
  advancedClasses: advancedStyle,
13
13
  isLiquid: true
14
14
  }));
15
15
  const computedUlClasses = createClass(getUlClasses(advanced?.cssClass));
16
- const computedUlStyles = createStyle(getUlStyles(verticalSpacing));
16
+ const computedUlStyles = createStyle(getUlStyles(styles));
17
17
  return template`
18
18
  ${If(!!preload, `${If(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}
19
19
  ${If(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}
@@ -33,9 +33,9 @@ const IconList = ({ builderProps, style, setting, rawChildren, styles, advanced
33
33
  if (child) {
34
34
  return RenderChildren({
35
35
  ...child,
36
- horizontalSpacing: horizontalSpacing,
37
36
  dataIndex: index,
38
- parentUid: builderProps?.uid
37
+ parentUid: builderProps?.uid,
38
+ parentStyles: styles
39
39
  });
40
40
  }
41
41
  }))}
@@ -7,7 +7,7 @@ import { getItemClasses } from '../common/classes.js';
7
7
  import { getItemAttrs } from '../common/attrs.js';
8
8
  import { getItemStyles } from '../common/styles.js';
9
9
 
10
- const IconListItem = ({ children, horizontalSpacing, parentUid, builderProps, dataIndex })=>{
10
+ const IconListItem = ({ children, parentUid, builderProps, dataIndex, parentStyles })=>{
11
11
  if (isEmptyChildren(children)) {
12
12
  return null;
13
13
  }
@@ -15,7 +15,7 @@ const IconListItem = ({ children, horizontalSpacing, parentUid, builderProps, da
15
15
  const computedItemAttrs = createAttr({
16
16
  ...getItemAttrs(builderProps?.uid, dataIndex)
17
17
  });
18
- const computedItemStyles = createStyle(getItemStyles(horizontalSpacing));
18
+ const computedItemStyles = createStyle(getItemStyles(parentStyles));
19
19
  return /*#__PURE__*/ jsx("li", {
20
20
  className: computedItemClasses,
21
21
  ...computedItemAttrs,
@@ -4,7 +4,7 @@ import { getItemClasses } from '../common/classes.js';
4
4
  import { getItemAttrs } from '../common/attrs.js';
5
5
  import { getItemStyles } from '../common/styles.js';
6
6
 
7
- const IconListItem = ({ children, horizontalSpacing, dataIndex, parentUid, builderProps })=>{
7
+ const IconListItem = ({ children, dataIndex, parentUid, builderProps, parentStyles })=>{
8
8
  if (isEmptyChildren(children)) {
9
9
  return null;
10
10
  }
@@ -12,7 +12,7 @@ const IconListItem = ({ children, horizontalSpacing, dataIndex, parentUid, build
12
12
  const computedItemAttrs = createAttr({
13
13
  ...getItemAttrs(builderProps?.uid, dataIndex)
14
14
  });
15
- const computedItemStyles = createStyle(getItemStyles(horizontalSpacing));
15
+ const computedItemStyles = createStyle(getItemStyles(parentStyles));
16
16
  return template`
17
17
  <li
18
18
  ${computedItemAttrs}
@@ -102,7 +102,8 @@ const config = {
102
102
  settings: {
103
103
  childItem: [
104
104
  'Icon 1',
105
- 'Icon 2'
105
+ 'Icon 2',
106
+ 'Icon 3'
106
107
  ],
107
108
  presetId: 'icon-list-ver1-2-image'
108
109
  },
@@ -117,6 +118,7 @@ const config = {
117
118
  },
118
119
  childrens: [
119
120
  itemChildrenTemplateImage('https://ucarecdn.com/3257c87e-309b-47fb-9768-afe83fdfc2f1/-/format/auto/'),
121
+ itemChildrenTemplateImage('https://ucarecdn.com/07ff9dcd-e56b-4722-a176-fefe7a15e136/-/format/auto/'),
120
122
  itemChildrenTemplateImage('https://ucarecdn.com/07ff9dcd-e56b-4722-a176-fefe7a15e136/-/format/auto/')
121
123
  ]
122
124
  }
@@ -10,7 +10,8 @@ const IconListSettings = [
10
10
  type: 'child-item',
11
11
  default: [
12
12
  'Icon 1',
13
- 'Icon 2'
13
+ 'Icon 2',
14
+ 'Icon 3'
14
15
  ],
15
16
  childTemplate: {
16
17
  default: itemControlTemplate,
@@ -57,7 +58,7 @@ const IconListSettings = [
57
58
  desktop: {
58
59
  default: {
59
60
  type: 'color',
60
- color: '#DDDDDD',
61
+ color: 'bg-2',
61
62
  image: {
62
63
  src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
63
64
  width: 1200,
@@ -110,28 +111,154 @@ const IconListSettings = [
110
111
  {
111
112
  id: 'horizontalSpacing',
112
113
  label: 'Horizontal Spacing',
113
- type: 'input:unit',
114
+ type: 'input:slider',
114
115
  units: [
115
116
  'px'
116
117
  ],
118
+ step: 1,
119
+ min: 0,
120
+ max: 40,
117
121
  devices: {
118
122
  desktop: {
119
- default: '16'
123
+ default: '12px'
120
124
  }
121
125
  }
122
126
  },
123
127
  {
124
128
  id: 'verticalSpacing',
125
129
  label: 'Vertical Spacing',
126
- type: 'input:unit',
130
+ type: 'input:slider',
127
131
  units: [
128
132
  'px'
129
133
  ],
134
+ step: 1,
135
+ min: 0,
136
+ max: 40,
130
137
  devices: {
131
138
  desktop: {
132
- default: '16'
139
+ default: '12px'
133
140
  }
134
141
  }
142
+ },
143
+ {
144
+ id: 'itemPadding',
145
+ type: 'size-setting',
146
+ devices: {
147
+ desktop: {
148
+ default: {
149
+ padding: {}
150
+ }
151
+ }
152
+ },
153
+ hiddenSettings: [
154
+ 'shape',
155
+ 'gap',
156
+ 'height',
157
+ 'width'
158
+ ]
159
+ },
160
+ {
161
+ id: 'itemBackgroundColor',
162
+ type: 'color-picker-v2',
163
+ devices: {
164
+ desktop: {
165
+ default: 'transparent'
166
+ }
167
+ },
168
+ compoDefaultValue: {
169
+ desktop: {
170
+ default: 'bg-2'
171
+ }
172
+ },
173
+ enableGradient: true
174
+ },
175
+ {
176
+ id: 'itemBorder',
177
+ type: 'border-v2',
178
+ devices: {
179
+ desktop: {
180
+ default: {}
181
+ }
182
+ },
183
+ compoDefaultValue: {
184
+ desktop: {
185
+ default: {
186
+ border: 'solid',
187
+ color: '#121212',
188
+ width: '1px',
189
+ borderWidth: '1px'
190
+ }
191
+ }
192
+ }
193
+ },
194
+ {
195
+ id: 'itemRounded',
196
+ type: 'corner-v2',
197
+ devices: {
198
+ desktop: {}
199
+ },
200
+ compoDefaultValue: {
201
+ desktop: {
202
+ default: {
203
+ btrr: '8px',
204
+ bblr: '8px',
205
+ bbrr: '8px',
206
+ btlr: '8px',
207
+ radiusType: 'rounded'
208
+ }
209
+ }
210
+ }
211
+ },
212
+ {
213
+ id: 'itemBoxShadow',
214
+ type: 'shadow-v2',
215
+ devices: {
216
+ desktop: {
217
+ default: {}
218
+ }
219
+ },
220
+ compoDefaultValue: {
221
+ desktop: {
222
+ default: {
223
+ type: 'shadow-1',
224
+ distance: '4px',
225
+ blur: '4px',
226
+ spread: '0px',
227
+ color: '#121212',
228
+ angle: 45
229
+ }
230
+ }
231
+ }
232
+ },
233
+ {
234
+ id: 'globalSize',
235
+ type: 'size-setting',
236
+ devices: {
237
+ desktop: {
238
+ default: {
239
+ width: '100%',
240
+ padding: {}
241
+ }
242
+ },
243
+ mobile: {
244
+ default: {
245
+ width: '100%'
246
+ }
247
+ }
248
+ },
249
+ settingConfig: {
250
+ width: {
251
+ displayOptions: [
252
+ 'full',
253
+ 'auto'
254
+ ]
255
+ }
256
+ },
257
+ hiddenSettings: [
258
+ 'shape',
259
+ 'gap',
260
+ 'height'
261
+ ]
135
262
  }
136
263
  ]
137
264
  }
@@ -6,7 +6,7 @@ const SettingUIV2 = [
6
6
  controls: [
7
7
  {
8
8
  label: {
9
- en: 'Items'
9
+ en: 'Order'
10
10
  },
11
11
  setting: {
12
12
  id: 'childItem'
@@ -14,10 +14,85 @@ const SettingUIV2 = [
14
14
  }
15
15
  ]
16
16
  },
17
+ {
18
+ label: {
19
+ en: 'Item spacing'
20
+ },
21
+ controls: [
22
+ {
23
+ label: {
24
+ en: 'Gap'
25
+ },
26
+ setting: {
27
+ id: 'verticalSpacing'
28
+ }
29
+ }
30
+ ]
31
+ },
17
32
  {
18
33
  label: {
19
34
  en: 'Item style'
20
35
  },
36
+ moreSettings: {
37
+ controls: [
38
+ {
39
+ label: {
40
+ en: 'Padding'
41
+ },
42
+ controlConfig: {
43
+ id: 'padding',
44
+ type: 'padding-v2',
45
+ linkWithSetting: {
46
+ name: 'itemPadding',
47
+ field: 'padding'
48
+ },
49
+ compoDefaultValue: {
50
+ desktop: {
51
+ default: {
52
+ type: 'medium',
53
+ top: '8px',
54
+ bottom: '8px',
55
+ left: '12px',
56
+ right: '12px'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ {
63
+ label: {
64
+ en: 'Background'
65
+ },
66
+ setting: {
67
+ id: 'itemBackgroundColor'
68
+ }
69
+ },
70
+ {
71
+ label: {
72
+ en: 'Border'
73
+ },
74
+ setting: {
75
+ id: 'itemBorder'
76
+ }
77
+ },
78
+ {
79
+ label: {
80
+ en: 'Corner'
81
+ },
82
+ setting: {
83
+ id: 'itemRounded'
84
+ }
85
+ },
86
+ {
87
+ label: {
88
+ en: 'Shadow'
89
+ },
90
+ setting: {
91
+ id: 'itemBoxShadow'
92
+ }
93
+ }
94
+ ]
95
+ },
21
96
  controls: [
22
97
  {
23
98
  label: {
@@ -31,15 +106,66 @@ const SettingUIV2 = [
31
106
  },
32
107
  {
33
108
  label: {
34
- en: 'Item gap'
109
+ en: 'Size'
35
110
  },
36
111
  controls: [
37
112
  {
113
+ id: 'Width',
38
114
  label: {
39
- en: 'Gap'
115
+ en: 'Width'
40
116
  },
41
- setting: {
42
- id: 'horizontalSpacing'
117
+ controlConfig: {
118
+ id: 'width',
119
+ type: 'dropdown:input',
120
+ label: 'Width',
121
+ inputType: 'number',
122
+ units: [
123
+ 'px',
124
+ '%'
125
+ ],
126
+ hideUnit: false,
127
+ fallbackValue: 'Auto',
128
+ linkWithSetting: {
129
+ name: 'globalSize',
130
+ field: 'width'
131
+ },
132
+ displayOptions: [
133
+ {
134
+ label: 'Fit content',
135
+ value: 'Auto',
136
+ showValue: true
137
+ },
138
+ {
139
+ label: 'Full',
140
+ value: '100%',
141
+ showValue: true
142
+ }
143
+ ]
144
+ },
145
+ layout: 'horizontal'
146
+ },
147
+ {
148
+ label: {
149
+ en: 'Padding'
150
+ },
151
+ controlConfig: {
152
+ id: 'padding',
153
+ type: 'padding-v2',
154
+ linkWithSetting: {
155
+ name: 'globalSize',
156
+ field: 'padding'
157
+ },
158
+ compoDefaultValue: {
159
+ desktop: {
160
+ default: {
161
+ type: 'medium',
162
+ top: '16px',
163
+ bottom: '12px',
164
+ left: '16px',
165
+ right: '16px'
166
+ }
167
+ }
168
+ }
43
169
  }
44
170
  }
45
171
  ]
@@ -111,6 +237,50 @@ const SettingUIV2 = [
111
237
  setting: {
112
238
  id: 'boxShadow',
113
239
  state: 'normal'
240
+ },
241
+ options: {
242
+ updateFields: [
243
+ {
244
+ field: 'normal.enable',
245
+ settingId: 'hasBoxShadow',
246
+ state: 'normal'
247
+ }
248
+ ]
249
+ },
250
+ controlChangeTrigger: {
251
+ settings: [
252
+ {
253
+ condition: `boxShadow.normal.enable === true`,
254
+ source: [
255
+ 'boxShadow',
256
+ 'hasBoxShadow'
257
+ ],
258
+ action: {
259
+ controlId: 'hasBoxShadow',
260
+ groupType: 'advanced',
261
+ controlType: 'advanced',
262
+ state: 'normal',
263
+ newValue: true
264
+ }
265
+ },
266
+ {
267
+ condition: `boxShadow.normal.enable === false`,
268
+ source: [
269
+ 'boxShadow',
270
+ 'hasBoxShadow'
271
+ ],
272
+ action: {
273
+ controlId: 'hasBoxShadow',
274
+ groupType: 'advanced',
275
+ controlType: 'advanced',
276
+ state: 'normal',
277
+ newValue: false
278
+ }
279
+ }
280
+ ],
281
+ options: {
282
+ noRecordHistory: true
283
+ }
114
284
  }
115
285
  }
116
286
  ]
@@ -54,7 +54,10 @@ const ProductTitleSettings = [
54
54
  id: 'typo',
55
55
  type: 'typography-v2',
56
56
  default: {
57
- type: 'subheading-3'
57
+ type: 'subheading-3',
58
+ attrs: {
59
+ transform: 'none'
60
+ }
58
61
  },
59
62
  ignoreReRender: true,
60
63
  hiddenSetting: {
@@ -1902,6 +1902,12 @@ type IconListProps$1 = BasePropsWrap<{
1902
1902
  align?: ObjectDevices$1<AlignProp>;
1903
1903
  horizontalSpacing?: ObjectDevices$1<Property.Padding>;
1904
1904
  verticalSpacing?: ObjectDevices$1<Property.Padding>;
1905
+ itemPadding?: ObjectDevices$1<SizeSettingGlobal>;
1906
+ itemBackgroundColor?: ObjectDevices$1<ColorValueType$1>;
1907
+ itemBorder?: ObjectDevices$1<Border>;
1908
+ itemBoxShadow?: ObjectDevices$1<ShadowProps$1>;
1909
+ itemRounded?: ObjectDevices$1<CornerRadius>;
1910
+ globalSize?: ObjectDevices$1<SizeSettingGlobal>;
1905
1911
  }> & {
1906
1912
  children?: React.ReactNode;
1907
1913
  rawChildren?: any[];
@@ -1912,6 +1918,7 @@ type IconListItemProps$1 = BasePropsWrap & React.ComponentPropsWithoutRef<'div'>
1912
1918
  parentUid?: string;
1913
1919
  dataIndex?: number;
1914
1920
  index?: number;
1921
+ parentStyles?: IconListProps$1['styles'];
1915
1922
  };
1916
1923
 
1917
1924
  declare const IconList$1: React$1.FC<IconListProps$1>;
@@ -6229,7 +6236,7 @@ declare const Heading: ({ styles, builderAttrs, style, setting, advanced, builde
6229
6236
 
6230
6237
  declare const Icon: ({ style, builderAttrs, builderProps, setting, styles, advanced }: IconProps) => string;
6231
6238
 
6232
- declare const IconListItem: ({ children, horizontalSpacing, dataIndex, parentUid, builderProps, }: IconListItemProps$1) => string | null;
6239
+ declare const IconListItem: ({ children, dataIndex, parentUid, builderProps, parentStyles, }: IconListItemProps$1) => string | null;
6233
6240
 
6234
6241
  declare const IconList: ({ builderProps, style, setting, rawChildren, styles, advanced, }: IconListProps$1) => string;
6235
6242
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.424",
3
+ "version": "2.0.0-dev.426",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",