@elementor/editor-editing-panel 4.1.0-723 → 4.1.0-724
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/index.js +33 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/styles-inheritance/components/infotip/value-component.tsx +20 -17
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +8 -10
- package/src/styles-inheritance/init-styles-inheritance-transformers.ts +1 -1
- package/src/styles-inheritance/transformers/array-transformer.tsx +13 -5
- package/src/styles-inheritance/transformers/box-shadow-transformer.tsx +5 -7
- package/src/styles-inheritance/transformers/repeater-to-items-transformer.tsx +2 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "4.1.0-
|
|
3
|
+
"version": "4.1.0-724",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,28 +39,28 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor": "4.1.0-
|
|
43
|
-
"@elementor/editor-canvas": "4.1.0-
|
|
44
|
-
"@elementor/editor-controls": "4.1.0-
|
|
45
|
-
"@elementor/editor-documents": "4.1.0-
|
|
46
|
-
"@elementor/editor-elements": "4.1.0-
|
|
47
|
-
"@elementor/editor-interactions": "4.1.0-
|
|
48
|
-
"@elementor/editor-panels": "4.1.0-
|
|
49
|
-
"@elementor/editor-props": "4.1.0-
|
|
50
|
-
"@elementor/editor-responsive": "4.1.0-
|
|
51
|
-
"@elementor/editor-styles": "4.1.0-
|
|
52
|
-
"@elementor/editor-styles-repository": "4.1.0-
|
|
53
|
-
"@elementor/editor-ui": "4.1.0-
|
|
54
|
-
"@elementor/editor-v1-adapters": "4.1.0-
|
|
42
|
+
"@elementor/editor": "4.1.0-724",
|
|
43
|
+
"@elementor/editor-canvas": "4.1.0-724",
|
|
44
|
+
"@elementor/editor-controls": "4.1.0-724",
|
|
45
|
+
"@elementor/editor-documents": "4.1.0-724",
|
|
46
|
+
"@elementor/editor-elements": "4.1.0-724",
|
|
47
|
+
"@elementor/editor-interactions": "4.1.0-724",
|
|
48
|
+
"@elementor/editor-panels": "4.1.0-724",
|
|
49
|
+
"@elementor/editor-props": "4.1.0-724",
|
|
50
|
+
"@elementor/editor-responsive": "4.1.0-724",
|
|
51
|
+
"@elementor/editor-styles": "4.1.0-724",
|
|
52
|
+
"@elementor/editor-styles-repository": "4.1.0-724",
|
|
53
|
+
"@elementor/editor-ui": "4.1.0-724",
|
|
54
|
+
"@elementor/editor-v1-adapters": "4.1.0-724",
|
|
55
55
|
"@elementor/icons": "^1.68.0",
|
|
56
|
-
"@elementor/editor-variables": "4.1.0-
|
|
57
|
-
"@elementor/locations": "4.1.0-
|
|
58
|
-
"@elementor/menus": "4.1.0-
|
|
59
|
-
"@elementor/schema": "4.1.0-
|
|
60
|
-
"@elementor/session": "4.1.0-
|
|
56
|
+
"@elementor/editor-variables": "4.1.0-724",
|
|
57
|
+
"@elementor/locations": "4.1.0-724",
|
|
58
|
+
"@elementor/menus": "4.1.0-724",
|
|
59
|
+
"@elementor/schema": "4.1.0-724",
|
|
60
|
+
"@elementor/session": "4.1.0-724",
|
|
61
61
|
"@elementor/ui": "1.36.17",
|
|
62
|
-
"@elementor/utils": "4.1.0-
|
|
63
|
-
"@elementor/wp-media": "4.1.0-
|
|
62
|
+
"@elementor/utils": "4.1.0-724",
|
|
63
|
+
"@elementor/wp-media": "4.1.0-724",
|
|
64
64
|
"@wordpress/i18n": "^5.13.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Typography } from '@elementor/ui';
|
|
2
|
+
import { Tooltip, Typography } from '@elementor/ui';
|
|
3
3
|
|
|
4
4
|
type Props = {
|
|
5
5
|
index: number;
|
|
@@ -8,21 +8,24 @@ type Props = {
|
|
|
8
8
|
|
|
9
9
|
export const ValueComponent = ( { index, value }: Props ) => {
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
<Tooltip title={ value } placement="top">
|
|
12
|
+
<Typography
|
|
13
|
+
variant="caption"
|
|
14
|
+
color="text.tertiary"
|
|
15
|
+
sx={ {
|
|
16
|
+
mt: '1px',
|
|
17
|
+
textDecoration: index === 0 ? 'none' : 'line-through',
|
|
18
|
+
overflow: 'hidden',
|
|
19
|
+
display: '-webkit-box',
|
|
20
|
+
WebkitLineClamp: 1,
|
|
21
|
+
WebkitBoxOrient: 'vertical',
|
|
22
|
+
pl: 2.5,
|
|
23
|
+
minWidth: 0,
|
|
24
|
+
maxWidth: '100%',
|
|
25
|
+
} }
|
|
26
|
+
>
|
|
27
|
+
{ value }
|
|
28
|
+
</Typography>
|
|
29
|
+
</Tooltip>
|
|
27
30
|
);
|
|
28
31
|
};
|
|
@@ -125,7 +125,7 @@ export const StylesInheritanceInfotip = ( {
|
|
|
125
125
|
},
|
|
126
126
|
} }
|
|
127
127
|
>
|
|
128
|
-
<Stack gap={ 1.5 } sx={ { pl:
|
|
128
|
+
<Stack gap={ 1.5 } sx={ { pl: 2, pr: 1, pt: 1.5, pb: 1.5 } } role="list">
|
|
129
129
|
{ items.map( ( item, index ) => {
|
|
130
130
|
return (
|
|
131
131
|
<Box
|
|
@@ -235,15 +235,13 @@ function TooltipOrInfotip( {
|
|
|
235
235
|
sx: { mx: 2 },
|
|
236
236
|
},
|
|
237
237
|
} }
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
],
|
|
246
|
-
},
|
|
238
|
+
PopperProps={ {
|
|
239
|
+
modifiers: [
|
|
240
|
+
{
|
|
241
|
+
name: 'offset',
|
|
242
|
+
options: { offset: [ offsetX, 0 ] },
|
|
243
|
+
},
|
|
244
|
+
],
|
|
247
245
|
} }
|
|
248
246
|
>
|
|
249
247
|
{ children }
|
|
@@ -53,7 +53,7 @@ function registerCustomTransformers( originalStyleTransformers: ReturnType< type
|
|
|
53
53
|
);
|
|
54
54
|
stylesInheritanceTransformersRegistry.register(
|
|
55
55
|
'transition',
|
|
56
|
-
createRepeaterToItemsTransformer( originalStyleTransformers.transition
|
|
56
|
+
createRepeaterToItemsTransformer( originalStyleTransformers.transition )
|
|
57
57
|
);
|
|
58
58
|
|
|
59
59
|
[ 'background-overlay', 'box-shadow', 'transform-functions' ].forEach( ( propType ) =>
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { createTransformer } from '@elementor/editor-canvas';
|
|
4
|
-
import { Stack } from '@elementor/ui';
|
|
5
4
|
|
|
6
|
-
type ArrayValues = ReactNode[];
|
|
5
|
+
type ArrayValues = ReactNode | ReactNode[];
|
|
7
6
|
|
|
8
7
|
export const arrayTransformer = createTransformer( ( values: ArrayValues[] ) => {
|
|
9
8
|
if ( ! values || values.length === 0 ) {
|
|
10
9
|
return null;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
const allStrings = values.every( ( item ) => typeof item === 'string' || typeof item === 'number' );
|
|
13
|
+
|
|
14
|
+
if ( allStrings ) {
|
|
15
|
+
return ( values as ( string | number )[] ).join( ' ' );
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
return (
|
|
14
|
-
|
|
19
|
+
<>
|
|
15
20
|
{ values.map( ( item, index ) => (
|
|
16
|
-
<
|
|
21
|
+
<React.Fragment key={ index }>
|
|
22
|
+
{ index > 0 && ' ' }
|
|
23
|
+
{ item }
|
|
24
|
+
</React.Fragment>
|
|
17
25
|
) ) }
|
|
18
|
-
|
|
26
|
+
</>
|
|
19
27
|
);
|
|
20
28
|
} );
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
2
3
|
import { createTransformer } from '@elementor/editor-canvas';
|
|
3
|
-
import { Stack } from '@elementor/ui';
|
|
4
4
|
|
|
5
5
|
type Shadow = {
|
|
6
6
|
hOffset?: string;
|
|
7
7
|
vOffset?: string;
|
|
8
8
|
blur?: string;
|
|
9
9
|
spread?: string;
|
|
10
|
-
color?:
|
|
10
|
+
color?: ReactNode;
|
|
11
11
|
position?: string | null;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -23,10 +23,8 @@ export const boxShadowTransformer = createTransformer( ( value: Shadow ) => {
|
|
|
23
23
|
const positionValue = position || 'outset';
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</span>
|
|
30
|
-
</Stack>
|
|
26
|
+
<>
|
|
27
|
+
{ colorValue } { positionValue }, { sizes }
|
|
28
|
+
</>
|
|
31
29
|
);
|
|
32
30
|
} );
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type AnyTransformer, createTransformer } from '@elementor/editor-canvas';
|
|
3
|
-
import { Stack } from '@elementor/ui';
|
|
4
2
|
|
|
5
|
-
export const createRepeaterToItemsTransformer = ( originalTransformer: AnyTransformer
|
|
3
|
+
export const createRepeaterToItemsTransformer = ( originalTransformer: AnyTransformer ) => {
|
|
6
4
|
return createTransformer( ( value: string, options: { key: string; signal?: AbortSignal } ) => {
|
|
7
5
|
const stringResult = originalTransformer( value, options );
|
|
8
6
|
|
|
@@ -10,18 +8,6 @@ export const createRepeaterToItemsTransformer = ( originalTransformer: AnyTransf
|
|
|
10
8
|
return stringResult;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if ( parts.length <= 1 ) {
|
|
16
|
-
return stringResult;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Stack direction="column" gap={ 0.5 }>
|
|
21
|
-
{ parts.map( ( part, index ) => (
|
|
22
|
-
<Stack key={ index }>{ part.trim() }</Stack>
|
|
23
|
-
) ) }
|
|
24
|
-
</Stack>
|
|
25
|
-
);
|
|
11
|
+
return stringResult;
|
|
26
12
|
} );
|
|
27
13
|
};
|