@elementor/editor-editing-panel 0.17.0 → 0.19.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.
- package/CHANGELOG.md +45 -0
- package/dist/index.d.mts +28 -10
- package/dist/index.d.ts +28 -10
- package/dist/index.js +941 -398
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +918 -366
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
- package/src/components/editing-panel-error-fallback.tsx +12 -0
- package/src/components/editing-panel.tsx +23 -12
- package/src/components/settings-tab.tsx +8 -5
- package/src/components/style-sections/background-section/background-color-control.tsx +20 -0
- package/src/components/style-sections/background-section/background-section.tsx +15 -0
- package/src/components/style-sections/effects-section/box-shadow-repeater.tsx +224 -0
- package/src/components/style-sections/effects-section/effects-section.tsx +18 -0
- package/src/components/style-sections/position-section/z-index-control.tsx +11 -7
- package/src/components/style-sections/size-section.tsx +23 -20
- package/src/components/style-sections/spacing-section/linked-dimensions-control.tsx +62 -47
- package/src/components/style-sections/typography-section/font-size-control.tsx +10 -6
- package/src/components/style-sections/typography-section/font-weight-control.tsx +16 -12
- package/src/components/style-sections/typography-section/letter-spacing-control.tsx +10 -6
- package/src/components/style-sections/typography-section/text-alignment-control.tsx +12 -8
- package/src/components/style-sections/typography-section/text-color-control.tsx +10 -6
- package/src/components/style-sections/typography-section/text-direction-control.tsx +37 -0
- package/src/components/style-sections/typography-section/text-style-control.tsx +37 -34
- package/src/components/style-sections/typography-section/transform-control.tsx +14 -12
- package/src/components/style-sections/typography-section/typography-section.tsx +2 -0
- package/src/components/style-sections/typography-section/word-spacing-control.tsx +10 -6
- package/src/components/style-tab.tsx +10 -4
- package/src/control-replacement.tsx +3 -0
- package/src/controls/components/control-type-container.tsx +28 -0
- package/src/controls/components/repeater.tsx +197 -0
- package/src/controls/components/text-field-inner-selection.tsx +2 -2
- package/src/controls/control-actions/actions/popover-action.tsx +58 -0
- package/src/controls/control-actions/control-actions-menu.ts +8 -0
- package/src/controls/control-actions/control-actions.tsx +43 -0
- package/src/controls/control-context.tsx +1 -1
- package/src/controls/control-replacement.ts +16 -8
- package/src/controls/control-types/color-control.tsx +21 -18
- package/src/controls/control-types/image-control.tsx +56 -59
- package/src/controls/control-types/image-media-control.tsx +73 -0
- package/src/controls/control-types/number-control.tsx +13 -9
- package/src/controls/control-types/select-control.tsx +14 -10
- package/src/controls/control-types/size-control.tsx +18 -14
- package/src/controls/control-types/text-area-control.tsx +15 -11
- package/src/controls/control-types/text-control.tsx +9 -3
- package/src/controls/control-types/toggle-control.tsx +4 -3
- package/src/controls/control.tsx +1 -7
- package/src/controls/controls-registry.tsx +19 -10
- package/src/controls/create-control-replacement.tsx +53 -0
- package/src/controls/create-control.tsx +40 -0
- package/src/controls/hooks/use-style-control.ts +3 -3
- package/src/{hooks → controls/hooks}/use-widget-settings.ts +1 -1
- package/src/{props → controls/props}/is-transformable.ts +1 -2
- package/src/controls/props/types.ts +51 -0
- package/src/{contexts/element-context.tsx → controls/providers/element-provider.tsx} +4 -4
- package/src/controls/settings-control.tsx +7 -14
- package/src/controls/style-control.tsx +1 -1
- package/src/{sync → controls/sync}/get-container.ts +1 -1
- package/src/{sync → controls/sync}/update-settings.ts +1 -1
- package/src/controls/types.ts +39 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +2 -2
- package/src/dynamics/components/dynamic-selection.tsx +6 -6
- package/src/dynamics/dynamic-control.tsx +2 -2
- package/src/dynamics/hooks/use-dynamic-tag.ts +2 -2
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +23 -0
- package/src/dynamics/hooks/use-prop-dynamic-tags.ts +7 -7
- package/src/dynamics/hooks/use-prop-value-history.ts +3 -3
- package/src/dynamics/init.ts +10 -1
- package/src/dynamics/types.ts +7 -3
- package/src/dynamics/utils.ts +17 -4
- package/src/hooks/use-element-style-prop.ts +3 -2
- package/src/hooks/use-element-styles.ts +1 -1
- package/src/hooks/use-element-type.ts +1 -1
- package/src/index.ts +3 -1
- package/src/sync/get-element-styles.ts +2 -2
- package/src/sync/get-selected-elements.ts +1 -1
- package/src/sync/types.ts +2 -1
- package/src/sync/update-style.ts +3 -2
- package/src/controls/components/control-container.tsx +0 -18
- package/src/types.ts +0 -68
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Stack, StackProps, styled } from '@elementor/ui';
|
|
3
|
-
|
|
4
|
-
const StyledStack = styled( Stack )( ( { theme, gap, direction } ) => ( {
|
|
5
|
-
'> :only-child': {
|
|
6
|
-
width: '100%',
|
|
7
|
-
},
|
|
8
|
-
'&:where( :has( > :nth-child( 2 ):last-child ) ) > :where( * )': {
|
|
9
|
-
width: direction === 'column' ? '100%' : `calc( 50% - ${ theme.spacing( gap / 2 ) })`,
|
|
10
|
-
},
|
|
11
|
-
'&:where( :has( > :nth-child( 3 ):last-child ) ) > :where( * )': {
|
|
12
|
-
width: direction === 'column' ? '100%' : `calc( 33.3333% - ${ theme.spacing( gap * 2 ) } / 3)`,
|
|
13
|
-
},
|
|
14
|
-
} ) );
|
|
15
|
-
|
|
16
|
-
export const ControlContainer = ( props: StackProps ) => (
|
|
17
|
-
<StyledStack gap={ 1 } direction="row" alignItems="center" justifyContent="space-between" { ...props } />
|
|
18
|
-
);
|
package/src/types.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export type ElementID = string;
|
|
2
|
-
|
|
3
|
-
export type Element = {
|
|
4
|
-
id: ElementID;
|
|
5
|
-
type: string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export type ElementType = {
|
|
9
|
-
key: string;
|
|
10
|
-
controls: ControlItem[];
|
|
11
|
-
propsSchema: PropsSchema;
|
|
12
|
-
title: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type ControlsSection = {
|
|
16
|
-
type: 'section';
|
|
17
|
-
value: {
|
|
18
|
-
description?: string;
|
|
19
|
-
label: string;
|
|
20
|
-
items: ControlItem[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type Control = {
|
|
25
|
-
type: 'control';
|
|
26
|
-
value: {
|
|
27
|
-
bind: string;
|
|
28
|
-
label?: string;
|
|
29
|
-
description?: string;
|
|
30
|
-
type: string;
|
|
31
|
-
props: Record< string, unknown >;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export type ControlItem = ControlsSection | Control;
|
|
36
|
-
|
|
37
|
-
export type AdditionalPropType = {
|
|
38
|
-
key: string;
|
|
39
|
-
settings: Record< string, unknown >;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export type PropDefinition = {
|
|
43
|
-
type: {
|
|
44
|
-
key: string;
|
|
45
|
-
default: PropValue;
|
|
46
|
-
settings: Record< string, unknown >;
|
|
47
|
-
};
|
|
48
|
-
additional_types: Array< AdditionalPropType >;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export type PropsSchema = Record< Control[ 'value' ][ 'bind' ], PropDefinition >;
|
|
52
|
-
|
|
53
|
-
type MaybeArray< T > = T | T[];
|
|
54
|
-
|
|
55
|
-
export type TransformablePropValue< T = unknown > = {
|
|
56
|
-
$$type: string;
|
|
57
|
-
value: T;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export type PlainPropValue = MaybeArray< string | number | boolean | object | null | undefined >;
|
|
61
|
-
|
|
62
|
-
export type PropValue = PlainPropValue | TransformablePropValue;
|
|
63
|
-
|
|
64
|
-
export type PropKey = string;
|
|
65
|
-
|
|
66
|
-
export type Props = Record< PropKey, PropValue >;
|
|
67
|
-
|
|
68
|
-
export type PlainProps = Record< PropKey, PlainPropValue >;
|