@gem-sdk/components 2.0.0-dev.715 → 2.0.0-dev.717

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 (28) hide show
  1. package/dist/cjs/button/components/Button.js +1 -1
  2. package/dist/cjs/button/components/common/classes.js +1 -1
  3. package/dist/cjs/button/components/common/styles.js +2 -1
  4. package/dist/cjs/code/common/classes.js +1 -1
  5. package/dist/cjs/form/setting/text-field/configs/uiV2.js +3 -0
  6. package/dist/cjs/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +1 -1
  7. package/dist/cjs/product/setting/constant/bundle-layout/horizontalThree.js +17 -1
  8. package/dist/cjs/product/setting/constant/bundle-layout/horizontalTwo.js +17 -1
  9. package/dist/cjs/product/setting/constant/bundle-layout/verticalThree.js +17 -1
  10. package/dist/cjs/product/setting/constant/bundle-layout/verticalTwo.js +17 -1
  11. package/dist/cjs/product/setting/product-view-more/configs/settings.js +1 -1
  12. package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +20 -0
  13. package/dist/cjs/text/setting/configs/settings.js +1 -0
  14. package/dist/esm/button/components/Button.js +1 -1
  15. package/dist/esm/button/components/common/classes.js +1 -1
  16. package/dist/esm/button/components/common/styles.js +3 -2
  17. package/dist/esm/code/common/classes.js +1 -1
  18. package/dist/esm/form/setting/text-field/configs/uiV2.js +3 -0
  19. package/dist/esm/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +1 -1
  20. package/dist/esm/product/setting/constant/bundle-layout/horizontalThree.js +17 -1
  21. package/dist/esm/product/setting/constant/bundle-layout/horizontalTwo.js +17 -1
  22. package/dist/esm/product/setting/constant/bundle-layout/verticalThree.js +17 -1
  23. package/dist/esm/product/setting/constant/bundle-layout/verticalTwo.js +17 -1
  24. package/dist/esm/product/setting/product-view-more/configs/settings.js +1 -1
  25. package/dist/esm/product/setting/product-view-more/configs/uiV2.js +20 -0
  26. package/dist/esm/text/setting/configs/settings.js +1 -0
  27. package/dist/types/index.d.ts +1 -1
  28. package/package.json +2 -2
@@ -114,7 +114,7 @@ const Button = (props)=>{
114
114
  styles: buttonIconStyles,
115
115
  classes: buttonIconClasses
116
116
  })),
