@elementor/editor-controls 3.32.0-44 → 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.mjs
CHANGED
|
@@ -1841,7 +1841,7 @@ var StyledToggleButton = styled4(ToggleButton, {
|
|
|
1841
1841
|
${({ theme, isPlaceholder }) => isPlaceholder && `
|
|
1842
1842
|
color: ${theme.palette.text.tertiary};
|
|
1843
1843
|
background-color: ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.04)" : "rgba(0,0,0,0.02)"};
|
|
1844
|
-
|
|
1844
|
+
|
|
1845
1845
|
&:hover {
|
|
1846
1846
|
background-color: ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)"};
|
|
1847
1847
|
}
|
|
@@ -2251,7 +2251,7 @@ import * as React37 from "react";
|
|
|
2251
2251
|
import { useRef as useRef9 } from "react";
|
|
2252
2252
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
2253
2253
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
2254
|
-
import { Grid as Grid8, Stack as Stack8,
|
|
2254
|
+
import { Grid as Grid8, Stack as Stack8, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
2255
2255
|
import { __ as __10 } from "@wordpress/i18n";
|
|
2256
2256
|
var LinkedDimensionsControl = createControl(
|
|
2257
2257
|
({
|
|
@@ -2259,15 +2259,23 @@ var LinkedDimensionsControl = createControl(
|
|
|
2259
2259
|
isSiteRtl = false,
|
|
2260
2260
|
extendedOptions
|
|
2261
2261
|
}) => {
|
|
2262
|
-
const {
|
|
2262
|
+
const {
|
|
2263
|
+
value: sizeValue,
|
|
2264
|
+
setValue: setSizeValue,
|
|
2265
|
+
disabled: sizeDisabled,
|
|
2266
|
+
placeholder: sizePlaceholder
|
|
2267
|
+
} = useBoundProp(sizePropTypeUtil4);
|
|
2263
2268
|
const gridRowRefs = [useRef9(null), useRef9(null)];
|
|
2264
2269
|
const {
|
|
2265
2270
|
value: dimensionsValue,
|
|
2266
2271
|
setValue: setDimensionsValue,
|
|
2267
2272
|
propType,
|
|
2273
|
+
placeholder: dimensionsPlaceholder,
|
|
2268
2274
|
disabled: dimensionsDisabled
|
|
2269
2275
|
} = useBoundProp(dimensionsPropTypeUtil);
|
|
2270
|
-
const
|
|
2276
|
+
const hasUserValues = !!(dimensionsValue || sizeValue);
|
|
2277
|
+
const hasPlaceholders = !!(sizePlaceholder || dimensionsPlaceholder);
|
|
2278
|
+
const isLinked = !hasUserValues && !hasPlaceholders || (hasPlaceholders ? !!sizePlaceholder : !!sizeValue);
|
|
2271
2279
|
const onLinkToggle = () => {
|
|
2272
2280
|
if (!isLinked) {
|
|
2273
2281
|
setSizeValue(dimensionsValue["block-start"]?.value ?? null);
|
|
@@ -2292,10 +2300,11 @@ var LinkedDimensionsControl = createControl(
|
|
|
2292
2300
|
propType,
|
|
2293
2301
|
value: dimensionsValue,
|
|
2294
2302
|
setValue: setDimensionsValue,
|
|
2303
|
+
placeholder: dimensionsPlaceholder,
|
|
2295
2304
|
isDisabled: () => disabled
|
|
2296
2305
|
},
|
|
2297
2306
|
/* @__PURE__ */ React37.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React37.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React37.createElement(
|
|
2298
|
-
|
|
2307
|
+
StyledToggleButton,
|
|
2299
2308
|
{
|
|
2300
2309
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
2301
2310
|
size: "tiny",
|
|
@@ -2303,7 +2312,8 @@ var LinkedDimensionsControl = createControl(
|
|
|
2303
2312
|
selected: isLinked,
|
|
2304
2313
|
sx: { marginLeft: "auto" },
|
|
2305
2314
|
onChange: onLinkToggle,
|
|
2306
|
-
disabled
|
|
2315
|
+
disabled,
|
|
2316
|
+
isPlaceholder: hasPlaceholders
|
|
2307
2317
|
},
|
|
2308
2318
|
/* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2309
2319
|
))),
|
|
@@ -2960,7 +2970,7 @@ import * as React45 from "react";
|
|
|
2960
2970
|
import { useRef as useRef10 } from "react";
|
|
2961
2971
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil5 } from "@elementor/editor-props";
|
|
2962
2972
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
2963
|
-
import { Grid as Grid10, Stack as Stack11, ToggleButton as
|
|
2973
|
+
import { Grid as Grid10, Stack as Stack11, ToggleButton as ToggleButton3, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
2964
2974
|
import { __ as __15 } from "@wordpress/i18n";
|
|
2965
2975
|
var GapControl = createControl(({ label }) => {
|
|
2966
2976
|
const {
|
|
@@ -2989,7 +2999,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2989
2999
|
const unlinkedLabel = __15("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2990
3000
|
const disabled = sizeDisabled || directionDisabled;
|
|
2991
3001
|
return /* @__PURE__ */ React45.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React45.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(ControlLabel, null, label), /* @__PURE__ */ React45.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React45.createElement(
|
|
2992
|
-
|
|
3002
|
+
ToggleButton3,
|
|
2993
3003
|
{
|
|
2994
3004
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
2995
3005
|
size: "tiny",
|