@elementor/editor-editing-panel 1.15.0 → 1.17.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 +58 -0
- package/dist/index.js +306 -232
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +211 -137
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/components/css-classes/css-class-menu.tsx +1 -1
- package/src/components/css-classes/css-class-selector.tsx +1 -1
- package/src/components/editing-panel.tsx +2 -0
- package/src/components/style-sections/border-section/border-radius-field.tsx +1 -0
- package/src/components/style-sections/border-section/border-width-field.tsx +19 -10
- package/src/components/style-sections/layout-section/flex-size-field.tsx +1 -1
- package/src/components/style-sections/position-section/dimensions-field.tsx +24 -12
- package/src/components/style-sections/position-section/position-section.tsx +12 -12
- package/src/components/style-sections/position-section/z-index-field.tsx +1 -1
- package/src/components/style-sections/size-section/size-section.tsx +18 -9
- package/src/components/style-sections/spacing-section/spacing-section.tsx +9 -2
- package/src/components/style-sections/typography-section/font-family-field.tsx +34 -2
- package/src/components/style-sections/typography-section/font-weight-field.tsx +3 -3
- package/src/components/style-sections/typography-section/text-direction-field.tsx +4 -2
- package/src/dynamics/components/dynamic-selection-control.tsx +1 -1
- package/src/dynamics/components/dynamic-selection.tsx +19 -12
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +1 -1
- package/src/styles-inheritance/create-snapshots-manager.ts +179 -0
- package/src/styles-inheritance/create-styles-inheritance.ts +50 -0
- package/src/styles-inheritance/types.ts +42 -0
- package/src/styles-inheritance/utils.ts +10 -0
package/dist/index.mjs
CHANGED
|
@@ -281,7 +281,7 @@ function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl })
|
|
|
281
281
|
onKeyDown: handleKeyDown
|
|
282
282
|
},
|
|
283
283
|
getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
|
|
284
|
-
/* @__PURE__ */ React5.createElement(ListSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("Pseudo
|
|
284
|
+
/* @__PURE__ */ React5.createElement(ListSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("Pseudo classes", "elementor")),
|
|
285
285
|
STATES.map((state) => {
|
|
286
286
|
return /* @__PURE__ */ React5.createElement(StateMenuItem, { key: state, state, styleId });
|
|
287
287
|
})
|
|
@@ -459,7 +459,7 @@ function CssClassSelector() {
|
|
|
459
459
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
460
460
|
const applied = useAppliedOptions(options11, appliedIds);
|
|
461
461
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
462
|
-
return /* @__PURE__ */ React7.createElement(Stack2, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("CSS
|
|
462
|
+
return /* @__PURE__ */ React7.createElement(Stack2, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("CSS classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
463
463
|
MultiCombobox,
|
|
464
464
|
{
|
|
465
465
|
id: ID,
|
|
@@ -606,6 +606,7 @@ import * as React63 from "react";
|
|
|
606
606
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
607
607
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
608
608
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
609
|
+
import { RocketIcon } from "@elementor/icons";
|
|
609
610
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
610
611
|
import { ErrorBoundary } from "@elementor/ui";
|
|
611
612
|
import { __ as __42 } from "@wordpress/i18n";
|
|
@@ -1027,7 +1028,7 @@ import { Stack as Stack5 } from "@elementor/ui";
|
|
|
1027
1028
|
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React19.createElement(Stack5, { gap, sx: { ...sx } }, children);
|
|
1028
1029
|
|
|
1029
1030
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1030
|
-
import * as
|
|
1031
|
+
import * as React25 from "react";
|
|
1031
1032
|
import { __ as __8 } from "@wordpress/i18n";
|
|
1032
1033
|
|
|
1033
1034
|
// src/components/add-or-remove-content.tsx
|
|
@@ -1081,40 +1082,88 @@ var BorderStyleField = () => {
|
|
|
1081
1082
|
};
|
|
1082
1083
|
|
|
1083
1084
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1084
|
-
import * as
|
|
1085
|
+
import * as React24 from "react";
|
|
1085
1086
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
1086
1087
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
1087
1088
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1089
|
+
import { withDirection } from "@elementor/ui";
|
|
1088
1090
|
import { __ as __7 } from "@wordpress/i18n";
|
|
1089
|
-
|
|
1091
|
+
|
|
1092
|
+
// src/hooks/use-direction.ts
|
|
1093
|
+
import { useTheme } from "@elementor/ui";
|
|
1094
|
+
function useDirection() {
|
|
1095
|
+
const theme = useTheme(), extendedWindow = window;
|
|
1096
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1097
|
+
return { isSiteRtl, isUiRtl };
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1101
|
+
import * as React23 from "react";
|
|
1102
|
+
import { useRef } from "react";
|
|
1103
|
+
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1104
|
+
var CLOCKWISE_ANGLES = {
|
|
1105
|
+
row: 0,
|
|
1106
|
+
column: 90,
|
|
1107
|
+
"row-reverse": 180,
|
|
1108
|
+
"column-reverse": 270
|
|
1109
|
+
};
|
|
1110
|
+
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1111
|
+
row: 0,
|
|
1112
|
+
column: -90,
|
|
1113
|
+
"row-reverse": -180,
|
|
1114
|
+
"column-reverse": -270
|
|
1115
|
+
};
|
|
1116
|
+
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1117
|
+
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1118
|
+
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1119
|
+
return /* @__PURE__ */ React23.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1120
|
+
};
|
|
1121
|
+
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1122
|
+
const [direction] = useStylesField("flex-direction");
|
|
1123
|
+
const isRtl = "rtl" === useTheme2().direction;
|
|
1124
|
+
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1125
|
+
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1126
|
+
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
1127
|
+
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
1128
|
+
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1129
|
+
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1130
|
+
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1134
|
+
var InlineStartIcon = withDirection(SideRightIcon);
|
|
1135
|
+
var InlineEndIcon = withDirection(SideLeftIcon);
|
|
1136
|
+
var getEdges = (isSiteRtl) => [
|
|
1090
1137
|
{
|
|
1091
1138
|
label: __7("Top", "elementor"),
|
|
1092
|
-
icon: /* @__PURE__ */
|
|
1093
|
-
bind: "
|
|
1139
|
+
icon: /* @__PURE__ */ React24.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1140
|
+
bind: "block-start"
|
|
1094
1141
|
},
|
|
1095
1142
|
{
|
|
1096
|
-
label: __7("Right", "elementor"),
|
|
1097
|
-
icon: /* @__PURE__ */
|
|
1098
|
-
bind: "
|
|
1143
|
+
label: isSiteRtl ? __7("Left", "elementor") : __7("Right", "elementor"),
|
|
1144
|
+
icon: /* @__PURE__ */ React24.createElement(RotatedIcon, { icon: InlineStartIcon, size: "tiny" }),
|
|
1145
|
+
bind: "inline-end"
|
|
1099
1146
|
},
|
|
1100
1147
|
{
|
|
1101
1148
|
label: __7("Bottom", "elementor"),
|
|
1102
|
-
icon: /* @__PURE__ */
|
|
1103
|
-
bind: "
|
|
1149
|
+
icon: /* @__PURE__ */ React24.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1150
|
+
bind: "block-end"
|
|
1104
1151
|
},
|
|
1105
1152
|
{
|
|
1106
|
-
label: __7("Left", "elementor"),
|
|
1107
|
-
icon: /* @__PURE__ */
|
|
1108
|
-
bind: "
|
|
1153
|
+
label: isSiteRtl ? __7("Right", "elementor") : __7("Left", "elementor"),
|
|
1154
|
+
icon: /* @__PURE__ */ React24.createElement(RotatedIcon, { icon: InlineEndIcon, size: "tiny" }),
|
|
1155
|
+
bind: "inline-start"
|
|
1109
1156
|
}
|
|
1110
1157
|
];
|
|
1111
1158
|
var BorderWidthField = () => {
|
|
1112
|
-
|
|
1159
|
+
const { isSiteRtl } = useDirection();
|
|
1160
|
+
return /* @__PURE__ */ React24.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React24.createElement(
|
|
1113
1161
|
EqualUnequalSizesControl,
|
|
1114
1162
|
{
|
|
1115
|
-
items:
|
|
1163
|
+
items: getEdges(isSiteRtl),
|
|
1116
1164
|
label: __7("Border width", "elementor"),
|
|
1117
|
-
icon: /* @__PURE__ */
|
|
1165
|
+
icon: /* @__PURE__ */ React24.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
1166
|
+
tooltipLabel: __7("Adjust borders", "elementor"),
|
|
1118
1167
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
1119
1168
|
}
|
|
1120
1169
|
));
|
|
@@ -1139,7 +1188,7 @@ var BorderField = () => {
|
|
|
1139
1188
|
});
|
|
1140
1189
|
};
|
|
1141
1190
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1142
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1143
1192
|
AddOrRemoveContent,
|
|
1144
1193
|
{
|
|
1145
1194
|
label: __8("Border", "elementor"),
|
|
@@ -1147,9 +1196,9 @@ var BorderField = () => {
|
|
|
1147
1196
|
onAdd: addBorder,
|
|
1148
1197
|
onRemove: removeBorder
|
|
1149
1198
|
},
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1199
|
+
/* @__PURE__ */ React25.createElement(BorderWidthField, null),
|
|
1200
|
+
/* @__PURE__ */ React25.createElement(BorderColorField, null),
|
|
1201
|
+
/* @__PURE__ */ React25.createElement(BorderStyleField, null)
|
|
1153
1202
|
);
|
|
1154
1203
|
};
|
|
1155
1204
|
|
|
@@ -1164,55 +1213,12 @@ import {
|
|
|
1164
1213
|
RadiusTopLeftIcon,
|
|
1165
1214
|
RadiusTopRightIcon
|
|
1166
1215
|
} from "@elementor/icons";
|
|
1167
|
-
import { withDirection } from "@elementor/ui";
|
|
1216
|
+
import { withDirection as withDirection2 } from "@elementor/ui";
|
|
1168
1217
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
const theme = useTheme(), extendedWindow = window;
|
|
1174
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1175
|
-
return { isSiteRtl, isUiRtl };
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1179
|
-
import * as React25 from "react";
|
|
1180
|
-
import { useRef } from "react";
|
|
1181
|
-
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1182
|
-
var CLOCKWISE_ANGLES = {
|
|
1183
|
-
row: 0,
|
|
1184
|
-
column: 90,
|
|
1185
|
-
"row-reverse": 180,
|
|
1186
|
-
"column-reverse": 270
|
|
1187
|
-
};
|
|
1188
|
-
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1189
|
-
row: 0,
|
|
1190
|
-
column: -90,
|
|
1191
|
-
"row-reverse": -180,
|
|
1192
|
-
"column-reverse": -270
|
|
1193
|
-
};
|
|
1194
|
-
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1195
|
-
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1196
|
-
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1197
|
-
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1198
|
-
};
|
|
1199
|
-
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1200
|
-
const [direction] = useStylesField("flex-direction");
|
|
1201
|
-
const isRtl = "rtl" === useTheme2().direction;
|
|
1202
|
-
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1203
|
-
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1204
|
-
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
1205
|
-
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
1206
|
-
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1207
|
-
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1208
|
-
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1209
|
-
};
|
|
1210
|
-
|
|
1211
|
-
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1212
|
-
var StartStartIcon = withDirection(RadiusTopLeftIcon);
|
|
1213
|
-
var StartEndIcon = withDirection(RadiusTopRightIcon);
|
|
1214
|
-
var EndStartIcon = withDirection(RadiusBottomLeftIcon);
|
|
1215
|
-
var EndEndIcon = withDirection(RadiusBottomRightIcon);
|
|
1218
|
+
var StartStartIcon = withDirection2(RadiusTopLeftIcon);
|
|
1219
|
+
var StartEndIcon = withDirection2(RadiusTopRightIcon);
|
|
1220
|
+
var EndStartIcon = withDirection2(RadiusBottomLeftIcon);
|
|
1221
|
+
var EndEndIcon = withDirection2(RadiusBottomRightIcon);
|
|
1216
1222
|
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __9("Top right", "elementor") : __9("Top left", "elementor");
|
|
1217
1223
|
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __9("Top left", "elementor") : __9("Top right", "elementor");
|
|
1218
1224
|
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom right", "elementor") : __9("Bottom left", "elementor");
|
|
@@ -1247,6 +1253,7 @@ var BorderRadiusField = () => {
|
|
|
1247
1253
|
items: getCorners(isSiteRtl),
|
|
1248
1254
|
label: __9("Border radius", "elementor"),
|
|
1249
1255
|
icon: /* @__PURE__ */ React26.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
1256
|
+
tooltipLabel: __9("Adjust corners", "elementor"),
|
|
1250
1257
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
1251
1258
|
}
|
|
1252
1259
|
));
|
|
@@ -1302,10 +1309,10 @@ import {
|
|
|
1302
1309
|
LayoutAlignRightIcon,
|
|
1303
1310
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
1304
1311
|
} from "@elementor/icons";
|
|
1305
|
-
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection as
|
|
1312
|
+
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection as withDirection3 } from "@elementor/ui";
|
|
1306
1313
|
import { __ as __10 } from "@wordpress/i18n";
|
|
1307
|
-
var StartIcon =
|
|
1308
|
-
var EndIcon =
|
|
1314
|
+
var StartIcon = withDirection3(LayoutAlignLeftIcon);
|
|
1315
|
+
var EndIcon = withDirection3(LayoutAlignRightIcon);
|
|
1309
1316
|
var iconProps = {
|
|
1310
1317
|
isClockwise: false,
|
|
1311
1318
|
offset: 90
|
|
@@ -1350,10 +1357,10 @@ import {
|
|
|
1350
1357
|
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
1351
1358
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
1352
1359
|
} from "@elementor/icons";
|
|
1353
|
-
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as
|
|
1360
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as withDirection4 } from "@elementor/ui";
|
|
1354
1361
|
import { __ as __11 } from "@wordpress/i18n";
|
|
1355
|
-
var StartIcon2 =
|
|
1356
|
-
var EndIcon2 =
|
|
1362
|
+
var StartIcon2 = withDirection4(LayoutAlignLeftIcon2);
|
|
1363
|
+
var EndIcon2 = withDirection4(LayoutAlignRightIcon2);
|
|
1357
1364
|
var iconProps2 = {
|
|
1358
1365
|
isClockwise: false,
|
|
1359
1366
|
offset: 90
|
|
@@ -1428,14 +1435,14 @@ var DisplayField = () => {
|
|
|
1428
1435
|
import * as React32 from "react";
|
|
1429
1436
|
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1430
1437
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1431
|
-
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as
|
|
1438
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
|
|
1432
1439
|
import { __ as __13 } from "@wordpress/i18n";
|
|
1433
1440
|
var options3 = [
|
|
1434
1441
|
{
|
|
1435
1442
|
value: "row",
|
|
1436
1443
|
label: __13("Row", "elementor"),
|
|
1437
1444
|
renderContent: ({ size }) => {
|
|
1438
|
-
const StartIcon5 =
|
|
1445
|
+
const StartIcon5 = withDirection5(ArrowRightIcon);
|
|
1439
1446
|
return /* @__PURE__ */ React32.createElement(StartIcon5, { fontSize: size });
|
|
1440
1447
|
},
|
|
1441
1448
|
showTooltip: true
|
|
@@ -1450,7 +1457,7 @@ var options3 = [
|
|
|
1450
1457
|
value: "row-reverse",
|
|
1451
1458
|
label: __13("Reversed row", "elementor"),
|
|
1452
1459
|
renderContent: ({ size }) => {
|
|
1453
|
-
const EndIcon5 =
|
|
1460
|
+
const EndIcon5 = withDirection5(ArrowLeftIcon);
|
|
1454
1461
|
return /* @__PURE__ */ React32.createElement(EndIcon5, { fontSize: size });
|
|
1455
1462
|
},
|
|
1456
1463
|
showTooltip: true
|
|
@@ -1608,7 +1615,7 @@ var FlexSizeField = () => {
|
|
|
1608
1615
|
}
|
|
1609
1616
|
))), "custom" === activeGroup && /* @__PURE__ */ React34.createElement(FlexCustomField, null))));
|
|
1610
1617
|
};
|
|
1611
|
-
var FlexCustomField = () => /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React34.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel10, null, __15("Grow", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React34.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel10, null, __15("Shrink", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React34.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel10, null, __15("Basis", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(SizeControl2,
|
|
1618
|
+
var FlexCustomField = () => /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React34.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel10, null, __15("Grow", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React34.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel10, null, __15("Shrink", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React34.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel10, null, __15("Basis", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(SizeControl2, { extendedValues: ["auto"] })))));
|
|
1612
1619
|
var getActiveGroup = ({
|
|
1613
1620
|
grow,
|
|
1614
1621
|
shrink,
|
|
@@ -1649,10 +1656,10 @@ import {
|
|
|
1649
1656
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1650
1657
|
JustifyTopIcon
|
|
1651
1658
|
} from "@elementor/icons";
|
|
1652
|
-
import { DirectionProvider as DirectionProvider6, Stack as Stack9, ThemeProvider as ThemeProvider6, withDirection as
|
|
1659
|
+
import { DirectionProvider as DirectionProvider6, Stack as Stack9, ThemeProvider as ThemeProvider6, withDirection as withDirection6 } from "@elementor/ui";
|
|
1653
1660
|
import { __ as __17 } from "@wordpress/i18n";
|
|
1654
|
-
var StartIcon3 =
|
|
1655
|
-
var EndIcon3 =
|
|
1661
|
+
var StartIcon3 = withDirection6(JustifyTopIcon);
|
|
1662
|
+
var EndIcon3 = withDirection6(JustifyBottomIcon);
|
|
1656
1663
|
var iconProps3 = {
|
|
1657
1664
|
isClockwise: true,
|
|
1658
1665
|
offset: -90
|
|
@@ -1750,19 +1757,24 @@ import { useSessionStorage } from "@elementor/session";
|
|
|
1750
1757
|
import * as React39 from "react";
|
|
1751
1758
|
import { ControlLabel as ControlLabel14, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1752
1759
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1753
|
-
import { Grid as Grid9, Stack as Stack10 } from "@elementor/ui";
|
|
1760
|
+
import { Grid as Grid9, Stack as Stack10, withDirection as withDirection7 } from "@elementor/ui";
|
|
1754
1761
|
import { __ as __20 } from "@wordpress/i18n";
|
|
1762
|
+
var InlineStartIcon2 = withDirection7(SideLeftIcon2);
|
|
1763
|
+
var InlineEndIcon2 = withDirection7(SideRightIcon2);
|
|
1755
1764
|
var sideIcons = {
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1765
|
+
"inset-block-start": /* @__PURE__ */ React39.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
1766
|
+
"inset-block-end": /* @__PURE__ */ React39.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
1767
|
+
"inset-inline-start": /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
1768
|
+
"inset-inline-end": /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
1760
1769
|
};
|
|
1770
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __20("Right", "elementor") : __20("Left", "elementor");
|
|
1771
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __20("Left", "elementor") : __20("Right", "elementor");
|
|
1761
1772
|
var DimensionsField = () => {
|
|
1762
|
-
|
|
1773
|
+
const { isSiteRtl } = useDirection();
|
|
1774
|
+
return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(DimensionField, { side: "inset-block-start", label: __20("Top", "elementor") }), /* @__PURE__ */ React39.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })), /* @__PURE__ */ React39.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(DimensionField, { side: "inset-block-end", label: __20("Bottom", "elementor") }), /* @__PURE__ */ React39.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })));
|
|
1763
1775
|
};
|
|
1764
1776
|
var DimensionField = ({ side, label }) => {
|
|
1765
|
-
return /* @__PURE__ */ React39.createElement(Grid9, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlLabel14, null, label)), /* @__PURE__ */ React39.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(StylesField, { bind: side }, /* @__PURE__ */ React39.createElement(SizeControl3, { startIcon: sideIcons[side] }))));
|
|
1777
|
+
return /* @__PURE__ */ React39.createElement(Grid9, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlLabel14, null, label)), /* @__PURE__ */ React39.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(StylesField, { bind: side }, /* @__PURE__ */ React39.createElement(SizeControl3, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
1766
1778
|
};
|
|
1767
1779
|
|
|
1768
1780
|
// src/components/style-sections/position-section/position-field.tsx
|
|
@@ -1787,17 +1799,17 @@ import { ControlLabel as ControlLabel16, NumberControl as NumberControl3 } from
|
|
|
1787
1799
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
1788
1800
|
import { __ as __22 } from "@wordpress/i18n";
|
|
1789
1801
|
var ZIndexField = () => {
|
|
1790
|
-
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React41.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel16, null, __22("Z-
|
|
1802
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React41.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel16, null, __22("Z-index", "elementor"))), /* @__PURE__ */ React41.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(NumberControl3, null))));
|
|
1791
1803
|
};
|
|
1792
1804
|
|
|
1793
1805
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1794
1806
|
var PositionSection = () => {
|
|
1795
1807
|
const [positionValue] = useStylesField("position");
|
|
1796
1808
|
const [dimensionsValues, setDimensionsValues] = useStylesFields([
|
|
1797
|
-
"
|
|
1798
|
-
"
|
|
1799
|
-
"
|
|
1800
|
-
"
|
|
1809
|
+
"inset-block-start",
|
|
1810
|
+
"inset-block-end",
|
|
1811
|
+
"inset-inline-start",
|
|
1812
|
+
"inset-inline-end"
|
|
1801
1813
|
]);
|
|
1802
1814
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
1803
1815
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
@@ -1805,10 +1817,10 @@ var PositionSection = () => {
|
|
|
1805
1817
|
if (dimensionsValues) {
|
|
1806
1818
|
updateDimensionsHistory(dimensionsValues);
|
|
1807
1819
|
setDimensionsValues({
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1820
|
+
"inset-block-start": void 0,
|
|
1821
|
+
"inset-block-end": void 0,
|
|
1822
|
+
"inset-inline-start": void 0,
|
|
1823
|
+
"inset-inline-end": void 0
|
|
1812
1824
|
});
|
|
1813
1825
|
}
|
|
1814
1826
|
} else if (previousPosition === "static") {
|
|
@@ -1866,10 +1878,24 @@ var OverflowField = () => {
|
|
|
1866
1878
|
|
|
1867
1879
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1868
1880
|
var SizeSection = () => {
|
|
1869
|
-
return /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "width", label: __24("Width", "elementor")
|
|
1881
|
+
return /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "width", label: __24("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "height", label: __24("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React44.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(
|
|
1882
|
+
SizeField,
|
|
1883
|
+
{
|
|
1884
|
+
bind: "min-width",
|
|
1885
|
+
label: __24("Min width", "elementor"),
|
|
1886
|
+
extendedValues: ["auto"]
|
|
1887
|
+
}
|
|
1888
|
+
)), /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(
|
|
1889
|
+
SizeField,
|
|
1890
|
+
{
|
|
1891
|
+
bind: "min-height",
|
|
1892
|
+
label: __24("Min height", "elementor"),
|
|
1893
|
+
extendedValues: ["auto"]
|
|
1894
|
+
}
|
|
1895
|
+
))), /* @__PURE__ */ React44.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "max-width", label: __24("Max width", "elementor") })), /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "max-height", label: __24("Max height", "elementor") }))), /* @__PURE__ */ React44.createElement(PanelDivider, null), /* @__PURE__ */ React44.createElement(Stack11, null, /* @__PURE__ */ React44.createElement(OverflowField, null)));
|
|
1870
1896
|
};
|
|
1871
|
-
var SizeField = ({ label, bind }) => {
|
|
1872
|
-
return /* @__PURE__ */ React44.createElement(StylesField, { bind }, /* @__PURE__ */ React44.createElement(Grid13, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(ControlLabel18, null, label)), /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(SizeControl4,
|
|
1897
|
+
var SizeField = ({ label, bind, extendedValues }) => {
|
|
1898
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind }, /* @__PURE__ */ React44.createElement(Grid13, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(ControlLabel18, null, label)), /* @__PURE__ */ React44.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(SizeControl4, { extendedValues }))));
|
|
1873
1899
|
};
|
|
1874
1900
|
|
|
1875
1901
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
@@ -1877,7 +1903,15 @@ import * as React45 from "react";
|
|
|
1877
1903
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1878
1904
|
import { __ as __25 } from "@wordpress/i18n";
|
|
1879
1905
|
var SpacingSection = () => {
|
|
1880
|
-
|
|
1906
|
+
const { isSiteRtl } = useDirection();
|
|
1907
|
+
return /* @__PURE__ */ React45.createElement(SectionContent, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React45.createElement(LinkedDimensionsControl, { label: __25("Padding", "elementor"), isSiteRtl })), /* @__PURE__ */ React45.createElement(PanelDivider, null), /* @__PURE__ */ React45.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React45.createElement(
|
|
1908
|
+
LinkedDimensionsControl,
|
|
1909
|
+
{
|
|
1910
|
+
label: __25("Margin", "elementor"),
|
|
1911
|
+
isSiteRtl,
|
|
1912
|
+
extendedValues: ["auto"]
|
|
1913
|
+
}
|
|
1914
|
+
)));
|
|
1881
1915
|
};
|
|
1882
1916
|
|
|
1883
1917
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
@@ -1910,6 +1944,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1910
1944
|
|
|
1911
1945
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1912
1946
|
import * as React47 from "react";
|
|
1947
|
+
import { useMemo as useMemo3 } from "react";
|
|
1913
1948
|
import { ControlLabel as ControlLabel19, FontFamilyControl } from "@elementor/editor-controls";
|
|
1914
1949
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
1915
1950
|
import { __ as __27 } from "@wordpress/i18n";
|
|
@@ -1921,9 +1956,14 @@ var getElementorConfig = () => {
|
|
|
1921
1956
|
};
|
|
1922
1957
|
|
|
1923
1958
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1959
|
+
var supportedCategories = {
|
|
1960
|
+
system: __27("System", "elementor"),
|
|
1961
|
+
custom: __27("Custom Fonts", "elementor"),
|
|
1962
|
+
googlefonts: __27("Google Fonts", "elementor")
|
|
1963
|
+
};
|
|
1924
1964
|
var FontFamilyField = () => {
|
|
1925
|
-
const fontFamilies =
|
|
1926
|
-
if (
|
|
1965
|
+
const fontFamilies = useFontFamilies();
|
|
1966
|
+
if (Object.keys(fontFamilies).length === 0) {
|
|
1927
1967
|
return null;
|
|
1928
1968
|
}
|
|
1929
1969
|
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React47.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel19, null, __27("Font family", "elementor"))), /* @__PURE__ */ React47.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React47.createElement(FontFamilyControl, { fontFamilies }))));
|
|
@@ -1936,6 +1976,24 @@ var getFontFamilies = () => {
|
|
|
1936
1976
|
}
|
|
1937
1977
|
return options11;
|
|
1938
1978
|
};
|
|
1979
|
+
var useFontFamilies = () => {
|
|
1980
|
+
const fontFamilies = getFontFamilies();
|
|
1981
|
+
return useMemo3(
|
|
1982
|
+
() => Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
1983
|
+
const categoryLabel = supportedCategories[category];
|
|
1984
|
+
const existingCategory = acc[categoryLabel];
|
|
1985
|
+
if (!categoryLabel) {
|
|
1986
|
+
return acc;
|
|
1987
|
+
}
|
|
1988
|
+
if (!existingCategory) {
|
|
1989
|
+
acc[categoryLabel] = [];
|
|
1990
|
+
}
|
|
1991
|
+
acc[categoryLabel].push(font);
|
|
1992
|
+
return acc;
|
|
1993
|
+
}, {}),
|
|
1994
|
+
[fontFamilies]
|
|
1995
|
+
);
|
|
1996
|
+
};
|
|
1939
1997
|
|
|
1940
1998
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1941
1999
|
import * as React48 from "react";
|
|
@@ -1975,13 +2033,13 @@ import { Grid as Grid17 } from "@elementor/ui";
|
|
|
1975
2033
|
import { __ as __30 } from "@wordpress/i18n";
|
|
1976
2034
|
var fontWeightOptions = [
|
|
1977
2035
|
{ value: "100", label: __30("100 - Thin", "elementor") },
|
|
1978
|
-
{ value: "200", label: __30("200 - Extra
|
|
2036
|
+
{ value: "200", label: __30("200 - Extra light", "elementor") },
|
|
1979
2037
|
{ value: "300", label: __30("300 - Light", "elementor") },
|
|
1980
2038
|
{ value: "400", label: __30("400 - Normal", "elementor") },
|
|
1981
2039
|
{ value: "500", label: __30("500 - Medium", "elementor") },
|
|
1982
|
-
{ value: "600", label: __30("600 - Semi
|
|
2040
|
+
{ value: "600", label: __30("600 - Semi bold", "elementor") },
|
|
1983
2041
|
{ value: "700", label: __30("700 - Bold", "elementor") },
|
|
1984
|
-
{ value: "800", label: __30("800 - Extra
|
|
2042
|
+
{ value: "800", label: __30("800 - Extra bold", "elementor") },
|
|
1985
2043
|
{ value: "900", label: __30("900 - Black", "elementor") }
|
|
1986
2044
|
];
|
|
1987
2045
|
var FontWeightField = () => {
|
|
@@ -2010,10 +2068,10 @@ var LineHeightField = () => {
|
|
|
2010
2068
|
import * as React53 from "react";
|
|
2011
2069
|
import { ControlLabel as ControlLabel25, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2012
2070
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
2013
|
-
import { Grid as Grid20, withDirection as
|
|
2071
|
+
import { Grid as Grid20, withDirection as withDirection8 } from "@elementor/ui";
|
|
2014
2072
|
import { __ as __33 } from "@wordpress/i18n";
|
|
2015
|
-
var StartIcon4 =
|
|
2016
|
-
var EndIcon4 =
|
|
2073
|
+
var StartIcon4 = withDirection8(AlignLeftIcon);
|
|
2074
|
+
var EndIcon4 = withDirection8(AlignRightIcon);
|
|
2017
2075
|
var options8 = [
|
|
2018
2076
|
{
|
|
2019
2077
|
value: "start",
|
|
@@ -2126,13 +2184,15 @@ import { __ as __36 } from "@wordpress/i18n";
|
|
|
2126
2184
|
var options9 = [
|
|
2127
2185
|
{
|
|
2128
2186
|
value: "ltr",
|
|
2129
|
-
label: __36("Left to
|
|
2130
|
-
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
2187
|
+
label: __36("Left to right", "elementor"),
|
|
2188
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
2189
|
+
showTooltip: true
|
|
2131
2190
|
},
|
|
2132
2191
|
{
|
|
2133
2192
|
value: "rtl",
|
|
2134
|
-
label: __36("Right to
|
|
2135
|
-
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
2193
|
+
label: __36("Right to left", "elementor"),
|
|
2194
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
2195
|
+
showTooltip: true
|
|
2136
2196
|
}
|
|
2137
2197
|
];
|
|
2138
2198
|
var TextDirectionField = () => {
|
|
@@ -2292,7 +2352,7 @@ var EditingPanel = () => {
|
|
|
2292
2352
|
return null;
|
|
2293
2353
|
}
|
|
2294
2354
|
const panelTitle = __42("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2295
|
-
return /* @__PURE__ */ React63.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React63.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React63.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React63.createElement(Panel, null, /* @__PURE__ */ React63.createElement(PanelHeader, null, /* @__PURE__ */ React63.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React63.createElement(PanelBody, null, /* @__PURE__ */ React63.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React63.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React63.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React63.createElement(EditingPanelTabs, null))))))));
|
|
2355
|
+
return /* @__PURE__ */ React63.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React63.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React63.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React63.createElement(Panel, null, /* @__PURE__ */ React63.createElement(PanelHeader, null, /* @__PURE__ */ React63.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React63.createElement(RocketIcon, { fontSize: "small", sx: { color: "text.disabled" } })), /* @__PURE__ */ React63.createElement(PanelBody, null, /* @__PURE__ */ React63.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React63.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React63.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React63.createElement(EditingPanelTabs, null))))))));
|
|
2296
2356
|
};
|
|
2297
2357
|
|
|
2298
2358
|
// src/panel.ts
|
|
@@ -2362,7 +2422,7 @@ var EditingPanelHooks = () => {
|
|
|
2362
2422
|
import * as React67 from "react";
|
|
2363
2423
|
import { useId as useId4 } from "react";
|
|
2364
2424
|
import { ControlLabel as ControlLabel31, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2365
|
-
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2425
|
+
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2366
2426
|
import {
|
|
2367
2427
|
bindPopover as bindPopover2,
|
|
2368
2428
|
bindTrigger as bindTrigger2,
|
|
@@ -2401,10 +2461,10 @@ import * as React65 from "react";
|
|
|
2401
2461
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2402
2462
|
|
|
2403
2463
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2404
|
-
import { useMemo as
|
|
2464
|
+
import { useMemo as useMemo5 } from "react";
|
|
2405
2465
|
|
|
2406
2466
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2407
|
-
import { useMemo as
|
|
2467
|
+
import { useMemo as useMemo4 } from "react";
|
|
2408
2468
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
2409
2469
|
|
|
2410
2470
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -2459,7 +2519,7 @@ var usePropDynamicTags = () => {
|
|
|
2459
2519
|
const propDynamicType = getDynamicPropType(propType);
|
|
2460
2520
|
categories = propDynamicType?.settings.categories || [];
|
|
2461
2521
|
}
|
|
2462
|
-
return
|
|
2522
|
+
return useMemo4(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
2463
2523
|
};
|
|
2464
2524
|
var getDynamicTagsByCategories = (categories) => {
|
|
2465
2525
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -2475,7 +2535,7 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
2475
2535
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2476
2536
|
var useDynamicTag = (tagName) => {
|
|
2477
2537
|
const dynamicTags = usePropDynamicTags();
|
|
2478
|
-
return
|
|
2538
|
+
return useMemo5(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
2479
2539
|
};
|
|
2480
2540
|
|
|
2481
2541
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -2506,7 +2566,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2506
2566
|
import * as React66 from "react";
|
|
2507
2567
|
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2508
2568
|
import { useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2509
|
-
import {
|
|
2569
|
+
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
2510
2570
|
import {
|
|
2511
2571
|
Box as Box4,
|
|
2512
2572
|
Divider as Divider6,
|
|
@@ -2546,7 +2606,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2546
2606
|
size: SIZE3,
|
|
2547
2607
|
value: searchValue,
|
|
2548
2608
|
onChange: handleSearch,
|
|
2549
|
-
placeholder: __43("Search dynamic
|
|
2609
|
+
placeholder: __43("Search dynamic tags\u2026", "elementor"),
|
|
2550
2610
|
InputProps: {
|
|
2551
2611
|
startAdornment: /* @__PURE__ */ React66.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React66.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2552
2612
|
}
|
|
@@ -2564,16 +2624,30 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2564
2624
|
},
|
|
2565
2625
|
tagLabel
|
|
2566
2626
|
);
|
|
2567
|
-
})))) : /* @__PURE__ */ React66.createElement(
|
|
2568
|
-
|
|
2627
|
+
})))) : /* @__PURE__ */ React66.createElement(
|
|
2628
|
+
Stack15,
|
|
2569
2629
|
{
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2630
|
+
gap: 1,
|
|
2631
|
+
alignItems: "center",
|
|
2632
|
+
justifyContent: "center",
|
|
2633
|
+
height: "100%",
|
|
2634
|
+
p: 2.5,
|
|
2635
|
+
color: "text.secondary",
|
|
2636
|
+
sx: { pb: 3.5 }
|
|
2574
2637
|
},
|
|
2575
|
-
|
|
2576
|
-
|
|
2638
|
+
/* @__PURE__ */ React66.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
2639
|
+
/* @__PURE__ */ React66.createElement(Typography4, { align: "center", variant: "subtitle2" }, __43("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React66.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
2640
|
+
/* @__PURE__ */ React66.createElement(Typography4, { align: "center", variant: "caption" }, __43("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React66.createElement(
|
|
2641
|
+
Link,
|
|
2642
|
+
{
|
|
2643
|
+
color: "text.secondary",
|
|
2644
|
+
variant: "caption",
|
|
2645
|
+
component: "button",
|
|
2646
|
+
onClick: () => setSearchValue("")
|
|
2647
|
+
},
|
|
2648
|
+
__43("Clear & try again", "elementor")
|
|
2649
|
+
))
|
|
2650
|
+
)));
|
|
2577
2651
|
};
|
|
2578
2652
|
var useFilteredOptions = (searchValue) => {
|
|
2579
2653
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -2613,7 +2687,7 @@ var DynamicSelectionControl = () => {
|
|
|
2613
2687
|
fullWidth: true,
|
|
2614
2688
|
showActionsOnHover: true,
|
|
2615
2689
|
label: dynamicTag.label,
|
|
2616
|
-
startIcon: /* @__PURE__ */ React67.createElement(
|
|
2690
|
+
startIcon: /* @__PURE__ */ React67.createElement(DatabaseIcon2, { fontSize: SIZE4 }),
|
|
2617
2691
|
...bindTrigger2(selectionPopoverState),
|
|
2618
2692
|
actions: /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React67.createElement(
|
|
2619
2693
|
IconButton3,
|
|
@@ -2633,7 +2707,7 @@ var DynamicSelectionControl = () => {
|
|
|
2633
2707
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2634
2708
|
...bindPopover2(selectionPopoverState)
|
|
2635
2709
|
},
|
|
2636
|
-
/* @__PURE__ */ React67.createElement(Stack16, null, /* @__PURE__ */ React67.createElement(Stack16, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React67.createElement(
|
|
2710
|
+
/* @__PURE__ */ React67.createElement(Stack16, null, /* @__PURE__ */ React67.createElement(Stack16, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React67.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React67.createElement(Typography5, { variant: "subtitle2" }, __44("Dynamic tags", "elementor")), /* @__PURE__ */ React67.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React67.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React67.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2637
2711
|
));
|
|
2638
2712
|
};
|
|
2639
2713
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -2658,7 +2732,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2658
2732
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2659
2733
|
...bindPopover2(settingsPopupState)
|
|
2660
2734
|
},
|
|
2661
|
-
/* @__PURE__ */ React67.createElement(Paper, { component: Stack16, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React67.createElement(Stack16, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React67.createElement(
|
|
2735
|
+
/* @__PURE__ */ React67.createElement(Paper, { component: Stack16, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React67.createElement(Stack16, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React67.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React67.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React67.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React67.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React67.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2662
2736
|
));
|
|
2663
2737
|
};
|
|
2664
2738
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2686,15 +2760,15 @@ var Control3 = ({ control }) => {
|
|
|
2686
2760
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2687
2761
|
import * as React68 from "react";
|
|
2688
2762
|
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2689
|
-
import { DatabaseIcon as
|
|
2763
|
+
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
2690
2764
|
import { __ as __45 } from "@wordpress/i18n";
|
|
2691
2765
|
var usePropDynamicAction = () => {
|
|
2692
2766
|
const { propType } = useBoundProp5();
|
|
2693
2767
|
const visible = !!propType && supportsDynamic(propType);
|
|
2694
2768
|
return {
|
|
2695
2769
|
visible,
|
|
2696
|
-
icon:
|
|
2697
|
-
title: __45("Dynamic
|
|
2770
|
+
icon: DatabaseIcon3,
|
|
2771
|
+
title: __45("Dynamic tags", "elementor"),
|
|
2698
2772
|
popoverContent: ({ closePopover }) => /* @__PURE__ */ React68.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2699
2773
|
};
|
|
2700
2774
|
};
|