@gem-sdk/components 2.0.0-dev.566 → 2.0.0-dev.567
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.
- package/dist/cjs/accordion/components/AccordionItem.js +2 -1
- package/dist/cjs/accordion/components/AccordionItem.liquid.js +6 -3
- package/dist/cjs/accordion/components/common/styles.js +8 -3
- package/dist/cjs/article/components/ArticleTag.liquid.js +2 -2
- package/dist/cjs/article/setting/configs/ArticleList/settings.js +9 -1
- package/dist/cjs/article/setting/configs/ArticleList/uiV2.js +1 -1
- package/dist/esm/accordion/components/AccordionItem.js +2 -1
- package/dist/esm/accordion/components/AccordionItem.liquid.js +7 -4
- package/dist/esm/accordion/components/common/styles.js +8 -4
- package/dist/esm/article/components/ArticleTag.liquid.js +2 -2
- package/dist/esm/article/setting/configs/ArticleList/settings.js +9 -1
- package/dist/esm/article/setting/configs/ArticleList/uiV2.js +1 -1
- package/package.json +1 -1
|
@@ -50,7 +50,7 @@ const AccordionItem = (props)=>{
|
|
|
50
50
|
hasTransitionedIn,
|
|
51
51
|
isMounted
|
|
52
52
|
}));
|
|
53
|
-
const composeRenderChildrenStyles = system.createStyle(styles.getRenderChildrenStyles(
|
|
53
|
+
const composeRenderChildrenStyles = system.createStyle(styles.getRenderChildrenStyles());
|
|
54
54
|
const composeItemBodyClasses = system.createClass(core.composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0'));
|
|
55
55
|
const composeTextClasses = system.createClass(core.composeClasses('gp-border gp-border-transparent'));
|
|
56
56
|
const childForBody = React.useMemo(()=>{
|
|
@@ -146,6 +146,7 @@ const AccordionItem = (props)=>{
|
|
|
146
146
|
"data-show": isShow,
|
|
147
147
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
148
148
|
className: composeItemBodyClasses,
|
|
149
|
+
style: composeContentSizeStyle,
|
|
149
150
|
children: childForBody
|
|
150
151
|
})
|
|
151
152
|
})
|
|
@@ -45,8 +45,11 @@ const AccordionItem = (props)=>{
|
|
|
45
45
|
hasTransitionedIn: false,
|
|
46
46
|
isMounted: false
|
|
47
47
|
}));
|
|
48
|
-
const composeRenderChildrenStyles = system.createStyle(
|
|
49
|
-
|
|
48
|
+
const composeRenderChildrenStyles = system.createStyle({
|
|
49
|
+
...styles.getTemplateRow(isShow),
|
|
50
|
+
...styles.getRenderChildrenStyles()
|
|
51
|
+
});
|
|
52
|
+
const composeItemBodyClasses = system.createClass(core.composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0'));
|
|
50
53
|
const getChildForBody = ()=>{
|
|
51
54
|
if (rawChildren && rawChildren.length >= index.MINIMUM_CHILD) {
|
|
52
55
|
return core.RenderChildren({
|
|
@@ -105,7 +108,7 @@ const AccordionItem = (props)=>{
|
|
|
105
108
|
</div>
|
|
106
109
|
</div>
|
|
107
110
|
<div data-index="${index$1}" data-show="${isShow}" class="${composeRenderChildrenClasses}" style="${composeRenderChildrenStyles}">
|
|
108
|
-
<div data-index="${index$1}" class="${composeItemBodyClasses}">
|
|
111
|
+
<div data-index="${index$1}" class="${composeItemBodyClasses}" style="${composeContentSizeStyle()}">
|
|
109
112
|
${getChildForBody()}
|
|
110
113
|
</div>
|
|
111
114
|
</div>
|
|
@@ -112,10 +112,14 @@ const getLayoutTextStyles = (composeIconColor, configIconSize)=>{
|
|
|
112
112
|
'--height': size
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
const
|
|
115
|
+
const getTemplateRow = (isShow)=>{
|
|
116
116
|
return {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
'grid-template-rows': `${+Boolean(isShow)}fr`
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const getRenderChildrenStyles = ()=>{
|
|
121
|
+
return {
|
|
122
|
+
'grid-template-columns': 'minmax(auto, 100%)'
|
|
119
123
|
};
|
|
120
124
|
};
|
|
121
125
|
const getIconGlobalSize = (iconGlobalSize)=>core.makeGlobalSize(iconGlobalSize)?.padding;
|
|
@@ -128,3 +132,4 @@ exports.getIconRotateStyles = getIconRotateStyles;
|
|
|
128
132
|
exports.getItemContainerStyles = getItemContainerStyles;
|
|
129
133
|
exports.getLayoutTextStyles = getLayoutTextStyles;
|
|
130
134
|
exports.getRenderChildrenStyles = getRenderChildrenStyles;
|
|
135
|
+
exports.getTemplateRow = getTemplateRow;
|
|
@@ -8,12 +8,12 @@ var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
|
8
8
|
|
|
9
9
|
const ArticleTag = ({ setting, styles, advanced, builderProps })=>{
|
|
10
10
|
return core.template`
|
|
11
|
-
{%- assign
|
|
11
|
+
{%- assign tag_string = article.tags | join: ', ' -%}
|
|
12
12
|
${Text_liquid.default({
|
|
13
13
|
styles: styles,
|
|
14
14
|
setting: {
|
|
15
15
|
...setting,
|
|
16
|
-
text: '{{
|
|
16
|
+
text: '{{tag_string}}',
|
|
17
17
|
excludeFlex: true
|
|
18
18
|
},
|
|
19
19
|
advanced,
|
|
@@ -248,7 +248,15 @@ const ArticleListSettings = [
|
|
|
248
248
|
{
|
|
249
249
|
id: 'shadow',
|
|
250
250
|
type: 'shadow-v2',
|
|
251
|
-
label: 'Button Shadow'
|
|
251
|
+
label: 'Button Shadow',
|
|
252
|
+
compoDefaultValue: {
|
|
253
|
+
type: 'shadow-1',
|
|
254
|
+
distance: '4px',
|
|
255
|
+
blur: '4px',
|
|
256
|
+
spread: '0px',
|
|
257
|
+
color: '#121212',
|
|
258
|
+
angle: 45
|
|
259
|
+
}
|
|
252
260
|
}
|
|
253
261
|
]
|
|
254
262
|
}
|
|
@@ -46,7 +46,7 @@ const AccordionItem = (props)=>{
|
|
|
46
46
|
hasTransitionedIn,
|
|
47
47
|
isMounted
|
|
48
48
|
}));
|
|
49
|
-
const composeRenderChildrenStyles = createStyle(getRenderChildrenStyles(
|
|
49
|
+
const composeRenderChildrenStyles = createStyle(getRenderChildrenStyles());
|
|
50
50
|
const composeItemBodyClasses = createClass(composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0'));
|
|
51
51
|
const composeTextClasses = createClass(composeClasses('gp-border gp-border-transparent'));
|
|
52
52
|
const childForBody = useMemo(()=>{
|
|
@@ -142,6 +142,7 @@ const AccordionItem = (props)=>{
|
|
|
142
142
|
"data-show": isShow,
|
|
143
143
|
children: /*#__PURE__*/ jsx("div", {
|
|
144
144
|
className: composeItemBodyClasses,
|
|
145
|
+
style: composeContentSizeStyle,
|
|
145
146
|
children: childForBody
|
|
146
147
|
})
|
|
147
148
|
})
|
|
@@ -3,7 +3,7 @@ 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
5
|
import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutTextClasses, getRenderChildrenClasses } from './common/classes.js';
|
|
6
|
-
import { getIconGlobalSize, getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getGapStyles, getLayoutTextStyles, getRenderChildrenStyles } from './common/styles.js';
|
|
6
|
+
import { getIconGlobalSize, getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getGapStyles, getLayoutTextStyles, getTemplateRow, getRenderChildrenStyles } from './common/styles.js';
|
|
7
7
|
|
|
8
8
|
const AccordionItem = (props)=>{
|
|
9
9
|
const { parentUid, childrenIcon, rawChildren, index, builderProps, title } = props;
|
|
@@ -41,8 +41,11 @@ const AccordionItem = (props)=>{
|
|
|
41
41
|
hasTransitionedIn: false,
|
|
42
42
|
isMounted: false
|
|
43
43
|
}));
|
|
44
|
-
const composeRenderChildrenStyles = createStyle(
|
|
45
|
-
|
|
44
|
+
const composeRenderChildrenStyles = createStyle({
|
|
45
|
+
...getTemplateRow(isShow),
|
|
46
|
+
...getRenderChildrenStyles()
|
|
47
|
+
});
|
|
48
|
+
const composeItemBodyClasses = createClass(composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0'));
|
|
46
49
|
const getChildForBody = ()=>{
|
|
47
50
|
if (rawChildren && rawChildren.length >= MINIMUM_CHILD) {
|
|
48
51
|
return RenderChildren({
|
|
@@ -101,7 +104,7 @@ const AccordionItem = (props)=>{
|
|
|
101
104
|
</div>
|
|
102
105
|
</div>
|
|
103
106
|
<div data-index="${index}" data-show="${isShow}" class="${composeRenderChildrenClasses}" style="${composeRenderChildrenStyles}">
|
|
104
|
-
<div data-index="${index}" class="${composeItemBodyClasses}">
|
|
107
|
+
<div data-index="${index}" class="${composeItemBodyClasses}" style="${composeContentSizeStyle()}">
|
|
105
108
|
${getChildForBody()}
|
|
106
109
|
</div>
|
|
107
110
|
</div>
|
|
@@ -110,12 +110,16 @@ const getLayoutTextStyles = (composeIconColor, configIconSize)=>{
|
|
|
110
110
|
'--height': size
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
const
|
|
113
|
+
const getTemplateRow = (isShow)=>{
|
|
114
114
|
return {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
'grid-template-rows': `${+Boolean(isShow)}fr`
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
const getRenderChildrenStyles = ()=>{
|
|
119
|
+
return {
|
|
120
|
+
'grid-template-columns': 'minmax(auto, 100%)'
|
|
117
121
|
};
|
|
118
122
|
};
|
|
119
123
|
const getIconGlobalSize = (iconGlobalSize)=>makeGlobalSize(iconGlobalSize)?.padding;
|
|
120
124
|
|
|
121
|
-
export { getContainerStyles, getDropdownStyles, getGapStyles, getIconGlobalSize, getIconRotateStyles, getItemContainerStyles, getLayoutTextStyles, getRenderChildrenStyles };
|
|
125
|
+
export { getContainerStyles, getDropdownStyles, getGapStyles, getIconGlobalSize, getIconRotateStyles, getItemContainerStyles, getLayoutTextStyles, getRenderChildrenStyles, getTemplateRow };
|
|
@@ -4,12 +4,12 @@ import Text from '../../text/components/Text.liquid.js';
|
|
|
4
4
|
|
|
5
5
|
const ArticleTag = ({ setting, styles, advanced, builderProps })=>{
|
|
6
6
|
return template`
|
|
7
|
-
{%- assign
|
|
7
|
+
{%- assign tag_string = article.tags | join: ', ' -%}
|
|
8
8
|
${Text({
|
|
9
9
|
styles: styles,
|
|
10
10
|
setting: {
|
|
11
11
|
...setting,
|
|
12
|
-
text: '{{
|
|
12
|
+
text: '{{tag_string}}',
|
|
13
13
|
excludeFlex: true
|
|
14
14
|
},
|
|
15
15
|
advanced,
|
|
@@ -246,7 +246,15 @@ const ArticleListSettings = [
|
|
|
246
246
|
{
|
|
247
247
|
id: 'shadow',
|
|
248
248
|
type: 'shadow-v2',
|
|
249
|
-
label: 'Button Shadow'
|
|
249
|
+
label: 'Button Shadow',
|
|
250
|
+
compoDefaultValue: {
|
|
251
|
+
type: 'shadow-1',
|
|
252
|
+
distance: '4px',
|
|
253
|
+
blur: '4px',
|
|
254
|
+
spread: '0px',
|
|
255
|
+
color: '#121212',
|
|
256
|
+
angle: 45
|
|
257
|
+
}
|
|
250
258
|
}
|
|
251
259
|
]
|
|
252
260
|
}
|