@gem-sdk/components 2.0.0-dev.558 → 2.0.0-dev.559
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.liquid.js +3 -3
- package/dist/cjs/accordion/components/common/index.js +0 -4
- package/dist/cjs/accordion/components/common/styles.js +1 -1
- package/dist/cjs/accordion/setting/configs/uiV2.js +2 -1
- package/dist/cjs/image/components/common/styles.js +0 -1
- package/dist/cjs/sticky/components/hooks/useSticky.js +0 -1
- package/dist/esm/accordion/components/AccordionItem.liquid.js +4 -4
- package/dist/esm/accordion/components/common/index.js +1 -3
- package/dist/esm/accordion/components/common/styles.js +1 -1
- package/dist/esm/accordion/setting/configs/uiV2.js +2 -1
- package/dist/esm/image/components/common/styles.js +0 -1
- package/dist/esm/sticky/components/hooks/useSticky.js +0 -1
- package/package.json +2 -2
|
@@ -45,7 +45,7 @@ const AccordionItem = (props)=>{
|
|
|
45
45
|
hasTransitionedIn: false,
|
|
46
46
|
isMounted: false
|
|
47
47
|
}));
|
|
48
|
-
const composeRenderChildrenStyles = system.createStyle(styles.getRenderChildrenStyles(composeContentSizeStyle));
|
|
48
|
+
const composeRenderChildrenStyles = system.createStyle(styles.getRenderChildrenStyles(composeContentSizeStyle()));
|
|
49
49
|
const composeItemBodyClasses = system.createClass(core.composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500'));
|
|
50
50
|
const getChildForBody = ()=>{
|
|
51
51
|
if (rawChildren && rawChildren.length >= index.MINIMUM_CHILD) {
|
|
@@ -77,7 +77,7 @@ const AccordionItem = (props)=>{
|
|
|
77
77
|
<span
|
|
78
78
|
class="${composeLayoutTextClasses}"
|
|
79
79
|
style="${composeLayoutTextStyles}">
|
|
80
|
-
${childrenIcon ??
|
|
80
|
+
${childrenIcon ?? ''}</span>
|
|
81
81
|
</div>
|
|
82
82
|
`)}
|
|
83
83
|
${Text_liquid.default({
|
|
@@ -99,7 +99,7 @@ const AccordionItem = (props)=>{
|
|
|
99
99
|
<span
|
|
100
100
|
class="${composeLayoutTextClasses}"
|
|
101
101
|
style="${composeLayoutTextStyles}">
|
|
102
|
-
${childrenIcon ??
|
|
102
|
+
${childrenIcon ?? ''}</span>
|
|
103
103
|
</div>
|
|
104
104
|
`)}
|
|
105
105
|
</div>
|
|
@@ -4,8 +4,6 @@ var core = require('@gem-sdk/core');
|
|
|
4
4
|
|
|
5
5
|
const MINIMUM_CHILD = 1;
|
|
6
6
|
const BODY_CHILD_INDEX = 0;
|
|
7
|
-
const DEFAULT_BEFORE_ICON = '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>';
|
|
8
|
-
const DEFAULT_AFTER_ICON = '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>';
|
|
9
7
|
const getDataState = (props, rawChildren)=>{
|
|
10
8
|
const { setting = {}, styles = {}, builderProps } = props;
|
|
11
9
|
const { activeKey, iconSvg, expandItem, iconPosition, iconCollapseSize, iconGlobalSize, iconExpand, iconCollapse, layoutHeader, expandedMode, configIconSize } = setting;
|
|
@@ -125,8 +123,6 @@ const getSettingItemLiquid = (props)=>{
|
|
|
125
123
|
};
|
|
126
124
|
|
|
127
125
|
exports.BODY_CHILD_INDEX = BODY_CHILD_INDEX;
|
|
128
|
-
exports.DEFAULT_AFTER_ICON = DEFAULT_AFTER_ICON;
|
|
129
|
-
exports.DEFAULT_BEFORE_ICON = DEFAULT_BEFORE_ICON;
|
|
130
126
|
exports.MINIMUM_CHILD = MINIMUM_CHILD;
|
|
131
127
|
exports.getDataState = getDataState;
|
|
132
128
|
exports.getParentSettings = getParentSettings;
|
|
@@ -22,7 +22,7 @@ const getContainerStyles = (style, styles)=>{
|
|
|
22
22
|
...filterStyles(style),
|
|
23
23
|
...contentSizePaddingSize(styles).gap,
|
|
24
24
|
...core.getStyleBackgroundByDevice(style?.backgroundContent),
|
|
25
|
-
|
|
25
|
+
'border-radius': 'inherit'
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
const widthHeightSizeControl = (widthHeightSize)=>core.makeGlobalSize(widthHeightSize);
|
|
@@ -135,11 +135,12 @@ const SettingUIV2 = [
|
|
|
135
135
|
},
|
|
136
136
|
type: 'combo',
|
|
137
137
|
iconName: 'polaris-text-title',
|
|
138
|
-
fixedValue: 'Edit...',
|
|
139
138
|
isHideClear: true,
|
|
140
139
|
popoverLabel: {
|
|
141
140
|
en: 'Title'
|
|
142
141
|
},
|
|
142
|
+
getValueFromSettingID: 'titleTypo.type',
|
|
143
|
+
isTypoValue: true,
|
|
143
144
|
controls: [
|
|
144
145
|
{
|
|
145
146
|
setting: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { composeClasses, template, RenderChildren } from '@gem-sdk/core';
|
|
2
2
|
import Text from '../../text/components/Text.liquid.js';
|
|
3
|
-
import { getParentSettings, getSettingItemLiquid,
|
|
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
6
|
import { getIconGlobalSize, getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getGapStyles, getLayoutTextStyles, getRenderChildrenStyles } from './common/styles.js';
|
|
@@ -41,7 +41,7 @@ const AccordionItem = (props)=>{
|
|
|
41
41
|
hasTransitionedIn: false,
|
|
42
42
|
isMounted: false
|
|
43
43
|
}));
|
|
44
|
-
const composeRenderChildrenStyles = createStyle(getRenderChildrenStyles(composeContentSizeStyle));
|
|
44
|
+
const composeRenderChildrenStyles = createStyle(getRenderChildrenStyles(composeContentSizeStyle()));
|
|
45
45
|
const composeItemBodyClasses = createClass(composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500'));
|
|
46
46
|
const getChildForBody = ()=>{
|
|
47
47
|
if (rawChildren && rawChildren.length >= MINIMUM_CHILD) {
|
|
@@ -73,7 +73,7 @@ const AccordionItem = (props)=>{
|
|
|
73
73
|
<span
|
|
74
74
|
class="${composeLayoutTextClasses}"
|
|
75
75
|
style="${composeLayoutTextStyles}">
|
|
76
|
-
${childrenIcon ??
|
|
76
|
+
${childrenIcon ?? ''}</span>
|
|
77
77
|
</div>
|
|
78
78
|
`)}
|
|
79
79
|
${Text({
|
|
@@ -95,7 +95,7 @@ const AccordionItem = (props)=>{
|
|
|
95
95
|
<span
|
|
96
96
|
class="${composeLayoutTextClasses}"
|
|
97
97
|
style="${composeLayoutTextStyles}">
|
|
98
|
-
${childrenIcon ??
|
|
98
|
+
${childrenIcon ?? ''}</span>
|
|
99
99
|
</div>
|
|
100
100
|
`)}
|
|
101
101
|
</div>
|
|
@@ -2,8 +2,6 @@ import { makeGlobalSize, composeSize, removePaddingYInStyle, makeStyle, getGloba
|
|
|
2
2
|
|
|
3
3
|
const MINIMUM_CHILD = 1;
|
|
4
4
|
const BODY_CHILD_INDEX = 0;
|
|
5
|
-
const DEFAULT_BEFORE_ICON = '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>';
|
|
6
|
-
const DEFAULT_AFTER_ICON = '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>';
|
|
7
5
|
const getDataState = (props, rawChildren)=>{
|
|
8
6
|
const { setting = {}, styles = {}, builderProps } = props;
|
|
9
7
|
const { activeKey, iconSvg, expandItem, iconPosition, iconCollapseSize, iconGlobalSize, iconExpand, iconCollapse, layoutHeader, expandedMode, configIconSize } = setting;
|
|
@@ -122,4 +120,4 @@ const getSettingItemLiquid = (props)=>{
|
|
|
122
120
|
};
|
|
123
121
|
};
|
|
124
122
|
|
|
125
|
-
export { BODY_CHILD_INDEX,
|
|
123
|
+
export { BODY_CHILD_INDEX, MINIMUM_CHILD, getDataState, getParentSettings, getSettingItemLiquid };
|
|
@@ -20,7 +20,7 @@ const getContainerStyles = (style, styles)=>{
|
|
|
20
20
|
...filterStyles(style),
|
|
21
21
|
...contentSizePaddingSize(styles).gap,
|
|
22
22
|
...getStyleBackgroundByDevice(style?.backgroundContent),
|
|
23
|
-
|
|
23
|
+
'border-radius': 'inherit'
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
const widthHeightSizeControl = (widthHeightSize)=>makeGlobalSize(widthHeightSize);
|
|
@@ -133,11 +133,12 @@ const SettingUIV2 = [
|
|
|
133
133
|
},
|
|
134
134
|
type: 'combo',
|
|
135
135
|
iconName: 'polaris-text-title',
|
|
136
|
-
fixedValue: 'Edit...',
|
|
137
136
|
isHideClear: true,
|
|
138
137
|
popoverLabel: {
|
|
139
138
|
en: 'Title'
|
|
140
139
|
},
|
|
140
|
+
getValueFromSettingID: 'titleTypo.type',
|
|
141
|
+
isTypoValue: true,
|
|
141
142
|
controls: [
|
|
142
143
|
{
|
|
143
144
|
setting: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.559",
|
|
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.
|
|
26
|
+
"@gem-sdk/core": "2.0.0-dev.559",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.535",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.504",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|