@elementor/editor-controls 4.4.0-1146 → 4.4.0-1147
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 +6 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/svg-media-control.tsx +4 -7
- package/src/controls/svg-media-overlay.tsx +15 -19
package/dist/index.mjs
CHANGED
|
@@ -7166,7 +7166,6 @@ var ICON_LIBRARY_PADDING = 0.625;
|
|
|
7166
7166
|
var SvgMediaOverlay = ({
|
|
7167
7167
|
label,
|
|
7168
7168
|
isAdmin,
|
|
7169
|
-
showIconLibrary,
|
|
7170
7169
|
buttonGroupRef,
|
|
7171
7170
|
onSelectSvg,
|
|
7172
7171
|
onUpload,
|
|
@@ -7190,7 +7189,7 @@ var SvgMediaOverlay = ({
|
|
|
7190
7189
|
/* @__PURE__ */ React91.createElement(Box22, { component: "span", sx: { display: "flex", width: "100%" } }, /* @__PURE__ */ React91.createElement(UploadControl, { isAdmin, onUpload }))
|
|
7191
7190
|
)
|
|
7192
7191
|
}
|
|
7193
|
-
),
|
|
7192
|
+
), /* @__PURE__ */ React91.createElement(
|
|
7194
7193
|
Button6,
|
|
7195
7194
|
{
|
|
7196
7195
|
size: "tiny",
|
|
@@ -7206,7 +7205,7 @@ var SvgMediaOverlay = ({
|
|
|
7206
7205
|
}
|
|
7207
7206
|
},
|
|
7208
7207
|
/* @__PURE__ */ React91.createElement(Typography11, null, __39("Icon library", "elementor"))
|
|
7209
|
-
)
|
|
7208
|
+
));
|
|
7210
7209
|
var UploadControl = ({ isAdmin, onUpload }) => {
|
|
7211
7210
|
if (isAdmin) {
|
|
7212
7211
|
return /* @__PURE__ */ React91.createElement(MediaUploadButton, { onClick: onUpload });
|
|
@@ -7338,7 +7337,7 @@ var StyledCardMediaContainer = styled12(Stack18)`
|
|
|
7338
7337
|
`;
|
|
7339
7338
|
var MODE_BROWSE = { mode: "browse" };
|
|
7340
7339
|
var MODE_UPLOAD = { mode: "upload" };
|
|
7341
|
-
var SvgMediaControl = createControl(({
|
|
7340
|
+
var SvgMediaControl = createControl(({ label }) => {
|
|
7342
7341
|
const groupLabel = label ?? __41("SVG", "elementor");
|
|
7343
7342
|
const { value: svgValue, setValue: setSvgValue, placeholder: svgPlaceholder } = useBoundProp(svgSrcPropTypeUtil);
|
|
7344
7343
|
const { value: iconValue, setValue: setIconValue, placeholder: iconPlaceholder } = useBoundProp(iconPropTypeUtil);
|
|
@@ -7355,8 +7354,8 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
|
|
|
7355
7354
|
const buttonGroupRef = useRef21(null);
|
|
7356
7355
|
const [iconLibraryAnchor, setIconLibraryAnchor] = useState24(null);
|
|
7357
7356
|
const { isAdmin } = useCurrentUserCapabilities();
|
|
7358
|
-
const selectedIconClass =
|
|
7359
|
-
const selectedIconLibrary =
|
|
7357
|
+
const selectedIconClass = typeof previewIconValue?.value?.value === "string" ? previewIconValue.value.value : null;
|
|
7358
|
+
const selectedIconLibrary = typeof previewIconValue?.library?.value === "string" ? previewIconValue.library.value : null;
|
|
7360
7359
|
const { open } = useWpMediaFrame2({
|
|
7361
7360
|
mediaTypes: ["svg"],
|
|
7362
7361
|
multiple: false,
|
|
@@ -7421,7 +7420,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
|
|
|
7421
7420
|
};
|
|
7422
7421
|
}, [iconLibraryPopoverState.isOpen]);
|
|
7423
7422
|
const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
|
|
7424
|
-
return /* @__PURE__ */ React93.createElement(Stack18, { gap: 1, "aria-label": __41("SVG control", "elementor") }, /* @__PURE__ */ React93.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }),
|
|
7423
|
+
return /* @__PURE__ */ React93.createElement(Stack18, { gap: 1, "aria-label": __41("SVG control", "elementor") }, /* @__PURE__ */ React93.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), iconLibraryAnchor ? /* @__PURE__ */ React93.createElement(
|
|
7425
7424
|
Popover6,
|
|
7426
7425
|
{
|
|
7427
7426
|
disableScrollLock: true,
|
|
@@ -7481,7 +7480,6 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
|
|
|
7481
7480
|
{
|
|
7482
7481
|
label: groupLabel,
|
|
7483
7482
|
isAdmin,
|
|
7484
|
-
showIconLibrary,
|
|
7485
7483
|
buttonGroupRef,
|
|
7486
7484
|
onSelectSvg: handleSelectSvg,
|
|
7487
7485
|
onUpload: handleUpload,
|