@elementor/editor-editing-panel 1.5.1 → 1.7.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/index.d.mts +37 -3
  3. package/dist/index.d.ts +37 -3
  4. package/dist/index.js +816 -606
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +798 -570
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +6 -6
  9. package/src/components/css-class-menu.tsx +125 -0
  10. package/src/components/css-class-selector.tsx +156 -33
  11. package/src/components/multi-combobox.tsx +184 -0
  12. package/src/components/style-sections/border-section/border-field.tsx +1 -5
  13. package/src/components/style-sections/position-section/position-field.tsx +1 -0
  14. package/src/components/style-tab.tsx +13 -4
  15. package/src/contexts/css-class-item-context.tsx +31 -0
  16. package/src/contexts/style-context.tsx +4 -3
  17. package/src/controls-registry/create-top-level-object-type.ts +14 -0
  18. package/src/controls-registry/settings-field.tsx +12 -14
  19. package/src/controls-registry/styles-field.tsx +17 -5
  20. package/src/css-classes.ts +37 -0
  21. package/src/dynamics/components/dynamic-selection-control.tsx +1 -1
  22. package/src/dynamics/components/dynamic-selection.tsx +3 -4
  23. package/src/dynamics/dynamic-control.tsx +16 -11
  24. package/src/dynamics/hooks/use-dynamic-tag.ts +2 -3
  25. package/src/dynamics/hooks/use-prop-dynamic-action.tsx +1 -4
  26. package/src/dynamics/hooks/use-prop-dynamic-tags.ts +3 -6
  27. package/src/dynamics/utils.ts +1 -1
  28. package/src/hooks/use-styles-fields.ts +1 -0
  29. package/src/index.ts +1 -0
  30. package/src/init.ts +2 -0
  31. package/src/components/multi-combobox/index.ts +0 -3
  32. package/src/components/multi-combobox/multi-combobox.tsx +0 -122
  33. package/src/components/multi-combobox/types.ts +0 -29
  34. package/src/components/multi-combobox/use-combobox-actions.ts +0 -62
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fbde10d: Add UX flow for creating new global class
8
+ - a2245c5: Change prop provider infra to support nested props.
9
+ - d4ff040: added "sticky" options for position control on styles tab
10
+
11
+ ### Patch Changes
12
+
13
+ - 1f2cf85: Update classes prop type
14
+ - Updated dependencies [5fc8d7b]
15
+ - Updated dependencies [fbde10d]
16
+ - Updated dependencies [a2245c5]
17
+ - @elementor/editor-controls@0.5.0
18
+ - @elementor/editor-styles-repository@0.3.3
19
+ - @elementor/editor-elements@0.4.0
20
+ - @elementor/editor-styles@0.5.0
21
+ - @elementor/editor-props@0.6.0
22
+
23
+ ## 1.6.0
24
+
25
+ ### Minor Changes
26
+
27
+ - b18d1a6: Added pseudo selectors to css class selectors
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [6a3622a]
32
+ - Updated dependencies [b18d1a6]
33
+ - @elementor/editor-controls@0.4.1
34
+ - @elementor/editor-props@0.5.1
35
+ - @elementor/editor-styles@0.4.0
36
+ - @elementor/editor-elements@0.3.5
37
+ - @elementor/editor-styles-repository@0.3.2
38
+
3
39
  ## 1.5.1
4
40
 
5
41
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { useBoundProp } from '@elementor/editor-controls';
2
- import * as react from 'react';
2
+ import * as React from 'react';
3
3
  import { ElementType, ComponentType } from 'react';
4
4
  import * as _elementor_editor_props from '@elementor/editor-props';
5
+ import { StyleState } from '@elementor/editor-styles';
5
6
 
6
7
  type PopoverActionProps = {
7
8
  title: string;
@@ -13,10 +14,43 @@ type PopoverActionProps = {
13
14
  };
14
15
 
15
16
  declare const replaceControl: ({ component, condition }: {
16
- component: react.ComponentType;
17
+ component: React.ComponentType;
17
18
  condition: ({ value }: {
18
19
  value: _elementor_editor_props.PropValue;
19
20
  }) => boolean;
20
21
  }) => void;
21
22
 
22
- export { type PopoverActionProps, replaceControl };
23
+ declare const registerStateMenuItem: (args: {
24
+ id: string;
25
+ group?: "default" | undefined;
26
+ priority?: number;
27
+ overwrite?: boolean;
28
+ } & ({
29
+ props: StateMenuItemProps;
30
+ useProps?: never;
31
+ } | {
32
+ useProps: () => StateMenuItemProps;
33
+ props?: never;
34
+ })) => void;
35
+ declare const registerGlobalClassMenuItem: (args: {
36
+ id: string;
37
+ group?: "default" | undefined;
38
+ priority?: number;
39
+ overwrite?: boolean;
40
+ } & ({
41
+ props: GlobalClassMenuItemProps;
42
+ useProps?: never;
43
+ } | {
44
+ useProps: () => GlobalClassMenuItemProps;
45
+ props?: never;
46
+ })) => void;
47
+ type StateMenuItemProps = {
48
+ state: StyleState;
49
+ disabled?: boolean;
50
+ };
51
+ type GlobalClassMenuItemProps = {
52
+ text: string;
53
+ onClick: () => void;
54
+ };
55
+
56
+ export { type PopoverActionProps, registerGlobalClassMenuItem, registerStateMenuItem, replaceControl };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { useBoundProp } from '@elementor/editor-controls';
2
- import * as react from 'react';
2
+ import * as React from 'react';
3
3
  import { ElementType, ComponentType } from 'react';
4
4
  import * as _elementor_editor_props from '@elementor/editor-props';
5
+ import { StyleState } from '@elementor/editor-styles';
5
6
 
6
7
  type PopoverActionProps = {
7
8
  title: string;
@@ -13,10 +14,43 @@ type PopoverActionProps = {
13
14
  };
14
15
 
15
16
  declare const replaceControl: ({ component, condition }: {
16
- component: react.ComponentType;
17
+ component: React.ComponentType;
17
18
  condition: ({ value }: {
18
19
  value: _elementor_editor_props.PropValue;
19
20
  }) => boolean;
20
21
  }) => void;
21
22
 
22
- export { type PopoverActionProps, replaceControl };
23
+ declare const registerStateMenuItem: (args: {
24
+ id: string;
25
+ group?: "default" | undefined;
26
+ priority?: number;
27
+ overwrite?: boolean;
28
+ } & ({
29
+ props: StateMenuItemProps;
30
+ useProps?: never;
31
+ } | {
32
+ useProps: () => StateMenuItemProps;
33
+ props?: never;
34
+ })) => void;
35
+ declare const registerGlobalClassMenuItem: (args: {
36
+ id: string;
37
+ group?: "default" | undefined;
38
+ priority?: number;
39
+ overwrite?: boolean;
40
+ } & ({
41
+ props: GlobalClassMenuItemProps;
42
+ useProps?: never;
43
+ } | {
44
+ useProps: () => GlobalClassMenuItemProps;
45
+ props?: never;
46
+ })) => void;
47
+ type StateMenuItemProps = {
48
+ state: StyleState;
49
+ disabled?: boolean;
50
+ };
51
+ type GlobalClassMenuItemProps = {
52
+ text: string;
53
+ onClick: () => void;
54
+ };
55
+
56
+ export { type PopoverActionProps, registerGlobalClassMenuItem, registerStateMenuItem, replaceControl };