@gem-sdk/components 2.0.0-dev.460 → 2.0.0-dev.462

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 (39) hide show
  1. package/dist/cjs/form/components/form-dropdown/common/composeClasses.js +1 -1
  2. package/dist/cjs/form/components/form-dropdown/common/composeStyles.js +1 -34
  3. package/dist/cjs/form/components/form-dropdown/hooks/index.js +2 -2
  4. package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +9 -7
  5. package/dist/cjs/form/components/newsletter/common/composeAttrs.js +6 -1
  6. package/dist/cjs/form/components/newsletter/common/composeStyles.js +10 -4
  7. package/dist/cjs/form/setting/form-checkbox/configs/uiV2.js +3 -0
  8. package/dist/cjs/form/setting/form-textarea/configs/uiV2.js +3 -0
  9. package/dist/cjs/form/setting/text-field/configs/uiV2.js +3 -0
  10. package/dist/cjs/marquee/setting/Marquee.js +1 -3
  11. package/dist/cjs/marquee/setting/configs/presets.js +10 -10
  12. package/dist/cjs/marquee/setting/configs/settingsV2.js +42 -40
  13. package/dist/cjs/marquee/setting/configs/uiV2.js +137 -34
  14. package/dist/cjs/product/components/ProductVariants/components/variants/index.js +4 -1
  15. package/dist/cjs/product/setting/product-list/configs/presets.js +4 -6
  16. package/dist/cjs/product/setting/product-title/configs/settings.js +2 -2
  17. package/dist/cjs/product/setting/product-variant/configs/settings.js +9 -7
  18. package/dist/cjs/product/setting/product-variant/configs/uiV2.js +0 -3
  19. package/dist/esm/form/components/form-dropdown/common/composeClasses.js +1 -1
  20. package/dist/esm/form/components/form-dropdown/common/composeStyles.js +3 -35
  21. package/dist/esm/form/components/form-dropdown/hooks/index.js +2 -2
  22. package/dist/esm/form/components/newsletter/Newsletter.liquid.js +9 -7
  23. package/dist/esm/form/components/newsletter/common/composeAttrs.js +6 -1
  24. package/dist/esm/form/components/newsletter/common/composeStyles.js +10 -4
  25. package/dist/esm/form/setting/form-checkbox/configs/uiV2.js +3 -0
  26. package/dist/esm/form/setting/form-textarea/configs/uiV2.js +3 -0
  27. package/dist/esm/form/setting/text-field/configs/uiV2.js +3 -0
  28. package/dist/esm/marquee/setting/Marquee.js +1 -3
  29. package/dist/esm/marquee/setting/configs/presets.js +10 -10
  30. package/dist/esm/marquee/setting/configs/settingsV2.js +42 -40
  31. package/dist/esm/marquee/setting/configs/uiV2.js +137 -34
  32. package/dist/esm/product/components/ProductVariants/components/variants/index.js +4 -1
  33. package/dist/esm/product/setting/product-list/configs/presets.js +4 -6
  34. package/dist/esm/product/setting/product-title/configs/settings.js +2 -2
  35. package/dist/esm/product/setting/product-variant/configs/settings.js +9 -7
  36. package/dist/esm/product/setting/product-variant/configs/uiV2.js +0 -3
  37. package/package.json +2 -2
  38. package/dist/cjs/marquee/setting/configs/settings.js +0 -318
  39. package/dist/esm/marquee/setting/configs/settings.js +0 -316
@@ -16,7 +16,7 @@ const composeFormDropdownClasses = (setting)=>{
16
16
  return composeClasses({
17
17
  [appendTypoClass]: !!appendTypoClass,
18
18
  [`${core.genSizeClass(setting?.size?.type)}`]: !!setting?.size?.type,
19
- 'gp-form-item !gp-outline-none focus:!gp-shadow-none hover:!gp-shadow-none': true
19
+ 'gp-form-item !gp-outline-none ': true
20
20
  });
21
21
  };
