@elementor/editor-controls 0.28.2 → 0.29.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 +9 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +376 -242
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +311 -174
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/conditional-tooltip.tsx +16 -0
- package/src/components/control-toggle-button-group.tsx +173 -28
- package/src/controls/font-family-control/font-family-control.tsx +10 -8
- package/src/controls/toggle-control.tsx +3 -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
|
|
|
@@ -1084,20 +1084,50 @@ var initialShadow = {
|
|
|
1084
1084
|
};
|
|
1085
1085
|
|
|
1086
1086
|
// src/controls/toggle-control.tsx
|
|
1087
|
-
import * as
|
|
1087
|
+
import * as React27 from "react";
|
|
1088
1088
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
1089
1089
|
|
|
1090
1090
|
// src/components/control-toggle-button-group.tsx
|
|
1091
|
-
import * as
|
|
1091
|
+
import * as React26 from "react";
|
|
1092
|
+
import { useEffect as useEffect3, useMemo, useRef, useState as useState4 } from "react";
|
|
1093
|
+
import { ChevronDownIcon } from "@elementor/icons";
|
|
1092
1094
|
import {
|
|
1095
|
+
ListItemText,
|
|
1096
|
+
Menu as Menu2,
|
|
1097
|
+
MenuItem,
|
|
1093
1098
|
styled as styled3,
|
|
1094
1099
|
ToggleButton,
|
|
1095
1100
|
ToggleButtonGroup,
|
|
1096
|
-
|
|
1101
|
+
Typography as Typography2,
|
|
1097
1102
|
useTheme
|
|
1098
1103
|
} from "@elementor/ui";
|
|
1104
|
+
|
|
1105
|
+
// src/components/conditional-tooltip.tsx
|
|
1106
|
+
import * as React25 from "react";
|
|
1107
|
+
import { Tooltip as Tooltip2 } from "@elementor/ui";
|
|
1108
|
+
var ConditionalTooltip = ({
|
|
1109
|
+
showTooltip,
|
|
1110
|
+
children,
|
|
1111
|
+
label
|
|
1112
|
+
}) => {
|
|
1113
|
+
return showTooltip && label ? /* @__PURE__ */ React25.createElement(Tooltip2, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
// src/components/control-toggle-button-group.tsx
|
|
1099
1117
|
var StyledToggleButtonGroup = styled3(ToggleButtonGroup)`
|
|
1100
1118
|
${({ justify }) => `justify-content: ${justify};`}
|
|
1119
|
+
button:not( :last-of-type ) {
|
|
1120
|
+
border-start-end-radius: 0;
|
|
1121
|
+
border-end-end-radius: 0;
|
|
1122
|
+
}
|
|
1123
|
+
button:not( :first-of-type ) {
|
|
1124
|
+
border-start-start-radius: 0;
|
|
1125
|
+
border-end-start-radius: 0;
|
|
1126
|
+
}
|
|
1127
|
+
button:last-of-type {
|
|
1128
|
+
border-start-end-radius: 8px;
|
|
1129
|
+
border-end-end-radius: 8px;
|
|
1130
|
+
}
|
|
1101
1131
|
`;
|
|
1102
1132
|
var ControlToggleButtonGroup = ({
|
|
1103
1133
|
justify = "end",
|
|
@@ -1105,14 +1135,24 @@ var ControlToggleButtonGroup = ({
|
|
|
1105
1135
|
value,
|
|
1106
1136
|
onChange,
|
|
1107
1137
|
items,
|
|
1138
|
+
maxItems,
|
|
1108
1139
|
exclusive = false,
|
|
1109
1140
|
fullWidth = false
|
|
1110
1141
|
}) => {
|
|
1142
|
+
const shouldSliceItems = exclusive && maxItems !== void 0 && items.length > maxItems;
|
|
1143
|
+
const menuItems = shouldSliceItems ? items.slice(maxItems - 1) : [];
|
|
1144
|
+
const fixedItems = shouldSliceItems ? items.slice(0, maxItems - 1) : items;
|
|
1111
1145
|
const isRtl = "rtl" === useTheme().direction;
|
|
1112
1146
|
const handleChange = (_, newValue) => {
|
|
1113
1147
|
onChange(newValue);
|
|
1114
1148
|
};
|
|
1115
|
-
|
|
1149
|
+
const getGridTemplateColumns = useMemo(() => {
|
|
1150
|
+
const isOffLimits = menuItems?.length;
|
|
1151
|
+
const itemsCount = isOffLimits ? fixedItems.length + 1 : fixedItems.length;
|
|
1152
|
+
const templateColumnsSuffix = isOffLimits ? "auto" : "";
|
|
1153
|
+
return `repeat(${itemsCount}, minmax(0, 25%)) ${templateColumnsSuffix}`;
|
|
1154
|
+
}, [menuItems?.length, fixedItems.length]);
|
|
1155
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
1116
1156
|
StyledToggleButtonGroup,
|
|
1117
1157
|
{
|
|
1118
1158
|
justify,
|
|
@@ -1122,24 +1162,119 @@ var ControlToggleButtonGroup = ({
|
|
|
1122
1162
|
sx: {
|
|
1123
1163
|
direction: isRtl ? "rtl /* @noflip */" : "ltr /* @noflip */",
|
|
1124
1164
|
display: "grid",
|
|
1125
|
-
gridTemplateColumns:
|
|
1165
|
+
gridTemplateColumns: getGridTemplateColumns,
|
|
1126
1166
|
width: `100%`
|
|
1127
1167
|
}
|
|
1128
1168
|
},
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1169
|
+
fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => /* @__PURE__ */ React26.createElement(
|
|
1170
|
+
ConditionalTooltip,
|
|
1171
|
+
{
|
|
1172
|
+
key: buttonValue,
|
|
1173
|
+
label,
|
|
1174
|
+
showTooltip: showTooltip || false
|
|
1175
|
+
},
|
|
1176
|
+
/* @__PURE__ */ React26.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React26.createElement(Content3, { size }))
|
|
1177
|
+
)),
|
|
1178
|
+
menuItems.length && exclusive && /* @__PURE__ */ React26.createElement(
|
|
1179
|
+
SplitButtonGroup,
|
|
1180
|
+
{
|
|
1181
|
+
size,
|
|
1182
|
+
value: value || null,
|
|
1183
|
+
onChange,
|
|
1184
|
+
items: menuItems,
|
|
1185
|
+
fullWidth
|
|
1186
|
+
}
|
|
1141
1187
|
)
|
|
1188
|
+
));
|
|
1189
|
+
};
|
|
1190
|
+
var SplitButtonGroup = ({
|
|
1191
|
+
size = "tiny",
|
|
1192
|
+
onChange,
|
|
1193
|
+
items,
|
|
1194
|
+
fullWidth,
|
|
1195
|
+
value
|
|
1196
|
+
}) => {
|
|
1197
|
+
const previewButton = usePreviewButton(items, value);
|
|
1198
|
+
const [isMenuOpen, setIsMenuOpen] = useState4(false);
|
|
1199
|
+
const menuButtonRef = useRef(null);
|
|
1200
|
+
const onMenuToggle = (ev) => {
|
|
1201
|
+
setIsMenuOpen((prev) => !prev);
|
|
1202
|
+
ev.preventDefault();
|
|
1203
|
+
};
|
|
1204
|
+
const onMenuItemClick = (newValue) => {
|
|
1205
|
+
setIsMenuOpen(false);
|
|
1206
|
+
onToggleItem(newValue);
|
|
1207
|
+
};
|
|
1208
|
+
const onToggleItem = (newValue) => {
|
|
1209
|
+
const shouldRemove = newValue === value;
|
|
1210
|
+
onChange(shouldRemove ? null : newValue);
|
|
1211
|
+
};
|
|
1212
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
1213
|
+
ToggleButton,
|
|
1214
|
+
{
|
|
1215
|
+
value: previewButton.value,
|
|
1216
|
+
"aria-label": previewButton.label,
|
|
1217
|
+
size,
|
|
1218
|
+
fullWidth,
|
|
1219
|
+
onClick: (ev) => {
|
|
1220
|
+
ev.preventDefault();
|
|
1221
|
+
onMenuItemClick(previewButton.value);
|
|
1222
|
+
},
|
|
1223
|
+
ref: menuButtonRef
|
|
1224
|
+
},
|
|
1225
|
+
previewButton.renderContent({ size })
|
|
1226
|
+
), /* @__PURE__ */ React26.createElement(
|
|
1227
|
+
ToggleButton,
|
|
1228
|
+
{
|
|
1229
|
+
size,
|
|
1230
|
+
"aria-expanded": isMenuOpen ? "true" : void 0,
|
|
1231
|
+
"aria-haspopup": "menu",
|
|
1232
|
+
"aria-pressed": void 0,
|
|
1233
|
+
onClick: onMenuToggle,
|
|
1234
|
+
ref: menuButtonRef,
|
|
1235
|
+
value: "__chevron-icon-button__"
|
|
1236
|
+
},
|
|
1237
|
+
/* @__PURE__ */ React26.createElement(ChevronDownIcon, { fontSize: size })
|
|
1238
|
+
), /* @__PURE__ */ React26.createElement(
|
|
1239
|
+
Menu2,
|
|
1240
|
+
{
|
|
1241
|
+
open: isMenuOpen,
|
|
1242
|
+
onClose: () => setIsMenuOpen(false),
|
|
1243
|
+
anchorEl: menuButtonRef.current,
|
|
1244
|
+
anchorOrigin: {
|
|
1245
|
+
vertical: "bottom",
|
|
1246
|
+
horizontal: "right"
|
|
1247
|
+
},
|
|
1248
|
+
transformOrigin: {
|
|
1249
|
+
vertical: "top",
|
|
1250
|
+
horizontal: "right"
|
|
1251
|
+
},
|
|
1252
|
+
sx: {
|
|
1253
|
+
mt: 0.5
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React26.createElement(
|
|
1257
|
+
MenuItem,
|
|
1258
|
+
{
|
|
1259
|
+
key: buttonValue,
|
|
1260
|
+
selected: buttonValue === value,
|
|
1261
|
+
onClick: () => onMenuItemClick(buttonValue)
|
|
1262
|
+
},
|
|
1263
|
+
/* @__PURE__ */ React26.createElement(ListItemText, null, /* @__PURE__ */ React26.createElement(Typography2, { sx: { fontSize: "14px" } }, label))
|
|
1264
|
+
))
|
|
1265
|
+
));
|
|
1266
|
+
};
|
|
1267
|
+
var usePreviewButton = (items, value) => {
|
|
1268
|
+
const [previewButton, setPreviewButton] = useState4(
|
|
1269
|
+
items.find((item) => item.value === value) ?? items[0]
|
|
1142
1270
|
);
|
|
1271
|
+
useEffect3(() => {
|
|
1272
|
+
const selectedButton = items.find((item) => item.value === value);
|
|
1273
|
+
if (selectedButton) {
|
|
1274
|
+
setPreviewButton(selectedButton);
|
|
1275
|
+
}
|
|
1276
|
+
}, [items, value]);
|
|
1277
|
+
return previewButton;
|
|
1143
1278
|
};
|
|
1144
1279
|
|
|
1145
1280
|
// src/controls/toggle-control.tsx
|
|
@@ -1148,7 +1283,8 @@ var ToggleControl = createControl(
|
|
|
1148
1283
|
options,
|
|
1149
1284
|
fullWidth = false,
|
|
1150
1285
|
size = "tiny",
|
|
1151
|
-
exclusive = true
|
|
1286
|
+
exclusive = true,
|
|
1287
|
+
maxItems
|
|
1152
1288
|
}) => {
|
|
1153
1289
|
const { value, setValue, placeholder } = useBoundProp(stringPropTypeUtil5);
|
|
1154
1290
|
const exclusiveValues = options.filter((option) => option.exclusive).map((option) => option.value);
|
|
@@ -1160,10 +1296,11 @@ var ToggleControl = createControl(
|
|
|
1160
1296
|
};
|
|
1161
1297
|
const toggleButtonGroupProps = {
|
|
1162
1298
|
items: options,
|
|
1299
|
+
maxItems,
|
|
1163
1300
|
fullWidth,
|
|
1164
1301
|
size
|
|
1165
1302
|
};
|
|
1166
|
-
return exclusive ? /* @__PURE__ */
|
|
1303
|
+
return exclusive ? /* @__PURE__ */ React27.createElement(
|
|
1167
1304
|
ControlToggleButtonGroup,
|
|
1168
1305
|
{
|
|
1169
1306
|
...toggleButtonGroupProps,
|
|
@@ -1171,7 +1308,7 @@ var ToggleControl = createControl(
|
|
|
1171
1308
|
onChange: setValue,
|
|
1172
1309
|
exclusive: true
|
|
1173
1310
|
}
|
|
1174
|
-
) : /* @__PURE__ */
|
|
1311
|
+
) : /* @__PURE__ */ React27.createElement(
|
|
1175
1312
|
ControlToggleButtonGroup,
|
|
1176
1313
|
{
|
|
1177
1314
|
...toggleButtonGroupProps,
|
|
@@ -1184,7 +1321,7 @@ var ToggleControl = createControl(
|
|
|
1184
1321
|
);
|
|
1185
1322
|
|
|
1186
1323
|
// src/controls/number-control.tsx
|
|
1187
|
-
import * as
|
|
1324
|
+
import * as React28 from "react";
|
|
1188
1325
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
1189
1326
|
import { TextField as TextField4 } from "@elementor/ui";
|
|
1190
1327
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
@@ -1207,7 +1344,7 @@ var NumberControl = createControl(
|
|
|
1207
1344
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
1208
1345
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
1209
1346
|
};
|
|
1210
|
-
return /* @__PURE__ */
|
|
1347
|
+
return /* @__PURE__ */ React28.createElement(ControlActions, null, /* @__PURE__ */ React28.createElement(
|
|
1211
1348
|
TextField4,
|
|
1212
1349
|
{
|
|
1213
1350
|
size: "tiny",
|
|
@@ -1228,17 +1365,17 @@ var NumberControl = createControl(
|
|
|
1228
1365
|
);
|
|
1229
1366
|
|
|
1230
1367
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
1231
|
-
import * as
|
|
1232
|
-
import { useId as useId2, useRef } from "react";
|
|
1368
|
+
import * as React30 from "react";
|
|
1369
|
+
import { useId as useId2, useRef as useRef2 } from "react";
|
|
1233
1370
|
import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
1234
1371
|
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
1372
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1236
1373
|
|
|
1237
1374
|
// src/components/control-label.tsx
|
|
1238
|
-
import * as
|
|
1375
|
+
import * as React29 from "react";
|
|
1239
1376
|
import { Stack as Stack6 } from "@elementor/ui";
|
|
1240
1377
|
var ControlLabel = ({ children }) => {
|
|
1241
|
-
return /* @__PURE__ */
|
|
1378
|
+
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
1379
|
};
|
|
1243
1380
|
|
|
1244
1381
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
@@ -1260,7 +1397,7 @@ function EqualUnequalSizesControl({
|
|
|
1260
1397
|
multiSizePropTypeUtil
|
|
1261
1398
|
}) {
|
|
1262
1399
|
const popupId = useId2();
|
|
1263
|
-
const controlRef =
|
|
1400
|
+
const controlRef = useRef2(null);
|
|
1264
1401
|
const popupState = usePopupState3({ variant: "popover", popupId });
|
|
1265
1402
|
const {
|
|
1266
1403
|
propType: multiSizePropType,
|
|
@@ -1295,7 +1432,7 @@ function EqualUnequalSizesControl({
|
|
|
1295
1432
|
return splitEqualValue() ?? null;
|
|
1296
1433
|
};
|
|
1297
1434
|
const isMixed = !!multiSizeValue;
|
|
1298
|
-
return /* @__PURE__ */
|
|
1435
|
+
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
1436
|
ToggleButton2,
|
|
1300
1437
|
{
|
|
1301
1438
|
size: "tiny",
|
|
@@ -1306,7 +1443,7 @@ function EqualUnequalSizesControl({
|
|
|
1306
1443
|
"aria-label": tooltipLabel
|
|
1307
1444
|
},
|
|
1308
1445
|
icon
|
|
1309
|
-
))))), /* @__PURE__ */
|
|
1446
|
+
))))), /* @__PURE__ */ React30.createElement(
|
|
1310
1447
|
Popover2,
|
|
1311
1448
|
{
|
|
1312
1449
|
disablePortal: true,
|
|
@@ -1324,13 +1461,13 @@ function EqualUnequalSizesControl({
|
|
|
1324
1461
|
paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1325
1462
|
}
|
|
1326
1463
|
},
|
|
1327
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__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
1465
|
));
|
|
1329
1466
|
}
|
|
1330
|
-
var MultiSizeValueControl = ({ item }) => /* @__PURE__ */
|
|
1467
|
+
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
1468
|
|
|
1332
1469
|
// src/controls/linked-dimensions-control.tsx
|
|
1333
|
-
import * as
|
|
1470
|
+
import * as React31 from "react";
|
|
1334
1471
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
1335
1472
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1336
1473
|
import { Grid as Grid6, Stack as Stack8, ToggleButton as ToggleButton3, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
@@ -1365,7 +1502,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1365
1502
|
const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
|
|
1366
1503
|
const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1367
1504
|
const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1368
|
-
return /* @__PURE__ */
|
|
1505
|
+
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
1506
|
ToggleButton3,
|
|
1370
1507
|
{
|
|
1371
1508
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1375,36 +1512,36 @@ var LinkedDimensionsControl = createControl(
|
|
|
1375
1512
|
sx: { marginLeft: "auto" },
|
|
1376
1513
|
onChange: onLinkToggle
|
|
1377
1514
|
},
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
))), /* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ React31.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1516
|
+
))), /* @__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
1517
|
Control3,
|
|
1381
1518
|
{
|
|
1382
1519
|
bind: "block-start",
|
|
1383
|
-
startIcon: /* @__PURE__ */
|
|
1520
|
+
startIcon: /* @__PURE__ */ React31.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1384
1521
|
isLinked,
|
|
1385
1522
|
extendedValues
|
|
1386
1523
|
}
|
|
1387
|
-
))), /* @__PURE__ */
|
|
1524
|
+
))), /* @__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
1525
|
Control3,
|
|
1389
1526
|
{
|
|
1390
1527
|
bind: "inline-end",
|
|
1391
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1528
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1392
1529
|
isLinked,
|
|
1393
1530
|
extendedValues
|
|
1394
1531
|
}
|
|
1395
|
-
)))), /* @__PURE__ */
|
|
1532
|
+
)))), /* @__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
1533
|
Control3,
|
|
1397
1534
|
{
|
|
1398
1535
|
bind: "block-end",
|
|
1399
|
-
startIcon: /* @__PURE__ */
|
|
1536
|
+
startIcon: /* @__PURE__ */ React31.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1400
1537
|
isLinked,
|
|
1401
1538
|
extendedValues
|
|
1402
1539
|
}
|
|
1403
|
-
))), /* @__PURE__ */
|
|
1540
|
+
))), /* @__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
1541
|
Control3,
|
|
1405
1542
|
{
|
|
1406
1543
|
bind: "inline-start",
|
|
1407
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1544
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
1408
1545
|
isLinked,
|
|
1409
1546
|
extendedValues
|
|
1410
1547
|
}
|
|
@@ -1418,16 +1555,16 @@ var Control3 = ({
|
|
|
1418
1555
|
extendedValues
|
|
1419
1556
|
}) => {
|
|
1420
1557
|
if (isLinked) {
|
|
1421
|
-
return /* @__PURE__ */
|
|
1558
|
+
return /* @__PURE__ */ React31.createElement(SizeControl, { startIcon, extendedValues });
|
|
1422
1559
|
}
|
|
1423
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React31.createElement(SizeControl, { startIcon, extendedValues }));
|
|
1424
1561
|
};
|
|
1425
1562
|
|
|
1426
1563
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1427
|
-
import * as
|
|
1428
|
-
import { useEffect as
|
|
1564
|
+
import * as React32 from "react";
|
|
1565
|
+
import { useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
|
|
1429
1566
|
import { stringPropTypeUtil as stringPropTypeUtil6 } from "@elementor/editor-props";
|
|
1430
|
-
import { ChevronDownIcon, SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1567
|
+
import { ChevronDownIcon as ChevronDownIcon2, SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1431
1568
|
import {
|
|
1432
1569
|
bindPopover as bindPopover3,
|
|
1433
1570
|
bindTrigger as bindTrigger3,
|
|
@@ -1442,7 +1579,7 @@ import {
|
|
|
1442
1579
|
Stack as Stack9,
|
|
1443
1580
|
styled as styled4,
|
|
1444
1581
|
TextField as TextField5,
|
|
1445
|
-
Typography as
|
|
1582
|
+
Typography as Typography3,
|
|
1446
1583
|
UnstableTag as UnstableTag2,
|
|
1447
1584
|
usePopupState as usePopupState4
|
|
1448
1585
|
} from "@elementor/ui";
|
|
@@ -1475,7 +1612,7 @@ var enqueueFont = (fontFamily, context = "editor") => {
|
|
|
1475
1612
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1476
1613
|
var SIZE2 = "tiny";
|
|
1477
1614
|
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1478
|
-
const [searchValue, setSearchValue] =
|
|
1615
|
+
const [searchValue, setSearchValue] = useState5("");
|
|
1479
1616
|
const { value: fontFamily, setValue: setFontFamily } = useBoundProp(stringPropTypeUtil6);
|
|
1480
1617
|
const popoverState = usePopupState4({ variant: "popover" });
|
|
1481
1618
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
@@ -1486,16 +1623,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1486
1623
|
setSearchValue("");
|
|
1487
1624
|
popoverState.close();
|
|
1488
1625
|
};
|
|
1489
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(ControlActions, null, /* @__PURE__ */ React32.createElement(
|
|
1490
1627
|
UnstableTag2,
|
|
1491
1628
|
{
|
|
1492
1629
|
variant: "outlined",
|
|
1493
1630
|
label: fontFamily,
|
|
1494
|
-
endIcon: /* @__PURE__ */
|
|
1631
|
+
endIcon: /* @__PURE__ */ React32.createElement(ChevronDownIcon2, { fontSize: "tiny" }),
|
|
1495
1632
|
...bindTrigger3(popoverState),
|
|
1496
1633
|
fullWidth: true
|
|
1497
1634
|
}
|
|
1498
|
-
), /* @__PURE__ */
|
|
1635
|
+
)), /* @__PURE__ */ React32.createElement(
|
|
1499
1636
|
Popover3,
|
|
1500
1637
|
{
|
|
1501
1638
|
disablePortal: true,
|
|
@@ -1504,7 +1641,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1504
1641
|
...bindPopover3(popoverState),
|
|
1505
1642
|
onClose: handleClose
|
|
1506
1643
|
},
|
|
1507
|
-
/* @__PURE__ */
|
|
1644
|
+
/* @__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
1645
|
TextField5,
|
|
1509
1646
|
{
|
|
1510
1647
|
autoFocus: true,
|
|
@@ -1514,10 +1651,10 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1514
1651
|
placeholder: __8("Search", "elementor"),
|
|
1515
1652
|
onChange: handleSearch,
|
|
1516
1653
|
InputProps: {
|
|
1517
|
-
startAdornment: /* @__PURE__ */
|
|
1654
|
+
startAdornment: /* @__PURE__ */ React32.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React32.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1518
1655
|
}
|
|
1519
1656
|
}
|
|
1520
|
-
)), /* @__PURE__ */
|
|
1657
|
+
)), /* @__PURE__ */ React32.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React32.createElement(
|
|
1521
1658
|
FontList,
|
|
1522
1659
|
{
|
|
1523
1660
|
fontListItems: filteredFontFamilies,
|
|
@@ -1525,8 +1662,8 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1525
1662
|
handleClose,
|
|
1526
1663
|
fontFamily
|
|
1527
1664
|
}
|
|
1528
|
-
) : /* @__PURE__ */
|
|
1529
|
-
|
|
1665
|
+
) : /* @__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(
|
|
1666
|
+
Typography3,
|
|
1530
1667
|
{
|
|
1531
1668
|
variant: "subtitle2",
|
|
1532
1669
|
color: "text.secondary",
|
|
@@ -1536,16 +1673,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1536
1673
|
justifyContent: "center"
|
|
1537
1674
|
}
|
|
1538
1675
|
},
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201C"),
|
|
1677
|
+
/* @__PURE__ */ React32.createElement(
|
|
1541
1678
|
"span",
|
|
1542
1679
|
{
|
|
1543
1680
|
style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
1544
1681
|
},
|
|
1545
1682
|
searchValue
|
|
1546
1683
|
),
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
)), /* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201D.")
|
|
1685
|
+
)), /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React32.createElement(
|
|
1549
1686
|
Link,
|
|
1550
1687
|
{
|
|
1551
1688
|
color: "secondary",
|
|
@@ -1560,7 +1697,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1560
1697
|
var LIST_ITEM_HEIGHT = 36;
|
|
1561
1698
|
var LIST_ITEMS_BUFFER = 6;
|
|
1562
1699
|
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
1563
|
-
const containerRef =
|
|
1700
|
+
const containerRef = useRef3(null);
|
|
1564
1701
|
const selectedItem = fontListItems.find((item) => item.value === fontFamily);
|
|
1565
1702
|
const debouncedVirtualizeChange = useDebounce(({ getVirtualIndexes }) => {
|
|
1566
1703
|
getVirtualIndexes().forEach((index) => {
|
|
@@ -1577,7 +1714,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1577
1714
|
overscan: LIST_ITEMS_BUFFER,
|
|
1578
1715
|
onChange: debouncedVirtualizeChange
|
|
1579
1716
|
});
|
|
1580
|
-
|
|
1717
|
+
useEffect4(
|
|
1581
1718
|
() => {
|
|
1582
1719
|
virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
|
|
1583
1720
|
},
|
|
@@ -1585,7 +1722,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1585
1722
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1586
1723
|
[fontFamily]
|
|
1587
1724
|
);
|
|
1588
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1589
1726
|
Box2,
|
|
1590
1727
|
{
|
|
1591
1728
|
ref: containerRef,
|
|
@@ -1595,7 +1732,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1595
1732
|
width: 220
|
|
1596
1733
|
}
|
|
1597
1734
|
},
|
|
1598
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ React32.createElement(
|
|
1599
1736
|
StyledMenuList,
|
|
1600
1737
|
{
|
|
1601
1738
|
role: "listbox",
|
|
@@ -1611,7 +1748,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1611
1748
|
const isSelected = selectedItem?.value === item.value;
|
|
1612
1749
|
const tabIndexFallback = !selectedItem ? 0 : -1;
|
|
1613
1750
|
if (item.type === "category") {
|
|
1614
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1615
1752
|
MenuSubheader,
|
|
1616
1753
|
{
|
|
1617
1754
|
key: virtualRow.key,
|
|
@@ -1622,7 +1759,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1622
1759
|
item.value
|
|
1623
1760
|
);
|
|
1624
1761
|
}
|
|
1625
|
-
return /* @__PURE__ */
|
|
1762
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1626
1763
|
"li",
|
|
1627
1764
|
{
|
|
1628
1765
|
key: virtualRow.key,
|
|
@@ -1685,19 +1822,19 @@ var StyledMenuList = styled4(MenuList)(({ theme }) => ({
|
|
|
1685
1822
|
position: "relative"
|
|
1686
1823
|
}));
|
|
1687
1824
|
var useDebounce = (fn, delay) => {
|
|
1688
|
-
const [debouncedFn] =
|
|
1689
|
-
|
|
1825
|
+
const [debouncedFn] = useState5(() => debounce(fn, delay));
|
|
1826
|
+
useEffect4(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
1690
1827
|
return debouncedFn;
|
|
1691
1828
|
};
|
|
1692
1829
|
|
|
1693
1830
|
// src/controls/url-control.tsx
|
|
1694
|
-
import * as
|
|
1831
|
+
import * as React33 from "react";
|
|
1695
1832
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
1696
1833
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1697
1834
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1698
1835
|
const { value, setValue } = useBoundProp(urlPropTypeUtil);
|
|
1699
1836
|
const handleChange = (event) => setValue(event.target.value);
|
|
1700
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(
|
|
1701
1838
|
TextField6,
|
|
1702
1839
|
{
|
|
1703
1840
|
size: "tiny",
|
|
@@ -1710,8 +1847,8 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1710
1847
|
});
|
|
1711
1848
|
|
|
1712
1849
|
// src/controls/link-control.tsx
|
|
1713
|
-
import * as
|
|
1714
|
-
import { useMemo, useState as
|
|
1850
|
+
import * as React35 from "react";
|
|
1851
|
+
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
1715
1852
|
import { getLinkInLinkRestriction, selectElement } from "@elementor/editor-elements";
|
|
1716
1853
|
import {
|
|
1717
1854
|
booleanPropTypeUtil,
|
|
@@ -1729,7 +1866,7 @@ import { debounce as debounce2 } from "@elementor/utils";
|
|
|
1729
1866
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1730
1867
|
|
|
1731
1868
|
// src/components/autocomplete.tsx
|
|
1732
|
-
import * as
|
|
1869
|
+
import * as React34 from "react";
|
|
1733
1870
|
import { forwardRef as forwardRef2 } from "react";
|
|
1734
1871
|
import { XIcon as XIcon3 } from "@elementor/icons";
|
|
1735
1872
|
import {
|
|
@@ -1755,7 +1892,7 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1755
1892
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
1756
1893
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
1757
1894
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
1758
|
-
return /* @__PURE__ */
|
|
1895
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1759
1896
|
AutocompleteBase,
|
|
1760
1897
|
{
|
|
1761
1898
|
...restProps,
|
|
@@ -1773,8 +1910,8 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1773
1910
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
1774
1911
|
isOptionEqualToValue,
|
|
1775
1912
|
filterOptions: () => optionKeys,
|
|
1776
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
1777
|
-
renderInput: (params) => /* @__PURE__ */
|
|
1913
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React34.createElement(Box3, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
1914
|
+
renderInput: (params) => /* @__PURE__ */ React34.createElement(
|
|
1778
1915
|
TextInput,
|
|
1779
1916
|
{
|
|
1780
1917
|
params,
|
|
@@ -1797,7 +1934,7 @@ var TextInput = ({
|
|
|
1797
1934
|
const onChange = (event) => {
|
|
1798
1935
|
handleChange(event.target.value);
|
|
1799
1936
|
};
|
|
1800
|
-
return /* @__PURE__ */
|
|
1937
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1801
1938
|
TextField7,
|
|
1802
1939
|
{
|
|
1803
1940
|
...params,
|
|
@@ -1810,7 +1947,7 @@ var TextInput = ({
|
|
|
1810
1947
|
},
|
|
1811
1948
|
InputProps: {
|
|
1812
1949
|
...params.InputProps,
|
|
1813
|
-
endAdornment: /* @__PURE__ */
|
|
1950
|
+
endAdornment: /* @__PURE__ */ React34.createElement(ClearButton, { params, allowClear, handleChange })
|
|
1814
1951
|
}
|
|
1815
1952
|
}
|
|
1816
1953
|
);
|
|
@@ -1819,7 +1956,7 @@ var ClearButton = ({
|
|
|
1819
1956
|
allowClear,
|
|
1820
1957
|
handleChange,
|
|
1821
1958
|
params
|
|
1822
|
-
}) => /* @__PURE__ */
|
|
1959
|
+
}) => /* @__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
1960
|
function findMatchingOption(options, optionId = null) {
|
|
1824
1961
|
const formattedOption = (optionId || "").toString();
|
|
1825
1962
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -1849,7 +1986,7 @@ var learnMoreButton = {
|
|
|
1849
1986
|
var LinkControl = createControl((props) => {
|
|
1850
1987
|
const { value, path, setValue, ...propContext } = useBoundProp(linkPropTypeUtil);
|
|
1851
1988
|
const [linkSessionValue, setLinkSessionValue] = useSessionStorage(path.join("/"));
|
|
1852
|
-
const [isActive, setIsActive] =
|
|
1989
|
+
const [isActive, setIsActive] = useState6(!!value);
|
|
1853
1990
|
const {
|
|
1854
1991
|
allowCustomValues,
|
|
1855
1992
|
queryOptions: { endpoint = "", requestParams = {} },
|
|
@@ -1857,8 +1994,8 @@ var LinkControl = createControl((props) => {
|
|
|
1857
1994
|
minInputLength = 2,
|
|
1858
1995
|
context: { elementId }
|
|
1859
1996
|
} = props || {};
|
|
1860
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] =
|
|
1861
|
-
const [options, setOptions] =
|
|
1997
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = useState6(getLinkInLinkRestriction(elementId));
|
|
1998
|
+
const [options, setOptions] = useState6(
|
|
1862
1999
|
generateFirstLoadedOption(value)
|
|
1863
2000
|
);
|
|
1864
2001
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
@@ -1909,7 +2046,7 @@ var LinkControl = createControl((props) => {
|
|
|
1909
2046
|
}
|
|
1910
2047
|
debounceFetch({ ...requestParams, term: newValue });
|
|
1911
2048
|
};
|
|
1912
|
-
const debounceFetch =
|
|
2049
|
+
const debounceFetch = useMemo2(
|
|
1913
2050
|
() => debounce2(
|
|
1914
2051
|
(params) => fetchOptions(endpoint, params).then((newOptions) => {
|
|
1915
2052
|
setOptions(formatOptions(newOptions));
|
|
@@ -1918,7 +2055,7 @@ var LinkControl = createControl((props) => {
|
|
|
1918
2055
|
),
|
|
1919
2056
|
[endpoint]
|
|
1920
2057
|
);
|
|
1921
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ React35.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React35.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React35.createElement(
|
|
1922
2059
|
Stack10,
|
|
1923
2060
|
{
|
|
1924
2061
|
direction: "row",
|
|
@@ -1928,8 +2065,8 @@ var LinkControl = createControl((props) => {
|
|
|
1928
2065
|
marginInlineEnd: -0.75
|
|
1929
2066
|
}
|
|
1930
2067
|
},
|
|
1931
|
-
/* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
2068
|
+
/* @__PURE__ */ React35.createElement(ControlFormLabel, null, __9("Link", "elementor")),
|
|
2069
|
+
/* @__PURE__ */ React35.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React35.createElement(
|
|
1933
2070
|
ToggleIconControl,
|
|
1934
2071
|
{
|
|
1935
2072
|
disabled: shouldDisableAddingLink,
|
|
@@ -1938,7 +2075,7 @@ var LinkControl = createControl((props) => {
|
|
|
1938
2075
|
label: __9("Toggle link", "elementor")
|
|
1939
2076
|
}
|
|
1940
2077
|
))
|
|
1941
|
-
), /* @__PURE__ */
|
|
2078
|
+
), /* @__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
2079
|
Autocomplete,
|
|
1943
2080
|
{
|
|
1944
2081
|
options,
|
|
@@ -1949,10 +2086,10 @@ var LinkControl = createControl((props) => {
|
|
|
1949
2086
|
onTextChange,
|
|
1950
2087
|
minInputLength
|
|
1951
2088
|
}
|
|
1952
|
-
))), /* @__PURE__ */
|
|
2089
|
+
))), /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React35.createElement(SwitchControl, { disabled: !value }))))));
|
|
1953
2090
|
});
|
|
1954
2091
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
1955
|
-
return /* @__PURE__ */
|
|
2092
|
+
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
2093
|
};
|
|
1957
2094
|
var SwitchControl = ({ disabled }) => {
|
|
1958
2095
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
@@ -1964,7 +2101,7 @@ var SwitchControl = ({ disabled }) => {
|
|
|
1964
2101
|
opacity: 0
|
|
1965
2102
|
}
|
|
1966
2103
|
} : {};
|
|
1967
|
-
return /* @__PURE__ */
|
|
2104
|
+
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
2105
|
};
|
|
1969
2106
|
async function fetchOptions(ajaxUrl, params) {
|
|
1970
2107
|
if (!params || !ajaxUrl) {
|
|
@@ -2001,15 +2138,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2001
2138
|
selectElement(elementId);
|
|
2002
2139
|
}
|
|
2003
2140
|
};
|
|
2004
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2141
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React35.createElement(
|
|
2005
2142
|
Infotip,
|
|
2006
2143
|
{
|
|
2007
2144
|
placement: "right",
|
|
2008
|
-
content: /* @__PURE__ */
|
|
2145
|
+
content: /* @__PURE__ */ React35.createElement(
|
|
2009
2146
|
InfoTipCard,
|
|
2010
2147
|
{
|
|
2011
2148
|
content: INFOTIP_CONTENT[reason],
|
|
2012
|
-
svgIcon: /* @__PURE__ */
|
|
2149
|
+
svgIcon: /* @__PURE__ */ React35.createElement(AlertTriangleIcon, null),
|
|
2013
2150
|
learnMoreButton,
|
|
2014
2151
|
ctaButton: {
|
|
2015
2152
|
label: __9("Take me there", "elementor"),
|
|
@@ -2018,16 +2155,16 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2018
2155
|
}
|
|
2019
2156
|
)
|
|
2020
2157
|
},
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
) : /* @__PURE__ */
|
|
2158
|
+
/* @__PURE__ */ React35.createElement(Box4, null, children)
|
|
2159
|
+
) : /* @__PURE__ */ React35.createElement(React35.Fragment, null, children);
|
|
2023
2160
|
};
|
|
2024
2161
|
var INFOTIP_CONTENT = {
|
|
2025
|
-
descendant: /* @__PURE__ */
|
|
2026
|
-
ancestor: /* @__PURE__ */
|
|
2162
|
+
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")),
|
|
2163
|
+
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
2164
|
};
|
|
2028
2165
|
|
|
2029
2166
|
// src/controls/gap-control.tsx
|
|
2030
|
-
import * as
|
|
2167
|
+
import * as React36 from "react";
|
|
2031
2168
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
2032
2169
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
2033
2170
|
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
@@ -2055,7 +2192,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2055
2192
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
2056
2193
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2057
2194
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2058
|
-
return /* @__PURE__ */
|
|
2195
|
+
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
2196
|
ToggleButton4,
|
|
2060
2197
|
{
|
|
2061
2198
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2065,19 +2202,19 @@ var GapControl = createControl(({ label }) => {
|
|
|
2065
2202
|
sx: { marginLeft: "auto" },
|
|
2066
2203
|
onChange: onLinkToggle
|
|
2067
2204
|
},
|
|
2068
|
-
/* @__PURE__ */
|
|
2069
|
-
))), /* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ React36.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2206
|
+
))), /* @__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
2207
|
});
|
|
2071
2208
|
var Control4 = ({ bind, isLinked }) => {
|
|
2072
2209
|
if (isLinked) {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2210
|
+
return /* @__PURE__ */ React36.createElement(SizeControl, null);
|
|
2074
2211
|
}
|
|
2075
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React36.createElement(SizeControl, null));
|
|
2076
2213
|
};
|
|
2077
2214
|
|
|
2078
2215
|
// src/controls/svg-media-control.tsx
|
|
2079
|
-
import * as
|
|
2080
|
-
import { useState as
|
|
2216
|
+
import * as React38 from "react";
|
|
2217
|
+
import { useState as useState8 } from "react";
|
|
2081
2218
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
2082
2219
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
2083
2220
|
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 +2222,8 @@ import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWp
|
|
|
2085
2222
|
import { __ as __12 } from "@wordpress/i18n";
|
|
2086
2223
|
|
|
2087
2224
|
// src/components/enable-unfiltered-modal.tsx
|
|
2088
|
-
import * as
|
|
2089
|
-
import { useState as
|
|
2225
|
+
import * as React37 from "react";
|
|
2226
|
+
import { useState as useState7 } from "react";
|
|
2090
2227
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
2091
2228
|
import {
|
|
2092
2229
|
Button as Button3,
|
|
@@ -2119,7 +2256,7 @@ var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
|
|
|
2119
2256
|
var EnableUnfilteredModal = (props) => {
|
|
2120
2257
|
const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
|
|
2121
2258
|
const { canUser } = useCurrentUserCapabilities();
|
|
2122
|
-
const [isError, setIsError] =
|
|
2259
|
+
const [isError, setIsError] = useState7(false);
|
|
2123
2260
|
const canManageOptions = canUser("manage_options");
|
|
2124
2261
|
const onClose = (enabled) => {
|
|
2125
2262
|
props.onClose(enabled);
|
|
@@ -2138,9 +2275,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2138
2275
|
}
|
|
2139
2276
|
};
|
|
2140
2277
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2141
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2278
|
+
return canManageOptions ? /* @__PURE__ */ React37.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React37.createElement(NonAdminDialog, { ...dialogProps });
|
|
2142
2279
|
};
|
|
2143
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2280
|
+
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
2281
|
Button3,
|
|
2145
2282
|
{
|
|
2146
2283
|
size: "medium",
|
|
@@ -2149,9 +2286,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2149
2286
|
color: "primary",
|
|
2150
2287
|
disabled: isPending
|
|
2151
2288
|
},
|
|
2152
|
-
isPending ? /* @__PURE__ */
|
|
2289
|
+
isPending ? /* @__PURE__ */ React37.createElement(CircularProgress2, { size: 24 }) : __11("Enable", "elementor")
|
|
2153
2290
|
)));
|
|
2154
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2291
|
+
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
2292
|
|
|
2156
2293
|
// src/controls/svg-media-control.tsx
|
|
2157
2294
|
var TILE_SIZE = 8;
|
|
@@ -2184,7 +2321,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2184
2321
|
const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
|
|
2185
2322
|
const src = attachment?.url ?? url?.value ?? null;
|
|
2186
2323
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
2187
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] =
|
|
2324
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState8(false);
|
|
2188
2325
|
const { open } = useWpMediaFrame2({
|
|
2189
2326
|
mediaTypes: ["svg"],
|
|
2190
2327
|
multiple: false,
|
|
@@ -2212,7 +2349,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2212
2349
|
open(openOptions);
|
|
2213
2350
|
}
|
|
2214
2351
|
};
|
|
2215
|
-
return /* @__PURE__ */
|
|
2352
|
+
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
2353
|
CardMedia2,
|
|
2217
2354
|
{
|
|
2218
2355
|
component: "img",
|
|
@@ -2220,7 +2357,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2220
2357
|
alt: __12("Preview SVG", "elementor"),
|
|
2221
2358
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2222
2359
|
}
|
|
2223
|
-
)), /* @__PURE__ */
|
|
2360
|
+
)), /* @__PURE__ */ React38.createElement(
|
|
2224
2361
|
CardOverlay2,
|
|
2225
2362
|
{
|
|
2226
2363
|
sx: {
|
|
@@ -2229,7 +2366,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2229
2366
|
}
|
|
2230
2367
|
}
|
|
2231
2368
|
},
|
|
2232
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ React38.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React38.createElement(
|
|
2233
2370
|
Button4,
|
|
2234
2371
|
{
|
|
2235
2372
|
size: "tiny",
|
|
@@ -2238,13 +2375,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2238
2375
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2239
2376
|
},
|
|
2240
2377
|
__12("Select SVG", "elementor")
|
|
2241
|
-
), /* @__PURE__ */
|
|
2378
|
+
), /* @__PURE__ */ React38.createElement(
|
|
2242
2379
|
Button4,
|
|
2243
2380
|
{
|
|
2244
2381
|
size: "tiny",
|
|
2245
2382
|
variant: "text",
|
|
2246
2383
|
color: "inherit",
|
|
2247
|
-
startIcon: /* @__PURE__ */
|
|
2384
|
+
startIcon: /* @__PURE__ */ React38.createElement(UploadIcon2, null),
|
|
2248
2385
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2249
2386
|
},
|
|
2250
2387
|
__12("Upload", "elementor")
|
|
@@ -2253,13 +2390,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2253
2390
|
});
|
|
2254
2391
|
|
|
2255
2392
|
// src/controls/background-control/background-control.tsx
|
|
2256
|
-
import * as
|
|
2393
|
+
import * as React45 from "react";
|
|
2257
2394
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2258
2395
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
2259
2396
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2260
2397
|
|
|
2261
2398
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2262
|
-
import * as
|
|
2399
|
+
import * as React44 from "react";
|
|
2263
2400
|
import {
|
|
2264
2401
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2265
2402
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
@@ -2275,7 +2412,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2275
2412
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2276
2413
|
|
|
2277
2414
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2278
|
-
import * as
|
|
2415
|
+
import * as React39 from "react";
|
|
2279
2416
|
import {
|
|
2280
2417
|
backgroundGradientOverlayPropTypeUtil,
|
|
2281
2418
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2322,7 +2459,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2322
2459
|
positions: positions?.value.split(" ")
|
|
2323
2460
|
};
|
|
2324
2461
|
};
|
|
2325
|
-
return /* @__PURE__ */
|
|
2462
|
+
return /* @__PURE__ */ React39.createElement(ControlActions, null, /* @__PURE__ */ React39.createElement(
|
|
2326
2463
|
UnstableGradientBox,
|
|
2327
2464
|
{
|
|
2328
2465
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2347,7 +2484,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2347
2484
|
});
|
|
2348
2485
|
|
|
2349
2486
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2350
|
-
import * as
|
|
2487
|
+
import * as React40 from "react";
|
|
2351
2488
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2352
2489
|
import { Grid as Grid9 } from "@elementor/ui";
|
|
2353
2490
|
import { __ as __13 } from "@wordpress/i18n";
|
|
@@ -2355,22 +2492,22 @@ var attachmentControlOptions = [
|
|
|
2355
2492
|
{
|
|
2356
2493
|
value: "fixed",
|
|
2357
2494
|
label: __13("Fixed", "elementor"),
|
|
2358
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2495
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(PinIcon, { fontSize: size }),
|
|
2359
2496
|
showTooltip: true
|
|
2360
2497
|
},
|
|
2361
2498
|
{
|
|
2362
2499
|
value: "scroll",
|
|
2363
2500
|
label: __13("Scroll", "elementor"),
|
|
2364
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2501
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2365
2502
|
showTooltip: true
|
|
2366
2503
|
}
|
|
2367
2504
|
];
|
|
2368
2505
|
var BackgroundImageOverlayAttachment = () => {
|
|
2369
|
-
return /* @__PURE__ */
|
|
2506
|
+
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
2507
|
};
|
|
2371
2508
|
|
|
2372
2509
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2373
|
-
import * as
|
|
2510
|
+
import * as React41 from "react";
|
|
2374
2511
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9 } from "@elementor/editor-props";
|
|
2375
2512
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
2376
2513
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
@@ -2400,7 +2537,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2400
2537
|
stringPropContext.setValue(value);
|
|
2401
2538
|
}
|
|
2402
2539
|
};
|
|
2403
|
-
return /* @__PURE__ */
|
|
2540
|
+
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
2541
|
Select2,
|
|
2405
2542
|
{
|
|
2406
2543
|
size: "tiny",
|
|
@@ -2408,12 +2545,12 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2408
2545
|
onChange: handlePositionChange,
|
|
2409
2546
|
fullWidth: true
|
|
2410
2547
|
},
|
|
2411
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2412
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2548
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React41.createElement(MenuListItem3, { key: value, value: value ?? "" }, label))
|
|
2549
|
+
)))), 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
2550
|
};
|
|
2414
2551
|
|
|
2415
2552
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2416
|
-
import * as
|
|
2553
|
+
import * as React42 from "react";
|
|
2417
2554
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon4 } from "@elementor/icons";
|
|
2418
2555
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2419
2556
|
import { __ as __15 } from "@wordpress/i18n";
|
|
@@ -2421,34 +2558,34 @@ var repeatControlOptions = [
|
|
|
2421
2558
|
{
|
|
2422
2559
|
value: "repeat",
|
|
2423
2560
|
label: __15("Repeat", "elementor"),
|
|
2424
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2561
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(GridDotsIcon, { fontSize: size }),
|
|
2425
2562
|
showTooltip: true
|
|
2426
2563
|
},
|
|
2427
2564
|
{
|
|
2428
2565
|
value: "repeat-x",
|
|
2429
2566
|
label: __15("Repeat-x", "elementor"),
|
|
2430
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2567
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2431
2568
|
showTooltip: true
|
|
2432
2569
|
},
|
|
2433
2570
|
{
|
|
2434
2571
|
value: "repeat-y",
|
|
2435
2572
|
label: __15("Repeat-y", "elementor"),
|
|
2436
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2573
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2437
2574
|
showTooltip: true
|
|
2438
2575
|
},
|
|
2439
2576
|
{
|
|
2440
2577
|
value: "no-repeat",
|
|
2441
2578
|
label: __15("No-repeat", "elementor"),
|
|
2442
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2579
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(XIcon4, { fontSize: size }),
|
|
2443
2580
|
showTooltip: true
|
|
2444
2581
|
}
|
|
2445
2582
|
];
|
|
2446
2583
|
var BackgroundImageOverlayRepeat = () => {
|
|
2447
|
-
return /* @__PURE__ */
|
|
2584
|
+
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
2585
|
};
|
|
2449
2586
|
|
|
2450
2587
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2451
|
-
import * as
|
|
2588
|
+
import * as React43 from "react";
|
|
2452
2589
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2453
2590
|
import {
|
|
2454
2591
|
ArrowBarBothIcon,
|
|
@@ -2464,25 +2601,25 @@ var sizeControlOptions = [
|
|
|
2464
2601
|
{
|
|
2465
2602
|
value: "auto",
|
|
2466
2603
|
label: __16("Auto", "elementor"),
|
|
2467
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2604
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(LetterAIcon, { fontSize: size }),
|
|
2468
2605
|
showTooltip: true
|
|
2469
2606
|
},
|
|
2470
2607
|
{
|
|
2471
2608
|
value: "cover",
|
|
2472
2609
|
label: __16("Cover", "elementor"),
|
|
2473
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2610
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2474
2611
|
showTooltip: true
|
|
2475
2612
|
},
|
|
2476
2613
|
{
|
|
2477
2614
|
value: "contain",
|
|
2478
2615
|
label: __16("Contain", "elementor"),
|
|
2479
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2616
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2480
2617
|
showTooltip: true
|
|
2481
2618
|
},
|
|
2482
2619
|
{
|
|
2483
2620
|
value: "custom",
|
|
2484
2621
|
label: __16("Custom", "elementor"),
|
|
2485
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2622
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(PencilIcon, { fontSize: size }),
|
|
2486
2623
|
showTooltip: true
|
|
2487
2624
|
}
|
|
2488
2625
|
];
|
|
@@ -2497,7 +2634,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2497
2634
|
stringPropContext.setValue(size);
|
|
2498
2635
|
}
|
|
2499
2636
|
};
|
|
2500
|
-
return /* @__PURE__ */
|
|
2637
|
+
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
2638
|
ControlToggleButtonGroup,
|
|
2502
2639
|
{
|
|
2503
2640
|
exclusive: true,
|
|
@@ -2505,23 +2642,23 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2505
2642
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value,
|
|
2506
2643
|
onChange: handleSizeChange
|
|
2507
2644
|
}
|
|
2508
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2645
|
+
)))), 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
2646
|
SizeControl,
|
|
2510
2647
|
{
|
|
2511
|
-
startIcon: /* @__PURE__ */
|
|
2648
|
+
startIcon: /* @__PURE__ */ React43.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
2512
2649
|
extendedValues: ["auto"]
|
|
2513
2650
|
}
|
|
2514
|
-
))), /* @__PURE__ */
|
|
2651
|
+
))), /* @__PURE__ */ React43.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React43.createElement(
|
|
2515
2652
|
SizeControl,
|
|
2516
2653
|
{
|
|
2517
|
-
startIcon: /* @__PURE__ */
|
|
2654
|
+
startIcon: /* @__PURE__ */ React43.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
2518
2655
|
extendedValues: ["auto"]
|
|
2519
2656
|
}
|
|
2520
2657
|
)))))) : null);
|
|
2521
2658
|
};
|
|
2522
2659
|
|
|
2523
2660
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
2524
|
-
import { useRef as
|
|
2661
|
+
import { useRef as useRef4 } from "react";
|
|
2525
2662
|
import {
|
|
2526
2663
|
backgroundColorOverlayPropTypeUtil,
|
|
2527
2664
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -2546,7 +2683,7 @@ var useBackgroundTabsHistory = ({
|
|
|
2546
2683
|
return "image";
|
|
2547
2684
|
};
|
|
2548
2685
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
2549
|
-
const valuesHistory =
|
|
2686
|
+
const valuesHistory = useRef4({
|
|
2550
2687
|
image: initialBackgroundImageOverlay,
|
|
2551
2688
|
color: initialBackgroundColorOverlay2,
|
|
2552
2689
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -2621,7 +2758,7 @@ var backgroundResolutionOptions = [
|
|
|
2621
2758
|
];
|
|
2622
2759
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2623
2760
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2624
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ React44.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React44.createElement(
|
|
2625
2762
|
Repeater,
|
|
2626
2763
|
{
|
|
2627
2764
|
openOnAdd: true,
|
|
@@ -2638,7 +2775,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2638
2775
|
));
|
|
2639
2776
|
});
|
|
2640
2777
|
var ItemContent2 = ({ bind }) => {
|
|
2641
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React44.createElement(Content2, null));
|
|
2642
2779
|
};
|
|
2643
2780
|
var Content2 = () => {
|
|
2644
2781
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -2646,7 +2783,7 @@ var Content2 = () => {
|
|
|
2646
2783
|
color: initialBackgroundColorOverlay.value,
|
|
2647
2784
|
gradient: initialBackgroundGradientOverlay.value
|
|
2648
2785
|
});
|
|
2649
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ React44.createElement(Box5, { sx: { width: "100%" } }, /* @__PURE__ */ React44.createElement(Box5, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React44.createElement(
|
|
2650
2787
|
Tabs,
|
|
2651
2788
|
{
|
|
2652
2789
|
size: "small",
|
|
@@ -2654,19 +2791,19 @@ var Content2 = () => {
|
|
|
2654
2791
|
...getTabsProps(),
|
|
2655
2792
|
"aria-label": __17("Background Overlay", "elementor")
|
|
2656
2793
|
},
|
|
2657
|
-
/* @__PURE__ */
|
|
2658
|
-
/* @__PURE__ */
|
|
2659
|
-
/* @__PURE__ */
|
|
2660
|
-
)), /* @__PURE__ */
|
|
2794
|
+
/* @__PURE__ */ React44.createElement(Tab, { label: __17("Image", "elementor"), ...getTabProps("image") }),
|
|
2795
|
+
/* @__PURE__ */ React44.createElement(Tab, { label: __17("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
2796
|
+
/* @__PURE__ */ React44.createElement(Tab, { label: __17("Color", "elementor"), ...getTabProps("color") })
|
|
2797
|
+
)), /* @__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
2798
|
};
|
|
2662
2799
|
var ItemIcon2 = ({ value }) => {
|
|
2663
2800
|
switch (value.$$type) {
|
|
2664
2801
|
case "background-image-overlay":
|
|
2665
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ React44.createElement(ItemIconImage, { value });
|
|
2666
2803
|
case "background-color-overlay":
|
|
2667
|
-
return /* @__PURE__ */
|
|
2804
|
+
return /* @__PURE__ */ React44.createElement(ItemIconColor, { value });
|
|
2668
2805
|
case "background-gradient-overlay":
|
|
2669
|
-
return /* @__PURE__ */
|
|
2806
|
+
return /* @__PURE__ */ React44.createElement(ItemIconGradient, { value });
|
|
2670
2807
|
default:
|
|
2671
2808
|
return null;
|
|
2672
2809
|
}
|
|
@@ -2679,11 +2816,11 @@ var extractColorFrom = (prop) => {
|
|
|
2679
2816
|
};
|
|
2680
2817
|
var ItemIconColor = ({ value: prop }) => {
|
|
2681
2818
|
const color = extractColorFrom(prop);
|
|
2682
|
-
return /* @__PURE__ */
|
|
2819
|
+
return /* @__PURE__ */ React44.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
2683
2820
|
};
|
|
2684
2821
|
var ItemIconImage = ({ value }) => {
|
|
2685
2822
|
const { imageUrl } = useImage(value);
|
|
2686
|
-
return /* @__PURE__ */
|
|
2823
|
+
return /* @__PURE__ */ React44.createElement(
|
|
2687
2824
|
CardMedia3,
|
|
2688
2825
|
{
|
|
2689
2826
|
image: imageUrl,
|
|
@@ -2698,47 +2835,47 @@ var ItemIconImage = ({ value }) => {
|
|
|
2698
2835
|
};
|
|
2699
2836
|
var ItemIconGradient = ({ value }) => {
|
|
2700
2837
|
const gradient = getGradientValue(value);
|
|
2701
|
-
return /* @__PURE__ */
|
|
2838
|
+
return /* @__PURE__ */ React44.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
2702
2839
|
};
|
|
2703
2840
|
var ItemLabel2 = ({ value }) => {
|
|
2704
2841
|
switch (value.$$type) {
|
|
2705
2842
|
case "background-image-overlay":
|
|
2706
|
-
return /* @__PURE__ */
|
|
2843
|
+
return /* @__PURE__ */ React44.createElement(ItemLabelImage, { value });
|
|
2707
2844
|
case "background-color-overlay":
|
|
2708
|
-
return /* @__PURE__ */
|
|
2845
|
+
return /* @__PURE__ */ React44.createElement(ItemLabelColor, { value });
|
|
2709
2846
|
case "background-gradient-overlay":
|
|
2710
|
-
return /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ React44.createElement(ItemLabelGradient, { value });
|
|
2711
2848
|
default:
|
|
2712
2849
|
return null;
|
|
2713
2850
|
}
|
|
2714
2851
|
};
|
|
2715
2852
|
var ItemLabelColor = ({ value: prop }) => {
|
|
2716
2853
|
const color = extractColorFrom(prop);
|
|
2717
|
-
return /* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ React44.createElement("span", null, color);
|
|
2718
2855
|
};
|
|
2719
2856
|
var ItemLabelImage = ({ value }) => {
|
|
2720
2857
|
const { imageTitle } = useImage(value);
|
|
2721
|
-
return /* @__PURE__ */
|
|
2858
|
+
return /* @__PURE__ */ React44.createElement("span", null, imageTitle);
|
|
2722
2859
|
};
|
|
2723
2860
|
var ItemLabelGradient = ({ value }) => {
|
|
2724
2861
|
if (value.value.type.value === "linear") {
|
|
2725
|
-
return /* @__PURE__ */
|
|
2862
|
+
return /* @__PURE__ */ React44.createElement("span", null, __17("Linear Gradient", "elementor"));
|
|
2726
2863
|
}
|
|
2727
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ React44.createElement("span", null, __17("Radial Gradient", "elementor"));
|
|
2728
2865
|
};
|
|
2729
2866
|
var ColorOverlayContent = () => {
|
|
2730
2867
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
2731
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ React44.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React44.createElement(ColorControl, null)));
|
|
2732
2869
|
};
|
|
2733
2870
|
var ImageOverlayContent = () => {
|
|
2734
2871
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
2735
|
-
return /* @__PURE__ */
|
|
2872
|
+
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
2873
|
ImageControl,
|
|
2737
2874
|
{
|
|
2738
2875
|
resolutionLabel: __17("Resolution", "elementor"),
|
|
2739
2876
|
sizes: backgroundResolutionOptions
|
|
2740
2877
|
}
|
|
2741
|
-
)))), /* @__PURE__ */
|
|
2878
|
+
)))), /* @__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
2879
|
};
|
|
2743
2880
|
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
|
|
2744
2881
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -2776,7 +2913,7 @@ var getGradientValue = (value) => {
|
|
|
2776
2913
|
// src/controls/background-control/background-control.tsx
|
|
2777
2914
|
var BackgroundControl = createControl(() => {
|
|
2778
2915
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
2779
|
-
return /* @__PURE__ */
|
|
2916
|
+
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
2917
|
});
|
|
2781
2918
|
export {
|
|
2782
2919
|
BackgroundControl,
|