@elementor/editor-controls 3.32.0-87 → 3.32.0-89
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 +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +43 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/components/unstable-repeater/header/header.tsx +35 -17
- package/src/control-adornments/control-adornments-context.tsx +2 -1
- package/src/control-adornments/control-adornments.tsx +10 -2
- package/src/controls/transform-control/transform-repeater-control.tsx +9 -4
package/dist/index.mjs
CHANGED
|
@@ -1306,12 +1306,14 @@ var useControlAdornments = () => {
|
|
|
1306
1306
|
};
|
|
1307
1307
|
|
|
1308
1308
|
// src/control-adornments/control-adornments.tsx
|
|
1309
|
-
function ControlAdornments(
|
|
1309
|
+
function ControlAdornments({
|
|
1310
|
+
customContext
|
|
1311
|
+
}) {
|
|
1310
1312
|
const items2 = useControlAdornments();
|
|
1311
1313
|
if (items2?.length === 0) {
|
|
1312
1314
|
return null;
|
|
1313
1315
|
}
|
|
1314
|
-
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, items2.map(({ Adornment, id }) => /* @__PURE__ */ React27.createElement(Adornment, { key: id })));
|
|
1316
|
+
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, items2.map(({ Adornment, id }) => /* @__PURE__ */ React27.createElement(Adornment, { key: id, customContext })));
|
|
1315
1317
|
}
|
|
1316
1318
|
|
|
1317
1319
|
// src/components/unstable-repeater/locations.ts
|
|
@@ -1322,10 +1324,28 @@ var { Slot: RepeaterHeaderActionsSlot, inject: injectIntoRepeaterHeaderActions }
|
|
|
1322
1324
|
var { Slot: RepeaterItemActionsSlot, inject: injectIntoRepeaterItemActions } = createLocation();
|
|
1323
1325
|
|
|
1324
1326
|
// src/components/unstable-repeater/header/header.tsx
|
|
1325
|
-
var Header = React28.forwardRef(
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1327
|
+
var Header = React28.forwardRef(
|
|
1328
|
+
({
|
|
1329
|
+
label,
|
|
1330
|
+
children,
|
|
1331
|
+
adornment: Adornment = ControlAdornments
|
|
1332
|
+
}, ref) => {
|
|
1333
|
+
const { value } = useBoundProp();
|
|
1334
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1335
|
+
Stack5,
|
|
1336
|
+
{
|
|
1337
|
+
direction: "row",
|
|
1338
|
+
alignItems: "center",
|
|
1339
|
+
gap: 1,
|
|
1340
|
+
sx: { marginInlineEnd: -0.75, py: 0.25 },
|
|
1341
|
+
ref
|
|
1342
|
+
},
|
|
1343
|
+
/* @__PURE__ */ React28.createElement(Box3, { display: "flex", alignItems: "center", gap: 1, sx: { flexGrow: 1 } }, /* @__PURE__ */ React28.createElement(Typography2, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, label), /* @__PURE__ */ React28.createElement(Adornment, null)),
|
|
1344
|
+
/* @__PURE__ */ React28.createElement(RepeaterHeaderActionsSlot, { value }),
|
|
1345
|
+
/* @__PURE__ */ React28.createElement(SlotChildren, { whitelist: [TooltipAddItemAction], sorted: true }, children)
|
|
1346
|
+
);
|
|
1347
|
+
}
|
|
1348
|
+
);
|
|
1329
1349
|
|
|
1330
1350
|
// src/components/unstable-repeater/items/items-container.tsx
|
|
1331
1351
|
import * as React30 from "react";
|
|
@@ -4894,7 +4914,7 @@ var TransformRepeaterControl = createControl(() => {
|
|
|
4894
4914
|
component: () => /* @__PURE__ */ React87.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey }),
|
|
4895
4915
|
options: { overwrite: true }
|
|
4896
4916
|
});
|
|
4897
|
-
return /* @__PURE__ */ React87.createElement(PropProvider, { ...context }, /* @__PURE__ */ React87.createElement(TransformBaseControl, { popupState, anchorRef: headerRef }), /* @__PURE__ */ React87.createElement(PropKeyProvider, { bind: repeaterBindKey }, /* @__PURE__ */ React87.createElement(Repeater2, { headerRef })));
|
|
4917
|
+
return /* @__PURE__ */ React87.createElement(PropProvider, { ...context }, /* @__PURE__ */ React87.createElement(TransformBaseControl, { popupState, anchorRef: headerRef }), /* @__PURE__ */ React87.createElement(PropKeyProvider, { bind: repeaterBindKey }, /* @__PURE__ */ React87.createElement(Repeater2, { headerRef, propType: context.propType })));
|
|
4898
4918
|
});
|
|
4899
4919
|
var ToolTip = /* @__PURE__ */ React87.createElement(
|
|
4900
4920
|
Box16,
|
|
@@ -4906,7 +4926,7 @@ var ToolTip = /* @__PURE__ */ React87.createElement(
|
|
|
4906
4926
|
/* @__PURE__ */ React87.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }),
|
|
4907
4927
|
/* @__PURE__ */ React87.createElement(Typography5, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __43("You can use each kind of transform only once per element.", "elementor"))
|
|
4908
4928
|
);
|
|
4909
|
-
var Repeater2 = ({ headerRef }) => {
|
|
4929
|
+
var Repeater2 = ({ headerRef, propType }) => {
|
|
4910
4930
|
const transformFunctionsContext = useBoundProp(transformFunctionsPropTypeUtil);
|
|
4911
4931
|
const availableValues = [initialTransformValue, initialScaleValue, initialRotateValue, initialSkewValue];
|
|
4912
4932
|
const { value: transformValues } = transformFunctionsContext;
|
|
@@ -4920,14 +4940,22 @@ var Repeater2 = ({ headerRef }) => {
|
|
|
4920
4940
|
initial: getInitialValue() ?? initialTransformValue,
|
|
4921
4941
|
propTypeUtil: transformFunctionsPropTypeUtil
|
|
4922
4942
|
},
|
|
4923
|
-
/* @__PURE__ */ React87.createElement(
|
|
4924
|
-
|
|
4943
|
+
/* @__PURE__ */ React87.createElement(
|
|
4944
|
+
Header,
|
|
4925
4945
|
{
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
}
|
|
4930
|
-
|
|
4946
|
+
label: __43("Transform", "elementor"),
|
|
4947
|
+
adornment: () => /* @__PURE__ */ React87.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
4948
|
+
ref: headerRef
|
|
4949
|
+
},
|
|
4950
|
+
/* @__PURE__ */ React87.createElement(
|
|
4951
|
+
TooltipAddItemAction,
|
|
4952
|
+
{
|
|
4953
|
+
disabled: shouldDisableAddItem,
|
|
4954
|
+
tooltipContent: ToolTip,
|
|
4955
|
+
enableTooltip: shouldDisableAddItem
|
|
4956
|
+
}
|
|
4957
|
+
)
|
|
4958
|
+
),
|
|
4931
4959
|
/* @__PURE__ */ React87.createElement(ItemsContainer, { itemTemplate: /* @__PURE__ */ React87.createElement(Item, { Icon: TransformIcon, Label: TransformLabel }) }, /* @__PURE__ */ React87.createElement(DisableItemAction, null), /* @__PURE__ */ React87.createElement(RemoveItemAction, null)),
|
|
4932
4960
|
/* @__PURE__ */ React87.createElement(EditItemPopover, null, /* @__PURE__ */ React87.createElement(TransformContent, null))
|
|
4933
4961
|
));
|