@elementor/editor-controls 0.28.2 → 0.30.0
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/CHANGELOG.md +21 -0
- package/dist/index.d.mts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +388 -245
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +321 -177
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/conditional-tooltip.tsx +16 -0
- package/src/components/control-toggle-button-group.tsx +173 -28
- package/src/components/repeater.tsx +11 -2
- package/src/controls/box-shadow-repeater-control.tsx +1 -1
- package/src/controls/font-family-control/font-family-control.tsx +10 -8
- package/src/controls/toggle-control.tsx +3 -0
- package/src/index.ts +2 -0
- package/src/locations.ts +11 -0
package/dist/index.mjs
CHANGED
|
@@ -307,7 +307,7 @@ function ControlActions({ children }) {
|
|
|
307
307
|
if (items.length === 0) {
|
|
308
308
|
return children;
|
|
309
309
|
}
|
|
310
|
-
const menuItems = items.map(({ MenuItem, id }) => /* @__PURE__ */ React7.createElement(
|
|
310
|
+
const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React7.createElement(MenuItem2, { key: id }));
|
|
311
311
|
return /* @__PURE__ */ React7.createElement(FloatingBarContainer, null, /* @__PURE__ */ React7.createElement(UnstableFloatingActionBar, { actions: menuItems }, children));
|
|
312
312
|
}
|
|
313
313
|
|
|
@@ -723,6 +723,11 @@ function ControlAdornments() {
|
|
|
723
723
|
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React21.createElement(Adornment, { key: id })));
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
+
// src/locations.ts
|
|
727
|
+
import { createReplaceableLocation } from "@elementor/locations";
|
|
728
|
+
var { Slot: RepeaterItemIconSlot, inject: injectIntoRepeaterItemIcon } = createReplaceableLocation();
|
|
729
|
+
var { Slot: RepeaterItemLabelSlot, inject: injectIntoRepeaterItemLabel } = createReplaceableLocation();
|
|
730
|
+
|
|
726
731
|
// src/components/sortable.tsx
|
|
727
732
|
import * as React22 from "react";
|
|
728
733
|
import { GripVerticalIcon } from "@elementor/icons";
|
|
@@ -907,8 +912,8 @@ var Repeater = ({
|
|
|
907
912
|
RepeaterItem,
|
|
908
913
|
{
|
|
909
914
|
disabled: value?.disabled,
|
|
910
|
-
label: /* @__PURE__ */ React23.createElement(itemSettings.Label, { value }),
|
|
911
|
-
startIcon: /* @__PURE__ */ React23.createElement(itemSettings.Icon, { value }),
|
|
915
|
+
label: /* @__PURE__ */ React23.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React23.createElement(itemSettings.Label, { value })),
|
|
916
|
+
startIcon: /* @__PURE__ */ React23.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React23.createElement(itemSettings.Icon, { value })),
|
|
912
917
|
removeItem: () => removeRepeaterItem(index),
|
|
913
918
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
914
919
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -1002,7 +1007,7 @@ var BoxShadowRepeaterControl = createControl(() => {
|
|
|
1002
1007
|
}
|
|
1003
1008
|
));
|
|
1004
1009
|
});
|
|
1005
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */ React24.createElement(UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color
|
|
1010
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React24.createElement(UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
|
|
1006
1011
|
var ItemContent = ({ anchorEl, bind }) => {
|
|
1007
1012
|
return /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(Content, { anchorEl }));
|
|
1008
1013
|
};
|
|
@@ -1084,20 +1089,50 @@ var initialShadow = {
|
|
|
1084
1089
|
};
|
|
1085
1090
|
|
|
1086
1091
|
// src/controls/toggle-control.tsx
|
|
1087
|
-
import * as
|
|
1092
|
+
import * as React27 from "react";
|
|
1088
1093
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
1089
1094
|
|
|
1090
1095
|
// src/components/control-toggle-button-group.tsx
|
|
1091
|
-
import * as
|
|
1096
|
+
import * as React26 from "react";
|
|
1097
|
+
import { useEffect as useEffect3, useMemo, useRef, useState as useState4 } from "react";
|
|
1098
|
+
import { ChevronDownIcon } from "@elementor/icons";
|
|
1092
1099
|
import {
|
|
1100
|
+
ListItemText,
|
|
1101
|
+
Menu as Menu2,
|
|
1102
|
+
MenuItem,
|
|
1093
1103
|
styled as styled3,
|
|
1094
1104
|
ToggleButton,
|
|
1095
1105
|
ToggleButtonGroup,
|
|
1096
|
-
|
|
1106
|
+
Typography as Typography2,
|
|
1097
1107
|
useTheme
|
|
1098
1108
|
} from "@elementor/ui";
|
|
1109
|
+
|
|
1110
|
+
// src/components/conditional-tooltip.tsx
|
|
1111
|
+
import * as React25 from "react";
|
|
1112
|
+
import { Tooltip as Tooltip2 } from "@elementor/ui";
|
|
1113
|
+
var ConditionalTooltip = ({
|
|
1114
|
+
showTooltip,
|
|
1115
|
+
children,
|
|
1116
|
+
label
|
|
1117
|
+
}) => {
|
|
1118
|
+
return showTooltip && label ? /* @__PURE__ */ React25.createElement(Tooltip2, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
// src/components/control-toggle-button-group.tsx
|
|
1099
1122
|
var StyledToggleButtonGroup = styled3(ToggleButtonGroup)`
|
|
1100
1123
|
${({ justify }) => `justify-content: ${justify};`}
|
|
1124
|
+
button:not( :last-of-type ) {
|
|
1125
|
+
border-start-end-radius: 0;
|
|
1126
|
+
border-end-end-radius: 0;
|
|
1127
|
+
}
|
|
1128
|
+
button:not( :first-of-type ) {
|
|
1129
|
+
border-start-start-radius: 0;
|
|
1130
|
+
border-end-start-radius: 0;
|
|
1131
|
+
}
|
|
1132
|
+
button:last-of-type {
|
|
1133
|
+
border-start-end-radius: 8px;
|
|
1134
|
+
border-end-end-radius: 8px;
|
|
1135
|
+
}
|
|
1101
1136
|
`;
|
|
1102
1137
|
var ControlToggleButtonGroup = ({
|
|
1103
1138
|
justify = "end",
|
|
@@ -1105,14 +1140,24 @@ var ControlToggleButtonGroup = ({
|
|
|
1105
1140
|
value,
|
|
1106
1141
|
onChange,
|
|
1107
1142
|
items,
|
|
1143
|
+
maxItems,
|
|
1108
1144
|
exclusive = false,
|
|
1109
1145
|
fullWidth = false
|
|
1110
1146
|
}) => {
|
|
1147
|
+
const shouldSliceItems = exclusive && maxItems !== void 0 && items.length > maxItems;
|
|
1148
|
+
const menuItems = shouldSliceItems ? items.slice(maxItems - 1) : [];
|
|
1149
|
+
const fixedItems = shouldSliceItems ? items.slice(0, maxItems - 1) : items;
|
|
1111
1150
|
const isRtl = "rtl" === useTheme().direction;
|
|
1112
1151
|
const handleChange = (_, newValue) => {
|
|
1113
1152
|
onChange(newValue);
|
|
1114
1153
|
};
|
|
1115
|
-
|
|
1154
|
+
const getGridTemplateColumns = useMemo(() => {
|
|
1155
|
+
const isOffLimits = menuItems?.length;
|
|
1156
|
+
const itemsCount = isOffLimits ? fixedItems.length + 1 : fixedItems.length;
|
|
1157
|
+
const templateColumnsSuffix = isOffLimits ? "auto" : "";
|
|
1158
|
+
return `repeat(${itemsCount}, minmax(0, 25%)) ${templateColumnsSuffix}`;
|
|
1159
|
+
}, [menuItems?.length, fixedItems.length]);
|
|
1160
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
1116
1161
|
StyledToggleButtonGroup,
|
|
1117
1162
|
{
|
|
1118
1163
|
justify,
|
|
@@ -1122,24 +1167,119 @@ var ControlToggleButtonGroup = ({
|
|
|
1122
1167
|
sx: {
|
|
1123
1168
|
direction: isRtl ? "rtl /* @noflip */" : "ltr /* @noflip */",
|
|
1124
1169
|
display: "grid",
|
|
1125
|
-
gridTemplateColumns:
|
|
1170
|
+
gridTemplateColumns: getGridTemplateColumns,
|
|
1126
1171
|
width: `100%`
|
|
1127
1172
|
}
|
|
1128
1173
|
},
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1174
|
+
fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => /* @__PURE__ */ React26.createElement(
|
|
1175
|
+
ConditionalTooltip,
|
|
1176
|
+
{
|
|
1177
|
+
key: buttonValue,
|
|
1178
|
+
label,
|
|
1179
|
+
showTooltip: showTooltip || false
|
|
1180
|
+
},
|
|
1181
|
+
/* @__PURE__ */ React26.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React26.createElement(Content3, { size }))
|
|
1182
|
+
)),
|
|
1183
|
+
menuItems.length && exclusive && /* @__PURE__ */ React26.createElement(
|
|
1184
|
+
SplitButtonGroup,
|
|
1185
|
+
{
|
|
1186
|
+
size,
|
|
1187
|
+
value: value || null,
|
|
1188
|
+
onChange,
|
|
1189
|
+
items: menuItems,
|
|
1190
|
+
fullWidth
|
|
1191
|
+
}
|
|
1141
1192
|
)
|
|
1193
|
+
));
|
|
1194
|
+
};
|
|
1195
|
+
var SplitButtonGroup = ({
|
|
1196
|
+
size = "tiny",
|
|
1197
|
+
onChange,
|
|
1198
|
+
items,
|
|
1199
|
+
fullWidth,
|
|
1200
|
+
value
|
|
1201
|
+
}) => {
|
|
1202
|
+
const previewButton = usePreviewButton(items, value);
|
|
1203
|
+
const [isMenuOpen, setIsMenuOpen] = useState4(false);
|
|
1204
|
+
const menuButtonRef = useRef(null);
|
|
1205
|
+
const onMenuToggle = (ev) => {
|
|
1206
|
+
setIsMenuOpen((prev) => !prev);
|
|
1207
|
+
ev.preventDefault();
|
|
1208
|
+
};
|
|
1209
|
+
const onMenuItemClick = (newValue) => {
|
|
1210
|
+
setIsMenuOpen(false);
|
|
1211
|
+
onToggleItem(newValue);
|
|
1212
|
+
};
|
|
1213
|
+
const onToggleItem = (newValue) => {
|
|
1214
|
+
const shouldRemove = newValue === value;
|
|
1215
|
+
onChange(shouldRemove ? null : newValue);
|
|
1216
|
+
};
|
|
1217
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
1218
|
+
ToggleButton,
|
|
1219
|
+
{
|
|
1220
|
+
value: previewButton.value,
|
|
1221
|
+
"aria-label": previewButton.label,
|
|
1222
|
+
size,
|
|
1223
|
+
fullWidth,
|
|
1224
|
+
onClick: (ev) => {
|
|
1225
|
+
ev.preventDefault();
|
|
1226
|
+
onMenuItemClick(previewButton.value);
|
|
1227
|
+
},
|
|
1228
|
+
ref: menuButtonRef
|
|
1229
|
+
},
|
|
1230
|
+
previewButton.renderContent({ size })
|
|
1231
|
+
), /* @__PURE__ */ React26.createElement(
|
|
1232
|
+
ToggleButton,
|
|
1233
|
+
{
|
|
1234
|
+
size,
|
|
1235
|
+
"aria-expanded": isMenuOpen ? "true" : void 0,
|
|
1236
|
+
"aria-haspopup": "menu",
|
|
1237
|
+
"aria-pressed": void 0,
|
|
1238
|
+
onClick: onMenuToggle,
|
|
1239
|
+
ref: menuButtonRef,
|
|
1240
|
+
value: "__chevron-icon-button__"
|
|
1241
|
+
},
|
|
1242
|
+
/* @__PURE__ */ React26.createElement(ChevronDownIcon, { fontSize: size })
|
|
1243
|
+
), /* @__PURE__ */ React26.createElement(
|
|
1244
|
+
Menu2,
|
|
1245
|
+
{
|
|
1246
|
+
open: isMenuOpen,
|
|
1247
|
+
onClose: () => setIsMenuOpen(false),
|
|
1248
|
+
anchorEl: menuButtonRef.current,
|
|
1249
|
+
anchorOrigin: {
|
|
1250
|
+
vertical: "bottom",
|
|
1251
|
+
horizontal: "right"
|
|
1252
|
+
},
|
|
1253
|
+
transformOrigin: {
|
|
1254
|
+
vertical: "top",
|
|
1255
|
+
horizontal: "right"
|
|
1256
|
+
},
|
|
1257
|
+
sx: {
|
|
1258
|
+
mt: 0.5
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React26.createElement(
|
|
1262
|
+
MenuItem,
|
|
1263
|
+
{
|
|
1264
|
+
key: buttonValue,
|
|
1265
|
+
selected: buttonValue === value,
|
|
1266
|
+
onClick: () => onMenuItemClick(buttonValue)
|
|
1267
|
+
},
|
|
1268
|
+
/* @__PURE__ */ React26.createElement(ListItemText, null, /* @__PURE__ */ React26.createElement(Typography2, { sx: { fontSize: "14px" } }, label))
|
|
1269
|
+
))
|
|
1270
|
+
));
|
|
1271
|
+
};
|
|
1272
|
+
var usePreviewButton = (items, value) => {
|
|
1273
|
+
const [previewButton, setPreviewButton] = useState4(
|
|
1274
|
+
items.find((item) => item.value === value) ?? items[0]
|
|
1142
1275
|
);
|
|
1276
|
+
useEffect3(() => {
|
|
1277
|
+
const selectedButton = items.find((item) => item.value === value);
|
|
1278
|
+
if (selectedButton) {
|
|
1279
|
+
setPreviewButton(selectedButton);
|
|
1280
|
+
}
|
|
1281
|
+
}, [items, value]);
|
|
1282
|
+
return previewButton;
|
|
1143
1283
|
};
|
|
1144
1284
|
|
|
1145
1285
|
// src/controls/toggle-control.tsx
|
|
@@ -1148,7 +1288,8 @@ var ToggleControl = createControl(
|
|
|
1148
1288
|
options,
|
|
1149
1289
|
fullWidth = false,
|
|
1150
1290
|
size = "tiny",
|
|
1151
|
-
exclusive = true
|
|
1291
|
+
exclusive = true,
|
|
1292
|
+
maxItems
|
|
1152
1293
|
}) => {
|
|
1153
1294
|
const { value, setValue, placeholder } = useBoundProp(stringPropTypeUtil5);
|
|
1154
1295
|
const exclusiveValues = options.filter((option) => option.exclusive).map((option) => option.value);
|
|
@@ -1160,10 +1301,11 @@ var ToggleControl = createControl(
|
|
|
1160
1301
|
};
|
|
1161
1302
|
const toggleButtonGroupProps = {
|
|
1162
1303
|
items: options,
|
|
1304
|
+
maxItems,
|
|
1163
1305
|
fullWidth,
|
|
1164
1306
|
size
|
|
1165
1307
|
};
|
|
1166
|
-
return exclusive ? /* @__PURE__ */
|
|
1308
|
+
return exclusive ? /* @__PURE__ */ React27.createElement(
|
|
1167
1309
|
ControlToggleButtonGroup,
|
|
1168
1310
|
{
|
|
1169
1311
|
...toggleButtonGroupProps,
|
|
@@ -1171,7 +1313,7 @@ var ToggleControl = createControl(
|
|
|
1171
1313
|
onChange: setValue,
|
|
1172
1314
|
exclusive: true
|
|
1173
1315
|
}
|
|
1174
|
-
) : /* @__PURE__ */
|
|
1316
|
+
) : /* @__PURE__ */ React27.createElement(
|
|
1175
1317
|
ControlToggleButtonGroup,
|
|
1176
1318
|
{
|
|
1177
1319
|
...toggleButtonGroupProps,
|
|
@@ -1184,7 +1326,7 @@ var ToggleControl = createControl(
|
|
|
1184
1326
|
);
|
|
1185
1327
|
|
|
1186
1328
|
// src/controls/number-control.tsx
|
|
1187
|
-
import * as
|
|
1329
|
+
import * as React28 from "react";
|
|
1188
1330
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
1189
1331
|
import { TextField as TextField4 } from "@elementor/ui";
|
|
1190
1332
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
@@ -1207,7 +1349,7 @@ var NumberControl = createControl(
|
|
|
1207
1349
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
1208
1350
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
1209
1351
|
};
|
|
1210
|
-
return /* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ React28.createElement(ControlActions, null, /* @__PURE__ */ React28.createElement(
|
|
1211
1353
|
TextField4,
|
|
1212
1354
|
{
|
|
1213
1355
|
size: "tiny",
|
|
@@ -1228,17 +1370,17 @@ var NumberControl = createControl(
|
|
|
1228
1370
|
);
|
|
1229
1371
|
|
|
1230
1372
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
1231
|
-
import * as
|
|
1232
|
-
import { useId as useId2, useRef } from "react";
|
|
1373
|
+
import * as React30 from "react";
|
|
1374
|
+
import { useId as useId2, useRef as useRef2 } from "react";
|
|
1233
1375
|
import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
1234
1376
|
import { bindPopover as bindPopover2, bindToggle, Grid as Grid5, Popover as Popover2, Stack as Stack7, ToggleButton as ToggleButton2, Tooltip as Tooltip3, usePopupState as usePopupState3 } from "@elementor/ui";
|
|
1235
1377
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1236
1378
|
|
|
1237
1379
|
// src/components/control-label.tsx
|
|
1238
|
-
import * as
|
|
1380
|
+
import * as React29 from "react";
|
|
1239
1381
|
import { Stack as Stack6 } from "@elementor/ui";
|
|
1240
1382
|
var ControlLabel = ({ children }) => {
|
|
1241
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ React29.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React29.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React29.createElement(ControlAdornments, null));
|
|
1242
1384
|
};
|
|
1243
1385
|
|
|
1244
1386
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
@@ -1260,7 +1402,7 @@ function EqualUnequalSizesControl({
|
|
|
1260
1402
|
multiSizePropTypeUtil
|
|
1261
1403
|
}) {
|
|
1262
1404
|
const popupId = useId2();
|
|
1263
|
-
const controlRef =
|
|
1405
|
+
const controlRef = useRef2(null);
|
|
1264
1406
|
const popupState = usePopupState3({ variant: "popover", popupId });
|
|
1265
1407
|
const {
|
|
1266
1408
|
propType: multiSizePropType,
|
|
@@ -1295,7 +1437,7 @@ function EqualUnequalSizesControl({
|
|
|
1295
1437
|
return splitEqualValue() ?? null;
|
|
1296
1438
|
};
|
|
1297
1439
|
const isMixed = !!multiSizeValue;
|
|
1298
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel, null, label)), /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React30.createElement(SizeControl, { placeholder: isMixed ? __6("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React30.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React30.createElement(
|
|
1299
1441
|
ToggleButton2,
|
|
1300
1442
|
{
|
|
1301
1443
|
size: "tiny",
|
|
@@ -1306,7 +1448,7 @@ function EqualUnequalSizesControl({
|
|
|
1306
1448
|
"aria-label": tooltipLabel
|
|
1307
1449
|
},
|
|
1308
1450
|
icon
|
|
1309
|
-
))))), /* @__PURE__ */
|
|
1451
|
+
))))), /* @__PURE__ */ React30.createElement(
|
|
1310
1452
|
Popover2,
|
|
1311
1453
|
{
|
|
1312
1454
|
disablePortal: true,
|
|
@@ -1324,13 +1466,13 @@ function EqualUnequalSizesControl({
|
|
|
1324
1466
|
paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1325
1467
|
}
|
|
1326
1468
|
},
|
|
1327
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ React30.createElement(PropProvider, { propType: multiSizePropType, value: getMultiSizeValues(), setValue: setNestedProp }, /* @__PURE__ */ React30.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React30.createElement(PopoverGridContainer, null, /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[0] }), /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[1] })), /* @__PURE__ */ React30.createElement(PopoverGridContainer, null, /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[2] }), /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[3] }))))
|
|
1328
1470
|
));
|
|
1329
1471
|
}
|
|
1330
|
-
var MultiSizeValueControl = ({ item }) => /* @__PURE__ */
|
|
1472
|
+
var MultiSizeValueControl = ({ item }) => /* @__PURE__ */ React30.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(Grid5, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(SizeControl, { startIcon: item.icon })))));
|
|
1331
1473
|
|
|
1332
1474
|
// src/controls/linked-dimensions-control.tsx
|
|
1333
|
-
import * as
|
|
1475
|
+
import * as React31 from "react";
|
|
1334
1476
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
1335
1477
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1336
1478
|
import { Grid as Grid6, Stack as Stack8, ToggleButton as ToggleButton3, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
@@ -1365,7 +1507,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1365
1507
|
const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
|
|
1366
1508
|
const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1367
1509
|
const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1368
|
-
return /* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ React31.createElement(PropProvider, { propType, value: dimensionsValue, setValue: setDimensionsValue }, /* @__PURE__ */ React31.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(ControlLabel, null, label), /* @__PURE__ */ React31.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React31.createElement(
|
|
1369
1511
|
ToggleButton3,
|
|
1370
1512
|
{
|
|
1371
1513
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1375,36 +1517,36 @@ var LinkedDimensionsControl = createControl(
|
|
|
1375
1517
|
sx: { marginLeft: "auto" },
|
|
1376
1518
|
onChange: onLinkToggle
|
|
1377
1519
|
},
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
))), /* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ React31.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1521
|
+
))), /* @__PURE__ */ React31.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, __7("Top", "elementor"))), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1380
1522
|
Control3,
|
|
1381
1523
|
{
|
|
1382
1524
|
bind: "block-start",
|
|
1383
|
-
startIcon: /* @__PURE__ */
|
|
1525
|
+
startIcon: /* @__PURE__ */ React31.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1384
1526
|
isLinked,
|
|
1385
1527
|
extendedValues
|
|
1386
1528
|
}
|
|
1387
|
-
))), /* @__PURE__ */
|
|
1529
|
+
))), /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, isSiteRtl ? __7("Left", "elementor") : __7("Right", "elementor"))), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1388
1530
|
Control3,
|
|
1389
1531
|
{
|
|
1390
1532
|
bind: "inline-end",
|
|
1391
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1533
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1392
1534
|
isLinked,
|
|
1393
1535
|
extendedValues
|
|
1394
1536
|
}
|
|
1395
|
-
)))), /* @__PURE__ */
|
|
1537
|
+
)))), /* @__PURE__ */ React31.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, __7("Bottom", "elementor"))), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1396
1538
|
Control3,
|
|
1397
1539
|
{
|
|
1398
1540
|
bind: "block-end",
|
|
1399
|
-
startIcon: /* @__PURE__ */
|
|
1541
|
+
startIcon: /* @__PURE__ */ React31.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1400
1542
|
isLinked,
|
|
1401
1543
|
extendedValues
|
|
1402
1544
|
}
|
|
1403
|
-
))), /* @__PURE__ */
|
|
1545
|
+
))), /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, isSiteRtl ? __7("Right", "elementor") : __7("Left", "elementor"))), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1404
1546
|
Control3,
|
|
1405
1547
|
{
|
|
1406
1548
|
bind: "inline-start",
|
|
1407
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1549
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
1408
1550
|
isLinked,
|
|
1409
1551
|
extendedValues
|
|
1410
1552
|
}
|
|
@@ -1418,16 +1560,16 @@ var Control3 = ({
|
|
|
1418
1560
|
extendedValues
|
|
1419
1561
|
}) => {
|
|
1420
1562
|
if (isLinked) {
|
|
1421
|
-
return /* @__PURE__ */
|
|
1563
|
+
return /* @__PURE__ */ React31.createElement(SizeControl, { startIcon, extendedValues });
|
|
1422
1564
|
}
|
|
1423
|
-
return /* @__PURE__ */
|
|
1565
|
+
return /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React31.createElement(SizeControl, { startIcon, extendedValues }));
|
|
1424
1566
|
};
|
|
1425
1567
|
|
|
1426
1568
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1427
|
-
import * as
|
|
1428
|
-
import { useEffect as
|
|
1569
|
+
import * as React32 from "react";
|
|
1570
|
+
import { useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
|
|
1429
1571
|
import { stringPropTypeUtil as stringPropTypeUtil6 } from "@elementor/editor-props";
|
|
1430
|
-
import { ChevronDownIcon, SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1572
|
+
import { ChevronDownIcon as ChevronDownIcon2, SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1431
1573
|
import {
|
|
1432
1574
|
bindPopover as bindPopover3,
|
|
1433
1575
|
bindTrigger as bindTrigger3,
|
|
@@ -1442,7 +1584,7 @@ import {
|
|
|
1442
1584
|
Stack as Stack9,
|
|
1443
1585
|
styled as styled4,
|
|
1444
1586
|
TextField as TextField5,
|
|
1445
|
-
Typography as
|
|
1587
|
+
Typography as Typography3,
|
|
1446
1588
|
UnstableTag as UnstableTag2,
|
|
1447
1589
|
usePopupState as usePopupState4
|
|
1448
1590
|
} from "@elementor/ui";
|
|
@@ -1475,7 +1617,7 @@ var enqueueFont = (fontFamily, context = "editor") => {
|
|
|
1475
1617
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1476
1618
|
var SIZE2 = "tiny";
|
|
1477
1619
|
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1478
|
-
const [searchValue, setSearchValue] =
|
|
1620
|
+
const [searchValue, setSearchValue] = useState5("");
|
|
1479
1621
|
const { value: fontFamily, setValue: setFontFamily } = useBoundProp(stringPropTypeUtil6);
|
|
1480
1622
|
const popoverState = usePopupState4({ variant: "popover" });
|
|
1481
1623
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
@@ -1486,16 +1628,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1486
1628
|
setSearchValue("");
|
|
1487
1629
|
popoverState.close();
|
|
1488
1630
|
};
|
|
1489
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(ControlActions, null, /* @__PURE__ */ React32.createElement(
|
|
1490
1632
|
UnstableTag2,
|
|
1491
1633
|
{
|
|
1492
1634
|
variant: "outlined",
|
|
1493
1635
|
label: fontFamily,
|
|
1494
|
-
endIcon: /* @__PURE__ */
|
|
1636
|
+
endIcon: /* @__PURE__ */ React32.createElement(ChevronDownIcon2, { fontSize: "tiny" }),
|
|
1495
1637
|
...bindTrigger3(popoverState),
|
|
1496
1638
|
fullWidth: true
|
|
1497
1639
|
}
|
|
1498
|
-
), /* @__PURE__ */
|
|
1640
|
+
)), /* @__PURE__ */ React32.createElement(
|
|
1499
1641
|
Popover3,
|
|
1500
1642
|
{
|
|
1501
1643
|
disablePortal: true,
|
|
@@ -1504,7 +1646,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1504
1646
|
...bindPopover3(popoverState),
|
|
1505
1647
|
onClose: handleClose
|
|
1506
1648
|
},
|
|
1507
|
-
/* @__PURE__ */
|
|
1649
|
+
/* @__PURE__ */ React32.createElement(Stack9, null, /* @__PURE__ */ React32.createElement(Stack9, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React32.createElement(TextIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React32.createElement(Typography3, { variant: "subtitle2" }, __8("Font Family", "elementor")), /* @__PURE__ */ React32.createElement(IconButton2, { size: SIZE2, sx: { ml: "auto" }, onClick: handleClose }, /* @__PURE__ */ React32.createElement(XIcon2, { fontSize: SIZE2 }))), /* @__PURE__ */ React32.createElement(Box2, { px: 1.5, pb: 1 }, /* @__PURE__ */ React32.createElement(
|
|
1508
1650
|
TextField5,
|
|
1509
1651
|
{
|
|
1510
1652
|
autoFocus: true,
|
|
@@ -1514,10 +1656,10 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1514
1656
|
placeholder: __8("Search", "elementor"),
|
|
1515
1657
|
onChange: handleSearch,
|
|
1516
1658
|
InputProps: {
|
|
1517
|
-
startAdornment: /* @__PURE__ */
|
|
1659
|
+
startAdornment: /* @__PURE__ */ React32.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React32.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1518
1660
|
}
|
|
1519
1661
|
}
|
|
1520
|
-
)), /* @__PURE__ */
|
|
1662
|
+
)), /* @__PURE__ */ React32.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React32.createElement(
|
|
1521
1663
|
FontList,
|
|
1522
1664
|
{
|
|
1523
1665
|
fontListItems: filteredFontFamilies,
|
|
@@ -1525,8 +1667,8 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1525
1667
|
handleClose,
|
|
1526
1668
|
fontFamily
|
|
1527
1669
|
}
|
|
1528
|
-
) : /* @__PURE__ */
|
|
1529
|
-
|
|
1670
|
+
) : /* @__PURE__ */ React32.createElement(Box2, { sx: { overflowY: "auto", height: 260, width: 220 } }, /* @__PURE__ */ React32.createElement(Stack9, { alignItems: "center", p: 2.5, gap: 1.5, overflow: "hidden" }, /* @__PURE__ */ React32.createElement(TextIcon, { fontSize: "large" }), /* @__PURE__ */ React32.createElement(Box2, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "subtitle2", color: "text.secondary" }, __8("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React32.createElement(
|
|
1671
|
+
Typography3,
|
|
1530
1672
|
{
|
|
1531
1673
|
variant: "subtitle2",
|
|
1532
1674
|
color: "text.secondary",
|
|
@@ -1536,16 +1678,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1536
1678
|
justifyContent: "center"
|
|
1537
1679
|
}
|
|
1538
1680
|
},
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201C"),
|
|
1682
|
+
/* @__PURE__ */ React32.createElement(
|
|
1541
1683
|
"span",
|
|
1542
1684
|
{
|
|
1543
1685
|
style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
1544
1686
|
},
|
|
1545
1687
|
searchValue
|
|
1546
1688
|
),
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
)), /* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201D.")
|
|
1690
|
+
)), /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React32.createElement(
|
|
1549
1691
|
Link,
|
|
1550
1692
|
{
|
|
1551
1693
|
color: "secondary",
|
|
@@ -1560,7 +1702,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1560
1702
|
var LIST_ITEM_HEIGHT = 36;
|
|
1561
1703
|
var LIST_ITEMS_BUFFER = 6;
|
|
1562
1704
|
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
1563
|
-
const containerRef =
|
|
1705
|
+
const containerRef = useRef3(null);
|
|
1564
1706
|
const selectedItem = fontListItems.find((item) => item.value === fontFamily);
|
|
1565
1707
|
const debouncedVirtualizeChange = useDebounce(({ getVirtualIndexes }) => {
|
|
1566
1708
|
getVirtualIndexes().forEach((index) => {
|
|
@@ -1577,7 +1719,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1577
1719
|
overscan: LIST_ITEMS_BUFFER,
|
|
1578
1720
|
onChange: debouncedVirtualizeChange
|
|
1579
1721
|
});
|
|
1580
|
-
|
|
1722
|
+
useEffect4(
|
|
1581
1723
|
() => {
|
|
1582
1724
|
virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
|
|
1583
1725
|
},
|
|
@@ -1585,7 +1727,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1585
1727
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1586
1728
|
[fontFamily]
|
|
1587
1729
|
);
|
|
1588
|
-
return /* @__PURE__ */
|
|
1730
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1589
1731
|
Box2,
|
|
1590
1732
|
{
|
|
1591
1733
|
ref: containerRef,
|
|
@@ -1595,7 +1737,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1595
1737
|
width: 220
|
|
1596
1738
|
}
|
|
1597
1739
|
},
|
|
1598
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ React32.createElement(
|
|
1599
1741
|
StyledMenuList,
|
|
1600
1742
|
{
|
|
1601
1743
|
role: "listbox",
|
|
@@ -1611,7 +1753,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1611
1753
|
const isSelected = selectedItem?.value === item.value;
|
|
1612
1754
|
const tabIndexFallback = !selectedItem ? 0 : -1;
|
|
1613
1755
|
if (item.type === "category") {
|
|
1614
|
-
return /* @__PURE__ */
|
|
1756
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1615
1757
|
MenuSubheader,
|
|
1616
1758
|
{
|
|
1617
1759
|
key: virtualRow.key,
|
|
@@ -1622,7 +1764,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1622
1764
|
item.value
|
|
1623
1765
|
);
|
|
1624
1766
|
}
|
|
1625
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1626
1768
|
"li",
|
|
1627
1769
|
{
|
|
1628
1770
|
key: virtualRow.key,
|
|
@@ -1685,19 +1827,19 @@ var StyledMenuList = styled4(MenuList)(({ theme }) => ({
|
|
|
1685
1827
|
position: "relative"
|
|
1686
1828
|
}));
|
|
1687
1829
|
var useDebounce = (fn, delay) => {
|
|
1688
|
-
const [debouncedFn] =
|
|
1689
|
-
|
|
1830
|
+
const [debouncedFn] = useState5(() => debounce(fn, delay));
|
|
1831
|
+
useEffect4(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
1690
1832
|
return debouncedFn;
|
|
1691
1833
|
};
|
|
1692
1834
|
|
|
1693
1835
|
// src/controls/url-control.tsx
|
|
1694
|
-
import * as
|
|
1836
|
+
import * as React33 from "react";
|
|
1695
1837
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
1696
1838
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1697
1839
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1698
1840
|
const { value, setValue } = useBoundProp(urlPropTypeUtil);
|
|
1699
1841
|
const handleChange = (event) => setValue(event.target.value);
|
|
1700
|
-
return /* @__PURE__ */
|
|
1842
|
+
return /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(
|
|
1701
1843
|
TextField6,
|
|
1702
1844
|
{
|
|
1703
1845
|
size: "tiny",
|
|
@@ -1710,8 +1852,8 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1710
1852
|
});
|
|
1711
1853
|
|
|
1712
1854
|
// src/controls/link-control.tsx
|
|
1713
|
-
import * as
|
|
1714
|
-
import { useMemo, useState as
|
|
1855
|
+
import * as React35 from "react";
|
|
1856
|
+
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
1715
1857
|
import { getLinkInLinkRestriction, selectElement } from "@elementor/editor-elements";
|
|
1716
1858
|
import {
|
|
1717
1859
|
booleanPropTypeUtil,
|
|
@@ -1729,7 +1871,7 @@ import { debounce as debounce2 } from "@elementor/utils";
|
|
|
1729
1871
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1730
1872
|
|
|
1731
1873
|
// src/components/autocomplete.tsx
|
|
1732
|
-
import * as
|
|
1874
|
+
import * as React34 from "react";
|
|
1733
1875
|
import { forwardRef as forwardRef2 } from "react";
|
|
1734
1876
|
import { XIcon as XIcon3 } from "@elementor/icons";
|
|
1735
1877
|
import {
|
|
@@ -1755,7 +1897,7 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1755
1897
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
1756
1898
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
1757
1899
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
1758
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1759
1901
|
AutocompleteBase,
|
|
1760
1902
|
{
|
|
1761
1903
|
...restProps,
|
|
@@ -1773,8 +1915,8 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1773
1915
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
1774
1916
|
isOptionEqualToValue,
|
|
1775
1917
|
filterOptions: () => optionKeys,
|
|
1776
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
1777
|
-
renderInput: (params) => /* @__PURE__ */
|
|
1918
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React34.createElement(Box3, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
1919
|
+
renderInput: (params) => /* @__PURE__ */ React34.createElement(
|
|
1778
1920
|
TextInput,
|
|
1779
1921
|
{
|
|
1780
1922
|
params,
|
|
@@ -1797,7 +1939,7 @@ var TextInput = ({
|
|
|
1797
1939
|
const onChange = (event) => {
|
|
1798
1940
|
handleChange(event.target.value);
|
|
1799
1941
|
};
|
|
1800
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1801
1943
|
TextField7,
|
|
1802
1944
|
{
|
|
1803
1945
|
...params,
|
|
@@ -1810,7 +1952,7 @@ var TextInput = ({
|
|
|
1810
1952
|
},
|
|
1811
1953
|
InputProps: {
|
|
1812
1954
|
...params.InputProps,
|
|
1813
|
-
endAdornment: /* @__PURE__ */
|
|
1955
|
+
endAdornment: /* @__PURE__ */ React34.createElement(ClearButton, { params, allowClear, handleChange })
|
|
1814
1956
|
}
|
|
1815
1957
|
}
|
|
1816
1958
|
);
|
|
@@ -1819,7 +1961,7 @@ var ClearButton = ({
|
|
|
1819
1961
|
allowClear,
|
|
1820
1962
|
handleChange,
|
|
1821
1963
|
params
|
|
1822
|
-
}) => /* @__PURE__ */
|
|
1964
|
+
}) => /* @__PURE__ */ React34.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React34.createElement(IconButton3, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React34.createElement(XIcon3, { fontSize: params.size })));
|
|
1823
1965
|
function findMatchingOption(options, optionId = null) {
|
|
1824
1966
|
const formattedOption = (optionId || "").toString();
|
|
1825
1967
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -1849,7 +1991,7 @@ var learnMoreButton = {
|
|
|
1849
1991
|
var LinkControl = createControl((props) => {
|
|
1850
1992
|
const { value, path, setValue, ...propContext } = useBoundProp(linkPropTypeUtil);
|
|
1851
1993
|
const [linkSessionValue, setLinkSessionValue] = useSessionStorage(path.join("/"));
|
|
1852
|
-
const [isActive, setIsActive] =
|
|
1994
|
+
const [isActive, setIsActive] = useState6(!!value);
|
|
1853
1995
|
const {
|
|
1854
1996
|
allowCustomValues,
|
|
1855
1997
|
queryOptions: { endpoint = "", requestParams = {} },
|
|
@@ -1857,8 +1999,8 @@ var LinkControl = createControl((props) => {
|
|
|
1857
1999
|
minInputLength = 2,
|
|
1858
2000
|
context: { elementId }
|
|
1859
2001
|
} = props || {};
|
|
1860
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] =
|
|
1861
|
-
const [options, setOptions] =
|
|
2002
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = useState6(getLinkInLinkRestriction(elementId));
|
|
2003
|
+
const [options, setOptions] = useState6(
|
|
1862
2004
|
generateFirstLoadedOption(value)
|
|
1863
2005
|
);
|
|
1864
2006
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
@@ -1909,7 +2051,7 @@ var LinkControl = createControl((props) => {
|
|
|
1909
2051
|
}
|
|
1910
2052
|
debounceFetch({ ...requestParams, term: newValue });
|
|
1911
2053
|
};
|
|
1912
|
-
const debounceFetch =
|
|
2054
|
+
const debounceFetch = useMemo2(
|
|
1913
2055
|
() => debounce2(
|
|
1914
2056
|
(params) => fetchOptions(endpoint, params).then((newOptions) => {
|
|
1915
2057
|
setOptions(formatOptions(newOptions));
|
|
@@ -1918,7 +2060,7 @@ var LinkControl = createControl((props) => {
|
|
|
1918
2060
|
),
|
|
1919
2061
|
[endpoint]
|
|
1920
2062
|
);
|
|
1921
|
-
return /* @__PURE__ */
|
|
2063
|
+
return /* @__PURE__ */ React35.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React35.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React35.createElement(
|
|
1922
2064
|
Stack10,
|
|
1923
2065
|
{
|
|
1924
2066
|
direction: "row",
|
|
@@ -1928,8 +2070,8 @@ var LinkControl = createControl((props) => {
|
|
|
1928
2070
|
marginInlineEnd: -0.75
|
|
1929
2071
|
}
|
|
1930
2072
|
},
|
|
1931
|
-
/* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
2073
|
+
/* @__PURE__ */ React35.createElement(ControlFormLabel, null, __9("Link", "elementor")),
|
|
2074
|
+
/* @__PURE__ */ React35.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React35.createElement(
|
|
1933
2075
|
ToggleIconControl,
|
|
1934
2076
|
{
|
|
1935
2077
|
disabled: shouldDisableAddingLink,
|
|
@@ -1938,7 +2080,7 @@ var LinkControl = createControl((props) => {
|
|
|
1938
2080
|
label: __9("Toggle link", "elementor")
|
|
1939
2081
|
}
|
|
1940
2082
|
))
|
|
1941
|
-
), /* @__PURE__ */
|
|
2083
|
+
), /* @__PURE__ */ React35.createElement(Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React35.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React35.createElement(ControlActions, null, /* @__PURE__ */ React35.createElement(
|
|
1942
2084
|
Autocomplete,
|
|
1943
2085
|
{
|
|
1944
2086
|
options,
|
|
@@ -1949,10 +2091,10 @@ var LinkControl = createControl((props) => {
|
|
|
1949
2091
|
onTextChange,
|
|
1950
2092
|
minInputLength
|
|
1951
2093
|
}
|
|
1952
|
-
))), /* @__PURE__ */
|
|
2094
|
+
))), /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React35.createElement(SwitchControl, { disabled: !value }))))));
|
|
1953
2095
|
});
|
|
1954
2096
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
1955
|
-
return /* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ React35.createElement(IconButton4, { size: SIZE3, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React35.createElement(MinusIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React35.createElement(PlusIcon2, { fontSize: SIZE3 }));
|
|
1956
2098
|
};
|
|
1957
2099
|
var SwitchControl = ({ disabled }) => {
|
|
1958
2100
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
@@ -1964,7 +2106,7 @@ var SwitchControl = ({ disabled }) => {
|
|
|
1964
2106
|
opacity: 0
|
|
1965
2107
|
}
|
|
1966
2108
|
} : {};
|
|
1967
|
-
return /* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ React35.createElement(Grid7, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React35.createElement(Grid7, { item: true }, /* @__PURE__ */ React35.createElement(ControlFormLabel, null, __9("Open in a new tab", "elementor"))), /* @__PURE__ */ React35.createElement(Grid7, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React35.createElement(Switch, { checked: value, onClick, disabled, inputProps })));
|
|
1968
2110
|
};
|
|
1969
2111
|
async function fetchOptions(ajaxUrl, params) {
|
|
1970
2112
|
if (!params || !ajaxUrl) {
|
|
@@ -2001,15 +2143,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2001
2143
|
selectElement(elementId);
|
|
2002
2144
|
}
|
|
2003
2145
|
};
|
|
2004
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2146
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React35.createElement(
|
|
2005
2147
|
Infotip,
|
|
2006
2148
|
{
|
|
2007
2149
|
placement: "right",
|
|
2008
|
-
content: /* @__PURE__ */
|
|
2150
|
+
content: /* @__PURE__ */ React35.createElement(
|
|
2009
2151
|
InfoTipCard,
|
|
2010
2152
|
{
|
|
2011
2153
|
content: INFOTIP_CONTENT[reason],
|
|
2012
|
-
svgIcon: /* @__PURE__ */
|
|
2154
|
+
svgIcon: /* @__PURE__ */ React35.createElement(AlertTriangleIcon, null),
|
|
2013
2155
|
learnMoreButton,
|
|
2014
2156
|
ctaButton: {
|
|
2015
2157
|
label: __9("Take me there", "elementor"),
|
|
@@ -2018,16 +2160,16 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2018
2160
|
}
|
|
2019
2161
|
)
|
|
2020
2162
|
},
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
) : /* @__PURE__ */
|
|
2163
|
+
/* @__PURE__ */ React35.createElement(Box4, null, children)
|
|
2164
|
+
) : /* @__PURE__ */ React35.createElement(React35.Fragment, null, children);
|
|
2023
2165
|
};
|
|
2024
2166
|
var INFOTIP_CONTENT = {
|
|
2025
|
-
descendant: /* @__PURE__ */
|
|
2026
|
-
ancestor: /* @__PURE__ */
|
|
2167
|
+
descendant: /* @__PURE__ */ React35.createElement(React35.Fragment, null, __9("To add a link to this container,", "elementor"), /* @__PURE__ */ React35.createElement("br", null), __9("first remove the link from the elements inside of it.", "elementor")),
|
|
2168
|
+
ancestor: /* @__PURE__ */ React35.createElement(React35.Fragment, null, __9("To add a link to this element,", "elementor"), /* @__PURE__ */ React35.createElement("br", null), __9("first remove the link from its parent container.", "elementor"))
|
|
2027
2169
|
};
|
|
2028
2170
|
|
|
2029
2171
|
// src/controls/gap-control.tsx
|
|
2030
|
-
import * as
|
|
2172
|
+
import * as React36 from "react";
|
|
2031
2173
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
2032
2174
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
2033
2175
|
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
@@ -2055,7 +2197,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2055
2197
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
2056
2198
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2057
2199
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2058
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ React36.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React36.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(ControlLabel, null, label), /* @__PURE__ */ React36.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React36.createElement(
|
|
2059
2201
|
ToggleButton4,
|
|
2060
2202
|
{
|
|
2061
2203
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2065,19 +2207,19 @@ var GapControl = createControl(({ label }) => {
|
|
|
2065
2207
|
sx: { marginLeft: "auto" },
|
|
2066
2208
|
onChange: onLinkToggle
|
|
2067
2209
|
},
|
|
2068
|
-
/* @__PURE__ */
|
|
2069
|
-
))), /* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ React36.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2211
|
+
))), /* @__PURE__ */ React36.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React36.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(ControlFormLabel, null, __10("Column", "elementor"))), /* @__PURE__ */ React36.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(Control4, { bind: "column", isLinked }))), /* @__PURE__ */ React36.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React36.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(ControlFormLabel, null, __10("Row", "elementor"))), /* @__PURE__ */ React36.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(Control4, { bind: "row", isLinked })))));
|
|
2070
2212
|
});
|
|
2071
2213
|
var Control4 = ({ bind, isLinked }) => {
|
|
2072
2214
|
if (isLinked) {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2215
|
+
return /* @__PURE__ */ React36.createElement(SizeControl, null);
|
|
2074
2216
|
}
|
|
2075
|
-
return /* @__PURE__ */
|
|
2217
|
+
return /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React36.createElement(SizeControl, null));
|
|
2076
2218
|
};
|
|
2077
2219
|
|
|
2078
2220
|
// src/controls/svg-media-control.tsx
|
|
2079
|
-
import * as
|
|
2080
|
-
import { useState as
|
|
2221
|
+
import * as React38 from "react";
|
|
2222
|
+
import { useState as useState8 } from "react";
|
|
2081
2223
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
2082
2224
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
2083
2225
|
import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack12, styled as styled5 } from "@elementor/ui";
|
|
@@ -2085,8 +2227,8 @@ import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWp
|
|
|
2085
2227
|
import { __ as __12 } from "@wordpress/i18n";
|
|
2086
2228
|
|
|
2087
2229
|
// src/components/enable-unfiltered-modal.tsx
|
|
2088
|
-
import * as
|
|
2089
|
-
import { useState as
|
|
2230
|
+
import * as React37 from "react";
|
|
2231
|
+
import { useState as useState7 } from "react";
|
|
2090
2232
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
2091
2233
|
import {
|
|
2092
2234
|
Button as Button3,
|
|
@@ -2119,7 +2261,7 @@ var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
|
|
|
2119
2261
|
var EnableUnfilteredModal = (props) => {
|
|
2120
2262
|
const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
|
|
2121
2263
|
const { canUser } = useCurrentUserCapabilities();
|
|
2122
|
-
const [isError, setIsError] =
|
|
2264
|
+
const [isError, setIsError] = useState7(false);
|
|
2123
2265
|
const canManageOptions = canUser("manage_options");
|
|
2124
2266
|
const onClose = (enabled) => {
|
|
2125
2267
|
props.onClose(enabled);
|
|
@@ -2138,9 +2280,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2138
2280
|
}
|
|
2139
2281
|
};
|
|
2140
2282
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2141
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2283
|
+
return canManageOptions ? /* @__PURE__ */ React37.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React37.createElement(NonAdminDialog, { ...dialogProps });
|
|
2142
2284
|
};
|
|
2143
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2285
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React37.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React37.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React37.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React37.createElement(Divider3, null), /* @__PURE__ */ React37.createElement(DialogContent, null, /* @__PURE__ */ React37.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React37.createElement(React37.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React37.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React37.createElement(DialogActions, null, /* @__PURE__ */ React37.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __11("Cancel", "elementor")), /* @__PURE__ */ React37.createElement(
|
|
2144
2286
|
Button3,
|
|
2145
2287
|
{
|
|
2146
2288
|
size: "medium",
|
|
@@ -2149,9 +2291,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2149
2291
|
color: "primary",
|
|
2150
2292
|
disabled: isPending
|
|
2151
2293
|
},
|
|
2152
|
-
isPending ? /* @__PURE__ */
|
|
2294
|
+
isPending ? /* @__PURE__ */ React37.createElement(CircularProgress2, { size: 24 }) : __11("Enable", "elementor")
|
|
2153
2295
|
)));
|
|
2154
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2296
|
+
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React37.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React37.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React37.createElement(DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React37.createElement(Divider3, null), /* @__PURE__ */ React37.createElement(DialogContent, null, /* @__PURE__ */ React37.createElement(DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React37.createElement(DialogActions, null, /* @__PURE__ */ React37.createElement(Button3, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, __11("Got it", "elementor"))));
|
|
2155
2297
|
|
|
2156
2298
|
// src/controls/svg-media-control.tsx
|
|
2157
2299
|
var TILE_SIZE = 8;
|
|
@@ -2184,7 +2326,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2184
2326
|
const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
|
|
2185
2327
|
const src = attachment?.url ?? url?.value ?? null;
|
|
2186
2328
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
2187
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] =
|
|
2329
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState8(false);
|
|
2188
2330
|
const { open } = useWpMediaFrame2({
|
|
2189
2331
|
mediaTypes: ["svg"],
|
|
2190
2332
|
multiple: false,
|
|
@@ -2212,7 +2354,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2212
2354
|
open(openOptions);
|
|
2213
2355
|
}
|
|
2214
2356
|
};
|
|
2215
|
-
return /* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ React38.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React38.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React38.createElement(ControlFormLabel, null, " ", __12("SVG", "elementor"), " "), /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React38.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React38.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React38.createElement(
|
|
2216
2358
|
CardMedia2,
|
|
2217
2359
|
{
|
|
2218
2360
|
component: "img",
|
|
@@ -2220,7 +2362,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2220
2362
|
alt: __12("Preview SVG", "elementor"),
|
|
2221
2363
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2222
2364
|
}
|
|
2223
|
-
)), /* @__PURE__ */
|
|
2365
|
+
)), /* @__PURE__ */ React38.createElement(
|
|
2224
2366
|
CardOverlay2,
|
|
2225
2367
|
{
|
|
2226
2368
|
sx: {
|
|
@@ -2229,7 +2371,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2229
2371
|
}
|
|
2230
2372
|
}
|
|
2231
2373
|
},
|
|
2232
|
-
/* @__PURE__ */
|
|
2374
|
+
/* @__PURE__ */ React38.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React38.createElement(
|
|
2233
2375
|
Button4,
|
|
2234
2376
|
{
|
|
2235
2377
|
size: "tiny",
|
|
@@ -2238,13 +2380,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2238
2380
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2239
2381
|
},
|
|
2240
2382
|
__12("Select SVG", "elementor")
|
|
2241
|
-
), /* @__PURE__ */
|
|
2383
|
+
), /* @__PURE__ */ React38.createElement(
|
|
2242
2384
|
Button4,
|
|
2243
2385
|
{
|
|
2244
2386
|
size: "tiny",
|
|
2245
2387
|
variant: "text",
|
|
2246
2388
|
color: "inherit",
|
|
2247
|
-
startIcon: /* @__PURE__ */
|
|
2389
|
+
startIcon: /* @__PURE__ */ React38.createElement(UploadIcon2, null),
|
|
2248
2390
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2249
2391
|
},
|
|
2250
2392
|
__12("Upload", "elementor")
|
|
@@ -2253,13 +2395,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2253
2395
|
});
|
|
2254
2396
|
|
|
2255
2397
|
// src/controls/background-control/background-control.tsx
|
|
2256
|
-
import * as
|
|
2398
|
+
import * as React45 from "react";
|
|
2257
2399
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2258
2400
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
2259
2401
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2260
2402
|
|
|
2261
2403
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2262
|
-
import * as
|
|
2404
|
+
import * as React44 from "react";
|
|
2263
2405
|
import {
|
|
2264
2406
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2265
2407
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
@@ -2275,7 +2417,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2275
2417
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2276
2418
|
|
|
2277
2419
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2278
|
-
import * as
|
|
2420
|
+
import * as React39 from "react";
|
|
2279
2421
|
import {
|
|
2280
2422
|
backgroundGradientOverlayPropTypeUtil,
|
|
2281
2423
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2322,7 +2464,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2322
2464
|
positions: positions?.value.split(" ")
|
|
2323
2465
|
};
|
|
2324
2466
|
};
|
|
2325
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ React39.createElement(ControlActions, null, /* @__PURE__ */ React39.createElement(
|
|
2326
2468
|
UnstableGradientBox,
|
|
2327
2469
|
{
|
|
2328
2470
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2347,7 +2489,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2347
2489
|
});
|
|
2348
2490
|
|
|
2349
2491
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2350
|
-
import * as
|
|
2492
|
+
import * as React40 from "react";
|
|
2351
2493
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2352
2494
|
import { Grid as Grid9 } from "@elementor/ui";
|
|
2353
2495
|
import { __ as __13 } from "@wordpress/i18n";
|
|
@@ -2355,22 +2497,22 @@ var attachmentControlOptions = [
|
|
|
2355
2497
|
{
|
|
2356
2498
|
value: "fixed",
|
|
2357
2499
|
label: __13("Fixed", "elementor"),
|
|
2358
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2500
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(PinIcon, { fontSize: size }),
|
|
2359
2501
|
showTooltip: true
|
|
2360
2502
|
},
|
|
2361
2503
|
{
|
|
2362
2504
|
value: "scroll",
|
|
2363
2505
|
label: __13("Scroll", "elementor"),
|
|
2364
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2506
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2365
2507
|
showTooltip: true
|
|
2366
2508
|
}
|
|
2367
2509
|
];
|
|
2368
2510
|
var BackgroundImageOverlayAttachment = () => {
|
|
2369
|
-
return /* @__PURE__ */
|
|
2511
|
+
return /* @__PURE__ */ React40.createElement(PopoverGridContainer, null, /* @__PURE__ */ React40.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, __13("Attachment", "elementor"))), /* @__PURE__ */ React40.createElement(Grid9, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React40.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
2370
2512
|
};
|
|
2371
2513
|
|
|
2372
2514
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2373
|
-
import * as
|
|
2515
|
+
import * as React41 from "react";
|
|
2374
2516
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9 } from "@elementor/editor-props";
|
|
2375
2517
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
2376
2518
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
@@ -2400,7 +2542,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2400
2542
|
stringPropContext.setValue(value);
|
|
2401
2543
|
}
|
|
2402
2544
|
};
|
|
2403
|
-
return /* @__PURE__ */
|
|
2545
|
+
return /* @__PURE__ */ React41.createElement(Grid10, { container: true, spacing: 1.5 }, /* @__PURE__ */ React41.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(PopoverGridContainer, null, /* @__PURE__ */ React41.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, __14("Position", "elementor"))), /* @__PURE__ */ React41.createElement(Grid10, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React41.createElement(
|
|
2404
2546
|
Select2,
|
|
2405
2547
|
{
|
|
2406
2548
|
size: "tiny",
|
|
@@ -2408,12 +2550,12 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2408
2550
|
onChange: handlePositionChange,
|
|
2409
2551
|
fullWidth: true
|
|
2410
2552
|
},
|
|
2411
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2412
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2553
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React41.createElement(MenuListItem3, { key: value, value: value ?? "" }, label))
|
|
2554
|
+
)))), isCustom ? /* @__PURE__ */ React41.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React41.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(Grid10, { container: true, spacing: 1.5 }, /* @__PURE__ */ React41.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React41.createElement(SizeControl, { startIcon: /* @__PURE__ */ React41.createElement(LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React41.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React41.createElement(SizeControl, { startIcon: /* @__PURE__ */ React41.createElement(LetterYIcon, { fontSize: "tiny" }) })))))) : null);
|
|
2413
2555
|
};
|
|
2414
2556
|
|
|
2415
2557
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2416
|
-
import * as
|
|
2558
|
+
import * as React42 from "react";
|
|
2417
2559
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon4 } from "@elementor/icons";
|
|
2418
2560
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2419
2561
|
import { __ as __15 } from "@wordpress/i18n";
|
|
@@ -2421,34 +2563,34 @@ var repeatControlOptions = [
|
|
|
2421
2563
|
{
|
|
2422
2564
|
value: "repeat",
|
|
2423
2565
|
label: __15("Repeat", "elementor"),
|
|
2424
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2566
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(GridDotsIcon, { fontSize: size }),
|
|
2425
2567
|
showTooltip: true
|
|
2426
2568
|
},
|
|
2427
2569
|
{
|
|
2428
2570
|
value: "repeat-x",
|
|
2429
2571
|
label: __15("Repeat-x", "elementor"),
|
|
2430
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2572
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2431
2573
|
showTooltip: true
|
|
2432
2574
|
},
|
|
2433
2575
|
{
|
|
2434
2576
|
value: "repeat-y",
|
|
2435
2577
|
label: __15("Repeat-y", "elementor"),
|
|
2436
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2578
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2437
2579
|
showTooltip: true
|
|
2438
2580
|
},
|
|
2439
2581
|
{
|
|
2440
2582
|
value: "no-repeat",
|
|
2441
2583
|
label: __15("No-repeat", "elementor"),
|
|
2442
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2584
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(XIcon4, { fontSize: size }),
|
|
2443
2585
|
showTooltip: true
|
|
2444
2586
|
}
|
|
2445
2587
|
];
|
|
2446
2588
|
var BackgroundImageOverlayRepeat = () => {
|
|
2447
|
-
return /* @__PURE__ */
|
|
2589
|
+
return /* @__PURE__ */ React42.createElement(PopoverGridContainer, null, /* @__PURE__ */ React42.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, __15("Repeat", "elementor"))), /* @__PURE__ */ React42.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
2448
2590
|
};
|
|
2449
2591
|
|
|
2450
2592
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2451
|
-
import * as
|
|
2593
|
+
import * as React43 from "react";
|
|
2452
2594
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2453
2595
|
import {
|
|
2454
2596
|
ArrowBarBothIcon,
|
|
@@ -2464,25 +2606,25 @@ var sizeControlOptions = [
|
|
|
2464
2606
|
{
|
|
2465
2607
|
value: "auto",
|
|
2466
2608
|
label: __16("Auto", "elementor"),
|
|
2467
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2609
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(LetterAIcon, { fontSize: size }),
|
|
2468
2610
|
showTooltip: true
|
|
2469
2611
|
},
|
|
2470
2612
|
{
|
|
2471
2613
|
value: "cover",
|
|
2472
2614
|
label: __16("Cover", "elementor"),
|
|
2473
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2615
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2474
2616
|
showTooltip: true
|
|
2475
2617
|
},
|
|
2476
2618
|
{
|
|
2477
2619
|
value: "contain",
|
|
2478
2620
|
label: __16("Contain", "elementor"),
|
|
2479
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2621
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2480
2622
|
showTooltip: true
|
|
2481
2623
|
},
|
|
2482
2624
|
{
|
|
2483
2625
|
value: "custom",
|
|
2484
2626
|
label: __16("Custom", "elementor"),
|
|
2485
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2627
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(PencilIcon, { fontSize: size }),
|
|
2486
2628
|
showTooltip: true
|
|
2487
2629
|
}
|
|
2488
2630
|
];
|
|
@@ -2497,7 +2639,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2497
2639
|
stringPropContext.setValue(size);
|
|
2498
2640
|
}
|
|
2499
2641
|
};
|
|
2500
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ React43.createElement(Grid12, { container: true, spacing: 1.5 }, /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlFormLabel, null, __16("Size", "elementor"))), /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React43.createElement(
|
|
2501
2643
|
ControlToggleButtonGroup,
|
|
2502
2644
|
{
|
|
2503
2645
|
exclusive: true,
|
|
@@ -2505,23 +2647,23 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2505
2647
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value,
|
|
2506
2648
|
onChange: handleSizeChange
|
|
2507
2649
|
}
|
|
2508
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2650
|
+
)))), isCustom ? /* @__PURE__ */ React43.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React43.createElement(
|
|
2509
2651
|
SizeControl,
|
|
2510
2652
|
{
|
|
2511
|
-
startIcon: /* @__PURE__ */
|
|
2653
|
+
startIcon: /* @__PURE__ */ React43.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
2512
2654
|
extendedValues: ["auto"]
|
|
2513
2655
|
}
|
|
2514
|
-
))), /* @__PURE__ */
|
|
2656
|
+
))), /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React43.createElement(
|
|
2515
2657
|
SizeControl,
|
|
2516
2658
|
{
|
|
2517
|
-
startIcon: /* @__PURE__ */
|
|
2659
|
+
startIcon: /* @__PURE__ */ React43.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
2518
2660
|
extendedValues: ["auto"]
|
|
2519
2661
|
}
|
|
2520
2662
|
)))))) : null);
|
|
2521
2663
|
};
|
|
2522
2664
|
|
|
2523
2665
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
2524
|
-
import { useRef as
|
|
2666
|
+
import { useRef as useRef4 } from "react";
|
|
2525
2667
|
import {
|
|
2526
2668
|
backgroundColorOverlayPropTypeUtil,
|
|
2527
2669
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -2546,7 +2688,7 @@ var useBackgroundTabsHistory = ({
|
|
|
2546
2688
|
return "image";
|
|
2547
2689
|
};
|
|
2548
2690
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
2549
|
-
const valuesHistory =
|
|
2691
|
+
const valuesHistory = useRef4({
|
|
2550
2692
|
image: initialBackgroundImageOverlay,
|
|
2551
2693
|
color: initialBackgroundColorOverlay2,
|
|
2552
2694
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -2621,7 +2763,7 @@ var backgroundResolutionOptions = [
|
|
|
2621
2763
|
];
|
|
2622
2764
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2623
2765
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2624
|
-
return /* @__PURE__ */
|
|
2766
|
+
return /* @__PURE__ */ React44.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React44.createElement(
|
|
2625
2767
|
Repeater,
|
|
2626
2768
|
{
|
|
2627
2769
|
openOnAdd: true,
|
|
@@ -2638,7 +2780,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2638
2780
|
));
|
|
2639
2781
|
});
|
|
2640
2782
|
var ItemContent2 = ({ bind }) => {
|
|
2641
|
-
return /* @__PURE__ */
|
|
2783
|
+
return /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React44.createElement(Content2, null));
|
|
2642
2784
|
};
|
|
2643
2785
|
var Content2 = () => {
|
|
2644
2786
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -2646,7 +2788,7 @@ var Content2 = () => {
|
|
|
2646
2788
|
color: initialBackgroundColorOverlay.value,
|
|
2647
2789
|
gradient: initialBackgroundGradientOverlay.value
|
|
2648
2790
|
});
|
|
2649
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ React44.createElement(Box5, { sx: { width: "100%" } }, /* @__PURE__ */ React44.createElement(Box5, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React44.createElement(
|
|
2650
2792
|
Tabs,
|
|
2651
2793
|
{
|
|
2652
2794
|
size: "small",
|
|
@@ -2654,19 +2796,19 @@ var Content2 = () => {
|
|
|
2654
2796
|
...getTabsProps(),
|
|
2655
2797
|
"aria-label": __17("Background Overlay", "elementor")
|
|
2656
2798
|
},
|
|
2657
|
-
/* @__PURE__ */
|
|
2658
|
-
/* @__PURE__ */
|
|
2659
|
-
/* @__PURE__ */
|
|
2660
|
-
)), /* @__PURE__ */
|
|
2799
|
+
/* @__PURE__ */ React44.createElement(Tab, { label: __17("Image", "elementor"), ...getTabProps("image") }),
|
|
2800
|
+
/* @__PURE__ */ React44.createElement(Tab, { label: __17("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
2801
|
+
/* @__PURE__ */ React44.createElement(Tab, { label: __17("Color", "elementor"), ...getTabProps("color") })
|
|
2802
|
+
)), /* @__PURE__ */ React44.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React44.createElement(PopoverContent, null, /* @__PURE__ */ React44.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React44.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React44.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React44.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React44.createElement(PopoverContent, null, /* @__PURE__ */ React44.createElement(ColorOverlayContent, null))));
|
|
2661
2803
|
};
|
|
2662
2804
|
var ItemIcon2 = ({ value }) => {
|
|
2663
2805
|
switch (value.$$type) {
|
|
2664
2806
|
case "background-image-overlay":
|
|
2665
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ React44.createElement(ItemIconImage, { value });
|
|
2666
2808
|
case "background-color-overlay":
|
|
2667
|
-
return /* @__PURE__ */
|
|
2809
|
+
return /* @__PURE__ */ React44.createElement(ItemIconColor, { value });
|
|
2668
2810
|
case "background-gradient-overlay":
|
|
2669
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ React44.createElement(ItemIconGradient, { value });
|
|
2670
2812
|
default:
|
|
2671
2813
|
return null;
|
|
2672
2814
|
}
|
|
@@ -2679,11 +2821,11 @@ var extractColorFrom = (prop) => {
|
|
|
2679
2821
|
};
|
|
2680
2822
|
var ItemIconColor = ({ value: prop }) => {
|
|
2681
2823
|
const color = extractColorFrom(prop);
|
|
2682
|
-
return /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ React44.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
2683
2825
|
};
|
|
2684
2826
|
var ItemIconImage = ({ value }) => {
|
|
2685
2827
|
const { imageUrl } = useImage(value);
|
|
2686
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ React44.createElement(
|
|
2687
2829
|
CardMedia3,
|
|
2688
2830
|
{
|
|
2689
2831
|
image: imageUrl,
|
|
@@ -2698,47 +2840,47 @@ var ItemIconImage = ({ value }) => {
|
|
|
2698
2840
|
};
|
|
2699
2841
|
var ItemIconGradient = ({ value }) => {
|
|
2700
2842
|
const gradient = getGradientValue(value);
|
|
2701
|
-
return /* @__PURE__ */
|
|
2843
|
+
return /* @__PURE__ */ React44.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
2702
2844
|
};
|
|
2703
2845
|
var ItemLabel2 = ({ value }) => {
|
|
2704
2846
|
switch (value.$$type) {
|
|
2705
2847
|
case "background-image-overlay":
|
|
2706
|
-
return /* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ React44.createElement(ItemLabelImage, { value });
|
|
2707
2849
|
case "background-color-overlay":
|
|
2708
|
-
return /* @__PURE__ */
|
|
2850
|
+
return /* @__PURE__ */ React44.createElement(ItemLabelColor, { value });
|
|
2709
2851
|
case "background-gradient-overlay":
|
|
2710
|
-
return /* @__PURE__ */
|
|
2852
|
+
return /* @__PURE__ */ React44.createElement(ItemLabelGradient, { value });
|
|
2711
2853
|
default:
|
|
2712
2854
|
return null;
|
|
2713
2855
|
}
|
|
2714
2856
|
};
|
|
2715
2857
|
var ItemLabelColor = ({ value: prop }) => {
|
|
2716
2858
|
const color = extractColorFrom(prop);
|
|
2717
|
-
return /* @__PURE__ */
|
|
2859
|
+
return /* @__PURE__ */ React44.createElement("span", null, color);
|
|
2718
2860
|
};
|
|
2719
2861
|
var ItemLabelImage = ({ value }) => {
|
|
2720
2862
|
const { imageTitle } = useImage(value);
|
|
2721
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ React44.createElement("span", null, imageTitle);
|
|
2722
2864
|
};
|
|
2723
2865
|
var ItemLabelGradient = ({ value }) => {
|
|
2724
2866
|
if (value.value.type.value === "linear") {
|
|
2725
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ React44.createElement("span", null, __17("Linear Gradient", "elementor"));
|
|
2726
2868
|
}
|
|
2727
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ React44.createElement("span", null, __17("Radial Gradient", "elementor"));
|
|
2728
2870
|
};
|
|
2729
2871
|
var ColorOverlayContent = () => {
|
|
2730
2872
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
2731
|
-
return /* @__PURE__ */
|
|
2873
|
+
return /* @__PURE__ */ React44.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React44.createElement(ColorControl, null)));
|
|
2732
2874
|
};
|
|
2733
2875
|
var ImageOverlayContent = () => {
|
|
2734
2876
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
2735
|
-
return /* @__PURE__ */
|
|
2877
|
+
return /* @__PURE__ */ React44.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React44.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(
|
|
2736
2878
|
ImageControl,
|
|
2737
2879
|
{
|
|
2738
2880
|
resolutionLabel: __17("Resolution", "elementor"),
|
|
2739
2881
|
sizes: backgroundResolutionOptions
|
|
2740
2882
|
}
|
|
2741
|
-
)))), /* @__PURE__ */
|
|
2883
|
+
)))), /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React44.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React44.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React44.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React44.createElement(BackgroundImageOverlayAttachment, null)));
|
|
2742
2884
|
};
|
|
2743
2885
|
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
|
|
2744
2886
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -2776,7 +2918,7 @@ var getGradientValue = (value) => {
|
|
|
2776
2918
|
// src/controls/background-control/background-control.tsx
|
|
2777
2919
|
var BackgroundControl = createControl(() => {
|
|
2778
2920
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
2779
|
-
return /* @__PURE__ */
|
|
2921
|
+
return /* @__PURE__ */ React45.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React45.createElement(SectionContent, null, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React45.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React45.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, __18("Color", "elementor"))), /* @__PURE__ */ React45.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ColorControl, null))))));
|
|
2780
2922
|
});
|
|
2781
2923
|
export {
|
|
2782
2924
|
BackgroundControl,
|
|
@@ -2806,6 +2948,8 @@ export {
|
|
|
2806
2948
|
ToggleControl,
|
|
2807
2949
|
UrlControl,
|
|
2808
2950
|
createControlReplacementsRegistry,
|
|
2951
|
+
injectIntoRepeaterItemIcon,
|
|
2952
|
+
injectIntoRepeaterItemLabel,
|
|
2809
2953
|
useBoundProp,
|
|
2810
2954
|
useControlActions,
|
|
2811
2955
|
useSyncExternalState
|