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

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.
Files changed (40) hide show
  1. package/dist/cjs/article/setting/ArticleList.js +1 -1
  2. package/dist/cjs/article/setting/configs/ArticleTitle/presets.js +1 -1
  3. package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +4 -1
  4. package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +1 -1
  5. package/dist/cjs/dialog/components/common/getStyle.js +7 -5
  6. package/dist/cjs/dialog/setting/configs/settings.js +41 -0
  7. package/dist/cjs/dialog/setting/configs/uiV2.js +22 -3
  8. package/dist/cjs/form/components/contact/common/composeStyles.js +3 -3
  9. package/dist/cjs/form/setting/form-dropdown/configs/uiV2.js +0 -20
  10. package/dist/cjs/form/setting/newsletter/NewsletterInitConfig.js +13 -0
  11. package/dist/cjs/form/setting/newsletter/configs/settings.js +10 -6
  12. package/dist/cjs/form/setting/newsletter/configs/uiV2.js +50 -3
  13. package/dist/cjs/icon-list/setting/IconList.js +1 -1
  14. package/dist/cjs/product/components/ProductQuantity/common/common.js +4 -10
  15. package/dist/cjs/product/components/ProductQuantity/index.js +3 -1
  16. package/dist/cjs/product/setting/product-quantity/configs/settings.js +14 -13
  17. package/dist/cjs/product/setting/product-sku/configs/uiV2.js +1 -0
  18. package/dist/cjs/tab/components/Tabs.js +0 -1
  19. package/dist/cjs/tab/components/common/getStyle.js +6 -1
  20. package/dist/esm/article/setting/ArticleList.js +1 -1
  21. package/dist/esm/article/setting/configs/ArticleTitle/presets.js +1 -1
  22. package/dist/esm/article/setting/configs/ArticleTitle/settings.js +4 -1
  23. package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +1 -1
  24. package/dist/esm/dialog/components/common/getStyle.js +8 -6
  25. package/dist/esm/dialog/setting/configs/settings.js +41 -0
  26. package/dist/esm/dialog/setting/configs/uiV2.js +22 -3
  27. package/dist/esm/form/components/contact/common/composeStyles.js +3 -3
  28. package/dist/esm/form/setting/form-dropdown/configs/uiV2.js +0 -20
  29. package/dist/esm/form/setting/newsletter/NewsletterInitConfig.js +13 -0
  30. package/dist/esm/form/setting/newsletter/configs/settings.js +10 -6
  31. package/dist/esm/form/setting/newsletter/configs/uiV2.js +50 -3
  32. package/dist/esm/icon-list/setting/IconList.js +1 -1
  33. package/dist/esm/product/components/ProductQuantity/common/common.js +5 -11
  34. package/dist/esm/product/components/ProductQuantity/index.js +3 -1
  35. package/dist/esm/product/setting/product-quantity/configs/settings.js +14 -13
  36. package/dist/esm/product/setting/product-sku/configs/uiV2.js +1 -0
  37. package/dist/esm/tab/components/Tabs.js +0 -1
  38. package/dist/esm/tab/components/common/getStyle.js +7 -2
  39. package/dist/types/index.d.ts +7 -4
  40. package/package.json +2 -2
