@elementor/editor-controls 3.35.0-405 → 3.35.0-407
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 +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/image-control.tsx +16 -28
package/dist/index.d.mts
CHANGED
|
@@ -11,9 +11,8 @@ type ImageControlProps = {
|
|
|
11
11
|
label: string;
|
|
12
12
|
value: string;
|
|
13
13
|
}[];
|
|
14
|
-
showMode?: 'all' | 'media' | 'sizes';
|
|
15
14
|
};
|
|
16
|
-
declare const ImageControl: ControlComponent$1<({ sizes
|
|
15
|
+
declare const ImageControl: ControlComponent$1<({ sizes }: ImageControlProps) => React$1.JSX.Element>;
|
|
17
16
|
|
|
18
17
|
declare const TextControl: ControlComponent$1<({ placeholder, error, inputValue, inputDisabled, helperText, sx, ariaLabel, }: {
|
|
19
18
|
placeholder?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,9 +11,8 @@ type ImageControlProps = {
|
|
|
11
11
|
label: string;
|
|
12
12
|
value: string;
|
|
13
13
|
}[];
|
|
14
|
-
showMode?: 'all' | 'media' | 'sizes';
|
|
15
14
|
};
|
|
16
|
-
declare const ImageControl: ControlComponent$1<({ sizes
|
|
15
|
+
declare const ImageControl: ControlComponent$1<({ sizes }: ImageControlProps) => React$1.JSX.Element>;
|
|
17
16
|
|
|
18
17
|
declare const TextControl: ControlComponent$1<({ placeholder, error, inputValue, inputDisabled, helperText, sx, ariaLabel, }: {
|
|
19
18
|
placeholder?: string;
|
package/dist/index.js
CHANGED
|
@@ -543,21 +543,9 @@ var SelectControl = createControl(
|
|
|
543
543
|
);
|
|
544
544
|
|
|
545
545
|
// src/controls/image-control.tsx
|
|
546
|
-
var ImageControl = createControl(({ sizes
|
|
546
|
+
var ImageControl = createControl(({ sizes }) => {
|
|
547
547
|
const propContext = useBoundProp(import_editor_props3.imagePropTypeUtil);
|
|
548
|
-
|
|
549
|
-
switch (showMode) {
|
|
550
|
-
case "media":
|
|
551
|
-
componentToRender = /* @__PURE__ */ React11.createElement(ImageSrcControl, null);
|
|
552
|
-
break;
|
|
553
|
-
case "sizes":
|
|
554
|
-
componentToRender = /* @__PURE__ */ React11.createElement(ImageSizeControl, { sizes });
|
|
555
|
-
break;
|
|
556
|
-
case "all":
|
|
557
|
-
default:
|
|
558
|
-
componentToRender = /* @__PURE__ */ React11.createElement(import_ui6.Stack, { gap: 1.5 }, /* @__PURE__ */ React11.createElement(ControlFormLabel, null, (0, import_i18n2.__)("Image", "elementor")), /* @__PURE__ */ React11.createElement(ImageSrcControl, null), /* @__PURE__ */ React11.createElement(import_ui6.Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React11.createElement(import_ui6.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React11.createElement(ControlFormLabel, null, (0, import_i18n2.__)("Resolution", "elementor"))), /* @__PURE__ */ React11.createElement(import_ui6.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React11.createElement(ImageSizeControl, { sizes }))));
|
|
559
|
-
}
|
|
560
|
-
return /* @__PURE__ */ React11.createElement(PropProvider, { ...propContext }, componentToRender);
|
|
548
|
+
return /* @__PURE__ */ React11.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React11.createElement(import_ui6.Stack, { gap: 1.5 }, /* @__PURE__ */ React11.createElement(ControlFormLabel, null, (0, import_i18n2.__)("Image", "elementor")), /* @__PURE__ */ React11.createElement(ImageSrcControl, null), /* @__PURE__ */ React11.createElement(import_ui6.Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React11.createElement(import_ui6.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React11.createElement(ControlFormLabel, null, (0, import_i18n2.__)("Resolution", "elementor"))), /* @__PURE__ */ React11.createElement(import_ui6.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React11.createElement(ImageSizeControl, { sizes })))));
|
|
561
549
|
});
|
|
562
550
|
var ImageSrcControl = () => {
|
|
563
551
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|