@elementor/editor-editing-panel 3.35.0-439 → 3.35.0-441
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.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +25 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/promotions/custom-css.tsx +21 -12
- package/src/components/section.tsx +5 -3
- package/src/components/style-tab-section.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "3.35.0-
|
|
3
|
+
"version": "3.35.0-441",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,27 +39,27 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor": "3.35.0-
|
|
43
|
-
"@elementor/editor-canvas": "3.35.0-
|
|
44
|
-
"@elementor/editor-controls": "3.35.0-
|
|
45
|
-
"@elementor/editor-documents": "3.35.0-
|
|
46
|
-
"@elementor/editor-elements": "3.35.0-
|
|
47
|
-
"@elementor/editor-interactions": "3.35.0-
|
|
48
|
-
"@elementor/editor-panels": "3.35.0-
|
|
49
|
-
"@elementor/editor-props": "3.35.0-
|
|
50
|
-
"@elementor/editor-responsive": "3.35.0-
|
|
51
|
-
"@elementor/editor-styles": "3.35.0-
|
|
52
|
-
"@elementor/editor-styles-repository": "3.35.0-
|
|
53
|
-
"@elementor/editor-ui": "3.35.0-
|
|
54
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
42
|
+
"@elementor/editor": "3.35.0-441",
|
|
43
|
+
"@elementor/editor-canvas": "3.35.0-441",
|
|
44
|
+
"@elementor/editor-controls": "3.35.0-441",
|
|
45
|
+
"@elementor/editor-documents": "3.35.0-441",
|
|
46
|
+
"@elementor/editor-elements": "3.35.0-441",
|
|
47
|
+
"@elementor/editor-interactions": "3.35.0-441",
|
|
48
|
+
"@elementor/editor-panels": "3.35.0-441",
|
|
49
|
+
"@elementor/editor-props": "3.35.0-441",
|
|
50
|
+
"@elementor/editor-responsive": "3.35.0-441",
|
|
51
|
+
"@elementor/editor-styles": "3.35.0-441",
|
|
52
|
+
"@elementor/editor-styles-repository": "3.35.0-441",
|
|
53
|
+
"@elementor/editor-ui": "3.35.0-441",
|
|
54
|
+
"@elementor/editor-v1-adapters": "3.35.0-441",
|
|
55
55
|
"@elementor/icons": "^1.63.0",
|
|
56
|
-
"@elementor/locations": "3.35.0-
|
|
57
|
-
"@elementor/menus": "3.35.0-
|
|
58
|
-
"@elementor/schema": "3.35.0-
|
|
59
|
-
"@elementor/session": "3.35.0-
|
|
56
|
+
"@elementor/locations": "3.35.0-441",
|
|
57
|
+
"@elementor/menus": "3.35.0-441",
|
|
58
|
+
"@elementor/schema": "3.35.0-441",
|
|
59
|
+
"@elementor/session": "3.35.0-441",
|
|
60
60
|
"@elementor/ui": "1.36.17",
|
|
61
|
-
"@elementor/utils": "3.35.0-
|
|
62
|
-
"@elementor/wp-media": "3.35.0-
|
|
61
|
+
"@elementor/utils": "3.35.0-441",
|
|
62
|
+
"@elementor/wp-media": "3.35.0-441",
|
|
63
63
|
"@wordpress/i18n": "^5.13.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
@@ -21,18 +21,27 @@ export const CustomCssSection = () => {
|
|
|
21
21
|
section={ {
|
|
22
22
|
name: 'Custom CSS',
|
|
23
23
|
title: __( 'Custom CSS', 'elementor' ),
|
|
24
|
-
action:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
action: {
|
|
25
|
+
component: (
|
|
26
|
+
<PromotionInfotip
|
|
27
|
+
title={ promotion?.title ?? '' }
|
|
28
|
+
content={ promotion?.content ?? '' }
|
|
29
|
+
assetUrl={ promotion?.image ?? '' }
|
|
30
|
+
ctaUrl={ promotion?.ctaUrl ?? '' }
|
|
31
|
+
open={ showInfoTip }
|
|
32
|
+
onClose={ () => {
|
|
33
|
+
setShowInfoTip( false );
|
|
34
|
+
} }
|
|
35
|
+
>
|
|
36
|
+
<PromotionChip />
|
|
37
|
+
</PromotionInfotip>
|
|
38
|
+
),
|
|
39
|
+
onClick: () => {
|
|
40
|
+
if ( ! showInfoTip ) {
|
|
41
|
+
setShowInfoTip( true );
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
},
|
|
36
45
|
} }
|
|
37
46
|
/>
|
|
38
47
|
);
|
|
@@ -12,7 +12,7 @@ type Props = PropsWithChildren< {
|
|
|
12
12
|
defaultExpanded?: boolean;
|
|
13
13
|
titleEnd?: CollapsibleValue< ReactNode | string >;
|
|
14
14
|
unmountOnExit?: boolean;
|
|
15
|
-
action?: ReactNode;
|
|
15
|
+
action?: { component: ReactNode; onClick: () => void };
|
|
16
16
|
} >;
|
|
17
17
|
|
|
18
18
|
export function Section( { title, children, defaultExpanded = false, titleEnd, unmountOnExit = true, action }: Props ) {
|
|
@@ -21,7 +21,9 @@ export function Section( { title, children, defaultExpanded = false, titleEnd, u
|
|
|
21
21
|
const isDisabled = !! action;
|
|
22
22
|
|
|
23
23
|
const handleClick = () => {
|
|
24
|
-
if (
|
|
24
|
+
if ( isDisabled ) {
|
|
25
|
+
action?.onClick();
|
|
26
|
+
} else {
|
|
25
27
|
setIsOpen( ! isOpen );
|
|
26
28
|
}
|
|
27
29
|
};
|
|
@@ -47,7 +49,7 @@ export function Section( { title, children, defaultExpanded = false, titleEnd, u
|
|
|
47
49
|
/>
|
|
48
50
|
{ getCollapsibleValue( titleEnd, isOpen ) }
|
|
49
51
|
</Stack>
|
|
50
|
-
{ action }
|
|
52
|
+
{ action?.component }
|
|
51
53
|
<CollapseIcon
|
|
52
54
|
open={ isOpen }
|
|
53
55
|
color="secondary"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
import { useDefaultPanelSettings } from '../hooks/use-default-panel-settings';
|
|
4
5
|
import { Section } from './section';
|
|
@@ -8,7 +9,7 @@ type SectionType = {
|
|
|
8
9
|
component?: () => React.JSX.Element;
|
|
9
10
|
name: string;
|
|
10
11
|
title: string;
|
|
11
|
-
action?:
|
|
12
|
+
action?: { component: ReactNode; onClick: () => void };
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
type Props = { section: SectionType; fields?: string[]; unmountOnExit?: boolean };
|