@elementor/editor-controls 0.33.0 → 0.34.1
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 +24 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +152 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -80
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/bound-prop-context/prop-context.tsx +3 -0
- package/src/bound-prop-context/prop-key-context.tsx +1 -0
- package/src/bound-prop-context/use-bound-prop.ts +1 -0
- package/src/components/control-toggle-button-group.tsx +6 -2
- package/src/components/popover-content.tsx +4 -2
- package/src/components/repeater.tsx +19 -10
- package/src/components/text-field-inner-selection.tsx +6 -0
- package/src/control-actions/control-actions.tsx +7 -1
- package/src/controls/aspect-ratio-control.tsx +13 -5
- package/src/controls/background-control/background-control.tsx +16 -19
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +2 -1
- package/src/controls/box-shadow-repeater-control.tsx +2 -1
- package/src/controls/color-control.tsx +2 -1
- package/src/controls/equal-unequal-sizes-control.tsx +25 -14
- package/src/controls/font-family-control/font-family-control.tsx +2 -1
- package/src/controls/gap-control.tsx +4 -1
- package/src/controls/linked-dimensions-control.tsx +36 -10
- package/src/controls/number-control.tsx +2 -1
- package/src/controls/select-control.tsx +2 -1
- package/src/controls/size-control.tsx +35 -27
- package/src/controls/switch-control.tsx +2 -2
- package/src/controls/text-area-control.tsx +2 -1
- package/src/controls/text-control.tsx +2 -1
- package/src/controls/toggle-control.tsx +3 -1
- package/src/controls/url-control.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @elementor/editor-controls
|
|
2
2
|
|
|
3
|
+
## 0.34.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8f3a61b: Floating action bar position change
|
|
8
|
+
|
|
9
|
+
## 0.34.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- da38004: add size icon for Aspect Ratio control
|
|
14
|
+
- a8780f6: Extra top and bottom padding added to border radius and border width fields
|
|
15
|
+
- 3b2514c: update indication popover ui
|
|
16
|
+
- 03df0ff: Fixed floating actions background
|
|
17
|
+
- 0ed1947: Added control value reset functionality
|
|
18
|
+
- 2c5df45: Update `@elementor/icons` package.
|
|
19
|
+
- 010ba54: Disable style tab controls by user capability.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 71835ef: Support style inheritance indicators in nested props controls
|
|
24
|
+
- Updated dependencies [2c5df45]
|
|
25
|
+
- @elementor/editor-ui@0.10.0
|
|
26
|
+
|
|
3
27
|
## 0.33.0
|
|
4
28
|
|
|
5
29
|
### 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>;
|