@elementor/editor-controls 4.1.0-829 → 4.1.0-830

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.js CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  AspectRatioControl: () => AspectRatioControl,
34
+ AttachmentTypeControl: () => AttachmentTypeControl,
34
35
  AttributesControl: () => AttributesControl,
35
36
  BackgroundControl: () => BackgroundControl,
36
37
  BoxShadowRepeaterControl: () => BoxShadowRepeaterControl,
@@ -7926,18 +7927,30 @@ var EmailFormActionControl = createControl(({ toPlaceholder }) => {
7926
7927
  return /* @__PURE__ */ React111.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React111.createElement(import_ui95.Stack, { gap: 2 }, /* @__PURE__ */ React111.createElement(ControlLabel, null, (0, import_i18n54.__)("Email settings", "elementor")), /* @__PURE__ */ React111.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React111.createElement(SubjectField, null), /* @__PURE__ */ React111.createElement(MessageField, null), /* @__PURE__ */ React111.createElement(FromEmailField, null), /* @__PURE__ */ React111.createElement(AdvancedSettings, null)));
7927
7928
  });
7928
7929
 
7930
+ // src/controls/attachment-type-control.tsx
7931
+ var React112 = __toESM(require("react"));
7932
+ var import_editor_ui16 = require("@elementor/editor-ui");
7933
+ var import_ui96 = require("@elementor/ui");
7934
+ var import_i18n55 = require("@wordpress/i18n");
7935
+ var AttachmentTypeControl = createControl(({ label, options }) => {
7936
+ return /* @__PURE__ */ React112.createElement(import_ui96.Grid, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React112.createElement(import_ui96.Grid, { item: true }, /* @__PURE__ */ React112.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React112.createElement(import_ui96.Grid, { item: true }, /* @__PURE__ */ React112.createElement(SelectControl, { options })), /* @__PURE__ */ React112.createElement(import_ui96.Grid, { item: true }, /* @__PURE__ */ React112.createElement(import_editor_ui16.InfoAlert, null, (0, import_i18n55.__)(
7937
+ "Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
7938
+ "elementor"
7939
+ ))));
7940
+ });
7941
+
7929
7942
  // src/components/promotions/display-conditions-control.tsx
7930
- var React113 = __toESM(require("react"));
7943
+ var React114 = __toESM(require("react"));
7931
7944
  var import_react68 = require("react");
7932
7945
  var import_icons36 = require("@elementor/icons");
7933
- var import_ui97 = require("@elementor/ui");
7934
- var import_i18n55 = require("@wordpress/i18n");
7946
+ var import_ui98 = require("@elementor/ui");
7947
+ var import_i18n56 = require("@wordpress/i18n");
7935
7948
 
7936
7949
  // src/components/promotions/promotion-trigger.tsx
7937
- var React112 = __toESM(require("react"));
7950
+ var React113 = __toESM(require("react"));
7938
7951
  var import_react67 = require("react");
7939
- var import_editor_ui16 = require("@elementor/editor-ui");
7940
- var import_ui96 = require("@elementor/ui");
7952
+ var import_editor_ui17 = require("@elementor/editor-ui");
7953
+ var import_ui97 = require("@elementor/ui");
7941
7954
  function getV4Promotion(key) {
7942
7955
  return window.elementor?.config?.v4Promotions?.[key];
7943
7956
  }
@@ -7954,8 +7967,8 @@ var PromotionTrigger = (0, import_react67.forwardRef)(
7954
7967
  });
7955
7968
  }, [trackingData]);
