@elementor/editor-controls 3.32.0-43 → 3.32.0-45

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
@@ -1887,7 +1887,7 @@ var StyledToggleButton = (0, import_ui25.styled)(import_ui25.ToggleButton, {
1887
1887
  ${({ theme, isPlaceholder }) => isPlaceholder && `
1888
1888
  color: ${theme.palette.text.tertiary};
1889
1889
  background-color: ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.04)" : "rgba(0,0,0,0.02)"};
1890
-
1890
+
1891
1891
  &:hover {
1892
1892
  background-color: ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)"};
1893
1893
  }
@@ -2305,15 +2305,23 @@ var LinkedDimensionsControl = createControl(
2305
2305
  isSiteRtl = false,
2306
2306
  extendedOptions
2307
2307
  }) => {
2308
- const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(import_editor_props17.sizePropTypeUtil);
2308
+ const {
2309
+ value: sizeValue,
2310
+ setValue: setSizeValue,
2311
+ disabled: sizeDisabled,
2312
+ placeholder: sizePlaceholder
2313
+ } = useBoundProp(import_editor_props17.sizePropTypeUtil);
2309
2314
  const gridRowRefs = [(0, import_react22.useRef)(null), (0, import_react22.useRef)(null)];
2310
2315
  const {
2311
2316
  value: dimensionsValue,
2312
2317
  setValue: setDimensionsValue,
2313
2318
  propType,
2319
+ placeholder: dimensionsPlaceholder,
2314
2320
  disabled: dimensionsDisabled
2315
2321
  } = useBoundProp(import_editor_props17.dimensionsPropTypeUtil);
2316
- const isLinked = !dimensionsValue && !sizeValue ? true : !!sizeValue;
2322
+ const hasUserValues = !!(dimensionsValue || sizeValue);
2323
+ const hasPlaceholders = !!(sizePlaceholder || dimensionsPlaceholder);
2324
+ const isLinked = !hasUserValues && !hasPlaceholders || (hasPlaceholders ? !!sizePlaceholder : !!sizeValue);
2317
2325
  const onLinkToggle = () => {
2318
2326
  if (!isLinked) {
2319
2327
  setSizeValue(dimensionsValue["block-start"]?.value ?? null);
@@ -2338,10 +2346,11 @@ var LinkedDimensionsControl = createControl(
2338
2346
  propType,
2339
2347
  value: dimensionsValue,
2340
2348
  setValue: setDimensionsValue,
2349
+ placeholder: dimensionsPlaceholder,
2341
2350
  isDisabled: () => disabled
2342
2351
  },
2343
2352
  /* @__PURE__ */ React37.createElement(import_ui29.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React37.createElement(import_ui29.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React37.createElement(
2344
- import_ui29.ToggleButton,
2353
+ StyledToggleButton,
2345
2354
  {
2346
2355
  "aria-label": isLinked ? unlinkedLabel : linkedLabel,
2347
2356
  size: "tiny",
@@ -2349,7 +2358,8 @@ var LinkedDimensionsControl = createControl(
2349
2358
  selected: isLinked,
2350
2359
  sx: { marginLeft: "auto" },
2351
2360
  onChange: onLinkToggle,
2352
- disabled
2361
+ disabled,
2362
+ isPlaceholder: hasPlaceholders
2353
2363
  },
2354
2364
  /* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
2355
2365
  ))),