@gem-sdk/components 2.0.0-dev.712 → 2.0.0-dev.713

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.
@@ -2,120 +2,140 @@
2
2
 
3
3
  var core = require('@gem-sdk/core');
4
4
 
5
- const getButtonWrapperStyles = (style, styles)=>({
6
- ...style,
7
- ...core.makeStyleResponsive('ta', styles?.align)
5
+ const getButtonWrapperStyles = (style1, styles1)=>({
6
+ ...style1,
7
+ ...core.makeStyleResponsive('ta', styles1?.align)
8
8
  });
9
- const getButtonStyles = (styles)=>({
10
- ...getSizeStyles(styles),
11
- ...getRadiusStyles(styles),
12
- ...getShadowStyles(styles),
13
- ...getBackgroundStyles(styles),
14
- ...getTypographyStyles(styles).textColorStyle
15
- });
16
- const getButtonIconStyles = (styles, settings)=>{
9
+ const getButtonStyles = (styles1)=>{
10
+ return {
11
+ ...getSizeStyles(styles1),
12
+ ...getRadiusStyles(styles1),
13
+ ...getShadowStyles(styles1),
14
+ ...getBackgroundStyles(styles1),
15
+ ...getTypographyStyles(styles1).textColorStyle
16
+ };
17
+ };
18
+ const getButtonIconStyles = (styles1, settings1)=>{
17
19
  return {
18
- ...getIconSpacingStyle(styles, settings),
19
- '--height-desktop': `${styles?.size?.desktop}`,
20
- '--height-tablet': `${styles?.size?.desktop || styles?.size?.tablet}`,
21
- '--height-mobile': `${styles?.size?.mobile || styles?.size?.tablet || styles?.size?.desktop}`
20
+ ...getIconSpacingStyle(styles1, settings1),
21
+ '--height-desktop': `${styles1?.size?.desktop}`,
22
+ '--height-tablet': `${styles1?.size?.desktop || styles1?.size?.tablet}`,
23
+ '--height-mobile': `${styles1?.size?.mobile || styles1?.size?.tablet || styles1?.size?.desktop}`
22
24
  };
23
25
  };
24
- const isEnableShadowStateForDevice = (deviceStyles)=>({
25
- normal: deviceStyles?.normal?.type !== 'none',
26
- hover: deviceStyles?.hover?.type !== 'none'
26
+ const isEnableShadowStateForDevice = (deviceStyles1)=>({
27
+ normal: deviceStyles1?.normal?.type !== 'none',
28
+ hover: deviceStyles1?.hover?.type !== 'none'
27
29
  });
28
- const getShadowStyles = (styles)=>{
29
- const { boxShadowBtnV2 } = styles || {};
30
+ const ignoreStateNoneValue = (obj, condition)=>{
31
+ return Object.entries(obj).reduce((acc, [key, value])=>{
32
+ if (![
33
+ 'hover',
34
+ 'focus',
35
+ 'normal'
36
+ ].includes(key) || eval(condition)) {
37
+ acc[key] = value;
38
+ }
39
+ return acc;
40
+ }, {});
41
+ };
42
+ const getShadowStyles = (styles1)=>{
43
+ const { boxShadowBtnV2: boxShadowBtnV21 } = styles1 || {};
44
+ const ignoreNoneValueObjectShadow1 = ignoreStateNoneValue(boxShadowBtnV21 || {}, 'value?.enable !== false');
30
45
  return {
31
- ...core.getStyleShadowState(boxShadowBtnV2, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2))
46
+ ...core.getStyleShadowState(ignoreNoneValueObjectShadow1, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV21))
32
47
  };
33
48
  };
34
- const getRadiusStyles = (styles)=>core.composeRadius(styles?.roundedBtnV2);
35
- const getIconSpacingStyle = (styles, settings)=>{
36
- const spacing = styles?.iconSpacing || {
49
+ const getRadiusStyles = (styles1)=>{
50
+ const ignoreNoneValueObject1 = ignoreStateNoneValue(styles1?.roundedBtnV2 || {}, 'value?.radiusType !== "none"');
51
+ return core.composeRadius(ignoreNoneValueObject1);
52
+ };
53
+ const getIconSpacingStyle = (styles1, settings1)=>{
54
+ const spacing1 = styles1?.iconSpacing || {
37
55
  desktop: '8px'
38
56
  };
39
- return settings?.iconAlign === 'left' ? core.makeStyleResponsive('mr', spacing) : core.makeStyleResponsive('ml', spacing);
57
+ return settings1?.iconAlign === 'left' ? core.makeStyleResponsive('mr', spacing1) : core.makeStyleResponsive('ml', spacing1);
40
58
  };
41
- const getSizeStyles = (styles)=>{
42
- const composeGlobalSize = core.makeGlobalSize(styles?.globalSize);
59
+ const getSizeStyles = (styles1)=>{
60
+ const composeGlobalSize1 = core.makeGlobalSize(styles1?.globalSize);
43
61
  return {
44
- ...composeGlobalSize.width,
45
- ...composeGlobalSize.height,
46
- ...composeGlobalSize.padding
62
+ ...composeGlobalSize1.width,
63
+ ...composeGlobalSize1.height,
64
+ ...composeGlobalSize1.padding
47
65
  };
48
66
  };
49
- const getTypographyStyles = (styles)=>{
50
- const typographyStyle = core.composeTypographyStyle(styles?.typo, styles?.typography);
51
- const colorObj = {
52
- '--c': typographyStyle?.['--c']
67
+ const getTypographyStyles = (styles1)=>{
68
+ const typographyStyle1 = core.composeTypographyStyle(styles1?.typo, styles1?.typography);
69
+ const colorObj1 = {
70
+ '--c': typographyStyle1?.['--c']
53
71
  };
54
- const otherProps = {
55
- ...typographyStyle
72
+ const otherProps1 = {
73
+ ...typographyStyle1
56
74
  };
57
- delete otherProps['--c'];
75
+ delete otherProps1['--c'];
58
76
  return {
59
77
  textColorStyle: {
60
- ...core.makeStyleState('c', styles?.textColorHover),
61
- ...colorObj
78
+ '--hvr-c': core.getColor(styles1?.textColorHover?.hover),
79
+ ...colorObj1
62
80
  },
63
- withoutTextColorStyles: otherProps
81
+ withoutTextColorStyles: otherProps1
64
82
  };
65
83
  };
66
- const getTypoStyles = (styles)=>{
84
+ const getTypoStyles = (styles1)=>{
67
85
  return {
68
- ...getTypographyStyles(styles).withoutTextColorStyles,
86
+ ...getTypographyStyles(styles1).withoutTextColorStyles,
69
87
  ...core.getStyleShadow({
70
88
  styleAppliedFor: 'text-shadow',
71
- value: styles?.typo?.custom?.textShadow,
72
- isEnableShadow: styles?.typo?.custom?.hasShadowText
89
+ value: styles1?.typo?.custom?.textShadow,
90
+ isEnableShadow: styles1?.typo?.custom?.hasShadowText
73
91
  })
74
92
  };
75
93
  };
76
- const getBackgroundStyles = (styles)=>{
94
+ const getBackgroundStyles = (styles1)=>{
77
95
  return {
78
- ...core.getStyleBackgroundImage(styles?.backgroundImage),
79
- ...core.getGlobalColorStateStyle('bg', styles?.backgroundColorV2)
96
+ ...core.getStyleBackgroundImage(styles1?.backgroundImage),
97
+ ...core.getGlobalColorStateStyle('bg', styles1?.backgroundColorV2)
80
98
  };
81
99
  };
82
- const getCustomCssStyles = ({ styles, uid, builderAttrs })=>{
83
- if (!uid) return '';
84
- const { borderBtnV2, roundedBtnV2 } = styles ?? {};
85
- const borderCornerStyles = generateBorderCornerStyles({
86
- uid,
87
- borderBtn: borderBtnV2,
88
- roundedBtn: roundedBtnV2,
89
- builderAttrs
100
+ const getCustomCssStyles = ({ styles: styles1, uid: uid1, builderAttrs: builderAttrs1 })=>{
101
+ if (!uid1) return '';
102
+ const { borderBtnV2: borderBtnV21, roundedBtnV2: roundedBtnV21 } = styles1 ?? {};
103
+ const borderBtnIgnoreNoneValue1 = ignoreStateNoneValue(borderBtnV21 || {}, 'value?.borderType !== "none"');
104
+ const roundedBtnIgnoreNoneValue1 = ignoreStateNoneValue(roundedBtnV21 || {}, 'value?.radiusType !== "none"');
105
+ const borderCornerStyles1 = generateBorderCornerStyles({
106
+ uid: uid1,
107
+ borderBtn: borderBtnIgnoreNoneValue1,
108
+ roundedBtn: roundedBtnIgnoreNoneValue1,
109
+ builderAttrs: builderAttrs1
90
110
  });
91
111
  return `
92
- ${borderCornerStyles.normalStyles}
93
- ${borderCornerStyles.hoverStyles}
112
+ ${borderCornerStyles1.normalStyles}
113
+ ${borderCornerStyles1.hoverStyles}
94
114
  `.trim();
95
115
  };
96
- const generateBorderCornerStyles = ({ uid, borderBtn, roundedBtn, builderAttrs })=>{
97
- const tag = builderAttrs?.['data-component-tag'];
98
- const getResponsiveStyles = ({ styleObj, state })=>{
99
- if (!styleObj) return undefined;
100
- return styleObj?.[state];
116
+ const generateBorderCornerStyles = ({ uid: uid1, borderBtn: borderBtn1, roundedBtn: roundedBtn1, builderAttrs: builderAttrs1 })=>{
117
+ const tag1 = builderAttrs1?.['data-component-tag'];
118
+ const getResponsiveStyles1 = ({ styleObj: styleObj1, state: state1 })=>{
119
+ if (!styleObj1) return undefined;
120
+ return styleObj1?.[state1];
101
121
  };
102
- const normalBorder = getResponsiveStyles({
103
- styleObj: borderBtn,
122
+ const normalBorder1 = getResponsiveStyles1({
123
+ styleObj: borderBtn1,
104
124
  state: 'normal'
105
125
  });
106
- const hoverBorder = getResponsiveStyles({
107
- styleObj: borderBtn,
126
+ const hoverBorder1 = getResponsiveStyles1({
127
+ styleObj: borderBtn1,
108
128
  state: 'hover'
109
129
  });
110
- const normalCorner = getResponsiveStyles({
111
- styleObj: roundedBtn,
130
+ const normalCorner1 = getResponsiveStyles1({
131
+ styleObj: roundedBtn1,
112
132
  state: 'normal'
113
133
  });
114
- const hoverCorner = getResponsiveStyles({
115
- styleObj: roundedBtn,
134
+ const hoverCorner1 = getResponsiveStyles1({
135
+ styleObj: roundedBtn1,
116
136
  state: 'hover'
117
137
  });
118
- const baseStyle = `
138
+ const baseStyle1 = `
119
139
  content: "";
120
140
  height: 100%;
121
141
  width: 100%;
@@ -123,30 +143,30 @@ const generateBorderCornerStyles = ({ uid, borderBtn, roundedBtn, builderAttrs }
123
143
  pointer-events: none;
124
144
  top: 0;
125
145
  left: 0;
126
- ${core.composeBorderCss(normalBorder)}
127
- ${core.composeCornerCss(normalCorner)}
146
+ ${core.composeBorderCss(normalBorder1)}
147
+ ${core.composeCornerCss(normalCorner1)}
128
148
  `;
129
- let normalStyles = `
130
- .${uid}.gp-button-base::before {
131
- ${baseStyle}
149
+ let normalStyles1 = `
150
+ .${uid1}.gp-button-base::before {
151
+ ${baseStyle1}
132
152
  }
133
153
  `;
134
- if (tag === 'ProductButton') {
135
- const isInStock = builderAttrs?.['data-is-in-stock'] ?? false;
136
- normalStyles = `
137
- [data-is-in-stock="${isInStock}"]>.${uid}.gp-button-base::before {
138
- ${baseStyle}
154
+ if (tag1 === 'ProductButton') {
155
+ const isInStock1 = builderAttrs1?.['data-is-in-stock'] ?? false;
156
+ normalStyles1 = `
157
+ [data-is-in-stock="${isInStock1}"]>.${uid1}.gp-button-base::before {
158
+ ${baseStyle1}
139
159
  `;
140
160
  }
141
- const hoverStyles = `
142
- .${uid}:hover::before {
143
- ${core.composeBorderCss(hoverBorder)}
144
- ${core.composeCornerCss(hoverCorner)}
161
+ const hoverStyles1 = `
162
+ .${uid1}:hover::before {
163
+ ${core.composeBorderCss(hoverBorder1)}
164
+ ${core.composeCornerCss(hoverCorner1)}
145
165
  }
146
166
  `;
147
167
  return {
148
- normalStyles,
149
- hoverStyles
168
+ normalStyles: normalStyles1,
169
+ hoverStyles: hoverStyles1
150
170
  };
151
171
  };
152
172
 
@@ -8,7 +8,7 @@ const ButtonSettings = [
8
8
  id: 'label',
9
9
  label: 'Text',
10
10
  type: 'input',
11
- default: 'Button'
11
+ default: '<p>Button</p>'
12
12
  },
13
13
  {
14
14
  id: 'translate',
@@ -271,7 +271,7 @@ const SettingUIV2 = [
271
271
  controlId: 'label',
272
272
  groupType: 'setting',
273
273
  controlType: 'setting',
274
- newValue: 'Button'
274
+ newValue: '<p>Button</p>'
275
275
  }
276
276
  }
277
277
  ],
@@ -47,7 +47,7 @@ const SubmitButtonSettings = [
47
47
  id: 'label',
48
48
  label: 'Text',
49
49
  type: 'input',
50
- default: 'Submit'
50
+ default: '<p>Submit</p>'
51
51
  },
52
52
  {
53
53
  id: 'translate',
@@ -367,7 +367,6 @@ const SubmitButtonSettings = [
367
367
  type: 'paragraph-1'
368
368
  },
369
369
  hiddenSetting: {
370
- transform: true,
371
370
  textAlign: true
372
371
  },
373
372
  ignoreReRender: true
@@ -1,119 +1,139 @@
1
- import { makeStyleResponsive, getStyleShadowState, composeRadius, makeGlobalSize, composeTypographyStyle, makeStyleState, getStyleShadow, getStyleBackgroundImage, getGlobalColorStateStyle, composeBorderCss, composeCornerCss } from '@gem-sdk/core';
1
+ import { makeStyleResponsive, getStyleShadowState, composeRadius, makeGlobalSize, composeTypographyStyle, getColor, getStyleShadow, getStyleBackgroundImage, getGlobalColorStateStyle, composeBorderCss, composeCornerCss } from '@gem-sdk/core';
2
2
 
3
- const getButtonWrapperStyles = (style, styles)=>({
4
- ...style,
5
- ...makeStyleResponsive('ta', styles?.align)
3
+ const getButtonWrapperStyles = (style1, styles1)=>({
4
+ ...style1,
5
+ ...makeStyleResponsive('ta', styles1?.align)
6
6
  });
7
- const getButtonStyles = (styles)=>({
8
- ...getSizeStyles(styles),
9
- ...getRadiusStyles(styles),
10
- ...getShadowStyles(styles),
11
- ...getBackgroundStyles(styles),
12
- ...getTypographyStyles(styles).textColorStyle
13
- });
14
- const getButtonIconStyles = (styles, settings)=>{
7
+ const getButtonStyles = (styles1)=>{
8
+ return {
9
+ ...getSizeStyles(styles1),
10
+ ...getRadiusStyles(styles1),
11
+ ...getShadowStyles(styles1),
12
+ ...getBackgroundStyles(styles1),
13
+ ...getTypographyStyles(styles1).textColorStyle
14
+ };
15
+ };
16
+ const getButtonIconStyles = (styles1, settings1)=>{
15
17
  return {
16
- ...getIconSpacingStyle(styles, settings),
17
- '--height-desktop': `${styles?.size?.desktop}`,
18
- '--height-tablet': `${styles?.size?.desktop || styles?.size?.tablet}`,
19
- '--height-mobile': `${styles?.size?.mobile || styles?.size?.tablet || styles?.size?.desktop}`
18
+ ...getIconSpacingStyle(styles1, settings1),
19
+ '--height-desktop': `${styles1?.size?.desktop}`,
20
+ '--height-tablet': `${styles1?.size?.desktop || styles1?.size?.tablet}`,
21
+ '--height-mobile': `${styles1?.size?.mobile || styles1?.size?.tablet || styles1?.size?.desktop}`
20
22
  };
21
23
  };
22
- const isEnableShadowStateForDevice = (deviceStyles)=>({
23
- normal: deviceStyles?.normal?.type !== 'none',
24
- hover: deviceStyles?.hover?.type !== 'none'
24
+ const isEnableShadowStateForDevice = (deviceStyles1)=>({
25
+ normal: deviceStyles1?.normal?.type !== 'none',
26
+ hover: deviceStyles1?.hover?.type !== 'none'
25
27
  });
26
- const getShadowStyles = (styles)=>{
27
- const { boxShadowBtnV2 } = styles || {};
28
+ const ignoreStateNoneValue = (obj, condition)=>{
29
+ return Object.entries(obj).reduce((acc, [key, value])=>{
30
+ if (![
31
+ 'hover',
32
+ 'focus',
33
+ 'normal'
34
+ ].includes(key) || eval(condition)) {
35
+ acc[key] = value;
36
+ }
37
+ return acc;
38
+ }, {});
39
+ };
40
+ const getShadowStyles = (styles1)=>{
41
+ const { boxShadowBtnV2: boxShadowBtnV21 } = styles1 || {};
42
+ const ignoreNoneValueObjectShadow1 = ignoreStateNoneValue(boxShadowBtnV21 || {}, 'value?.enable !== false');
28
43
  return {
29
- ...getStyleShadowState(boxShadowBtnV2, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2))
44
+ ...getStyleShadowState(ignoreNoneValueObjectShadow1, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV21))
30
45
  };
31
46
  };
32
- const getRadiusStyles = (styles)=>composeRadius(styles?.roundedBtnV2);
33
- const getIconSpacingStyle = (styles, settings)=>{
34
- const spacing = styles?.iconSpacing || {
47
+ const getRadiusStyles = (styles1)=>{
48
+ const ignoreNoneValueObject1 = ignoreStateNoneValue(styles1?.roundedBtnV2 || {}, 'value?.radiusType !== "none"');
49
+ return composeRadius(ignoreNoneValueObject1);
50
+ };
51
+ const getIconSpacingStyle = (styles1, settings1)=>{
52
+ const spacing1 = styles1?.iconSpacing || {
35
53
  desktop: '8px'
36
54
  };
37
- return settings?.iconAlign === 'left' ? makeStyleResponsive('mr', spacing) : makeStyleResponsive('ml', spacing);
55
+ return settings1?.iconAlign === 'left' ? makeStyleResponsive('mr', spacing1) : makeStyleResponsive('ml', spacing1);
38
56
  };
39
- const getSizeStyles = (styles)=>{
40
- const composeGlobalSize = makeGlobalSize(styles?.globalSize);
57
+ const getSizeStyles = (styles1)=>{
58
+ const composeGlobalSize1 = makeGlobalSize(styles1?.globalSize);
41
59
  return {
42
- ...composeGlobalSize.width,
43
- ...composeGlobalSize.height,
44
- ...composeGlobalSize.padding
60
+ ...composeGlobalSize1.width,
61
+ ...composeGlobalSize1.height,
62
+ ...composeGlobalSize1.padding
45
63
  };
46
64
  };
47
- const getTypographyStyles = (styles)=>{
48
- const typographyStyle = composeTypographyStyle(styles?.typo, styles?.typography);
49
- const colorObj = {
50
- '--c': typographyStyle?.['--c']
65
+ const getTypographyStyles = (styles1)=>{
66
+ const typographyStyle1 = composeTypographyStyle(styles1?.typo, styles1?.typography);
67
+ const colorObj1 = {
68
+ '--c': typographyStyle1?.['--c']
51
69
  };
52
- const otherProps = {
53
- ...typographyStyle
70
+ const otherProps1 = {
71
+ ...typographyStyle1
54
72
  };
55
- delete otherProps['--c'];
73
+ delete otherProps1['--c'];
56
74
  return {
57
75
  textColorStyle: {
58
- ...makeStyleState('c', styles?.textColorHover),
59
- ...colorObj
76
+ '--hvr-c': getColor(styles1?.textColorHover?.hover),
77
+ ...colorObj1
60
78
  },
61
- withoutTextColorStyles: otherProps
79
+ withoutTextColorStyles: otherProps1
62
80
  };
63
81
  };
64
- const getTypoStyles = (styles)=>{
82
+ const getTypoStyles = (styles1)=>{
65
83
  return {
66
- ...getTypographyStyles(styles).withoutTextColorStyles,
84
+ ...getTypographyStyles(styles1).withoutTextColorStyles,
67
85
  ...getStyleShadow({
68
86
  styleAppliedFor: 'text-shadow',
69
- value: styles?.typo?.custom?.textShadow,
70
- isEnableShadow: styles?.typo?.custom?.hasShadowText
87
+ value: styles1?.typo?.custom?.textShadow,
88
+ isEnableShadow: styles1?.typo?.custom?.hasShadowText
71
89
  })
72
90
  };
73
91
  };
74
- const getBackgroundStyles = (styles)=>{
92
+ const getBackgroundStyles = (styles1)=>{
75
93
  return {
76
- ...getStyleBackgroundImage(styles?.backgroundImage),
77
- ...getGlobalColorStateStyle('bg', styles?.backgroundColorV2)
94
+ ...getStyleBackgroundImage(styles1?.backgroundImage),
95
+ ...getGlobalColorStateStyle('bg', styles1?.backgroundColorV2)
78
96
  };
79
97
  };
80
- const getCustomCssStyles = ({ styles, uid, builderAttrs })=>{
81
- if (!uid) return '';
82
- const { borderBtnV2, roundedBtnV2 } = styles ?? {};
83
- const borderCornerStyles = generateBorderCornerStyles({
84
- uid,
85
- borderBtn: borderBtnV2,
86
- roundedBtn: roundedBtnV2,
87
- builderAttrs
98
+ const getCustomCssStyles = ({ styles: styles1, uid: uid1, builderAttrs: builderAttrs1 })=>{
99
+ if (!uid1) return '';
100
+ const { borderBtnV2: borderBtnV21, roundedBtnV2: roundedBtnV21 } = styles1 ?? {};
101
+ const borderBtnIgnoreNoneValue1 = ignoreStateNoneValue(borderBtnV21 || {}, 'value?.borderType !== "none"');
102
+ const roundedBtnIgnoreNoneValue1 = ignoreStateNoneValue(roundedBtnV21 || {}, 'value?.radiusType !== "none"');
103
+ const borderCornerStyles1 = generateBorderCornerStyles({
104
+ uid: uid1,
105
+ borderBtn: borderBtnIgnoreNoneValue1,
106
+ roundedBtn: roundedBtnIgnoreNoneValue1,
107
+ builderAttrs: builderAttrs1
88
108
  });
89
109
  return `
90
- ${borderCornerStyles.normalStyles}
91
- ${borderCornerStyles.hoverStyles}
110
+ ${borderCornerStyles1.normalStyles}
111
+ ${borderCornerStyles1.hoverStyles}
92
112
  `.trim();
93
113
  };
94
- const generateBorderCornerStyles = ({ uid, borderBtn, roundedBtn, builderAttrs })=>{
95
- const tag = builderAttrs?.['data-component-tag'];
96
- const getResponsiveStyles = ({ styleObj, state })=>{
97
- if (!styleObj) return undefined;
98
- return styleObj?.[state];
114
+ const generateBorderCornerStyles = ({ uid: uid1, borderBtn: borderBtn1, roundedBtn: roundedBtn1, builderAttrs: builderAttrs1 })=>{
115
+ const tag1 = builderAttrs1?.['data-component-tag'];
116
+ const getResponsiveStyles1 = ({ styleObj: styleObj1, state: state1 })=>{
117
+ if (!styleObj1) return undefined;
118
+ return styleObj1?.[state1];
99
119
  };
100
- const normalBorder = getResponsiveStyles({
101
- styleObj: borderBtn,
120
+ const normalBorder1 = getResponsiveStyles1({
121
+ styleObj: borderBtn1,
102
122
  state: 'normal'
103
123
  });
104
- const hoverBorder = getResponsiveStyles({
105
- styleObj: borderBtn,
124
+ const hoverBorder1 = getResponsiveStyles1({
125
+ styleObj: borderBtn1,
106
126
  state: 'hover'
107
127
  });
108
- const normalCorner = getResponsiveStyles({
109
- styleObj: roundedBtn,
128
+ const normalCorner1 = getResponsiveStyles1({
129
+ styleObj: roundedBtn1,
110
130
  state: 'normal'
111
131
  });
112
- const hoverCorner = getResponsiveStyles({
113
- styleObj: roundedBtn,
132
+ const hoverCorner1 = getResponsiveStyles1({
133
+ styleObj: roundedBtn1,
114
134
  state: 'hover'
115
135
  });
116
- const baseStyle = `
136
+ const baseStyle1 = `
117
137
  content: "";
118
138
  height: 100%;
119
139
  width: 100%;
@@ -121,30 +141,30 @@ const generateBorderCornerStyles = ({ uid, borderBtn, roundedBtn, builderAttrs }
121
141
  pointer-events: none;
122
142
  top: 0;
123
143
  left: 0;
124
- ${composeBorderCss(normalBorder)}
125
- ${composeCornerCss(normalCorner)}
144
+ ${composeBorderCss(normalBorder1)}
145
+ ${composeCornerCss(normalCorner1)}
126
146
  `;
127
- let normalStyles = `
128
- .${uid}.gp-button-base::before {
129
- ${baseStyle}
147
+ let normalStyles1 = `
148
+ .${uid1}.gp-button-base::before {
149
+ ${baseStyle1}
130
150
  }
131
151
  `;
132
- if (tag === 'ProductButton') {
133
- const isInStock = builderAttrs?.['data-is-in-stock'] ?? false;
134
- normalStyles = `
135
- [data-is-in-stock="${isInStock}"]>.${uid}.gp-button-base::before {
136
- ${baseStyle}
152
+ if (tag1 === 'ProductButton') {
153
+ const isInStock1 = builderAttrs1?.['data-is-in-stock'] ?? false;
154
+ normalStyles1 = `
155
+ [data-is-in-stock="${isInStock1}"]>.${uid1}.gp-button-base::before {
156
+ ${baseStyle1}
137
157
  `;
138
158
  }
139
- const hoverStyles = `
140
- .${uid}:hover::before {
141
- ${composeBorderCss(hoverBorder)}
142
- ${composeCornerCss(hoverCorner)}
159
+ const hoverStyles1 = `
160
+ .${uid1}:hover::before {
161
+ ${composeBorderCss(hoverBorder1)}
162
+ ${composeCornerCss(hoverCorner1)}
143
163
  }
144
164
  `;
145
165
  return {
146
- normalStyles,
147
- hoverStyles
166
+ normalStyles: normalStyles1,
167
+ hoverStyles: hoverStyles1
148
168
  };
149
169
  };
150
170
 
@@ -6,7 +6,7 @@ const ButtonSettings = [
6
6
  id: 'label',
7
7
  label: 'Text',
8
8
  type: 'input',
9
- default: 'Button'
9
+ default: '<p>Button</p>'
10
10
  },
11
11
  {
12
12
  id: 'translate',
@@ -269,7 +269,7 @@ const SettingUIV2 = [
269
269
  controlId: 'label',
270
270
  groupType: 'setting',
271
271
  controlType: 'setting',
272
- newValue: 'Button'
272
+ newValue: '<p>Button</p>'
273
273
  }
274
274
  }
275
275
  ],
@@ -43,7 +43,7 @@ const SubmitButtonSettings = [
43
43
  id: 'label',
44
44
  label: 'Text',
45
45
  type: 'input',
46
- default: 'Submit'
46
+ default: '<p>Submit</p>'
47
47
  },
48
48
  {
49
49
  id: 'translate',
@@ -363,7 +363,6 @@ const SubmitButtonSettings = [
363
363
  type: 'paragraph-1'
364
364
  },
365
365
  hiddenSetting: {
366
- transform: true,
367
366
  textAlign: true
368
367
  },
369
368
  ignoreReRender: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.712",
3
+ "version": "2.0.0-dev.713",
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.710",
28
+ "@gem-sdk/core": "2.0.0-dev.713",
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",