@gem-sdk/components 2.0.0-dev.442 → 2.0.0-dev.445

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 (43) hide show
  1. package/dist/cjs/form/components/contact/common/composeStyles.js +0 -2
  2. package/dist/cjs/form/components/form-email/FormEmail.liquid.js +1 -1
  3. package/dist/cjs/form/setting/contact/ContactInitConfig.js +271 -150
  4. package/dist/cjs/form/setting/contact/configs/settings.js +20 -13
  5. package/dist/cjs/form/setting/contact/configs/uiV2.js +3 -12
  6. package/dist/cjs/form/setting/form-textarea/configs/uiV2.js +1 -1
  7. package/dist/cjs/form/setting/text-field/configs/settings.js +2 -2
  8. package/dist/cjs/icon/setting/configs/uiV2.js +31 -28
  9. package/dist/cjs/product/components/ProductBadge/common/getClasses.js +1 -1
  10. package/dist/cjs/product/components/ProductBadge/common/getStyles.js +2 -2
  11. package/dist/cjs/product/components/ProductBadge/constants.js +3 -0
  12. package/dist/cjs/product/components/ProductBadge/index.liquid.js +3 -4
  13. package/dist/cjs/product/components/ProductBadge/utils/shape.js +6 -6
  14. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +4 -2
  15. package/dist/cjs/product/components/ProductDiscountTag/common/getStyle.js +6 -1
  16. package/dist/cjs/product/components/ProductQuantity/common/common.js +12 -13
  17. package/dist/cjs/product/components/ProductQuantity/index.js +2 -2
  18. package/dist/cjs/product/components/ProductQuantity/index.liquid.js +1 -1
  19. package/dist/cjs/product/setting/product-price/configs/uiV2.js +2 -0
  20. package/dist/cjs/sticky/setting/preset-config.js +15 -0
  21. package/dist/cjs/text/components/Text.liquid.js +1 -0
  22. package/dist/esm/form/components/contact/common/composeStyles.js +1 -3
  23. package/dist/esm/form/components/form-email/FormEmail.liquid.js +1 -1
  24. package/dist/esm/form/setting/contact/ContactInitConfig.js +271 -150
  25. package/dist/esm/form/setting/contact/configs/settings.js +20 -13
  26. package/dist/esm/form/setting/contact/configs/uiV2.js +3 -12
  27. package/dist/esm/form/setting/form-textarea/configs/uiV2.js +1 -1
  28. package/dist/esm/form/setting/text-field/configs/settings.js +2 -2
  29. package/dist/esm/icon/setting/configs/uiV2.js +31 -28
  30. package/dist/esm/product/components/ProductBadge/common/getClasses.js +1 -1
  31. package/dist/esm/product/components/ProductBadge/common/getStyles.js +2 -2
  32. package/dist/esm/product/components/ProductBadge/constants.js +2 -1
  33. package/dist/esm/product/components/ProductBadge/index.liquid.js +3 -4
  34. package/dist/esm/product/components/ProductBadge/utils/shape.js +6 -6
  35. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +4 -2
  36. package/dist/esm/product/components/ProductDiscountTag/common/getStyle.js +6 -1
  37. package/dist/esm/product/components/ProductQuantity/common/common.js +12 -13
  38. package/dist/esm/product/components/ProductQuantity/index.js +3 -3
  39. package/dist/esm/product/components/ProductQuantity/index.liquid.js +2 -2
  40. package/dist/esm/product/setting/product-price/configs/uiV2.js +2 -0
  41. package/dist/esm/sticky/setting/preset-config.js +15 -0
  42. package/dist/esm/text/components/Text.liquid.js +1 -0
  43. package/package.json +1 -1
@@ -75,37 +75,40 @@ const SettingUIV2 = [
75
75
  state: 'normal'
76
76
  }
77
77
  }