@@ -773,7 +773,7 @@ const config = {
773
773
  {
774
774
  tag: 'ArticleTitle',
775
775
  settings: {
776
- htmlTag: 'h1',
776
+ htmlTag: 'h2',
777
777
  linkArticle: 'go-to-article'
778
778
  },
779
779
  styles: {
@@ -17,7 +17,7 @@ const ArticleTitlePresets = [
17
17
  {
18
18
  tag: 'ArticleTitle',
19
19
  settings: {
20
- htmlTag: 'h1',
20
+ htmlTag: 'h2',
21
21
  linkArticle: 'go-to-article'
22
22
  },
23
23
  styles: {
@@ -99,7 +99,10 @@ const ArticleTitleSettings = [
99
99
  id: 'typo',
100
100
  type: 'typography-v2',
101
101
  default: {
102
- type: 'subheading-3'
102
+ type: 'subheading-3',
103
+ attrs: {
104
+ color: '#212121'
105
+ }
103
106
  },
104
107
  ignoreReRender: true
105
108
  },
@@ -134,7 +134,7 @@ const uiV2 = [
134
134
  controls: [
135
135
  {
136
136
  label: {
137
- en: 'SEO tag'
137
+ en: 'HTML tag'
138
138
  },
139
139
  setting: {
140
140
  id: 'htmlTag'
@@ -5,6 +5,7 @@ require('react/jsx-runtime');
5
5
  require('react');
6
6
  var _const = require('../../../common/const.js');
7
7
  var common = require('./common.js');
8
+ var common$1 = require('../../../banner/components/common/common.js');
8
9
 
9
10
  function filterTruthyStyles(styles) {
10
11
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
@@ -52,18 +53,19 @@ const getDialogContentStyle = ({ style, width, height, fullScreen })=>{
52
53
  return filterTruthyStyles(composeStyles);
53
54
  };
54
55
  const getButtonContentStyle = (setting)=>{
55
- const { btnSize, btnBg, btnRounded, btnColor } = setting ?? {};
56
+ const { btnBg, btnRounded, btnColor, btnPadding, btnWidth, btnHeight } = setting ?? {};
57
+ const widthSize = btnWidth ? core.makeStyleResponsive('w', common$1.getWidth(btnWidth)) : {};
58
+ const heightSize = btnHeight ? core.makeStyleResponsive('h', common$1.getWidth(btnHeight)) : {};
56
59
  const composeStyles = {
57
- ...core.makeStyle({
58
- w: `${parseInt(btnSize.toString())}px`,
59
- h: `${parseInt(btnSize.toString())}px`
60
- }),
60
+ ...widthSize,
61
+ ...heightSize,
61
62
  ...core.getGlobalColorResponsiveStyle('c', {
62
63
  desktop: btnColor
63
64
  }),
64
65
  ...core.getGlobalColorResponsiveStyle('bgc', {
65
66
  desktop: btnBg
66
67
  }),
68
+ ...core.getResponsiveStylePadding(btnPadding),
67
69
  ...core.composeRadius({
68
70
  normal: btnRounded
69
71
  })
@@ -197,6 +197,47 @@ const DialogSettings = [
197
197
  type: 'input:stepper',
198
198
  default: 32
199
199
  },
200
+ {
201
+ id: 'btnWidth',
202
+ type: 'input:unit',
203
+ units: [
204
+ 'px',
205
+ '%'
206
+ ],
207
+ devices: {
208
+ desktop: {
209
+ default: '32px'
210
+ }
211
+ }
212
+ },
213
+ {
214
+ id: 'btnHeight',
215
+ type: 'input:unit',
216
+ units: [
217
+ 'px',
218
+ '%'
219
+ ],
220
+ devices: {
221
+ desktop: {
222
+ default: '32px'
223
+ }
224
+ }
225
+ },
226
+ {
227
+ id: 'btnPadding',
228
+ type: 'padding-v2',
229
+ compoDefaultValue: {
230
+ desktop: {
231
+ default: {
232
+ type: 'custom',
233
+ top: '4px',
234
+ bottom: '4px',
235
+ left: '4px',
236
+ right: '4px'
237
+ }
238
+ }
239
+ }
240
+ },
200
241
  {
201
242
  id: 'iconSize',
202
243
  type: 'input:stepper',
@@ -39,10 +39,26 @@ const SettingUIV2 = [
39
39
  },
40
40
  {
41
41
  label: {
42
- en: 'Button size'
42
+ en: 'Width'
43
43
  },
44
44
  setting: {
45
- id: 'btnSize'
45
+ id: 'btnWidth'
46
+ }
47
+ },
48
+ {
49
+ label: {
50
+ en: 'Height'
51
+ },
52
+ setting: {
53
+ id: 'btnHeight'
54
+ }
55
+ },
56
+ {
57
+ label: {
58
+ en: 'Padding'
59
+ },
60
+ setting: {
61
+ id: 'btnPadding'
46
62
  }
47
63
  },
48
64
  {
@@ -151,6 +167,7 @@ const SettingUIV2 = [
151
167
  devices: {
152
168
  desktop: {
153
169
  default: {
170
+ type: 'custom',
154
171
  top: '32px',
155
172
  bottom: '32px',
156
173
  left: '32px',
@@ -161,6 +178,7 @@ const SettingUIV2 = [
161
178
  compoDefaultValue: {
162
179
  desktop: {
163
180
  default: {
181
+ type: 'custom',
164
182
  top: '32px',
165
183
  bottom: '32px',
166
184
  left: '32px',
@@ -350,7 +368,8 @@ const SettingUIV2 = [
350
368
  },
351
369
  setting: {
352
370
  id: 'frequencyMode'
353
- }
371
+ },
372
+ conditionDisplay: `trigger !== 'none'`
354
373
  },
355
374
  {
356
375
  conditionDisplay: `frequencyMode === 'after-period-time'`,
@@ -14,9 +14,9 @@ const composeContainerStyles = (setting, styles)=>{
14
14
  '--w': '100%'
15
15
  },
16
16
  ...composeGlobalSize.padding,
17
- ...core.composeBorderResponsive(styles?.shapeBorder),
18
- ...core.composeRadiusResponsive(styles?.shapeRounded),
19
- ...core.getResponsiveStyleShadowWithoutState(styles?.shapeBoxShadow, 'box-shadow', styles?.shapeBoxShadow),
17
+ ...core.composeBorderResponsive(styles?.border),
18
+ ...core.composeRadiusResponsive(styles?.rounded),
19
+ ...core.getResponsiveStyleShadowWithoutState(styles?.boxShadow, 'box-shadow', styles?.boxShadow),
20
20
  ...core.getStyleBackgroundByDevice(background),
21
21
  ...core.getGradientBgrStyleByDevice(background)
22
22
  });
@@ -81,30 +81,10 @@ const SettingUIV2 = [
81
81
  field: 'width'
82
82
  },
83
83
  displayOptions: [
84
- {
85
- label: 'Fit content',
86
- value: 'Auto',
87
- showValue: true
88
- },
89
84
  {
90
85
  label: 'Full',
91
86
  value: '100%',
92
87
  showValue: true
93
- },
94
- {
95
- label: 'Small',
96
- value: '100px',
97
- showValue: true
98
- },
99
- {
100
- label: 'Medium',
101
- value: '116px',
102
- showValue: true
103
- },
104
- {
105
- label: 'Large',
106
- value: '132px',
107
- showValue: true
108
88
  }
109
89
  ]
110
90
  },
@@ -22,6 +22,19 @@ const newsletterInitConfig = [
22
22
  radiusType: 'none'
23
23
  }
24
24
  }
25
+ },
26
+ boxShadow: {
27
+ desktop: {
28
+ normal: {
29
+ type: 'shadow-2',
30
+ distance: '12px',
31
+ blur: '12px',
32
+ spread: '0px',
33
+ color: 'rgba(18, 18, 18, 0.2)',
34
+ angle: 45,
35
+ enable: false
36
+ }
37
+ }
25
38
  }
26
39
  },
27
40
  childrens: [
@@ -205,7 +205,7 @@ const NewsletterSettings = [
205
205
  ]
206
206
  },
207
207
  {
208
- id: 'shapeBorder',
208
+ id: 'border',
209
209
  type: 'border-v2',
210
210
  devices: {
211
211
  desktop: {
@@ -231,7 +231,7 @@ const NewsletterSettings = [
231
231
  }
232
232
  },
233
233
  {
234
- id: 'shapeRounded',
234
+ id: 'rounded',
235
235
  type: 'corner-v2',
236
236
  devices: {
237
237
  desktop: {
@@ -257,12 +257,17 @@ const NewsletterSettings = [
257
257
  }
258
258
  },
259
259
  {
260
- id: 'shapeBoxShadow',
260
+ id: 'boxShadow',
261
261
  type: 'shadow-v2',
262
262
  devices: {
263
263
  desktop: {
264
264
  default: {
265
- enable: false
265
+ type: 'shadow-2',
266
+ distance: '12px',
267
+ blur: '12px',
268
+ spread: '0px',
269
+ color: 'rgba(18, 18, 18, 0.2)',
270
+ angle: 45
266
271
  }
267
272
  }
268
273
  },
@@ -274,8 +279,7 @@ const NewsletterSettings = [
274
279
  blur: '12px',
275
280
  spread: '0px',
276
281
  color: 'rgba(18, 18, 18, 0.2)',
277
- angle: 45,
278
- enable: true
282
+ angle: 45
279
283
  }
280
284
  }
281
285
  }
@@ -131,7 +131,8 @@ const SettingUIV2 = [
131
131
  en: 'Border'
132
132
  },
133
133
  setting: {
134
- id: 'shapeBorder'
134
+ id: 'border',
135
+ state: 'normal'
135
136
  }
136
137
  },
137
138
  {
@@ -139,7 +140,8 @@ const SettingUIV2 = [
139
140
  en: 'Corner'
140
141
  },
141
142
  setting: {
142
- id: 'shapeRounded'
143
+ id: 'rounded',
144
+ state: 'normal'
143
145
  }
144
146
  },
145
147
  {
@@ -147,7 +149,52 @@ const SettingUIV2 = [
147
149
  en: 'Shadow'
148
150
  },
149
151
  setting: {
150
- id: 'shapeBoxShadow'
152
+ id: 'boxShadow',
153
+ state: 'normal'
154
+ },
155
+ options: {
156
+ updateFields: [
157
+ {
158
+ field: 'enable',
159
+ settingId: 'hasBoxShadow',
160
+ state: 'normal'
161
+ }
162
+ ]
163
+ },
164
+ controlChangeTrigger: {
165
+ settings: [
166
+ {
167
+ condition: `boxShadow.normal.enable === true`,
168
+ source: [
169
+ 'boxShadow',
170
+ 'hasBoxShadow'
171
+ ],
172
+ action: {
173
+ controlId: 'hasBoxShadow',
174
+ groupType: 'advanced',
175
+ controlType: 'advanced',
176
+ state: 'normal',
177
+ newValue: true
178
+ }
179
+ },
180
+ {
181
+ condition: `boxShadow.normal.enable === false`,
182
+ source: [
183
+ 'boxShadow',
184
+ 'hasBoxShadow'
185
+ ],
186
+ action: {
187
+ controlId: 'hasBoxShadow',
188
+ groupType: 'advanced',
189
+ controlType: 'advanced',
190
+ state: 'normal',
191
+ newValue: false
192
+ }
193
+ }
194
+ ],
195
+ options: {
196
+ noRecordHistory: true
197
+ }
151
198
  }
152
199
  }
153
200
  ]
@@ -139,7 +139,7 @@ const config = {
139
139
  rootOverride: {
140
140
  styles: {
141
141
  align: {
142
- desktop: 'center'
142
+ desktop: 'left'
143
143
  }
144
144
  },
145
145
  advanced: {
@@ -30,17 +30,11 @@ const getMinusIcon = (minusIcon)=>{
30
30
  `;
31
31
  };
32
32
  const getIconWidth = (iconSizeCustom)=>{
33
- let check = true;
34
- Object.keys(iconSizeCustom ?? {}).forEach((key)=>{
35
- if (typeof (iconSizeCustom ?? {})[key] != 'string' && typeof (iconSizeCustom ?? {})[key] != 'number') {
36
- check = false;
37
- }
38
- });
39
- return check ? core.makeStyleResponsive('w', iconSizeCustom, 'px') : core.makeStyleResponsive('w', {
40
- desktop: `${(iconSizeCustom?.['desktop'])?.width}px`,
41
- tablet: `${(iconSizeCustom?.['tablet'])?.width}px`,
42
- mobile: `${(iconSizeCustom?.['mobile'])?.width}px`
33
+ if (!iconSizeCustom) return {};
34
+ core.DEVICES.forEach((device)=>{
35
+ if (!iconSizeCustom?.[device]) iconSizeCustom[device] = iconSizeCustom['desktop'] || undefined;
43
36
  });
37
+ return core.makeStyleResponsive('w', iconSizeCustom);
44
38
  };
45
39
 
46
40
  exports.getIconWidth = getIconWidth;
@@ -114,7 +114,9 @@ const ProductQuantity = (props)=>{
114
114
  const iconWrapperClass = system.createClass({
115
115
  ...getClasses.getIconWrapperClasses()
116
116
  });
117
- const iconWidth = common.getIconWidth(iconSizeCustom);
117
+ const iconWidth = system.createStyle({
118
+ ...common.getIconWidth(iconSizeCustom)
119
+ });
118
120
  return /*#__PURE__*/ jsxRuntime.jsx("div", {
119
121
  ref: ref,
120
122
  ...containerAttrs,
@@ -8,7 +8,7 @@ const ProductQuantitySettings = [
8
8
  id: 'updatePrice',
9
9
  label: 'Update price',
10
10
  type: 'toggle',
11
- default: false
11
+ default: true
12
12
  },
13
13
  {
14
14
  id: 'qtyStyle',
@@ -198,10 +198,11 @@ const ProductQuantitySettings = [
198
198
  {
199
199
  id: 'iconSizeCustom',
200
200
  type: 'input:stepper',
201
+ includeUnit: 'px',
201
202
  min: 1,
202
203
  devices: {
203
204
  desktop: {
204
- default: 16
205
+ default: '16px'
205
206
  }
206
207
  }
207
208
  }
@@ -306,28 +307,29 @@ const ProductQuantitySettings = [
306
307
  id: 'inputBackgroundColor',
307
308
  type: 'color-picker-v2',
308
309
  label: 'Background Color',
309
- default: {
310
- normal: 'bg-3'
311
- },
312
310
  state: {
313
311
  hover: true,
314
312
  normal: true
315
313
  },
314
+ compoDefaultValue: {
315
+ normal: 'bg-3',
316
+ hover: 'highlight'
317
+ },
316
318
  enableGradient: true
317
319
  },
318
320
  {
319
321
  id: 'buttonBackgroundColor',
320
322
  type: 'color-picker-v2',
321
323
  label: 'Button Background Color',
322
- default: {
323
- normal: 'brand',
324
- hover: 'highlight'
325
- },
326
324
  state: {
327
325
  hover: true,
328
326
  normal: true
329
327
  },
330
- enableGradient: true
328
+ enableGradient: true,
329
+ compoDefaultValue: {
330
+ normal: 'brand',
331
+ hover: 'highlight'
332
+ }
331
333
  },
332
334
  {
333
335
  id: 'iconColor',
@@ -356,7 +358,7 @@ const ProductQuantitySettings = [
356
358
  border: 'solid',
357
359
  borderWidth: '1px',
358
360
  width: '1px 1px 1px 1px',
359
- color: '#121212',
361
+ color: 'line-1',
360
362
  isCustom: true
361
363
  },
362
364
  hover: {
@@ -364,7 +366,6 @@ const ProductQuantitySettings = [
364
366
  border: 'none',
365
367
  borderWidth: '1px',
366
368
  width: '1px 1px 1px 1px',
367
- color: '#121212',
368
369
  isCustom: true
369
370
  }
370
371
  }
@@ -500,7 +501,7 @@ const ProductQuantitySettings = [
500
501
  id: 'dividerColor',
501
502
  type: 'color-picker-v2',
502
503
  label: 'Divider Color',
503
- devices: {
504
+ compoDefaultValue: {
504
505
  desktop: {
505
506
  default: {
506
507
  normal: '#121212'
@@ -13,6 +13,7 @@ const SettingUIV2 = [
13
13
  },
14
14
  iconName: 'polaris-text-block',
15
15
  getValueFromSettingID: 'label',
16
+ defaultValueWhenClear: '',
16
17
  controls: [
17
18
  {
18
19
  label: {
@@ -16,7 +16,6 @@ var getClasses = require('./common/getClasses.js');
16
16
 
17
17
  const Tabs = (props)=>{
18
18
  const { builderAttrs, builderProps, style, setting, advanced, children } = props;
19
- delete setting?.labelTypoV2?.attrs?.color;
20
19
  const { cssClass } = advanced ?? {};
21
20
  const { panelFullWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
22
21
  const { currentDevice, productID, dispatchEventTabActive, activeTab, setActiveKey, refContainer } = useTab.useTab(setting, builderProps);
@@ -8,7 +8,12 @@ const getStyleWrapper = (setting, style)=>{
8
8
  const { background } = setting ?? {};
9
9
  const composeStyles = {
10
10
  ...style,
11
- ...core.getStyleBackgroundByDevice(background)
11
+ ...core.getStyleBackgroundByDevice(background),
12
+ ...core.getGradientBgrStyleByDevice(background, {
13
+ desktop: true,
14
+ tablet: true,
15
+ mobile: true
16
+ })
12
17
  };
13
18
  return helpers.filterTruthyStyles(composeStyles);
14
19
  };
@@ -769,7 +769,7 @@ const config = {
769
769
  {
770
770
  tag: 'ArticleTitle',
771
771
  settings: {
772
- htmlTag: 'h1',
772
+ htmlTag: 'h2',
773
773
  linkArticle: 'go-to-article'
774
774
  },
775
775
  styles: {
@@ -15,7 +15,7 @@ const ArticleTitlePresets = [
15
15
  {
16
16
  tag: 'ArticleTitle',
17
17
  settings: {
18
- htmlTag: 'h1',
18
+ htmlTag: 'h2',
19
19
  linkArticle: 'go-to-article'
20
20
  },
21
21
  styles: {
@@ -97,7 +97,10 @@ const ArticleTitleSettings = [
97
97
  id: 'typo',
98
98
  type: 'typography-v2',
99
99
  default: {
100
- type: 'subheading-3'
100
+ type: 'subheading-3',
101
+ attrs: {
102
+ color: '#212121'
103
+ }
101
104
  },
102
105
  ignoreReRender: true
103
106
  },
@@ -132,7 +132,7 @@ const uiV2 = [
132
132
  controls: [
133
133
  {
134
134
  label: {
135
- en: 'SEO tag'
135
+ en: 'HTML tag'
136
136
  },
137
137
  setting: {
138
138
  id: 'htmlTag'
@@ -1,8 +1,9 @@
1
- import { makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, makeWidth, composeRadius, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
1
+ import { makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, makeWidth, getResponsiveStylePadding, composeRadius, 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';
5
5
  import { pointerEventStyle, getDisplayStyle, getWrapperDialogStyle, getBorderStyle, heightStyle, getInnerStyle, removeHeightPercentForContent } from './common.js';
6
+ import { getWidth } from '../../../banner/components/common/common.js';
6
7
 
7
8
  function filterTruthyStyles(styles) {
8
9
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
@@ -50,18 +51,19 @@ const getDialogContentStyle = ({ style, width, height, fullScreen })=>{
50
51
  return filterTruthyStyles(composeStyles);
51
52
  };
52
53
  const getButtonContentStyle = (setting)=>{
53
- const { btnSize, btnBg, btnRounded, btnColor } = setting ?? {};
54
+ const { btnBg, btnRounded, btnColor, btnPadding, btnWidth, btnHeight } = setting ?? {};
55
+ const widthSize = btnWidth ? makeStyleResponsive('w', getWidth(btnWidth)) : {};
56
+ const heightSize = btnHeight ? makeStyleResponsive('h', getWidth(btnHeight)) : {};
54
57
  const composeStyles = {
55
- ...makeStyle({
56
- w: `${parseInt(btnSize.toString())}px`,
57
- h: `${parseInt(btnSize.toString())}px`
58
- }),
58
+ ...widthSize,
59
+ ...heightSize,
59
60
  ...getGlobalColorResponsiveStyle('c', {
60
61
  desktop: btnColor
61
62
  }),
62
63
  ...getGlobalColorResponsiveStyle('bgc', {
63
64
  desktop: btnBg
64
65
  }),
66
+ ...getResponsiveStylePadding(btnPadding),
65
67
  ...composeRadius({
66
68
  normal: btnRounded
67
69
  })
@@ -195,6 +195,47 @@ const DialogSettings = [
195
195
  type: 'input:stepper',
196
196
  default: 32
197
197
  },
198
+ {
199
+ id: 'btnWidth',
200
+ type: 'input:unit',
201
+ units: [
202
+ 'px',
203
+ '%'
204
+ ],
205
+ devices: {
206
+ desktop: {
207
+ default: '32px'
208
+ }
209
+ }
210
+ },
211
+ {
212
+ id: 'btnHeight',
213
+ type: 'input:unit',
214
+ units: [
215
+ 'px',
216
+ '%'
217
+ ],
218
+ devices: {
219
+ desktop: {
220
+ default: '32px'
221
+ }
222
+ }
223
+ },
224
+ {
225
+ id: 'btnPadding',
226
+ type: 'padding-v2',
227
+ compoDefaultValue: {
228
+ desktop: {
229
+ default: {
230
+ type: 'custom',
231
+ top: '4px',
232
+ bottom: '4px',
233
+ left: '4px',
234
+ right: '4px'
235
+ }
236
+ }
237
+ }
238
+ },
198
239
  {
199
240
  id: 'iconSize',
200
241
  type: 'input:stepper',
@@ -37,10 +37,26 @@ const SettingUIV2 = [
37
37
  },
38
38
  {
39
39
  label: {
40
- en: 'Button size'
40
+ en: 'Width'
41
41
  },
42
42
  setting: {
43
- id: 'btnSize'
43
+ id: 'btnWidth'
44
+ }
45
+ },
46
+ {
47
+ label: {
48
+ en: 'Height'
49
+ },
50
+ setting: {
51
+ id: 'btnHeight'
52
+ }
53
+ },
54
+ {
55
+ label: {
56
+ en: 'Padding'
57
+ },
58
+ setting: {
59
+ id: 'btnPadding'
44
60
  }
45
61
  },
46
62
  {
@@ -149,6 +165,7 @@ const SettingUIV2 = [
149
165
  devices: {
150
166
  desktop: {
151
167
  default: {
168
+ type: 'custom',
152
169
  top: '32px',
153
170
  bottom: '32px',
154
171
  left: '32px',
@@ -159,6 +176,7 @@ const SettingUIV2 = [
159
176
  compoDefaultValue: {
160
177
  desktop: {
161
178
  default: {
179
+ type: 'custom',
162
180
  top: '32px',
163
181
  bottom: '32px',
164
182
  left: '32px',
@@ -348,7 +366,8 @@ const SettingUIV2 = [
348
366
  },
349
367
  setting: {
350
368
  id: 'frequencyMode'
351
- }
369
+ },
370
+ conditionDisplay: `trigger !== 'none'`
352
371
  },
353
372
  {
354
373
  conditionDisplay: `frequencyMode === 'after-period-time'`,
@@ -12,9 +12,9 @@ const composeContainerStyles = (setting, styles)=>{
12
12
  '--w': '100%'
13
13
  },
14
14
  ...composeGlobalSize.padding,
15
- ...composeBorderResponsive(styles?.shapeBorder),
16
- ...composeRadiusResponsive(styles?.shapeRounded),
17
- ...getResponsiveStyleShadowWithoutState(styles?.shapeBoxShadow, 'box-shadow', styles?.shapeBoxShadow),
15
+ ...composeBorderResponsive(styles?.border),
16
+ ...composeRadiusResponsive(styles?.rounded),
17
+ ...getResponsiveStyleShadowWithoutState(styles?.boxShadow, 'box-shadow', styles?.boxShadow),
18
18
  ...getStyleBackgroundByDevice(background),
19
19
  ...getGradientBgrStyleByDevice(background)
20
20
  });
@@ -79,30 +79,10 @@ const SettingUIV2 = [
79
79
  field: 'width'
80
80
  },
81
81
  displayOptions: [
82
- {
83
- label: 'Fit content',
84
- value: 'Auto',
85
- showValue: true
86
- },
87
82
  {
88
83
  label: 'Full',
89
84
  value: '100%',
90
85
  showValue: true
91
- },
92
- {
93
- label: 'Small',
94
- value: '100px',
95
- showValue: true
96
- },
97
- {
98
- label: 'Medium',
99
- value: '116px',
100
- showValue: true
101
- },
102
- {
103
- label: 'Large',
104
- value: '132px',
105
- showValue: true
106
86
  }
107
87
  ]
108
88
  },
@@ -20,6 +20,19 @@ const newsletterInitConfig = [
20
20
  radiusType: 'none'
21
21
  }
22
22
  }
23
+ },
24
+ boxShadow: {
25
+ desktop: {
26
+ normal: {
27
+ type: 'shadow-2',
28
+ distance: '12px',
29
+ blur: '12px',
30
+ spread: '0px',
31
+ color: 'rgba(18, 18, 18, 0.2)',
32
+ angle: 45,
33
+ enable: false
34
+ }
35
+ }
23
36
  }
24
37
  },
25
38
  childrens: [
@@ -201,7 +201,7 @@ const NewsletterSettings = [
201
201
  ]
202
202
  },
203
203
  {
204
- id: 'shapeBorder',
204
+ id: 'border',
205
205
  type: 'border-v2',
206
206
  devices: {
207
207
  desktop: {
@@ -227,7 +227,7 @@ const NewsletterSettings = [
227
227
  }
228
228
  },
229
229
  {
230
- id: 'shapeRounded',
230
+ id: 'rounded',
231
231
  type: 'corner-v2',
232
232
  devices: {
233
233
  desktop: {
@@ -253,12 +253,17 @@ const NewsletterSettings = [
253
253
  }
254
254
  },
255
255
  {
256
- id: 'shapeBoxShadow',
256
+ id: 'boxShadow',
257
257
  type: 'shadow-v2',
258
258
  devices: {
259
259
  desktop: {
260
260
  default: {
261
- enable: false
261
+ type: 'shadow-2',
262
+ distance: '12px',
263
+ blur: '12px',
264
+ spread: '0px',
265
+ color: 'rgba(18, 18, 18, 0.2)',
266
+ angle: 45
262
267
  }
263
268
  }
264
269
  },
@@ -270,8 +275,7 @@ const NewsletterSettings = [
270
275
  blur: '12px',
271
276
  spread: '0px',
272
277
  color: 'rgba(18, 18, 18, 0.2)',
273
- angle: 45,
274
- enable: true
278
+ angle: 45
275
279
  }
276
280
  }
277
281
  }
@@ -129,7 +129,8 @@ const SettingUIV2 = [
129
129
  en: 'Border'
130
130
  },
131
131
  setting: {
132
- id: 'shapeBorder'
132
+ id: 'border',
133
+ state: 'normal'
133
134
  }
134
135
  },
135
136
  {
@@ -137,7 +138,8 @@ const SettingUIV2 = [
137
138
  en: 'Corner'
138
139
  },
139
140
  setting: {
140
- id: 'shapeRounded'
141
+ id: 'rounded',
142
+ state: 'normal'
141
143
  }
142
144
  },
143
145
  {
@@ -145,7 +147,52 @@ const SettingUIV2 = [
145
147
  en: 'Shadow'
146
148
  },
147
149
  setting: {
148
- id: 'shapeBoxShadow'
150
+ id: 'boxShadow',
151
+ state: 'normal'
152
+ },
153
+ options: {
154
+ updateFields: [
155
+ {
156
+ field: 'enable',
157
+ settingId: 'hasBoxShadow',
158
+ state: 'normal'
159
+ }
160
+ ]
161
+ },
162
+ controlChangeTrigger: {
163
+ settings: [
164
+ {
165
+ condition: `boxShadow.normal.enable === true`,
166
+ source: [
167
+ 'boxShadow',
168
+ 'hasBoxShadow'
169
+ ],
170
+ action: {
171
+ controlId: 'hasBoxShadow',
172
+ groupType: 'advanced',
173
+ controlType: 'advanced',
174
+ state: 'normal',
175
+ newValue: true
176
+ }
177
+ },
178
+ {
179
+ condition: `boxShadow.normal.enable === false`,
180
+ source: [
181
+ 'boxShadow',
182
+ 'hasBoxShadow'
183
+ ],
184
+ action: {
185
+ controlId: 'hasBoxShadow',
186
+ groupType: 'advanced',
187
+ controlType: 'advanced',
188
+ state: 'normal',
189
+ newValue: false
190
+ }
191
+ }
192
+ ],
193
+ options: {
194
+ noRecordHistory: true
195
+ }
149
196
  }
150
197
  }
151
198
  ]
@@ -135,7 +135,7 @@ const config = {
135
135
  rootOverride: {
136
136
  styles: {
137
137
  align: {
138
- desktop: 'center'
138
+ desktop: 'left'
139
139
  }
140
140
  },
141
141
  advanced: {
@@ -1,4 +1,4 @@
1
- import { makeStyleResponsive } from '@gem-sdk/core';
1
+ import { DEVICES, makeStyleResponsive } from '@gem-sdk/core';
2
2
 
3
3
  const getPlusIcon = (plusIcon)=>{
4
4
  return plusIcon ?? `<svg
@@ -28,17 +28,11 @@ const getMinusIcon = (minusIcon)=>{
28
28
  `;
29
29
  };
30
30
  const getIconWidth = (iconSizeCustom)=>{
31
- let check = true;
32
- Object.keys(iconSizeCustom ?? {}).forEach((key)=>{
33
- if (typeof (iconSizeCustom ?? {})[key] != 'string' && typeof (iconSizeCustom ?? {})[key] != 'number') {
34
- check = false;
35
- }
36
- });
37
- return check ? makeStyleResponsive('w', iconSizeCustom, 'px') : makeStyleResponsive('w', {
38
- desktop: `${(iconSizeCustom?.['desktop'])?.width}px`,
39
- tablet: `${(iconSizeCustom?.['tablet'])?.width}px`,
40
- mobile: `${(iconSizeCustom?.['mobile'])?.width}px`
31
+ if (!iconSizeCustom) return {};
32
+ DEVICES.forEach((device)=>{
33
+ if (!iconSizeCustom?.[device]) iconSizeCustom[device] = iconSizeCustom['desktop'] || undefined;
41
34
  });
35
+ return makeStyleResponsive('w', iconSizeCustom);
42
36
  };
43
37
 
44
38
  export { getIconWidth, getMinusIcon, getPlusIcon };
@@ -110,7 +110,9 @@ const ProductQuantity = (props)=>{
110
110
  const iconWrapperClass = createClass({
111
111
  ...getIconWrapperClasses()
112
112
  });
113
- const iconWidth = getIconWidth(iconSizeCustom);
113
+ const iconWidth = createStyle({
114
+ ...getIconWidth(iconSizeCustom)
115
+ });
114
116
  return /*#__PURE__*/ jsx("div", {
115
117
  ref: ref,
116
118
  ...containerAttrs,
@@ -6,7 +6,7 @@ const ProductQuantitySettings = [
6
6
  id: 'updatePrice',
7
7
  label: 'Update price',
8
8
  type: 'toggle',
9
- default: false
9
+ default: true
10
10
  },
11
11
  {
12
12
  id: 'qtyStyle',
@@ -196,10 +196,11 @@ const ProductQuantitySettings = [
196
196
  {
197
197
  id: 'iconSizeCustom',
198
198
  type: 'input:stepper',
199
+ includeUnit: 'px',
199
200
  min: 1,
200
201
  devices: {
201
202
  desktop: {
202
- default: 16
203
+ default: '16px'
203
204
  }
204
205
  }
205
206
  }
@@ -304,28 +305,29 @@ const ProductQuantitySettings = [
304
305
  id: 'inputBackgroundColor',
305
306
  type: 'color-picker-v2',
306
307
  label: 'Background Color',
307
- default: {
308
- normal: 'bg-3'
309
- },
310
308
  state: {
311
309
  hover: true,
312
310
  normal: true
313
311
  },
312
+ compoDefaultValue: {
313
+ normal: 'bg-3',
314
+ hover: 'highlight'
315
+ },
314
316
  enableGradient: true
315
317
  },
316
318
  {
317
319
  id: 'buttonBackgroundColor',
318
320
  type: 'color-picker-v2',
319
321
  label: 'Button Background Color',
320
- default: {
321
- normal: 'brand',
322
- hover: 'highlight'
323
- },
324
322
  state: {
325
323
  hover: true,
326
324
  normal: true
327
325
  },
328
- enableGradient: true
326
+ enableGradient: true,
327
+ compoDefaultValue: {
328
+ normal: 'brand',
329
+ hover: 'highlight'
330
+ }
329
331
  },
330
332
  {
331
333
  id: 'iconColor',
@@ -354,7 +356,7 @@ const ProductQuantitySettings = [
354
356
  border: 'solid',
355
357
  borderWidth: '1px',
356
358
  width: '1px 1px 1px 1px',
357
- color: '#121212',
359
+ color: 'line-1',
358
360
  isCustom: true
359
361
  },
360
362
  hover: {
@@ -362,7 +364,6 @@ const ProductQuantitySettings = [
362
364
  border: 'none',
363
365
  borderWidth: '1px',
364
366
  width: '1px 1px 1px 1px',
365
- color: '#121212',
366
367
  isCustom: true
367
368
  }
368
369
  }
@@ -498,7 +499,7 @@ const ProductQuantitySettings = [
498
499
  id: 'dividerColor',
499
500
  type: 'color-picker-v2',
500
501
  label: 'Divider Color',
501
- devices: {
502
+ compoDefaultValue: {
502
503
  desktop: {
503
504
  default: {
504
505
  normal: '#121212'
@@ -11,6 +11,7 @@ const SettingUIV2 = [
11
11
  },
12
12
  iconName: 'polaris-text-block',
13
13
  getValueFromSettingID: 'label',
14
+ defaultValueWhenClear: '',
14
15
  controls: [
15
16
  {
16
17
  label: {
@@ -12,7 +12,6 @@ import { getClassesWrapper, getContainClasses, getStyleTagClasses, getTabParentL
12
12
 
13
13
  const Tabs = (props)=>{
14
14
  const { builderAttrs, builderProps, style, setting, advanced, children } = props;
15
- delete setting?.labelTypoV2?.attrs?.color;
16
15
  const { cssClass } = advanced ?? {};
17
16
  const { panelFullWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
18
17
  const { currentDevice, productID, dispatchEventTabActive, activeTab, setActiveKey, refContainer } = useTab(setting, builderProps);
@@ -1,4 +1,4 @@
1
- import { getStyleBackgroundByDevice, makeStyleResponsive, makeStyle, getSingleColorVariable, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
1
+ import { getStyleBackgroundByDevice, getGradientBgrStyleByDevice, makeStyleResponsive, makeStyle, getSingleColorVariable, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
2
2
  import { filterTruthyStyles } from '../../../helpers.js';
3
3
  import { getStyleWidthByPositionResponsive, initialStyles } from './common.js';
4
4
 
@@ -6,7 +6,12 @@ const getStyleWrapper = (setting, style)=>{
6
6
  const { background } = setting ?? {};
7
7
  const composeStyles = {
8
8
  ...style,
9
- ...getStyleBackgroundByDevice(background)
9
+ ...getStyleBackgroundByDevice(background),
10
+ ...getGradientBgrStyleByDevice(background, {
11
+ desktop: true,
12
+ tablet: true,
13
+ mobile: true
14
+ })
10
15
  };
11
16
  return filterTruthyStyles(composeStyles);
12
17
  };
@@ -1390,6 +1390,9 @@ type Setting$2 = {
1390
1390
  btnBg?: ColorValueType$1;
1391
1391
  btnRounded?: CornerRadius;
1392
1392
  btnSize?: number;
1393
+ btnWidth?: ObjectDevices$1<string>;
1394
+ btnHeight?: ObjectDevices$1<string>;
1395
+ btnPadding?: ObjectDevices$1<PaddingType$1>;
1393
1396
  background?: ObjectDevices$1<BackgroundMedia>;
1394
1397
  iconSize?: string;
1395
1398
  effectType?: 'fade' | 'zoom' | 'zoom-out' | 'horizontal' | 'vertical' | 'unfold' | 'none';
@@ -1602,9 +1605,9 @@ type NewsLetterSetting = {
1602
1605
  };
1603
1606
  type NewsLetterStyle = {
1604
1607
  globalSize?: ObjectDevices$1<SizeSettingGlobal>;
1605
- shapeBorder?: ObjectDevices$1<Border>;
1606
- shapeRounded?: ObjectDevices$1<CornerRadius>;
1607
- shapeBoxShadow?: ObjectDevices$1<ShadowProps$1>;
1608
+ border?: ObjectDevices$1<Border>;
1609
+ rounded?: ObjectDevices$1<CornerRadius>;
1610
+ boxShadow?: ObjectDevices$1<ShadowProps$1>;
1608
1611
  };
1609
1612
  type NewsletterProps = BasePropsWrap<NewsLetterSetting, NewsLetterStyle> & {
1610
1613
  children?: React.ReactNode;
@@ -4047,7 +4050,7 @@ type ProductQuantityProps = BaseProps<{
4047
4050
  buttonBackgroundColor?: StateProp<ColorValueType$1>;
4048
4051
  iconColor?: StateProp<ColorValueType$1>;
4049
4052
  borderBtn?: ObjectDevices$1<StateProp<Border>>;
4050
- iconSizeCustom?: ObjectDevices$1<number>;
4053
+ iconSizeCustom?: ObjectDevices$1<string>;
4051
4054
  corner?: ObjectDevices$1<StateProp<CornerRadius>>;
4052
4055
  shapeShadow?: ObjectDevices$1<StateProp<ShadowProps$1>>;
4053
4056
  buttonBoxShadow?: ObjectDevices$1<StateProp<ShadowProps$1>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.426",
3
+ "version": "2.0.0-dev.431",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,7 +23,7 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.415",
26
+ "@gem-sdk/core": "2.0.0-dev.431",
27
27
  "@gem-sdk/styles": "2.0.0-dev.381",
28
28
  "@gem-sdk/system": "2.0.0-dev.371",
29
29
  "@types/react-transition-group": "^4.4.5"