@elementor/editor-controls 1.2.0 → 1.3.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 +26 -0
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +645 -415
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +570 -341
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/bound-prop-context/prop-context.tsx +3 -3
- package/src/bound-prop-context/prop-key-context.tsx +1 -0
- package/src/bound-prop-context/use-bound-prop.ts +5 -1
- package/src/components/text-field-popover.tsx +19 -18
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +3 -15
- package/src/controls/box-shadow-repeater-control.tsx +1 -1
- package/src/controls/equal-unequal-sizes-control.tsx +1 -1
- package/src/controls/font-family-control/font-family-control.tsx +14 -2
- package/src/controls/image-control.tsx +45 -16
- package/src/controls/link-control.tsx +25 -20
- package/src/controls/linked-dimensions-control.tsx +1 -1
- package/src/controls/repeatable-control.tsx +77 -17
- package/src/controls/select-control.tsx +22 -2
- package/src/controls/switch-control.tsx +9 -1
- package/src/controls/transform-control/functions/axis-row.tsx +32 -0
- package/src/controls/transform-control/functions/move.tsx +44 -0
- package/src/controls/transform-control/transform-content.tsx +36 -0
- package/src/controls/transform-control/transform-icon.tsx +12 -0
- package/src/controls/transform-control/transform-label.tsx +27 -0
- package/src/controls/transform-control/transform-repeater-control.tsx +42 -0
- package/src/hooks/use-repeatable-control-context.ts +6 -1
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @elementor/editor-controls
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5c6a912: Fixed issue with item label in repeatable control
|
|
8
|
+
- b3726f6: Add transform move control
|
|
9
|
+
- b17730a: Placeholder logic added to select control & font-family control
|
|
10
|
+
- 1a37b1c: Update the Elementor UI version.
|
|
11
|
+
- c62d64c: Injected prop dependency API into settings field
|
|
12
|
+
- d1fc9d2: Update TextFieldPopover to use slotProps for Paper styling
|
|
13
|
+
- 12333b0: Update `@elementor/icons` package.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 8f38cf3: Fix image control layout
|
|
18
|
+
- d4406fd: Add missing FF to link control.
|
|
19
|
+
- Updated dependencies [b3726f6]
|
|
20
|
+
- Updated dependencies [68ce0d9]
|
|
21
|
+
- Updated dependencies [1a37b1c]
|
|
22
|
+
- Updated dependencies [c62d64c]
|
|
23
|
+
- Updated dependencies [12333b0]
|
|
24
|
+
- @elementor/editor-props@0.16.0
|
|
25
|
+
- @elementor/editor-current-user@0.6.0
|
|
26
|
+
- @elementor/editor-ui@0.14.0
|
|
27
|
+
- @elementor/editor-elements@0.9.0
|
|
28
|
+
|
|
3
29
|
## 1.2.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -206,6 +206,8 @@ declare const KeyValueControl: ControlComponent<(props?: KeyValueControlProps) =
|
|
|
206
206
|
|
|
207
207
|
declare const PositionControl: () => React$1.JSX.Element;
|
|
208
208
|
|
|
209
|
+
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
210
|
+
|
|
209
211
|
declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
|
|
210
212
|
|
|
211
213
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
@@ -245,11 +247,11 @@ type PropContext<T extends PropValue, P extends PropType> = {
|
|
|
245
247
|
value: T | null;
|
|
246
248
|
propType: P;
|
|
247
249
|
placeholder?: T;
|
|
248
|
-
|
|
250
|
+
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
249
251
|
};
|
|
250
252
|
declare const PropContext: React$1.Context<PropContext<PropValue, PropType> | null>;
|
|
251
253
|
type PropProviderProps<T extends PropValue, P extends PropType> = React$1.PropsWithChildren<PropContext<T, P>>;
|
|
252
|
-
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder,
|
|
254
|
+
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, isDisabled, }: PropProviderProps<T, P>) => React$1.JSX.Element;
|
|
253
255
|
|
|
254
256
|
type PropKeyContextValue<T, P> = {
|
|
255
257
|
bind: PropKey;
|
|
@@ -258,6 +260,7 @@ type PropKeyContextValue<T, P> = {
|
|
|
258
260
|
propType: P;
|
|
259
261
|
placeholder?: T;
|
|
260
262
|
path: PropKey[];
|
|
263
|
+
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
261
264
|
disabled?: boolean;
|
|
262
265
|
};
|
|
263
266
|
type PropKeyProviderProps = React$1.PropsWithChildren<{
|
|
@@ -273,6 +276,7 @@ type UseBoundProp<TValue extends PropValue> = {
|
|
|
273
276
|
placeholder?: TValue;
|
|
274
277
|
path: PropKey[];
|
|
275
278
|
restoreValue: () => void;
|
|
279
|
+
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
276
280
|
disabled?: boolean;
|
|
277
281
|
};
|
|
278
282
|
declare function useBoundProp<T extends PropValue = PropValue, P extends PropType = PropType>(): PropKeyContextValue<T, P>;
|
|
@@ -321,4 +325,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
321
325
|
};
|
|
322
326
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
323
327
|
|
|
324
|
-
export { AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, FontFamilySelector, GapControl, ImageControl, KeyValueControl, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, type Unit, UrlControl, createControlReplacementsRegistry, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, useBoundProp, useControlActions, useSyncExternalState };
|
|
328
|
+
export { AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, FontFamilySelector, GapControl, ImageControl, KeyValueControl, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformRepeaterControl, type Unit, UrlControl, createControlReplacementsRegistry, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, useBoundProp, useControlActions, useSyncExternalState };
|
package/dist/index.d.ts
CHANGED
|
@@ -206,6 +206,8 @@ declare const KeyValueControl: ControlComponent<(props?: KeyValueControlProps) =
|
|
|
206
206
|
|
|
207
207
|
declare const PositionControl: () => React$1.JSX.Element;
|
|
208
208
|
|
|
209
|
+
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
210
|
+
|
|
209
211
|
declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
|
|
210
212
|
|
|
211
213
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
@@ -245,11 +247,11 @@ type PropContext<T extends PropValue, P extends PropType> = {
|
|
|
245
247
|
value: T | null;
|
|
246
248
|
propType: P;
|
|
247
249
|
placeholder?: T;
|
|
248
|
-
|
|
250
|
+
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
249
251
|
};
|
|
250
252
|
declare const PropContext: React$1.Context<PropContext<PropValue, PropType> | null>;
|
|
251
253
|
type PropProviderProps<T extends PropValue, P extends PropType> = React$1.PropsWithChildren<PropContext<T, P>>;
|
|
252
|
-
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder,
|
|
254
|
+
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, isDisabled, }: PropProviderProps<T, P>) => React$1.JSX.Element;
|
|
253
255
|
|
|
254
256
|
type PropKeyContextValue<T, P> = {
|
|
255
257
|
bind: PropKey;
|
|
@@ -258,6 +260,7 @@ type PropKeyContextValue<T, P> = {
|
|
|
258
260
|
propType: P;
|
|
259
261
|
placeholder?: T;
|
|
260
262
|
path: PropKey[];
|
|
263
|
+
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
261
264
|
disabled?: boolean;
|
|
262
265
|
};
|
|
263
266
|
type PropKeyProviderProps = React$1.PropsWithChildren<{
|
|
@@ -273,6 +276,7 @@ type UseBoundProp<TValue extends PropValue> = {
|
|
|
273
276
|
placeholder?: TValue;
|
|
274
277
|
path: PropKey[];
|
|
275
278
|
restoreValue: () => void;
|
|
279
|
+
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
276
280
|
disabled?: boolean;
|
|
277
281
|
};
|
|
278
282
|
declare function useBoundProp<T extends PropValue = PropValue, P extends PropType = PropType>(): PropKeyContextValue<T, P>;
|
|
@@ -321,4 +325,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
321
325
|
};
|
|
322
326
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
323
327
|
|
|
324
|
-
export { AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, FontFamilySelector, GapControl, ImageControl, KeyValueControl, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, type Unit, UrlControl, createControlReplacementsRegistry, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, useBoundProp, useControlActions, useSyncExternalState };
|
|
328
|
+
export { AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, FontFamilySelector, GapControl, ImageControl, KeyValueControl, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformRepeaterControl, type Unit, UrlControl, createControlReplacementsRegistry, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, useBoundProp, useControlActions, useSyncExternalState };
|