@elementor/editor-editing-panel 0.14.2 → 0.16.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 (59) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/index.d.mts +29 -1
  3. package/dist/index.d.ts +29 -1
  4. package/dist/index.js +939 -302
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +944 -294
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +9 -8
  9. package/src/components/editing-panel.tsx +1 -1
  10. package/src/components/settings-tab.tsx +6 -17
  11. package/src/components/style-sections/position-section/position-section.tsx +15 -0
  12. package/src/components/style-sections/position-section/z-index-control.tsx +16 -0
  13. package/src/components/style-sections/size-section.tsx +14 -18
  14. package/src/components/style-sections/spacing-section/linked-dimensions-control.tsx +140 -0
  15. package/src/components/style-sections/spacing-section/spacing-section.tsx +22 -0
  16. package/src/components/style-sections/typography-section/font-size-control.tsx +16 -0
  17. package/src/components/style-sections/typography-section/font-weight-control.tsx +24 -0
  18. package/src/components/style-sections/typography-section/letter-spacing-control.tsx +16 -0
  19. package/src/components/style-sections/typography-section/text-color-control.tsx +16 -0
  20. package/src/{controls/control-types → components/style-sections/typography-section}/text-style-control.tsx +16 -14
  21. package/src/components/style-sections/typography-section/transform-control.tsx +23 -0
  22. package/src/components/style-sections/typography-section/typography-section.tsx +34 -0
  23. package/src/components/style-sections/typography-section/word-spacing-control.tsx +16 -0
  24. package/src/components/style-tab.tsx +30 -6
  25. package/src/contexts/element-context.tsx +5 -3
  26. package/src/contexts/style-context.tsx +8 -2
  27. package/src/controls/components/control-container.tsx +18 -0
  28. package/src/controls/components/control-toggle-button-group.tsx +59 -0
  29. package/src/controls/components/text-field-inner-selection.tsx +79 -0
  30. package/src/controls/control-replacement.ts +26 -0
  31. package/src/controls/control-types/color-control.tsx +24 -0
  32. package/src/controls/control-types/image-control.tsx +3 -18
  33. package/src/controls/control-types/number-control.tsx +25 -0
  34. package/src/controls/control-types/size-control.tsx +22 -34
  35. package/src/controls/control-types/text-area-control.tsx +1 -1
  36. package/src/controls/control-types/toggle-control.tsx +25 -0
  37. package/src/controls/control.tsx +50 -0
  38. package/src/controls/{get-control-by-type.ts → controls-registry.tsx} +13 -9
  39. package/src/controls/hooks/use-style-control.ts +2 -1
  40. package/src/controls/settings-control.tsx +8 -21
  41. package/src/dynamics/components/dynamic-selection-control.tsx +180 -0
  42. package/src/dynamics/components/dynamic-selection.tsx +144 -0
  43. package/src/dynamics/dynamic-control.tsx +42 -0
  44. package/src/dynamics/hooks/use-dynamic-tag.ts +10 -0
  45. package/src/dynamics/hooks/use-prop-dynamic-tags.ts +36 -0
  46. package/src/dynamics/init.ts +10 -0
  47. package/src/dynamics/sync/get-atomic-dynamic-tags.ts +14 -0
  48. package/src/dynamics/sync/get-elementor-config.ts +7 -0
  49. package/src/dynamics/types.ts +32 -0
  50. package/src/dynamics/utils.ts +9 -0
  51. package/src/hooks/use-element-type.ts +5 -0
  52. package/src/index.ts +3 -0
  53. package/src/init.ts +4 -0
  54. package/src/props/is-transformable.ts +14 -0
  55. package/src/sync/types.ts +2 -1
  56. package/src/sync/update-style.ts +2 -2
  57. package/src/types.ts +17 -0
  58. package/LICENSE +0 -674
  59. package/src/components/style-sections/typography-section.tsx +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ad6aec4: Update `SizeControl` component
