@elementor/editor-editing-panel 1.15.0 → 1.17.0

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/index.js +306 -232
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +211 -137
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +13 -13
  7. package/src/components/css-classes/css-class-menu.tsx +1 -1
  8. package/src/components/css-classes/css-class-selector.tsx +1 -1
  9. package/src/components/editing-panel.tsx +2 -0
  10. package/src/components/style-sections/border-section/border-radius-field.tsx +1 -0
  11. package/src/components/style-sections/border-section/border-width-field.tsx +19 -10
  12. package/src/components/style-sections/layout-section/flex-size-field.tsx +1 -1
  13. package/src/components/style-sections/position-section/dimensions-field.tsx +24 -12
  14. package/src/components/style-sections/position-section/position-section.tsx +12 -12
  15. package/src/components/style-sections/position-section/z-index-field.tsx +1 -1
  16. package/src/components/style-sections/size-section/size-section.tsx +18 -9
  17. package/src/components/style-sections/spacing-section/spacing-section.tsx +9 -2
  18. package/src/components/style-sections/typography-section/font-family-field.tsx +34 -2
  19. package/src/components/style-sections/typography-section/font-weight-field.tsx +3 -3
  20. package/src/components/style-sections/typography-section/text-direction-field.tsx +4 -2
  21. package/src/dynamics/components/dynamic-selection-control.tsx +1 -1
  22. package/src/dynamics/components/dynamic-selection.tsx +19 -12
  23. package/src/dynamics/hooks/use-prop-dynamic-action.tsx +1 -1
  24. package/src/styles-inheritance/create-snapshots-manager.ts +179 -0
  25. package/src/styles-inheritance/create-styles-inheritance.ts +50 -0
  26. package/src/styles-inheritance/types.ts +42 -0
  27. package/src/styles-inheritance/utils.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-editing-panel",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,23 +39,23 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor": "0.18.0",
43
- "@elementor/editor-controls": "0.13.0",
44
- "@elementor/editor-elements": "0.5.4",
45
- "@elementor/editor-panels": "0.12.0",
46
- "@elementor/editor-props": "0.9.2",
47
- "@elementor/editor-responsive": "0.13.0",
48
- "@elementor/editor-styles": "0.5.7",
49
- "@elementor/editor-styles-repository": "0.7.2",
50
- "@elementor/editor-ui": "0.4.0",
51
- "@elementor/editor-v1-adapters": "0.10.0",
52
- "@elementor/icons": "1.31.0",
42
+ "@elementor/editor": "0.18.2",
43
+ "@elementor/editor-controls": "0.15.0",
44
+ "@elementor/editor-elements": "0.6.1",
45
+ "@elementor/editor-panels": "0.12.2",
46
+ "@elementor/editor-props": "0.9.4",
47
+ "@elementor/editor-responsive": "0.13.2",
48
+ "@elementor/editor-styles": "0.6.1",
49
+ "@elementor/editor-styles-repository": "0.7.4",
50
+ "@elementor/editor-ui": "0.4.1",
51
+ "@elementor/editor-v1-adapters": "0.10.2",
52
+ "@elementor/icons": "1.35.0",
53
53
  "@elementor/locations": "0.7.6",
54
54
  "@elementor/menus": "0.1.3",
55
55
  "@elementor/schema": "0.1.2",
56
56
  "@elementor/session": "0.1.0",
57
57
  "@elementor/ui": "1.26.0",
58
- "@elementor/utils": "0.3.1",
58
+ "@elementor/utils": "0.4.0",
59
59
  "@wordpress/i18n": "^5.13.0"
60
60
  },