117
- system.If(enableTextStyle && checkIsShowLabel(), /*#__PURE__*/ jsxRuntime.jsx(ButtonLabel.default, {
117
+ system.If(enableTextStyle && checkIsShowLabel() && !!getLabelToDisplay(), /*#__PURE__*/ jsxRuntime.jsx(ButtonLabel.default, {
118
118
  label: getLabelToDisplay(),
119
119
  styles: buttonLabelStyles,
120
120
  classes: buttonLabelClasses
@@ -32,7 +32,7 @@ const getButtonWrapperClasses = (wrapClassName, className, advancedCssClass)=>{
32
32
  const getButtonContentWrapperClasses = (setting)=>{
33
33
  return {
34
34
  'gp-inline-flex': true,
35
- 'gp-flex-row-reverse': setting?.iconAlign === 'right'
35
+ 'gp-flex-row-reverse': setting?.iconAlign === 'right' && !!setting?.label
36
36
  };
37
37
  };
38
38
  const getButtonLabelClasses = (styles, isEditable)=>{
@@ -94,7 +94,8 @@ const getTypoStyles = (styles1)=>{
94
94
  const getBackgroundStyles = (styles1)=>{
95
95
  return {
96
96
  ...core.getStyleBackgroundImage(styles1?.backgroundImage),
97
- ...core.getGlobalColorStateStyle('bg', styles1?.backgroundColorV2)
97
+ ...core.getGlobalColorStateStyle('bg', styles1?.backgroundColorV2),
98
+ ...core.getGradientBgrStyleForButton(styles1?.backgroundColorV2)
98
99
  };
99
100
  };
100
101
  const getCustomCssStyles = ({ styles: styles1, uid: uid1, builderAttrs: builderAttrs1 })=>{
@@ -5,7 +5,7 @@ var core = require('@gem-sdk/core');
5
5
  const getCodeClasses = (uid, condition, cssClass)=>{
6
6
  return core.composeClasses(core.cls(uid, {
7
7
  'gp-sr-only': condition
8
- }, 'gp-cursor-pointer', cssClass));
8
+ }, 'gp-cursor-pointer', 'gp-custom-code', cssClass));
9
9
  };
10
10
 
11
11
  exports.getCodeClasses = getCodeClasses;
@@ -17,6 +17,9 @@ const SettingUIV2 = [
17
17
  controls: [
18
18
  {
19
19
  layout: 'vertical',
20
+ label: {
21
+ en: 'Content'
22
+ },
20
23
  setting: {
21
24
  id: 'placeholder'
22
25
  }
@@ -99,7 +99,7 @@ const FeatureImageWithGallery = ({ builderPropUID, children, enableLazyLoadImage
99
99
  {% assign other_image_index = media_length | minus: 1 %}
100
100
  {% endif %}
101
101
  {% assign otherImage = product.media[other_image_index] %}
102
- ${system.LiquidIf(`otherImage.media_type != 'image'`, `{% assign src = otherImage.preview_image.src %}`)}
102
+ ${system.LiquidIf(`otherImage.media_type != 'image'`, `{% assign src = otherImage.preview_image.src %}`, `{% assign src = otherImage.src %}`)}
103
103
  `)}
104
104
  ${NextImage_liquid.default({
105
105
  srcIsLiquidCode: true,
@@ -149,10 +149,26 @@ const horizontalThree = [
149
149
  }
150
150
  },
151
151
  type: 'paragraph-1'
152
+ },
153
+ textSizeV2: {
154
+ desktop: {
155
+ width: 'Auto',
156
+ height: 'auto',
157
+ shapeLinked: false,
158
+ disableShapeLinked: true,
159
+ hiddenShape: true,
160
+ shape: 'custom',
161
+ padding: {
162
+ top: '12px',
163
+ bottom: '12px',
164
+ left: '12px',
165
+ right: '12px'
166
+ }
167
+ }
152
168
  }
153
169
  },
154
170
  tag: 'ProductBadge',
155
- uid: 'gHRinlrdow',
171
+ uid: 'gXAaVIfN3P',
156
172
  childrens: []
157
173
  },
158
174
  {
@@ -148,10 +148,26 @@ const horizontalTwo = [
148
148
  }
149
149
  },
150
150
  type: 'paragraph-1'
151
+ },
152
+ textSizeV2: {
153
+ desktop: {
154
+ width: 'Auto',
155
+ height: 'auto',
156
+ shapeLinked: false,
157
+ disableShapeLinked: true,
158
+ hiddenShape: true,
159
+ shape: 'custom',
160
+ padding: {
161
+ top: '12px',
162
+ bottom: '12px',
163
+ left: '12px',
164
+ right: '12px'
165
+ }
166
+ }
151
167
  }
152
168
  },
153
169
  tag: 'ProductBadge',
154
- uid: 'gHRinlrdow',
170
+ uid: 'gXAaVIfN3P',
155
171
  childrens: []
156
172
  },
157
173
  {
@@ -289,10 +289,26 @@ const verticalThree = [
289
289
  }
290
290
  },
291
291
  type: 'paragraph-1'
292
+ },
293
+ textSizeV2: {
294
+ desktop: {
295
+ width: 'Auto',
296
+ height: 'auto',
297
+ shapeLinked: false,
298
+ disableShapeLinked: true,
299
+ hiddenShape: true,
300
+ shape: 'custom',
301
+ padding: {
302
+ top: '12px',
303
+ bottom: '12px',
304
+ left: '12px',
305
+ right: '12px'
306
+ }
307
+ }
292
308
  }
293
309
  },
294
310
  tag: 'ProductBadge',
295
- uid: 'gHRinlrdow',
311
+ uid: 'gXAaVIfN3P',
296
312
  childrens: []
297
313
  },
298
314
  {
@@ -289,10 +289,26 @@ const verticalTwo = [
289
289
  }
290
290
  },
291
291
  type: 'paragraph-1'
292
+ },
293
+ textSizeV2: {
294
+ desktop: {
295
+ width: 'Auto',
296
+ height: 'auto',
297
+ shapeLinked: false,
298
+ disableShapeLinked: true,
299
+ hiddenShape: true,
300
+ shape: 'custom',
301
+ padding: {
302
+ top: '12px',
303
+ bottom: '12px',
304
+ left: '12px',
305
+ right: '12px'
306
+ }
307
+ }
292
308
  }
293
309
  },
294
310
  tag: 'ProductBadge',
295
- uid: 'gHRinlrdow',
311
+ uid: 'gXAaVIfN3P',
296
312
  childrens: []
297
313
  },
298
314
  {
@@ -8,7 +8,7 @@ const ProductViewMoreSettings = [
8
8
  id: 'label',
9
9
  label: 'Text',
10
10
  type: 'input',
11
- default: 'View more'
11
+ default: '<p>View more</p>'
12
12
  },
13
13
  {
14
14
  id: 'translate',
@@ -256,6 +256,26 @@ const SettingUIV2 = [
256
256
  options: {
257
257
  labelVariant: 'primary',
258
258
  toggleStyle: 'switch'
259
+ },
260
+ controlChangeTrigger: {
261
+ settings: [
262
+ {
263
+ condition: `enableTextStyle === true && label === ""`,
264
+ source: [
265
+ 'enableTextStyle',
266
+ 'label'
267
+ ],
268
+ action: {
269
+ controlId: 'label',
270
+ groupType: 'setting',
271
+ controlType: 'setting',
272
+ newValue: '<p>View more</p>'
273
+ }
274
+ }
275
+ ],
276
+ options: {
277
+ noRecordHistory: true
278
+ }
259
279
  }
260
280
  },
261
281
  {
@@ -170,6 +170,7 @@ const TextSettings = [
170
170
  type: 'paragraph-1',
171
171
  attrs: {
172
172
  color: 'text-1',
173
+ transform: 'none',
173
174
  isAlwaysLoadBold: false
174
175
  }
175
176
  },
@@ -110,7 +110,7 @@ const Button = (props)=>{
110
110
  styles: buttonIconStyles,
111
111
  classes: buttonIconClasses
112
112
  })),
113
- If(enableTextStyle && checkIsShowLabel(), /*#__PURE__*/ jsx(ButtonLabel, {
113
+ If(enableTextStyle && checkIsShowLabel() && !!getLabelToDisplay(), /*#__PURE__*/ jsx(ButtonLabel, {
114
114
  label: getLabelToDisplay(),
115
115
  styles: buttonLabelStyles,
116
116
  classes: buttonLabelClasses
@@ -30,7 +30,7 @@ const getButtonWrapperClasses = (wrapClassName, className, advancedCssClass)=>{
30
30
  const getButtonContentWrapperClasses = (setting)=>{
31
31
  return {
32
32
  'gp-inline-flex': true,
33
- 'gp-flex-row-reverse': setting?.iconAlign === 'right'
33
+ 'gp-flex-row-reverse': setting?.iconAlign === 'right' && !!setting?.label
34
34
  };
35
35
  };
36
36
  const getButtonLabelClasses = (styles, isEditable)=>{
@@ -1,4 +1,4 @@
1
- import { makeStyleResponsive, getStyleShadowState, composeRadius, makeGlobalSize, composeTypographyStyle, getColor, getStyleShadow, getStyleBackgroundImage, getGlobalColorStateStyle, composeBorderCss, composeCornerCss } from '@gem-sdk/core';
1
+ import { makeStyleResponsive, getStyleShadowState, composeRadius, makeGlobalSize, composeTypographyStyle, getColor, getStyleShadow, getStyleBackgroundImage, getGlobalColorStateStyle, getGradientBgrStyleForButton, composeBorderCss, composeCornerCss } from '@gem-sdk/core';
2
2
 
3
3
  const getButtonWrapperStyles = (style1, styles1)=>({
4
4
  ...style1,
@@ -92,7 +92,8 @@ const getTypoStyles = (styles1)=>{
92
92
  const getBackgroundStyles = (styles1)=>{
93
93
  return {
94
94
  ...getStyleBackgroundImage(styles1?.backgroundImage),
95
- ...getGlobalColorStateStyle('bg', styles1?.backgroundColorV2)
95
+ ...getGlobalColorStateStyle('bg', styles1?.backgroundColorV2),
96
+ ...getGradientBgrStyleForButton(styles1?.backgroundColorV2)
96
97
  };
97
98
  };
98
99
  const getCustomCssStyles = ({ styles: styles1, uid: uid1, builderAttrs: builderAttrs1 })=>{
@@ -3,7 +3,7 @@ import { composeClasses, cls } from '@gem-sdk/core';
3
3
  const getCodeClasses = (uid, condition, cssClass)=>{
4
4
  return composeClasses(cls(uid, {
5
5
  'gp-sr-only': condition
6
- }, 'gp-cursor-pointer', cssClass));
6
+ }, 'gp-cursor-pointer', 'gp-custom-code', cssClass));
7
7
  };
8
8
 
9
9
  export { getCodeClasses };
@@ -15,6 +15,9 @@ const SettingUIV2 = [
15
15
  controls: [
16
16
  {
17
17
  layout: 'vertical',
18
+ label: {
19
+ en: 'Content'
20
+ },
18
21
  setting: {
19
22
  id: 'placeholder'
20
23
  }
@@ -95,7 +95,7 @@ const FeatureImageWithGallery = ({ builderPropUID, children, enableLazyLoadImage
95
95
  {% assign other_image_index = media_length | minus: 1 %}
96
96
  {% endif %}
97
97
  {% assign otherImage = product.media[other_image_index] %}
98
- ${LiquidIf(`otherImage.media_type != 'image'`, `{% assign src = otherImage.preview_image.src %}`)}
98
+ ${LiquidIf(`otherImage.media_type != 'image'`, `{% assign src = otherImage.preview_image.src %}`, `{% assign src = otherImage.src %}`)}
99
99
  `)}
100
100
  ${NextImage({
101
101
  srcIsLiquidCode: true,
@@ -147,10 +147,26 @@ const horizontalThree = [
147
147
  }
148
148
  },
149
149
  type: 'paragraph-1'
150
+ },
151
+ textSizeV2: {
152
+ desktop: {
153
+ width: 'Auto',
154
+ height: 'auto',
155
+ shapeLinked: false,
156
+ disableShapeLinked: true,
157
+ hiddenShape: true,
158
+ shape: 'custom',
159
+ padding: {
160
+ top: '12px',
161
+ bottom: '12px',
162
+ left: '12px',
163
+ right: '12px'
164
+ }
165
+ }
150
166
  }
151
167
  },
152
168
  tag: 'ProductBadge',
153
- uid: 'gHRinlrdow',
169
+ uid: 'gXAaVIfN3P',
154
170
  childrens: []
155
171
  },
156
172
  {
@@ -146,10 +146,26 @@ const horizontalTwo = [
146
146
  }
147
147
  },
148
148
  type: 'paragraph-1'
149
+ },
150
+ textSizeV2: {
151
+ desktop: {
152
+ width: 'Auto',
153
+ height: 'auto',
154
+ shapeLinked: false,
155
+ disableShapeLinked: true,
156
+ hiddenShape: true,
157
+ shape: 'custom',
158
+ padding: {
159
+ top: '12px',
160
+ bottom: '12px',
161
+ left: '12px',
162
+ right: '12px'
163
+ }
164
+ }
149
165
  }
150
166
  },
151
167
  tag: 'ProductBadge',
152
- uid: 'gHRinlrdow',
168
+ uid: 'gXAaVIfN3P',
153
169
  childrens: []
154
170
  },
155
171
  {
@@ -287,10 +287,26 @@ const verticalThree = [
287
287
  }
288
288
  },
289
289
  type: 'paragraph-1'
290
+ },
291
+ textSizeV2: {
292
+ desktop: {
293
+ width: 'Auto',
294
+ height: 'auto',
295
+ shapeLinked: false,
296
+ disableShapeLinked: true,
297
+ hiddenShape: true,
298
+ shape: 'custom',
299
+ padding: {
300
+ top: '12px',
301
+ bottom: '12px',
302
+ left: '12px',
303
+ right: '12px'
304
+ }
305
+ }
290
306
  }
291
307
  },
292
308
  tag: 'ProductBadge',
293
- uid: 'gHRinlrdow',
309
+ uid: 'gXAaVIfN3P',
294
310
  childrens: []
295
311
  },
296
312
  {
@@ -287,10 +287,26 @@ const verticalTwo = [
287
287
  }
288
288
  },
289
289
  type: 'paragraph-1'
290
+ },
291
+ textSizeV2: {
292
+ desktop: {
293
+ width: 'Auto',
294
+ height: 'auto',
295
+ shapeLinked: false,
296
+ disableShapeLinked: true,
297
+ hiddenShape: true,
298
+ shape: 'custom',
299
+ padding: {
300
+ top: '12px',
301
+ bottom: '12px',
302
+ left: '12px',
303
+ right: '12px'
304
+ }
305
+ }
290
306
  }
291
307
  },
292
308
  tag: 'ProductBadge',
293
- uid: 'gHRinlrdow',
309
+ uid: 'gXAaVIfN3P',
294
310
  childrens: []
295
311
  },
