@elementor/editor-controls 0.21.0 → 0.25.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 +56 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +215 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +193 -88
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/bound-prop-context/prop-context.tsx +3 -0
- package/src/bound-prop-context/prop-key-context.tsx +3 -1
- package/src/bound-prop-context/use-bound-prop.ts +41 -2
- package/src/components/repeater.tsx +9 -6
- package/src/components/sortable.tsx +6 -6
- package/src/components/text-field-inner-selection.tsx +21 -5
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +12 -1
- package/src/controls/font-family-control/font-family-control.tsx +4 -0
- package/src/controls/link-control.tsx +95 -23
- package/src/controls/number-control.tsx +7 -0
- package/src/controls/size-control.tsx +25 -15
- package/src/controls/toggle-control.tsx +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @elementor/editor-controls
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bba6b02: Ignore restricted characters in number inputs
|
|
8
|
+
- a27cc75: Style tab layout section show correct display value
|
|
9
|
+
- 6a882a0: autofocus on font family popup search input
|
|
10
|
+
- fd5251c: Add prop validation to required fields.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 03dad77: Rename "defaultValue" to "placeholder" on bound prop context
|
|
15
|
+
- Updated dependencies [5fa575c]
|
|
16
|
+
- Updated dependencies [044815b]
|
|
17
|
+
- Updated dependencies [fe0ab45]
|
|
18
|
+
- Updated dependencies [fd5251c]
|
|
19
|
+
- @elementor/editor-elements@0.8.1
|
|
20
|
+
- @elementor/editor-ui@0.7.1
|
|
21
|
+
- @elementor/editor-props@0.12.0
|
|
22
|
+
|
|
23
|
+
## 0.24.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- f644084: Added a "take me there" button in link-in-link restriction info-tip
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- e1bbdf1: Reset repeater item open on mount state.
|
|
32
|
+
- 3973dda: Disable "open in new page" switcher when link control has no value
|
|
33
|
+
- f045ee0: Fix repeaters color and box shadow color indication
|
|
34
|
+
- 830012f: Fix background image overlay label item
|
|
35
|
+
- babfa1c: Center font control select items
|
|
36
|
+
- Updated dependencies [f644084]
|
|
37
|
+
- @elementor/editor-elements@0.8.0
|
|
38
|
+
- @elementor/editor-ui@0.7.0
|
|
39
|
+
|
|
40
|
+
## 0.23.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- ad1f2ff: Update unit size text color to secondary
|
|
45
|
+
|
|
46
|
+
## 0.22.0
|
|
47
|
+
|
|
48
|
+
### Minor Changes
|
|
49
|
+
|
|
50
|
+
- 548209b: Add link restriction infotip
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [fdfc87a]
|
|
55
|
+
- Updated dependencies [548209b]
|
|
56
|
+
- @elementor/editor-ui@0.6.0
|
|
57
|
+
- @elementor/editor-elements@0.7.1
|
|
58
|
+
|
|
3
59
|
## 0.21.0
|
|
4
60
|
|
|
5
61
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -184,16 +184,18 @@ type PropContext<T extends PropValue, P extends PropType> = {
|
|
|
184
184
|
setValue: SetValue<T>;
|
|
185
185
|
value: T | null;
|
|
186
186
|
propType: P;
|
|
187
|
+
placeholder?: T;
|
|
187
188
|
};
|
|
188
189
|
declare const PropContext: React.Context<PropContext<PropValue, PropType> | null>;
|
|
189
190
|
type PropProviderProps<T extends PropValue, P extends PropType> = React.PropsWithChildren<PropContext<T, P>>;
|
|
190
|
-
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, }: PropProviderProps<T, P>) => React.JSX.Element;
|
|
191
|
+
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, }: PropProviderProps<T, P>) => React.JSX.Element;
|
|
191
192
|
|
|
192
193
|
type PropKeyContextValue<T, P> = {
|
|
193
194
|
bind: PropKey;
|
|
194
195
|
setValue: SetValue<T>;
|
|
195
196
|
value: T;
|
|
196
197
|
propType: P;
|
|
198
|
+
placeholder?: T;
|
|
197
199
|
path: PropKey[];
|
|
198
200
|
};
|
|
199
201
|
type PropKeyProviderProps = React.PropsWithChildren<{
|
|
@@ -206,7 +208,9 @@ type UseBoundProp<TValue extends PropValue> = {
|
|
|
206
208
|
setValue: SetValue<TValue | null>;
|
|
207
209
|
value: TValue;
|
|
208
210
|
propType: PropType;
|
|
211
|
+
placeholder?: TValue;
|
|
209
212
|
path: PropKey[];
|
|
213
|
+
restoreValue: () => void;
|
|
210
214
|
};
|
|
211
215
|
declare function useBoundProp<T extends PropValue = PropValue>(): PropKeyContextValue<T, PropType>;
|
|
212
216
|
declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
|
package/dist/index.d.ts
CHANGED
|
@@ -184,16 +184,18 @@ type PropContext<T extends PropValue, P extends PropType> = {
|
|
|
184
184
|
setValue: SetValue<T>;
|
|
185
185
|
value: T | null;
|
|
186
186
|
propType: P;
|
|
187
|
+
placeholder?: T;
|
|
187
188
|
};
|
|
188
189
|
declare const PropContext: React.Context<PropContext<PropValue, PropType> | null>;
|
|
189
190
|
type PropProviderProps<T extends PropValue, P extends PropType> = React.PropsWithChildren<PropContext<T, P>>;
|
|
190
|
-
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, }: PropProviderProps<T, P>) => React.JSX.Element;
|
|
191
|
+
declare const PropProvider: <T extends PropValue, P extends PropType>({ children, value, setValue, propType, placeholder, }: PropProviderProps<T, P>) => React.JSX.Element;
|
|
191
192
|
|
|
192
193
|
type PropKeyContextValue<T, P> = {
|
|
193
194
|
bind: PropKey;
|
|
194
195
|
setValue: SetValue<T>;
|
|
195
196
|
value: T;
|
|
196
197
|
propType: P;
|
|
198
|
+
placeholder?: T;
|
|
197
199
|
path: PropKey[];
|
|
198
200
|
};
|
|
199
201
|
type PropKeyProviderProps = React.PropsWithChildren<{
|
|
@@ -206,7 +208,9 @@ type UseBoundProp<TValue extends PropValue> = {
|
|
|
206
208
|
setValue: SetValue<TValue | null>;
|
|
207
209
|
value: TValue;
|
|
208
210
|
propType: PropType;
|
|
211
|
+
placeholder?: TValue;
|
|
209
212
|
path: PropKey[];
|
|
213
|
+
restoreValue: () => void;
|
|
210
214
|
};
|
|
211
215
|
declare function useBoundProp<T extends PropValue = PropValue>(): PropKeyContextValue<T, PropType>;
|
|
212
216
|
declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
|