@elementor/editor-controls 0.28.2 → 0.30.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @elementor/editor-controls
2
2
 
3
+ ## 0.30.0
4
+
5
+ ### Minor Changes
6
+
7
+ - be87c6e: null-check was missing, causing possible crash in the box-shadow control
8
+ - d05046f: Add replaceable location
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [d05046f]
13
+ - @elementor/locations@0.8.0
14
+
15
+ ## 0.29.0
16
+
17
+ ### Minor Changes
18
+
19
+ - ebcf7cc: Prevent redundant on-change trigger, remove tooltip from menu items, render label as content
20
+ - 71d9ffe: Added support for split items in toggle button group and an API for checking if an experiment is active
21
+ - 810db8d: Removed characters added by mistake
22
+ - b150c2b: Wrap font family with Control Action
23
+
3
24
  ## 0.28.2
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { ReactNode, ComponentType, PropsWithChildren } from 'react';
3
3
  import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
4
4
  import { UnstableColorFieldProps, ToggleButtonProps, StackProps } from '@elementor/ui';
5
+ import * as _elementor_locations from '@elementor/locations';
5
6
 
6
7
  type ImageControlProps = {
7
8
  sizes: {
@@ -66,6 +67,7 @@ type Props$3<TValue> = {
66
67
  justify?: StackProps['justifyContent'];
67
68
  size?: ToggleButtonProps['size'];
68
69
  items: ToggleButtonGroupItem<TValue | null>[];
70
+ maxItems?: number;
69
71
  fullWidth?: boolean;
70
72
  } & ({
71
73
  exclusive?: false;
@@ -76,7 +78,7 @@ type Props$3<TValue> = {
76
78
  value: ExclusiveValue<TValue>;
77
79
  onChange: (value: ExclusiveValue<TValue>) => void;
78
80
  });
79
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
81
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
80
82
 
81
83
  type ToggleControlProps<T extends PropValue> = {
82
84
  options: Array<ToggleButtonGroupItem<T> & {
@@ -85,8 +87,9 @@ type ToggleControlProps<T extends PropValue> = {
85
87
  fullWidth?: boolean;
86
88
  size?: ToggleButtonProps['size'];
87
89
  exclusive?: boolean;
90
+ maxItems?: number;
88
91
  };
89
- declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, }: ToggleControlProps<StringPropValue["value"]>) => React.JSX.Element>;
92
+ declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React.JSX.Element>;
90
93
 
91
94
  declare const NumberControl: ControlComponent<({ placeholder, max, min, step, shouldForceInt, }: {
92
95
  placeholder?: string;
@@ -244,6 +247,13 @@ declare const ControlAdornmentsProvider: ({ children, items }: ControlAdornments
244
247
 
245
248
  declare function ControlAdornments(): React.JSX.Element | null;
246
249
 
250
+ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.ReplaceableInjectArgs<{
251
+ value: PropValue;
252
+ }>) => void;
253
+ declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
254
+ value: PropValue;
255
+ }>) => void;
256
+
247
257
  type UseInternalStateOptions<TValue> = {
248
258
  external: TValue | null;
249
259
  setExternal: (value: TValue | null) => void;
@@ -252,4 +262,4 @@ type UseInternalStateOptions<TValue> = {
252
262
  };
253
263
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
254
264
 
255
- export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacementsRegistry, useBoundProp, useControlActions, useSyncExternalState };
265
+ export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacementsRegistry, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, useBoundProp, useControlActions, useSyncExternalState };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { ReactNode, ComponentType, PropsWithChildren } from 'react';
3
3
  import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
4
4
  import { UnstableColorFieldProps, ToggleButtonProps, StackProps } from '@elementor/ui';
5
+ import * as _elementor_locations from '@elementor/locations';
5
6
 
6
7
  type ImageControlProps = {
7
8
  sizes: {
@@ -66,6 +67,7 @@ type Props$3<TValue> = {
66
67
  justify?: StackProps['justifyContent'];
67
68
  size?: ToggleButtonProps['size'];
68
69
  items: ToggleButtonGroupItem<TValue | null>[];
70
+ maxItems?: number;
69
71
  fullWidth?: boolean;
70
72
  } & ({
71
73
  exclusive?: false;
@@ -76,7 +78,7 @@ type Props$3<TValue> = {
76
78
  value: ExclusiveValue<TValue>;
77
79
  onChange: (value: ExclusiveValue<TValue>) => void;
78
80
  });
79
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
81
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
80
82
 
81
83
  type ToggleControlProps<T extends PropValue> = {
82
84
  options: Array<ToggleButtonGroupItem<T> & {
@@ -85,8 +87,9 @@ type ToggleControlProps<T extends PropValue> = {
85
87
  fullWidth?: boolean;
86
88
  size?: ToggleButtonProps['size'];
87
89
  exclusive?: boolean;
90
+ maxItems?: number;
88
91
  };
89
- declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, }: ToggleControlProps<StringPropValue["value"]>) => React.JSX.Element>;
92
+ declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React.JSX.Element>;
90
93
 
91
94
  declare const NumberControl: ControlComponent<({ placeholder, max, min, step, shouldForceInt, }: {
92
95
  placeholder?: string;
@@ -244,6 +247,13 @@ declare const ControlAdornmentsProvider: ({ children, items }: ControlAdornments
244
247
 
245
248
  declare function ControlAdornments(): React.JSX.Element | null;
246
249
 
250
+ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.ReplaceableInjectArgs<{
251
+ value: PropValue;
252
+ }>) => void;
253
+ declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
254
+ value: PropValue;
255
+ }>) => void;
256
+
247
257
  type UseInternalStateOptions<TValue> = {
248
258
  external: TValue | null;
249
259
  setExternal: (value: TValue | null) => void;
@@ -252,4 +262,4 @@ type UseInternalStateOptions<TValue> = {
252
262
  };
253
263
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
254
264
 
255
- export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacementsRegistry, useBoundProp, useControlActions, useSyncExternalState };
265
+ export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacementsRegistry, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, useBoundProp, useControlActions, useSyncExternalState };