@elementor/editor-editing-panel 4.4.0-1141 → 4.4.0-1143
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 +30 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +26 -26
- package/src/components/css-classes/css-class-item.tsx +2 -3
- package/src/components/css-classes/css-class-menu.tsx +2 -2
- package/src/components/css-classes/css-class-selector.tsx +2 -10
- package/src/styles-inheritance/components/ui-providers.tsx +2 -1
- package/src/utils/get-styles-provider-color.ts +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "4.4.0-
|
|
3
|
+
"version": "4.4.0-1143",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,32 +39,32 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor": "4.4.0-
|
|
43
|
-
"@elementor/editor-canvas": "4.4.0-
|
|
44
|
-
"@elementor/editor-controls": "4.4.0-
|
|
45
|
-
"@elementor/editor-current-user": "4.4.0-
|
|
46
|
-
"@elementor/editor-documents": "4.4.0-
|
|
47
|
-
"@elementor/editor-elements": "4.4.0-
|
|
48
|
-
"@elementor/editor-interactions": "4.4.0-
|
|
49
|
-
"@elementor/editor-notifications": "4.4.0-
|
|
50
|
-
"@elementor/editor-panels": "4.4.0-
|
|
51
|
-
"@elementor/editor-props": "4.4.0-
|
|
52
|
-
"@elementor/editor-responsive": "4.4.0-
|
|
53
|
-
"@elementor/editor-styles": "4.4.0-
|
|
54
|
-
"@elementor/editor-styles-repository": "4.4.0-
|
|
55
|
-
"@elementor/editor-ui": "4.4.0-
|
|
56
|
-
"@elementor/editor-v1-adapters": "4.4.0-
|
|
57
|
-
"@elementor/http-client": "4.4.0-
|
|
42
|
+
"@elementor/editor": "4.4.0-1143",
|
|
43
|
+
"@elementor/editor-canvas": "4.4.0-1143",
|
|
44
|
+
"@elementor/editor-controls": "4.4.0-1143",
|
|
45
|
+
"@elementor/editor-current-user": "4.4.0-1143",
|
|
46
|
+
"@elementor/editor-documents": "4.4.0-1143",
|
|
47
|
+
"@elementor/editor-elements": "4.4.0-1143",
|
|
48
|
+
"@elementor/editor-interactions": "4.4.0-1143",
|
|
49
|
+
"@elementor/editor-notifications": "4.4.0-1143",
|
|
50
|
+
"@elementor/editor-panels": "4.4.0-1143",
|
|
51
|
+
"@elementor/editor-props": "4.4.0-1143",
|
|
52
|
+
"@elementor/editor-responsive": "4.4.0-1143",
|
|
53
|
+
"@elementor/editor-styles": "4.4.0-1143",
|
|
54
|
+
"@elementor/editor-styles-repository": "4.4.0-1143",
|
|
55
|
+
"@elementor/editor-ui": "4.4.0-1143",
|
|
56
|
+
"@elementor/editor-v1-adapters": "4.4.0-1143",
|
|
57
|
+
"@elementor/http-client": "4.4.0-1143",
|
|
58
58
|
"@elementor/icons": "~1.78.1",
|
|
59
|
-
"@elementor/editor-variables": "4.4.0-
|
|
60
|
-
"@elementor/locations": "4.4.0-
|
|
61
|
-
"@elementor/menus": "4.4.0-
|
|
62
|
-
"@elementor/query": "4.4.0-
|
|
63
|
-
"@elementor/schema": "4.4.0-
|
|
64
|
-
"@elementor/session": "4.4.0-
|
|
65
|
-
"@elementor/ui": "1.41.
|
|
66
|
-
"@elementor/utils": "4.4.0-
|
|
67
|
-
"@elementor/wp-media": "4.4.0-
|
|
59
|
+
"@elementor/editor-variables": "4.4.0-1143",
|
|
60
|
+
"@elementor/locations": "4.4.0-1143",
|
|
61
|
+
"@elementor/menus": "4.4.0-1143",
|
|
62
|
+
"@elementor/query": "4.4.0-1143",
|
|
63
|
+
"@elementor/schema": "4.4.0-1143",
|
|
64
|
+
"@elementor/session": "4.4.0-1143",
|
|
65
|
+
"@elementor/ui": "1.41.4",
|
|
66
|
+
"@elementor/utils": "4.4.0-1143",
|
|
67
|
+
"@elementor/wp-media": "4.4.0-1143",
|
|
68
68
|
"@wordpress/i18n": "^5.13.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type ReactElement, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { isClassState } from '@elementor/editor-styles';
|
|
4
4
|
import { stylesRepository, useUserStylesCapability, validateStyleLabel } from '@elementor/editor-styles-repository';
|
|
5
|
-
import { EditableField, EllipsisWithTooltip, useEditable } from '@elementor/editor-ui';
|
|
5
|
+
import { EditableField, EllipsisWithTooltip, ThemeProvider, useEditable } from '@elementor/editor-ui';
|
|
6
6
|
import { DotsVerticalIcon } from '@elementor/icons';
|
|
7
7
|
import { useSessionStorage } from '@elementor/session';
|
|
8
8
|
import {
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
type ChipOwnProps,
|
|
13
13
|
Stack,
|
|
14
14
|
type Theme,
|
|
15
|
-
ThemeProvider,
|
|
16
15
|
Typography,
|
|
17
16
|
UnstableChipGroup,
|
|
18
17
|
usePopupState,
|
|
@@ -96,7 +95,7 @@ export function CssClassItem( props: CssClassItemProps ) {
|
|
|
96
95
|
}, [ id, convertedFromLocalId ] );
|
|
97
96
|
|
|
98
97
|
return (
|
|
99
|
-
<ThemeProvider
|
|
98
|
+
<ThemeProvider>
|
|
100
99
|
<UnstableChipGroup
|
|
101
100
|
ref={ setChipRef }
|
|
102
101
|
{ ...chipGroupProps }
|
|
@@ -13,7 +13,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
13
13
|
import { useElement } from '../../contexts/element-context';
|
|
14
14
|
import { useStyle } from '../../contexts/style-context';
|
|
15
15
|
import { type StyleDefinitionStateWithNormal } from '../../styles-inheritance/types';
|
|
16
|
-
import {
|
|
16
|
+
import { getStylesProviderThemeColor } from '../../utils/get-styles-provider-color';
|
|
17
17
|
import { trackStyles } from '../../utils/tracking/subscribe';
|
|
18
18
|
import { StyleIndicator } from '../style-indicator';
|
|
19
19
|
import { usePseudoStates } from '../style-states/use-pseudo-states';
|
|
@@ -259,7 +259,7 @@ function StateMenuItem( { state, label, closeMenu, ...props }: StateMenuItemProp
|
|
|
259
259
|
{ isStyled && (
|
|
260
260
|
<StyleIndicator
|
|
261
261
|
aria-label={ __( 'Has style', 'elementor' ) }
|
|
262
|
-
getColor={
|
|
262
|
+
getColor={ getStylesProviderThemeColor( provider ?? '' ) }
|
|
263
263
|
/>
|
|
264
264
|
) }
|
|
265
265
|
{ label }
|
|
@@ -69,7 +69,7 @@ const EMPTY_OPTION = {
|
|
|
69
69
|
label: __( 'local', 'elementor' ),
|
|
70
70
|
value: null,
|
|
71
71
|
fixed: true,
|
|
72
|
-
color:
|
|
72
|
+
color: 'accent',
|
|
73
73
|
icon: <MapPinIcon />,
|
|
74
74
|
provider: null,
|
|
75
75
|
} satisfies StyleDefOption;
|
|
@@ -315,7 +315,7 @@ function useOptions() {
|
|
|
315
315
|
label: styleDef.label,
|
|
316
316
|
value: styleDef.id,
|
|
317
317
|
fixed: isElements,
|
|
318
|
-
color:
|
|
318
|
+
color: getStylesProviderColorName( provider.getKey() ),
|
|
319
319
|
icon: isElements ? <MapPinIcon /> : null,
|
|
320
320
|
provider: provider.getKey(),
|
|
321
321
|
};
|
|
@@ -323,14 +323,6 @@ function useOptions() {
|
|
|
323
323
|
} );
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
function getTempStylesProviderColorName( color: ChipOwnProps[ 'color' ] ): ChipOwnProps[ 'color' ] {
|
|
327
|
-
if ( color === 'accent' ) {
|
|
328
|
-
return 'primary';
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
return color;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
326
|
function useCreateAction() {
|
|
335
327
|
const [ provider, createAction ] = useCreateAndApplyClass();
|
|
336
328
|
if ( ! provider || ! createAction ) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeProvider } from '@elementor/editor-ui';
|
|
3
|
+
import { DirectionProvider } from '@elementor/ui';
|
|
3
4
|
|
|
4
5
|
import { useDirection } from '../../hooks/use-direction';
|
|
5
6
|
|
|
@@ -26,11 +26,3 @@ export const getStylesProviderThemeColor = ( provider: string ): ( ( theme: Them
|
|
|
26
26
|
|
|
27
27
|
return getStyleProviderColors( provider ).getThemeColor;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
export function getTempStylesProviderThemeColor( provider: string ): ( ( theme: Theme ) => string ) | null {
|
|
31
|
-
if ( isElementsStylesProvider( provider ) ) {
|
|
32
|
-
return ( theme: Theme ) => theme.palette.primary.main;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return getStylesProviderThemeColor( provider );
|
|
36
|
-
}
|