78
- ],
79
- moreSettings: {
80
- controls: [
81
- {
82
- label: {
83
- en: 'Border'
84
- },
85
- setting: {
86
- id: 'iconBorder',
87
- state: 'normal'
88
- }
78
+ ]
79
+ },
80
+ {
81
+ label: {
82
+ en: 'Shape'
83
+ },
84
+ controls: [
85
+ {
86
+ label: {
87
+ en: 'Border'
89
88
  },
90
- {
91
- label: {
92
- en: 'Corner'
93
- },
94
- setting: {
95
- id: 'iconRounded',
96
- state: 'normal'
97
- }
89
+ setting: {
90
+ id: 'iconBorder',
91
+ state: 'normal'
92
+ }
93
+ },
94
+ {
95
+ label: {
96
+ en: 'Corner'
98
97
  },
99
- {
100
- label: {
101
- en: 'Shadow'
102
- },
103
- setting: {
104
- id: 'iconShadow'
105
- }
98
+ setting: {
99
+ id: 'iconRounded',
100
+ state: 'normal'
106
101
  }
107
- ]
108
- }
102
+ },
103
+ {
104
+ label: {
105
+ en: 'Shadow'
106
+ },
107
+ setting: {
108
+ id: 'iconShadow'
109
+ }
110
+ }
111
+ ]
109
112
  },
110
113
  {
111
114
  label: {
@@ -38,7 +38,7 @@ const getTextContentClasses = (styles)=>{
38
38
  };
39
39
  };
40
40
  const getImageContainerClasses = ()=>{
41
- const classList = 'product-badge-item gp-w-full gp-h-full';
41
+ const classList = 'product-badge-item gp-w-full gp-h-full gp-overflow-hidden';
42
42
  return {
43
43
  ...core.composeClasses(classList)
44
44
  };
@@ -16,10 +16,10 @@ const getSizeStyles = (props)=>{
16
16
  const badgeSize = isTextBadge ? styles?.textSizeV2 : styles?.imageSizeV2;
17
17
  return isTextBadge ? common.getSize(shape$1, badgeSize) : common.getSize(undefined, badgeSize);
18
18
  };
19
- const getContainerStyle = (props)=>{
19
+ const getContainerStyle = (props, isLiquid = false)=>{
20
20
  const { setting, styles, style, navigationPosition, imageData, dotData } = props;
21
21
  const isDropOutsideProductImage = setting?.positionWithImage === 'outside';
22
- const wrapperStyles = common.getWrapperStyle(false);
22
+ const wrapperStyles = common.getWrapperStyle(isLiquid);
23
23
  const shapePosition = getShapePosition.getShapePosition({
24
24
  positionType: styles?.position,
25
25
  isLiquid: false,
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ const IS_LIQUID = true;
3
4
  exports.SHAPE_ID = void 0;
4
5
  (function(SHAPE_ID) {
5
6
  SHAPE_ID["SQUARE"] = 'square';
@@ -12,3 +13,5 @@ exports.SHAPE_ID = void 0;
12
13
  SHAPE_ID["RIBBON_3"] = 'ribbon_3';
13
14
  SHAPE_ID["TRIANGLE"] = 'triangle';
14
15
  })(exports.SHAPE_ID || (exports.SHAPE_ID = {}));
16
+
17
+ exports.IS_LIQUID = IS_LIQUID;
@@ -11,13 +11,14 @@ var system = require('@gem-sdk/system');
11
11
  var getClasses = require('./common/getClasses.js');
12
12
  var getStyles = require('./common/getStyles.js');
13
13
  var getAttrs = require('./common/getAttrs.js');
14
+ var constants = require('./constants.js');
14
15
 
15
16
  const ProductBadge = (props)=>{
16
17
  const { styles, setting } = props;
17
18
  const isTextBadge = setting?.shape !== 'image';
18
19
  const isDiscountContent = common.checkDiscountContentProductBadge(setting?.displayContent);
19
20
  const containerStyle = system.createStyle({
20
- ...getStyles.getContainerStyle(props)
21
+ ...getStyles.getContainerStyle(props, constants.IS_LIQUID)
21
22
  });
22
23
  const wrapperClass = system.createClass({
23
24
  ...getClasses.getWrapperClasses(props)
@@ -113,9 +114,7 @@ const ProductBadge = (props)=>{
113
114
  </div>`, core.template`<div class="${imageContainerClasses}" style="${imageContainerStyles}">
114
115
  <img ${{
115
116
  ...imageAttr
116
- }}>
117
- class="${imageClass}"
118
- />
117
+ }} class="${imageClass}" alt="" />
119
118
  </div>`)}
120
119
  </div>
121
120
  </div>
@@ -43,7 +43,7 @@ const productBadgeShape = [
43
43
  wrapperWidth: '132px',
44
44
  wrapperHeight: '132px',
45
45
  shapeStyle: {
46
- clipPath: 'polygon(60% 0, 100% 0%, 0 100%, 0 60%)'
46
+ 'clip-path': 'polygon(60% 0, 100% 0%, 0 100%, 0 60%)'
47
47
  },
48
48
  textStyle: {
49
49
  '--t': 'translate(-10%, -30%) rotate(-45deg)',
@@ -57,7 +57,7 @@ const productBadgeShape = [
57
57
  wrapperWidth: '132px',
58
58
  wrapperHeight: '132px',
59
59
  shapeStyle: {
60
- clipPath: 'polygon(50% 0%,64.351% 15.354%,85.355% 14.645%,84.646% 35.649%,100% 50%,84.646% 64.351%,85.355% 85.355%,64.351% 84.646%,50% 100%,35.649% 84.646%,14.645% 85.355%,15.354% 64.351%,0% 50%,15.354% 35.649%,14.645% 14.645%,35.649% 15.354%,50% 0%)'
60
+ 'clip-path': 'polygon(50% 0%,64.351% 15.354%,85.355% 14.645%,84.646% 35.649%,100% 50%,84.646% 64.351%,85.355% 85.355%,64.351% 84.646%,50% 100%,35.649% 84.646%,14.645% 85.355%,15.354% 64.351%,0% 50%,15.354% 35.649%,14.645% 14.645%,35.649% 15.354%,50% 0%)'
61
61
  }
62
62
  },
63
63
  {
@@ -65,7 +65,7 @@ const productBadgeShape = [
65
65
  wrapperWidth: '132px',
66
66
  wrapperHeight: '132px',
67
67
  shapeStyle: {
68
- clipPath: 'polygon(50% 0%,63.394% 17.664%,85.355% 14.645%,82.336% 36.606%,100% 50%,82.336% 63.394%,85.355% 85.355%,63.394% 82.336%,50% 100%,36.606% 82.336%,14.645% 85.355%,17.664% 63.394%,0% 50%,17.664% 36.606%,14.645% 14.645%,36.606% 17.664%,50% 0%)'
68
+ 'clip-path': 'polygon(50% 0%,63.394% 17.664%,85.355% 14.645%,82.336% 36.606%,100% 50%,82.336% 63.394%,85.355% 85.355%,63.394% 82.336%,50% 100%,36.606% 82.336%,14.645% 85.355%,17.664% 63.394%,0% 50%,17.664% 36.606%,14.645% 14.645%,36.606% 17.664%,50% 0%)'
69
69
  },
70
70
  ratio: 1
71
71
  },
@@ -74,7 +74,7 @@ const productBadgeShape = [
74
74
  wrapperWidth: 'auto',
75
75
  wrapperHeight: 'auto',
76
76
  shapeStyle: {
77
- clipPath: 'polygon(0 0, 0 0, 79.5% 0, 100% 50%, 79.5% 100%, 0 100%, 0 100%)'
77
+ 'clip-path': 'polygon(0 0, 0 0, 79.5% 0, 100% 50%, 79.5% 100%, 0 100%, 0 100%)'
78
78
  }
79
79
  },
80
80
  {
@@ -82,7 +82,7 @@ const productBadgeShape = [
82
82
  wrapperWidth: 'auto',
83
83
  wrapperHeight: 'auto',
84
84
  shapeStyle: {
85
- clipPath: 'polygon( 0% 100%,14.744% 50%,0% 0%,82.051% 0%,100% 50%,82.051% 100%,0% 100%)'
85
+ 'clip-path': 'polygon( 0% 100%,14.744% 50%,0% 0%,82.051% 0%,100% 50%,82.051% 100%,0% 100%)'
86
86
  }
87
87
  },
88
88
  {
@@ -90,7 +90,7 @@ const productBadgeShape = [
90
90
  wrapperWidth: '132px',
91
91
  wrapperHeight: '132px',
92
92
  shapeStyle: {
93
- clipPath: 'polygon(0% 0%, 0% 100%, 100% 0%)'
93
+ 'clip-path': 'polygon(0% 0%, 0% 100%, 100% 0%)'
94
94
  },
95
95
  textStyle: {
96
96
  '--t': 'translate(-20%, -75%) rotate(-45deg)',
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9,7 +10,7 @@ var classes = require('../common/classes.js');
9
10
  var React = require('react');
10
11
 
11
12
  const ProductBundleDiscountChildrenItem = (props)=>{
12
- const { index, isSelected, setSelected, setting, styles: styles$1, childItem } = props;
13
+ const { index, isSelected, setSelected, setting, styles: styles$1, childItem, bundleItem } = props;
13
14
  const composeItemWrapStyles = system.createStyle(styles.getItemWrapStyles(styles$1, isSelected));
14
15
  const composeLayoutClasses = system.createClass(classes.getLayoutClasses(setting));
15
16
  const composeIconStyles = system.createStyle(styles.getIconStyles(setting));
@@ -58,7 +59,8 @@ const ProductBundleDiscountChildrenItem = (props)=>{
58
59
  /*#__PURE__*/ jsxRuntime.jsx("div", {
59
60
  className: composeFlexChildren,
60
61
  children: /*#__PURE__*/ React.isValidElement(childItem) && /*#__PURE__*/ jsxRuntime.jsx(childItem.type, {
61
- ...childItem.props
62
+ ...childItem.props,
63
+ "bundle-item": bundleItem
62
64
  })
63
65
  })
64
66
  ]
@@ -9,6 +9,11 @@ const getRootClass = (styles)=>{
9
9
  return core.filterTruthyStyles(composeStyles);
10
10
  };
11
11
  const getWrapperTextStyle = (styles)=>{
12
+ const globalRadiusTypeList = [
13
+ 'small',
14
+ 'medium',
15
+ 'large'
16
+ ];
12
17
  const { backgroundColor, roundedTag, borderTag, textColor } = styles ?? {};
13
18
  const composeGlobalSize = core.makeGlobalSize(styles?.size);
14
19
  const borderColorClass = core.getGlobalColorClass('border', borderTag?.color);
@@ -24,7 +29,7 @@ const getWrapperTextStyle = (styles)=>{
24
29
  c: textColorClass === '' ? textColor : undefined,
25
30
  bg: backgroundColorClass === '' ? backgroundColor : undefined
26
31
  }),
27
- ...roundedTag?.radiusType !== 'custom' ? core.getRadiusCSSFromGlobal('normal', roundedTag?.radiusType) : {},
32
+ ...globalRadiusTypeList.includes(roundedTag?.radiusType || '') && core.getRadiusCSSFromGlobal('normal', roundedTag?.radiusType),
28
33
  ...core.getCustomRadius('normal', roundedTag)
29
34
  };
30
35
  return core.filterTruthyStyles(composeStyles);
@@ -3,31 +3,30 @@
3
3
  var core = require('@gem-sdk/core');
4
4
 
5
5
  const getPlusIcon = (plusIcon)=>{
6
- return plusIcon ?? `<svg
6
+ return plusIcon || `<svg
7
7
  xmlns="http://www.w3.org/2000/svg"
8
- className="gp-h-full gp-w-full"
9
8
  fill="none"
10
9
  viewBox="0 0 24 24"
11
10
  stroke="currentColor"
12
11
  >
13
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18 12H6" />
12
+ <path
13
+ strokeLinecap="round"
14
+ strokeLinejoin="round"
15
+ strokeWidth={2}
16
+ d="M12 6v6m0 0v6m0-6h6m-6 0H6"
17
+ />
14
18
  </svg>`;
15
19
  };
16
20
  const getMinusIcon = (minusIcon)=>{
17
- return minusIcon ?? `<svg
21
+ return minusIcon || `<svg
18
22
  xmlns="http://www.w3.org/2000/svg"
23
+ className="gp-h-full gp-w-full"
19
24
  fill="none"
20
25
  viewBox="0 0 24 24"
21
26
  stroke="currentColor"
22
- >
23
- <path
24
- strokeLinecap="round"
25
- strokeLinejoin="round"
26
- strokeWidth={2}
27
- d="M12 6v6m0 0v6m0-6h6m-6 0H6"
28
- />
29
- </svg>
30
- `;
27
+ >
28
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18 12H6" />
29
+ </svg>`;
31
30
  };
32
31
  const getIconWidth = (iconSizeCustom)=>{
33
32
  if (!iconSizeCustom) return {};
@@ -136,7 +136,7 @@ const ProductQuantity = (props)=>{
136
136
  className: iconWrapperClass,
137
137
  style: iconWidth,
138
138
  dangerouslySetInnerHTML: {
139
- __html: common.getPlusIcon(minusIcon)
139
+ __html: common.getMinusIcon(minusIcon)
140
140
  }
141
141
  })
142
142
  })),
@@ -159,7 +159,7 @@ const ProductQuantity = (props)=>{
159
159
  className: iconWrapperClass,
160
160
  style: iconWidth,
161
161
  dangerouslySetInnerHTML: {
162
- __html: common.getMinusIcon(plusIcon)
162
+ __html: common.getPlusIcon(plusIcon)
163
163
  }
164
164
  })
165
165
  }))
@@ -141,7 +141,7 @@ const ProductQuantity = ({ setting = {}, styles = {}, advanced, builderProps })=
141
141
  >
142
142
  <span class="${iconWrapperClass}" style="${iconWidth}"
143
143
  >
144
- ${common.getPlusIcon(minusIcon)}
144
+ ${common.getMinusIcon(minusIcon)}
145
145
  </span>
146
146
  </button>
147
147
  `)}
@@ -82,6 +82,8 @@ const SettingUIV2 = [
82
82
  },
83
83
  getValueFromSettingID: 'lineColor',
84
84
  comboType: 'color',
85
+ defaultValueWhenClear: '',
86
+ compoDefaultValue: 'text-1',
85
87
  controls: [
86
88
  {
87
89
  label: {
@@ -981,6 +981,7 @@ const StickyPresetScrollToTop = {
981
981
  tag: 'Button',
982
982
  label: 'Button',
983
983
  settings: {
984
+ enableBtnLink: true,
984
985
  btnLink: {
985
986
  link: '#scroll-to-top',
986
987
  selectedTab: 'scrollToList',
@@ -998,6 +999,7 @@ const StickyPresetScrollToTop = {
998
999
  translate: 'label'
999
1000
  },
1000
1001
  styles: {
1002
+ enableTextStyle: false,
1001
1003
  align: {
1002
1004
  desktop: 'right'
1003
1005
  },
@@ -1043,6 +1045,19 @@ const StickyPresetScrollToTop = {
1043
1045
  type: 'custom'
1044
1046
  },
1045
1047
  width: 'Auto'
1048
+ },
1049
+ mobile: {
1050
+ gap: '',
1051
+ height: 'Auto',
1052
+ padding: {
1053
+ bottom: '12px',
1054
+ left: '12px',
1055
+ linked: true,
1056
+ right: '12px',
1057
+ top: '12px',
1058
+ type: 'custom'
1059
+ },
1060
+ width: 'Auto'
1046
1061
  }
1047
1062
  },
1048
1063
  hasBoxShadowBtn: {
@@ -64,6 +64,7 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
64
64
  }}
65
65
  class="${wrapperClasses}"
66
66
  style="${wrapperStyle}"
67
+ data-test-force-publish="${new Date().getTime()}"
67
68
  >
68
69
  <div class="${containerClasses}" style="${containerStyle}">
69
70
  <${Element}
@@ -1,5 +1,5 @@
1
1
  import { filterTruthy } from '../../../helpers/common.js';
2
- import { makeGlobalSize, composeBorderResponsive, composeRadiusResponsive, getResponsiveStyleShadowWithoutState, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
2
+ import { makeGlobalSize, composeBorderResponsive, composeRadiusResponsive, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
3
3
 
4
4
  const composeStyles = (styles)=>filterTruthy(styles);
5
5
  const composeContainerStyles = (setting, styles)=>{
@@ -7,14 +7,12 @@ const composeContainerStyles = (setting, styles)=>{
7
7
  const { globalSize } = styles ?? {};
8
8
  const composeGlobalSize = makeGlobalSize(globalSize);
9
9
  return composeStyles({
10
- ...styles,
11
10
  ...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
12
11
  '--w': '100%'
13
12
  },
14
13
  ...composeGlobalSize.padding,
15
14
  ...composeBorderResponsive(styles?.border),
16
15
  ...composeRadiusResponsive(styles?.rounded),
17
- ...getResponsiveStyleShadowWithoutState(styles?.boxShadow, 'box-shadow', styles?.boxShadow),
18
16
  ...getStyleBackgroundByDevice(background),
19
17
  ...getGradientBgrStyleByDevice(background)
20
18
  });
@@ -42,7 +42,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, pageContext,
42
42
  name="${name}"
43
43
  ${If(required, 'required')}
44
44
  autocomplete="email"
45
- ${If(hideOnClient, `value="${defaultEmail}`)}
45
+ ${If(hideOnClient, `value="${defaultEmail}"`)}
46
46
  ></input>
47
47
  </div>
48
48
  `;