61
61
  "peerDependencies": {
@@ -40,7 +40,7 @@ export function CssClassMenu( { styleId, provider, popupState, handleRename, anc
40
40
  { /* It has to be an array since MUI menu doesn't accept a Fragment as a child, and wrapping the items with an HTML element disrupts keyboard navigation */ }
41
41
  { getMenuItemsByProvider( { provider, styleId, handleRename, closeMenu: popupState.close } ) }
42
42
  <ListSubheader sx={ { typography: 'caption', color: 'text.secondary', pb: 0.5, pt: 1 } }>
43
- { __( 'Pseudo selector', 'elementor' ) }
43
+ { __( 'Pseudo classes', 'elementor' ) }
44
44
  </ListSubheader>
45
45
  { STATES.map( ( state ) => {
46
46
  return <StateMenuItem key={ state } state={ state } styleId={ styleId } />;
@@ -60,7 +60,7 @@ export function CssClassSelector() {
60
60
  <Stack gap={ 1 } p={ 2 }>
61
61
  <Stack direction="row" gap={ 1 } alignItems="center" justifyContent="space-between">
62
62
  <Typography component="label" variant="caption" htmlFor={ ID }>
63
- { __( 'CSS Classes', 'elementor' ) }
63
+ { __( 'CSS classes', 'elementor' ) }
64
64
  </Typography>
65
65
  <Stack direction="row" gap={ 1 }>
66
66
  <ClassSelectorActionsSlot />
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { ControlActionsProvider, ControlReplacementProvider } from '@elementor/editor-controls';
3
3
  import { useSelectedElement } from '@elementor/editor-elements';
4
4
  import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from '@elementor/editor-panels';
5
+ import { RocketIcon } from '@elementor/icons';
5
6
  import { SessionStorageProvider } from '@elementor/session';
6
7
  import { ErrorBoundary } from '@elementor/ui';
7
8
  import { __ } from '@wordpress/i18n';
@@ -32,6 +33,7 @@ export const EditingPanel = () => {
32
33
  <Panel>
33
34
  <PanelHeader>
34
35
  <PanelHeaderTitle>{ panelTitle }</PanelHeaderTitle>
36
+ <RocketIcon fontSize="small" sx={ { color: 'text.disabled' } } />
35
37
  </PanelHeader>
36
38
  <PanelBody>
37
39
  <ControlActionsProvider items={ menuItems }>
@@ -60,6 +60,7 @@ export const BorderRadiusField = () => {
60
60
  items={ getCorners( isSiteRtl ) }
61
61
  label={ __( 'Border radius', 'elementor' ) }
62
62
  icon={ <BorderCornersIcon fontSize={ 'tiny' } /> }
63
+ tooltipLabel={ __( 'Adjust corners', 'elementor' ) }
63
64
  multiSizePropTypeUtil={ borderRadiusPropTypeUtil }
64
65
  />
65
66
  </StylesField>
@@ -2,40 +2,49 @@ import * as React from 'react';
2
2
  import { type EqualUnequalItems, EqualUnequalSizesControl } from '@elementor/editor-controls';
3
3
  import { borderWidthPropTypeUtil } from '@elementor/editor-props';
4
4
  import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from '@elementor/icons';
5
+ import { withDirection } from '@elementor/ui';
5
6
  import { __ } from '@wordpress/i18n';
6
7
 
7
8
  import { StylesField } from '../../../controls-registry/styles-field';
9
+ import { useDirection } from '../../../hooks/use-direction';
10
+ import { RotatedIcon } from '../layout-section/utils/rotated-icon';
8
11
 
9
- const edges: EqualUnequalItems = [
12
+ const InlineStartIcon = withDirection( SideRightIcon );
13
+ const InlineEndIcon = withDirection( SideLeftIcon );
14
+
15
+ const getEdges = ( isSiteRtl: boolean ): EqualUnequalItems => [
10
16
  {
11
17
  label: __( 'Top', 'elementor' ),
12
18
  icon: <SideTopIcon fontSize={ 'tiny' } />,
13
- bind: 'top',
19
+ bind: 'block-start',
14
20
  },
15
21
  {
16
- label: __( 'Right', 'elementor' ),
17
- icon: <SideRightIcon fontSize={ 'tiny' } />,
18
- bind: 'right',
22
+ label: isSiteRtl ? __( 'Left', 'elementor' ) : __( 'Right', 'elementor' ),
23
+ icon: <RotatedIcon icon={ InlineStartIcon } size="tiny" />,
24
+ bind: 'inline-end',
19
25
  },
20
26
  {
21
27
  label: __( 'Bottom', 'elementor' ),
22
28
  icon: <SideBottomIcon fontSize={ 'tiny' } />,
23
- bind: 'bottom',
29
+ bind: 'block-end',
24
30
  },
25
31
  {
26
- label: __( 'Left', 'elementor' ),
27
- icon: <SideLeftIcon fontSize={ 'tiny' } />,
28
- bind: 'left',
32
+ label: isSiteRtl ? __( 'Right', 'elementor' ) : __( 'Left', 'elementor' ),
33
+ icon: <RotatedIcon icon={ InlineEndIcon } size="tiny" />,
34
+ bind: 'inline-start',
29
35
  },
30
36
  ];
31
37
 
32
38
  export const BorderWidthField = () => {
39
+ const { isSiteRtl } = useDirection();
40
+
33
41
  return (
34
42
  <StylesField bind={ 'border-width' }>
35
43
  <EqualUnequalSizesControl
36
- items={ edges }
44
+ items={ getEdges( isSiteRtl ) }
37
45
  label={ __( 'Border width', 'elementor' ) }
38
46
  icon={ <SideAllIcon fontSize={ 'tiny' } /> }
47
+ tooltipLabel={ __( 'Adjust borders', 'elementor' ) }
39
48
  multiSizePropTypeUtil={ borderWidthPropTypeUtil }
40
49
  />
41
50
  </StylesField>
@@ -130,7 +130,7 @@ const FlexCustomField = () => (
130
130
  <ControlLabel>{ __( 'Basis', 'elementor' ) }</ControlLabel>
131
131
  </Grid>
132
132
  <Grid item xs={ 6 } sx={ { display: 'flex', justifyContent: 'end' } }>
133
- <SizeControl />
133
+ <SizeControl extendedValues={ [ 'auto' ] } />
134
134
  </Grid>
135
135
  </Grid>
136
136
  </StylesField>
@@ -1,35 +1,47 @@
1
1
  import * as React from 'react';
2
2
  import { ControlLabel, SizeControl } from '@elementor/editor-controls';
3
3
  import { SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from '@elementor/icons';
4
- import { Grid, Stack } from '@elementor/ui';
4
+ import { Grid, Stack, withDirection } from '@elementor/ui';
5
5
  import { __ } from '@wordpress/i18n';
6
6
 
7
7
  import { StylesField } from '../../../controls-registry/styles-field';
8
+ import { useDirection } from '../../../hooks/use-direction';
9
+ import { RotatedIcon } from '../layout-section/utils/rotated-icon';
8
10
 
9
- type Side = 'left' | 'right' | 'top' | 'bottom';
11
+ type Side = 'inset-inline-start' | 'inset-inline-end' | 'inset-block-start' | 'inset-block-end';
12
+
13
+ const InlineStartIcon = withDirection( SideLeftIcon );
14
+ const InlineEndIcon = withDirection( SideRightIcon );
10
15
 
11
16
  const sideIcons = {
12
- left: <SideLeftIcon fontSize={ 'tiny' } />,
13
- right: <SideRightIcon fontSize={ 'tiny' } />,
14
- top: <SideTopIcon fontSize={ 'tiny' } />,
15
- bottom: <SideBottomIcon fontSize={ 'tiny' } />,
17
+ 'inset-block-start': <SideTopIcon fontSize={ 'tiny' } />,
18
+ 'inset-block-end': <SideBottomIcon fontSize={ 'tiny' } />,
19
+ 'inset-inline-start': <RotatedIcon icon={ InlineStartIcon } size="tiny" />,
20
+ 'inset-inline-end': <RotatedIcon icon={ InlineEndIcon } size="tiny" />,
16
21
  };
17
22
 
23
+ const getInlineStartLabel = ( isSiteRtl: boolean ) =>
24
+ isSiteRtl ? __( 'Right', 'elementor' ) : __( 'Left', 'elementor' );
25
+
26
+ const getInlineEndLabel = ( isSiteRtl: boolean ) =>
27
+ isSiteRtl ? __( 'Left', 'elementor' ) : __( 'Right', 'elementor' );
28
+
18
29
  export const DimensionsField = () => {
30
+ const { isSiteRtl } = useDirection();
31
+
19
32
  return (
20
33
  <>
21
34
  <Stack direction="row" gap={ 2 } flexWrap="nowrap">
22
- <DimensionField side="top" label={ __( 'Top', 'elementor' ) } />
23
- <DimensionField side="right" label={ __( 'Right', 'elementor' ) } />
35
+ <DimensionField side="inset-block-start" label={ __( 'Top', 'elementor' ) } />
36
+ <DimensionField side="inset-inline-start" label={ getInlineStartLabel( isSiteRtl ) } />
24
37
  </Stack>
25
38
  <Stack direction="row" gap={ 2 } flexWrap="nowrap">
26
- <DimensionField side="bottom" label={ __( 'Bottom', 'elementor' ) } />
27
- <DimensionField side="left" label={ __( 'Left', 'elementor' ) } />
39
+ <DimensionField side="inset-block-end" label={ __( 'Bottom', 'elementor' ) } />
40
+ <DimensionField side="inset-inline-end" label={ getInlineEndLabel( isSiteRtl ) } />
28
41
  </Stack>
29
42
  </>
30
43
  );
31
44
  };
32
-
33
45
  const DimensionField = ( { side, label }: { side: Side; label: string } ) => {
34
46
  return (
35
47
  <Grid container gap={ 1 } alignItems="center">
@@ -38,7 +50,7 @@ const DimensionField = ( { side, label }: { side: Side; label: string } ) => {
38
50
  </Grid>
39
51
  <Grid item xs={ 12 }>
40
52
  <StylesField bind={ side }>
41
- <SizeControl startIcon={ sideIcons[ side ] } />
53
+ <SizeControl startIcon={ sideIcons[ side ] } extendedValues={ [ 'auto' ] } />
42
54
  </StylesField>
43
55
  </Grid>
44
56
  </Grid>
@@ -19,19 +19,19 @@ type DimensionValue =
19
19
  | null;
20
20
 
21
21
  type DimensionsValues = {
22
- top: DimensionValue;
23
- bottom: DimensionValue;
24
- left: DimensionValue;
25
- right: DimensionValue;
22
+ 'inset-block-start': DimensionValue;
23
+ 'inset-block-end': DimensionValue;
24
+ 'inset-inline-start': DimensionValue;
25
+ 'inset-inline-end': DimensionValue;
26
26
  };
27
27
 
28
28
  export const PositionSection = () => {
29
29
  const [ positionValue ] = useStylesField< StringPropValue >( 'position' );
30
30
  const [ dimensionsValues, setDimensionsValues ] = useStylesFields< DimensionsValues >( [
31
- 'top',
32
- 'bottom',
33
- 'left',
34
- 'right',
31
+ 'inset-block-start',
32
+ 'inset-block-end',
33
+ 'inset-inline-start',
34
+ 'inset-inline-end',
35
35
  ] );
36
36
 
37
37
  const [ dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory ] = usePersistDimensions();
@@ -41,10 +41,10 @@ export const PositionSection = () => {
41
41
  if ( dimensionsValues ) {
42
42
  updateDimensionsHistory( dimensionsValues );
43
43
  setDimensionsValues( {
44
- top: undefined,
45
- bottom: undefined,
46
- left: undefined,
47
- right: undefined,
44
+ 'inset-block-start': undefined,
45
+ 'inset-block-end': undefined,
46
+ 'inset-inline-start': undefined,
47
+ 'inset-inline-end': undefined,
48
48
  } );
49
49
  }
50
50
  } else if ( previousPosition === 'static' ) {
@@ -10,7 +10,7 @@ export const ZIndexField = () => {
10
10
  <StylesField bind="z-index">
11
11
  <Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
12
12
  <Grid item xs={ 6 }>
13
- <ControlLabel>{ __( 'Z-Index', 'elementor' ) }</ControlLabel>
13
+ <ControlLabel>{ __( 'Z-index', 'elementor' ) }</ControlLabel>
14
14
  </Grid>
15
15
  <Grid item xs={ 6 }>
16
16
  <NumberControl />
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ControlLabel, SizeControl } from '@elementor/editor-controls';
2
+ import { ControlLabel, type ExtendedValue, SizeControl } from '@elementor/editor-controls';
3
3
  import { Grid, Stack } from '@elementor/ui';
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
@@ -13,26 +13,34 @@ export const SizeSection = () => {
13
13
  <SectionContent>
14
14
  <Grid container gap={ 2 } flexWrap="nowrap">
15
15
  <Grid item xs={ 6 }>
16
- <SizeField bind="width" label={ __( 'Width', 'elementor' ) } />
16
+ <SizeField bind="width" label={ __( 'Width', 'elementor' ) } extendedValues={ [ 'auto' ] } />
17
17
  </Grid>
18
18
  <Grid item xs={ 6 }>
19
- <SizeField bind="height" label={ __( 'Height', 'elementor' ) } />
19
+ <SizeField bind="height" label={ __( 'Height', 'elementor' ) } extendedValues={ [ 'auto' ] } />
20
20
  </Grid>
21
21
  </Grid>
22
22
  <Grid container gap={ 2 } flexWrap="nowrap">
23
23
  <Grid item xs={ 6 }>
24
- <SizeField bind="min-width" label={ __( 'Min. width', 'elementor' ) } />
24
+ <SizeField
25
+ bind="min-width"
26
+ label={ __( 'Min width', 'elementor' ) }
27
+ extendedValues={ [ 'auto' ] }
28
+ />
25
29
  </Grid>
26
30
  <Grid item xs={ 6 }>
27
- <SizeField bind="min-height" label={ __( 'Min. height', 'elementor' ) } />
31
+ <SizeField
32
+ bind="min-height"
33
+ label={ __( 'Min height', 'elementor' ) }
34
+ extendedValues={ [ 'auto' ] }
35
+ />
28
36
  </Grid>
29
37
  </Grid>
30
38
  <Grid container gap={ 2 } flexWrap="nowrap">
31
39
  <Grid item xs={ 6 }>
32
- <SizeField bind="max-width" label={ __( 'Max. width', 'elementor' ) } />
40
+ <SizeField bind="max-width" label={ __( 'Max width', 'elementor' ) } />
33
41
  </Grid>
34
42
  <Grid item xs={ 6 }>
35
- <SizeField bind="max-height" label={ __( 'Max. height', 'elementor' ) } />
43
+ <SizeField bind="max-height" label={ __( 'Max height', 'elementor' ) } />
36
44
  </Grid>
37
45
  </Grid>
38
46
  <PanelDivider />
@@ -46,9 +54,10 @@ export const SizeSection = () => {
46
54
  type ControlProps = {
47
55
  bind: StylesFieldProps[ 'bind' ];
48
56
  label: string;
57
+ extendedValues?: ExtendedValue[];
49
58
  };
50
59
 
51
- const SizeField = ( { label, bind }: ControlProps ) => {
60
+ const SizeField = ( { label, bind, extendedValues }: ControlProps ) => {
52
61
  return (
53
62
  <StylesField bind={ bind }>
54
63
  <Grid container gap={ 1 } alignItems="center">
@@ -56,7 +65,7 @@ const SizeField = ( { label, bind }: ControlProps ) => {
56
65
  <ControlLabel>{ label }</ControlLabel>
57
66
  </Grid>
58
67
  <Grid item xs={ 12 }>
59
- <SizeControl />
68
+ <SizeControl extendedValues={ extendedValues } />
60
69
  </Grid>
61
70
  </Grid>
62
71
  </StylesField>
@@ -3,18 +3,25 @@ import { LinkedDimensionsControl } from '@elementor/editor-controls';
3
3
  import { __ } from '@wordpress/i18n';
4
4
 
5
5
  import { StylesField } from '../../../controls-registry/styles-field';
6
+ import { useDirection } from '../../../hooks/use-direction';
6
7
  import { PanelDivider } from '../../panel-divider';
7
8
  import { SectionContent } from '../../section-content';
8
9
 
9
10
  export const SpacingSection = () => {
11
+ const { isSiteRtl } = useDirection();
12
+
10
13
  return (
11
14
  <SectionContent>
12
15
  <StylesField bind={ 'padding' }>
13
- <LinkedDimensionsControl label={ __( 'Padding', 'elementor' ) } />
16
+ <LinkedDimensionsControl label={ __( 'Padding', 'elementor' ) } isSiteRtl={ isSiteRtl } />
14
17
  </StylesField>
15
18
  <PanelDivider />
16
19
  <StylesField bind={ 'margin' }>
17
- <LinkedDimensionsControl label={ __( 'Margin', 'elementor' ) } />
20
+ <LinkedDimensionsControl
21
+ label={ __( 'Margin', 'elementor' ) }
22
+ isSiteRtl={ isSiteRtl }
23
+ extendedValues={ [ 'auto' ] }
24
+ />
18
25
  </StylesField>
19
26
  </SectionContent>
20
27
  );
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { useMemo } from 'react';
2
3
  import { ControlLabel, FontFamilyControl } from '@elementor/editor-controls';
3
4
  import { Grid } from '@elementor/ui';
4
5
  import { __ } from '@wordpress/i18n';
@@ -6,10 +7,16 @@ import { __ } from '@wordpress/i18n';
6
7
  import { StylesField } from '../../../controls-registry/styles-field';
7
8
  import { getElementorConfig } from '../../../sync/get-elementor-config';
8
9
 
10
+ const supportedCategories: Record< string, string > = {
11
+ system: __( 'System', 'elementor' ),
12
+ custom: __( 'Custom Fonts', 'elementor' ),
13
+ googlefonts: __( 'Google Fonts', 'elementor' ),
14
+ };
15
+
9
16
  export const FontFamilyField = () => {
10
- const fontFamilies = getFontFamilies();
17
+ const fontFamilies = useFontFamilies();
11
18
 
12
- if ( ! fontFamilies ) {
19
+ if ( Object.keys( fontFamilies ).length === 0 ) {
13
20
  return null;
14
21
  }
15
22
 
@@ -38,3 +45,28 @@ const getFontFamilies = () => {
38
45
 
39
46
  return options;
40
47
  };
48
+
49
+ const useFontFamilies = () => {
50
+ const fontFamilies = getFontFamilies();
51
+
52
+ return useMemo(
53
+ () =>
54
+ Object.entries( fontFamilies || {} ).reduce< Record< string, string[] > >( ( acc, [ font, category ] ) => {
55
+ const categoryLabel = supportedCategories[ category as keyof typeof supportedCategories ];
56
+ const existingCategory = acc[ categoryLabel ];
57
+
58
+ if ( ! categoryLabel ) {
59
+ return acc;
60
+ }
61
+
62
+ if ( ! existingCategory ) {
63
+ acc[ categoryLabel ] = [];
64
+ }
65
+
66
+ acc[ categoryLabel ].push( font );
67
+
68
+ return acc;
69
+ }, {} ),
70
+ [ fontFamilies ]
71
+ );
72
+ };
@@ -7,13 +7,13 @@ import { StylesField } from '../../../controls-registry/styles-field';
7
7
 
8
8
  const fontWeightOptions = [
9
9
  { value: '100', label: __( '100 - Thin', 'elementor' ) },
10
- { value: '200', label: __( '200 - Extra Light', 'elementor' ) },
10
+ { value: '200', label: __( '200 - Extra light', 'elementor' ) },
11
11
  { value: '300', label: __( '300 - Light', 'elementor' ) },
12
12
  { value: '400', label: __( '400 - Normal', 'elementor' ) },
13
13
  { value: '500', label: __( '500 - Medium', 'elementor' ) },
14
- { value: '600', label: __( '600 - Semi Bold', 'elementor' ) },
14
+ { value: '600', label: __( '600 - Semi bold', 'elementor' ) },
15
15
  { value: '700', label: __( '700 - Bold', 'elementor' ) },
16
- { value: '800', label: __( '800 - Extra Bold', 'elementor' ) },
16
+ { value: '800', label: __( '800 - Extra bold', 'elementor' ) },
17
17
  { value: '900', label: __( '900 - Black', 'elementor' ) },
18
18
  ];
19
19
 
@@ -11,13 +11,15 @@ type Direction = 'ltr' | 'rtl';
11
11
  const options: ToggleButtonGroupItem< Direction >[] = [
12
12
  {
13
13
  value: 'ltr',
14
- label: __( 'Left to Right', 'elementor' ),
14
+ label: __( 'Left to right', 'elementor' ),
15
15
  renderContent: ( { size } ) => <TextDirectionLtrIcon fontSize={ size } />,
16
+ showTooltip: true,
16
17
  },
17
18
  {
18
19
  value: 'rtl',
19
- label: __( 'Right to Left', 'elementor' ),
20
+ label: __( 'Right to left', 'elementor' ),
20
21
  renderContent: ( { size } ) => <TextDirectionRtlIcon fontSize={ size } />,
22
+ showTooltip: true,
21
23
  },
22
24
  ];
23
25
 
@@ -84,7 +84,7 @@ export const DynamicSelectionControl = () => {
84
84
  <Stack>
85
85
  <Stack direction="row" alignItems="center" pl={ 1.5 } pr={ 0.5 } py={ 1.5 }>
86
86
  <DatabaseIcon fontSize={ SIZE } sx={ { mr: 0.5 } } />
87
- <Typography variant="subtitle2">{ __( 'Dynamic Tags', 'elementor' ) }</Typography>
87
+ <Typography variant="subtitle2">{ __( 'Dynamic tags', 'elementor' ) }</Typography>
88
88
  <IconButton size={ SIZE } sx={ { ml: 'auto' } } onClick={ selectionPopoverState.close }>
89
89
  <XIcon fontSize={ SIZE } />
90
90
  </IconButton>
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Fragment, useState } from 'react';
3
3
  import { useBoundProp } from '@elementor/editor-controls';
4
- import { PhotoIcon, SearchIcon } from '@elementor/icons';
4
+ import { DatabaseIcon, SearchIcon } from '@elementor/icons';
5
5
  import {
6
6
  Box,
7
7
  Divider,
@@ -16,7 +16,6 @@ import {
16
16
  } from '@elementor/ui';
17
17
  import { __ } from '@wordpress/i18n';
18
18
 
19
- import { PopoverContent } from '../../components/popover-content';
20
19
  import { usePersistDynamicValue } from '../../hooks/use-persist-dynamic-value';
21
20
  import { usePropDynamicTags } from '../hooks/use-prop-dynamic-tags';
22
21
  import { getAtomicDynamicTags } from '../sync/get-atomic-dynamic-tags';
@@ -70,7 +69,7 @@ export const DynamicSelection = ( { onSelect }: DynamicSelectionProps ) => {
70
69
  size={ SIZE }
71
70
  value={ searchValue }
72
71
  onChange={ handleSearch }
73
- placeholder={ __( 'Search dynamic tag', 'elementor' ) }
72
+ placeholder={ __( 'Search dynamic tags…', 'elementor' ) }
74
73
  InputProps={ {
75
74
  startAdornment: (
76
75
  <InputAdornment position="start">
@@ -109,26 +108,34 @@ export const DynamicSelection = ( { onSelect }: DynamicSelectionProps ) => {
109
108
  ) ) }
110
109
  </MenuList>
111
110
  ) : (
112
- <PopoverContent alignItems="center" p={ 2.5 }>
113
- <PhotoIcon fontSize="large" />
114
- <Typography align="center" variant="caption" color="text.secondary">
111
+ <Stack
112
+ gap={ 1 }
113
+ alignItems="center"
114
+ justifyContent="center"
115
+ height="100%"
116
+ p={ 2.5 }
117
+ color="text.secondary"
118
+ sx={ { pb: 3.5 } }
119
+ >
120
+ <DatabaseIcon fontSize="large" />
121
+ <Typography align="center" variant="subtitle2">
115
122
  { __( 'Sorry, nothing matched', 'elementor' ) }
116
123
  <br />
117
124
  &ldquo;{ searchValue }&rdquo;.
118
125
  </Typography>
119
- <Typography align="center" variant="caption" color="text.secondary">
126
+ <Typography align="center" variant="caption">
127
+ { __( 'Try something else.', 'elementor' ) }
128
+ &nbsp;
120
129
  <Link
121
- color="secondary"
130
+ color="text.secondary"
122
131
  variant="caption"
123
132
  component="button"
124
133
  onClick={ () => setSearchValue( '' ) }
125
134
  >
126
- { __( 'Clear the filters', 'elementor' ) }
135
+ { __( 'Clear & try again', 'elementor' ) }
127
136
  </Link>
128
- &nbsp;
129
- { __( 'and try again.', 'elementor' ) }
130
137
  </Typography>
131
- </PopoverContent>
138
+ </Stack>
132
139
  ) }
133
140
  </Box>
134
141
  </Stack>
@@ -15,7 +15,7 @@ export const usePropDynamicAction = (): PopoverActionProps => {
15
15
  return {
16
16
  visible,
17
17
  icon: DatabaseIcon,
18
- title: __( 'Dynamic Tags', 'elementor' ),
18
+ title: __( 'Dynamic tags', 'elementor' ),
19
19
  popoverContent: ( { closePopover } ) => <DynamicSelection onSelect={ closePopover } />,
20
20
  };
21
21
  };