@elementor/editor-controls 0.13.0 → 0.15.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 +36 -0
- package/dist/index.d.mts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +443 -244
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +468 -268
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -7
- package/src/api.ts +16 -0
- package/src/components/repeater.tsx +21 -23
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx +1 -1
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +8 -2
- package/src/controls/equal-unequal-sizes-control.tsx +15 -10
- package/src/controls/font-family-control/enqueue-font.tsx +15 -0
- package/src/controls/font-family-control/font-family-control.tsx +286 -0
- package/src/controls/gap-control.tsx +20 -12
- package/src/controls/image-control.tsx +7 -2
- package/src/controls/image-media-control.tsx +5 -7
- package/src/controls/link-control.tsx +2 -13
- package/src/controls/linked-dimensions-control.tsx +141 -89
- package/src/controls/size-control.tsx +91 -26
- package/src/controls/svg-media-control.tsx +17 -7
- package/src/hooks/use-filtered-font-families.ts +13 -26
- package/src/hooks/use-unfiltered-files-upload.ts +40 -0
- package/src/index.ts +2 -1
- package/src/controls/font-family-control.tsx +0 -157
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @elementor/editor-controls
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a654cb2: Update `@elementor/icons` version
|
|
8
|
+
- f99d23c: Add missing tooltips for style controls
|
|
9
|
+
- f6a4d4f: add API client and hooks for enabling unfiltered files upload
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 23458d1: Make atomic controls use Logical Properties
|
|
14
|
+
- cab4ddf: Improve Font Family control performance
|
|
15
|
+
- Updated dependencies [23458d1]
|
|
16
|
+
- Updated dependencies [f6a4d4f]
|
|
17
|
+
- @elementor/editor-props@0.9.4
|
|
18
|
+
- @elementor/wp-media@0.5.0
|
|
19
|
+
- @elementor/http@0.1.4
|
|
20
|
+
|
|
21
|
+
## 0.14.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 1a1e998: Add auto size unit to size controls
|
|
26
|
+
- bcf4254: VQA text fixes
|
|
27
|
+
- ed5962d: removed transparency during, to prevent ui glitches while using drag-n-drop to re-order repeater nodes
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- f4b76ac: cannot link values once you unlinked them when input is empty
|
|
32
|
+
- 571ff75: Add `debounce` util
|
|
33
|
+
- Updated dependencies [c654f89]
|
|
34
|
+
- Updated dependencies [571ff75]
|
|
35
|
+
- @elementor/editor-props@0.9.3
|
|
36
|
+
- @elementor/utils@0.4.0
|
|
37
|
+
- @elementor/wp-media@0.4.2
|
|
38
|
+
|
|
3
39
|
## 0.13.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -21,13 +21,15 @@ type Props$5 = {
|
|
|
21
21
|
};
|
|
22
22
|
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$5) => React.JSX.Element>;
|
|
23
23
|
|
|
24
|
+
type ExtendedValue = 'auto';
|
|
24
25
|
type Unit = 'px' | '%' | 'em' | 'rem' | 'vw' | 'vh';
|
|
25
26
|
type SizeControlProps = {
|
|
26
27
|
placeholder?: string;
|
|
27
28
|
startIcon?: React.ReactNode;
|
|
28
29
|
units?: Unit[];
|
|
30
|
+
extendedValues?: ExtendedValue[];
|
|
29
31
|
};
|
|
30
|
-
declare const SizeControl: ControlComponent<({ units, placeholder, startIcon }: SizeControlProps) => React.JSX.Element>;
|
|
32
|
+
declare const SizeControl: ControlComponent<({ units, extendedValues, placeholder, startIcon }: SizeControlProps) => React.JSX.Element>;
|
|
31
33
|
|
|
32
34
|
declare const StrokeControl: ControlComponent<() => React.JSX.Element>;
|
|
33
35
|
|
|
@@ -100,16 +102,22 @@ type EqualUnequalItems = [Item, Item, Item, Item];
|
|
|
100
102
|
type Props$1<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
|
|
101
103
|
label: string;
|
|
102
104
|
icon: ReactNode;
|
|
105
|
+
tooltipLabel: string;
|
|
103
106
|
items: EqualUnequalItems;
|
|
104
107
|
multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
|
|
105
108
|
};
|
|
106
|
-
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, items, multiSizePropTypeUtil, }: Props$1<TMultiPropType, TPropValue>): React.JSX.Element;
|
|
109
|
+
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$1<TMultiPropType, TPropValue>): React.JSX.Element;
|
|
107
110
|
|
|
108
|
-
declare const LinkedDimensionsControl: ControlComponent<({ label }: {
|
|
111
|
+
declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedValues, }: {
|
|
109
112
|
label: string;
|
|
113
|
+
isSiteRtl?: boolean;
|
|
114
|
+
extendedValues?: ExtendedValue[];
|
|
110
115
|
}) => React.JSX.Element>;
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
type FontFamilyControlProps = {
|
|
118
|
+
fontFamilies: Record<string, string[]>;
|
|
119
|
+
};
|
|
120
|
+
declare const FontFamilyControl: ControlComponent<({ fontFamilies }: FontFamilyControlProps) => React.JSX.Element>;
|
|
113
121
|
|
|
114
122
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
115
123
|
placeholder?: string;
|
|
@@ -211,4 +219,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
211
219
|
};
|
|
212
220
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
213
221
|
|
|
214
|
-
export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, type ControlComponent, ControlLabel, ControlReplacementProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, UrlControl, createControlReplacement, useBoundProp, useControlActions, useSyncExternalState };
|
|
222
|
+
export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, type ControlComponent, ControlLabel, ControlReplacementProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, UrlControl, createControlReplacement, useBoundProp, useControlActions, useSyncExternalState };
|
package/dist/index.d.ts
CHANGED
|
@@ -21,13 +21,15 @@ type Props$5 = {
|
|
|
21
21
|
};
|
|
22
22
|
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$5) => React.JSX.Element>;
|
|
23
23
|
|
|
24
|
+
type ExtendedValue = 'auto';
|
|
24
25
|
type Unit = 'px' | '%' | 'em' | 'rem' | 'vw' | 'vh';
|
|
25
26
|
type SizeControlProps = {
|
|
26
27
|
placeholder?: string;
|
|
27
28
|
startIcon?: React.ReactNode;
|
|
28
29
|
units?: Unit[];
|
|
30
|
+
extendedValues?: ExtendedValue[];
|
|
29
31
|
};
|
|
30
|
-
declare const SizeControl: ControlComponent<({ units, placeholder, startIcon }: SizeControlProps) => React.JSX.Element>;
|
|
32
|
+
declare const SizeControl: ControlComponent<({ units, extendedValues, placeholder, startIcon }: SizeControlProps) => React.JSX.Element>;
|
|
31
33
|
|
|
32
34
|
declare const StrokeControl: ControlComponent<() => React.JSX.Element>;
|
|
33
35
|
|
|
@@ -100,16 +102,22 @@ type EqualUnequalItems = [Item, Item, Item, Item];
|
|
|
100
102
|
type Props$1<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
|
|
101
103
|
label: string;
|
|
102
104
|
icon: ReactNode;
|
|
105
|
+
tooltipLabel: string;
|
|
103
106
|
items: EqualUnequalItems;
|
|
104
107
|
multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
|
|
105
108
|
};
|
|
106
|
-
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, items, multiSizePropTypeUtil, }: Props$1<TMultiPropType, TPropValue>): React.JSX.Element;
|
|
109
|
+
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$1<TMultiPropType, TPropValue>): React.JSX.Element;
|
|
107
110
|
|
|
108
|
-
declare const LinkedDimensionsControl: ControlComponent<({ label }: {
|
|
111
|
+
declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedValues, }: {
|
|
109
112
|
label: string;
|
|
113
|
+
isSiteRtl?: boolean;
|
|
114
|
+
extendedValues?: ExtendedValue[];
|
|
110
115
|
}) => React.JSX.Element>;
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
type FontFamilyControlProps = {
|
|
118
|
+
fontFamilies: Record<string, string[]>;
|
|
119
|
+
};
|
|
120
|
+
declare const FontFamilyControl: ControlComponent<({ fontFamilies }: FontFamilyControlProps) => React.JSX.Element>;
|
|
113
121
|
|
|
114
122
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
115
123
|
placeholder?: string;
|
|
@@ -211,4 +219,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
211
219
|
};
|
|
212
220
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
213
221
|
|
|
214
|
-
export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, type ControlComponent, ControlLabel, ControlReplacementProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, UrlControl, createControlReplacement, useBoundProp, useControlActions, useSyncExternalState };
|
|
222
|
+
export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, type ControlComponent, ControlLabel, ControlReplacementProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, UrlControl, createControlReplacement, useBoundProp, useControlActions, useSyncExternalState };
|