@gem-sdk/components 2.0.0-dev.557 → 2.0.0-dev.558
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 -4
- package/dist/cjs/accordion/components/common/classes.js +1 -1
- package/dist/cjs/accordion/components/common/index.js +1 -14
- package/dist/cjs/accordion/components/common/styles.js +1 -1
- package/dist/cjs/accordion/hooks/useAccordionItem.js +5 -16
- package/dist/cjs/accordion/setting/Accordion.js +3 -0
- package/dist/cjs/accordion/setting/configs/settings.js +29 -129
- package/dist/cjs/accordion/setting/configs/uiV2.js +1 -1
- package/dist/cjs/sticky/setting/configs/uiV2.js +1 -1
- package/dist/esm/accordion/components/AccordionItem.js +3 -5
- package/dist/esm/accordion/components/common/classes.js +1 -1
- package/dist/esm/accordion/components/common/index.js +2 -13
- package/dist/esm/accordion/components/common/styles.js +1 -1
- package/dist/esm/accordion/hooks/useAccordionItem.js +1 -12
- package/dist/esm/accordion/setting/Accordion.js +3 -0
- package/dist/esm/accordion/setting/configs/settings.js +29 -129
- package/dist/esm/accordion/setting/configs/uiV2.js +1 -1
- package/dist/esm/sticky/setting/configs/uiV2.js +1 -1
- package/package.json +1 -1
|
@@ -101,7 +101,7 @@ const AccordionItem = (props)=>{
|
|
|
101
101
|
className: composeLayoutTextClasses,
|
|
102
102
|
style: composeLayoutTextStyles,
|
|
103
103
|
dangerouslySetInnerHTML: {
|
|
104
|
-
__html: childrenIcon ??
|
|
104
|
+
__html: childrenIcon ?? ''
|
|
105
105
|
}
|
|
106
106
|
})
|
|
107
107
|
})),
|
|
@@ -127,10 +127,8 @@ const AccordionItem = (props)=>{
|
|
|
127
127
|
...composeIconPaddingGlobalSize
|
|
128
128
|
},
|
|
129
129
|
children: /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
130
|
-
style: composeLayoutTextStyles,
|
|
131
|
-
className: composeLayoutTextClasses,
|
|
132
130
|
dangerouslySetInnerHTML: {
|
|
133
|
-
__html: childrenIcon ??
|
|
131
|
+
__html: childrenIcon ?? ''
|
|
134
132
|
}
|
|
135
133
|
})
|
|
136
134
|
}))
|
|
@@ -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-
|
|
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');
|
|
37
37
|
const getRenderChildrenClasses = (styles, extraData)=>{
|
|
38
38
|
const { isShow, hasTransitionedIn, isMounted } = extraData || {};
|
|
39
39
|
const { itemContentSpacing, contentSizePadding } = styles ?? {};
|
|
@@ -6,8 +6,6 @@ const MINIMUM_CHILD = 1;
|
|
|
6
6
|
const BODY_CHILD_INDEX = 0;
|
|
7
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
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
|
-
const ICON_MINUS = `<svg width='16' height='16' fill='currentColor' viewBox="0 0 448 512"><path fill='currentColor' d="M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z"/></svg>`;
|
|
10
|
-
const ICON_PLUS = `<svg fill='currentColor' width='16' height='16' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill='currentColor' d="M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z"/></svg>`;
|
|
11
9
|
const getDataState = (props, rawChildren)=>{
|
|
12
10
|
const { setting = {}, styles = {}, builderProps } = props;
|
|
13
11
|
const { activeKey, iconSvg, expandItem, iconPosition, iconCollapseSize, iconGlobalSize, iconExpand, iconCollapse, layoutHeader, expandedMode, configIconSize } = setting;
|
|
@@ -85,7 +83,7 @@ const getParentSettings = (parentSettings = {})=>{
|
|
|
85
83
|
};
|
|
86
84
|
const getSettingItemLiquid = (props)=>{
|
|
87
85
|
const { index, accordions, parentSetting, parentStyle } = props;
|
|
88
|
-
const {
|
|
86
|
+
const { titleTypo, iconCollapse, iconExpand, activeKey, expandItem } = parentSetting ?? {};
|
|
89
87
|
delete titleTypo?.attrs?.color;
|
|
90
88
|
const { itemContentSpacing, iconColor, contentSizePadding } = parentStyle ?? {};
|
|
91
89
|
const isShow = !expandItem ? false : activeKey?.toString()?.toLowerCase() === 'all' ? true : accordions?.includes(index?.toString() ?? '');
|
|
@@ -107,15 +105,6 @@ const getSettingItemLiquid = (props)=>{
|
|
|
107
105
|
if (iconCollapse && !isShow) {
|
|
108
106
|
return iconCollapse;
|
|
109
107
|
}
|
|
110
|
-
if (iconSvg === 'plus') {
|
|
111
|
-
if (isShow) {
|
|
112
|
-
return ICON_MINUS;
|
|
113
|
-
}
|
|
114
|
-
return ICON_PLUS;
|
|
115
|
-
}
|
|
116
|
-
if (iconSvg) {
|
|
117
|
-
return iconSvg;
|
|
118
|
-
}
|
|
119
108
|
};
|
|
120
109
|
const collapsibleIcon = makeIcon();
|
|
121
110
|
const composeIconColor = ()=>{
|
|
@@ -138,8 +127,6 @@ const getSettingItemLiquid = (props)=>{
|
|
|
138
127
|
exports.BODY_CHILD_INDEX = BODY_CHILD_INDEX;
|
|
139
128
|
exports.DEFAULT_AFTER_ICON = DEFAULT_AFTER_ICON;
|
|
140
129
|
exports.DEFAULT_BEFORE_ICON = DEFAULT_BEFORE_ICON;
|
|
141
|
-
exports.ICON_MINUS = ICON_MINUS;
|
|
142
|
-
exports.ICON_PLUS = ICON_PLUS;
|
|
143
130
|
exports.MINIMUM_CHILD = MINIMUM_CHILD;
|
|
144
131
|
exports.getDataState = getDataState;
|
|
145
132
|
exports.getParentSettings = getParentSettings;
|
|
@@ -42,7 +42,7 @@ const getItemContainerStyles = (styles, isShow)=>{
|
|
|
42
42
|
...core.getStyleShadow({
|
|
43
43
|
value: accordionShadow,
|
|
44
44
|
styleAppliedFor: 'box-shadow',
|
|
45
|
-
isEnableShadow: accordionShadow?.
|
|
45
|
+
isEnableShadow: accordionShadow?.enable == undefined || accordionShadow?.enable == true ? true : false
|
|
46
46
|
}),
|
|
47
47
|
...core.getRadiusStyleActiveState({
|
|
48
48
|
...roundedContent,
|
|
@@ -6,14 +6,13 @@ var core = require('@gem-sdk/core');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var useMountTransition = require('./useMountTransition.js');
|
|
8
8
|
var useGetProductId = require('../../components/hooks/useGetProductId.js');
|
|
9
|
-
var index = require('../components/common/index.js');
|
|
10
9
|
|
|
11
10
|
const useAccordionItem = (props)=>{
|
|
12
|
-
const { accordions, index
|
|
13
|
-
const {
|
|
11
|
+
const { accordions, index, builderProps, parentSetting = {}, parentStyle = {}, handleDropDown } = props;
|
|
12
|
+
const { iconPosition, titleTypo, iconCollapse, iconExpand } = parentSetting;
|
|
14
13
|
delete titleTypo?.attrs?.color;
|
|
15
14
|
const { itemContentSpacing, iconColor, contentSizePadding } = parentStyle;
|
|
16
|
-
const isShow = accordions?.includes(index
|
|
15
|
+
const isShow = accordions?.includes(index?.toString() ?? '');
|
|
17
16
|
const contentSizePaddingSize = core.makeGlobalSize(contentSizePadding);
|
|
18
17
|
const mode = core.useEditorMode();
|
|
19
18
|
const [isMounted, setIsMounted] = React.useState(isShow);
|
|
@@ -30,17 +29,7 @@ const useAccordionItem = (props)=>{
|
|
|
30
29
|
if (iconCollapse && !isShow) {
|
|
31
30
|
return iconCollapse;
|
|
32
31
|
}
|
|
33
|
-
if (iconSvg === 'plus') {
|
|
34
|
-
if (isShow) {
|
|
35
|
-
return index.ICON_MINUS;
|
|
36
|
-
}
|
|
37
|
-
return index.ICON_PLUS;
|
|
38
|
-
}
|
|
39
|
-
if (iconSvg) {
|
|
40
|
-
return iconSvg;
|
|
41
|
-
}
|
|
42
32
|
}, [
|
|
43
|
-
iconSvg,
|
|
44
33
|
isShow,
|
|
45
34
|
iconCollapse,
|
|
46
35
|
iconExpand
|
|
@@ -73,11 +62,11 @@ const useAccordionItem = (props)=>{
|
|
|
73
62
|
]);
|
|
74
63
|
const { refContainer, productID } = useGetProductId.useGetProductId();
|
|
75
64
|
const uniqueId = React.useMemo(()=>{
|
|
76
|
-
const prefix = `gp-accordion-item-${builderProps?.uid}-${index
|
|
65
|
+
const prefix = `gp-accordion-item-${builderProps?.uid}-${index}`;
|
|
77
66
|
return productID ? `${prefix}-${productID}` : prefix;
|
|
78
67
|
}, [
|
|
79
68
|
builderProps?.uid,
|
|
80
|
-
index
|
|
69
|
+
index,
|
|
81
70
|
productID
|
|
82
71
|
]);
|
|
83
72
|
const composeContentSizeStyle = React.useMemo(()=>{
|
|
@@ -59,6 +59,7 @@ const config = {
|
|
|
59
59
|
styles: {
|
|
60
60
|
},
|
|
61
61
|
advanced: {
|
|
62
|
+
of: 'hidden',
|
|
62
63
|
margin: {
|
|
63
64
|
bottom: 'var(--g-s-l)'
|
|
64
65
|
}
|
|
@@ -119,6 +120,7 @@ const config = {
|
|
|
119
120
|
}
|
|
120
121
|
},
|
|
121
122
|
advanced: {
|
|
123
|
+
of: 'hidden',
|
|
122
124
|
margin: {
|
|
123
125
|
bottom: 'var(--g-s-l)'
|
|
124
126
|
}
|
|
@@ -201,6 +203,7 @@ const config = {
|
|
|
201
203
|
itemGap: '16px'
|
|
202
204
|
},
|
|
203
205
|
advanced: {
|
|
206
|
+
of: 'hidden',
|
|
204
207
|
margin: {
|
|
205
208
|
bottom: 'var(--g-s-l)'
|
|
206
209
|
}
|
|
@@ -151,26 +151,23 @@ const AccordionSettings = [
|
|
|
151
151
|
{
|
|
152
152
|
id: 'layoutHeader',
|
|
153
153
|
label: 'Layout',
|
|
154
|
-
type: '
|
|
155
|
-
iconViewBox: '0 0 78 52',
|
|
156
|
-
enableItemBackground: true,
|
|
157
|
-
enableTooltip: true,
|
|
154
|
+
type: 'option:illustration',
|
|
158
155
|
default: 'before-text',
|
|
159
156
|
options: [
|
|
160
157
|
{
|
|
161
158
|
label: 'Text only',
|
|
162
159
|
value: 'text-only',
|
|
163
|
-
|
|
160
|
+
svgName: 'gp-accordion-header-no-icon'
|
|
164
161
|
},
|
|
165
162
|
{
|
|
166
163
|
label: 'Icon before text',
|
|
167
164
|
value: 'before-text',
|
|
168
|
-
|
|
165
|
+
svgName: 'gp-accordion-header-left-icon'
|
|
169
166
|
},
|
|
170
167
|
{
|
|
171
168
|
label: 'Icon after text',
|
|
172
169
|
value: 'after-text',
|
|
173
|
-
|
|
170
|
+
svgName: 'gp-accordion-header-right-icon'
|
|
174
171
|
}
|
|
175
172
|
]
|
|
176
173
|
},
|
|
@@ -178,8 +175,14 @@ const AccordionSettings = [
|
|
|
178
175
|
id: 'childConfig',
|
|
179
176
|
type: 'child-icon',
|
|
180
177
|
label: '',
|
|
181
|
-
initIcon:
|
|
182
|
-
|
|
178
|
+
initIcon: `<svg data-name="Check-round" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
179
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9497 3.05025C10.2161 0.316582 5.78392 0.316582 3.05025 3.05025C0.316582 5.78392 0.316582 10.2161 3.05025 12.9497C5.78392 15.6834 10.2161 15.6834 12.9497 12.9497C15.6834 10.2161 15.6834 5.78392 12.9497 3.05025ZM11.3274 5.0505C11.5422 5.22402 11.5757 5.53883 11.4022 5.75365L7.45811 10.6366C7.37161 10.7437 7.24479 10.8104 7.10755 10.821C6.9703 10.8316 6.83476 10.7851 6.73289 10.6925L4.6364 8.78745C4.43203 8.60174 4.41691 8.28552 4.60262 8.08115C4.78833 7.87678 5.10455 7.86165 5.30892 8.04736L7.01318 9.59601L10.6243 5.1253C10.7978 4.91048 11.1126 4.87699 11.3274 5.0505Z" />
|
|
180
|
+
</svg>
|
|
181
|
+
`,
|
|
182
|
+
default: new Array(3).fill(`<svg data-name="Check-round" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
183
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9497 3.05025C10.2161 0.316582 5.78392 0.316582 3.05025 3.05025C0.316582 5.78392 0.316582 10.2161 3.05025 12.9497C5.78392 15.6834 10.2161 15.6834 12.9497 12.9497C15.6834 10.2161 15.6834 5.78392 12.9497 3.05025ZM11.3274 5.0505C11.5422 5.22402 11.5757 5.53883 11.4022 5.75365L7.45811 10.6366C7.37161 10.7437 7.24479 10.8104 7.10755 10.821C6.9703 10.8316 6.83476 10.7851 6.73289 10.6925L4.6364 8.78745C4.43203 8.60174 4.41691 8.28552 4.60262 8.08115C4.78833 7.87678 5.10455 7.86165 5.30892 8.04736L7.01318 9.59601L10.6243 5.1253C10.7978 4.91048 11.1126 4.87699 11.3274 5.0505Z" />
|
|
184
|
+
</svg>
|
|
185
|
+
`)
|
|
183
186
|
},
|
|
184
187
|
{
|
|
185
188
|
id: 'configIconSize',
|
|
@@ -218,8 +221,10 @@ const AccordionSettings = [
|
|
|
218
221
|
type: 'icon',
|
|
219
222
|
label: 'Icon',
|
|
220
223
|
default: `
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
<svg data-name="Chevron-up" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
225
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.6243 9.82426C11.39 10.0586 11.0101 10.0586 10.7758 9.82426L8.00005 7.04853L5.22431 9.82426C4.99 10.0586 4.6101 10.0586 4.37579 9.82426C4.14147 9.58995 4.14147 9.21005 4.37579 8.97574L7.57579 5.77574C7.8101 5.54142 8.19 5.54142 8.42431 5.77574L11.6243 8.97574C11.8586 9.21005 11.8586 9.58995 11.6243 9.82426Z" fill="#F9F9F9"/>
|
|
226
|
+
</svg>
|
|
227
|
+
`,
|
|
223
228
|
hideInput: true,
|
|
224
229
|
hideLabel: true
|
|
225
230
|
},
|
|
@@ -228,8 +233,9 @@ const AccordionSettings = [
|
|
|
228
233
|
type: 'icon',
|
|
229
234
|
label: 'Icon',
|
|
230
235
|
default: `
|
|
231
|
-
|
|
232
|
-
|
|
236
|
+
<svg data-name="Chevron-down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
237
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77571C4.81007 6.5414 5.18997 6.5414 5.42429 6.77571L8.20002 9.55145L10.9758 6.77571C11.2101 6.5414 11.59 6.5414 11.8243 6.77571C12.0586 7.01003 12.0586 7.38993 11.8243 7.62424L8.62429 10.8242C8.38997 11.0586 8.01007 11.0586 7.77576 10.8242L4.57576 7.62424C4.34145 7.38993 4.34145 7.01003 4.57576 6.77571Z" fill="#F9F9F9"/>
|
|
238
|
+
</svg>
|
|
233
239
|
`,
|
|
234
240
|
hideInput: true,
|
|
235
241
|
hideLabel: true
|
|
@@ -339,9 +345,7 @@ const AccordionSettings = [
|
|
|
339
345
|
type: 'color-picker-v2',
|
|
340
346
|
label: 'Text color',
|
|
341
347
|
default: {
|
|
342
|
-
normal: '#121212'
|
|
343
|
-
hover: '#121212',
|
|
344
|
-
active: '#121212'
|
|
348
|
+
normal: '#121212'
|
|
345
349
|
},
|
|
346
350
|
state: {
|
|
347
351
|
hover: true,
|
|
@@ -354,9 +358,7 @@ const AccordionSettings = [
|
|
|
354
358
|
type: 'color-picker-v2',
|
|
355
359
|
label: 'Collapsible icon color',
|
|
356
360
|
default: {
|
|
357
|
-
normal: '#121212'
|
|
358
|
-
hover: '#121212',
|
|
359
|
-
active: '#121212'
|
|
361
|
+
normal: '#121212'
|
|
360
362
|
},
|
|
361
363
|
state: {
|
|
362
364
|
hover: true,
|
|
@@ -369,9 +371,7 @@ const AccordionSettings = [
|
|
|
369
371
|
type: 'color-picker-v2',
|
|
370
372
|
label: 'Collapsible icon color',
|
|
371
373
|
default: {
|
|
372
|
-
normal: '#121212'
|
|
373
|
-
hover: '#121212',
|
|
374
|
-
active: '#121212'
|
|
374
|
+
normal: '#121212'
|
|
375
375
|
},
|
|
376
376
|
state: {
|
|
377
377
|
hover: true,
|
|
@@ -384,9 +384,7 @@ const AccordionSettings = [
|
|
|
384
384
|
type: 'color-picker-v2',
|
|
385
385
|
label: 'Background Color',
|
|
386
386
|
default: {
|
|
387
|
-
normal: '#ffffff'
|
|
388
|
-
hover: '#ffffff',
|
|
389
|
-
active: '#ffffff'
|
|
387
|
+
normal: '#ffffff'
|
|
390
388
|
},
|
|
391
389
|
state: {
|
|
392
390
|
hover: true,
|
|
@@ -394,96 +392,6 @@ const AccordionSettings = [
|
|
|
394
392
|
active: true
|
|
395
393
|
}
|
|
396
394
|
},
|
|
397
|
-
// {
|
|
398
|
-
// id: 'itemBorder',
|
|
399
|
-
// type: 'border',
|
|
400
|
-
// label: 'Border',
|
|
401
|
-
// default: {
|
|
402
|
-
// normal: {
|
|
403
|
-
// borderType: 'style-1',
|
|
404
|
-
// border: 'solid',
|
|
405
|
-
// width: '0px 0px 0px 0px',
|
|
406
|
-
// position: 'all',
|
|
407
|
-
// borderWidth: '0px',
|
|
408
|
-
// color: 'transparent',
|
|
409
|
-
// isCustom: true,
|
|
410
|
-
// },
|
|
411
|
-
// hover: {
|
|
412
|
-
// borderType: 'style-1',
|
|
413
|
-
// border: 'solid',
|
|
414
|
-
// width: '0px 0px 0px 0px',
|
|
415
|
-
// position: 'all',
|
|
416
|
-
// borderWidth: '0px',
|
|
417
|
-
// color: '#121212',
|
|
418
|
-
// isCustom: true,
|
|
419
|
-
// },
|
|
420
|
-
// active: {
|
|
421
|
-
// borderType: 'style-1',
|
|
422
|
-
// border: 'solid',
|
|
423
|
-
// width: '0px 0px 0px 0px',
|
|
424
|
-
// position: 'all',
|
|
425
|
-
// borderWidth: '0px',
|
|
426
|
-
// color: '#121212',
|
|
427
|
-
// isCustom: true,
|
|
428
|
-
// },
|
|
429
|
-
// },
|
|
430
|
-
// options: [
|
|
431
|
-
// {
|
|
432
|
-
// borderLabel: 'None',
|
|
433
|
-
// borderType: 'none',
|
|
434
|
-
// borderStyle: 'none',
|
|
435
|
-
// borderWidth: '0px 0px 0px 0px',
|
|
436
|
-
// borderColor: 'transparent',
|
|
437
|
-
// },
|
|
438
|
-
// {
|
|
439
|
-
// borderLabel: 'Style 1',
|
|
440
|
-
// borderType: 'style-1',
|
|
441
|
-
// borderStyle: 'solid',
|
|
442
|
-
// borderWidth: '1px 1px 1px 1px',
|
|
443
|
-
// borderColor: '#121212',
|
|
444
|
-
// },
|
|
445
|
-
// {
|
|
446
|
-
// borderLabel: 'Style 2',
|
|
447
|
-
// borderType: 'style-2',
|
|
448
|
-
// borderStyle: 'dotted',
|
|
449
|
-
// borderWidth: '1px 1px 1px 1px',
|
|
450
|
-
// borderColor: '#121212',
|
|
451
|
-
// },
|
|
452
|
-
// {
|
|
453
|
-
// borderLabel: 'Style 3',
|
|
454
|
-
// borderType: 'style-3',
|
|
455
|
-
// borderStyle: 'dashed',
|
|
456
|
-
// borderWidth: '1px 1px 1px 1px',
|
|
457
|
-
// borderColor: '#121212',
|
|
458
|
-
// },
|
|
459
|
-
// ],
|
|
460
|
-
// state: {
|
|
461
|
-
// hover: true,
|
|
462
|
-
// normal: true,
|
|
463
|
-
// active: true,
|
|
464
|
-
// },
|
|
465
|
-
// },
|
|
466
|
-
// {
|
|
467
|
-
// id: 'itemRounded',
|
|
468
|
-
// type: 'radius-preset',
|
|
469
|
-
// label: 'Corner',
|
|
470
|
-
// default: {
|
|
471
|
-
// normal: {
|
|
472
|
-
// radiusType: 'none',
|
|
473
|
-
// },
|
|
474
|
-
// hover: {
|
|
475
|
-
// radiusType: 'none',
|
|
476
|
-
// },
|
|
477
|
-
// active: {
|
|
478
|
-
// radiusType: 'none',
|
|
479
|
-
// },
|
|
480
|
-
// },
|
|
481
|
-
// state: {
|
|
482
|
-
// hover: true,
|
|
483
|
-
// normal: true,
|
|
484
|
-
// active: true,
|
|
485
|
-
// },
|
|
486
|
-
// },
|
|
487
395
|
{
|
|
488
396
|
id: 'headerBorder',
|
|
489
397
|
type: 'border',
|
|
@@ -526,17 +434,6 @@ const AccordionSettings = [
|
|
|
526
434
|
type: 'group',
|
|
527
435
|
label: 'Dimension',
|
|
528
436
|
controls: [
|
|
529
|
-
// {
|
|
530
|
-
// id: 'itemsSpacing',
|
|
531
|
-
// label: 'Item spacing',
|
|
532
|
-
// type: 'input:unit',
|
|
533
|
-
// units: ['px'],
|
|
534
|
-
// emptyOnClear: true,
|
|
535
|
-
// placeholder: 'None',
|
|
536
|
-
// devices: {
|
|
537
|
-
// desktop: { default: undefined },
|
|
538
|
-
// },
|
|
539
|
-
// },
|
|
540
437
|
{
|
|
541
438
|
id: 'widthHeightSize',
|
|
542
439
|
type: 'size-setting',
|
|
@@ -691,17 +588,20 @@ const AccordionSettings = [
|
|
|
691
588
|
{
|
|
692
589
|
label: 'Left',
|
|
693
590
|
value: 'left',
|
|
694
|
-
type: 'align'
|
|
591
|
+
type: 'align',
|
|
592
|
+
tooltip: 'Align left'
|
|
695
593
|
},
|
|
696
594
|
{
|
|
697
595
|
label: 'Center',
|
|
698
596
|
value: 'center',
|
|
699
|
-
type: 'align'
|
|
597
|
+
type: 'align',
|
|
598
|
+
tooltip: 'Align center'
|
|
700
599
|
},
|
|
701
600
|
{
|
|
702
601
|
label: 'Right',
|
|
703
602
|
value: 'right',
|
|
704
|
-
type: 'align'
|
|
603
|
+
type: 'align',
|
|
604
|
+
tooltip: 'Align right'
|
|
705
605
|
}
|
|
706
606
|
]
|
|
707
607
|
},
|
|
@@ -8,7 +8,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
10
|
import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutTextClasses, getRenderChildrenClasses } from './common/classes.js';
|
|
11
|
-
import { getParentSettings, MINIMUM_CHILD, BODY_CHILD_INDEX
|
|
11
|
+
import { getParentSettings, MINIMUM_CHILD, BODY_CHILD_INDEX } from './common/index.js';
|
|
12
12
|
|
|
13
13
|
const AccordionItem = (props)=>{
|
|
14
14
|
const { children, index, parentUid, title, childrenIcon } = props;
|
|
@@ -97,7 +97,7 @@ const AccordionItem = (props)=>{
|
|
|
97
97
|
className: composeLayoutTextClasses,
|
|
98
98
|
style: composeLayoutTextStyles,
|
|
99
99
|
dangerouslySetInnerHTML: {
|
|
100
|
-
__html: childrenIcon ??
|
|
100
|
+
__html: childrenIcon ?? ''
|
|
101
101
|
}
|
|
102
102
|
})
|
|
103
103
|
})),
|
|
@@ -123,10 +123,8 @@ const AccordionItem = (props)=>{
|
|
|
123
123
|
...composeIconPaddingGlobalSize
|
|
124
124
|
},
|
|
125
125
|
children: /*#__PURE__*/ jsx("span", {
|
|
126
|
-
style: composeLayoutTextStyles,
|
|
127
|
-
className: composeLayoutTextClasses,
|
|
128
126
|
dangerouslySetInnerHTML: {
|
|
129
|
-
__html: childrenIcon ??
|
|
127
|
+
__html: childrenIcon ?? ''
|
|
130
128
|
}
|
|
131
129
|
})
|
|
132
130
|
}))
|
|
@@ -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-
|
|
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');
|
|
35
35
|
const getRenderChildrenClasses = (styles, extraData)=>{
|
|
36
36
|
const { isShow, hasTransitionedIn, isMounted } = extraData || {};
|
|
37
37
|
const { itemContentSpacing, contentSizePadding } = styles ?? {};
|
|
@@ -4,8 +4,6 @@ const MINIMUM_CHILD = 1;
|
|
|
4
4
|
const BODY_CHILD_INDEX = 0;
|
|
5
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
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
|
-
const ICON_MINUS = `<svg width='16' height='16' fill='currentColor' viewBox="0 0 448 512"><path fill='currentColor' d="M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z"/></svg>`;
|
|
8
|
-
const ICON_PLUS = `<svg fill='currentColor' width='16' height='16' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill='currentColor' d="M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z"/></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;
|
|
@@ -83,7 +81,7 @@ const getParentSettings = (parentSettings = {})=>{
|
|
|
83
81
|
};
|
|
84
82
|
const getSettingItemLiquid = (props)=>{
|
|
85
83
|
const { index, accordions, parentSetting, parentStyle } = props;
|
|
86
|
-
const {
|
|
84
|
+
const { titleTypo, iconCollapse, iconExpand, activeKey, expandItem } = parentSetting ?? {};
|
|
87
85
|
delete titleTypo?.attrs?.color;
|
|
88
86
|
const { itemContentSpacing, iconColor, contentSizePadding } = parentStyle ?? {};
|
|
89
87
|
const isShow = !expandItem ? false : activeKey?.toString()?.toLowerCase() === 'all' ? true : accordions?.includes(index?.toString() ?? '');
|
|
@@ -105,15 +103,6 @@ const getSettingItemLiquid = (props)=>{
|
|
|
105
103
|
if (iconCollapse && !isShow) {
|
|
106
104
|
return iconCollapse;
|
|
107
105
|
}
|
|
108
|
-
if (iconSvg === 'plus') {
|
|
109
|
-
if (isShow) {
|
|
110
|
-
return ICON_MINUS;
|
|
111
|
-
}
|
|
112
|
-
return ICON_PLUS;
|
|
113
|
-
}
|
|
114
|
-
if (iconSvg) {
|
|
115
|
-
return iconSvg;
|
|
116
|
-
}
|
|
117
106
|
};
|
|
118
107
|
const collapsibleIcon = makeIcon();
|
|
119
108
|
const composeIconColor = ()=>{
|
|
@@ -133,4 +122,4 @@ const getSettingItemLiquid = (props)=>{
|
|
|
133
122
|
};
|
|
134
123
|
};
|
|
135
124
|
|
|
136
|
-
export { BODY_CHILD_INDEX, DEFAULT_AFTER_ICON, DEFAULT_BEFORE_ICON,
|
|
125
|
+
export { BODY_CHILD_INDEX, DEFAULT_AFTER_ICON, DEFAULT_BEFORE_ICON, MINIMUM_CHILD, getDataState, getParentSettings, getSettingItemLiquid };
|
|
@@ -40,7 +40,7 @@ const getItemContainerStyles = (styles, isShow)=>{
|
|
|
40
40
|
...getStyleShadow({
|
|
41
41
|
value: accordionShadow,
|
|
42
42
|
styleAppliedFor: 'box-shadow',
|
|
43
|
-
isEnableShadow: accordionShadow?.
|
|
43
|
+
isEnableShadow: accordionShadow?.enable == undefined || accordionShadow?.enable == true ? true : false
|
|
44
44
|
}),
|
|
45
45
|
...getRadiusStyleActiveState({
|
|
46
46
|
...roundedContent,
|
|
@@ -2,11 +2,10 @@ import { makeGlobalSize, useEditorMode, makeStyle, getGlobalColorStateStyle, com
|
|
|
2
2
|
import { useState, useEffect, useMemo } from 'react';
|
|
3
3
|
import useMountTransition from './useMountTransition.js';
|
|
4
4
|
import { useGetProductId } from '../../components/hooks/useGetProductId.js';
|
|
5
|
-
import { ICON_MINUS, ICON_PLUS } from '../components/common/index.js';
|
|
6
5
|
|
|
7
6
|
const useAccordionItem = (props)=>{
|
|
8
7
|
const { accordions, index, builderProps, parentSetting = {}, parentStyle = {}, handleDropDown } = props;
|
|
9
|
-
const {
|
|
8
|
+
const { iconPosition, titleTypo, iconCollapse, iconExpand } = parentSetting;
|
|
10
9
|
delete titleTypo?.attrs?.color;
|
|
11
10
|
const { itemContentSpacing, iconColor, contentSizePadding } = parentStyle;
|
|
12
11
|
const isShow = accordions?.includes(index?.toString() ?? '');
|
|
@@ -26,17 +25,7 @@ const useAccordionItem = (props)=>{
|
|
|
26
25
|
if (iconCollapse && !isShow) {
|
|
27
26
|
return iconCollapse;
|
|
28
27
|
}
|
|
29
|
-
if (iconSvg === 'plus') {
|
|
30
|
-
if (isShow) {
|
|
31
|
-
return ICON_MINUS;
|
|
32
|
-
}
|
|
33
|
-
return ICON_PLUS;
|
|
34
|
-
}
|
|
35
|
-
if (iconSvg) {
|
|
36
|
-
return iconSvg;
|
|
37
|
-
}
|
|
38
28
|
}, [
|
|
39
|
-
iconSvg,
|
|
40
29
|
isShow,
|
|
41
30
|
iconCollapse,
|
|
42
31
|
iconExpand
|
|
@@ -55,6 +55,7 @@ const config = {
|
|
|
55
55
|
styles: {
|
|
56
56
|
},
|
|
57
57
|
advanced: {
|
|
58
|
+
of: 'hidden',
|
|
58
59
|
margin: {
|
|
59
60
|
bottom: 'var(--g-s-l)'
|
|
60
61
|
}
|
|
@@ -115,6 +116,7 @@ const config = {
|
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
118
|
advanced: {
|
|
119
|
+
of: 'hidden',
|
|
118
120
|
margin: {
|
|
119
121
|
bottom: 'var(--g-s-l)'
|
|
120
122
|
}
|
|
@@ -197,6 +199,7 @@ const config = {
|
|
|
197
199
|
itemGap: '16px'
|
|
198
200
|
},
|
|
199
201
|
advanced: {
|
|
202
|
+
of: 'hidden',
|
|
200
203
|
margin: {
|
|
201
204
|
bottom: 'var(--g-s-l)'
|
|
202
205
|
}
|
|
@@ -149,26 +149,23 @@ const AccordionSettings = [
|
|
|
149
149
|
{
|
|
150
150
|
id: 'layoutHeader',
|
|
151
151
|
label: 'Layout',
|
|
152
|
-
type: '
|
|
153
|
-
iconViewBox: '0 0 78 52',
|
|
154
|
-
enableItemBackground: true,
|
|
155
|
-
enableTooltip: true,
|
|
152
|
+
type: 'option:illustration',
|
|
156
153
|
default: 'before-text',
|
|
157
154
|
options: [
|
|
158
155
|
{
|
|
159
156
|
label: 'Text only',
|
|
160
157
|
value: 'text-only',
|
|
161
|
-
|
|
158
|
+
svgName: 'gp-accordion-header-no-icon'
|
|
162
159
|
},
|
|
163
160
|
{
|
|
164
161
|
label: 'Icon before text',
|
|
165
162
|
value: 'before-text',
|
|
166
|
-
|
|
163
|
+
svgName: 'gp-accordion-header-left-icon'
|
|
167
164
|
},
|
|
168
165
|
{
|
|
169
166
|
label: 'Icon after text',
|
|
170
167
|
value: 'after-text',
|
|
171
|
-
|
|
168
|
+
svgName: 'gp-accordion-header-right-icon'
|
|
172
169
|
}
|
|
173
170
|
]
|
|
174
171
|
},
|
|
@@ -176,8 +173,14 @@ const AccordionSettings = [
|
|
|
176
173
|
id: 'childConfig',
|
|
177
174
|
type: 'child-icon',
|
|
178
175
|
label: '',
|
|
179
|
-
initIcon:
|
|
180
|
-
|
|
176
|
+
initIcon: `<svg data-name="Check-round" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
177
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9497 3.05025C10.2161 0.316582 5.78392 0.316582 3.05025 3.05025C0.316582 5.78392 0.316582 10.2161 3.05025 12.9497C5.78392 15.6834 10.2161 15.6834 12.9497 12.9497C15.6834 10.2161 15.6834 5.78392 12.9497 3.05025ZM11.3274 5.0505C11.5422 5.22402 11.5757 5.53883 11.4022 5.75365L7.45811 10.6366C7.37161 10.7437 7.24479 10.8104 7.10755 10.821C6.9703 10.8316 6.83476 10.7851 6.73289 10.6925L4.6364 8.78745C4.43203 8.60174 4.41691 8.28552 4.60262 8.08115C4.78833 7.87678 5.10455 7.86165 5.30892 8.04736L7.01318 9.59601L10.6243 5.1253C10.7978 4.91048 11.1126 4.87699 11.3274 5.0505Z" />
|
|
178
|
+
</svg>
|
|
179
|
+
`,
|
|
180
|
+
default: new Array(3).fill(`<svg data-name="Check-round" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
181
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9497 3.05025C10.2161 0.316582 5.78392 0.316582 3.05025 3.05025C0.316582 5.78392 0.316582 10.2161 3.05025 12.9497C5.78392 15.6834 10.2161 15.6834 12.9497 12.9497C15.6834 10.2161 15.6834 5.78392 12.9497 3.05025ZM11.3274 5.0505C11.5422 5.22402 11.5757 5.53883 11.4022 5.75365L7.45811 10.6366C7.37161 10.7437 7.24479 10.8104 7.10755 10.821C6.9703 10.8316 6.83476 10.7851 6.73289 10.6925L4.6364 8.78745C4.43203 8.60174 4.41691 8.28552 4.60262 8.08115C4.78833 7.87678 5.10455 7.86165 5.30892 8.04736L7.01318 9.59601L10.6243 5.1253C10.7978 4.91048 11.1126 4.87699 11.3274 5.0505Z" />
|
|
182
|
+
</svg>
|
|
183
|
+
`)
|
|
181
184
|
},
|
|
182
185
|
{
|
|
183
186
|
id: 'configIconSize',
|
|
@@ -216,8 +219,10 @@ const AccordionSettings = [
|
|
|
216
219
|
type: 'icon',
|
|
217
220
|
label: 'Icon',
|
|
218
221
|
default: `
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
<svg data-name="Chevron-up" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
223
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.6243 9.82426C11.39 10.0586 11.0101 10.0586 10.7758 9.82426L8.00005 7.04853L5.22431 9.82426C4.99 10.0586 4.6101 10.0586 4.37579 9.82426C4.14147 9.58995 4.14147 9.21005 4.37579 8.97574L7.57579 5.77574C7.8101 5.54142 8.19 5.54142 8.42431 5.77574L11.6243 8.97574C11.8586 9.21005 11.8586 9.58995 11.6243 9.82426Z" fill="#F9F9F9"/>
|
|
224
|
+
</svg>
|
|
225
|
+
`,
|
|
221
226
|
hideInput: true,
|
|
222
227
|
hideLabel: true
|
|
223
228
|
},
|
|
@@ -226,8 +231,9 @@ const AccordionSettings = [
|
|
|
226
231
|
type: 'icon',
|
|
227
232
|
label: 'Icon',
|
|
228
233
|
default: `
|
|
229
|
-
|
|
230
|
-
|
|
234
|
+
<svg data-name="Chevron-down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
235
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77571C4.81007 6.5414 5.18997 6.5414 5.42429 6.77571L8.20002 9.55145L10.9758 6.77571C11.2101 6.5414 11.59 6.5414 11.8243 6.77571C12.0586 7.01003 12.0586 7.38993 11.8243 7.62424L8.62429 10.8242C8.38997 11.0586 8.01007 11.0586 7.77576 10.8242L4.57576 7.62424C4.34145 7.38993 4.34145 7.01003 4.57576 6.77571Z" fill="#F9F9F9"/>
|
|
236
|
+
</svg>
|
|
231
237
|
`,
|
|
232
238
|
hideInput: true,
|
|
233
239
|
hideLabel: true
|
|
@@ -337,9 +343,7 @@ const AccordionSettings = [
|
|
|
337
343
|
type: 'color-picker-v2',
|
|
338
344
|
label: 'Text color',
|
|
339
345
|
default: {
|
|
340
|
-
normal: '#121212'
|
|
341
|
-
hover: '#121212',
|
|
342
|
-
active: '#121212'
|
|
346
|
+
normal: '#121212'
|
|
343
347
|
},
|
|
344
348
|
state: {
|
|
345
349
|
hover: true,
|
|
@@ -352,9 +356,7 @@ const AccordionSettings = [
|
|
|
352
356
|
type: 'color-picker-v2',
|
|
353
357
|
label: 'Collapsible icon color',
|
|
354
358
|
default: {
|
|
355
|
-
normal: '#121212'
|
|
356
|
-
hover: '#121212',
|
|
357
|
-
active: '#121212'
|
|
359
|
+
normal: '#121212'
|
|
358
360
|
},
|
|
359
361
|
state: {
|
|
360
362
|
hover: true,
|
|
@@ -367,9 +369,7 @@ const AccordionSettings = [
|
|
|
367
369
|
type: 'color-picker-v2',
|
|
368
370
|
label: 'Collapsible icon color',
|
|
369
371
|
default: {
|
|
370
|
-
normal: '#121212'
|
|
371
|
-
hover: '#121212',
|
|
372
|
-
active: '#121212'
|
|
372
|
+
normal: '#121212'
|
|
373
373
|
},
|
|
374
374
|
state: {
|
|
375
375
|
hover: true,
|
|
@@ -382,9 +382,7 @@ const AccordionSettings = [
|
|
|
382
382
|
type: 'color-picker-v2',
|
|
383
383
|
label: 'Background Color',
|
|
384
384
|
default: {
|
|
385
|
-
normal: '#ffffff'
|
|
386
|
-
hover: '#ffffff',
|
|
387
|
-
active: '#ffffff'
|
|
385
|
+
normal: '#ffffff'
|
|
388
386
|
},
|
|
389
387
|
state: {
|
|
390
388
|
hover: true,
|
|
@@ -392,96 +390,6 @@ const AccordionSettings = [
|
|
|
392
390
|
active: true
|
|
393
391
|
}
|
|
394
392
|
},
|
|
395
|
-
// {
|
|
396
|
-
// id: 'itemBorder',
|
|
397
|
-
// type: 'border',
|
|
398
|
-
// label: 'Border',
|
|
399
|
-
// default: {
|
|
400
|
-
// normal: {
|
|
401
|
-
// borderType: 'style-1',
|
|
402
|
-
// border: 'solid',
|
|
403
|
-
// width: '0px 0px 0px 0px',
|
|
404
|
-
// position: 'all',
|
|
405
|
-
// borderWidth: '0px',
|
|
406
|
-
// color: 'transparent',
|
|
407
|
-
// isCustom: true,
|
|
408
|
-
// },
|
|
409
|
-
// hover: {
|
|
410
|
-
// borderType: 'style-1',
|
|
411
|
-
// border: 'solid',
|
|
412
|
-
// width: '0px 0px 0px 0px',
|
|
413
|
-
// position: 'all',
|
|
414
|
-
// borderWidth: '0px',
|
|
415
|
-
// color: '#121212',
|
|
416
|
-
// isCustom: true,
|
|
417
|
-
// },
|
|
418
|
-
// active: {
|
|
419
|
-
// borderType: 'style-1',
|
|
420
|
-
// border: 'solid',
|
|
421
|
-
// width: '0px 0px 0px 0px',
|
|
422
|
-
// position: 'all',
|
|
423
|
-
// borderWidth: '0px',
|
|
424
|
-
// color: '#121212',
|
|
425
|
-
// isCustom: true,
|
|
426
|
-
// },
|
|
427
|
-
// },
|
|
428
|
-
// options: [
|
|
429
|
-
// {
|
|
430
|
-
// borderLabel: 'None',
|
|
431
|
-
// borderType: 'none',
|
|
432
|
-
// borderStyle: 'none',
|
|
433
|
-
// borderWidth: '0px 0px 0px 0px',
|
|
434
|
-
// borderColor: 'transparent',
|
|
435
|
-
// },
|
|
436
|
-
// {
|
|
437
|
-
// borderLabel: 'Style 1',
|
|
438
|
-
// borderType: 'style-1',
|
|
439
|
-
// borderStyle: 'solid',
|
|
440
|
-
// borderWidth: '1px 1px 1px 1px',
|
|
441
|
-
// borderColor: '#121212',
|
|
442
|
-
// },
|
|
443
|
-
// {
|
|
444
|
-
// borderLabel: 'Style 2',
|
|
445
|
-
// borderType: 'style-2',
|
|
446
|
-
// borderStyle: 'dotted',
|
|
447
|
-
// borderWidth: '1px 1px 1px 1px',
|
|
448
|
-
// borderColor: '#121212',
|
|
449
|
-
// },
|
|
450
|
-
// {
|
|
451
|
-
// borderLabel: 'Style 3',
|
|
452
|
-
// borderType: 'style-3',
|
|
453
|
-
// borderStyle: 'dashed',
|
|
454
|
-
// borderWidth: '1px 1px 1px 1px',
|
|
455
|
-
// borderColor: '#121212',
|
|
456
|
-
// },
|
|
457
|
-
// ],
|
|
458
|
-
// state: {
|
|
459
|
-
// hover: true,
|
|
460
|
-
// normal: true,
|
|
461
|
-
// active: true,
|
|
462
|
-
// },
|
|
463
|
-
// },
|
|
464
|
-
// {
|
|
465
|
-
// id: 'itemRounded',
|
|
466
|
-
// type: 'radius-preset',
|
|
467
|
-
// label: 'Corner',
|
|
468
|
-
// default: {
|
|
469
|
-
// normal: {
|
|
470
|
-
// radiusType: 'none',
|
|
471
|
-
// },
|
|
472
|
-
// hover: {
|
|
473
|
-
// radiusType: 'none',
|
|
474
|
-
// },
|
|
475
|
-
// active: {
|
|
476
|
-
// radiusType: 'none',
|
|
477
|
-
// },
|
|
478
|
-
// },
|
|
479
|
-
// state: {
|
|
480
|
-
// hover: true,
|
|
481
|
-
// normal: true,
|
|
482
|
-
// active: true,
|
|
483
|
-
// },
|
|
484
|
-
// },
|
|
485
393
|
{
|
|
486
394
|
id: 'headerBorder',
|
|
487
395
|
type: 'border',
|
|
@@ -524,17 +432,6 @@ const AccordionSettings = [
|
|
|
524
432
|
type: 'group',
|
|
525
433
|
label: 'Dimension',
|
|
526
434
|
controls: [
|
|
527
|
-
// {
|
|
528
|
-
// id: 'itemsSpacing',
|
|
529
|
-
// label: 'Item spacing',
|
|
530
|
-
// type: 'input:unit',
|
|
531
|
-
// units: ['px'],
|
|
532
|
-
// emptyOnClear: true,
|
|
533
|
-
// placeholder: 'None',
|
|
534
|
-
// devices: {
|
|
535
|
-
// desktop: { default: undefined },
|
|
536
|
-
// },
|
|
537
|
-
// },
|
|
538
435
|
{
|
|
539
436
|
id: 'widthHeightSize',
|
|
540
437
|
type: 'size-setting',
|
|
@@ -689,17 +586,20 @@ const AccordionSettings = [
|
|
|
689
586
|
{
|
|
690
587
|
label: 'Left',
|
|
691
588
|
value: 'left',
|
|
692
|
-
type: 'align'
|
|
589
|
+
type: 'align',
|
|
590
|
+
tooltip: 'Align left'
|
|
693
591
|
},
|
|
694
592
|
{
|
|
695
593
|
label: 'Center',
|
|
696
594
|
value: 'center',
|
|
697
|
-
type: 'align'
|
|
595
|
+
type: 'align',
|
|
596
|
+
tooltip: 'Align center'
|
|
698
597
|
},
|
|
699
598
|
{
|
|
700
599
|
label: 'Right',
|
|
701
600
|
value: 'right',
|
|
702
|
-
type: 'align'
|
|
601
|
+
type: 'align',
|
|
602
|
+
tooltip: 'Align right'
|
|
703
603
|
}
|
|
704
604
|
]
|
|
705
605
|
},
|