@gem-sdk/components 2.0.0-dev.399 → 2.0.0-dev.400

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.
@@ -5,11 +5,12 @@ var core = require('@gem-sdk/core');
5
5
  var getInnerRadius = require('./getInnerRadius.js');
6
6
  var system = require('@gem-sdk/system');
7
7
  var helpers = require('./helpers.js');
8
+ var helper = require('../../../post-purchase/utils/helper.js');
8
9
 
9
10
  const getRowStyle = (rowProps)=>{
10
11
  const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
11
12
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
12
- const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
13
+ const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
13
14
  const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
14
15
  const overFlowStyle = core.makeStyleResponsive('of', {
15
16
  desktop: innerRadius.desktop ? 'hidden' : undefined,
@@ -48,7 +49,8 @@ const getRowStyle = (rowProps)=>{
48
49
  '--mt': '0px',
49
50
  ...core.makeStyleResponsive('cg', columnGap),
50
51
  ...core.makeStyle({
51
- pc: inlineAlignment
52
+ pc: inlineAlignment,
53
+ rg: rowGap ? helper.postPurchaseViewSpacing[rowGap] : '0px'
52
54
  })
53
55
  };
54
56
  };
@@ -312,6 +312,13 @@ const config = {
312
312
  }
313
313
  }
314
314
  },
315
+ {
316
+ type: 'select',
317
+ label: 'Spacing',
318
+ id: 'rowGap',
319
+ options: constants.postPurchaseViewSpacing,
320
+ default: 'base'
321
+ },
315
322
  {
316
323
  id: 'productOfferColumnGap',
317
324
  type: 'input:slider',
@@ -43,7 +43,25 @@ const ProductOfferSettingUIV2 = [
43
43
  },
44
44
  setting: {
45
45
  id: 'columnGap'
46
- }
46
+ },
47
+ conditionDisplay: `!!layout.cols && layout.cols.length > 1`
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ label: {
53
+ en: 'Column spacing'
54
+ },
55
+ controls: [
56
+ {
57
+ type: 'control',
58
+ label: {
59
+ en: 'Gap'
60
+ },
61
+ setting: {
62
+ id: 'rowGap'
63
+ },
64
+ conditionDisplay: `!!layout.cols && layout.cols.length == 1`
47
65
  }
48
66
  ]
49
67
  },
@@ -3,11 +3,12 @@ import { makeStyleResponsive, isEmptyChildren, splitStyle, composeRadius, compos
3
3
  import { getInnerRadiusExcludeBorder } from './getInnerRadius.js';
4
4
  import { createStyle } from '@gem-sdk/system';
5
5
  import { createStyleObject } from './helpers.js';
6
+ import { postPurchaseViewSpacing } from '../../../post-purchase/utils/helper.js';
6
7
 
7
8
  const getRowStyle = (rowProps)=>{
8
9
  const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
9
10
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
10
- const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
11
+ const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
11
12
  const innerRadius = getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
12
13
  const overFlowStyle = makeStyleResponsive('of', {
13
14
  desktop: innerRadius.desktop ? 'hidden' : undefined,
@@ -46,7 +47,8 @@ const getRowStyle = (rowProps)=>{
46
47
  '--mt': '0px',
47
48
  ...makeStyleResponsive('cg', columnGap),
48
49
  ...makeStyle({
49
- pc: inlineAlignment
50
+ pc: inlineAlignment,
51
+ rg: rowGap ? postPurchaseViewSpacing[rowGap] : '0px'
50
52
  })
51
53
  };
52
54
  };
@@ -308,6 +308,13 @@ const config = {
308
308
  }
309
309
  }
310
310
  },
311
+ {
312
+ type: 'select',
313
+ label: 'Spacing',
314
+ id: 'rowGap',
315
+ options: postPurchaseViewSpacing,
316
+ default: 'base'
317
+ },
311
318
  {
312
319
  id: 'productOfferColumnGap',
313
320
  type: 'input:slider',
@@ -41,7 +41,25 @@ const ProductOfferSettingUIV2 = [
41
41
  },
42
42
  setting: {
43
43
  id: 'columnGap'
44
- }
44
+ },
45
+ conditionDisplay: `!!layout.cols && layout.cols.length > 1`
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ label: {
51
+ en: 'Column spacing'
52
+ },
53
+ controls: [
54
+ {
55
+ type: 'control',
56
+ label: {
57
+ en: 'Gap'
58
+ },
59
+ setting: {
60
+ id: 'rowGap'
61
+ },
62
+ conditionDisplay: `!!layout.cols && layout.cols.length == 1`
45
63
  }
46
64
  ]
47
65
  },
@@ -493,6 +493,7 @@ type RowStylesType = {
493
493
  width?: ObjectDevices$1<string>;
494
494
  preloadBgImage?: boolean;
495
495
  columnGap?: ObjectDevices$1<string>;
496
+ rowGap?: string;
496
497
  border?: ObjectDevices$1<StateProp<Border>>;
497
498
  rounded?: ObjectDevices$1<StateProp<CornerRadius>>;
498
499
  padding?: ObjectDevices$1<SizeSettingGlobal>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.399",
3
+ "version": "2.0.0-dev.400",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",