@gem-sdk/components 2.0.0-dev.255 → 2.0.0-dev.259

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 (126) hide show
  1. package/dist/cjs/banner/components/HeroBannerItem.js +2 -2
  2. package/dist/cjs/banner/components/HeroBannerItem.liquid.js +1 -1
  3. package/dist/cjs/builder.js +3 -3
  4. package/dist/cjs/cart/components/CartList.js +2 -2
  5. package/dist/cjs/collection/components/CollectionBanner.js +2 -1
  6. package/dist/cjs/collection/components/CollectionBanner.liquid.js +2 -1
  7. package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +1 -1
  8. package/dist/cjs/grid/col/Col.js +29 -0
  9. package/dist/cjs/grid/col/Col.liquid.js +25 -0
  10. package/dist/cjs/grid/col/common/getAttr.js +15 -0
  11. package/dist/cjs/grid/col/common/getClass.js +25 -0
  12. package/dist/cjs/grid/{components/Col.liquid.js → col/common/getStyles.js} +22 -16
  13. package/dist/cjs/grid/next.js +3 -3
  14. package/dist/cjs/grid/{components → row}/Row.js +44 -55
  15. package/dist/cjs/grid/row/Row.liquid.js +122 -0
  16. package/dist/cjs/grid/row/commons/common.js +35 -0
  17. package/dist/cjs/grid/row/commons/getAttr.js +20 -0
  18. package/dist/cjs/grid/row/commons/getClass.js +44 -0
  19. package/dist/cjs/grid/row/commons/getData.js +17 -0
  20. package/dist/cjs/grid/row/commons/getStyle.js +102 -0
  21. package/dist/cjs/grid/{components → row/commons}/helpers.js +4 -4
  22. package/dist/cjs/grid/row/hooks/useRowSetting.js +78 -0
  23. package/dist/cjs/grid/{setting/row → row/setting}/configs/uiV2.js +1 -1
  24. package/dist/cjs/grid/{components → section}/Section.js +1 -1
  25. package/dist/cjs/grid/{components → section}/Section.liquid.js +1 -1
  26. package/dist/cjs/grid/{setting → section/setting}/Section.js +4 -4
  27. package/dist/cjs/grid/setting/index.js +3 -3
  28. package/dist/cjs/index.js +3 -3
  29. package/dist/cjs/index.liquid.js +3 -3
  30. package/dist/cjs/post-purchase/button/setting/configs/settings.js +21 -3
  31. package/dist/cjs/post-purchase/button/setting/configs/uiV2.js +1 -1
  32. package/dist/cjs/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  33. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +24 -6
  34. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/uiV2.js +1 -1
  35. package/dist/cjs/post-purchase/product/components/ProductOffer.js +3 -2
  36. package/dist/cjs/post-purchase/product/settings/accept-button/configs/settings.js +21 -3
  37. package/dist/cjs/post-purchase/product/settings/accept-button/configs/uiV2.js +1 -1
  38. package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +21 -3
  39. package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/uiV2.js +1 -1
  40. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +22 -5
  41. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/uiV2.js +6 -3
  42. package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +2 -1
  43. package/dist/cjs/post-purchase/product/settings/product-variants/settings/settingsV2.js +15 -3
  44. package/dist/cjs/post-purchase/utils/constants.js +20 -10
  45. package/dist/cjs/product/components/Product.js +2 -1
  46. package/dist/cjs/product/components/Product.liquid.js +2 -1
  47. package/dist/cjs/product/components/ProductList.js +1 -1
  48. package/dist/cjs/product/components/ProductList.liquid.js +1 -1
  49. package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +2 -2
  50. package/dist/cjs/sticky/components/Sticky.js +1 -1
  51. package/dist/esm/banner/components/HeroBannerItem.js +2 -2
  52. package/dist/esm/banner/components/HeroBannerItem.liquid.js +1 -1
  53. package/dist/esm/builder.js +3 -3
  54. package/dist/esm/cart/components/CartList.js +2 -2
  55. package/dist/esm/collection/components/CollectionBanner.js +2 -1
  56. package/dist/esm/collection/components/CollectionBanner.liquid.js +2 -1
  57. package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +1 -1
  58. package/dist/esm/grid/col/Col.js +25 -0
  59. package/dist/esm/grid/col/Col.liquid.js +21 -0
  60. package/dist/esm/grid/col/common/getAttr.js +13 -0
  61. package/dist/esm/grid/col/common/getClass.js +23 -0
  62. package/dist/esm/grid/{components/Col.liquid.js → col/common/getStyles.js} +23 -15
  63. package/dist/esm/grid/next.js +3 -3
  64. package/dist/esm/grid/{components → row}/Row.js +41 -52
  65. package/dist/esm/grid/row/Row.liquid.js +118 -0
  66. package/dist/esm/grid/row/commons/common.js +31 -0
  67. package/dist/esm/grid/row/commons/getAttr.js +18 -0
  68. package/dist/esm/grid/row/commons/getClass.js +42 -0
  69. package/dist/esm/grid/row/commons/getData.js +15 -0
  70. package/dist/esm/grid/row/commons/getStyle.js +100 -0
  71. package/dist/esm/grid/{components → row/commons}/helpers.js +4 -4
  72. package/dist/esm/grid/row/hooks/useRowSetting.js +76 -0
  73. package/dist/esm/grid/{setting/row → row/setting}/configs/uiV2.js +1 -1
  74. package/dist/esm/grid/{components → section}/Section.js +1 -1
  75. package/dist/esm/grid/{components → section}/Section.liquid.js +1 -1
  76. package/dist/esm/grid/{setting → section/setting}/Section.js +4 -4
  77. package/dist/esm/grid/setting/index.js +3 -3
  78. package/dist/esm/index.js +3 -3
  79. package/dist/esm/index.liquid.js +3 -3
  80. package/dist/esm/post-purchase/button/setting/configs/settings.js +21 -3
  81. package/dist/esm/post-purchase/button/setting/configs/uiV2.js +1 -1
  82. package/dist/esm/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  83. package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +24 -6
  84. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/uiV2.js +1 -1
  85. package/dist/esm/post-purchase/product/components/ProductOffer.js +3 -2
  86. package/dist/esm/post-purchase/product/settings/accept-button/configs/settings.js +21 -3
  87. package/dist/esm/post-purchase/product/settings/accept-button/configs/uiV2.js +1 -1
  88. package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +21 -3
  89. package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/uiV2.js +1 -1
  90. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +22 -5
  91. package/dist/esm/post-purchase/product/settings/product-quantity/configs/uiV2.js +6 -3
  92. package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +2 -1
  93. package/dist/esm/post-purchase/product/settings/product-variants/settings/settingsV2.js +15 -3
  94. package/dist/esm/post-purchase/utils/constants.js +20 -10
  95. package/dist/esm/product/components/Product.js +2 -1
  96. package/dist/esm/product/components/Product.liquid.js +2 -1
  97. package/dist/esm/product/components/ProductList.js +1 -1
  98. package/dist/esm/product/components/ProductList.liquid.js +1 -1
  99. package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +2 -2
  100. package/dist/esm/sticky/components/Sticky.js +1 -1
  101. package/dist/types/index.d.ts +27 -42
  102. package/package.json +2 -2
  103. package/dist/cjs/grid/components/Col.js +0 -44
  104. package/dist/cjs/grid/components/Row.liquid.js +0 -141
  105. package/dist/cjs/grid/hooks/useRowStyles.js +0 -153
  106. package/dist/esm/grid/components/Col.js +0 -40
  107. package/dist/esm/grid/components/Row.liquid.js +0 -137
  108. package/dist/esm/grid/hooks/useRowStyles.js +0 -151
  109. /package/dist/cjs/grid/{setting → col/setting}/Col.js +0 -0
  110. /package/dist/cjs/grid/{hooks → row/commons}/getInnerRadius.js +0 -0
  111. /package/dist/cjs/grid/{setting/row → row/setting}/Row.js +0 -0
  112. /package/dist/cjs/grid/{setting/row → row/setting}/configs/presets.js +0 -0
  113. /package/dist/cjs/grid/{setting/row → row/setting}/configs/settings.js +0 -0
  114. /package/dist/cjs/grid/{setting/row → row/setting}/configs/uiV1.js +0 -0
  115. /package/dist/cjs/grid/{setting/section → section/setting}/configs/settings.js +0 -0
  116. /package/dist/cjs/grid/{setting/section → section/setting}/configs/uiV1.js +0 -0
  117. /package/dist/cjs/grid/{setting/section → section/setting}/configs/uiV2.js +0 -0
  118. /package/dist/esm/grid/{setting → col/setting}/Col.js +0 -0
  119. /package/dist/esm/grid/{hooks → row/commons}/getInnerRadius.js +0 -0
  120. /package/dist/esm/grid/{setting/row → row/setting}/Row.js +0 -0
  121. /package/dist/esm/grid/{setting/row → row/setting}/configs/presets.js +0 -0
  122. /package/dist/esm/grid/{setting/row → row/setting}/configs/settings.js +0 -0
  123. /package/dist/esm/grid/{setting/row → row/setting}/configs/uiV1.js +0 -0
  124. /package/dist/esm/grid/{setting/section → section/setting}/configs/settings.js +0 -0
  125. /package/dist/esm/grid/{setting/section → section/setting}/configs/uiV1.js +0 -0
  126. /package/dist/esm/grid/{setting/section → section/setting}/configs/uiV2.js +0 -0
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var system = require('@gem-sdk/system');
4
+ var core = require('@gem-sdk/core');
5
+
6
+ const getData = (props)=>{
7
+ const { styles, builderProps } = props;
8
+ const stateData = system.createStateOrContext({
9
+ background: styles?.background,
10
+ uid: builderProps?.uid
11
+ });
12
+ return {
13
+ stateData: core.dataStringify(stateData).replaceAll("'", ''')
14
+ };
15
+ };
16
+
17
+ exports.getData = getData;
@@ -0,0 +1,102 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var core = require('@gem-sdk/core');
5
+ var getInnerRadius = require('./getInnerRadius.js');
6
+ var system = require('@gem-sdk/system');
7
+ var helpers = require('./helpers.js');
8
+
9
+ const getRowStyle = (rowProps)=>{
10
+ const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
11
+ const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
12
+ const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile } = styles ?? {};
13
+ const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
14
+ const childHasChildren = builderProps?.builderData?.childrens?.length;
15
+ const bgVideoAspectRatioStyle = {
16
+ ...core.makeStyleResponsive('aspect', {
17
+ desktop: '16/9'
18
+ })
19
+ };
20
+ const isRowEmpty = core.isEmptyChildren(children) || !childHasChildren;
21
+ const sizeStyles = helpers.createStyleObject(width, fullWidth);
22
+ const [wrapStyle, restStyle] = core.splitStyle([
23
+ 'pos',
24
+ 'top',
25
+ 'left',
26
+ 'bottom',
27
+ 'right',
28
+ 'z'
29
+ ], style);
30
+ const getGlobalStyles = ()=>{
31
+ return {
32
+ ...isSection ? restStyle : style,
33
+ ...core.makeStyleResponsive('cg', verticalGutter),
34
+ ...core.makeStyleResponsive('rg', verticalGutterMobile),
35
+ ...layout ? core.composeGridLayout(layout) : core.makeStyleResponsive('gtc', responsive),
36
+ ...core.makeStyleResponsive('w', sizeStyles.content)
37
+ };
38
+ };
39
+ const getPostPurchaseStyle = ()=>{
40
+ return {
41
+ '--mb': '0px',
42
+ '--mt': '0px',
43
+ ...core.makeStyleResponsive('cg', columnGap),
44
+ ...core.makeStyle({
45
+ pc: inlineAlignment
46
+ })
47
+ };
48
+ };
49
+ const getRowNormalStyle = (options)=>{
50
+ return {
51
+ ...core.getStyleBackgroundByDevice(background, options),
52
+ ...core.getGradientBgrStyleByDevice(background, {
53
+ desktop: true,
54
+ tablet: true,
55
+ mobile: true
56
+ }),
57
+ ...core.makeStyleResponsive('pc', horizontalAlign)
58
+ };
59
+ };
60
+ const getMarginByWidth = ()=>{
61
+ const isCustomizeMargin = isNotFullWidth && !isRowEmpty;
62
+ if (!isCustomizeMargin) return {};
63
+ return {
64
+ marginLeft: '0px',
65
+ marginRight: '0px'
66
+ };
67
+ };
68
+ const getRadiusStyleInner = ()=>{
69
+ return {
70
+ ...core.composeRadius(innerRadius)
71
+ };
72
+ };
73
+ const rowStyle = system.createStyle({
74
+ ...getGlobalStyles(),
75
+ ...getRowNormalStyle(),
76
+ ...getMarginByWidth(),
77
+ ...getPostPurchaseStyle()
78
+ });
79
+ const backgroundBoxStyle = system.createStyle({
80
+ ...getRadiusStyleInner()
81
+ });
82
+ const embedVideoStyle = system.createStyle({
83
+ ...bgVideoAspectRatioStyle,
84
+ pointerEvents: 'none',
85
+ transform: 'translateY(-50%)',
86
+ top: '50%'
87
+ });
88
+ const sectionStyle = system.createStyle({
89
+ ...wrapStyle,
90
+ ...core.makeStyleResponsive('w', sizeStyles.wrapper),
91
+ ...core.makeStyleResponsive('pl', sizeStyles.padding),
92
+ ...core.makeStyleResponsive('pr', sizeStyles.padding)
93
+ });
94
+ return {
95
+ embedVideoStyle,
96
+ backgroundBoxStyle,
97
+ rowStyle,
98
+ sectionStyle
99
+ };
100
+ };
101
+
102
+ exports.getRowStyle = getRowStyle;
@@ -32,7 +32,7 @@ const getStyleByDevice = (device, fullWidth, width)=>{
32
32
  };
33
33
  } else {
34
34
  return {
35
- contentWidth: `var(--g-ct-w, ${defaultWidth[device]})`,
35
+ contentWidth: undefined,
36
36
  wrapperWidth: `calc(var(--g-ct-w, ${defaultWidth[device]}) + 2 * var(--g-ct-p, 15px))`,
37
37
  wrapperPadding: 'var(--g-ct-p, 15px)'
38
38
  };
@@ -44,9 +44,9 @@ const createStyleObject = (width, fullWidth)=>{
44
44
  const mobileStyle = getStyleByDevice('mobile', fullWidth, width);
45
45
  return {
46
46
  content: {
47
- desktop: desktopStyle.contentWidth || '100%',
48
- tablet: tabletStyle.contentWidth || '100%',
49
- mobile: mobileStyle.contentWidth || '100%'
47
+ desktop: desktopStyle.contentWidth,
48
+ tablet: tabletStyle.contentWidth,
49
+ mobile: mobileStyle.contentWidth
50
50
  },
51
51
  wrapper: {
52
52
  desktop: desktopStyle.wrapperWidth,
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var core = require('@gem-sdk/core');
5
+ var system = require('@gem-sdk/system');
6
+ var useInView = require('../../../intersection-observer/useInView.js');
7
+
8
+ const useRowSettings = (rowProps)=>{
9
+ const { setting, styles, children, maxWidthWithEmptyChildren, builderAttrs } = rowProps;
10
+ const { isSection, lazy, layout, blockAlignment } = setting ?? {};
11
+ const { background } = styles ?? {};
12
+ const currentDevice = core.useCurrentDevice();
13
+ const [cacheHeightOutViewport, setCacheHeightOutViewport] = React.useState(500);
14
+ const mode = core.useEditorMode();
15
+ const pageType = core.usePageType();
16
+ const bgVideo = core.getValueByDevice(background, currentDevice);
17
+ const isRowEmpty = React.useMemo(()=>{
18
+ return core.isEmptyChildren(children);
19
+ }, [
20
+ children
21
+ ]);
22
+ const [ref, inView] = useInView.useInView({
23
+ initialInView: !lazy,
24
+ triggerOnce: true,
25
+ skip: !isSection,
26
+ onChange: (inView, node)=>{
27
+ if (mode == 'edit' && !inView && node) {
28
+ const computedStyle = getComputedStyle(node);
29
+ let height = node?.getBoundingClientRect().height;
30
+ height -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);
31
+ setCacheHeightOutViewport(height ?? 500);
32
+ }
33
+ }
34
+ });
35
+ const isRenderPlaceholderViewBox = React.useMemo(()=>!inView && mode == 'edit', [
36
+ inView,
37
+ mode
38
+ ]);
39
+ const isVisibilityContent = React.useMemo(()=>mode !== 'edit' && lazy && !inView, [
40
+ inView,
41
+ lazy,
42
+ mode
43
+ ]);
44
+ const getWidthForEmptyChildren = ()=>{
45
+ const isCustomizeWidth = maxWidthWithEmptyChildren && isRowEmpty && mode === 'edit';
46
+ if (!isCustomizeWidth) return {};
47
+ const display = core.getResponsiveValue(layout, 'display');
48
+ const displayByDevice = display[currentDevice];
49
+ return {
50
+ width: displayByDevice === 'fit' ? 'fit-content' : '400px'
51
+ };
52
+ };
53
+ const rowClassEditorOnly = system.createClass({
54
+ ...getWidthForEmptyChildren,
55
+ 'gp-content-visibility-hidden': isVisibilityContent
56
+ });
57
+ const postPurchaseVerticalAlign = ()=>{
58
+ return {
59
+ desktop: blockAlignment,
60
+ tablet: blockAlignment,
61
+ mobile: blockAlignment
62
+ };
63
+ };
64
+ return {
65
+ ref,
66
+ isRowEmpty,
67
+ cacheHeightOutViewport,
68
+ bgVideo,
69
+ rowClassEditorOnly,
70
+ isRenderPlaceholderViewBox,
71
+ builderAttrs,
72
+ children,
73
+ isPostPurchase: pageType === 'POST_PURCHASE',
74
+ postPurchaseVerticalAlign
75
+ };
76
+ };
77
+
78
+ exports.useRowSettings = useRowSettings;
@@ -29,7 +29,7 @@ const SettingUIV2 = [
29
29
  },
30
30
  {
31
31
  label: {
32
- en: 'Column Spacing'
32
+ en: 'Column spacing'
33
33
  },
34
34
  conditionDisplay: `pageType !== "POST_PURCHASE" && childrens > 1`,
35
35
  controls: [
@@ -4,7 +4,7 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
- var Row = require('./Row.js');
7
+ var Row = require('../row/Row.js');
8
8
  var Loading = require('../../common/components/Loading.js');
9
9
  var React = require('react');
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Row_liquid = require('./Row.liquid.js');
5
+ var Row_liquid = require('../row/Row.liquid.js');
6
6
 
7
7
  const Section = (props)=>{
8
8
  return Row_liquid.default({
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Row = require('./row/Row.js');
6
- var settings = require('./section/configs/settings.js');
7
- var uiV1 = require('./section/configs/uiV1.js');
8
- var uiV2 = require('./section/configs/uiV2.js');
5
+ var Row = require('../../row/setting/Row.js');
6
+ var settings = require('./configs/settings.js');
7
+ var uiV1 = require('./configs/uiV1.js');
8
+ var uiV2 = require('./configs/uiV2.js');
9
9
 
10
10
  const config = {
11
11
  ...Row.default,
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Root = require('./Root.js');
6
- var Section = require('./Section.js');
7
- var Col = require('./Col.js');
8
- var Row = require('./row/Row.js');
6
+ var Section = require('../section/setting/Section.js');
7
+ var Row = require('../row/setting/Row.js');
8
+ var Col = require('../col/setting/Col.js');
9
9
 
10
10
  var gridSetting = {
11
11
  Root: Root.default,
package/dist/cjs/index.js CHANGED
@@ -38,9 +38,9 @@ var CollectionPaginator = require('./collection/components/CollectionPaginator.j
38
38
  var index$8 = require('./countdown-timer/setting/index.js');
39
39
  var Countdown = require('./countdown-timer/components/Countdown.js');
40
40
  var index$9 = require('./grid/setting/index.js');
41
- var Col = require('./grid/components/Col.js');
42
- var Row = require('./grid/components/Row.js');
43
- var Section = require('./grid/components/Section.js');
41
+ var Col = require('./grid/col/Col.js');
42
+ var Row = require('./grid/row/Row.js');
43
+ var Section = require('./grid/section/Section.js');
44
44
  var Root = require('./grid/components/Root.js');
45
45
  var index$a = require('./heading/setting/index.js');
46
46
  var Heading = require('./heading/Heading.js');
@@ -4,9 +4,9 @@
4
4
  var Button_liquid = require('./button/components/Button.liquid.js');
5
5
  var ButtonV2_liquid = require('./button/components/v2/ButtonV2.liquid.js');
6
6
  var Coupon_liquid = require('./coupon/components/Coupon.liquid.js');
7
- var Col_liquid = require('./grid/components/Col.liquid.js');
8
- var Row_liquid = require('./grid/components/Row.liquid.js');
9
- var Section_liquid = require('./grid/components/Section.liquid.js');
7
+ var Col_liquid = require('./grid/col/Col.liquid.js');
8
+ var Row_liquid = require('./grid/row/Row.liquid.js');
9
+ var Section_liquid = require('./grid/section/Section.liquid.js');
10
10
  var Root_liquid = require('./grid/components/Root.liquid.js');
11
11
  var Icon_liquid = require('./icon/components/Icon.liquid.js');
12
12
  var Text_liquid = require('./text/components/Text.liquid.js');
@@ -49,13 +49,14 @@ const DeclineButtonSettings = [
49
49
  controls: [
50
50
  {
51
51
  id: 'width',
52
- type: 'input:unit-width',
52
+ type: 'dropdown:input',
53
53
  label: 'Width',
54
- min: 0,
54
+ inputType: 'number',
55
55
  units: [
56
56
  'px',
57
57
  '%'
58
58
  ],
59
+ hideUnit: false,
59
60
  devices: {
60
61
  desktop: {
61
62
  default: '100%'
@@ -66,7 +67,24 @@ const DeclineButtonSettings = [
66
67
  mobile: {
67
68
  default: '100%'
68
69
  }
69
- }
70
+ },
71
+ displayOptions: [
72
+ {
73
+ label: 'Fit content',
74
+ value: 'Auto',
75
+ showValue: true
76
+ },
77
+ {
78
+ label: 'Full',
79
+ value: '100%',
80
+ showValue: true
81
+ },
82
+ {
83
+ label: 'Default',
84
+ value: 'default',
85
+ showValue: true
86
+ }
87
+ ]
70
88
  },
71
89
  {
72
90
  id: 'typo',
@@ -68,7 +68,7 @@ const SettingUIV2 = [
68
68
  options: {
69
69
  labelVariant: 'primary',
70
70
  fullWidth: true,
71
- disableMessage: 'This option is disabled because the width is set to 100%'
71
+ disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
72
72
  },
73
73
  layout: 'horizontal'
74
74
  }
@@ -7,7 +7,7 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
  var system = require('@gem-sdk/system');
8
8
  require('@gem-sdk/core');
9
9
  require('react');
10
- var Row = require('../../../grid/components/Row.js');
10
+ var Row = require('../../../grid/row/Row.js');
11
11
  var getClasses = require('./common/getClasses.js');
12
12
  var getStyles = require('./common/getStyles.js');
13
13
 
@@ -229,24 +229,42 @@ const CalloutBoxSettings = [
229
229
  },
230
230
  {
231
231
  id: 'width',
232
- type: 'input:unit-width',
232
+ type: 'dropdown:input',
233
233
  label: 'Width',
234
- min: 0,
234
+ inputType: 'number',
235
235
  units: [
236
236
  'px',
237
237
  '%'
238
238
  ],
239
+ hideUnit: false,
239
240
  devices: {
240
241
  desktop: {
241
- default: undefined
242
+ default: '100%'
242
243
  },
243
244
  tablet: {
244
- default: undefined
245
+ default: '100%'
245
246
  },
246
247
  mobile: {
247
- default: undefined
248
+ default: '100%'
248
249
  }
249
- }
250
+ },
251
+ displayOptions: [
252
+ {
253
+ label: 'Fit content',
254
+ value: 'Auto',
255
+ showValue: true
256
+ },
257
+ {
258
+ label: 'Full',
259
+ value: '100%',
260
+ showValue: true
261
+ },
262
+ {
263
+ label: 'Default',
264
+ value: 'default',
265
+ showValue: true
266
+ }
267
+ ]
250
268
  },
251
269
  {
252
270
  id: 'verticalGutter',
@@ -111,7 +111,7 @@ const SettingUIV2 = [
111
111
  options: {
112
112
  labelVariant: 'primary',
113
113
  fullWidth: true,
114
- disableMessage: `This option is disabled because the width is set to 100%`
114
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
115
115
  },
116
116
  setting: {
117
117
  id: 'align'
@@ -6,9 +6,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@gem-sdk/core');
8
8
  var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
9
- var React = require('react');
10
- var Row = require('../../../grid/components/Row.js');
9
+ require('@gem-sdk/system');
10
+ var Row = require('../../../grid/row/Row.js');
11
11
  var Loading = require('../../../common/components/Loading.js');
12
+ var React = require('react');
12
13
  var helper = require('../../utils/helper.js');
13
14
  var index = require('../helpers/index.js');
14
15
  var ProductOfferPlaceholder = require('../constants/ProductOfferPlaceholder.js');
@@ -55,13 +55,14 @@ const AcceptButtonSettings = [
55
55
  controls: [
56
56
  {
57
57
  id: 'width',
58
- type: 'input:unit-width',
58
+ type: 'dropdown:input',
59
59
  label: 'Width',
60
- min: 0,
60
+ inputType: 'number',
61
61
  units: [
62
62
  'px',
63
63
  '%'
64
64
  ],
65
+ hideUnit: false,
65
66
  devices: {
66
67
  desktop: {
67
68
  default: '100%'
@@ -72,7 +73,24 @@ const AcceptButtonSettings = [
72
73
  mobile: {
73
74
  default: '100%'
74
75
  }
75
- }
76
+ },
77
+ displayOptions: [
78
+ {
79
+ label: 'Fit content',
80
+ value: 'Auto',
81
+ showValue: true
82
+ },
83
+ {
84
+ label: 'Full',
85
+ value: '100%',
86
+ showValue: true
87
+ },
88
+ {
89
+ label: 'Default',
90
+ value: 'default',
91
+ showValue: true
92
+ }
93
+ ]
76
94
  },
77
95
  {
78
96
  id: 'typo',
@@ -73,7 +73,7 @@ const SettingUIV2 = [
73
73
  options: {
74
74
  labelVariant: 'primary',
75
75
  fullWidth: true,
76
- disableMessage: 'This option is disabled because the width is set to 100%'
76
+ disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
77
77
  },
78
78
  layout: 'horizontal'
79
79
  }
@@ -161,13 +161,14 @@ const ProductPriceBreakdownSettings = [
161
161
  },
162
162
  {
163
163
  id: 'width',
164
- type: 'input:unit-width',
164
+ type: 'dropdown:input',
165
165
  label: 'Width',
166
- min: 0,
166
+ inputType: 'number',
167
167
  units: [
168
168
  'px',
169
169
  '%'
170
170
  ],
171
+ hideUnit: false,
171
172
  devices: {
172
173
  desktop: {
173
174
  default: '100%'
@@ -178,7 +179,24 @@ const ProductPriceBreakdownSettings = [
178
179
  mobile: {
179
180
  default: '100%'
180
181
  }
181
- }
182
+ },
183
+ displayOptions: [
184
+ {
185
+ label: 'Fit content',
186
+ value: 'Auto',
187
+ showValue: true
188
+ },
189
+ {
190
+ label: 'Full',
191
+ value: '100%',
192
+ showValue: true
193
+ },
194
+ {
195
+ label: 'Default',
196
+ value: 'default',
197
+ showValue: true
198
+ }
199
+ ]
182
200
  },
183
201
  {
184
202
  type: 'select',
@@ -216,7 +216,7 @@ const SettingUIV2 = [
216
216
  options: {
217
217
  labelVariant: 'primary',
218
218
  fullWidth: true,
219
- disableMessage: 'This option is disabled because the width is set to 100%'
219
+ disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
220
220
  },
221
221
  layout: 'horizontal'
222
222
  }
@@ -41,14 +41,14 @@ const ProductQuantitySettings = [
41
41
  },
42
42
  {
43
43
  id: 'inputWidth',
44
- type: 'input:unit-width',
45
- label: 'Input Width',
46
- min: 0,
44
+ type: 'dropdown:input',
45
+ label: 'Width',
46
+ inputType: 'number',
47
47
  units: [
48
48
  'px',
49
49
  '%'
50
50
  ],
51
- hide: true,
51
+ hideUnit: false,
52
52
  devices: {
53
53
  desktop: {
54
54
  default: '100%'
@@ -59,7 +59,24 @@ const ProductQuantitySettings = [
59
59
  mobile: {
60
60
  default: '100%'
61
61
  }
62
- }
62
+ },
63
+ displayOptions: [
64
+ {
65
+ label: 'Fit content',
66
+ value: 'Auto',
67
+ showValue: true
68
+ },
69
+ {
70
+ label: 'Full',
71
+ value: '100%',
72
+ showValue: true
73
+ },
74
+ {
75
+ label: 'Default',
76
+ value: 'default',
77
+ showValue: true
78
+ }
79
+ ]
63
80
  }
64
81
  ]
65
82
  },
@@ -22,16 +22,19 @@ const SettingUIV2 = [
22
22
  },
23
23
  iconName: 'polaris-text-block',
24
24
  getValueFromSettingID: 'title',
25
+ disableClearMessage: `This label title is needed for customers <br> to adjust the product's quantity`,
25
26
  controls: [
26
27
  {
27
28
  label: {
28
29
  en: 'Content'
29
30
  },
30
- isHideClear: true,
31
31
  setting: {
32
32
  id: 'title'
33
33
  },
34
- layout: 'vertical'
34
+ layout: 'vertical',
35
+ options: {
36
+ clearButton: false
37
+ }
35
38
  }
36
39
  ]
37
40
  }
@@ -68,7 +71,7 @@ const SettingUIV2 = [
68
71
  options: {
69
72
  labelVariant: 'primary',
70
73
  fullWidth: true,
71
- disableMessage: 'Align horizontal is disabled when the width is 100%'
74
+ disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
72
75
  },
73
76
  layout: 'horizontal'
74
77
  }
@@ -18,7 +18,7 @@ const ProductVariantsSettingUIV2 = [
18
18
  {
19
19
  type: 'control',
20
20
  label: {
21
- en: 'Options price'
21
+ en: "Option's price"
22
22
  },
23
23
  setting: {
24
24
  id: 'price'
@@ -148,6 +148,7 @@ const ProductVariantsSettingUIV2 = [
148
148
  ]
149
149
  },
150
150
  {
151
+ conditionDisplay: "width !== '100%'",
151
152
  controls: [
152
153
  {
153
154
  label: {