296
312
  {
@@ -6,7 +6,7 @@ const ProductViewMoreSettings = [
6
6
  id: 'label',
7
7
  label: 'Text',
8
8
  type: 'input',
9
- default: 'View more'
9
+ default: '<p>View more</p>'
10
10
  },
11
11
  {
12
12
  id: 'translate',
@@ -254,6 +254,26 @@ const SettingUIV2 = [
254
254
  options: {
255
255
  labelVariant: 'primary',
256
256
  toggleStyle: 'switch'
257
+ },
258
+ controlChangeTrigger: {
259
+ settings: [
260
+ {
261
+ condition: `enableTextStyle === true && label === ""`,
262
+ source: [
263
+ 'enableTextStyle',
264
+ 'label'
265
+ ],
266
+ action: {
267
+ controlId: 'label',
268
+ groupType: 'setting',
269
+ controlType: 'setting',
270
+ newValue: '<p>View more</p>'
271
+ }
272
+ }
273
+ ],
274
+ options: {
275
+ noRecordHistory: true
276
+ }
257
277
  }
258
278
  },
259
279
  {
@@ -168,6 +168,7 @@ const TextSettings = [
168
168
  type: 'paragraph-1',
169
169
  attrs: {
170
170
  color: 'text-1',
171
+ transform: 'none',
171
172
  isAlwaysLoadBold: false
172
173
  }
173
174
  },
@@ -6625,7 +6625,7 @@ declare const ProductViewMore: ({ style, styles, setting, advanced, builderProps
6625
6625
  options?: {
6626
6626
  isCannotEditing?: boolean | undefined;
6627
6627
  } | undefined;
6628
- }, "iconSvg" | "iconVisible" | "shouldClearSpace" | "iconAlign">, {
6628
+ }, "iconSvg" | "iconAlign" | "iconVisible" | "shouldClearSpace">, {
6629
6629
  size?: Partial<Record<_gem_sdk_core.NameDevices, string>> | undefined;
6630
6630
  type?: "primary" | "secondary" | undefined;
6631
6631
  align?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.AlignProp>> | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.715",
3
+ "version": "2.0.0-dev.717",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "2.0.0-dev.713",
28
+ "@gem-sdk/core": "2.0.0-dev.716",
29
29
  "@gem-sdk/styles": "2.0.0-dev.703",
30
30
  "@gem-sdk/system": "2.0.0-dev.695",
31
31
  "@types/react-transition-group": "^4.4.5",