@elementor/editor-editing-panel 0.16.0 → 0.18.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 +44 -0
- package/dist/index.d.mts +26 -9
- package/dist/index.d.ts +26 -9
- package/dist/index.js +910 -360
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +886 -327
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
- package/src/components/settings-tab.tsx +5 -2
- 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 +47 -0
- 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 +4 -0
- package/src/components/style-sections/typography-section/word-spacing-control.tsx +10 -6
- package/src/components/style-tab.tsx +5 -1
- package/src/controls/components/control-type-container.tsx +28 -0
- package/src/controls/components/repeater.tsx +197 -0
- 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-replacement.ts +15 -7
- 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 +13 -9
- package/src/controls/control-types/size-control.tsx +17 -13
- 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 +3 -2
- package/src/controls/control.tsx +1 -7
- package/src/controls/controls-registry.tsx +19 -10
- package/src/controls/create-control.tsx +31 -0
- package/src/controls/settings-control.tsx +2 -9
- package/src/dynamics/components/dynamic-selection-control.tsx +4 -3
- package/src/dynamics/components/dynamic-selection.tsx +19 -8
- package/src/dynamics/dynamic-control.tsx +1 -1
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +23 -0
- package/src/dynamics/hooks/use-prop-dynamic-tags.ts +4 -4
- package/src/dynamics/hooks/use-prop-value-history.ts +26 -0
- package/src/dynamics/init.ts +9 -0
- package/src/dynamics/types.ts +6 -3
- package/src/dynamics/utils.ts +18 -5
- package/src/index.ts +2 -0
- package/src/types.ts +35 -14
- package/src/controls/components/control-container.tsx +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c1f4bcb: Added `TextDirectionControl`
|
|
8
|
+
- 1206fbd: Added support for inner props in `ImageControl`
|
|
9
|
+
- 8bbc145: Update `@elementor/icons` version
|
|
10
|
+
- b7dca9f: Update `@elementor/icons` version
|
|
11
|
+
- aa24b6f: Render settings control layout by type
|
|
12
|
+
- 701fc35: Updated color picker version
|
|
13
|
+
- 4d27f27: Added controls repeater, and box shadow control.
|
|
14
|
+
- 9a77872: adding control floating bar
|
|
15
|
+
- 28620a5: added registration of dynamic tag item to control actions
|
|
16
|
+
- d1b6297: Use Grid components to render style controls layout.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 97e6534: Changed bind name format and added color prop type
|
|
21
|
+
- 68e3a30: apply control replacement on the control component
|
|
22
|
+
|
|
23
|
+
create a function to wrap each control to allow general solutions for each control
|
|
24
|
+
|
|
25
|
+
- 20e9aeb: Adjusting `prop-types` to fit the new structure
|
|
26
|
+
- 8a50411: change linked dimensions control default value
|
|
27
|
+
- Updated dependencies [1206fbd]
|
|
28
|
+
- Updated dependencies [97e6534]
|
|
29
|
+
- Updated dependencies [701fc35]
|
|
30
|
+
- @elementor/wp-media@0.2.0
|
|
31
|
+
- @elementor/editor-style@0.4.1
|
|
32
|
+
- @elementor/editor-panels@0.8.0
|
|
33
|
+
- @elementor/editor@0.15.0
|
|
34
|
+
|
|
35
|
+
## 0.17.0
|
|
36
|
+
|
|
37
|
+
### Minor Changes
|
|
38
|
+
|
|
39
|
+
- e4f30e9: Restore previous value from session when removing the dynamic value.
|
|
40
|
+
- 658f569: added `TextAlignmentControl`
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [59c991b]
|
|
45
|
+
- @elementor/editor-style@0.4.0
|
|
46
|
+
|
|
3
47
|
## 0.16.0
|
|
4
48
|
|
|
5
49
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,30 +1,47 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ElementType, ComponentType } from 'react';
|
|
3
|
+
import * as _elementor_menus from '@elementor/menus';
|
|
4
|
+
|
|
5
|
+
type PopoverActionProps = {
|
|
6
|
+
title: string;
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
icon: ElementType;
|
|
9
|
+
popoverContent: ComponentType<{
|
|
10
|
+
closePopover: () => void;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
2
14
|
|
|
3
15
|
type MaybeArray<T> = T | T[];
|
|
4
|
-
type TransformablePropValue<
|
|
5
|
-
$$type:
|
|
6
|
-
value:
|
|
16
|
+
type TransformablePropValue<Type extends string, Value = unknown> = {
|
|
17
|
+
$$type: Type;
|
|
18
|
+
value: Value;
|
|
19
|
+
disabled?: boolean;
|
|
7
20
|
};
|
|
8
21
|
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
9
|
-
type PropValue = PlainPropValue | TransformablePropValue
|
|
22
|
+
type PropValue = PlainPropValue | TransformablePropValue<string>;
|
|
10
23
|
type PropKey = string;
|
|
11
24
|
|
|
12
25
|
type ReplaceWhenParams = {
|
|
13
26
|
value: PropValue;
|
|
14
27
|
};
|
|
15
28
|
type ControlReplacement = {
|
|
16
|
-
component:
|
|
29
|
+
component: ComponentType;
|
|
17
30
|
condition: ({ value }: ReplaceWhenParams) => boolean;
|
|
18
31
|
};
|
|
19
|
-
declare
|
|
32
|
+
declare function replaceControl({ component, condition }: ControlReplacement): void;
|
|
20
33
|
|
|
21
34
|
type ControlContext<T extends PropValue> = {
|
|
22
35
|
bind: PropKey;
|
|
23
36
|
setValue: (value: T | undefined) => void;
|
|
24
37
|
value: T | undefined;
|
|
25
38
|
};
|
|
26
|
-
declare const ControlContext:
|
|
39
|
+
declare const ControlContext: React.Context<ControlContext<PropValue> | null>;
|
|
27
40
|
declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
|
|
28
41
|
declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
|
|
29
42
|
|
|
30
|
-
|
|
43
|
+
declare const controlActionsMenu: _elementor_menus.Menu<{
|
|
44
|
+
PopoverAction: typeof PopoverAction;
|
|
45
|
+
}, "default">;
|
|
46
|
+
|
|
47
|
+
export { type PopoverActionProps, controlActionsMenu, replaceControl, useControl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,47 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ElementType, ComponentType } from 'react';
|
|
3
|
+
import * as _elementor_menus from '@elementor/menus';
|
|
4
|
+
|
|
5
|
+
type PopoverActionProps = {
|
|
6
|
+
title: string;
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
icon: ElementType;
|
|
9
|
+
popoverContent: ComponentType<{
|
|
10
|
+
closePopover: () => void;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
2
14
|
|
|
3
15
|
type MaybeArray<T> = T | T[];
|
|
4
|
-
type TransformablePropValue<
|
|
5
|
-
$$type:
|
|
6
|
-
value:
|
|
16
|
+
type TransformablePropValue<Type extends string, Value = unknown> = {
|
|
17
|
+
$$type: Type;
|
|
18
|
+
value: Value;
|
|
19
|
+
disabled?: boolean;
|
|
7
20
|
};
|
|
8
21
|
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
9
|
-
type PropValue = PlainPropValue | TransformablePropValue
|
|
22
|
+
type PropValue = PlainPropValue | TransformablePropValue<string>;
|
|
10
23
|
type PropKey = string;
|
|
11
24
|
|
|
12
25
|
type ReplaceWhenParams = {
|
|
13
26
|
value: PropValue;
|
|
14
27
|
};
|
|
15
28
|
type ControlReplacement = {
|
|
16
|
-
component:
|
|
29
|
+
component: ComponentType;
|
|
17
30
|
condition: ({ value }: ReplaceWhenParams) => boolean;
|
|
18
31
|
};
|
|
19
|
-
declare
|
|
32
|
+
declare function replaceControl({ component, condition }: ControlReplacement): void;
|
|
20
33
|
|
|
21
34
|
type ControlContext<T extends PropValue> = {
|
|
22
35
|
bind: PropKey;
|
|
23
36
|
setValue: (value: T | undefined) => void;
|
|
24
37
|
value: T | undefined;
|
|
25
38
|
};
|
|
26
|
-
declare const ControlContext:
|
|
39
|
+
declare const ControlContext: React.Context<ControlContext<PropValue> | null>;
|
|
27
40
|
declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
|
|
28
41
|
declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
|
|
29
42
|
|
|
30
|
-
|
|
43
|
+
declare const controlActionsMenu: _elementor_menus.Menu<{
|
|
44
|
+
PopoverAction: typeof PopoverAction;
|
|
45
|
+
}, "default">;
|
|
46
|
+
|
|
47
|
+
export { type PopoverActionProps, controlActionsMenu, replaceControl, useControl };
|