7956
7969
  (0, import_react67.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
7957
- return /* @__PURE__ */ React112.createElement(React112.Fragment, null, promotion && /* @__PURE__ */ React112.createElement(
7958
- import_editor_ui16.PromotionInfotip,
7970
+ return /* @__PURE__ */ React113.createElement(React113.Fragment, null, promotion && /* @__PURE__ */ React113.createElement(
7971
+ import_editor_ui17.PromotionInfotip,
7959
7972
  {
7960
7973
  title: promotion.title,
7961
7974
  content: promotion.content,
@@ -7968,8 +7981,8 @@ var PromotionTrigger = (0, import_react67.forwardRef)(
7968
7981
  },
7969
7982
  onCtaClick: () => trackUpgradePromotionClick(trackingData)
7970
7983
  },
7971
- /* @__PURE__ */ React112.createElement(
7972
- import_ui96.Box,
7984
+ /* @__PURE__ */ React113.createElement(
7985
+ import_ui97.Box,
7973
7986
  {
7974
7987
  onClick: (e) => {
7975
7988
  e.stopPropagation();
@@ -7977,19 +7990,19 @@ var PromotionTrigger = (0, import_react67.forwardRef)(
7977
7990
  },
7978
7991
  sx: { cursor: "pointer", display: "inline-flex" }
7979
7992
  },
7980
- children ?? /* @__PURE__ */ React112.createElement(import_editor_ui16.PromotionChip, null)
7993
+ children ?? /* @__PURE__ */ React113.createElement(import_editor_ui17.PromotionChip, null)
7981
7994
  )
7982
7995
  ));
7983
7996
  }
7984
7997
  );
7985
7998
 
7986
7999
  // src/components/promotions/display-conditions-control.tsx
7987
- var ARIA_LABEL = (0, import_i18n55.__)("Display Conditions", "elementor");
8000
+ var ARIA_LABEL = (0, import_i18n56.__)("Display Conditions", "elementor");
7988
8001
  var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
7989
8002
  var DisplayConditionsControl = createControl(() => {
7990
8003
  const triggerRef = (0, import_react68.useRef)(null);
7991
- return /* @__PURE__ */ React113.createElement(
7992
- import_ui97.Stack,
8004
+ return /* @__PURE__ */ React114.createElement(
8005
+ import_ui98.Stack,
7993
8006
  {
7994
8007
  direction: "row",
7995
8008
  spacing: 2,
@@ -7998,9 +8011,9 @@ var DisplayConditionsControl = createControl(() => {
7998
8011
  alignItems: "center"
7999
8012
  }
8000
8013
  },
8001
- /* @__PURE__ */ React113.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
8002
- /* @__PURE__ */ React113.createElement(import_ui97.Tooltip, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React113.createElement(
8003
- import_ui97.IconButton,
8014
+ /* @__PURE__ */ React114.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
8015
+ /* @__PURE__ */ React114.createElement(import_ui98.Tooltip, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React114.createElement(
8016
+ import_ui98.IconButton,
8004
8017
  {
8005
8018
  size: "tiny",
8006
8019
  "aria-label": ARIA_LABEL,
@@ -8012,23 +8025,23 @@ var DisplayConditionsControl = createControl(() => {
8012
8025
  borderRadius: 1
8013
8026
  }
8014
8027
  },
8015
- /* @__PURE__ */ React113.createElement(import_icons36.SitemapIcon, { fontSize: "tiny", color: "disabled" })
8028
+ /* @__PURE__ */ React114.createElement(import_icons36.SitemapIcon, { fontSize: "tiny", color: "disabled" })
8016
8029
  ))
8017
8030
  );
8018
8031
  });
8019
8032
 
8020
8033
  // src/components/promotions/attributes-control.tsx
8021
- var React114 = __toESM(require("react"));
8034
+ var React115 = __toESM(require("react"));
8022
8035
  var import_react69 = require("react");
8023
8036
  var import_icons37 = require("@elementor/icons");
8024
- var import_ui98 = require("@elementor/ui");
8025
- var import_i18n56 = require("@wordpress/i18n");
8026
- var ARIA_LABEL2 = (0, import_i18n56.__)("Attributes", "elementor");
8037
+ var import_ui99 = require("@elementor/ui");
8038
+ var import_i18n57 = require("@wordpress/i18n");
8039
+ var ARIA_LABEL2 = (0, import_i18n57.__)("Attributes", "elementor");
8027
8040
  var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
8028
8041
  var AttributesControl = createControl(() => {
8029
8042
  const triggerRef = (0, import_react69.useRef)(null);
8030
- return /* @__PURE__ */ React114.createElement(
8031
- import_ui98.Stack,
8043
+ return /* @__PURE__ */ React115.createElement(
8044
+ import_ui99.Stack,
8032
8045
  {
8033
8046
  direction: "row",
8034
8047
  spacing: 2,
@@ -8037,8 +8050,8 @@ var AttributesControl = createControl(() => {
8037
8050
  alignItems: "center"
8038
8051
  }
8039
8052
  },
8040
- /* @__PURE__ */ React114.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
8041
- /* @__PURE__ */ React114.createElement(import_ui98.Tooltip, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React114.createElement(
8053
+ /* @__PURE__ */ React115.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
8054
+ /* @__PURE__ */ React115.createElement(import_ui99.Tooltip, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React115.createElement(
8042
8055
  import_icons37.PlusIcon,
8043
8056
  {
8044
8057
  "aria-label": ARIA_LABEL2,
@@ -8052,21 +8065,21 @@ var AttributesControl = createControl(() => {
8052
8065
  });
8053
8066
 
8054
8067
  // src/components/icon-buttons/clear-icon-button.tsx
8055
- var React115 = __toESM(require("react"));
8068
+ var React116 = __toESM(require("react"));
8056
8069
  var import_icons38 = require("@elementor/icons");
8057
- var import_ui99 = require("@elementor/ui");
8058
- var CustomIconButton = (0, import_ui99.styled)(import_ui99.IconButton)(({ theme }) => ({
8070
+ var import_ui100 = require("@elementor/ui");
8071
+ var CustomIconButton = (0, import_ui100.styled)(import_ui100.IconButton)(({ theme }) => ({
8059
8072
  width: theme.spacing(2.5),
8060
8073
  height: theme.spacing(2.5)
8061
8074
  }));
8062
- var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React115.createElement(import_ui99.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React115.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React115.createElement(import_icons38.BrushBigIcon, { fontSize: size })));
8075
+ var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React116.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React116.createElement(import_icons38.BrushBigIcon, { fontSize: size })));
8063
8076
 
8064
8077
  // src/components/repeater/repeater.tsx
8065
- var React116 = __toESM(require("react"));
8078
+ var React117 = __toESM(require("react"));
8066
8079
  var import_react70 = require("react");
8067
8080
  var import_icons39 = require("@elementor/icons");
8068
- var import_ui100 = require("@elementor/ui");
8069
- var import_i18n57 = require("@wordpress/i18n");
8081
+ var import_ui101 = require("@elementor/ui");
8082
+ var import_i18n58 = require("@wordpress/i18n");
8070
8083
  var SIZE11 = "tiny";
8071
8084
  var EMPTY_OPEN_ITEM2 = -1;
8072
8085
  var Repeater3 = ({
@@ -8147,8 +8160,8 @@ var Repeater3 = ({
8147
8160
  };
8148
8161
  const isButtonDisabled = disabled || disableAddItemButton;
8149
8162
  const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
8150
- const addButton = /* @__PURE__ */ React116.createElement(
8151
- import_ui100.IconButton,
8163
+ const addButton = /* @__PURE__ */ React117.createElement(
8164
+ import_ui101.IconButton,
8152
8165
  {
8153
8166
  size: SIZE11,
8154
8167
  sx: {
@@ -8156,32 +8169,32 @@ var Repeater3 = ({
8156
8169
  },
8157
8170
  disabled: isButtonDisabled,
8158
8171
  onClick: addRepeaterItem,
8159
- "aria-label": (0, import_i18n57.__)("Add item", "elementor")
8172
+ "aria-label": (0, import_i18n58.__)("Add item", "elementor")
8160
8173
  },
8161
- /* @__PURE__ */ React116.createElement(import_icons39.PlusIcon, { fontSize: SIZE11 })
8174
+ /* @__PURE__ */ React117.createElement(import_icons39.PlusIcon, { fontSize: SIZE11 })
8162
8175
  );
8163
- return /* @__PURE__ */ React116.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React116.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React116.createElement(
8164
- import_ui100.Infotip,
8176
+ return /* @__PURE__ */ React117.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React117.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React117.createElement(
8177
+ import_ui101.Infotip,
8165
8178
  {
8166
8179
  placement: "right",
8167
8180
  content: addButtonInfotipContent,
8168
8181
  color: "secondary",
8169
8182
  slotProps: { popper: { sx: { width: 300 } } }
8170
8183
  },
8171
- /* @__PURE__ */ React116.createElement(import_ui100.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
8172
- ) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React116.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
8184
+ /* @__PURE__ */ React117.createElement(import_ui101.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
8185
+ ) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React117.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
8173
8186
  const index = uniqueKeys.indexOf(key);
8174
8187
  const value = items2[index];
8175
8188
  if (!value) {
8176
8189
  return null;
8177
8190
  }
8178
- return /* @__PURE__ */ React116.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React116.createElement(
8191
+ return /* @__PURE__ */ React117.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React117.createElement(
8179
8192
  RepeaterItem,
8180
8193
  {
8181
8194
  disabled,
8182
8195
  propDisabled: value?.disabled,
8183
- label: /* @__PURE__ */ React116.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React116.createElement(itemSettings.Label, { value, index })),
8184
- startIcon: /* @__PURE__ */ React116.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React116.createElement(itemSettings.Icon, { value })),
8196
+ label: /* @__PURE__ */ React117.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React117.createElement(itemSettings.Label, { value, index })),
8197
+ startIcon: /* @__PURE__ */ React117.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React117.createElement(itemSettings.Icon, { value })),
8185
8198
  removeItem: () => removeRepeaterItem(index),
8186
8199
  duplicateItem: () => duplicateRepeaterItem(index),
8187
8200
  toggleDisableItem: () => toggleDisableRepeaterItem(index),
@@ -8195,7 +8208,7 @@ var Repeater3 = ({
8195
8208
  actions: itemSettings.actions,
8196
8209
  value
8197
8210
  },
8198
- (props) => /* @__PURE__ */ React116.createElement(
8211
+ (props) => /* @__PURE__ */ React117.createElement(
8199
8212
  itemSettings.Content,
8200
8213
  {
8201
8214
  ...props,
@@ -8235,18 +8248,18 @@ var RepeaterItem = ({
8235
8248
  },
8236
8249
  wrappedOnPopoverClose
8237
8250
  );
8238
- const triggerProps = (0, import_ui100.bindTrigger)(popoverState);
8251
+ const triggerProps = (0, import_ui101.bindTrigger)(popoverState);
8239
8252
  usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
8240
- const duplicateLabel = (0, import_i18n57.__)("Duplicate", "elementor");
8241
- const toggleLabel = propDisabled ? (0, import_i18n57.__)("Show", "elementor") : (0, import_i18n57.__)("Hide", "elementor");
8242
- const removeLabel = (0, import_i18n57.__)("Remove", "elementor");
8243
- return /* @__PURE__ */ React116.createElement(import_ui100.Box, { sx: { display: "contents" } }, /* @__PURE__ */ React116.createElement(
8253
+ const duplicateLabel = (0, import_i18n58.__)("Duplicate", "elementor");
8254
+ const toggleLabel = propDisabled ? (0, import_i18n58.__)("Show", "elementor") : (0, import_i18n58.__)("Hide", "elementor");
8255
+ const removeLabel = (0, import_i18n58.__)("Remove", "elementor");
8256
+ return /* @__PURE__ */ React117.createElement(import_ui101.Box, { sx: { display: "contents" } }, /* @__PURE__ */ React117.createElement(
8244
8257
  RepeaterTag,
8245
8258
  {
8246
8259
  disabled,
8247
8260
  label,
8248
8261
  ref: setRef,
8249
- "aria-label": (0, import_i18n57.__)("Open item", "elementor"),
8262
+ "aria-label": (0, import_i18n58.__)("Open item", "elementor"),
8250
8263
  ...triggerProps,
8251
8264
  onClick: (e) => {
8252
8265
  triggerProps.onClick(e);
@@ -8255,14 +8268,14 @@ var RepeaterItem = ({
8255
8268
  }
8256
8269
  },
8257
8270
  startIcon,
8258
- actions: /* @__PURE__ */ React116.createElement(React116.Fragment, null, showDuplicate && /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(import_ui100.IconButton, { size: SIZE11, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React116.createElement(import_icons39.CopyIcon, { fontSize: SIZE11 }))), showToggle && /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(import_ui100.IconButton, { size: SIZE11, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React116.createElement(import_icons39.EyeOffIcon, { fontSize: SIZE11 }) : /* @__PURE__ */ React116.createElement(import_icons39.EyeIcon, { fontSize: SIZE11 }))), actions?.(value), showRemove && /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(import_ui100.IconButton, { size: SIZE11, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React116.createElement(import_icons39.XIcon, { fontSize: SIZE11 }))))
8271
+ actions: /* @__PURE__ */ React117.createElement(React117.Fragment, null, showDuplicate && /* @__PURE__ */ React117.createElement(import_ui101.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React117.createElement(import_ui101.IconButton, { size: SIZE11, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React117.createElement(import_icons39.CopyIcon, { fontSize: SIZE11 }))), showToggle && /* @__PURE__ */ React117.createElement(import_ui101.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React117.createElement(import_ui101.IconButton, { size: SIZE11, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React117.createElement(import_icons39.EyeOffIcon, { fontSize: SIZE11 }) : /* @__PURE__ */ React117.createElement(import_icons39.EyeIcon, { fontSize: SIZE11 }))), actions?.(value), showRemove && /* @__PURE__ */ React117.createElement(import_ui101.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React117.createElement(import_ui101.IconButton, { size: SIZE11, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React117.createElement(import_icons39.XIcon, { fontSize: SIZE11 }))))
8259
8272
  }
8260
- ), /* @__PURE__ */ React116.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React116.createElement(import_ui100.Box, null, children({ anchorEl: ref }))));
8273
+ ), /* @__PURE__ */ React117.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React117.createElement(import_ui101.Box, null, children({ anchorEl: ref }))));
8261
8274
  };
8262
8275
  var usePopover = (openOnMount, onOpen, onPopoverClose) => {
8263
8276
  const [ref, setRef] = (0, import_react70.useState)(null);
8264
- const popoverState = (0, import_ui100.usePopupState)({ variant: "popover" });
8265
- const popoverProps = (0, import_ui100.bindPopover)(popoverState);
8277
+ const popoverState = (0, import_ui101.usePopupState)({ variant: "popover" });
8278
+ const popoverProps = (0, import_ui101.bindPopover)(popoverState);
8266
8279
  (0, import_react70.useEffect)(() => {
8267
8280
  if (openOnMount && ref) {
8268
8281
  popoverState.open(ref);
@@ -8282,20 +8295,20 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
8282
8295
  };
8283
8296
 
8284
8297
  // src/components/inline-editor-toolbar.tsx
8285
- var React118 = __toESM(require("react"));
8298
+ var React119 = __toESM(require("react"));
8286
8299
  var import_react72 = require("react");
8287
8300
  var import_editor_elements7 = require("@elementor/editor-elements");
8288
8301
  var import_icons41 = require("@elementor/icons");
8289
- var import_ui102 = require("@elementor/ui");
8302
+ var import_ui103 = require("@elementor/ui");
8290
8303
  var import_react73 = require("@tiptap/react");
8291
- var import_i18n59 = require("@wordpress/i18n");
8304
+ var import_i18n60 = require("@wordpress/i18n");
8292
8305
 
8293
8306
  // src/components/url-popover.tsx
8294
- var React117 = __toESM(require("react"));
8307
+ var React118 = __toESM(require("react"));
8295
8308
  var import_react71 = require("react");
8296
8309
  var import_icons40 = require("@elementor/icons");
8297
- var import_ui101 = require("@elementor/ui");
8298
- var import_i18n58 = require("@wordpress/i18n");
8310
+ var import_ui102 = require("@elementor/ui");
8311
+ var import_i18n59 = require("@wordpress/i18n");
8299
8312
  var UrlPopover = ({
8300
8313
  popupState,
8301
8314
  restoreValue,
@@ -8315,41 +8328,41 @@ var UrlPopover = ({
8315
8328
  restoreValue();
8316
8329
  popupState.close();
8317
8330
  };
8318
- return /* @__PURE__ */ React117.createElement(
8319
- import_ui101.Popover,
8331
+ return /* @__PURE__ */ React118.createElement(
8332
+ import_ui102.Popover,
8320
8333
  {
8321
8334
  slotProps: {
8322
8335
  paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
8323
8336
  },
8324
- ...(0, import_ui101.bindPopover)(popupState),
8337
+ ...(0, import_ui102.bindPopover)(popupState),
8325
8338
  anchorOrigin: { vertical: "top", horizontal: "left" },
8326
8339
  transformOrigin: { vertical: "top", horizontal: "left" },
8327
8340
  onClose: handleClose
8328
8341
  },
8329
- /* @__PURE__ */ React117.createElement(import_ui101.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React117.createElement(
8330
- import_ui101.TextField,
8342
+ /* @__PURE__ */ React118.createElement(import_ui102.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React118.createElement(
8343
+ import_ui102.TextField,
8331
8344
  {
8332
8345
  value,
8333
8346
  onChange,
8334
8347
  size: "tiny",
8335
8348
  fullWidth: true,
8336
- placeholder: (0, import_i18n58.__)("Type a URL", "elementor"),
8349
+ placeholder: (0, import_i18n59.__)("Type a URL", "elementor"),
8337
8350
  inputProps: { ref: inputRef },
8338
8351
  color: "secondary",
8339
8352
  InputProps: { sx: { borderRadius: "8px" } },
8340
8353
  onKeyUp: (event) => event.key === "Enter" && handleClose()
8341
8354
  }
8342
- ), /* @__PURE__ */ React117.createElement(import_ui101.Tooltip, { title: (0, import_i18n58.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React117.createElement(
8343
- import_ui101.ToggleButton,
8355
+ ), /* @__PURE__ */ React118.createElement(import_ui102.Tooltip, { title: (0, import_i18n59.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React118.createElement(
8356
+ import_ui102.ToggleButton,
8344
8357
  {
8345
8358
  size: "tiny",
8346
8359
  value: "newTab",
8347
8360
  selected: openInNewTab,
8348
8361
  onClick: onToggleNewTab,
8349
- "aria-label": (0, import_i18n58.__)("Open in a new tab", "elementor"),
8362
+ "aria-label": (0, import_i18n59.__)("Open in a new tab", "elementor"),
8350
8363
  sx: { borderRadius: "8px" }
8351
8364
  },
8352
- /* @__PURE__ */ React117.createElement(import_icons40.ExternalLinkIcon, { fontSize: "tiny" })
8365
+ /* @__PURE__ */ React118.createElement(import_icons40.ExternalLinkIcon, { fontSize: "tiny" })
8353
8366
  )))
8354
8367
  );
8355
8368
  };
@@ -8359,7 +8372,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
8359
8372
  const [urlValue, setUrlValue] = (0, import_react72.useState)("");
8360
8373
  const [openInNewTab, setOpenInNewTab] = (0, import_react72.useState)(false);
8361
8374
  const toolbarRef = (0, import_react72.useRef)(null);
8362
- const linkPopupState = (0, import_ui102.usePopupState)({ variant: "popover" });
8375
+ const linkPopupState = (0, import_ui103.usePopupState)({ variant: "popover" });
8363
8376
  const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
8364
8377
  const editorState = (0, import_react73.useEditorState)({
8365
8378
  editor,
@@ -8405,8 +8418,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
8405
8418
  (0, import_react72.useEffect)(() => {
8406
8419
  editor?.commands?.focus();
8407
8420
  }, [editor]);
8408
- return /* @__PURE__ */ React118.createElement(
8409
- import_ui102.Box,
8421
+ return /* @__PURE__ */ React119.createElement(
8422
+ import_ui103.Box,
8410
8423
  {
8411
8424
  ref: toolbarRef,
8412
8425
  sx: {
@@ -8422,9 +8435,9 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
8422
8435
  ...sx
8423
8436
  }
8424
8437
  },
8425
- /* @__PURE__ */ React118.createElement(import_ui102.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React118.createElement(import_ui102.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
8426
- /* @__PURE__ */ React118.createElement(
8427
- import_ui102.ToggleButtonGroup,
8438
+ /* @__PURE__ */ React119.createElement(import_ui103.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React119.createElement(import_ui103.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
8439
+ /* @__PURE__ */ React119.createElement(
8440
+ import_ui103.ToggleButtonGroup,
8428
8441
  {
8429
8442
  value: editorState,
8430
8443
  size: "tiny",
@@ -8432,7 +8445,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
8432
8445
  display: "flex",
8433
8446
  gap: 0.5,
8434
8447
  border: "none",
8435
- [`& .${import_ui102.toggleButtonGroupClasses.firstButton}, & .${import_ui102.toggleButtonGroupClasses.middleButton}, & .${import_ui102.toggleButtonGroupClasses.lastButton}`]: {
8448
+ [`& .${import_ui103.toggleButtonGroupClasses.firstButton}, & .${import_ui103.toggleButtonGroupClasses.middleButton}, & .${import_ui103.toggleButtonGroupClasses.lastButton}`]: {
8436
8449
  borderRadius: "8px",
8437
8450
  border: "none",
8438
8451
  marginLeft: 0,
@@ -8445,8 +8458,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
8445
8458
  }
8446
8459
  }
8447
8460
  },
8448
- formatButtonsList.map((button) => /* @__PURE__ */ React118.createElement(import_ui102.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React118.createElement(
8449
- import_ui102.ToggleButton,
8461
+ formatButtonsList.map((button) => /* @__PURE__ */ React119.createElement(import_ui103.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React119.createElement(
8462
+ import_ui103.ToggleButton,
8450
8463
  {
8451
8464
  value: button.action,
8452
8465
  "aria-label": button.label,
@@ -8463,7 +8476,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
8463
8476
  button.icon
8464
8477
  )))
8465
8478
  ),
8466
- /* @__PURE__ */ React118.createElement(
8479
+ /* @__PURE__ */ React119.createElement(
8467
8480
  UrlPopover,
8468
8481
  {
8469
8482
  popupState: linkPopupState,
@@ -8486,64 +8499,64 @@ var checkIfElementIsClickable = (elementId) => {
8486
8499
  };
8487
8500
  var toolbarButtons = {
8488
8501
  clear: {
8489
- label: (0, import_i18n59.__)("Clear", "elementor"),
8490
- icon: /* @__PURE__ */ React118.createElement(import_icons41.MinusIcon, { fontSize: "tiny" }),
8502
+ label: (0, import_i18n60.__)("Clear", "elementor"),
8503
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.MinusIcon, { fontSize: "tiny" }),
8491
8504
  action: "clear",
8492
8505
  method: (editor) => {
8493
8506
  editor.chain().focus().clearNodes().unsetAllMarks().run();
8494
8507
  }
8495
8508
  },
8496
8509
  bold: {
8497
- label: (0, import_i18n59.__)("Bold", "elementor"),
8498
- icon: /* @__PURE__ */ React118.createElement(import_icons41.BoldIcon, { fontSize: "tiny" }),
8510
+ label: (0, import_i18n60.__)("Bold", "elementor"),
8511
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.BoldIcon, { fontSize: "tiny" }),
8499
8512
  action: "bold",
8500
8513
  method: (editor) => {
8501
8514
  editor.chain().focus().toggleBold().run();
8502
8515
  }
8503
8516
  },
8504
8517
  italic: {
8505
- label: (0, import_i18n59.__)("Italic", "elementor"),
8506
- icon: /* @__PURE__ */ React118.createElement(import_icons41.ItalicIcon, { fontSize: "tiny" }),
8518
+ label: (0, import_i18n60.__)("Italic", "elementor"),
8519
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.ItalicIcon, { fontSize: "tiny" }),
8507
8520
  action: "italic",
8508
8521
  method: (editor) => {
8509
8522
  editor.chain().focus().toggleItalic().run();
8510
8523
  }
8511
8524
  },
8512
8525
  underline: {
8513
- label: (0, import_i18n59.__)("Underline", "elementor"),
8514
- icon: /* @__PURE__ */ React118.createElement(import_icons41.UnderlineIcon, { fontSize: "tiny" }),
8526
+ label: (0, import_i18n60.__)("Underline", "elementor"),
8527
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.UnderlineIcon, { fontSize: "tiny" }),
8515
8528
  action: "underline",
8516
8529
  method: (editor) => {
8517
8530
  editor.chain().focus().toggleUnderline().run();
8518
8531
  }
8519
8532
  },
8520
8533
  strike: {
8521
- label: (0, import_i18n59.__)("Strikethrough", "elementor"),
8522
- icon: /* @__PURE__ */ React118.createElement(import_icons41.StrikethroughIcon, { fontSize: "tiny" }),
8534
+ label: (0, import_i18n60.__)("Strikethrough", "elementor"),
8535
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.StrikethroughIcon, { fontSize: "tiny" }),
8523
8536
  action: "strike",
8524
8537
  method: (editor) => {
8525
8538
  editor.chain().focus().toggleStrike().run();
8526
8539
  }
8527
8540
  },
8528
8541
  superscript: {
8529
- label: (0, import_i18n59.__)("Superscript", "elementor"),
8530
- icon: /* @__PURE__ */ React118.createElement(import_icons41.SuperscriptIcon, { fontSize: "tiny" }),
8542
+ label: (0, import_i18n60.__)("Superscript", "elementor"),
8543
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.SuperscriptIcon, { fontSize: "tiny" }),
8531
8544
  action: "superscript",
8532
8545
  method: (editor) => {
8533
8546
  editor.chain().focus().toggleSuperscript().run();
8534
8547
  }
8535
8548
  },
8536
8549
  subscript: {
8537
- label: (0, import_i18n59.__)("Subscript", "elementor"),
8538
- icon: /* @__PURE__ */ React118.createElement(import_icons41.SubscriptIcon, { fontSize: "tiny" }),
8550
+ label: (0, import_i18n60.__)("Subscript", "elementor"),
8551
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.SubscriptIcon, { fontSize: "tiny" }),
8539
8552
  action: "subscript",
8540
8553
  method: (editor) => {
8541
8554
  editor.chain().focus().toggleSubscript().run();
8542
8555
  }
8543
8556
  },
8544
8557
  link: {
8545
- label: (0, import_i18n59.__)("Link", "elementor"),
8546
- icon: /* @__PURE__ */ React118.createElement(import_icons41.LinkIcon, { fontSize: "tiny" }),
8558
+ label: (0, import_i18n60.__)("Link", "elementor"),
8559
+ icon: /* @__PURE__ */ React119.createElement(import_icons41.LinkIcon, { fontSize: "tiny" }),
8547
8560
  action: "link",
8548
8561
  method: null
8549
8562
  }
@@ -8552,8 +8565,8 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
8552
8565
  var possibleFormats = Object.keys(formatButtons);
8553
8566
 
8554
8567
  // src/components/size/unstable-size-field.tsx
8555
- var React121 = __toESM(require("react"));
8556
- var import_ui104 = require("@elementor/ui");
8568
+ var React122 = __toESM(require("react"));
8569
+ var import_ui105 = require("@elementor/ui");
8557
8570
 
8558
8571
  // src/hooks/use-size-value.ts
8559
8572
  var DEFAULT_UNIT2 = "px";
@@ -8595,17 +8608,17 @@ var differsFromExternal = (newState, externalState) => {
8595
8608
  };
8596
8609
 
8597
8610
  // src/components/size/unit-select.tsx
8598
- var React119 = __toESM(require("react"));
8611
+ var React120 = __toESM(require("react"));
8599
8612
  var import_react74 = require("react");
8600
- var import_editor_ui17 = require("@elementor/editor-ui");
8601
- var import_ui103 = require("@elementor/ui");
8613
+ var import_editor_ui18 = require("@elementor/editor-ui");
8614
+ var import_ui104 = require("@elementor/ui");
8602
8615
  var menuItemContentStyles2 = {
8603
8616
  display: "flex",
8604
8617
  flexDirection: "column",
8605
8618
  justifyContent: "center"
8606
8619
  };
8607
8620
  var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
8608
- const popupState = (0, import_ui103.usePopupState)({
8621
+ const popupState = (0, import_ui104.usePopupState)({
8609
8622
  variant: "popover",
8610
8623
  popupId: (0, import_react74.useId)()
8611
8624
  });
@@ -8613,8 +8626,8 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
8613
8626
  onClick(options[index]);
8614
8627
  popupState.close();
8615
8628
  };
8616
- return /* @__PURE__ */ React119.createElement(React119.Fragment, null, /* @__PURE__ */ React119.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui103.bindTrigger)(popupState) }, value), /* @__PURE__ */ React119.createElement(import_ui103.Menu, { MenuListProps: { dense: true }, ...(0, import_ui103.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React119.createElement(
8617
- import_editor_ui17.MenuListItem,
8629
+ return /* @__PURE__ */ React120.createElement(React120.Fragment, null, /* @__PURE__ */ React120.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui104.bindTrigger)(popupState) }, value), /* @__PURE__ */ React120.createElement(import_ui104.Menu, { MenuListProps: { dense: true }, ...(0, import_ui104.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React120.createElement(
8630
+ import_editor_ui18.MenuListItem,
8618
8631
  {
8619
8632
  key: option,
8620
8633
  onClick: () => handleMenuItemClick(index),
@@ -8632,7 +8645,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
8632
8645
  option.toUpperCase()
8633
8646
  ))));
8634
8647
  };
8635
- var StyledButton3 = (0, import_ui103.styled)(import_ui103.Button, {
8648
+ var StyledButton3 = (0, import_ui104.styled)(import_ui104.Button, {
8636
8649
  shouldForwardProp: (prop) => prop !== "isPrimaryColor"
8637
8650
  })(({ isPrimaryColor, theme }) => ({
8638
8651
  color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
@@ -8642,11 +8655,11 @@ var StyledButton3 = (0, import_ui103.styled)(import_ui103.Button, {
8642
8655
  }));
8643
8656
 
8644
8657
  // src/components/size/unstable-size-input.tsx
8645
- var React120 = __toESM(require("react"));
8658
+ var React121 = __toESM(require("react"));
8646
8659
  var import_react75 = require("react");
8647
8660
  var UnstableSizeInput = (0, import_react75.forwardRef)(
8648
8661
  ({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
8649
- return /* @__PURE__ */ React120.createElement(
8662
+ return /* @__PURE__ */ React121.createElement(
8650
8663
  NumberInput,
8651
8664
  {
8652
8665
  ref,
@@ -8684,7 +8697,7 @@ var UnstableSizeField = ({
8684
8697
  const shouldHighlightUnit2 = () => {
8685
8698
  return hasValue(size);
8686
8699
  };
8687
- return /* @__PURE__ */ React121.createElement(
8700
+ return /* @__PURE__ */ React122.createElement(
8688
8701
  UnstableSizeInput,
8689
8702
  {
8690
8703
  type: "number",
@@ -8693,8 +8706,8 @@ var UnstableSizeField = ({
8693
8706
  onChange: (event) => setSize(event.target.value),
8694
8707
  InputProps: {
8695
8708
  ...InputProps,
8696
- startAdornment: startIcon && /* @__PURE__ */ React121.createElement(import_ui104.InputAdornment, { position: "start" }, startIcon),
8697
- endAdornment: /* @__PURE__ */ React121.createElement(import_ui104.InputAdornment, { position: "end" }, /* @__PURE__ */ React121.createElement(
8709
+ startAdornment: startIcon && /* @__PURE__ */ React122.createElement(import_ui105.InputAdornment, { position: "start" }, startIcon),
8710
+ endAdornment: /* @__PURE__ */ React122.createElement(import_ui105.InputAdornment, { position: "end" }, /* @__PURE__ */ React122.createElement(
8698
8711
  UnitSelect,
8699
8712
  {
8700
8713
  options: units2,
@@ -8745,6 +8758,7 @@ var useFontFamilies = () => {
8745
8758
  // Annotate the CommonJS export names for ESM import in node:
8746
8759
  0 && (module.exports = {
8747
8760
  AspectRatioControl,
8761
+ AttachmentTypeControl,
8748
8762
  AttributesControl,
8749
8763
  BackgroundControl,
8750
8764
  BoxShadowRepeaterControl,