@gem-sdk/components 2.0.0-dev.593 → 2.0.0-dev.595

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.
@@ -43,7 +43,7 @@ const AccordionItem = (props)=>{
43
43
  const composeIconPaddingGlobalSize = system.createStyle(styles.getIconGlobalSize(iconGlobalSize));
44
44
  const composeGapStyles = system.createStyle(styles.getGapStyles(iconGlobalSize, alignment));
45
45
  const inlineFlexClass = system.createClass(core.composeClasses('gp-inline-flex'));
46
- const composeLayoutTextClasses = system.createClass(classes.getLayoutTextClasses);
46
+ const composeLayoutIconClasses = system.createClass(classes.getLayoutIconClasses);
47
47
  const composeLayoutTextStyles = system.createStyle(styles.getLayoutTextStyles(composeIconColor, configIconSize));
48
48
  const composeRenderChildrenClasses = system.createClass(classes.getRenderChildrenClasses(props.parentStyle, {
49
49
  isShow,
@@ -78,7 +78,7 @@ const AccordionItem = (props)=>{
78
78
  className: composeDropdownClasses,
79
79
  style: composeDropdownStyles,
80
80
  children: [
81
- system.If(Boolean(makeIcon), /*#__PURE__*/ jsxRuntime.jsx("div", {
81
+ system.If(!!makeIcon, /*#__PURE__*/ jsxRuntime.jsx("div", {
82
82
  className: composeIconClasses,
83
83
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
84
84
  style: composeIconRotateStyles,
@@ -92,13 +92,13 @@ const AccordionItem = (props)=>{
92
92
  className: composeGapClasses,
93
93
  style: composeGapStyles,
94
94
  children: [
95
- system.If(Boolean(layoutHeader === 'before-text'), /*#__PURE__*/ jsxRuntime.jsx("div", {
95
+ system.If(layoutHeader === 'before-text', /*#__PURE__*/ jsxRuntime.jsx("div", {
96
96
  className: inlineFlexClass,
97
97
  style: {
98
98
  ...composeIconPaddingGlobalSize
99
99
  },
100
100
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
101
- className: composeLayoutTextClasses,
101
+ className: composeLayoutIconClasses,
102
102
  style: composeLayoutTextStyles,
103
103
  dangerouslySetInnerHTML: {
104
104
  __html: childrenIcon ?? ''
@@ -121,13 +121,13 @@ const AccordionItem = (props)=>{
121
121
  },
122
122
  className: composeTextClasses
123
123
  }),
124
- system.If(Boolean(layoutHeader === 'after-text'), /*#__PURE__*/ jsxRuntime.jsx("div", {
124
+ system.If(layoutHeader === 'after-text', /*#__PURE__*/ jsxRuntime.jsx("div", {
125
125
  className: inlineFlexClass,
126
126
  style: {
127
127
  ...composeIconPaddingGlobalSize
128
128
  },
129
129
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
130
- className: composeLayoutTextClasses,
130
+ className: composeLayoutIconClasses,
131
131
  style: composeLayoutTextStyles,
132
132
  dangerouslySetInnerHTML: {
133
133
  __html: childrenIcon ?? ''
@@ -38,7 +38,7 @@ const AccordionItem = (props)=>{
38
38
  const composeIconRotateStyles = system.createStyle(styles.getIconRotateStyles(props.parentStyle, isShow, iconCollapseSize));
39
39
  const composeGapStyles = system.createStyle(styles.getGapStyles(iconGlobalSize, alignment));
40
40
  const inlineFlexClass = system.createClass(core.composeClasses('gp-inline-flex'));
41
- const composeLayoutTextClasses = system.createClass(classes.getLayoutTextClasses);
41
+ const composeLayoutIconClasses = system.createClass(classes.getLayoutIconClasses);
42
42
  const composeLayoutTextStyles = system.createStyle(styles.getLayoutTextStyles(composeIconColor, configIconSize));
43
43
  const composeRenderChildrenClasses = system.createClass(classes.getRenderChildrenClasses(props.parentStyle, {
44
44
  isShow,
@@ -78,7 +78,7 @@ const AccordionItem = (props)=>{
78
78
  ...composeIconPaddingGlobalSize
79
79
  }}">
80
80
  <span
81
- class="${composeLayoutTextClasses}"
81
+ class="${composeLayoutIconClasses}"
82
82
  style="${composeLayoutTextStyles}">
83
83
  ${childrenIcon ?? ''}</span>
84
84
  </div>
@@ -100,7 +100,7 @@ const AccordionItem = (props)=>{
100
100
  ...composeIconPaddingGlobalSize
101
101
  }}">
102
102
  <span
103
- class="${composeLayoutTextClasses}"
103
+ class="${composeLayoutIconClasses}"
104
104
  style="${composeLayoutTextStyles}">
105
105
  ${childrenIcon ?? ''}</span>
106
106
  </div>
@@ -19,7 +19,7 @@ const getIconRotateClasses = (styles, extraData)=>{
19
19
  return core.composeClasses(core.cls({
20
20
  '-gp-rotate-90': isShow === true && iconSvg !== 'plus' && !iconExpand,
21
21
  'gp-rotate-90': isShow === false && !iconCollapse
22
- }, 'group-hover:[color:var(--icon-hover-color)] gp-collapsible-icon gp-accordion-item_icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden gp-transition-all gp-duration-200 [&>svg]:!gp-h-[var(--height-iconCollapseSize)] [&>svg]:!gp-w-full', isShow ? core.getGlobalColorClass('text', color?.active) : core.getGlobalColorStateClass('text', color)));
22
+ }, 'group-hover:[color:var(--icon-expand-hover-color)] gp-collapsible-icon gp-accordion-item_icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden gp-transition-all gp-duration-200 [&>svg]:!gp-h-[var(--height-iconCollapseSize)] [&>svg]:!gp-w-full', isShow ? core.getGlobalColorClass('text', color?.active) : core.getGlobalColorStateClass('text', color)));
23
23
  };
24
24
  const getDropdownClasses = (styles, extraData)=>{
25
25
  const { isShow, uniqueId, makeIcon } = extraData || {};
@@ -33,7 +33,7 @@ const getDropdownClasses = (styles, extraData)=>{
33
33
  };
34
34
  const getContentClasses = (parentUid)=>core.composeClasses(core.cls(`${parentUid}`, 'gp-overflow-hidden', `gp-child-item-${parentUid}`, 'gp-accordion-item'));
35
35
  const getGapClasses = core.composeClasses('gp-flex gp-w-full gp-items-center gp-break-all');
36
- const getLayoutTextClasses = core.composeClasses('group-hover:[color:var(--icon-hover-color)] [color:var(--icon-hover-color)] [color:var(--icon-active-color)] gp-icon gp-inline-flex header-icon gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-configIconSize)] [&>svg]:!gp-w-full');
36
+ const getLayoutIconClasses = core.composeClasses('group-hover:[color:var(--icon-hover-color)] [color:var(--icon-hover-color)] [color:var(--icon-active-color)] gp-icon gp-inline-flex header-icon gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-configIconSize)] [&>svg]:!gp-w-full');
37
37
  const getRenderChildrenClasses = (styles, extraData)=>{
38
38
  const { isShow, hasTransitionedIn, isMounted } = extraData || {};
39
39
  const { itemContentSpacing, contentSizePadding } = styles ?? {};
@@ -51,5 +51,5 @@ exports.getGapClasses = getGapClasses;
51
51
  exports.getIconClasses = getIconClasses;
52
52
  exports.getIconRotateClasses = getIconRotateClasses;
53
53
  exports.getItemContainerClasses = getItemContainerClasses;
54
- exports.getLayoutTextClasses = getLayoutTextClasses;
54
+ exports.getLayoutIconClasses = getLayoutIconClasses;
55
55
  exports.getRenderChildrenClasses = getRenderChildrenClasses;
@@ -28,8 +28,10 @@ const getContainerStyles = (style, styles)=>{
28
28
  const widthHeightSizeControl = (widthHeightSize)=>core.makeGlobalSize(widthHeightSize);
29
29
  const widthStyle = (width, fullWidth, widthHeightSize)=>widthHeightSizeControl(widthHeightSize).width['--w'] ? widthHeightSizeControl(widthHeightSize).width : core.makeStyleResponsive('w', core.makeWidth(width, fullWidth));
30
30
  const getItemContainerStyles = (styles, isShow)=>{
31
- const { borderContent, backgroundContent, roundedContent, accordionShadow, width, fullWidth, widthHeightSize, iconColor } = styles ?? {};
31
+ const { borderContent, backgroundContent, roundedContent, accordionShadow, width, fullWidth, widthHeightSize, iconColor, color } = styles ?? {};
32
32
  return {
33
+ '--icon-expand-hover-color': isShow ? color?.active : color?.hover,
34
+ '--icon-expand-active-color': color?.active,
33
35
  '--icon-hover-color': isShow ? iconColor?.active : iconColor?.hover,
34
36
  '--icon-active-color': iconColor?.active,
35
37
  ...widthStyle(width, fullWidth, widthHeightSize),
@@ -63,6 +65,7 @@ const composePosition = (iconPosition)=>{
63
65
  const getDropdownStyles = (styles, extraData)=>{
64
66
  const { headerContentPadding, widthHeightSize, itemHeaderSpacing, bgColor, textColor, headerBorder } = styles ?? {};
65
67
  const { isShow, iconPosition } = extraData ?? {};
68
+ console.log('handleConvertBorderWidth(headerBorder)', core.handleConvertBorderWidth(headerBorder));
66
69
  return {
67
70
  ...headerContentPadding && headerContentPaddingSize(headerContentPadding).padding,
68
71
  ...!itemHeaderSpacing?.type && !headerContentPadding ? core.composeSize(itemHeaderSpacing?.custom) : {},
@@ -85,12 +88,12 @@ const getDropdownStyles = (styles, extraData)=>{
85
88
  };
86
89
  };
87
90
  const getIconRotateStyles = (styles, isShow, iconCollapseSize)=>{
88
- const { iconColor } = styles ?? {};
91
+ const { color } = styles ?? {};
89
92
  return {
90
93
  ...isShow ? core.makeStyle({
91
- c: core.getSingleColorVariable(iconColor?.active ?? iconColor?.normal)
94
+ c: core.getSingleColorVariable(color?.active ?? color?.normal)
92
95
  }) : {
93
- ...core.getGlobalColorStateStyle('c', iconColor)
96
+ ...core.getGlobalColorStateStyle('c', color)
94
97
  },
95
98
  width: `${iconCollapseSize ?? 16}px`,
96
99
  height: `${iconCollapseSize ?? 16}px`
@@ -400,7 +400,7 @@ const AccordionSettings = [
400
400
  },
401
401
  {
402
402
  id: 'headerBorder',
403
- type: 'border',
403
+ type: 'border-v2',
404
404
  default: {
405
405
  normal: {
406
406
  border: 'solid',
@@ -409,22 +409,6 @@ const AccordionSettings = [
409
409
  color: '#121212',
410
410
  isCustom: true,
411
411
  borderWidth: 'Mixed'
412
- },
413
- hover: {
414
- border: 'solid',
415
- width: '0px 0px 1px 0px',
416
- position: 'bottom',
417
- color: '#121212',
418
- isCustom: true,
419
- borderWidth: 'Mixed'
420
- },
421
- active: {
422
- border: 'solid',
423
- width: '0px 0px 1px 0px',
424
- position: 'bottom',
425
- color: '#121212',
426
- isCustom: true,
427
- borderWidth: 'Mixed'
428
412
  }
429
413
  },
430
414
  state: {
@@ -621,14 +605,14 @@ const AccordionSettings = [
621
605
  id: 'accordionShadow',
622
606
  type: 'shadow-v2',
623
607
  label: 'Button Shadow',
624
- default: {},
625
608
  compoDefaultValue: {
626
609
  type: 'shadow-1',
627
610
  distance: '4px',
628
611
  blur: '12px',
629
612
  spread: '0px',
630
613
  color: '#121212',
631
- angle: 90
614
+ angle: 90,
615
+ enable: true
632
616
  }
633
617
  }
634
618
  ]
@@ -51,6 +51,56 @@ const SettingUIV2 = [
51
51
  },
52
52
  setting: {
53
53
  id: 'accordionShadow'
54
+ },
55
+ compoDefaultValue: {
56
+ type: 'shadow-1',
57
+ distance: '4px',
58
+ blur: '12px',
59
+ spread: '0px',
60
+ color: '#121212',
61
+ angle: 90,
62
+ enable: true
63
+ },
64
+ options: {
65
+ updateFields: [
66
+ {
67
+ field: 'enable',
68
+ settingId: 'hasActiveShadow'
69
+ }
70
+ ]
71
+ },
72
+ controlChangeTrigger: {
73
+ settings: [
74
+ {
75
+ condition: `accordionShadow.enable === true`,
76
+ source: [
77
+ 'accordionShadow',
78
+ 'hasActiveShadow'
79
+ ],
80
+ action: {
81
+ controlId: 'hasActiveShadow',
82
+ groupType: 'style',
83
+ controlType: 'style',
84
+ newValue: true
85
+ }
86
+ },
87
+ {
88
+ condition: `accordionShadow.enable === false`,
89
+ source: [
90
+ 'accordionShadow',
91
+ 'hasActiveShadow'
92
+ ],
93
+ action: {
94
+ controlId: 'hasActiveShadow',
95
+ groupType: 'style',
96
+ controlType: 'style',
97
+ newValue: false
98
+ }
99
+ }
100
+ ],
101
+ options: {
102
+ noRecordHistory: true
103
+ }
54
104
  }
55
105
  }
56
106
  ]
@@ -8,7 +8,7 @@ var helpers = require('./helpers.js');
8
8
  var helper = require('../../../post-purchase/utils/helper.js');
9
9
 
10
10
  const getRowStyle = (rowProps)=>{
11
- const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
11
+ const { children, setting, builderProps, styles, style, advanced, isNotFullWidth, parentStyle } = rowProps;
12
12
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
13
13
  const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
14
14
  const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
@@ -93,7 +93,8 @@ const getRowStyle = (rowProps)=>{
93
93
  ...getGlobalStyles(),
94
94
  ...getRowNormalStyle(),
95
95
  ...getMarginByWidth(),
96
- ...isPostPurchase ? getPostPurchaseStyle() : {}
96
+ ...isPostPurchase ? getPostPurchaseStyle() : {},
97
+ ...setting?.sameHeightSubgridContainer && parentStyle
97
98
  });
98
99
  const backgroundBoxStyle = system.createStyle({
99
100
  ...getRadiusStyleInner()
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var React = require('react');
6
7
  var core = require('@gem-sdk/core');
7
8
  var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
8
9
  var getStyle = require('./common/getStyle.js');
@@ -23,17 +24,21 @@ const ProductListGridLayout = (props)=>{
23
24
  product: product,
24
25
  readOnly: true,
25
26
  children: /*#__PURE__*/ jsxRuntime.jsx("div", {
27
+ ...mode === 'edit' ? getAttrProductItemEditor(product?.baseID) : {},
28
+ className: productItemClass,
26
29
  style: {
27
- ...productItemStyle
30
+ '--grchild': setting?.sameHeight ? generateGridRowArray?.[index]?.gridRow : undefined,
31
+ '--mbchild': generateGridRowArray?.[index]?.marginBottom
28
32
  },
29
- children: /*#__PURE__*/ jsxRuntime.jsx("div", {
30
- ...mode === 'edit' ? getAttrProductItemEditor(product?.baseID) : {},
31
- className: productItemClass,
32
- style: {
33
- '--grchild': setting?.sameHeight ? generateGridRowArray?.[index]?.gridRow : undefined,
34
- '--mbchild': generateGridRowArray?.[index]?.marginBottom
35
- },
36
- children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
33
+ children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : React.Children.map(children, (el)=>{
34
+ if (/*#__PURE__*/ React.isValidElement(el)) {
35
+ return /*#__PURE__*/ React.createElement(el.type, {
36
+ ...el.props,
37
+ parentStyle: productItemStyle,
38
+ key: el.key
39
+ });
40
+ }
41
+ return null;
37
42
  })
38
43
  })
39
44
  }, product?.baseID))
@@ -7,7 +7,7 @@ import Text from '../../text/components/Text.js';
7
7
  import useAccordionItem from '../hooks/useAccordionItem.js';
8
8
  import { createClass, createStyle, If } from '@gem-sdk/system';
9
9
  import { getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getIconGlobalSize, getGapStyles, getLayoutTextStyles, getRenderChildrenStyles } from './common/styles.js';
10
- import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutTextClasses, getRenderChildrenClasses } from './common/classes.js';
10
+ import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutIconClasses, getRenderChildrenClasses } from './common/classes.js';
11
11
  import { getParentSettings, MINIMUM_CHILD, BODY_CHILD_INDEX } from './common/index.js';
12
12
 
13
13
  const AccordionItem = (props)=>{
@@ -39,7 +39,7 @@ const AccordionItem = (props)=>{
39
39
  const composeIconPaddingGlobalSize = createStyle(getIconGlobalSize(iconGlobalSize));
40
40
  const composeGapStyles = createStyle(getGapStyles(iconGlobalSize, alignment));
41
41
  const inlineFlexClass = createClass(composeClasses('gp-inline-flex'));
42
- const composeLayoutTextClasses = createClass(getLayoutTextClasses);
42
+ const composeLayoutIconClasses = createClass(getLayoutIconClasses);
43
43
  const composeLayoutTextStyles = createStyle(getLayoutTextStyles(composeIconColor, configIconSize));
44
44
  const composeRenderChildrenClasses = createClass(getRenderChildrenClasses(props.parentStyle, {
45
45
  isShow,
@@ -74,7 +74,7 @@ const AccordionItem = (props)=>{
74
74
  className: composeDropdownClasses,
75
75
  style: composeDropdownStyles,
76
76
  children: [
77
- If(Boolean(makeIcon), /*#__PURE__*/ jsx("div", {
77
+ If(!!makeIcon, /*#__PURE__*/ jsx("div", {
78
78
  className: composeIconClasses,
79
79
  children: /*#__PURE__*/ jsx("span", {
80
80
  style: composeIconRotateStyles,
@@ -88,13 +88,13 @@ const AccordionItem = (props)=>{
88
88
  className: composeGapClasses,
89
89
  style: composeGapStyles,
90
90
  children: [
91
- If(Boolean(layoutHeader === 'before-text'), /*#__PURE__*/ jsx("div", {
91
+ If(layoutHeader === 'before-text', /*#__PURE__*/ jsx("div", {
92
92
  className: inlineFlexClass,
93
93
  style: {
94
94
  ...composeIconPaddingGlobalSize
95
95
  },
96
96
  children: /*#__PURE__*/ jsx("span", {
97
- className: composeLayoutTextClasses,
97
+ className: composeLayoutIconClasses,
98
98
  style: composeLayoutTextStyles,
99
99
  dangerouslySetInnerHTML: {
100
100
  __html: childrenIcon ?? ''
@@ -117,13 +117,13 @@ const AccordionItem = (props)=>{
117
117
  },
118
118
  className: composeTextClasses
119
119
  }),
120
- If(Boolean(layoutHeader === 'after-text'), /*#__PURE__*/ jsx("div", {
120
+ If(layoutHeader === 'after-text', /*#__PURE__*/ jsx("div", {
121
121
  className: inlineFlexClass,
122
122
  style: {
123
123
  ...composeIconPaddingGlobalSize
124
124
  },
125
125
  children: /*#__PURE__*/ jsx("span", {
126
- className: composeLayoutTextClasses,
126
+ className: composeLayoutIconClasses,
127
127
  style: composeLayoutTextStyles,
128
128
  dangerouslySetInnerHTML: {
129
129
  __html: childrenIcon ?? ''
@@ -2,7 +2,7 @@ import { composeClasses, template, RenderChildren } from '@gem-sdk/core';
2
2
  import Text from '../../text/components/Text.liquid.js';
3
3
  import { getParentSettings, getSettingItemLiquid, MINIMUM_CHILD, BODY_CHILD_INDEX } from './common/index.js';
4
4
  import { createClass, createStyle, If } from '@gem-sdk/system';
5
- import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutTextClasses, getRenderChildrenClasses } from './common/classes.js';
5
+ import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutIconClasses, getRenderChildrenClasses } from './common/classes.js';
6
6
  import { getIconGlobalSize, getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getGapStyles, getLayoutTextStyles, getTemplateRow, getRenderChildrenStyles } from './common/styles.js';
7
7
 
8
8
  const AccordionItem = (props)=>{
@@ -34,7 +34,7 @@ const AccordionItem = (props)=>{
34
34
  const composeIconRotateStyles = createStyle(getIconRotateStyles(props.parentStyle, isShow, iconCollapseSize));
35
35
  const composeGapStyles = createStyle(getGapStyles(iconGlobalSize, alignment));
36
36
  const inlineFlexClass = createClass(composeClasses('gp-inline-flex'));
37
- const composeLayoutTextClasses = createClass(getLayoutTextClasses);
37
+ const composeLayoutIconClasses = createClass(getLayoutIconClasses);
38
38
  const composeLayoutTextStyles = createStyle(getLayoutTextStyles(composeIconColor, configIconSize));
39
39
  const composeRenderChildrenClasses = createClass(getRenderChildrenClasses(props.parentStyle, {
40
40
  isShow,
@@ -74,7 +74,7 @@ const AccordionItem = (props)=>{
74
74
  ...composeIconPaddingGlobalSize
75
75
  }}">
76
76
  <span
77
- class="${composeLayoutTextClasses}"
77
+ class="${composeLayoutIconClasses}"
78
78
  style="${composeLayoutTextStyles}">
79
79
  ${childrenIcon ?? ''}</span>
80
80
  </div>
@@ -96,7 +96,7 @@ const AccordionItem = (props)=>{
96
96
  ...composeIconPaddingGlobalSize
97
97
  }}">
98
98
  <span
99
- class="${composeLayoutTextClasses}"
99
+ class="${composeLayoutIconClasses}"
100
100
  style="${composeLayoutTextStyles}">
101
101
  ${childrenIcon ?? ''}</span>
102
102
  </div>
@@ -17,7 +17,7 @@ const getIconRotateClasses = (styles, extraData)=>{
17
17
  return composeClasses(cls({
18
18
  '-gp-rotate-90': isShow === true && iconSvg !== 'plus' && !iconExpand,
19
19
  'gp-rotate-90': isShow === false && !iconCollapse
20
- }, 'group-hover:[color:var(--icon-hover-color)] gp-collapsible-icon gp-accordion-item_icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden gp-transition-all gp-duration-200 [&>svg]:!gp-h-[var(--height-iconCollapseSize)] [&>svg]:!gp-w-full', isShow ? getGlobalColorClass('text', color?.active) : getGlobalColorStateClass('text', color)));
20
+ }, 'group-hover:[color:var(--icon-expand-hover-color)] gp-collapsible-icon gp-accordion-item_icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden gp-transition-all gp-duration-200 [&>svg]:!gp-h-[var(--height-iconCollapseSize)] [&>svg]:!gp-w-full', isShow ? getGlobalColorClass('text', color?.active) : getGlobalColorStateClass('text', color)));
21
21
  };
22
22
  const getDropdownClasses = (styles, extraData)=>{
23
23
  const { isShow, uniqueId, makeIcon } = extraData || {};
@@ -31,7 +31,7 @@ const getDropdownClasses = (styles, extraData)=>{
31
31
  };
32
32
  const getContentClasses = (parentUid)=>composeClasses(cls(`${parentUid}`, 'gp-overflow-hidden', `gp-child-item-${parentUid}`, 'gp-accordion-item'));
33
33
  const getGapClasses = composeClasses('gp-flex gp-w-full gp-items-center gp-break-all');
34
- const getLayoutTextClasses = composeClasses('group-hover:[color:var(--icon-hover-color)] [color:var(--icon-hover-color)] [color:var(--icon-active-color)] gp-icon gp-inline-flex header-icon gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-configIconSize)] [&>svg]:!gp-w-full');
34
+ const getLayoutIconClasses = composeClasses('group-hover:[color:var(--icon-hover-color)] [color:var(--icon-hover-color)] [color:var(--icon-active-color)] gp-icon gp-inline-flex header-icon gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-configIconSize)] [&>svg]:!gp-w-full');
35
35
  const getRenderChildrenClasses = (styles, extraData)=>{
36
36
  const { isShow, hasTransitionedIn, isMounted } = extraData || {};
37
37
  const { itemContentSpacing, contentSizePadding } = styles ?? {};
@@ -41,4 +41,4 @@ const getRenderChildrenClasses = (styles, extraData)=>{
41
41
  }, itemContentSpacing?.type && !contentSizePadding ? genSizeClass(itemContentSpacing?.type) : ''));
42
42
  };
43
43
 
44
- export { extendClasses, getContainerClasses, getContentClasses, getDropdownClasses, getGapClasses, getIconClasses, getIconRotateClasses, getItemContainerClasses, getLayoutTextClasses, getRenderChildrenClasses };
44
+ export { extendClasses, getContainerClasses, getContentClasses, getDropdownClasses, getGapClasses, getIconClasses, getIconRotateClasses, getItemContainerClasses, getLayoutIconClasses, getRenderChildrenClasses };
@@ -1,4 +1,4 @@
1
- import { getStyleBackgroundByDevice, makeStyle, getSingleColorVariable, makeStyleResponsive, getStyleShadow, getRadiusStyleActiveState, composeSize, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, makeGlobalSize, makeWidth } from '@gem-sdk/core';
1
+ import { getStyleBackgroundByDevice, makeStyle, getSingleColorVariable, makeStyleResponsive, getStyleShadow, getRadiusStyleActiveState, handleConvertBorderWidth, composeSize, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderColor, makeGlobalSize, makeWidth } from '@gem-sdk/core';
2
2
 
3
3
  const filterStyles = (style)=>{
4
4
  const delList = [
@@ -26,8 +26,10 @@ const getContainerStyles = (style, styles)=>{
26
26
  const widthHeightSizeControl = (widthHeightSize)=>makeGlobalSize(widthHeightSize);
27
27
  const widthStyle = (width, fullWidth, widthHeightSize)=>widthHeightSizeControl(widthHeightSize).width['--w'] ? widthHeightSizeControl(widthHeightSize).width : makeStyleResponsive('w', makeWidth(width, fullWidth));
28
28
  const getItemContainerStyles = (styles, isShow)=>{
29
- const { borderContent, backgroundContent, roundedContent, accordionShadow, width, fullWidth, widthHeightSize, iconColor } = styles ?? {};
29
+ const { borderContent, backgroundContent, roundedContent, accordionShadow, width, fullWidth, widthHeightSize, iconColor, color } = styles ?? {};
30
30
  return {
31
+ '--icon-expand-hover-color': isShow ? color?.active : color?.hover,
32
+ '--icon-expand-active-color': color?.active,
31
33
  '--icon-hover-color': isShow ? iconColor?.active : iconColor?.hover,
32
34
  '--icon-active-color': iconColor?.active,
33
35
  ...widthStyle(width, fullWidth, widthHeightSize),
@@ -61,6 +63,7 @@ const composePosition = (iconPosition)=>{
61
63
  const getDropdownStyles = (styles, extraData)=>{
62
64
  const { headerContentPadding, widthHeightSize, itemHeaderSpacing, bgColor, textColor, headerBorder } = styles ?? {};
63
65
  const { isShow, iconPosition } = extraData ?? {};
66
+ console.log('handleConvertBorderWidth(headerBorder)', handleConvertBorderWidth(headerBorder));
64
67
  return {
65
68
  ...headerContentPadding && headerContentPaddingSize(headerContentPadding).padding,
66
69
  ...!itemHeaderSpacing?.type && !headerContentPadding ? composeSize(itemHeaderSpacing?.custom) : {},
@@ -83,12 +86,12 @@ const getDropdownStyles = (styles, extraData)=>{
83
86
  };
84
87
  };
85
88
  const getIconRotateStyles = (styles, isShow, iconCollapseSize)=>{
86
- const { iconColor } = styles ?? {};
89
+ const { color } = styles ?? {};
87
90
  return {
88
91
  ...isShow ? makeStyle({
89
- c: getSingleColorVariable(iconColor?.active ?? iconColor?.normal)
92
+ c: getSingleColorVariable(color?.active ?? color?.normal)
90
93
  }) : {
91
- ...getGlobalColorStateStyle('c', iconColor)
94
+ ...getGlobalColorStateStyle('c', color)
92
95
  },
93
96
  width: `${iconCollapseSize ?? 16}px`,
94
97
  height: `${iconCollapseSize ?? 16}px`
@@ -398,7 +398,7 @@ const AccordionSettings = [
398
398
  },
399
399
  {
400
400
  id: 'headerBorder',
401
- type: 'border',
401
+ type: 'border-v2',
402
402
  default: {
403
403
  normal: {
404
404
  border: 'solid',
@@ -407,22 +407,6 @@ const AccordionSettings = [
407
407
  color: '#121212',
408
408
  isCustom: true,
409
409
  borderWidth: 'Mixed'
410
- },
411
- hover: {
412
- border: 'solid',
413
- width: '0px 0px 1px 0px',
414
- position: 'bottom',
415
- color: '#121212',
416
- isCustom: true,
417
- borderWidth: 'Mixed'
418
- },
419
- active: {
420
- border: 'solid',
421
- width: '0px 0px 1px 0px',
422
- position: 'bottom',
423
- color: '#121212',
424
- isCustom: true,
425
- borderWidth: 'Mixed'
426
410
  }
427
411
  },
428
412
  state: {
@@ -619,14 +603,14 @@ const AccordionSettings = [
619
603
  id: 'accordionShadow',
620
604
  type: 'shadow-v2',
621
605
  label: 'Button Shadow',
622
- default: {},
623
606
  compoDefaultValue: {
624
607
  type: 'shadow-1',
625
608
  distance: '4px',
626
609
  blur: '12px',
627
610
  spread: '0px',
628
611
  color: '#121212',
629
- angle: 90
612
+ angle: 90,
613
+ enable: true
630
614
  }
631
615
  }
632
616
  ]
@@ -49,6 +49,56 @@ const SettingUIV2 = [
49
49
  },
50
50
  setting: {
51
51
  id: 'accordionShadow'
52
+ },
53
+ compoDefaultValue: {
54
+ type: 'shadow-1',
55
+ distance: '4px',
56
+ blur: '12px',
57
+ spread: '0px',
58
+ color: '#121212',
59
+ angle: 90,
60
+ enable: true
61
+ },
62
+ options: {
63
+ updateFields: [
64
+ {
65
+ field: 'enable',
66
+ settingId: 'hasActiveShadow'
67
+ }
68
+ ]
69
+ },
70
+ controlChangeTrigger: {
71
+ settings: [
72
+ {
73
+ condition: `accordionShadow.enable === true`,
74
+ source: [
75
+ 'accordionShadow',
76
+ 'hasActiveShadow'
77
+ ],
78
+ action: {
79
+ controlId: 'hasActiveShadow',
80
+ groupType: 'style',
81
+ controlType: 'style',
82
+ newValue: true
83
+ }
84
+ },
85
+ {
86
+ condition: `accordionShadow.enable === false`,
87
+ source: [
88
+ 'accordionShadow',
89
+ 'hasActiveShadow'
90
+ ],
91
+ action: {
92
+ controlId: 'hasActiveShadow',
93
+ groupType: 'style',
94
+ controlType: 'style',
95
+ newValue: false
96
+ }
97
+ }
98
+ ],
99
+ options: {
100
+ noRecordHistory: true
101
+ }
52
102
  }
53
103
  }
54
104
  ]
@@ -6,7 +6,7 @@ import { createStyleObject } from './helpers.js';
6
6
  import { postPurchaseViewSpacing } from '../../../post-purchase/utils/helper.js';
7
7
 
8
8
  const getRowStyle = (rowProps)=>{
9
- const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
9
+ const { children, setting, builderProps, styles, style, advanced, isNotFullWidth, parentStyle } = rowProps;
10
10
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
11
11
  const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
12
12
  const innerRadius = getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
@@ -91,7 +91,8 @@ const getRowStyle = (rowProps)=>{
91
91
  ...getGlobalStyles(),
92
92
  ...getRowNormalStyle(),
93
93
  ...getMarginByWidth(),
94
- ...isPostPurchase ? getPostPurchaseStyle() : {}
94
+ ...isPostPurchase ? getPostPurchaseStyle() : {},
95
+ ...setting?.sameHeightSubgridContainer && parentStyle
95
96
  });
96
97
  const backgroundBoxStyle = createStyle({
97
98
  ...getRadiusStyleInner()
@@ -1,4 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { Children, isValidElement, createElement } from 'react';
2
3
  import { useEditorMode, ProductProvider, isEmptyChildren } from '@gem-sdk/core';
3
4
  import ChildrenDroppable from '../../../grid/components/ChildrenDroppable.js';
4
5
  import { getStyle } from './common/getStyle.js';
@@ -19,17 +20,21 @@ const ProductListGridLayout = (props)=>{
19
20
  product: product,
20
21
  readOnly: true,
21
22
  children: /*#__PURE__*/ jsx("div", {
23
+ ...mode === 'edit' ? getAttrProductItemEditor(product?.baseID) : {},
24
+ className: productItemClass,
22
25
  style: {
23
- ...productItemStyle
26
+ '--grchild': setting?.sameHeight ? generateGridRowArray?.[index]?.gridRow : undefined,
27
+ '--mbchild': generateGridRowArray?.[index]?.marginBottom
24
28
  },
25
- children: /*#__PURE__*/ jsx("div", {
26
- ...mode === 'edit' ? getAttrProductItemEditor(product?.baseID) : {},
27
- className: productItemClass,
28
- style: {
29
- '--grchild': setting?.sameHeight ? generateGridRowArray?.[index]?.gridRow : undefined,
30
- '--mbchild': generateGridRowArray?.[index]?.marginBottom
31
- },
32
- children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
29
+ children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : Children.map(children, (el)=>{
30
+ if (/*#__PURE__*/ isValidElement(el)) {
31
+ return /*#__PURE__*/ createElement(el.type, {
32
+ ...el.props,
33
+ parentStyle: productItemStyle,
34
+ key: el.key
35
+ });
36
+ }
37
+ return null;
33
38
  })
34
39
  })
35
40
  }, product?.baseID))
@@ -521,6 +521,7 @@ type RowProps = BaseProps<RowSettingsType, RowStylesType> & BasePropsWrap<{
521
521
  isNotFullWidth?: boolean;
522
522
  rawChildren?: any[];
523
523
  hiddenEmptyCol?: boolean;
524
+ parentStyle?: React.CSSProperties;
524
525
  };
525
526
 
526
527
  type ColProps = BasePropsWrap<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.593",
3
+ "version": "2.0.0-dev.595",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,7 +23,7 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.584",
26
+ "@gem-sdk/core": "2.0.0-dev.595",
27
27
  "@gem-sdk/styles": "2.0.0-dev.571",
28
28
  "@gem-sdk/system": "2.0.0-dev.504",
29
29
  "@types/react-transition-group": "^4.4.5"