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

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.
@@ -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 })=>{
@@ -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
  }
@@ -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
  {
@@ -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 })=>{
@@ -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
  }
@@ -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
  {
@@ -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.716",
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",