@elementor/editor-controls 3.33.0-120 → 3.33.0-121
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/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/components/item-selector.tsx +4 -1
- package/src/controls/color-control.tsx +3 -1
- package/src/controls/font-family-control/font-family-control.tsx +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -90,8 +90,9 @@ declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) =
|
|
|
90
90
|
type Props$4 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
|
|
91
91
|
propTypeUtil?: PropTypeUtil<string, string>;
|
|
92
92
|
anchorEl?: HTMLElement | null;
|
|
93
|
+
id?: string;
|
|
93
94
|
};
|
|
94
|
-
declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, ...props }: Props$4) => React$1.JSX.Element>;
|
|
95
|
+
declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$4) => React$1.JSX.Element>;
|
|
95
96
|
|
|
96
97
|
type RenderContentProps = {
|
|
97
98
|
size: ToggleButtonProps['size'];
|
|
@@ -199,8 +200,9 @@ type ItemSelectorProps = {
|
|
|
199
200
|
fontSize: string;
|
|
200
201
|
}>;
|
|
201
202
|
disabledItems?: string[];
|
|
203
|
+
id?: string;
|
|
202
204
|
};
|
|
203
|
-
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, disabledItems, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
205
|
+
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, disabledItems, id, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
204
206
|
|
|
205
207
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
206
208
|
placeholder?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -90,8 +90,9 @@ declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) =
|
|
|
90
90
|
type Props$4 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
|
|
91
91
|
propTypeUtil?: PropTypeUtil<string, string>;
|
|
92
92
|
anchorEl?: HTMLElement | null;
|
|
93
|
+
id?: string;
|
|
93
94
|
};
|
|
94
|
-
declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, ...props }: Props$4) => React$1.JSX.Element>;
|
|
95
|
+
declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$4) => React$1.JSX.Element>;
|
|
95
96
|
|
|
96
97
|
type RenderContentProps = {
|
|
97
98
|
size: ToggleButtonProps['size'];
|
|
@@ -199,8 +200,9 @@ type ItemSelectorProps = {
|
|
|
199
200
|
fontSize: string;
|
|
200
201
|
}>;
|
|
201
202
|
disabledItems?: string[];
|
|
203
|
+
id?: string;
|
|
202
204
|
};
|
|
203
|
-
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, disabledItems, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
205
|
+
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, disabledItems, id, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
204
206
|
|
|
205
207
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
206
208
|
placeholder?: string;
|
package/dist/index.js
CHANGED
|
@@ -1184,7 +1184,7 @@ var React20 = __toESM(require("react"));
|
|
|
1184
1184
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
1185
1185
|
var import_ui15 = require("@elementor/ui");
|
|
1186
1186
|
var ColorControl = createControl(
|
|
1187
|
-
({ propTypeUtil = import_editor_props8.colorPropTypeUtil, anchorEl, slotProps = {}, ...props }) => {
|
|
1187
|
+
({ propTypeUtil = import_editor_props8.colorPropTypeUtil, anchorEl, slotProps = {}, id, ...props }) => {
|
|
1188
1188
|
const { value, setValue, placeholder: boundPropPlaceholder, disabled } = useBoundProp(propTypeUtil);
|
|
1189
1189
|
const placeholder = props.placeholder ?? boundPropPlaceholder;
|
|
1190
1190
|
const handleChange = (selectedColor) => {
|
|
@@ -1193,6 +1193,7 @@ var ColorControl = createControl(
|
|
|
1193
1193
|
return /* @__PURE__ */ React20.createElement(ControlActions, null, /* @__PURE__ */ React20.createElement(
|
|
1194
1194
|
import_ui15.UnstableColorField,
|
|
1195
1195
|
{
|
|
1196
|
+
id,
|
|
1196
1197
|
size: "tiny",
|
|
1197
1198
|
fullWidth: true,
|
|
1198
1199
|
value: value ?? "",
|
|
@@ -2785,7 +2786,8 @@ var ItemSelector = ({
|
|
|
2785
2786
|
onDebounce = () => {
|
|
2786
2787
|
},
|
|
2787
2788
|
icon,
|
|
2788
|
-
disabledItems
|
|
2789
|
+
disabledItems,
|
|
2790
|
+
id = "item-selector"
|
|
2789
2791
|
}) => {
|
|
2790
2792
|
const [searchValue, setSearchValue] = (0, import_react25.useState)("");
|
|
2791
2793
|
const filteredItemsList = useFilteredItemsList(itemsList, searchValue, disabledItems);
|
|
@@ -2797,12 +2799,13 @@ var ItemSelector = ({
|
|
|
2797
2799
|
setSearchValue("");
|
|
2798
2800
|
onClose();
|
|
2799
2801
|
};
|
|
2800
|
-
return /* @__PURE__ */ React54.createElement(import_editor_ui4.PopoverBody, { width: sectionWidth }, /* @__PURE__ */ React54.createElement(import_editor_ui4.PopoverHeader, { title, onClose: handleClose, icon: /* @__PURE__ */ React54.createElement(IconComponent, { fontSize: "tiny" }) }), /* @__PURE__ */ React54.createElement(
|
|
2802
|
+
return /* @__PURE__ */ React54.createElement(import_editor_ui4.PopoverBody, { width: sectionWidth, id }, /* @__PURE__ */ React54.createElement(import_editor_ui4.PopoverHeader, { title, onClose: handleClose, icon: /* @__PURE__ */ React54.createElement(IconComponent, { fontSize: "tiny" }) }), /* @__PURE__ */ React54.createElement(
|
|
2801
2803
|
import_editor_ui4.PopoverSearch,
|
|
2802
2804
|
{
|
|
2803
2805
|
value: searchValue,
|
|
2804
2806
|
onSearch: handleSearch,
|
|
2805
|
-
placeholder: (0, import_i18n19.__)("Search", "elementor")
|
|
2807
|
+
placeholder: (0, import_i18n19.__)("Search", "elementor"),
|
|
2808
|
+
id: id + "-search"
|
|
2806
2809
|
}
|
|
2807
2810
|
), /* @__PURE__ */ React54.createElement(import_ui41.Divider, null), filteredItemsList.length > 0 ? /* @__PURE__ */ React54.createElement(
|
|
2808
2811
|
ItemList,
|
|
@@ -2923,6 +2926,7 @@ var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
|
2923
2926
|
return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(ControlActions, null, /* @__PURE__ */ React55.createElement(
|
|
2924
2927
|
import_ui42.UnstableTag,
|
|
2925
2928
|
{
|
|
2929
|
+
id: "font-family-control",
|
|
2926
2930
|
variant: "outlined",
|
|
2927
2931
|
label: fontFamily || placeholder,
|
|
2928
2932
|
endIcon: /* @__PURE__ */ React55.createElement(import_icons11.ChevronDownIcon, { fontSize: "tiny" }),
|
|
@@ -2949,6 +2953,7 @@ var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
|
2949
2953
|
/* @__PURE__ */ React55.createElement(
|
|
2950
2954
|
ItemSelector,
|
|
2951
2955
|
{
|
|
2956
|
+
id: "font-family-selector",
|
|
2952
2957
|
itemsList: mapFontSubs,
|
|
2953
2958
|
selectedItem: fontFamily,
|
|
2954
2959
|
onItemChange: setFontFamily,
|