8
+ - cf81790: Update `@elementor/icons` version
9
+ - f702a03: Toggle linked control icon
10
+ - 4f78dec: adding letter-spacing style control
11
+ - ccde574: Create dynamic selection control with settings popover
12
+ - 0f30451: Adding spacing icons to `editor-editing-panel`
13
+ - 33e110d: Added `ControlToggleButtonGroup`
14
+ - 285b2ed: add text color control
15
+ - 1b67bf8: Added `SpacingSection` and `LinkedDimensionsControl` components
16
+ - 0e70721: Update `@elementor/ui` and `@elementor/icons` versions
17
+ - 4b9f9f2: add z-index control
18
+ - 14ae76d: Adding transform style control
19
+ - 709fb22: Added `DynamicSelection` component
20
+ - 4128717: adding word-spacing style control
21
+ - 1b97b07: Change `StyleTab` layout
22
+ - 830a19a: Add dynamic wrapper, separate dynamics from controls
23
+
24
+ ### Patch Changes
25
+
26
+ - a2a9237: Remove hard-coded classes prop type
27
+ - Updated dependencies [49b8465]
28
+ - Updated dependencies [0e70721]
29
+ - @elementor/editor-style@0.3.0
30
+ - @elementor/editor-panels@0.7.0
31
+ - @elementor/editor@0.14.0
32
+
33
+ ## 0.15.0
34
+
35
+ ### Minor Changes
36
+
37
+ - c67ae92: Add control component
38
+ - c9c430d: Create hook for supported dynamic categories
39
+ - 68acbed: Add font size control, separate customs from generic controls
40
+ - 4929220: Refactor - move `elementType` into `ElementContext`
41
+ - c3a53d7: Add icons to `TextStyleControl`
42
+ - 730ef85: Add `getDynamicTagsByCategories` function
43
+ - ed21ec8: Create a font weight control in the editor panel
44
+ - 4c6e274: Add support for default values from the widget schema
45
+
46
+ ### Patch Changes
47
+
48
+ - 44d49dd: Update `@elementor/ui` version
49
+ - ad3cd19: Fix settings control layout when there is no label
50
+
3
51
  All notable changes to this project will be documented in this file.
4
52
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
53
 
package/dist/index.d.mts CHANGED
@@ -1,2 +1,30 @@
1
+ import * as react from 'react';
1
2
 
2
- export { }
3
+ type MaybeArray<T> = T | T[];
4
+ type TransformablePropValue<T = unknown> = {
5
+ $$type: string;
6
+ value: T;
7
+ };
8
+ type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
9
+ type PropValue = PlainPropValue | TransformablePropValue;
10
+ type PropKey = string;
11
+
12
+ type ReplaceWhenParams = {
13
+ value: PropValue;
14
+ };
15
+ type ControlReplacement = {
16
+ component: React.ComponentType;
17
+ condition: ({ value }: ReplaceWhenParams) => boolean;
18
+ };
19
+ declare const replaceControl: ({ component, condition }: ControlReplacement) => void;
20
+
21
+ type ControlContext<T extends PropValue> = {
22
+ bind: PropKey;
23
+ setValue: (value: T | undefined) => void;
24
+ value: T | undefined;
25
+ };
26
+ declare const ControlContext: react.Context<ControlContext<PropValue> | null>;
27
+ declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
28
+ declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
29
+
30
+ export { replaceControl, useControl };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,30 @@
1
+ import * as react from 'react';
1
2
 
2
- export { }
3
+ type MaybeArray<T> = T | T[];
4
+ type TransformablePropValue<T = unknown> = {
5
+ $$type: string;
6
+ value: T;
7
+ };
8
+ type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
9
+ type PropValue = PlainPropValue | TransformablePropValue;
10
+ type PropKey = string;
11
+
12
+ type ReplaceWhenParams = {
13
+ value: PropValue;
14
+ };
15
+ type ControlReplacement = {
16
+ component: React.ComponentType;
17
+ condition: ({ value }: ReplaceWhenParams) => boolean;
18
+ };
19
+ declare const replaceControl: ({ component, condition }: ControlReplacement) => void;
20
+
21
+ type ControlContext<T extends PropValue> = {
22
+ bind: PropKey;
23
+ setValue: (value: T | undefined) => void;
24
+ value: T | undefined;
25
+ };
26
+ declare const ControlContext: react.Context<ControlContext<PropValue> | null>;
27
+ declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
28
+ declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
29
+
30
+ export { replaceControl, useControl };