@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-editing-panel",
3
- "version": "1.11.0",
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.9.0",
44
- "@elementor/editor-elements": "0.5.2",
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.0",
46
+ "@elementor/editor-props": "0.9.1",
47
47
  "@elementor/editor-responsive": "0.13.0",
48
- "@elementor/editor-styles": "0.5.5",
49
- "@elementor/editor-styles-repository": "0.7.0",
50
- "@elementor/editor-ui": "0.2.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 corners: EqualUnequalItems = [
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: __( 'Top Left', 'elementor' ),
18
- icon: <RadiusTopLeftIcon fontSize={ 'tiny' } />,
19
- bind: 'top-left',
34
+ label: getStartStartLabel( isSiteRtl ),
35
+ icon: <RotatedIcon icon={ StartStartIcon } size="tiny" />,
36
+ bind: 'start-start',
20
37
  },
21
38
  {
22
- label: __( 'Top Right', 'elementor' ),
23
- icon: <RadiusTopRightIcon fontSize={ 'tiny' } />,
24
- bind: 'top-right',
39
+ label: getStartEndLabel( isSiteRtl ),
40
+ icon: <RotatedIcon icon={ StartEndIcon } size="tiny" />,
41
+ bind: 'start-end',
25
42
  },
26
43
  {
27
- label: __( 'Bottom Right', 'elementor' ),
28
- icon: <RadiusBottomRightIcon fontSize={ 'tiny' } />,
29
- bind: 'bottom-right',
44
+ label: getEndEndLabel( isSiteRtl ),
45
+ icon: <RotatedIcon icon={ EndEndIcon } size="tiny" />,
46
+ bind: 'end-end',
30
47
  },
31
48
  {
32
- label: __( 'Bottom Left', 'elementor' ),
33
- icon: <RadiusBottomLeftIcon fontSize={ 'tiny' } />,
34
- bind: 'bottom-left',
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={ corners }
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( '-webkit-text-stroke' );
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={ '-webkit-text-stroke' }>
46
+ <StylesField bind={ 'stroke' }>
47
47
  <StrokeControl />
48
48
  </StylesField>
49
49
  </AddOrRemoveContent>