@elementor/editor-editing-panel 0.19.0 → 1.1.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 +97 -0
- package/dist/index.d.mts +10 -36
- package/dist/index.d.ts +10 -36
- package/dist/index.js +1256 -1445
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1311 -1482
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -14
- package/src/components/add-or-remove-content.tsx +42 -0
- package/src/components/collapse-icon.tsx +12 -0
- package/src/components/collapsible-content.tsx +5 -14
- package/src/components/collapsible-field.tsx +36 -0
- package/src/components/css-class-selector-section.tsx +76 -0
- package/src/components/editing-panel-hooks.tsx +2 -0
- package/src/components/editing-panel-tabs.tsx +23 -13
- package/src/components/editing-panel.tsx +21 -21
- package/src/components/multi-combobox/index.ts +3 -0
- package/src/components/multi-combobox/multi-combobox.tsx +120 -0
- package/src/components/multi-combobox/types.ts +26 -0
- package/src/components/multi-combobox/use-combobox-actions.ts +62 -0
- package/src/components/section.tsx +37 -0
- package/src/components/sections-list.tsx +6 -0
- package/src/components/settings-tab.tsx +17 -16
- package/src/components/style-sections/background-section/background-color-field.tsx +21 -0
- package/src/components/style-sections/background-section/background-section.tsx +10 -8
- package/src/components/style-sections/border-section/border-color-field.tsx +21 -0
- package/src/components/style-sections/border-section/border-field.tsx +48 -0
- package/src/components/style-sections/border-section/border-radius-field.tsx +49 -0
- package/src/components/style-sections/border-section/border-section.tsx +13 -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 +43 -0
- package/src/components/style-sections/effects-section/effects-section.tsx +8 -11
- package/src/components/style-sections/layout-section/display-field.tsx +32 -0
- package/src/components/style-sections/layout-section/justify-content-field.tsx +82 -0
- package/src/components/style-sections/layout-section/layout-section.tsx +17 -0
- package/src/components/style-sections/layout-section/utils/rotate-flex-icon.ts +12 -0
- 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 +51 -8
- 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 +62 -0
- package/src/components/style-sections/spacing-section/spacing-section.tsx +12 -14
- package/src/components/style-sections/typography-section/font-family-field.tsx +40 -0
- 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} +9 -8
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +21 -0
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +47 -0
- 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} +12 -12
- 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} +9 -8
- package/src/components/style-sections/typography-section/transform-field.tsx +40 -0
- package/src/components/style-sections/typography-section/typography-section.tsx +31 -30
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +21 -0
- package/src/components/style-tab.tsx +82 -29
- 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 +10 -23
- package/src/control-replacement.tsx +1 -1
- package/src/{controls/control-actions/control-actions-menu.ts → controls-actions.ts} +2 -1
- package/src/{controls/components → controls-registry}/control-type-container.tsx +3 -2
- package/src/{controls → controls-registry}/control.tsx +2 -1
- package/src/{controls → controls-registry}/controls-registry.tsx +8 -6
- package/src/controls-registry/settings-field.tsx +36 -0
- package/src/controls-registry/styles-field.tsx +20 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +18 -17
- package/src/dynamics/components/dynamic-selection.tsx +10 -9
- package/src/dynamics/dynamic-control.tsx +7 -6
- package/src/dynamics/hooks/use-dynamic-tag.ts +3 -2
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +7 -6
- package/src/dynamics/hooks/use-prop-dynamic-tags.ts +3 -2
- package/src/dynamics/init.ts +3 -3
- package/src/dynamics/sync/get-elementor-config.ts +1 -1
- package/src/dynamics/types.ts +2 -2
- package/src/dynamics/utils.ts +3 -3
- package/src/hooks/use-close-editor-panel.ts +23 -0
- package/src/hooks/use-direction.ts +13 -0
- package/src/hooks/use-open-editor-panel.ts +4 -3
- package/src/hooks/use-prop-value-history.ts +45 -0
- package/src/hooks/use-style-prop-history.ts +75 -0
- package/src/hooks/use-styles-field.ts +51 -0
- package/src/index.ts +2 -3
- package/src/init.ts +5 -4
- package/src/panel.ts +1 -0
- package/src/{controls/control-actions/actions/popover-action.tsx → popover-action.tsx} +2 -2
- package/src/sync/enqueue-font.ts +7 -0
- package/src/sync/get-elementor-config.ts +7 -0
- package/src/sync/{should-use-v2-panel.ts → is-atomic-widget-selected.ts} +2 -3
- package/src/sync/types.ts +20 -21
- package/src/components/accordion-section.tsx +0 -25
- package/src/components/control-label.tsx +0 -10
- package/src/components/style-sections/background-section/background-color-control.tsx +0 -20
- package/src/components/style-sections/effects-section/box-shadow-repeater.tsx +0 -224
- 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/spacing-section/linked-dimensions-control.tsx +0 -155
- 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-alignment-control.tsx +0 -47
- package/src/components/style-sections/typography-section/text-color-control.tsx +0 -20
- package/src/components/style-sections/typography-section/transform-control.tsx +0 -25
- package/src/components/style-sections/typography-section/word-spacing-control.tsx +0 -20
- package/src/controls/components/control-toggle-button-group.tsx +0 -59
- package/src/controls/components/repeater.tsx +0 -197
- package/src/controls/components/text-field-inner-selection.tsx +0 -79
- package/src/controls/control-actions/control-actions.tsx +0 -43
- 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/control-types/image-control.tsx +0 -66
- package/src/controls/control-types/image-media-control.tsx +0 -73
- package/src/controls/control-types/number-control.tsx +0 -29
- package/src/controls/control-types/select-control.tsx +0 -30
- package/src/controls/control-types/size-control.tsx +0 -71
- package/src/controls/control-types/text-area-control.tsx +0 -31
- package/src/controls/control-types/text-control.tsx +0 -17
- package/src/controls/control-types/toggle-control.tsx +0 -26
- package/src/controls/create-control-replacement.tsx +0 -53
- package/src/controls/create-control.tsx +0 -40
- package/src/controls/hooks/use-style-control.ts +0 -29
- package/src/controls/hooks/use-sync-external-state.tsx +0 -51
- 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/dynamics/hooks/use-prop-value-history.ts +0 -26
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,102 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e7f4706: save style props to session
|
|
8
|
+
- e4c6e3b: update @elementor/ui version
|
|
9
|
+
fix color picker position in box shadow repeater control
|
|
10
|
+
make the color control full width
|
|
11
|
+
- 53ac7c9: Add support for a single size shorthand in EqualUnequalSizesControl
|
|
12
|
+
- 00bdd7e: Added layout section with display field, updated toggle button group to match new children elements
|
|
13
|
+
- 1d6619b: Close edit panel for atomic widget upon deletion
|
|
14
|
+
- cecdfba: Updated display field with a flex option, together with a "justify content" field
|
|
15
|
+
- 1d7879e: Add `MultiCombobox` with actions.
|
|
16
|
+
- 19bf117: Add font family control to style tab
|
|
17
|
+
- 55962f8: Add background color overlay control
|
|
18
|
+
- e2ee013: Created the `editor-controls` packages.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 7781969: Create basic UI for the class selector
|
|
23
|
+
- 95bb0ce: Update Section to use Collapse component instead of Accordion
|
|
24
|
+
- 8fe671b: Fix typos in texts and file names
|
|
25
|
+
- 7781969: Update `@elementor/ui` version
|
|
26
|
+
- 5c3d546: Fix some style issues in the editing panel and controls
|
|
27
|
+
- Updated dependencies [e7f4706]
|
|
28
|
+
- Updated dependencies [7781969]
|
|
29
|
+
- Updated dependencies [e4c6e3b]
|
|
30
|
+
- Updated dependencies [d21c5c3]
|
|
31
|
+
- Updated dependencies [00bdd7e]
|
|
32
|
+
- Updated dependencies [6e240a8]
|
|
33
|
+
- Updated dependencies [cecdfba]
|
|
34
|
+
- Updated dependencies [6d5475d]
|
|
35
|
+
- Updated dependencies [7781969]
|
|
36
|
+
- Updated dependencies [0c6bcb6]
|
|
37
|
+
- Updated dependencies [5c3d546]
|
|
38
|
+
- Updated dependencies [55962f8]
|
|
39
|
+
- Updated dependencies [e2ee013]
|
|
40
|
+
- @elementor/editor-elements@0.3.0
|
|
41
|
+
- @elementor/utils@0.3.0
|
|
42
|
+
- @elementor/editor-styles@0.2.1
|
|
43
|
+
- @elementor/editor-controls@0.1.0
|
|
44
|
+
- @elementor/editor-panels@0.10.0
|
|
45
|
+
- @elementor/editor@0.17.0
|
|
46
|
+
- @elementor/editor-props@0.3.0
|
|
47
|
+
- @elementor/editor-v1-adapters@0.8.4
|
|
48
|
+
|
|
49
|
+
## 1.0.0
|
|
50
|
+
|
|
51
|
+
### Major Changes
|
|
52
|
+
|
|
53
|
+
- eecd225: Create separated elements, controls, props folders.
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- bfaad79: Hide empty floating actions bars
|
|
58
|
+
- f4a8651: Added additional border params - style, color and width
|
|
59
|
+
- e489102: Fix forwardRef error in `TextFieldInnerSelection`
|
|
60
|
+
- 6b9f40a: Added position fixed
|
|
61
|
+
- 04e58ea: Added overflow control to size section
|
|
62
|
+
- 22f8240: Replaced `UnstableColorPicker` with `UnstableColorField` in color control
|
|
63
|
+
- e035b94: Added border-radius style control
|
|
64
|
+
- 3b46d09: Added `box-shadow` transformer.
|
|
65
|
+
- a46ac3a: Created the `editor-elements` packages.
|
|
66
|
+
- 27334a3: Add a new Position section
|
|
67
|
+
- 0218ca1: Changed style tab sections order and collapse all sections by default
|
|
68
|
+
- 0820794: Split control-actions as preparation to a new controls package.
|
|
69
|
+
- e1a0004: Added position absolute
|
|
70
|
+
- eac188a: Update background-color control to use the new color picker component.
|
|
71
|
+
- e69bdae: Created the `editor-props` and `editor-styles` packages.
|
|
72
|
+
- c020e19: Add Text Stroke Control
|
|
73
|
+
- bf12c4d: Moved all prop type utils to the `editor-props` package.
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 9abdfaf: Fix package.json exports field
|
|
78
|
+
- 2b28089: Add classes prop context to support global classes
|
|
79
|
+
- 036b439: Refactor styles context as preparation for global css classes
|
|
80
|
+
- 6cf7ba1: Change controls naming
|
|
81
|
+
- Updated dependencies [9abdfaf]
|
|
82
|
+
- Updated dependencies [2b28089]
|
|
83
|
+
- Updated dependencies [036b439]
|
|
84
|
+
- Updated dependencies [22f8240]
|
|
85
|
+
- Updated dependencies [a46ac3a]
|
|
86
|
+
- Updated dependencies [6cf7ba1]
|
|
87
|
+
- Updated dependencies [e69bdae]
|
|
88
|
+
- Updated dependencies [bf12c4d]
|
|
89
|
+
- @elementor/editor-v1-adapters@0.8.3
|
|
90
|
+
- @elementor/editor-responsive@0.12.2
|
|
91
|
+
- @elementor/editor-panels@0.9.0
|
|
92
|
+
- @elementor/wp-media@0.2.1
|
|
93
|
+
- @elementor/editor@0.16.0
|
|
94
|
+
- @elementor/menus@0.1.1
|
|
95
|
+
- @elementor/utils@0.2.2
|
|
96
|
+
- @elementor/editor-styles@0.2.0
|
|
97
|
+
- @elementor/editor-elements@0.2.0
|
|
98
|
+
- @elementor/editor-props@0.2.0
|
|
99
|
+
|
|
3
100
|
## 0.19.0
|
|
4
101
|
|
|
5
102
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export { useBoundProp } from '@elementor/editor-controls';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
import { ElementType, ComponentType } from 'react';
|
|
3
|
-
import * as
|
|
4
|
+
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
4
5
|
|
|
5
6
|
type PopoverActionProps = {
|
|
6
7
|
title: string;
|
|
@@ -10,39 +11,12 @@ type PopoverActionProps = {
|
|
|
10
11
|
closePopover: () => void;
|
|
11
12
|
}>;
|
|
12
13
|
};
|
|
13
|
-
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
22
|
-
type PropValue = PlainPropValue | TransformablePropValue<string>;
|
|
23
|
-
type PropKey = string;
|
|
24
|
-
|
|
25
|
-
type ReplaceWhenParams = {
|
|
26
|
-
value: PropValue;
|
|
27
|
-
};
|
|
28
|
-
type CreateControlReplacement = {
|
|
29
|
-
component: ComponentType;
|
|
30
|
-
condition: ({ value }: ReplaceWhenParams) => boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
declare const replaceControl: ({ component, condition }: CreateControlReplacement) => void;
|
|
34
|
-
|
|
35
|
-
type ControlContext<T extends PropValue> = {
|
|
36
|
-
bind: PropKey;
|
|
37
|
-
setValue: (value: T | undefined) => void;
|
|
38
|
-
value: T | undefined;
|
|
39
|
-
};
|
|
40
|
-
declare const ControlContext: React.Context<ControlContext<PropValue> | null>;
|
|
41
|
-
declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
|
|
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">;
|
|
15
|
+
declare const replaceControl: ({ component, condition }: {
|
|
16
|
+
component: react.ComponentType;
|
|
17
|
+
condition: ({ value }: {
|
|
18
|
+
value: _elementor_editor_props.PropValue;
|
|
19
|
+
}) => boolean;
|
|
20
|
+
}) => void;
|
|
47
21
|
|
|
48
|
-
export { type PopoverActionProps,
|
|
22
|
+
export { type PopoverActionProps, replaceControl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export { useBoundProp } from '@elementor/editor-controls';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
import { ElementType, ComponentType } from 'react';
|
|
3
|
-
import * as
|
|
4
|
+
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
4
5
|
|
|
5
6
|
type PopoverActionProps = {
|
|
6
7
|
title: string;
|
|
@@ -10,39 +11,12 @@ type PopoverActionProps = {
|
|
|
10
11
|
closePopover: () => void;
|
|
11
12
|
}>;
|
|
12
13
|
};
|
|
13
|
-
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
22
|
-
type PropValue = PlainPropValue | TransformablePropValue<string>;
|
|
23
|
-
type PropKey = string;
|
|
24
|
-
|
|
25
|
-
type ReplaceWhenParams = {
|
|
26
|
-
value: PropValue;
|
|
27
|
-
};
|
|
28
|
-
type CreateControlReplacement = {
|
|
29
|
-
component: ComponentType;
|
|
30
|
-
condition: ({ value }: ReplaceWhenParams) => boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
declare const replaceControl: ({ component, condition }: CreateControlReplacement) => void;
|
|
34
|
-
|
|
35
|
-
type ControlContext<T extends PropValue> = {
|
|
36
|
-
bind: PropKey;
|
|
37
|
-
setValue: (value: T | undefined) => void;
|
|
38
|
-
value: T | undefined;
|
|
39
|
-
};
|
|
40
|
-
declare const ControlContext: React.Context<ControlContext<PropValue> | null>;
|
|
41
|
-
declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
|
|
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">;
|
|
15
|
+
declare const replaceControl: ({ component, condition }: {
|
|
16
|
+
component: react.ComponentType;
|
|
17
|
+
condition: ({ value }: {
|
|
18
|
+
value: _elementor_editor_props.PropValue;
|
|
19
|
+
}) => boolean;
|
|
20
|
+
}) => void;
|
|
47
21
|
|
|
48
|
-
export { type PopoverActionProps,
|
|
22
|
+
export { type PopoverActionProps, replaceControl };
|