@elementor/editor-controls 4.4.0-1146 → 4.4.0-1148

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 CHANGED
@@ -359,10 +359,9 @@ declare const AspectRatioControl: ControlComponent$1<({ label }: {
359
359
  }) => React$1.JSX.Element>;
360
360
 
361
361
  type SvgMediaControlProps = {
362
- showIconLibrary?: boolean;
363
362
  label?: string;
364
363
  };
365
- declare const SvgMediaControl: ControlComponent$1<({ showIconLibrary, label }: SvgMediaControlProps) => React$1.JSX.Element>;
364
+ declare const SvgMediaControl: ControlComponent$1<({ label }: SvgMediaControlProps) => React$1.JSX.Element>;
366
365
 
367
366
  type VideoMediaControlProps = {
368
367
  label?: string;
package/dist/index.d.ts CHANGED
@@ -359,10 +359,9 @@ declare const AspectRatioControl: ControlComponent$1<({ label }: {
359
359
  }) => React$1.JSX.Element>;
360
360
 
361
361
  type SvgMediaControlProps = {
362
- showIconLibrary?: boolean;
363
362
  label?: string;
364
363
  };
365
- declare const SvgMediaControl: ControlComponent$1<({ showIconLibrary, label }: SvgMediaControlProps) => React$1.JSX.Element>;
364
+ declare const SvgMediaControl: ControlComponent$1<({ label }: SvgMediaControlProps) => React$1.JSX.Element>;
366
365
 
367
366
  type VideoMediaControlProps = {
368
367
  label?: string;
package/dist/index.js CHANGED
@@ -7203,7 +7203,6 @@ var ICON_LIBRARY_PADDING = 0.625;
7203
7203
  var SvgMediaOverlay = ({
7204
7204
  label,
7205
7205
  isAdmin,
7206
- showIconLibrary,
7207
7206
  buttonGroupRef,
7208
7207
  onSelectSvg,
7209
7208
  onUpload,
@@ -7227,7 +7226,7 @@ var SvgMediaOverlay = ({
7227
7226
  /* @__PURE__ */ React91.createElement(import_ui74.Box, { component: "span", sx: { display: "flex", width: "100%" } }, /* @__PURE__ */ React91.createElement(UploadControl, { isAdmin, onUpload }))
7228
7227
  )
7229
7228
  }
7230
- ), showIconLibrary ? /* @__PURE__ */ React91.createElement(
7229
+ ), /* @__PURE__ */ React91.createElement(
7231
7230
  import_ui74.Button,
7232
7231
  {
7233
7232
  size: "tiny",
@@ -7243,7 +7242,7 @@ var SvgMediaOverlay = ({
7243
7242
  }
7244
7243
  },
7245
7244
  /* @__PURE__ */ React91.createElement(import_ui74.Typography, null, (0, import_i18n39.__)("Icon library", "elementor"))
7246
- ) : null);
7245
+ ));
7247
7246
  var UploadControl = ({ isAdmin, onUpload }) => {
7248
7247
  if (isAdmin) {
7249
7248
  return /* @__PURE__ */ React91.createElement(MediaUploadButton, { onClick: onUpload });
@@ -7375,7 +7374,7 @@ var StyledCardMediaContainer = (0, import_ui76.styled)(import_ui76.Stack)`
7375
7374
  `;
7376
7375
  var MODE_BROWSE = { mode: "browse" };
7377
7376
  var MODE_UPLOAD = { mode: "upload" };
7378
- var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7377
+ var SvgMediaControl = createControl(({ label }) => {
7379
7378
  const groupLabel = label ?? (0, import_i18n41.__)("SVG", "elementor");
7380
7379
  const { value: svgValue, setValue: setSvgValue, placeholder: svgPlaceholder } = useBoundProp(import_editor_props35.svgSrcPropTypeUtil);
7381
7380
  const { value: iconValue, setValue: setIconValue, placeholder: iconPlaceholder } = useBoundProp(import_editor_props35.iconPropTypeUtil);
@@ -7392,8 +7391,8 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7392
7391
  const buttonGroupRef = (0, import_react59.useRef)(null);
7393
7392
  const [iconLibraryAnchor, setIconLibraryAnchor] = (0, import_react59.useState)(null);
7394
7393
  const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
7395
- const selectedIconClass = showIconLibrary && typeof previewIconValue?.value?.value === "string" ? previewIconValue.value.value : null;
7396
- const selectedIconLibrary = showIconLibrary && typeof previewIconValue?.library?.value === "string" ? previewIconValue.library.value : null;
7394
+ const selectedIconClass = typeof previewIconValue?.value?.value === "string" ? previewIconValue.value.value : null;
7395
+ const selectedIconLibrary = typeof previewIconValue?.library?.value === "string" ? previewIconValue.library.value : null;
7397
7396
  const { open } = (0, import_wp_media2.useWpMediaFrame)({
7398
7397
  mediaTypes: ["svg"],
7399
7398
  multiple: false,
@@ -7458,7 +7457,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7458
7457
  };
7459
7458
  }, [iconLibraryPopoverState.isOpen]);
7460
7459
  const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
7461
- return /* @__PURE__ */ React93.createElement(import_ui76.Stack, { gap: 1, "aria-label": (0, import_i18n41.__)("SVG control", "elementor") }, /* @__PURE__ */ React93.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), showIconLibrary && iconLibraryAnchor ? /* @__PURE__ */ React93.createElement(
7460
+ return /* @__PURE__ */ React93.createElement(import_ui76.Stack, { gap: 1, "aria-label": (0, import_i18n41.__)("SVG control", "elementor") }, /* @__PURE__ */ React93.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), iconLibraryAnchor ? /* @__PURE__ */ React93.createElement(
7462
7461
  import_ui76.Popover,
7463
7462
  {
7464
7463
  disableScrollLock: true,
@@ -7518,7 +7517,6 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7518
7517
  {
7519
7518
  label: groupLabel,
7520
7519
  isAdmin,
7521
- showIconLibrary,
7522
7520
  buttonGroupRef,
7523
7521
  onSelectSvg: handleSelectSvg,
7524
7522
  onUpload: handleUpload,