@elementor/editor-editing-panel 1.11.0 → 1.11.1
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/CHANGELOG.md +16 -0
- package/dist/index.js +190 -180
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/style-sections/border-section/border-radius-field.tsx +33 -14
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@elementor/editor": "0.18.0",
|
|
43
|
-
"@elementor/editor-controls": "0.
|
|
44
|
-
"@elementor/editor-elements": "0.5.
|
|
43
|
+
"@elementor/editor-controls": "0.10.0",
|
|
44
|
+
"@elementor/editor-elements": "0.5.3",
|
|
45
45
|
"@elementor/editor-panels": "0.11.0",
|
|
46
|
-
"@elementor/editor-props": "0.9.
|
|
46
|
+
"@elementor/editor-props": "0.9.1",
|
|
47
47
|
"@elementor/editor-responsive": "0.13.0",
|
|
48
|
-
"@elementor/editor-styles": "0.5.
|
|
49
|
-
"@elementor/editor-styles-repository": "0.7.
|
|
50
|
-
"@elementor/editor-ui": "0.
|
|
48
|
+
"@elementor/editor-styles": "0.5.6",
|
|
49
|
+
"@elementor/editor-styles-repository": "0.7.1",
|
|
50
|
+
"@elementor/editor-ui": "0.3.0",
|
|
51
51
|
"@elementor/editor-v1-adapters": "0.10.0",
|
|
52
52
|
"@elementor/icons": "1.31.0",
|
|
53
53
|
"@elementor/locations": "0.7.6",
|
|
@@ -8,38 +8,57 @@ import {
|
|
|
8
8
|
RadiusTopLeftIcon,
|
|
9
9
|
RadiusTopRightIcon,
|
|
10
10
|
} from '@elementor/icons';
|
|
11
|
+
import { withDirection } from '@elementor/ui';
|
|
11
12
|
import { __ } from '@wordpress/i18n';
|
|
12
13
|
|
|
13
14
|
import { StylesField } from '../../../controls-registry/styles-field';
|
|
15
|
+
import { useDirection } from '../../../hooks/use-direction';
|
|
16
|
+
import { RotatedIcon } from '../layout-section/utils/rotated-icon';
|
|
14
17
|
|
|
15
|
-
const
|
|
18
|
+
const StartStartIcon = withDirection( RadiusTopLeftIcon );
|
|
19
|
+
const StartEndIcon = withDirection( RadiusTopRightIcon );
|
|
20
|
+
const EndStartIcon = withDirection( RadiusBottomLeftIcon );
|
|
21
|
+
const EndEndIcon = withDirection( RadiusBottomRightIcon );
|
|
22
|
+
|
|
23
|
+
const getStartStartLabel = ( isSiteRtl: boolean ) =>
|
|
24
|
+
isSiteRtl ? __( 'Top Right', 'elementor' ) : __( 'Top Left', 'elementor' );
|
|
25
|
+
const getStartEndLabel = ( isSiteRtl: boolean ) =>
|
|
26
|
+
isSiteRtl ? __( 'Top Left', 'elementor' ) : __( 'Top Right', 'elementor' );
|
|
27
|
+
const getEndStartLabel = ( isSiteRtl: boolean ) =>
|
|
28
|
+
isSiteRtl ? __( 'Bottom Right', 'elementor' ) : __( 'Bottom Left', 'elementor' );
|
|
29
|
+
const getEndEndLabel = ( isSiteRtl: boolean ) =>
|
|
30
|
+
isSiteRtl ? __( 'Bottom Left', 'elementor' ) : __( 'Bottom Right', 'elementor' );
|
|
31
|
+
|
|
32
|
+
const getCorners = ( isSiteRtl: boolean ): EqualUnequalItems => [
|
|
16
33
|
{
|
|
17
|
-
label:
|
|
18
|
-
icon: <
|
|
19
|
-
bind: '
|
|
34
|
+
label: getStartStartLabel( isSiteRtl ),
|
|
35
|
+
icon: <RotatedIcon icon={ StartStartIcon } size="tiny" />,
|
|
36
|
+
bind: 'start-start',
|
|
20
37
|
},
|
|
21
38
|
{
|
|
22
|
-
label:
|
|
23
|
-
icon: <
|
|
24
|
-
bind: '
|
|
39
|
+
label: getStartEndLabel( isSiteRtl ),
|
|
40
|
+
icon: <RotatedIcon icon={ StartEndIcon } size="tiny" />,
|
|
41
|
+
bind: 'start-end',
|
|
25
42
|
},
|
|
26
43
|
{
|
|
27
|
-
label:
|
|
28
|
-
icon: <
|
|
29
|
-
bind: '
|
|
44
|
+
label: getEndEndLabel( isSiteRtl ),
|
|
45
|
+
icon: <RotatedIcon icon={ EndEndIcon } size="tiny" />,
|
|
46
|
+
bind: 'end-end',
|
|
30
47
|
},
|
|
31
48
|
{
|
|
32
|
-
label:
|
|
33
|
-
icon: <
|
|
34
|
-
bind: '
|
|
49
|
+
label: getEndStartLabel( isSiteRtl ),
|
|
50
|
+
icon: <RotatedIcon icon={ EndStartIcon } size="tiny" />,
|
|
51
|
+
bind: 'end-start',
|
|
35
52
|
},
|
|
36
53
|
];
|
|
37
54
|
|
|
38
55
|
export const BorderRadiusField = () => {
|
|
56
|
+
const { isSiteRtl } = useDirection();
|
|
57
|
+
|
|
39
58
|
return (
|
|
40
59
|
<StylesField bind={ 'border-radius' }>
|
|
41
60
|
<EqualUnequalSizesControl
|
|
42
|
-
items={
|
|
61
|
+
items={ getCorners( isSiteRtl ) }
|
|
43
62
|
label={ __( 'Border Radius', 'elementor' ) }
|
|
44
63
|
icon={ <BorderCornersIcon fontSize={ 'tiny' } /> }
|
|
45
64
|
multiSizePropTypeUtil={ borderRadiusPropTypeUtil }
|
|
@@ -24,7 +24,7 @@ const initTextStroke = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export const TextStrokeField = () => {
|
|
27
|
-
const [ textStroke, setTextStroke ] = useStylesField( '
|
|
27
|
+
const [ textStroke, setTextStroke ] = useStylesField( 'stroke' );
|
|
28
28
|
|
|
29
29
|
const addTextStroke = () => {
|
|
30
30
|
setTextStroke( initTextStroke );
|
|
@@ -43,7 +43,7 @@ export const TextStrokeField = () => {
|
|
|
43
43
|
onAdd={ addTextStroke }
|
|
44
44
|
onRemove={ removeTextStroke }
|
|
45
45
|
>
|
|
46
|
-
<StylesField bind={ '
|
|
46
|
+
<StylesField bind={ 'stroke' }>
|
|
47
47
|
<StrokeControl />
|
|
48
48
|
</StylesField>
|
|
49
49
|
</AddOrRemoveContent>
|