@elementor/editor-editing-panel 0.19.0 → 1.0.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 +51 -0
- package/dist/index.d.mts +5 -22
- package/dist/index.d.ts +5 -22
- package/dist/index.js +1444 -1165
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1434 -1148
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -14
- package/src/components/accordion-section.tsx +3 -2
- package/src/components/add-or-remove-content.tsx +42 -0
- package/src/components/collapsible-field.tsx +34 -0
- package/src/components/editing-panel.tsx +15 -18
- package/src/components/settings-tab.tsx +11 -10
- package/src/components/style-sections/background-section/background-color-field.tsx +21 -0
- package/src/components/style-sections/background-section/background-section.tsx +2 -2
- package/src/components/style-sections/border-section/border-color-field.tsx +21 -0
- package/src/components/style-sections/border-section/border-field.tsx +47 -0
- package/src/components/style-sections/border-section/border-radius-field.tsx +48 -0
- package/src/components/style-sections/border-section/border-section.tsx +16 -0
- package/src/components/style-sections/border-section/border-style-field.tsx +32 -0
- package/src/components/style-sections/border-section/border-width-field.tsx +42 -0
- package/src/components/style-sections/effects-section/effects-section.tsx +5 -5
- package/src/components/style-sections/position-section/dimensions-field.tsx +46 -0
- package/src/components/style-sections/position-section/position-field.tsx +28 -0
- package/src/components/style-sections/position-section/position-section.tsx +15 -2
- package/src/components/style-sections/position-section/z-index-field.tsx +21 -0
- package/src/components/style-sections/size-section/overflow-field.tsx +45 -0
- package/src/components/style-sections/size-section/size-section.tsx +55 -0
- package/src/components/style-sections/spacing-section/spacing-section.tsx +6 -6
- package/src/components/style-sections/typography-section/font-size-field.tsx +21 -0
- package/src/components/style-sections/typography-section/{font-weight-control.tsx → font-weight-field.tsx} +7 -6
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +21 -0
- package/src/components/style-sections/typography-section/{text-alignment-control.tsx → text-alignment-field.tsx} +7 -7
- package/src/components/style-sections/typography-section/text-color-field.tsx +21 -0
- package/src/components/style-sections/typography-section/{text-direction-control.tsx → text-direction-field.tsx} +7 -7
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +16 -0
- package/src/components/style-sections/typography-section/{text-style-control.tsx → text-style-field.tsx} +4 -4
- package/src/components/style-sections/typography-section/{transform-control.tsx → transform-field.tsx} +7 -6
- package/src/components/style-sections/typography-section/typography-section.tsx +20 -18
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +21 -0
- package/src/components/style-tab.tsx +42 -25
- package/src/contexts/classes-prop-context.tsx +24 -0
- package/src/{controls/providers/element-provider.tsx → contexts/element-context.tsx} +3 -7
- package/src/contexts/style-context.tsx +8 -22
- package/src/control-replacement.tsx +1 -1
- package/src/controls/bound-prop-context.tsx +30 -0
- package/src/controls/components/control-toggle-button-group.tsx +15 -6
- package/src/controls/components/repeater.tsx +1 -1
- package/src/controls/components/text-field-inner-selection.tsx +20 -24
- package/src/controls/control-actions/control-actions-context.tsx +27 -0
- package/src/controls/control-actions/control-actions-menu.ts +6 -7
- package/src/controls/control-actions/control-actions.tsx +14 -26
- package/src/{components/style-sections/effects-section/box-shadow-repeater.tsx → controls/controls/box-shadow-repeater-control.tsx} +51 -65
- package/src/controls/controls/color-control.tsx +25 -0
- package/src/controls/controls/equal-unequal-sizes-control.tsx +196 -0
- package/src/controls/{control-types → controls}/image-control.tsx +15 -23
- package/src/controls/{control-types → controls}/image-media-control.tsx +5 -14
- package/src/{components/style-sections/spacing-section → controls/controls}/linked-dimensions-control.tsx +10 -26
- package/src/controls/{control-types → controls}/number-control.tsx +2 -2
- package/src/controls/{control-types → controls}/select-control.tsx +4 -4
- package/src/controls/{control-types → controls}/size-control.tsx +8 -8
- package/src/controls/controls/stroke-control.tsx +105 -0
- package/src/controls/{control-types → controls}/text-area-control.tsx +3 -3
- package/src/controls/{control-types → controls}/text-control.tsx +3 -3
- package/src/controls/{control-types → controls}/toggle-control.tsx +4 -4
- package/src/controls/create-control-replacement.tsx +3 -3
- package/src/controls/index.ts +24 -0
- package/src/controls-actions.ts +8 -0
- package/src/{controls/components → controls-registry}/control-type-container.tsx +1 -1
- package/src/{controls → controls-registry}/controls-registry.tsx +1 -6
- package/src/controls-registry/settings-field.tsx +35 -0
- package/src/controls-registry/styles-field.tsx +19 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +11 -11
- package/src/dynamics/components/dynamic-selection.tsx +3 -3
- package/src/dynamics/dynamic-control.tsx +6 -5
- package/src/dynamics/hooks/use-dynamic-tag.ts +1 -1
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +6 -6
- package/src/dynamics/hooks/use-prop-dynamic-tags.ts +2 -2
- package/src/dynamics/hooks/use-prop-value-history.ts +2 -2
- package/src/dynamics/init.ts +1 -3
- package/src/dynamics/types.ts +2 -2
- package/src/dynamics/utils.ts +1 -2
- package/src/hooks/use-styles-field.ts +30 -0
- package/src/index.ts +2 -3
- package/src/sync/should-use-v2-panel.ts +1 -2
- package/src/sync/types.ts +3 -3
- package/src/components/style-sections/background-section/background-color-control.tsx +0 -20
- package/src/components/style-sections/position-section/z-index-control.tsx +0 -20
- package/src/components/style-sections/size-section.tsx +0 -49
- package/src/components/style-sections/typography-section/font-size-control.tsx +0 -20
- package/src/components/style-sections/typography-section/letter-spacing-control.tsx +0 -20
- package/src/components/style-sections/typography-section/text-color-control.tsx +0 -20
- package/src/components/style-sections/typography-section/word-spacing-control.tsx +0 -20
- package/src/controls/control-context.tsx +0 -22
- package/src/controls/control-replacement.ts +0 -34
- package/src/controls/control-types/color-control.tsx +0 -27
- package/src/controls/hooks/use-style-control.ts +0 -29
- package/src/controls/hooks/use-widget-settings.ts +0 -16
- package/src/controls/props/is-transformable.ts +0 -13
- package/src/controls/props/types.ts +0 -51
- package/src/controls/settings-control.tsx +0 -37
- package/src/controls/style-control.tsx +0 -20
- package/src/controls/sync/get-container.ts +0 -8
- package/src/controls/sync/update-settings.ts +0 -14
- package/src/controls/types.ts +0 -39
- package/src/hooks/use-element-style-prop.ts +0 -46
- package/src/hooks/use-element-styles.ts +0 -13
- package/src/hooks/use-element-type.ts +0 -33
- package/src/hooks/use-selected-elements.ts +0 -9
- package/src/sync/get-element-styles.ts +0 -9
- package/src/sync/get-selected-elements.ts +0 -21
- package/src/sync/get-widgets-cache.ts +0 -7
- package/src/sync/update-style.ts +0 -25
- package/src/{controls → controls-registry}/control.tsx +0 -0
- package/src/{controls/control-actions/actions/popover-action.tsx → popover-action.tsx} +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- eecd225: Create separated elements, controls, props folders.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- bfaad79: Hide empty floating actions bars
|
|
12
|
+
- f4a8651: Added additional border params - style, color and width
|
|
13
|
+
- e489102: Fix forwardRef error in `TextFieldInnerSelection`
|
|
14
|
+
- 6b9f40a: Added position fixed
|
|
15
|
+
- 04e58ea: Added overflow control to size section
|
|
16
|
+
- 22f8240: Replaced `UnstableColorPicker` with `UnstableColorField` in color control
|
|
17
|
+
- e035b94: Added border-radius style control
|
|
18
|
+
- 3b46d09: Added `box-shadow` transformer.
|
|
19
|
+
- a46ac3a: Created the `editor-elements` packages.
|
|
20
|
+
- 27334a3: Add a new Position section
|
|
21
|
+
- 0218ca1: Changed style tab sections order and collapse all sections by default
|
|
22
|
+
- 0820794: Split control-actions as preparation to a new controls package.
|
|
23
|
+
- e1a0004: Added position absolute
|
|
24
|
+
- eac188a: Update background-color control to use the new color picker component.
|
|
25
|
+
- e69bdae: Created the `editor-props` and `editor-styles` packages.
|
|
26
|
+
- c020e19: Add Text Stroke Control
|
|
27
|
+
- bf12c4d: Moved all prop type utils to the `editor-props` package.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 9abdfaf: Fix package.json exports field
|
|
32
|
+
- 2b28089: Add classes prop context to support global classes
|
|
33
|
+
- 036b439: Refactor styles context as preparation for global css classes
|
|
34
|
+
- 6cf7ba1: Change controls naming
|
|
35
|
+
- Updated dependencies [9abdfaf]
|
|
36
|
+
- Updated dependencies [2b28089]
|
|
37
|
+
- Updated dependencies [036b439]
|
|
38
|
+
- Updated dependencies [22f8240]
|
|
39
|
+
- Updated dependencies [a46ac3a]
|
|
40
|
+
- Updated dependencies [6cf7ba1]
|
|
41
|
+
- Updated dependencies [e69bdae]
|
|
42
|
+
- Updated dependencies [bf12c4d]
|
|
43
|
+
- @elementor/editor-v1-adapters@0.8.3
|
|
44
|
+
- @elementor/editor-responsive@0.12.2
|
|
45
|
+
- @elementor/editor-panels@0.9.0
|
|
46
|
+
- @elementor/wp-media@0.2.1
|
|
47
|
+
- @elementor/editor@0.16.0
|
|
48
|
+
- @elementor/menus@0.1.1
|
|
49
|
+
- @elementor/utils@0.2.2
|
|
50
|
+
- @elementor/editor-styles@0.2.0
|
|
51
|
+
- @elementor/editor-elements@0.2.0
|
|
52
|
+
- @elementor/editor-props@0.2.0
|
|
53
|
+
|
|
3
54
|
## 0.19.0
|
|
4
55
|
|
|
5
56
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ElementType, ComponentType } from 'react';
|
|
3
|
-
import
|
|
2
|
+
import { PropValue, PropKey } from '@elementor/editor-props';
|
|
4
3
|
|
|
5
4
|
type PopoverActionProps = {
|
|
6
5
|
title: string;
|
|
@@ -10,17 +9,6 @@ type PopoverActionProps = {
|
|
|
10
9
|
closePopover: () => void;
|
|
11
10
|
}>;
|
|
12
11
|
};
|
|
13
|
-
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
14
|
-
|
|
15
|
-
type MaybeArray<T> = T | T[];
|
|
16
|
-
type TransformablePropValue<Type extends string, Value = unknown> = {
|
|
17
|
-
$$type: Type;
|
|
18
|
-
value: Value;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
22
|
-
type PropValue = PlainPropValue | TransformablePropValue<string>;
|
|
23
|
-
type PropKey = string;
|
|
24
12
|
|
|
25
13
|
type ReplaceWhenParams = {
|
|
26
14
|
value: PropValue;
|
|
@@ -32,17 +20,12 @@ type CreateControlReplacement = {
|
|
|
32
20
|
|
|
33
21
|
declare const replaceControl: ({ component, condition }: CreateControlReplacement) => void;
|
|
34
22
|
|
|
35
|
-
type
|
|
23
|
+
type BoundPropContext<T extends PropValue> = {
|
|
36
24
|
bind: PropKey;
|
|
37
25
|
setValue: (value: T | undefined) => void;
|
|
38
26
|
value: T | undefined;
|
|
39
27
|
};
|
|
40
|
-
declare
|
|
41
|
-
declare function
|
|
42
|
-
declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
|
|
43
|
-
|
|
44
|
-
declare const controlActionsMenu: _elementor_menus.Menu<{
|
|
45
|
-
PopoverAction: typeof PopoverAction;
|
|
46
|
-
}, "default">;
|
|
28
|
+
declare function useBoundProp<T extends PropValue>(): BoundPropContext<T | undefined>;
|
|
29
|
+
declare function useBoundProp<T extends PropValue>(defaultValue: T): BoundPropContext<T>;
|
|
47
30
|
|
|
48
|
-
export { type PopoverActionProps,
|
|
31
|
+
export { type PopoverActionProps, replaceControl, useBoundProp };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ElementType, ComponentType } from 'react';
|
|
3
|
-
import
|
|
2
|
+
import { PropValue, PropKey } from '@elementor/editor-props';
|
|
4
3
|
|
|
5
4
|
type PopoverActionProps = {
|
|
6
5
|
title: string;
|
|
@@ -10,17 +9,6 @@ type PopoverActionProps = {
|
|
|
10
9
|
closePopover: () => void;
|
|
11
10
|
}>;
|
|
12
11
|
};
|
|
13
|
-
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
14
|
-
|
|
15
|
-
type MaybeArray<T> = T | T[];
|
|
16
|
-
type TransformablePropValue<Type extends string, Value = unknown> = {
|
|
17
|
-
$$type: Type;
|
|
18
|
-
value: Value;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
22
|
-
type PropValue = PlainPropValue | TransformablePropValue<string>;
|
|
23
|
-
type PropKey = string;
|
|
24
12
|
|
|
25
13
|
type ReplaceWhenParams = {
|
|
26
14
|
value: PropValue;
|
|
@@ -32,17 +20,12 @@ type CreateControlReplacement = {
|
|
|
32
20
|
|
|
33
21
|
declare const replaceControl: ({ component, condition }: CreateControlReplacement) => void;
|
|
34
22
|
|
|
35
|
-
type
|
|
23
|
+
type BoundPropContext<T extends PropValue> = {
|
|
36
24
|
bind: PropKey;
|
|
37
25
|
setValue: (value: T | undefined) => void;
|
|
38
26
|
value: T | undefined;
|
|
39
27
|
};
|
|
40
|
-
declare
|
|
41
|
-
declare function
|
|
42
|
-
declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
|
|
43
|
-
|
|
44
|
-
declare const controlActionsMenu: _elementor_menus.Menu<{
|
|
45
|
-
PopoverAction: typeof PopoverAction;
|
|
46
|
-
}, "default">;
|
|
28
|
+
declare function useBoundProp<T extends PropValue>(): BoundPropContext<T | undefined>;
|
|
29
|
+
declare function useBoundProp<T extends PropValue>(defaultValue: T): BoundPropContext<T>;
|
|
47
30
|
|
|
48
|
-
export { type PopoverActionProps,
|
|
31
|
+
export { type PopoverActionProps, replaceControl, useBoundProp };
|