22
22
 
@@ -28,7 +28,7 @@ const composeContainerStyles = (advanced, setting)=>{
28
28
  const composeFormDropdownStyles = (advanced, setting, styles)=>{
29
29
  const { border, rounded, hasBoxShadow, boxShadow } = advanced ?? {};
30
30
  const { background, size } = setting ?? {};
31
- const { globalSize, borderActive, boxShadowActive, roundedActive, backgroundColorV2Active } = styles ?? {};
31
+ const { globalSize, backgroundColorV2Active } = styles ?? {};
32
32
  const inputStyle = core.composeAdvanceStyle({
33
33
  border,
34
34
  rounded,
@@ -48,18 +48,6 @@ const composeFormDropdownStyles = (advanced, setting, styles)=>{
48
48
  ...!size?.type ? core.composeSize(size?.custom) : {},
49
49
  appearance: 'none',
50
50
  ...core.getStyleBackgroundByDevice(background),
51
- ...generateStylesTarget({
52
- state: 'focus',
53
- borderStyle: borderActive?.active,
54
- background: backgroundColorV2Active?.active,
55
- radius: roundedActive?.active
56
- }),
57
- ...core.getStyleShadow({
58
- value: boxShadowActive?.active,
59
- state: 'focus',
60
- styleAppliedFor: 'box-shadow',
61
- isEnableShadow: true
62
- }),
63
51
  '--bgi': getBgImageUrl(background?.desktop?.color),
64
52
  'background-repeat': 'no-repeat',
65
53
  'background-position': 'right 10px center, 0 0',
@@ -70,26 +58,6 @@ const getBgImageUrl = (color)=>{
70
58
  const iconDropDown = 'url(https://cdn.shopify.com/s/files/1/1827/4239/t/1/assets/ico-select.svg?v=155563818344741998551488860031)';
71
59
  return `${iconDropDown} ${color?.includes('linear-gradient') ? ',' + color : ''}`;
72
60
  };
73
- const generateStylesTarget = ({ state, borderStyle, background, radius })=>{
74
- const { border, width, color } = borderStyle ?? {};
75
- const getState = {
76
- hover: 'hvr',
77
- focus: 'focus'
78
- };
79
- const currentState = getState[state];
80
- return {
81
- ...width && {
82
- [`--${currentState}-bw`]: `${width}`
83
- },
84
- ...border && {
85
- [`--${currentState}-b`]: `${border} ${core.getSingleColorVariable(color)}`
86
- },
87
- ...background && {
88
- [`--${currentState}-bgc`]: `${core.getSingleColorVariable(background)}`
89
- },
90
- ...core.getCustomRadius(state, radius)
91
- };
92
- };
93
61
  const getAppendTypoStyleFirstTime = (setting)=>{
94
62
  const appendTypoStyle = core.composeTypographyStyle(setting?.typo, setting?.typography);
95
63
  return composeStyles({
@@ -109,6 +77,5 @@ const getStyleOption = (setting)=>{
109
77
 
110
78
  exports.composeContainerStyles = composeContainerStyles;
111
79
  exports.composeFormDropdownStyles = composeFormDropdownStyles;
112
- exports.generateStylesTarget = generateStylesTarget;
113
80
  exports.getAppendTypoStyleFirstTime = getAppendTypoStyleFirstTime;
114
81
  exports.getStyleOption = getStyleOption;
@@ -5,7 +5,7 @@ var core = require('@gem-sdk/core');
5
5
 
6
6
  const useGetColorContent = (setting)=>{
7
7
  const [showPlaceholder, setShowPlaceholder] = React.useState(true);
8
- const { typography, placeholderColor } = setting ?? {};
8
+ const { typography, placeholderColor, defaultOption } = setting ?? {};
9
9
  const appendTypoStyle = core.composeTypographyStyle(setting?.typo, typography);
10
10
  const handleOnChange = ()=>{
11
11
  if (showPlaceholder) {
@@ -16,7 +16,7 @@ const useGetColorContent = (setting)=>{
16
16
  handleOnChange,
17
17
  getTextColor: {
18
18
  ...appendTypoStyle,
19
- ...showPlaceholder && {
19
+ ...showPlaceholder && Number(defaultOption) === 0 && {
20
20
  '--c': placeholderColor
21
21
  }
22
22
  }
@@ -31,8 +31,10 @@ const Newsletter = ({ builderProps, setting, children, style, formType, advanced
31
31
  const composedContainerStyles = system.createStyle(composeStyles.composeContainerStylesForm(style));
32
32
  const anchorAttrs = composeAttrs.composeAnchorAttrs(builderProps, setting);
33
33
  const composedFormClasses = system.createClass(composeClasses.composeFormClasses());
34
- const composedFormStyles = system.createStyle(composeStyles.composeFormStyles(setting));
35
- const formAttrs = composeAttrs.composeFormAttrs(builderProps);
34
+ const composedFormStylesError = system.createStyle(composeStyles.composeFormStyles('error'));
35
+ const composedFormStylesSuccess = system.createStyle(composeStyles.composeFormStyles('success'));
36
+ const formAttrsError = composeAttrs.composeFormAttrs(builderProps, 'error');
37
+ const formAttrsSuccess = composeAttrs.composeFormAttrs(builderProps, 'success');
36
38
  const popoverAttrs = composeAttrs.composePopoverAttrs(builderProps);
37
39
  const generatedPopoverStyles = composeStyles.popoverStyles(builderProps);
38
40
  const containerStyle = system.createStyle(composeStyles$1.composeContainerStyles(setting, styles));
@@ -55,10 +57,10 @@ const Newsletter = ({ builderProps, setting, children, style, formType, advanced
55
57
  {% if form.errors %}
56
58
  <div
57
59
  ${{
58
- ...formAttrs
60
+ ...formAttrsError
59
61
  }}
60
62
  class="${composedFormClasses}"
61
- style="${composedFormStyles}"
63
+ style="${composedFormStylesError}"
62
64
  >
63
65
  ${errorMessage}
64
66
  </div>
@@ -67,14 +69,14 @@ const Newsletter = ({ builderProps, setting, children, style, formType, advanced
67
69
  ...popoverAttrs
68
70
  }}>
69
71
  <style>
70
- ${generatedPopoverStyles}
72
+ ${generatedPopoverStyles}
71
73
  </style>
72
74
  <div
73
75
  ${{
74
- ...formAttrs
76
+ ...formAttrsSuccess
75
77
  }}
76
78
  class="${composedFormClasses}"
77
- style="${composedFormStyles}"
79
+ style="${composedFormStylesSuccess}"
78
80
  >
79
81
  ${successMessage}
80
82
  </div>
@@ -19,7 +19,12 @@ const composeAnchorAttrs = (builderProps, setting)=>{
19
19
  target: urlData?.target
20
20
  });
21
21
  };
22
- const composeFormAttrs = (builderProps)=>{
22
+ const composeFormAttrs = (builderProps, type)=>{
23
+ if (type === 'success') {
24
+ return composeAttribute({
25
+ id: `gp-form-success-${builderProps?.uid}`
26
+ });
27
+ }
23
28
  return composeAttribute({
24
29
  id: `gp-form-error-${builderProps?.uid}`
25
30
  });
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var common = require('../../../helpers/common.js');
4
- var core = require('@gem-sdk/core');
5
4
 
6
5
  const composeStyles = (styles)=>common.filterTruthy(styles);
7
6
  const composeContainerStylesForm = (style)=>{
@@ -9,10 +8,17 @@ const composeContainerStylesForm = (style)=>{
9
8
  ...style
10
9
  });
11
10
  };
12
- const composeFormStyles = (setting)=>{
13
- const { background } = setting ?? {};
11
+ const composeFormStyles = (type)=>{
12
+ if (type === 'success') {
13
+ return composeStyles({
14
+ 'background-color': '#F2FFEC',
15
+ left: '50%',
16
+ transform: 'translateX(-50%)',
17
+ color: '#009D3E'
18
+ });
19
+ }
14
20
  return composeStyles({
15
- ...core.getStyleBackgroundByDevice(background),
21
+ 'background-color': '#FFE9E9',
16
22
  left: '50%',
17
23
  transform: 'translateX(-50%)',
18
24
  color: '#EA3335'
@@ -207,6 +207,9 @@ const SettingUIV2 = [
207
207
  },
208
208
  setting: {
209
209
  id: 'name'
210
+ },
211
+ help: {
212
+ content: 'Identify the information submitted via this element.'
210
213
  }
211
214
  }
212
215
  ]
@@ -129,6 +129,9 @@ const SettingUIV2 = [
129
129
  },
130
130
  setting: {
131
131
  id: 'name'
132
+ },
133
+ help: {
134
+ content: 'Identify the information submitted via this element.'
132
135
  }
133
136
  }
134
137
  ]
@@ -147,6 +147,9 @@ const SettingUIV2 = [
147
147
  },
148
148
  setting: {
149
149
  id: 'name'
150
+ },
151
+ help: {
152
+ content: 'Identify the information submitted via this element.'
150
153
  }
151
154
  }
152
155
  ]
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var presets = require('./configs/presets.js');
6
- var settings = require('./configs/settings.js');
7
6
  var settingsV2 = require('./configs/settingsV2.js');
8
7
  var uiV1 = require('./configs/uiV1.js');
9
8
  var uiV2 = require('./configs/uiV2.js');
@@ -16,8 +15,7 @@ const config = {
16
15
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.96586 7.25C4.96586 6.14543 5.86129 5.25 6.96586 5.25H17.0346C18.1391 5.25 19.0346 6.14543 19.0346 7.25V16.7484C19.0346 17.853 18.1391 18.7484 17.0346 18.7484H6.96586C5.86129 18.7484 4.96586 17.853 4.96586 16.7484V7.25ZM9.36039 6.25H6.96586C6.41357 6.25 5.96586 6.69772 5.96586 7.25V16.7484C5.96586 17.3007 6.41357 17.7484 6.96586 17.7484H9.36039L9.36039 6.25ZM10.3604 17.7484V6.25H14.1455V17.7484H10.3604ZM15.1455 17.7484H17.0346C17.5869 17.7484 18.0346 17.3007 18.0346 16.7484V7.25C18.0346 6.69771 17.5869 6.25 17.0346 6.25H15.1455V17.7484ZM3.31666 10.5447C3.51708 10.7346 3.52555 11.0511 3.33558 11.2515L2.61349 12.0133L3.33449 12.7691C3.52509 12.969 3.51762 13.2854 3.31781 13.4761C3.118 13.6667 2.8015 13.6592 2.6109 13.4594L1.693 12.4971C1.43561 12.2273 1.43493 11.803 1.69148 11.5324L2.60981 10.5636C2.79978 10.3632 3.11625 10.3547 3.31666 10.5447ZM20.6827 10.5458C20.8825 10.3552 21.199 10.3627 21.3896 10.5625L22.3075 11.5247C22.5649 11.7946 22.5656 12.2188 22.309 12.4894L21.3907 13.4583C21.2007 13.6587 20.8843 13.6672 20.6839 13.4772C20.4834 13.2872 20.475 12.9707 20.6649 12.7703L21.387 12.0085L20.666 11.2527C20.4754 11.0529 20.4829 10.7364 20.6827 10.5458ZM21.5839 12.215C21.5838 12.2149 21.584 12.2151 21.5839 12.215V12.215Z" fill="white"/>
17
16
  </svg>
18
17
  `,
19
- settings: settings.MarqueeSettings,
20
- settingsV2: settingsV2.MarqueeSettingsV2,
18
+ settings: settingsV2.MarqueeSettingsV2,
21
19
  ui: uiV1.SettingUIV1,
22
20
  uiV2: uiV2.SettingUIV2,
23
21
  editorConfigs: {
@@ -41,11 +41,11 @@ const MarqueePresets = [
41
41
  'spacing-setting': {
42
42
  desktop: {
43
43
  padding: {
44
- top: '12px',
45
- bottom: '12px'
46
- },
47
- margin: {
48
- bottom: '16px'
44
+ type: 'custom',
45
+ top: '16px',
46
+ bottom: '16px',
47
+ left: '0px',
48
+ right: '0px'
49
49
  }
50
50
  }
51
51
  }
@@ -123,11 +123,11 @@ const MarqueePresets = [
123
123
  'spacing-setting': {
124
124
  desktop: {
125
125
  padding: {
126
- top: '12px',
127
- bottom: '12px'
128
- },
129
- margin: {
130
- bottom: '16px'
126
+ type: 'custom',
127
+ top: '16px',
128
+ bottom: '16px',
129
+ left: '0px',
130
+ right: '0px'
131
131
  }
132
132
  }
133
133
  }
@@ -6,6 +6,40 @@ const MarqueeSettingsV2 = [
6
6
  {
7
7
  id: 'setting',
8
8
  controls: [
9
+ {
10
+ id: 'itemWidthType',
11
+ type: 'select',
12
+ label: 'Aspect Ratio',
13
+ isFullWidth: true,
14
+ options: [
15
+ {
16
+ label: 'Fit to content',
17
+ value: 'FIT_CONTENT',
18
+ note: 'Match the width of the element inside'
19
+ },
20
+ {
21
+ label: 'Based on the item count',
22
+ value: 'BASE_ON_NUMBER_OF_ITEMS',
23
+ note: 'Max item width is screen width divided by the number of items'
24
+ },
25
+ {
26
+ label: 'Custom',
27
+ value: 'CUSTOM',
28
+ note: 'Set the max width as you want'
29
+ }
30
+ ],
31
+ devices: {
32
+ desktop: {
33
+ default: 'FIT_CONTENT'
34
+ },
35
+ tablet: {
36
+ default: 'FIT_CONTENT'
37
+ },
38
+ mobile: {
39
+ default: 'CUSTOM'
40
+ }
41
+ }
42
+ },
9
43
  {
10
44
  id: 'activeItem',
11
45
  type: 'input',
@@ -45,7 +79,7 @@ const MarqueeSettingsV2 = [
45
79
  id: 'stopOnHover',
46
80
  label: 'stopOnHover',
47
81
  type: 'toggle',
48
- default: false
82
+ default: true
49
83
  },
50
84
  {
51
85
  id: 'speed',
@@ -90,40 +124,6 @@ const MarqueeSettingsV2 = [
90
124
  label: 'hasItemShadow',
91
125
  type: 'toggle',
92
126
  default: false
93
- },
94
- {
95
- id: 'itemWidthType',
96
- type: 'select',
97
- label: 'Aspect Ratio',
98
- isFullWidth: true,
99
- options: [
100
- {
101
- label: 'Fit to content',
102
- value: 'FIT_CONTENT',
103
- note: 'Match the width of the element inside'
104
- },
105
- {
106
- label: 'Based on the item count',
107
- value: 'BASE_ON_NUMBER_OF_ITEMS',
108
- note: 'Max item width is screen width divided by the number of items'
109
- },
110
- {
111
- label: 'Custom',
112
- value: 'CUSTOM',
113
- note: 'Set the max width as you want'
114
- }
115
- ],
116
- devices: {
117
- desktop: {
118
- default: 'BASE_ON_NUMBER_OF_ITEMS'
119
- },
120
- tablet: {
121
- default: 'BASE_ON_NUMBER_OF_ITEMS'
122
- },
123
- mobile: {
124
- default: 'CUSTOM'
125
- }
126
- }
127
127
  }
128
128
  ]
129
129
  },
@@ -155,15 +155,17 @@ const MarqueeSettingsV2 = [
155
155
  {
156
156
  id: 'itemSpacing',
157
157
  label: 'Spacing',
158
- type: 'input:unit',
158
+ type: 'input:slider',
159
159
  units: [
160
160
  'px'
161
161
  ],
162
- placeholder: 'Auto',
163
162
  min: 0,
163
+ max: 100,
164
+ step: 1,
165
+ placeholder: 'Auto',
164
166
  devices: {
165
167
  desktop: {
166
- default: '48px'
168
+ default: '60px'
167
169
  }
168
170
  }
169
171
  },
@@ -221,9 +223,9 @@ const MarqueeSettingsV2 = [
221
223
  }
222
224
  },
223
225
  hiddenSettings: [
224
- 'padding',
225
226
  'gap',
226
- 'shape'
227
+ 'shape',
228
+ 'padding'
227
229
  ]
228
230
  },
229
231
  {
@@ -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'
@@ -18,7 +18,22 @@ const SettingUIV2 = [
18
18
  },
19
19
  {
20
20
  label: {
21
- en: 'Item'
21
+ en: 'Item spacing'
22
+ },
23
+ controls: [
24
+ {
25
+ label: {
26
+ en: 'Gap'
27
+ },
28
+ setting: {
29
+ id: 'itemSpacing'
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ label: {
36
+ en: 'Item style'
22
37
  },
23
38
  controls: [
24
39
  {
@@ -27,8 +42,7 @@ const SettingUIV2 = [
27
42
  },
28
43
  label: {
29
44
  en: 'Max width'
30
- },
31
- layout: 'vertical'
45
+ }
32
46
  },
33
47
  {
34
48
  layout: 'vertical',
@@ -79,26 +93,11 @@ const SettingUIV2 = [
79
93
  ]
80
94
  }
81
95
  },
82
- {
83
- label: {
84
- en: 'Item spacing'
85
- },
86
- controls: [
87
- {
88
- label: {
89
- en: 'Gap'
90
- },
91
- setting: {
92
- id: 'itemSpacing'
93
- }
94
- }
95
- ]
96
- },
97
96
  {
98
97
  controls: [
99
98
  {
100
99
  label: {
101
- en: 'Icon separator'
100
+ en: 'Separator'
102
101
  },
103
102
  setting: {
104
103
  id: 'isShowIconSeparator'
@@ -114,7 +113,7 @@ const SettingUIV2 = [
114
113
  },
115
114
  conditionDisplay: 'isShowIconSeparator == true',
116
115
  label: {
117
- en: 'Choose'
116
+ en: 'Icon'
118
117
  }
119
118
  },
120
119
  {
@@ -137,6 +136,43 @@ const SettingUIV2 = [
137
136
  }
138
137
  ]
139
138
  },
139
+ {
140
+ label: {
141
+ en: 'Marquee effect'
142
+ },
143
+ controls: [
144
+ {
145
+ label: {
146
+ en: 'Direction'
147
+ },
148
+ setting: {
149
+ id: 'direction'
150
+ }
151
+ },
152
+ {
153
+ label: {
154
+ en: 'Stop on hover'
155
+ },
156
+ setting: {
157
+ id: 'stopOnHover'
158
+ }
159
+ },
160
+ {
161
+ label: {
162
+ en: 'Speed'
163
+ },
164
+ setting: {
165
+ id: 'speed'
166
+ }
167
+ },
168
+ {
169
+ setting: {
170
+ id: 'isPreview'
171
+ },
172
+ layout: 'vertical'
173
+ }
174
+ ]
175
+ },
140
176
  {
141
177
  label: {
142
178
  en: 'Size'
@@ -200,6 +236,32 @@ const SettingUIV2 = [
200
236
  }
201
237
  ]
202
238
  }
239
+ },
240
+ {
241
+ label: {
242
+ en: 'Padding'
243
+ },
244
+ controlConfig: {
245
+ id: 'padding',
246
+ type: 'padding-v2',
247
+ linkWithSetting: {
248
+ name: 'spacing-setting',
249
+ field: 'padding'
250
+ },
251
+ compoDefaultValue: {
252
+ desktop: {
253
+ default: {
254
+ padding: {
255
+ type: 'custom',
256
+ top: '16px',
257
+ bottom: '16px',
258
+ left: '0px',
259
+ right: '0px'
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
203
265
  }
204
266
  ]
205
267
  },
@@ -220,38 +282,79 @@ const SettingUIV2 = [
220
282
  },
221
283
  {
222
284
  label: {
223
- en: 'Interaction'
285
+ en: 'Shape'
224
286
  },
225
287
  controls: [
226
288
  {
227
289
  label: {
228
- en: 'Stop on hover'
290
+ en: 'Border'
229
291
  },
230
292
  setting: {
231
- id: 'stopOnHover'
293
+ id: 'border',
294
+ state: 'normal'
232
295
  }
233
296
  },
234
297
  {
235
298
  label: {
236
- en: 'Speed'
299
+ en: 'Corner'
237
300
  },
238
301
  setting: {
239
- id: 'speed'
302
+ id: 'rounded',
303
+ state: 'normal'
240
304
  }
241
305
  },
242
306
  {
243
307
  label: {
244
- en: 'Direction'
308
+ en: 'Shadow'
245
309
  },
246
310
  setting: {
247
- id: 'direction'
248
- }
249
- },
250
- {
251
- setting: {
252
- id: 'isPreview'
311
+ id: 'boxShadow',
312
+ state: 'normal'
253
313
  },
254
- layout: 'vertical'
314
+ options: {
315
+ updateFields: [
316
+ {
317
+ field: 'enable',
318
+ settingId: 'hasBoxShadow',
319
+ state: 'normal'
320
+ }
321
+ ]
322
+ },
323
+ controlChangeTrigger: {
324
+ settings: [
325
+ {
326
+ condition: `boxShadow.normal.enable === true`,
327
+ source: [
328
+ 'boxShadow',
329
+ 'hasBoxShadow'
330
+ ],
331
+ action: {
332
+ controlId: 'hasBoxShadow',
333
+ groupType: 'advanced',
334
+ controlType: 'advanced',
335
+ state: 'normal',
336
+ newValue: true
337
+ }
338
+ },
339
+ {
340
+ condition: `boxShadow.normal.enable === false`,
341
+ source: [
342
+ 'boxShadow',
343
+ 'hasBoxShadow'
344
+ ],
345
+ action: {
346
+ controlId: 'hasBoxShadow',
347
+ groupType: 'advanced',
348
+ controlType: 'advanced',
349
+ state: 'normal',
350
+ newValue: false
351
+ }
352
+ }
353
+ ],
354
+ options: {
355
+ noRecordHistory: true
356
+ }
357
+ }
255
358
  }
256
359
  ]
257
360
  },
@@ -75,7 +75,10 @@ const VariantItem = (props)=>{
75
75
  window.dispatchEvent(changeSelectedOptionEvent);
76
76
  }
77
77
  };
78
- const labelClass = system.createClass(classes.getVariantItemLabelClass(props));
78
+ const labelClass = system.createClass(classes.getVariantItemLabelClass({
79
+ ...props,
80
+ available
81
+ }));
79
82
  const tooltipClass = system.createClass(classes.getTooltipClass());
80
83
  const tooltipSvgClass = system.createClass(classes.getTooltipSvgClass());
81
84
  const variantOptionClass = system.createClass(classes.getVariantOptionClass());