@elementor/editor-controls 0.33.0 → 0.34.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 (33) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.d.mts +6 -2
  3. package/dist/index.d.ts +6 -2
  4. package/dist/index.js +153 -83
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +151 -81
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +3 -3
  9. package/src/bound-prop-context/prop-context.tsx +3 -0
  10. package/src/bound-prop-context/prop-key-context.tsx +1 -0
  11. package/src/bound-prop-context/use-bound-prop.ts +1 -0
  12. package/src/components/control-toggle-button-group.tsx +6 -2
  13. package/src/components/popover-content.tsx +4 -2
  14. package/src/components/repeater.tsx +19 -10
  15. package/src/components/text-field-inner-selection.tsx +6 -0
  16. package/src/control-actions/control-actions.tsx +10 -2
  17. package/src/controls/aspect-ratio-control.tsx +13 -5
  18. package/src/controls/background-control/background-control.tsx +16 -19
  19. package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +2 -1
  20. package/src/controls/box-shadow-repeater-control.tsx +2 -1
  21. package/src/controls/color-control.tsx +2 -1
  22. package/src/controls/equal-unequal-sizes-control.tsx +25 -14
  23. package/src/controls/font-family-control/font-family-control.tsx +2 -1
  24. package/src/controls/gap-control.tsx +4 -1
  25. package/src/controls/linked-dimensions-control.tsx +36 -10
  26. package/src/controls/number-control.tsx +2 -1
  27. package/src/controls/select-control.tsx +2 -1
  28. package/src/controls/size-control.tsx +35 -27
  29. package/src/controls/switch-control.tsx +2 -2
  30. package/src/controls/text-area-control.tsx +2 -1
  31. package/src/controls/text-control.tsx +2 -1
  32. package/src/controls/toggle-control.tsx +3 -1
  33. package/src/controls/url-control.tsx +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @elementor/editor-controls
2
2
 
3
+ ## 0.34.0
4
+
5
+ ### Minor Changes
6
+
7
+ - da38004: add size icon for Aspect Ratio control
8
+ - a8780f6: Extra top and bottom padding added to border radius and border width fields
9
+ - 3b2514c: update indication popover ui
10
+ - 03df0ff: Fixed floating actions background
11
+ - 0ed1947: Added control value reset functionality
12
+ - 2c5df45: Update `@elementor/icons` package.
13
+ - 010ba54: Disable style tab controls by user capability.
14
+
15
+ ### Patch Changes
16
+
17
+ - 71835ef: Support style inheritance indicators in nested props controls
18
+ - Updated dependencies [2c5df45]
19
+ - @elementor/editor-ui@0.10.0
20
+
3
21
  ## 0.33.0
4
22
 
5
23
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -65,6 +65,7 @@ type ToggleButtonGroupItem<TValue> = {
65
65
  type ExclusiveValue<TValue> = TValue;
66
66
  type NonExclusiveValue<TValue> = TValue[];
67
67
  type Props$3<TValue> = {
68
+ disabled?: boolean;
68
69
  justify?: StackProps['justifyContent'];
69
70
  size?: ToggleButtonProps['size'];
70
71
  items: ToggleButtonGroupItem<TValue | null>[];
@@ -79,7 +80,7 @@ type Props$3<TValue> = {
79
80
  value: ExclusiveValue<TValue>;
80
81
  onChange: (value: ExclusiveValue<TValue>) => void;
81
82
  });
82
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
83
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, }: Props$3<TValue>) => React.JSX.Element;
83
84
 
84
85
  type ToggleControlProps<T extends PropValue> = {
85
86
  options: Array<ToggleButtonGroupItem<T> & {
@@ -196,10 +197,11 @@ type PropContext<T extends PropValue, P extends PropType> = {
196
197
  value: T | null;
197
198
  propType: P;
198
199
  placeholder?: T;
200
+ disabled?: boolean;
199
201
  };
200
202
  declare const PropContext: React.Context<PropContext<PropValue, PropType> | null>;
201
203
  type PropProviderProps<T extends PropValue, P extends PropType> = React.PropsWithChildren<PropContext<T, P>>;
202
- declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, }: PropProviderProps<T, P>) => React.JSX.Element;
204
+ declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, disabled, }: PropProviderProps<T, P>) => React.JSX.Element;
203
205
 
204
206
  type PropKeyContextValue<T, P> = {
205
207
  bind: PropKey;
@@ -208,6 +210,7 @@ type PropKeyContextValue<T, P> = {
208
210
  propType: P;
209
211
  placeholder?: T;
210
212
  path: PropKey[];
213
+ disabled?: boolean;
211
214
  };
212
215
  type PropKeyProviderProps = React.PropsWithChildren<{
213
216
  bind: PropKey;
@@ -222,6 +225,7 @@ type UseBoundProp<TValue extends PropValue> = {
222
225
  placeholder?: TValue;
223
226
  path: PropKey[];
224
227
  restoreValue: () => void;
228
+ disabled?: boolean;
225
229
  };
226
230
  declare function useBoundProp<T extends PropValue = PropValue>(): PropKeyContextValue<T, PropType>;
227
231
  declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
package/dist/index.d.ts CHANGED
@@ -65,6 +65,7 @@ type ToggleButtonGroupItem<TValue> = {
65
65
  type ExclusiveValue<TValue> = TValue;
66
66
  type NonExclusiveValue<TValue> = TValue[];
67
67
  type Props$3<TValue> = {
68
+ disabled?: boolean;
68
69
  justify?: StackProps['justifyContent'];
69
70
  size?: ToggleButtonProps['size'];
70
71
  items: ToggleButtonGroupItem<TValue | null>[];
@@ -79,7 +80,7 @@ type Props$3<TValue> = {
79
80
  value: ExclusiveValue<TValue>;
80
81
  onChange: (value: ExclusiveValue<TValue>) => void;
81
82
  });
82
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
83
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, }: Props$3<TValue>) => React.JSX.Element;
83
84
 
84
85
  type ToggleControlProps<T extends PropValue> = {
85
86
  options: Array<ToggleButtonGroupItem<T> & {
@@ -196,10 +197,11 @@ type PropContext<T extends PropValue, P extends PropType> = {
196
197
  value: T | null;
197
198
  propType: P;
198
199
  placeholder?: T;
200
+ disabled?: boolean;
199
201
  };
200
202
  declare const PropContext: React.Context<PropContext<PropValue, PropType> | null>;
201
203
  type PropProviderProps<T extends PropValue, P extends PropType> = React.PropsWithChildren<PropContext<T, P>>;
202
- declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, }: PropProviderProps<T, P>) => React.JSX.Element;
204
+ declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, disabled, }: PropProviderProps<T, P>) => React.JSX.Element;
203
205
 
204
206
  type PropKeyContextValue<T, P> = {
205
207
  bind: PropKey;
@@ -208,6 +210,7 @@ type PropKeyContextValue<T, P> = {
208
210
  propType: P;
209
211
  placeholder?: T;
210
212
  path: PropKey[];
213
+ disabled?: boolean;
211
214
  };
212
215
  type PropKeyProviderProps = React.PropsWithChildren<{
213
216
  bind: PropKey;
@@ -222,6 +225,7 @@ type UseBoundProp<TValue extends PropValue> = {
222
225
  placeholder?: TValue;
223
226
  path: PropKey[];
224
227
  restoreValue: () => void;
228
+ disabled?: boolean;
225
229
  };
226
230
  declare function useBoundProp<T extends PropValue = PropValue>(): PropKeyContextValue<T, PropType>;
227
231
  declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;