@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
@@ -73,37 +73,40 @@ const SettingUIV2 = [
73
73
  state: 'normal'
74
74
  }
75
75
  }
76
- ],
77
- moreSettings: {
78
- controls: [
79
- {
80
- label: {
81
- en: 'Border'
82
- },
83
- setting: {
84
- id: 'iconBorder',
85
- state: 'normal'
86
- }
76
+ ]
77
+ },
78
+ {
79
+ label: {
80
+ en: 'Shape'
81
+ },
82
+ controls: [
83
+ {
84
+ label: {
85
+ en: 'Border'
87
86
  },
88
- {
89
- label: {
90
- en: 'Corner'
91
- },
92
- setting: {
93
- id: 'iconRounded',
94
- state: 'normal'
95
- }
87
+ setting: {
88
+ id: 'iconBorder',
89
+ state: 'normal'
90
+ }
91
+ },
92
+ {
93
+ label: {
94
+ en: 'Corner'
96
95
  },
97
- {
98
- label: {
99
- en: 'Shadow'
100
- },
101
- setting: {
102
- id: 'iconShadow'
103
- }
96
+ setting: {
97
+ id: 'iconRounded',
98
+ state: 'normal'
104
99
  }
105
- ]
106
- }
100
+ },
101
+ {
102
+ label: {
103
+ en: 'Shadow'
104
+ },
105
+ setting: {
106
+ id: 'iconShadow'
107
+ }
108
+ }
109
+ ]
107
110
  },
108
111
  {
109
112
  label: {
@@ -36,7 +36,7 @@ const getTextContentClasses = (styles)=>{
36
36
  };
37
37
  };
38
38
  const getImageContainerClasses = ()=>{
39
- const classList = 'product-badge-item gp-w-full gp-h-full';
39
+ const classList = 'product-badge-item gp-w-full gp-h-full gp-overflow-hidden';
40
40
  return {
41
41
  ...composeClasses(classList)
42
42
  };
@@ -14,10 +14,10 @@ const getSizeStyles = (props)=>{
14
14
  const badgeSize = isTextBadge ? styles?.textSizeV2 : styles?.imageSizeV2;
15
15
  return isTextBadge ? getSize(shape, badgeSize) : getSize(undefined, badgeSize);
16
16
  };
17
- const getContainerStyle = (props)=>{
17
+ const getContainerStyle = (props, isLiquid = false)=>{
18
18
  const { setting, styles, style, navigationPosition, imageData, dotData } = props;
19
19
  const isDropOutsideProductImage = setting?.positionWithImage === 'outside';
20
- const wrapperStyles = getWrapperStyle(false);
20
+ const wrapperStyles = getWrapperStyle(isLiquid);
21
21
  const shapePosition = getShapePosition({
22
22
  positionType: styles?.position,
23
23
  isLiquid: false,
@@ -1,3 +1,4 @@
1
+ const IS_LIQUID = true;
1
2
  var SHAPE_ID;
2
3
  (function(SHAPE_ID) {
3
4
  SHAPE_ID["SQUARE"] = 'square';
@@ -11,4 +12,4 @@ var SHAPE_ID;
11
12
  SHAPE_ID["TRIANGLE"] = 'triangle';
12
13
  })(SHAPE_ID || (SHAPE_ID = {}));
13
14
 
14
- export { SHAPE_ID };
15
+ export { IS_LIQUID, SHAPE_ID };
@@ -7,13 +7,14 @@ import { createStyle, createClass, createAttr } from '@gem-sdk/system';
7
7
  import { getWrapperClasses, getSubWrapperClass, getTextContainerClasses, getTextWrapperClasses, getTextContentClasses, getImageContainerClasses, getImageClasses } from './common/getClasses.js';
8
8
  import { getContainerStyle, getSubWrapperStyle, getContentStyleInternal, getTextBadgeWrapperStyles, getTextContentStyle, getImageContainerStyles } from './common/getStyles.js';
9
9
  import { getSubWrapperAttrs, getContainerAttrs, getTextContentAttrs, getImageAttr } from './common/getAttrs.js';
10
+ import { IS_LIQUID } from './constants.js';
10
11
 
11
12
  const ProductBadge = (props)=>{
12
13
  const { styles, setting } = props;
13
14
  const isTextBadge = setting?.shape !== 'image';
14
15
  const isDiscountContent = checkDiscountContentProductBadge(setting?.displayContent);
15
16
  const containerStyle = createStyle({
16
- ...getContainerStyle(props)
17
+ ...getContainerStyle(props, IS_LIQUID)
17
18
  });
18
19
  const wrapperClass = createClass({
19
20
  ...getWrapperClasses(props)
@@ -109,9 +110,7 @@ const ProductBadge = (props)=>{
109
110
  </div>`, template`<div class="${imageContainerClasses}" style="${imageContainerStyles}">
110
111
  <img ${{
111
112
  ...imageAttr
112
- }}>
113
- class="${imageClass}"
114
- />
113
+ }} class="${imageClass}" alt="" />
115
114
  </div>`)}
116
115
  </div>
117
116
  </div>
@@ -41,7 +41,7 @@ const productBadgeShape = [
41
41
  wrapperWidth: '132px',
42
42
  wrapperHeight: '132px',
43
43
  shapeStyle: {
44
- clipPath: 'polygon(60% 0, 100% 0%, 0 100%, 0 60%)'
44
+ 'clip-path': 'polygon(60% 0, 100% 0%, 0 100%, 0 60%)'
45
45
  },
46
46
  textStyle: {
47
47
  '--t': 'translate(-10%, -30%) rotate(-45deg)',
@@ -55,7 +55,7 @@ const productBadgeShape = [
55
55
  wrapperWidth: '132px',
56
56
  wrapperHeight: '132px',
57
57
  shapeStyle: {
58
- 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%)'
58
+ '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%)'
59
59
  }
60
60
  },
61
61
  {
@@ -63,7 +63,7 @@ const productBadgeShape = [
63
63
  wrapperWidth: '132px',
64
64
  wrapperHeight: '132px',
65
65
  shapeStyle: {
66
- 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%)'
66
+ '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%)'
67
67
  },
68
68
  ratio: 1
69
69
  },
@@ -72,7 +72,7 @@ const productBadgeShape = [
72
72
  wrapperWidth: 'auto',
73
73
  wrapperHeight: 'auto',
74
74
  shapeStyle: {
75
- clipPath: 'polygon(0 0, 0 0, 79.5% 0, 100% 50%, 79.5% 100%, 0 100%, 0 100%)'
75
+ 'clip-path': 'polygon(0 0, 0 0, 79.5% 0, 100% 50%, 79.5% 100%, 0 100%, 0 100%)'
76
76
  }
77
77
  },
78
78
  {
@@ -80,7 +80,7 @@ const productBadgeShape = [
80
80
  wrapperWidth: 'auto',
81
81
  wrapperHeight: 'auto',
82
82
  shapeStyle: {
83
- clipPath: 'polygon( 0% 100%,14.744% 50%,0% 0%,82.051% 0%,100% 50%,82.051% 100%,0% 100%)'
83
+ 'clip-path': 'polygon( 0% 100%,14.744% 50%,0% 0%,82.051% 0%,100% 50%,82.051% 100%,0% 100%)'
84
84
  }
85
85
  },
86
86
  {
@@ -88,7 +88,7 @@ const productBadgeShape = [
88
88
  wrapperWidth: '132px',
89
89
  wrapperHeight: '132px',
90
90
  shapeStyle: {
91
- clipPath: 'polygon(0% 0%, 0% 100%, 100% 0%)'
91
+ 'clip-path': 'polygon(0% 0%, 0% 100%, 100% 0%)'
92
92
  },
93
93
  textStyle: {
94
94
  '--t': 'translate(-20%, -75%) rotate(-45deg)',
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { jsx, jsxs } from 'react/jsx-runtime';
2
3
  import { getItemWrapStyles, getIconStyles, getSvgActiveStyles, getSvgStyles, getFlexChildren } from '../common/styles.js';
3
4
  import { createStyle, createClass, If } from '@gem-sdk/system';
@@ -5,7 +6,7 @@ import { getLayoutClasses, getIconSectionClasses, getItemClasses } from '../comm
5
6
  import { isValidElement } from 'react';
6
7
 
7
8
  const ProductBundleDiscountChildrenItem = (props)=>{
8
- const { index, isSelected, setSelected, setting, styles, childItem } = props;
9
+ const { index, isSelected, setSelected, setting, styles, childItem, bundleItem } = props;
9
10
  const composeItemWrapStyles = createStyle(getItemWrapStyles(styles, isSelected));
10
11
  const composeLayoutClasses = createClass(getLayoutClasses(setting));
11
12
  const composeIconStyles = createStyle(getIconStyles(setting));
@@ -54,7 +55,8 @@ const ProductBundleDiscountChildrenItem = (props)=>{
54
55
  /*#__PURE__*/ jsx("div", {
55
56
  className: composeFlexChildren,
56
57
  children: /*#__PURE__*/ isValidElement(childItem) && /*#__PURE__*/ jsx(childItem.type, {
57
- ...childItem.props
58
+ ...childItem.props,
59
+ "bundle-item": bundleItem
58
60
  })
59
61
  })
60
62
  ]
@@ -7,6 +7,11 @@ const getRootClass = (styles)=>{
7
7
  return filterTruthyStyles(composeStyles);
8
8
  };
9
9
  const getWrapperTextStyle = (styles)=>{
10
+ const globalRadiusTypeList = [
11
+ 'small',
12
+ 'medium',
13
+ 'large'
14
+ ];
10
15
  const { backgroundColor, roundedTag, borderTag, textColor } = styles ?? {};
11
16
  const composeGlobalSize = makeGlobalSize(styles?.size);
12
17
  const borderColorClass = getGlobalColorClass('border', borderTag?.color);
@@ -22,7 +27,7 @@ const getWrapperTextStyle = (styles)=>{
22
27
  c: textColorClass === '' ? textColor : undefined,
23
28
  bg: backgroundColorClass === '' ? backgroundColor : undefined
24
29
  }),
25
- ...roundedTag?.radiusType !== 'custom' ? getRadiusCSSFromGlobal('normal', roundedTag?.radiusType) : {},
30
+ ...globalRadiusTypeList.includes(roundedTag?.radiusType || '') && getRadiusCSSFromGlobal('normal', roundedTag?.radiusType),
26
31
  ...getCustomRadius('normal', roundedTag)
27
32
  };
28
33
  return filterTruthyStyles(composeStyles);
@@ -1,31 +1,30 @@
1
1
  import { DEVICES, makeStyleResponsive } from '@gem-sdk/core';
2
2
 
3
3
  const getPlusIcon = (plusIcon)=>{
4
- return plusIcon ?? `<svg
4
+ return plusIcon || `<svg
5
5
  xmlns="http://www.w3.org/2000/svg"
6
- className="gp-h-full gp-w-full"
7
6
  fill="none"
8
7
  viewBox="0 0 24 24"
9
8
  stroke="currentColor"
10
9
  >
11
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18 12H6" />
10
+ <path
11
+ strokeLinecap="round"
12
+ strokeLinejoin="round"
13
+ strokeWidth={2}
14
+ d="M12 6v6m0 0v6m0-6h6m-6 0H6"
15
+ />
12
16
  </svg>`;
13
17
  };
14
18
  const getMinusIcon = (minusIcon)=>{
15
- return minusIcon ?? `<svg
19
+ return minusIcon || `<svg
16
20
  xmlns="http://www.w3.org/2000/svg"
21
+ className="gp-h-full gp-w-full"
17
22
  fill="none"
18
23
  viewBox="0 0 24 24"
19
24
  stroke="currentColor"
20
- >
21
- <path
22
- strokeLinecap="round"
23
- strokeLinejoin="round"
24
- strokeWidth={2}
25
- d="M12 6v6m0 0v6m0-6h6m-6 0H6"
26
- />
27
- </svg>
28
- `;
25
+ >
26
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18 12H6" />
27
+ </svg>`;
29
28
  };
30
29
  const getIconWidth = (iconSizeCustom)=>{
31
30
  if (!iconSizeCustom) return {};
@@ -3,7 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useCurrentVariant, useQuantity } from '@gem-sdk/core';
4
4
  import { createAttr, createClass, createStyle, If } from '@gem-sdk/system';
5
5
  import { useProductQuantity } from './hooks/index.js';
6
- import { getIconWidth, getPlusIcon, getMinusIcon } from './common/common.js';
6
+ import { getIconWidth, getMinusIcon, getPlusIcon } from './common/common.js';
7
7
  import { getContainerAttrs, getInputAttr, getButtonAttrs } from './common/getAttrs.js';
8
8
  import { getContainerClasses, getWrapperClasses, getInputClasses, getButtonClass, getIconWrapperClasses } from './common/getClasses.js';
9
9
  import { getContainerStyles, getWrapperStyles, getInputStyle, getButtonStyle } from './common/getStyles.js';
@@ -132,7 +132,7 @@ const ProductQuantity = (props)=>{
132
132
  className: iconWrapperClass,
133
133
  style: iconWidth,
134
134
  dangerouslySetInnerHTML: {
135
- __html: getPlusIcon(minusIcon)
135
+ __html: getMinusIcon(minusIcon)
136
136
  }
137
137
  })
138
138
  })),
@@ -155,7 +155,7 @@ const ProductQuantity = (props)=>{
155
155
  className: iconWrapperClass,
156
156
  style: iconWidth,
157
157
  dangerouslySetInnerHTML: {
158
- __html: getMinusIcon(plusIcon)
158
+ __html: getPlusIcon(plusIcon)
159
159
  }
160
160
  })
161
161
  }))
