@gem-sdk/components 2.0.0-dev.304 → 2.0.0-dev.305
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.
- package/dist/cjs/post-purchase/button/common/getClasses.js +1 -1
- package/dist/cjs/post-purchase/button/common/getStyles.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/components/CalloutText.js +2 -1
- package/dist/cjs/post-purchase/callout-banner/components/common/getStyles.js +0 -8
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +1 -0
- package/dist/cjs/post-purchase/countdown-timer/components/common/getStyles.js +1 -1
- package/dist/cjs/post-purchase/countdown-timer/settings/config/setting.js +1 -7
- package/dist/cjs/post-purchase/product/settings/accept-button/configs/settings.js +2 -1
- package/dist/esm/post-purchase/button/common/getClasses.js +1 -1
- package/dist/esm/post-purchase/button/common/getStyles.js +2 -2
- package/dist/esm/post-purchase/callout-banner/components/CalloutText.js +2 -1
- package/dist/esm/post-purchase/callout-banner/components/common/getStyles.js +1 -8
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +1 -0
- package/dist/esm/post-purchase/countdown-timer/components/common/getStyles.js +2 -2
- package/dist/esm/post-purchase/countdown-timer/settings/config/setting.js +1 -7
- package/dist/esm/post-purchase/product/settings/accept-button/configs/settings.js +2 -1
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@ const getButtonClass = (setting)=>{
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
const getTextClass = (mode)=>{
|
|
19
|
-
const classList = '!gp-inline-flex gp-py-2';
|
|
19
|
+
const classList = '!gp-inline-flex gp-py-2 gp-leading-[1.3]';
|
|
20
20
|
return {
|
|
21
21
|
...core.composeClasses(classList),
|
|
22
22
|
'button-text': mode === 'edit'
|
|
@@ -29,7 +29,7 @@ const getButtonStyles = (disabled, setting)=>{
|
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
31
|
const getContainerStyle = (styles)=>helpers.filterTruthyStyles({
|
|
32
|
-
...core.
|
|
32
|
+
...core.makeStyleResponsiveWidth(styles?.width)
|
|
33
33
|
});
|
|
34
34
|
const getWrapperStyle = (styles)=>{
|
|
35
35
|
const wrapperStyles = {
|
|
@@ -8,6 +8,7 @@ var Text = require('../../text/components/Text.js');
|
|
|
8
8
|
var system = require('@gem-sdk/system');
|
|
9
9
|
var getClasses = require('./common/getClasses.js');
|
|
10
10
|
var getStyles = require('./common/getStyles.js');
|
|
11
|
+
var core = require('@gem-sdk/core');
|
|
11
12
|
|
|
12
13
|
const CalloutText = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
|
|
13
14
|
const { width, align } = styles;
|
|
@@ -19,7 +20,7 @@ const CalloutText = ({ setting = {}, styles = {}, style, builderAttrs, builderPr
|
|
|
19
20
|
})
|
|
20
21
|
});
|
|
21
22
|
const containerStyle = system.createStyle({
|
|
22
|
-
...
|
|
23
|
+
...core.makeStyleResponsiveWidth(width)
|
|
23
24
|
});
|
|
24
25
|
const textStyles = {
|
|
25
26
|
...getStyles.getTextStyles(styles)
|
|
@@ -31,13 +31,6 @@ var CalloutBorderColorEnum;
|
|
|
31
31
|
CalloutBorderColorEnum["critical"] = '#facccc';
|
|
32
32
|
CalloutBorderColorEnum["none"] = '#D9D9D9';
|
|
33
33
|
})(CalloutBorderColorEnum || (CalloutBorderColorEnum = {}));
|
|
34
|
-
const makeStyleResponsiveWidth = (value, unit)=>{
|
|
35
|
-
return {
|
|
36
|
-
[`--w`]: unit ? `${value?.desktop}${unit}` : value?.desktop === 'default' ? '1200px' : value?.desktop,
|
|
37
|
-
[`--w-tablet`]: unit ? `${value?.tablet}${unit}` : value?.tablet === 'default' ? '1200px' : value?.tablet,
|
|
38
|
-
[`--w-mobile`]: unit ? `${value?.mobile}${unit}` : value?.mobile === 'default' ? '1200px' : value?.mobile
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
34
|
const getCalloutBoxContainerStyles = (styles)=>{
|
|
42
35
|
return helpers.filterTruthyStyles({
|
|
43
36
|
backgroundColor: styles?.backgroundColor ? CalloutBgColorEnum[styles?.backgroundColor] : '#FAFAFA',
|
|
@@ -48,4 +41,3 @@ const getCalloutBoxContainerStyles = (styles)=>{
|
|
|
48
41
|
exports.getCalloutBoxContainerStyles = getCalloutBoxContainerStyles;
|
|
49
42
|
exports.getCalloutTextStyle = getCalloutTextStyle;
|
|
50
43
|
exports.getTextStyles = getTextStyles;
|
|
51
|
-
exports.makeStyleResponsiveWidth = makeStyleResponsiveWidth;
|
|
@@ -7,7 +7,7 @@ const pdBanner = '17px';
|
|
|
7
7
|
const brBanner = '3px';
|
|
8
8
|
const getTextCountdownWrapperStyles = (width, bgColor)=>{
|
|
9
9
|
const styles = {
|
|
10
|
-
...core.
|
|
10
|
+
...core.makeStyleResponsiveWidth(width),
|
|
11
11
|
backgroundColor: helper.makeBgColor(bgColor),
|
|
12
12
|
borderWidth: '1px',
|
|
13
13
|
borderStyle: 'solid',
|
|
@@ -14,6 +14,7 @@ const CountdownTimerSettings = [
|
|
|
14
14
|
label: 'Message',
|
|
15
15
|
type: 'input',
|
|
16
16
|
default: 'Offer expires in:',
|
|
17
|
+
placeholder: 'Add...',
|
|
17
18
|
clearButton: false
|
|
18
19
|
},
|
|
19
20
|
{
|
|
@@ -158,13 +159,6 @@ const CountdownTimerSettings = [
|
|
|
158
159
|
type: 'text',
|
|
159
160
|
tooltip: 'Align right',
|
|
160
161
|
iconName: 'polaris-text-align-right'
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
label: 'Justify',
|
|
164
|
-
value: 'justify',
|
|
165
|
-
type: 'text',
|
|
166
|
-
tooltip: 'Align justify',
|
|
167
|
-
iconName: 'gp-text-align-justify'
|
|
168
162
|
}
|
|
169
163
|
],
|
|
170
164
|
default: 'left'
|
|
@@ -14,7 +14,7 @@ const getButtonClass = (setting)=>{
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
const getTextClass = (mode)=>{
|
|
17
|
-
const classList = '!gp-inline-flex gp-py-2';
|
|
17
|
+
const classList = '!gp-inline-flex gp-py-2 gp-leading-[1.3]';
|
|
18
18
|
return {
|
|
19
19
|
...composeClasses(classList),
|
|
20
20
|
'button-text': mode === 'edit'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { filterTruthyStyles } from '../../../helpers.js';
|
|
2
|
-
import {
|
|
2
|
+
import { makeStyleResponsiveWidth, makeStyle } from '@gem-sdk/core';
|
|
3
3
|
import { buttonColor, postPurchaseFontWeight } from '../../utils/helper.js';
|
|
4
4
|
|
|
5
5
|
const getButtonStyles = (disabled, setting)=>{
|
|
@@ -27,7 +27,7 @@ const getButtonStyles = (disabled, setting)=>{
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
const getContainerStyle = (styles)=>filterTruthyStyles({
|
|
30
|
-
...
|
|
30
|
+
...makeStyleResponsiveWidth(styles?.width)
|
|
31
31
|
});
|
|
32
32
|
const getWrapperStyle = (styles)=>{
|
|
33
33
|
const wrapperStyles = {
|
|
@@ -3,7 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import Text from '../../text/components/Text.js';
|
|
4
4
|
import { createClass, createStyle, createAttr } from '@gem-sdk/system';
|
|
5
5
|
import { getCalloutTextWrapperClasses } from './common/getClasses.js';
|
|
6
|
-
import {
|
|
6
|
+
import { getCalloutTextStyle, getTextStyles } from './common/getStyles.js';
|
|
7
|
+
import { makeStyleResponsiveWidth } from '@gem-sdk/core';
|
|
7
8
|
|
|
8
9
|
const CalloutText = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
|
|
9
10
|
const { width, align } = styles;
|
|
@@ -29,13 +29,6 @@ var CalloutBorderColorEnum;
|
|
|
29
29
|
CalloutBorderColorEnum["critical"] = '#facccc';
|
|
30
30
|
CalloutBorderColorEnum["none"] = '#D9D9D9';
|
|
31
31
|
})(CalloutBorderColorEnum || (CalloutBorderColorEnum = {}));
|
|
32
|
-
const makeStyleResponsiveWidth = (value, unit)=>{
|
|
33
|
-
return {
|
|
34
|
-
[`--w`]: unit ? `${value?.desktop}${unit}` : value?.desktop === 'default' ? '1200px' : value?.desktop,
|
|
35
|
-
[`--w-tablet`]: unit ? `${value?.tablet}${unit}` : value?.tablet === 'default' ? '1200px' : value?.tablet,
|
|
36
|
-
[`--w-mobile`]: unit ? `${value?.mobile}${unit}` : value?.mobile === 'default' ? '1200px' : value?.mobile
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
32
|
const getCalloutBoxContainerStyles = (styles)=>{
|
|
40
33
|
return filterTruthyStyles({
|
|
41
34
|
backgroundColor: styles?.backgroundColor ? CalloutBgColorEnum[styles?.backgroundColor] : '#FAFAFA',
|
|
@@ -43,4 +36,4 @@ const getCalloutBoxContainerStyles = (styles)=>{
|
|
|
43
36
|
});
|
|
44
37
|
};
|
|
45
38
|
|
|
46
|
-
export { getCalloutBoxContainerStyles, getCalloutTextStyle, getTextStyles
|
|
39
|
+
export { getCalloutBoxContainerStyles, getCalloutTextStyle, getTextStyles };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeStyleResponsiveWidth, filterTruthyStyles } from '@gem-sdk/core';
|
|
2
2
|
import { makeBgColor, makeBorderColor } from '../../../utils/helper.js';
|
|
3
3
|
|
|
4
4
|
const pdBanner = '17px';
|
|
5
5
|
const brBanner = '3px';
|
|
6
6
|
const getTextCountdownWrapperStyles = (width, bgColor)=>{
|
|
7
7
|
const styles = {
|
|
8
|
-
...
|
|
8
|
+
...makeStyleResponsiveWidth(width),
|
|
9
9
|
backgroundColor: makeBgColor(bgColor),
|
|
10
10
|
borderWidth: '1px',
|
|
11
11
|
borderStyle: 'solid',
|
|
@@ -12,6 +12,7 @@ const CountdownTimerSettings = [
|
|
|
12
12
|
label: 'Message',
|
|
13
13
|
type: 'input',
|
|
14
14
|
default: 'Offer expires in:',
|
|
15
|
+
placeholder: 'Add...',
|
|
15
16
|
clearButton: false
|
|
16
17
|
},
|
|
17
18
|
{
|
|
@@ -156,13 +157,6 @@ const CountdownTimerSettings = [
|
|
|
156
157
|
type: 'text',
|
|
157
158
|
tooltip: 'Align right',
|
|
158
159
|
iconName: 'polaris-text-align-right'
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
label: 'Justify',
|
|
162
|
-
value: 'justify',
|
|
163
|
-
type: 'text',
|
|
164
|
-
tooltip: 'Align justify',
|
|
165
|
-
iconName: 'gp-text-align-justify'
|
|
166
160
|
}
|
|
167
161
|
],
|
|
168
162
|
default: 'left'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.305",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
26
|
-
"@gem-sdk/styles": "2.0.0-dev.
|
|
27
|
-
"@gem-sdk/system": "2.0.0-dev.
|
|
25
|
+
"@gem-sdk/core": "2.0.0-dev.305",
|
|
26
|
+
"@gem-sdk/styles": "2.0.0-dev.305",
|
|
27
|
+
"@gem-sdk/system": "2.0.0-dev.305",
|
|
28
28
|
"@types/react-transition-group": "^4.4.5"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|