@elementor/editor-controls 3.32.0-44 → 3.32.0-46
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 +24 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/components/control-toggle-button-group.tsx +2 -2
- package/src/controls/filter-repeater-control.tsx +12 -2
- package/src/controls/linked-dimensions-control.tsx +17 -5
package/dist/index.js
CHANGED
|
@@ -1787,7 +1787,12 @@ var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
));
|
|
1789
1789
|
});
|
|
1790
|
-
var
|
|
1790
|
+
var StyledUnstableColorIndicator = (0, import_ui23.styled)(import_ui23.UnstableColorIndicator)(({ theme }) => ({
|
|
1791
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
1792
|
+
}));
|
|
1793
|
+
var ItemIcon2 = ({ value }) => {
|
|
1794
|
+
return isSingleSize(value.value.func.value ?? "") ? /* @__PURE__ */ React30.createElement(React30.Fragment, null) : /* @__PURE__ */ React30.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: value.value.args.value.color.value });
|
|
1795
|
+
};
|
|
1791
1796
|
var ItemLabel2 = ({ value }) => {
|
|
1792
1797
|
return isSingleSize(value.value.func.value ?? "") ? /* @__PURE__ */ React30.createElement(SingleSizeItemLabel, { value }) : /* @__PURE__ */ React30.createElement(DropShadowItemLabel, { value });
|
|
1793
1798
|
};
|
|
@@ -1887,7 +1892,7 @@ var StyledToggleButton = (0, import_ui25.styled)(import_ui25.ToggleButton, {
|
|
|
1887
1892
|
${({ theme, isPlaceholder }) => isPlaceholder && `
|
|
1888
1893
|
color: ${theme.palette.text.tertiary};
|
|
1889
1894
|
background-color: ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.04)" : "rgba(0,0,0,0.02)"};
|
|
1890
|
-
|
|
1895
|
+
|
|
1891
1896
|
&:hover {
|
|
1892
1897
|
background-color: ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)"};
|
|
1893
1898
|
}
|
|
@@ -2305,15 +2310,23 @@ var LinkedDimensionsControl = createControl(
|
|
|
2305
2310
|
isSiteRtl = false,
|
|
2306
2311
|
extendedOptions
|
|
2307
2312
|
}) => {
|
|
2308
|
-
const {
|
|
2313
|
+
const {
|
|
2314
|
+
value: sizeValue,
|
|
2315
|
+
setValue: setSizeValue,
|
|
2316
|
+
disabled: sizeDisabled,
|
|
2317
|
+
placeholder: sizePlaceholder
|
|
2318
|
+
} = useBoundProp(import_editor_props17.sizePropTypeUtil);
|
|
2309
2319
|
const gridRowRefs = [(0, import_react22.useRef)(null), (0, import_react22.useRef)(null)];
|
|
2310
2320
|
const {
|
|
2311
2321
|
value: dimensionsValue,
|
|
2312
2322
|
setValue: setDimensionsValue,
|
|
2313
2323
|
propType,
|
|
2324
|
+
placeholder: dimensionsPlaceholder,
|
|
2314
2325
|
disabled: dimensionsDisabled
|
|
2315
2326
|
} = useBoundProp(import_editor_props17.dimensionsPropTypeUtil);
|
|
2316
|
-
const
|
|
2327
|
+
const hasUserValues = !!(dimensionsValue || sizeValue);
|
|
2328
|
+
const hasPlaceholders = !!(sizePlaceholder || dimensionsPlaceholder);
|
|
2329
|
+
const isLinked = !hasUserValues && !hasPlaceholders || (hasPlaceholders ? !!sizePlaceholder : !!sizeValue);
|
|
2317
2330
|
const onLinkToggle = () => {
|
|
2318
2331
|
if (!isLinked) {
|
|
2319
2332
|
setSizeValue(dimensionsValue["block-start"]?.value ?? null);
|
|
@@ -2338,10 +2351,11 @@ var LinkedDimensionsControl = createControl(
|
|
|
2338
2351
|
propType,
|
|
2339
2352
|
value: dimensionsValue,
|
|
2340
2353
|
setValue: setDimensionsValue,
|
|
2354
|
+
placeholder: dimensionsPlaceholder,
|
|
2341
2355
|
isDisabled: () => disabled
|
|
2342
2356
|
},
|
|
2343
2357
|
/* @__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
|
-
|
|
2358
|
+
StyledToggleButton,
|
|
2345
2359
|
{
|
|
2346
2360
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
2347
2361
|
size: "tiny",
|
|
@@ -2349,7 +2363,8 @@ var LinkedDimensionsControl = createControl(
|
|
|
2349
2363
|
selected: isLinked,
|
|
2350
2364
|
sx: { marginLeft: "auto" },
|
|
2351
2365
|
onChange: onLinkToggle,
|
|
2352
|
-
disabled
|
|
2366
|
+
disabled,
|
|
2367
|
+
isPlaceholder: hasPlaceholders
|
|
2353
2368
|
},
|
|
2354
2369
|
/* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2355
2370
|
))),
|
|
@@ -4210,7 +4225,7 @@ var extractColorFrom = (prop) => {
|
|
|
4210
4225
|
};
|
|
4211
4226
|
var ItemIconColor = ({ value: prop }) => {
|
|
4212
4227
|
const color = extractColorFrom(prop);
|
|
4213
|
-
return /* @__PURE__ */ React67.createElement(
|
|
4228
|
+
return /* @__PURE__ */ React67.createElement(StyledUnstableColorIndicator2, { size: "inherit", component: "span", value: color });
|
|
4214
4229
|
};
|
|
4215
4230
|
var ItemIconImage = ({ value }) => {
|
|
4216
4231
|
const { imageUrl } = useImage(value);
|
|
@@ -4229,7 +4244,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4229
4244
|
};
|
|
4230
4245
|
var ItemIconGradient = ({ value }) => {
|
|
4231
4246
|
const gradient = getGradientValue(value);
|
|
4232
|
-
return /* @__PURE__ */ React67.createElement(
|
|
4247
|
+
return /* @__PURE__ */ React67.createElement(StyledUnstableColorIndicator2, { size: "inherit", component: "span", value: gradient });
|
|
4233
4248
|
};
|
|
4234
4249
|
var ItemLabel3 = ({ value }) => {
|
|
4235
4250
|
switch (value.$$type) {
|
|
@@ -4265,7 +4280,7 @@ var ImageOverlayContent = () => {
|
|
|
4265
4280
|
const propContext = useBoundProp(import_editor_props31.backgroundImageOverlayPropTypeUtil);
|
|
4266
4281
|
return /* @__PURE__ */ React67.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React67.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React67.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React67.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React67.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React67.createElement(BackgroundImageOverlayAttachment, null)));
|
|
4267
4282
|
};
|
|
4268
|
-
var
|
|
4283
|
+
var StyledUnstableColorIndicator2 = (0, import_ui58.styled)(import_ui58.UnstableColorIndicator)(({ theme }) => ({
|
|
4269
4284
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4270
4285
|
}));
|
|
4271
4286
|
var useImage = (image) => {
|