@@ -1,7 +1,7 @@
1
1
  import { template, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
2
  import { getSettingPreloadData } from '../../../helpers.js';
3
3
  import { createAttr, createClass, createStyle } from '@gem-sdk/system';
4
- import { getIconWidth, getPlusIcon } from './common/common.js';
4
+ import { getIconWidth, getMinusIcon, getPlusIcon } from './common/common.js';
5
5
  import { getContainerAttrs, getInputAttr, getButtonAttrs } from './common/getAttrs.js';
6
6
  import { getContainerClasses, getWrapperClasses, getInputClasses, getButtonClass, getIconWrapperClasses } from './common/getClasses.js';
7
7
  import { getContainerStyles, getWrapperStyles, getInputStyle, getButtonStyle } from './common/getStyles.js';
@@ -137,7 +137,7 @@ const ProductQuantity = ({ setting = {}, styles = {}, advanced, builderProps })=
137
137
  >
138
138
  <span class="${iconWrapperClass}" style="${iconWidth}"
139
139
  >
140
- ${getPlusIcon(minusIcon)}
140
+ ${getMinusIcon(minusIcon)}
141
141
  </span>
142
142
  </button>
143
143
  `)}
@@ -80,6 +80,8 @@ const SettingUIV2 = [
80
80
  },
81
81
  getValueFromSettingID: 'lineColor',
82
82
  comboType: 'color',
83
+ defaultValueWhenClear: '',
84
+ compoDefaultValue: 'text-1',
83
85
  controls: [
84
86
  {
85
87
  label: {
@@ -979,6 +979,7 @@ const StickyPresetScrollToTop = {
979
979
  tag: 'Button',
980
980
  label: 'Button',
981
981
  settings: {
982
+ enableBtnLink: true,
982
983
  btnLink: {
983
984
  link: '#scroll-to-top',
984
985
  selectedTab: 'scrollToList',
@@ -996,6 +997,7 @@ const StickyPresetScrollToTop = {
996
997
  translate: 'label'
997
998
  },
998
999
  styles: {
1000
+ enableTextStyle: false,
999
1001
  align: {
1000
1002
  desktop: 'right'
1001
1003
  },
@@ -1041,6 +1043,19 @@ const StickyPresetScrollToTop = {
1041
1043
  type: 'custom'
1042
1044
  },
1043
1045
  width: 'Auto'
1046
+ },
1047
+ mobile: {
1048
+ gap: '',
1049
+ height: 'Auto',
1050
+ padding: {
1051
+ bottom: '12px',
1052
+ left: '12px',
1053
+ linked: true,
1054
+ right: '12px',
1055
+ top: '12px',
1056
+ type: 'custom'
1057
+ },
1058
+ width: 'Auto'
1044
1059
  }
1045
1060
  },
1046
1061
  hasBoxShadowBtn: {
@@ -60,6 +60,7 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
60
60
  }}
61
61
  class="${wrapperClasses}"
62
62
  style="${wrapperStyle}"
63
+ data-test-force-publish="${new Date().getTime()}"
63
64
  >
64
65
  <div class="${containerClasses}" style="${containerStyle}">
65
66
  <${Element}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.442",
3
+ "version": "2.0.0-dev.445",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",