@elementor/editor-controls 0.10.0 → 0.12.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/index.d.mts +3 -25
  3. package/dist/index.d.ts +3 -25
  4. package/dist/index.js +427 -403
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +400 -369
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/autocomplete.tsx +181 -0
  10. package/src/components/popover-content.tsx +15 -0
  11. package/src/components/popover-grid-container.tsx +20 -0
  12. package/src/components/repeater.tsx +6 -4
  13. package/src/components/section-content.tsx +16 -0
  14. package/src/controls/background-control/background-control.tsx +4 -3
  15. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx +4 -3
  16. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +15 -14
  17. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx +3 -2
  18. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +5 -4
  19. package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +4 -3
  20. package/src/controls/box-shadow-repeater-control.tsx +12 -10
  21. package/src/controls/equal-unequal-sizes-control.tsx +9 -7
  22. package/src/controls/font-family-control.tsx +4 -2
  23. package/src/controls/gap-control.tsx +1 -1
  24. package/src/controls/image-control.tsx +2 -2
  25. package/src/controls/image-media-control.tsx +2 -2
  26. package/src/controls/link-control.tsx +65 -49
  27. package/src/controls/linked-dimensions-control.tsx +1 -1
  28. package/src/controls/select-control.tsx +8 -1
  29. package/src/controls/size-control.tsx +3 -1
  30. package/src/controls/stroke-control.tsx +6 -5
  31. package/src/index.ts +0 -1
  32. package/src/controls/autocomplete-control.tsx +0 -195
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @elementor/editor-controls
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 927578f: The creation of a popover grid container component.
8
+ - 0acbc6a: Fixed input startIcon color
9
+ - 10651bb: The creation of a popover content component.
10
+ - 1db202a: The creation of a styled panel stack component.
11
+
12
+ ## 0.11.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 35092ea: Fixed strings to sentence case
17
+ - 2da724c: Fix input width changing, according to selection
18
+ - cf83fe4: Updated link control to save null instead of empty string, to allow it to pass validation, and re-add support of dynamic tags
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [728ffb5]
23
+ - @elementor/editor-props@0.9.2
24
+
3
25
  ## 0.10.0
4
26
 
5
27
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -1,30 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode, ComponentType, PropsWithChildren } from 'react';
3
- import { PropTypeUtil, StringPropValue, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
3
+ import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
4
4
  import { UnstableColorFieldProps, ToggleButtonProps, StackProps } from '@elementor/ui';
5
5
 
6
- type FlatOption = {
7
- id: string;
8
- label: string;
9
- groupLabel?: never;
10
- };
11
- type CategorizedOption = {
12
- id: string;
13
- label: string;
14
- groupLabel: string;
15
- };
16
- type Props$6<TOptionKey extends string, TCustomKey extends string = ''> = {
17
- options: FlatOption[] | CategorizedOption[];
18
- optionRestrictedPropTypeUtil: PropTypeUtil<TOptionKey, number | null>;
19
- onOptionChangeCallback?: (newValue: number | null) => void;
20
- onTextChangeCallback?: (newValue: string | null) => void;
21
- allowCustomValues?: boolean;
22
- placeholder?: string;
23
- minInputLength?: number;
24
- customValue?: TCustomKey;
25
- };
26
- declare const AutocompleteControl: ControlComponent<(<TOptionKey extends string, TCustomKey extends string>(props: Props$6<TOptionKey, TCustomKey>) => React.JSX.Element)>;
27
-
28
6
  type ImageControlProps = {
29
7
  sizes: {
30
8
  label: string;
@@ -139,7 +117,7 @@ declare const UrlControl: ControlComponent<({ placeholder }: {
139
117
 
140
118
  type Props = {
141
119
  queryOptions: {
142
- requestParams: object;
120
+ requestParams: Record<string, unknown>;
143
121
  endpoint: string;
144
122
  };
145
123
  allowCustomValues?: boolean;
@@ -233,4 +211,4 @@ type UseInternalStateOptions<TValue> = {
233
211
  };
234
212
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
235
213
 
236
- export { AutocompleteControl, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -1,30 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode, ComponentType, PropsWithChildren } from 'react';
3
- import { PropTypeUtil, StringPropValue, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
3
+ import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
4
4
  import { UnstableColorFieldProps, ToggleButtonProps, StackProps } from '@elementor/ui';
5
5
 
6
- type FlatOption = {
7
- id: string;
8
- label: string;
9
- groupLabel?: never;
10
- };
11
- type CategorizedOption = {
12
- id: string;
13
- label: string;
14
- groupLabel: string;
15
- };
16
- type Props$6<TOptionKey extends string, TCustomKey extends string = ''> = {
17
- options: FlatOption[] | CategorizedOption[];
18
- optionRestrictedPropTypeUtil: PropTypeUtil<TOptionKey, number | null>;
19
- onOptionChangeCallback?: (newValue: number | null) => void;
20
- onTextChangeCallback?: (newValue: string | null) => void;
21
- allowCustomValues?: boolean;
22
- placeholder?: string;
23
- minInputLength?: number;
24
- customValue?: TCustomKey;
25
- };
26
- declare const AutocompleteControl: ControlComponent<(<TOptionKey extends string, TCustomKey extends string>(props: Props$6<TOptionKey, TCustomKey>) => React.JSX.Element)>;
27
-
28
6
  type ImageControlProps = {
29
7
  sizes: {
30
8
  label: string;
@@ -139,7 +117,7 @@ declare const UrlControl: ControlComponent<({ placeholder }: {
139
117
 
140
118
  type Props = {
141
119
  queryOptions: {
142
- requestParams: object;
120
+ requestParams: Record<string, unknown>;
143
121
  endpoint: string;
144
122
  };
145
123
  allowCustomValues?: boolean;
@@ -233,4 +211,4 @@ type UseInternalStateOptions<TValue> = {
233
211
  };
234
212
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
235
213
 
236
- export { AutocompleteControl, 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 };
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 };