@elementor/editor-editing-panel 1.18.0 → 1.20.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 +27 -0
- package/dist/index.js +639 -533
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +490 -384
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/control-label-with-adornments.tsx +13 -0
- package/src/components/section.tsx +6 -2
- package/src/components/style-sections/layout-section/display-field.tsx +1 -1
- package/src/components/style-sections/layout-section/justify-content-field.tsx +1 -1
- package/src/components/style-sections/position-section/dimensions-field.tsx +1 -1
- package/src/components/style-sections/size-section/size-section.tsx +1 -1
- package/src/contexts/styles-inheritance-context.tsx +18 -3
- package/src/controls-registry/styles-field.tsx +14 -4
- package/src/dynamics/components/dynamic-selection-control.tsx +1 -1
- package/src/hooks/use-styles-fields.ts +3 -4
- package/src/hooks/use-styles-rerender.ts +10 -0
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +70 -0
package/dist/index.js
CHANGED
|
@@ -32,12 +32,12 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
34
34
|
replaceControl: () => replaceControl,
|
|
35
|
-
useBoundProp: () =>
|
|
35
|
+
useBoundProp: () => import_editor_controls49.useBoundProp,
|
|
36
36
|
usePanelActions: () => usePanelActions,
|
|
37
37
|
usePanelStatus: () => usePanelStatus
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(index_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
41
41
|
|
|
42
42
|
// src/control-replacement.tsx
|
|
43
43
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -661,14 +661,14 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
661
661
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
662
662
|
|
|
663
663
|
// src/components/editing-panel.tsx
|
|
664
|
-
var
|
|
665
|
-
var
|
|
664
|
+
var React65 = __toESM(require("react"));
|
|
665
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
666
666
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
667
667
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
668
668
|
var import_icons22 = require("@elementor/icons");
|
|
669
669
|
var import_session4 = require("@elementor/session");
|
|
670
|
-
var
|
|
671
|
-
var
|
|
670
|
+
var import_ui50 = require("@elementor/ui");
|
|
671
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
672
672
|
|
|
673
673
|
// src/controls-actions.ts
|
|
674
674
|
var import_menus = require("@elementor/menus");
|
|
@@ -724,10 +724,10 @@ function EditorPanelErrorFallback() {
|
|
|
724
724
|
}
|
|
725
725
|
|
|
726
726
|
// src/components/editing-panel-tabs.tsx
|
|
727
|
-
var
|
|
728
|
-
var
|
|
729
|
-
var
|
|
730
|
-
var
|
|
727
|
+
var React64 = __toESM(require("react"));
|
|
728
|
+
var import_react17 = require("react");
|
|
729
|
+
var import_ui49 = require("@elementor/ui");
|
|
730
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
731
731
|
|
|
732
732
|
// src/components/settings-tab.tsx
|
|
733
733
|
var React15 = __toESM(require("react"));
|
|
@@ -850,10 +850,17 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
850
850
|
{
|
|
851
851
|
id: labelId,
|
|
852
852
|
"aria-controls": contentId,
|
|
853
|
-
onClick: () => setIsOpen((prev) => !prev)
|
|
853
|
+
onClick: () => setIsOpen((prev) => !prev),
|
|
854
|
+
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
854
855
|
},
|
|
855
|
-
/* @__PURE__ */ React13.createElement(
|
|
856
|
-
|
|
856
|
+
/* @__PURE__ */ React13.createElement(
|
|
857
|
+
import_ui9.ListItemText,
|
|
858
|
+
{
|
|
859
|
+
secondary: title,
|
|
860
|
+
secondaryTypographyProps: { sx: { typography: "caption", fontWeight: "bold" } }
|
|
861
|
+
}
|
|
862
|
+
),
|
|
863
|
+
/* @__PURE__ */ React13.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
857
864
|
), /* @__PURE__ */ React13.createElement(import_ui9.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(import_ui9.Stack, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React13.createElement(import_ui9.Divider, null));
|
|
858
865
|
}
|
|
859
866
|
|
|
@@ -890,23 +897,31 @@ var Control2 = ({ control }) => {
|
|
|
890
897
|
};
|
|
891
898
|
|
|
892
899
|
// src/components/style-tab.tsx
|
|
893
|
-
var
|
|
894
|
-
var
|
|
900
|
+
var React63 = __toESM(require("react"));
|
|
901
|
+
var import_react16 = require("react");
|
|
895
902
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
896
903
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
897
904
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
898
905
|
var import_session3 = require("@elementor/session");
|
|
899
|
-
var
|
|
900
|
-
var
|
|
906
|
+
var import_ui48 = require("@elementor/ui");
|
|
907
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
901
908
|
|
|
902
909
|
// src/contexts/styles-inheritance-context.tsx
|
|
903
910
|
var React16 = __toESM(require("react"));
|
|
904
|
-
var
|
|
911
|
+
var import_react9 = require("react");
|
|
905
912
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
906
913
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
907
914
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
908
915
|
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
909
916
|
|
|
917
|
+
// src/hooks/use-styles-rerender.ts
|
|
918
|
+
var import_react8 = require("react");
|
|
919
|
+
var useStylesRerender = () => {
|
|
920
|
+
const { provider } = useStyle();
|
|
921
|
+
const [, reRender] = (0, import_react8.useReducer)((p) => !p, false);
|
|
922
|
+
(0, import_react8.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
923
|
+
};
|
|
924
|
+
|
|
910
925
|
// src/styles-inheritance/utils.ts
|
|
911
926
|
var DEFAULT_STATE = "normal";
|
|
912
927
|
var DEFAULT_BREAKPOINT = "desktop";
|
|
@@ -1056,33 +1071,58 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1056
1071
|
}
|
|
1057
1072
|
|
|
1058
1073
|
// src/contexts/styles-inheritance-context.tsx
|
|
1059
|
-
var Context4 = (0,
|
|
1074
|
+
var Context4 = (0, import_react9.createContext)(null);
|
|
1060
1075
|
function StyleInheritanceProvider({ children }) {
|
|
1061
1076
|
const styleDefs = useAppliedStyles();
|
|
1062
1077
|
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
1063
1078
|
const getSnapshot = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1064
1079
|
return /* @__PURE__ */ React16.createElement(Context4.Provider, { value: { getSnapshot } }, children);
|
|
1065
1080
|
}
|
|
1081
|
+
function useStylesInheritanceFields(fields) {
|
|
1082
|
+
const context = (0, import_react9.useContext)(Context4);
|
|
1083
|
+
const { meta } = useStyle();
|
|
1084
|
+
if (!context) {
|
|
1085
|
+
throw new Error("useStylesInheritanceFields must be used within a StyleInheritanceProvider");
|
|
1086
|
+
}
|
|
1087
|
+
if (!meta) {
|
|
1088
|
+
return null;
|
|
1089
|
+
}
|
|
1090
|
+
const snapshot = context.getSnapshot(meta);
|
|
1091
|
+
return fields.reduce(
|
|
1092
|
+
(acc, key) => ({ ...acc, [key]: snapshot?.[key] ?? [] }),
|
|
1093
|
+
{}
|
|
1094
|
+
);
|
|
1095
|
+
}
|
|
1096
|
+
function useStylesInheritanceField(field) {
|
|
1097
|
+
return useStylesInheritanceFields([field])?.[field] ?? [];
|
|
1098
|
+
}
|
|
1066
1099
|
var useAppliedStyles = () => {
|
|
1067
1100
|
const { element } = useElement();
|
|
1068
1101
|
const currentClassesProp = useClassesProp();
|
|
1102
|
+
const baseStyles = useBaseStyles();
|
|
1103
|
+
useStylesRerender();
|
|
1069
1104
|
const classesProp = (0, import_editor_elements4.useElementSetting)(element.id, currentClassesProp);
|
|
1070
1105
|
const appliedStyles = import_editor_props2.classesPropTypeUtil.extract(classesProp);
|
|
1071
|
-
|
|
1072
|
-
|
|
1106
|
+
return import_editor_styles_repository5.stylesRepository.all().filter((style) => appliedStyles?.includes(style.id)).concat(baseStyles);
|
|
1107
|
+
};
|
|
1108
|
+
var useBaseStyles = () => {
|
|
1109
|
+
const { elementType } = useElement();
|
|
1110
|
+
const widgetsCache = (0, import_editor_elements4.getWidgetsCache)();
|
|
1111
|
+
const widgetCache = widgetsCache?.[elementType.key];
|
|
1112
|
+
return Object.values(widgetCache?.base_styles ?? {});
|
|
1073
1113
|
};
|
|
1074
1114
|
|
|
1075
1115
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1076
|
-
var
|
|
1077
|
-
var
|
|
1116
|
+
var React19 = __toESM(require("react"));
|
|
1117
|
+
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1078
1118
|
|
|
1079
1119
|
// src/controls-registry/styles-field.tsx
|
|
1080
|
-
var
|
|
1081
|
-
var
|
|
1120
|
+
var React18 = __toESM(require("react"));
|
|
1121
|
+
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1082
1122
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1083
1123
|
|
|
1084
1124
|
// src/hooks/use-styles-fields.ts
|
|
1085
|
-
var
|
|
1125
|
+
var import_react10 = require("react");
|
|
1086
1126
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1087
1127
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
1088
1128
|
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
@@ -1094,8 +1134,7 @@ function useStylesFields(propNames) {
|
|
|
1094
1134
|
const classesProp = useClassesProp();
|
|
1095
1135
|
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
1096
1136
|
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
1097
|
-
|
|
1098
|
-
(0, import_react9.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1137
|
+
useStylesRerender();
|
|
1099
1138
|
const value = getProps({
|
|
1100
1139
|
elementId: element.id,
|
|
1101
1140
|
styleId: id,
|
|
@@ -1137,7 +1176,7 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1137
1176
|
);
|
|
1138
1177
|
}
|
|
1139
1178
|
function useUndoableCreateElementStyle() {
|
|
1140
|
-
return (0,
|
|
1179
|
+
return (0, import_react10.useMemo)(() => {
|
|
1141
1180
|
return (0, import_editor_v1_adapters.undoable)(
|
|
1142
1181
|
{
|
|
1143
1182
|
do: (payload) => {
|
|
@@ -1165,7 +1204,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1165
1204
|
}, []);
|
|
1166
1205
|
}
|
|
1167
1206
|
function useUndoableUpdateStyle() {
|
|
1168
|
-
return (0,
|
|
1207
|
+
return (0, import_react10.useMemo)(() => {
|
|
1169
1208
|
return (0, import_editor_v1_adapters.undoable)(
|
|
1170
1209
|
{
|
|
1171
1210
|
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
@@ -1218,6 +1257,62 @@ function useStylesField(propName) {
|
|
|
1218
1257
|
return [value, setValue];
|
|
1219
1258
|
}
|
|
1220
1259
|
|
|
1260
|
+
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1261
|
+
var React17 = __toESM(require("react"));
|
|
1262
|
+
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
1263
|
+
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1264
|
+
var import_ui11 = require("@elementor/ui");
|
|
1265
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
1266
|
+
var Circle = (0, import_ui11.styled)("div", {
|
|
1267
|
+
shouldForwardProp: (prop) => prop !== "variant"
|
|
1268
|
+
})`
|
|
1269
|
+
width: 5px;
|
|
1270
|
+
height: 5px;
|
|
1271
|
+
border-radius: 50%;
|
|
1272
|
+
background-color: ${({ theme, variant }) => {
|
|
1273
|
+
switch (variant) {
|
|
1274
|
+
case "overridden":
|
|
1275
|
+
return theme.palette.warning.main;
|
|
1276
|
+
case "global-affects":
|
|
1277
|
+
return theme.palette.global.main;
|
|
1278
|
+
case "local-affects":
|
|
1279
|
+
return theme.palette.primary.main;
|
|
1280
|
+
default:
|
|
1281
|
+
return theme.palette.text.secondary;
|
|
1282
|
+
}
|
|
1283
|
+
}};
|
|
1284
|
+
`;
|
|
1285
|
+
var StylesInheritanceIndicator = () => {
|
|
1286
|
+
const { bind } = (0, import_editor_controls5.useBoundProp)();
|
|
1287
|
+
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1288
|
+
const [value] = useStylesField(bind);
|
|
1289
|
+
const inheritanceChain = useStylesInheritanceField(bind);
|
|
1290
|
+
if (!inheritanceChain.length) {
|
|
1291
|
+
return null;
|
|
1292
|
+
}
|
|
1293
|
+
const [{ styleId, styleVariant }] = inheritanceChain;
|
|
1294
|
+
const { breakpoint, state } = styleVariant.meta;
|
|
1295
|
+
if (styleId === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
|
|
1296
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1297
|
+
Circle,
|
|
1298
|
+
{
|
|
1299
|
+
"aria-label": (0, import_i18n5.__)("This is the final value", "elementor"),
|
|
1300
|
+
variant: currentStyleProvider?.key === import_editor_styles_repository7.ELEMENTS_STYLES_PROVIDER_KEY ? "local-affects" : "global-affects"
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
if (value !== null && value !== void 0) {
|
|
1305
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1306
|
+
Circle,
|
|
1307
|
+
{
|
|
1308
|
+
"aria-label": (0, import_i18n5.__)("This value is overridden by another style", "elementor"),
|
|
1309
|
+
variant: "overridden"
|
|
1310
|
+
}
|
|
1311
|
+
);
|
|
1312
|
+
}
|
|
1313
|
+
return /* @__PURE__ */ React17.createElement(Circle, { "aria-label": (0, import_i18n5.__)("This has value from another style", "elementor") });
|
|
1314
|
+
};
|
|
1315
|
+
|
|
1221
1316
|
// src/controls-registry/styles-field.tsx
|
|
1222
1317
|
var StylesField = ({ bind, children }) => {
|
|
1223
1318
|
const [value, setValue] = useStylesField(bind);
|
|
@@ -1227,40 +1322,51 @@ var StylesField = ({ bind, children }) => {
|
|
|
1227
1322
|
const setValues = (newValue) => {
|
|
1228
1323
|
setValue(newValue[bind]);
|
|
1229
1324
|
};
|
|
1230
|
-
return /* @__PURE__ */
|
|
1325
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1326
|
+
import_editor_controls6.ControlAdornmentsProvider,
|
|
1327
|
+
{
|
|
1328
|
+
items: [
|
|
1329
|
+
{
|
|
1330
|
+
id: "styles-inheritance",
|
|
1331
|
+
Adornment: StylesInheritanceIndicator
|
|
1332
|
+
}
|
|
1333
|
+
]
|
|
1334
|
+
},
|
|
1335
|
+
/* @__PURE__ */ React18.createElement(import_editor_controls6.PropProvider, { propType, value: values, setValue: setValues }, /* @__PURE__ */ React18.createElement(import_editor_controls6.PropKeyProvider, { bind }, children))
|
|
1336
|
+
);
|
|
1231
1337
|
};
|
|
1232
1338
|
|
|
1233
1339
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1234
1340
|
var BackgroundSection = () => {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1341
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React19.createElement(import_editor_controls7.BackgroundControl, null));
|
|
1236
1342
|
};
|
|
1237
1343
|
|
|
1238
1344
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1239
|
-
var
|
|
1345
|
+
var React29 = __toESM(require("react"));
|
|
1240
1346
|
|
|
1241
1347
|
// src/components/panel-divider.tsx
|
|
1242
|
-
var React19 = __toESM(require("react"));
|
|
1243
|
-
var import_ui11 = require("@elementor/ui");
|
|
1244
|
-
var PanelDivider = () => /* @__PURE__ */ React19.createElement(import_ui11.Divider, { sx: { my: 0.5 } });
|
|
1245
|
-
|
|
1246
|
-
// src/components/section-content.tsx
|
|
1247
1348
|
var React20 = __toESM(require("react"));
|
|
1248
1349
|
var import_ui12 = require("@elementor/ui");
|
|
1249
|
-
var
|
|
1350
|
+
var PanelDivider = () => /* @__PURE__ */ React20.createElement(import_ui12.Divider, { sx: { my: 0.5 } });
|
|
1351
|
+
|
|
1352
|
+
// src/components/section-content.tsx
|
|
1353
|
+
var React21 = __toESM(require("react"));
|
|
1354
|
+
var import_ui13 = require("@elementor/ui");
|
|
1355
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React21.createElement(import_ui13.Stack, { gap, sx: { ...sx } }, children);
|
|
1250
1356
|
|
|
1251
1357
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1252
|
-
var
|
|
1253
|
-
var
|
|
1358
|
+
var React27 = __toESM(require("react"));
|
|
1359
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1254
1360
|
|
|
1255
1361
|
// src/components/add-or-remove-content.tsx
|
|
1256
|
-
var
|
|
1257
|
-
var
|
|
1362
|
+
var React22 = __toESM(require("react"));
|
|
1363
|
+
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1258
1364
|
var import_icons5 = require("@elementor/icons");
|
|
1259
|
-
var
|
|
1365
|
+
var import_ui14 = require("@elementor/ui");
|
|
1260
1366
|
var SIZE2 = "tiny";
|
|
1261
1367
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1262
|
-
return /* @__PURE__ */
|
|
1263
|
-
|
|
1368
|
+
return /* @__PURE__ */ React22.createElement(SectionContent, null, /* @__PURE__ */ React22.createElement(
|
|
1369
|
+
import_ui14.Stack,
|
|
1264
1370
|
{
|
|
1265
1371
|
direction: "row",
|
|
1266
1372
|
sx: {
|
|
@@ -1268,60 +1374,60 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1268
1374
|
alignItems: "center"
|
|
1269
1375
|
}
|
|
1270
1376
|
},
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
isAdded ? /* @__PURE__ */
|
|
1273
|
-
), /* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ React22.createElement(import_editor_controls8.ControlLabel, null, label),
|
|
1378
|
+
isAdded ? /* @__PURE__ */ React22.createElement(import_ui14.IconButton, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React22.createElement(import_icons5.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React22.createElement(import_ui14.IconButton, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React22.createElement(import_icons5.PlusIcon, { fontSize: SIZE2 }))
|
|
1379
|
+
), /* @__PURE__ */ React22.createElement(import_ui14.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React22.createElement(SectionContent, null, children)));
|
|
1274
1380
|
};
|
|
1275
1381
|
|
|
1276
1382
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1277
|
-
var React22 = __toESM(require("react"));
|
|
1278
|
-
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1279
|
-
var import_ui14 = require("@elementor/ui");
|
|
1280
|
-
var import_i18n5 = require("@wordpress/i18n");
|
|
1281
|
-
var BorderColorField = () => {
|
|
1282
|
-
return /* @__PURE__ */ React22.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React22.createElement(import_ui14.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React22.createElement(import_editor_controls8.ControlLabel, null, (0, import_i18n5.__)("Border color", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React22.createElement(import_editor_controls8.ColorControl, null))));
|
|
1283
|
-
};
|
|
1284
|
-
|
|
1285
|
-
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1286
1383
|
var React23 = __toESM(require("react"));
|
|
1287
1384
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
1288
1385
|
var import_ui15 = require("@elementor/ui");
|
|
1289
1386
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1387
|
+
var BorderColorField = () => {
|
|
1388
|
+
return /* @__PURE__ */ React23.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React23.createElement(import_ui15.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React23.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(import_editor_controls9.ControlLabel, null, (0, import_i18n6.__)("Border color", "elementor"))), /* @__PURE__ */ React23.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(import_editor_controls9.ColorControl, null))));
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1392
|
+
var React24 = __toESM(require("react"));
|
|
1393
|
+
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
1394
|
+
var import_ui16 = require("@elementor/ui");
|
|
1395
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
1290
1396
|
var borderStyles = [
|
|
1291
|
-
{ value: "none", label: (0,
|
|
1292
|
-
{ value: "solid", label: (0,
|
|
1293
|
-
{ value: "dashed", label: (0,
|
|
1294
|
-
{ value: "dotted", label: (0,
|
|
1295
|
-
{ value: "double", label: (0,
|
|
1296
|
-
{ value: "groove", label: (0,
|
|
1297
|
-
{ value: "ridge", label: (0,
|
|
1298
|
-
{ value: "inset", label: (0,
|
|
1299
|
-
{ value: "outset", label: (0,
|
|
1397
|
+
{ value: "none", label: (0, import_i18n7.__)("None", "elementor") },
|
|
1398
|
+
{ value: "solid", label: (0, import_i18n7.__)("Solid", "elementor") },
|
|
1399
|
+
{ value: "dashed", label: (0, import_i18n7.__)("Dashed", "elementor") },
|
|
1400
|
+
{ value: "dotted", label: (0, import_i18n7.__)("Dotted", "elementor") },
|
|
1401
|
+
{ value: "double", label: (0, import_i18n7.__)("Double", "elementor") },
|
|
1402
|
+
{ value: "groove", label: (0, import_i18n7.__)("Groove", "elementor") },
|
|
1403
|
+
{ value: "ridge", label: (0, import_i18n7.__)("Ridge", "elementor") },
|
|
1404
|
+
{ value: "inset", label: (0, import_i18n7.__)("Inset", "elementor") },
|
|
1405
|
+
{ value: "outset", label: (0, import_i18n7.__)("Outset", "elementor") }
|
|
1300
1406
|
];
|
|
1301
1407
|
var BorderStyleField = () => {
|
|
1302
|
-
return /* @__PURE__ */
|
|
1408
|
+
return /* @__PURE__ */ React24.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React24.createElement(import_ui16.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React24.createElement(import_ui16.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React24.createElement(import_editor_controls10.ControlLabel, null, (0, import_i18n7.__)("Border type", "elementor"))), /* @__PURE__ */ React24.createElement(import_ui16.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(import_editor_controls10.SelectControl, { options: borderStyles }))));
|
|
1303
1409
|
};
|
|
1304
1410
|
|
|
1305
1411
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1306
|
-
var
|
|
1307
|
-
var
|
|
1412
|
+
var React26 = __toESM(require("react"));
|
|
1413
|
+
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
1308
1414
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1309
1415
|
var import_icons6 = require("@elementor/icons");
|
|
1310
|
-
var
|
|
1311
|
-
var
|
|
1416
|
+
var import_ui19 = require("@elementor/ui");
|
|
1417
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1312
1418
|
|
|
1313
1419
|
// src/hooks/use-direction.ts
|
|
1314
|
-
var
|
|
1420
|
+
var import_ui17 = require("@elementor/ui");
|
|
1315
1421
|
function useDirection() {
|
|
1316
|
-
const theme = (0,
|
|
1422
|
+
const theme = (0, import_ui17.useTheme)(), extendedWindow = window;
|
|
1317
1423
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1318
1424
|
return { isSiteRtl, isUiRtl };
|
|
1319
1425
|
}
|
|
1320
1426
|
|
|
1321
1427
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1322
|
-
var
|
|
1323
|
-
var
|
|
1324
|
-
var
|
|
1428
|
+
var React25 = __toESM(require("react"));
|
|
1429
|
+
var import_react11 = require("react");
|
|
1430
|
+
var import_ui18 = require("@elementor/ui");
|
|
1325
1431
|
var CLOCKWISE_ANGLES = {
|
|
1326
1432
|
row: 0,
|
|
1327
1433
|
column: 90,
|
|
@@ -1335,13 +1441,13 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
1335
1441
|
"column-reverse": -270
|
|
1336
1442
|
};
|
|
1337
1443
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1338
|
-
const rotate = (0,
|
|
1444
|
+
const rotate = (0, import_react11.useRef)(useGetTargetAngle(isClockwise, offset));
|
|
1339
1445
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1340
|
-
return /* @__PURE__ */
|
|
1446
|
+
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1341
1447
|
};
|
|
1342
1448
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1343
1449
|
const [direction] = useStylesField("flex-direction");
|
|
1344
|
-
const isRtl = "rtl" === (0,
|
|
1450
|
+
const isRtl = "rtl" === (0, import_ui18.useTheme)().direction;
|
|
1345
1451
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1346
1452
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1347
1453
|
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
@@ -1352,39 +1458,39 @@ var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
|
1352
1458
|
};
|
|
1353
1459
|
|
|
1354
1460
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1355
|
-
var InlineStartIcon = (0,
|
|
1356
|
-
var InlineEndIcon = (0,
|
|
1461
|
+
var InlineStartIcon = (0, import_ui19.withDirection)(import_icons6.SideRightIcon);
|
|
1462
|
+
var InlineEndIcon = (0, import_ui19.withDirection)(import_icons6.SideLeftIcon);
|
|
1357
1463
|
var getEdges = (isSiteRtl) => [
|
|
1358
1464
|
{
|
|
1359
|
-
label: (0,
|
|
1360
|
-
icon: /* @__PURE__ */
|
|
1465
|
+
label: (0, import_i18n8.__)("Top", "elementor"),
|
|
1466
|
+
icon: /* @__PURE__ */ React26.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" }),
|
|
1361
1467
|
bind: "block-start"
|
|
1362
1468
|
},
|
|
1363
1469
|
{
|
|
1364
|
-
label: isSiteRtl ? (0,
|
|
1365
|
-
icon: /* @__PURE__ */
|
|
1470
|
+
label: isSiteRtl ? (0, import_i18n8.__)("Left", "elementor") : (0, import_i18n8.__)("Right", "elementor"),
|
|
1471
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: InlineStartIcon, size: "tiny" }),
|
|
1366
1472
|
bind: "inline-end"
|
|
1367
1473
|
},
|
|
1368
1474
|
{
|
|
1369
|
-
label: (0,
|
|
1370
|
-
icon: /* @__PURE__ */
|
|
1475
|
+
label: (0, import_i18n8.__)("Bottom", "elementor"),
|
|
1476
|
+
icon: /* @__PURE__ */ React26.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" }),
|
|
1371
1477
|
bind: "block-end"
|
|
1372
1478
|
},
|
|
1373
1479
|
{
|
|
1374
|
-
label: isSiteRtl ? (0,
|
|
1375
|
-
icon: /* @__PURE__ */
|
|
1480
|
+
label: isSiteRtl ? (0, import_i18n8.__)("Right", "elementor") : (0, import_i18n8.__)("Left", "elementor"),
|
|
1481
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: InlineEndIcon, size: "tiny" }),
|
|
1376
1482
|
bind: "inline-start"
|
|
1377
1483
|
}
|
|
1378
1484
|
];
|
|
1379
1485
|
var BorderWidthField = () => {
|
|
1380
1486
|
const { isSiteRtl } = useDirection();
|
|
1381
|
-
return /* @__PURE__ */
|
|
1382
|
-
|
|
1487
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React26.createElement(
|
|
1488
|
+
import_editor_controls11.EqualUnequalSizesControl,
|
|
1383
1489
|
{
|
|
1384
1490
|
items: getEdges(isSiteRtl),
|
|
1385
|
-
label: (0,
|
|
1386
|
-
icon: /* @__PURE__ */
|
|
1387
|
-
tooltipLabel: (0,
|
|
1491
|
+
label: (0, import_i18n8.__)("Border width", "elementor"),
|
|
1492
|
+
icon: /* @__PURE__ */ React26.createElement(import_icons6.SideAllIcon, { fontSize: "tiny" }),
|
|
1493
|
+
tooltipLabel: (0, import_i18n8.__)("Adjust borders", "elementor"),
|
|
1388
1494
|
multiSizePropTypeUtil: import_editor_props3.borderWidthPropTypeUtil
|
|
1389
1495
|
}
|
|
1390
1496
|
));
|
|
@@ -1409,86 +1515,86 @@ var BorderField = () => {
|
|
|
1409
1515
|
});
|
|
1410
1516
|
};
|
|
1411
1517
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1412
|
-
return /* @__PURE__ */
|
|
1518
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1413
1519
|
AddOrRemoveContent,
|
|
1414
1520
|
{
|
|
1415
|
-
label: (0,
|
|
1521
|
+
label: (0, import_i18n9.__)("Border", "elementor"),
|
|
1416
1522
|
isAdded: hasBorder,
|
|
1417
1523
|
onAdd: addBorder,
|
|
1418
1524
|
onRemove: removeBorder
|
|
1419
1525
|
},
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ React27.createElement(BorderWidthField, null),
|
|
1527
|
+
/* @__PURE__ */ React27.createElement(BorderColorField, null),
|
|
1528
|
+
/* @__PURE__ */ React27.createElement(BorderStyleField, null)
|
|
1423
1529
|
);
|
|
1424
1530
|
};
|
|
1425
1531
|
|
|
1426
1532
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1427
|
-
var
|
|
1428
|
-
var
|
|
1533
|
+
var React28 = __toESM(require("react"));
|
|
1534
|
+
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
1429
1535
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
1430
1536
|
var import_icons7 = require("@elementor/icons");
|
|
1431
|
-
var
|
|
1432
|
-
var
|
|
1433
|
-
var StartStartIcon = (0,
|
|
1434
|
-
var StartEndIcon = (0,
|
|
1435
|
-
var EndStartIcon = (0,
|
|
1436
|
-
var EndEndIcon = (0,
|
|
1437
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
1438
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
1439
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
1440
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
1537
|
+
var import_ui20 = require("@elementor/ui");
|
|
1538
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1539
|
+
var StartStartIcon = (0, import_ui20.withDirection)(import_icons7.RadiusTopLeftIcon);
|
|
1540
|
+
var StartEndIcon = (0, import_ui20.withDirection)(import_icons7.RadiusTopRightIcon);
|
|
1541
|
+
var EndStartIcon = (0, import_ui20.withDirection)(import_icons7.RadiusBottomLeftIcon);
|
|
1542
|
+
var EndEndIcon = (0, import_ui20.withDirection)(import_icons7.RadiusBottomRightIcon);
|
|
1543
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top right", "elementor") : (0, import_i18n10.__)("Top left", "elementor");
|
|
1544
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top left", "elementor") : (0, import_i18n10.__)("Top right", "elementor");
|
|
1545
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom right", "elementor") : (0, import_i18n10.__)("Bottom left", "elementor");
|
|
1546
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom left", "elementor") : (0, import_i18n10.__)("Bottom right", "elementor");
|
|
1441
1547
|
var getCorners = (isSiteRtl) => [
|
|
1442
1548
|
{
|
|
1443
1549
|
label: getStartStartLabel(isSiteRtl),
|
|
1444
|
-
icon: /* @__PURE__ */
|
|
1550
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
|
|
1445
1551
|
bind: "start-start"
|
|
1446
1552
|
},
|
|
1447
1553
|
{
|
|
1448
1554
|
label: getStartEndLabel(isSiteRtl),
|
|
1449
|
-
icon: /* @__PURE__ */
|
|
1555
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
|
|
1450
1556
|
bind: "start-end"
|
|
1451
1557
|
},
|
|
1452
1558
|
{
|
|
1453
1559
|
label: getEndStartLabel(isSiteRtl),
|
|
1454
|
-
icon: /* @__PURE__ */
|
|
1560
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
|
|
1455
1561
|
bind: "end-start"
|
|
1456
1562
|
},
|
|
1457
1563
|
{
|
|
1458
1564
|
label: getEndEndLabel(isSiteRtl),
|
|
1459
|
-
icon: /* @__PURE__ */
|
|
1565
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1460
1566
|
bind: "end-end"
|
|
1461
1567
|
}
|
|
1462
1568
|
];
|
|
1463
1569
|
var BorderRadiusField = () => {
|
|
1464
1570
|
const { isSiteRtl } = useDirection();
|
|
1465
|
-
return /* @__PURE__ */
|
|
1466
|
-
|
|
1571
|
+
return /* @__PURE__ */ React28.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React28.createElement(
|
|
1572
|
+
import_editor_controls12.EqualUnequalSizesControl,
|
|
1467
1573
|
{
|
|
1468
1574
|
items: getCorners(isSiteRtl),
|
|
1469
|
-
label: (0,
|
|
1470
|
-
icon: /* @__PURE__ */
|
|
1471
|
-
tooltipLabel: (0,
|
|
1575
|
+
label: (0, import_i18n10.__)("Border radius", "elementor"),
|
|
1576
|
+
icon: /* @__PURE__ */ React28.createElement(import_icons7.BorderCornersIcon, { fontSize: "tiny" }),
|
|
1577
|
+
tooltipLabel: (0, import_i18n10.__)("Adjust corners", "elementor"),
|
|
1472
1578
|
multiSizePropTypeUtil: import_editor_props4.borderRadiusPropTypeUtil
|
|
1473
1579
|
}
|
|
1474
1580
|
));
|
|
1475
1581
|
};
|
|
1476
1582
|
|
|
1477
1583
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1478
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1584
|
+
var BorderSection = () => /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(BorderRadiusField, null), /* @__PURE__ */ React29.createElement(PanelDivider, null), /* @__PURE__ */ React29.createElement(BorderField, null));
|
|
1479
1585
|
|
|
1480
1586
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1481
|
-
var
|
|
1482
|
-
var
|
|
1587
|
+
var React30 = __toESM(require("react"));
|
|
1588
|
+
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
1483
1589
|
var EffectsSection = () => {
|
|
1484
|
-
return /* @__PURE__ */
|
|
1590
|
+
return /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React30.createElement(import_editor_controls13.BoxShadowRepeaterControl, null)));
|
|
1485
1591
|
};
|
|
1486
1592
|
|
|
1487
1593
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1488
|
-
var
|
|
1489
|
-
var
|
|
1594
|
+
var React40 = __toESM(require("react"));
|
|
1595
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
1490
1596
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1491
|
-
var
|
|
1597
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1492
1598
|
|
|
1493
1599
|
// src/hooks/use-computed-style.ts
|
|
1494
1600
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
@@ -1516,13 +1622,13 @@ function useComputedStyle(elementId) {
|
|
|
1516
1622
|
}
|
|
1517
1623
|
|
|
1518
1624
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1519
|
-
var
|
|
1520
|
-
var
|
|
1625
|
+
var React31 = __toESM(require("react"));
|
|
1626
|
+
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
1521
1627
|
var import_icons8 = require("@elementor/icons");
|
|
1522
|
-
var
|
|
1523
|
-
var
|
|
1524
|
-
var StartIcon = (0,
|
|
1525
|
-
var EndIcon = (0,
|
|
1628
|
+
var import_ui21 = require("@elementor/ui");
|
|
1629
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1630
|
+
var StartIcon = (0, import_ui21.withDirection)(import_icons8.LayoutAlignLeftIcon);
|
|
1631
|
+
var EndIcon = (0, import_ui21.withDirection)(import_icons8.LayoutAlignRightIcon);
|
|
1526
1632
|
var iconProps = {
|
|
1527
1633
|
isClockwise: false,
|
|
1528
1634
|
offset: 90
|
|
@@ -1530,42 +1636,42 @@ var iconProps = {
|
|
|
1530
1636
|
var options = [
|
|
1531
1637
|
{
|
|
1532
1638
|
value: "start",
|
|
1533
|
-
label: (0,
|
|
1534
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1639
|
+
label: (0, import_i18n11.__)("Start", "elementor"),
|
|
1640
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1535
1641
|
showTooltip: true
|
|
1536
1642
|
},
|
|
1537
1643
|
{
|
|
1538
1644
|
value: "center",
|
|
1539
|
-
label: (0,
|
|
1540
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1645
|
+
label: (0, import_i18n11.__)("Center", "elementor"),
|
|
1646
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: import_icons8.LayoutAlignCenterIcon, size, ...iconProps }),
|
|
1541
1647
|
showTooltip: true
|
|
1542
1648
|
},
|
|
1543
1649
|
{
|
|
1544
1650
|
value: "end",
|
|
1545
|
-
label: (0,
|
|
1546
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1651
|
+
label: (0, import_i18n11.__)("End", "elementor"),
|
|
1652
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1547
1653
|
showTooltip: true
|
|
1548
1654
|
},
|
|
1549
1655
|
{
|
|
1550
1656
|
value: "stretch",
|
|
1551
|
-
label: (0,
|
|
1552
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1657
|
+
label: (0, import_i18n11.__)("Stretch", "elementor"),
|
|
1658
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: import_icons8.LayoutDistributeVerticalIcon, size, ...iconProps }),
|
|
1553
1659
|
showTooltip: true
|
|
1554
1660
|
}
|
|
1555
1661
|
];
|
|
1556
1662
|
var AlignItemsField = () => {
|
|
1557
1663
|
const { isSiteRtl } = useDirection();
|
|
1558
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ React31.createElement(import_ui21.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(import_ui21.ThemeProvider, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React31.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n11.__)("Align items", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui21.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls14.ToggleControl, { options }))))));
|
|
1559
1665
|
};
|
|
1560
1666
|
|
|
1561
1667
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1562
|
-
var
|
|
1563
|
-
var
|
|
1668
|
+
var React32 = __toESM(require("react"));
|
|
1669
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
1564
1670
|
var import_icons9 = require("@elementor/icons");
|
|
1565
|
-
var
|
|
1566
|
-
var
|
|
1567
|
-
var StartIcon2 = (0,
|
|
1568
|
-
var EndIcon2 = (0,
|
|
1671
|
+
var import_ui22 = require("@elementor/ui");
|
|
1672
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1673
|
+
var StartIcon2 = (0, import_ui22.withDirection)(import_icons9.LayoutAlignLeftIcon);
|
|
1674
|
+
var EndIcon2 = (0, import_ui22.withDirection)(import_icons9.LayoutAlignRightIcon);
|
|
1569
1675
|
var iconProps2 = {
|
|
1570
1676
|
isClockwise: false,
|
|
1571
1677
|
offset: 90
|
|
@@ -1573,119 +1679,119 @@ var iconProps2 = {
|
|
|
1573
1679
|
var options2 = [
|
|
1574
1680
|
{
|
|
1575
1681
|
value: "start",
|
|
1576
|
-
label: (0,
|
|
1577
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1682
|
+
label: (0, import_i18n12.__)("Start", "elementor"),
|
|
1683
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1578
1684
|
showTooltip: true
|
|
1579
1685
|
},
|
|
1580
1686
|
{
|
|
1581
1687
|
value: "center",
|
|
1582
|
-
label: (0,
|
|
1583
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1688
|
+
label: (0, import_i18n12.__)("Center", "elementor"),
|
|
1689
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons9.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
1584
1690
|
showTooltip: true
|
|
1585
1691
|
},
|
|
1586
1692
|
{
|
|
1587
1693
|
value: "end",
|
|
1588
|
-
label: (0,
|
|
1589
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1694
|
+
label: (0, import_i18n12.__)("End", "elementor"),
|
|
1695
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1590
1696
|
showTooltip: true
|
|
1591
1697
|
},
|
|
1592
1698
|
{
|
|
1593
1699
|
value: "stretch",
|
|
1594
|
-
label: (0,
|
|
1595
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1700
|
+
label: (0, import_i18n12.__)("Stretch", "elementor"),
|
|
1701
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons9.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
1596
1702
|
showTooltip: true
|
|
1597
1703
|
}
|
|
1598
1704
|
];
|
|
1599
1705
|
var AlignSelfChild = () => {
|
|
1600
1706
|
const { isSiteRtl } = useDirection();
|
|
1601
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ React32.createElement(import_ui22.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(import_ui22.ThemeProvider, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React32.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n12.__)("Align self", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls15.ToggleControl, { options: options2 }))))));
|
|
1602
1708
|
};
|
|
1603
1709
|
|
|
1604
1710
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1605
|
-
var
|
|
1606
|
-
var
|
|
1607
|
-
var
|
|
1608
|
-
var
|
|
1711
|
+
var React33 = __toESM(require("react"));
|
|
1712
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
1713
|
+
var import_ui23 = require("@elementor/ui");
|
|
1714
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1609
1715
|
var DisplayField = () => {
|
|
1610
1716
|
const options12 = [
|
|
1611
1717
|
{
|
|
1612
1718
|
value: "block",
|
|
1613
|
-
renderContent: () => (0,
|
|
1614
|
-
label: (0,
|
|
1719
|
+
renderContent: () => (0, import_i18n13.__)("Block", "elementor"),
|
|
1720
|
+
label: (0, import_i18n13.__)("Block", "elementor"),
|
|
1615
1721
|
showTooltip: true
|
|
1616
1722
|
},
|
|
1617
1723
|
{
|
|
1618
1724
|
value: "flex",
|
|
1619
|
-
renderContent: () => (0,
|
|
1620
|
-
label: (0,
|
|
1725
|
+
renderContent: () => (0, import_i18n13.__)("Flex", "elementor"),
|
|
1726
|
+
label: (0, import_i18n13.__)("Flex", "elementor"),
|
|
1621
1727
|
showTooltip: true
|
|
1622
1728
|
},
|
|
1623
1729
|
{
|
|
1624
1730
|
value: "inline-block",
|
|
1625
|
-
renderContent: () => (0,
|
|
1626
|
-
label: (0,
|
|
1731
|
+
renderContent: () => (0, import_i18n13.__)("In-blk", "elementor"),
|
|
1732
|
+
label: (0, import_i18n13.__)("Inline-block", "elementor"),
|
|
1627
1733
|
showTooltip: true
|
|
1628
1734
|
},
|
|
1629
1735
|
{
|
|
1630
1736
|
value: "inline-flex",
|
|
1631
|
-
renderContent: () => (0,
|
|
1632
|
-
label: (0,
|
|
1737
|
+
renderContent: () => (0, import_i18n13.__)("In-flx", "elementor"),
|
|
1738
|
+
label: (0, import_i18n13.__)("Inline-flex", "elementor"),
|
|
1633
1739
|
showTooltip: true
|
|
1634
1740
|
}
|
|
1635
1741
|
];
|
|
1636
|
-
return /* @__PURE__ */
|
|
1742
|
+
return /* @__PURE__ */ React33.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React33.createElement(import_ui23.Stack, { gap: 0.75 }, /* @__PURE__ */ React33.createElement(import_editor_controls16.ControlLabel, null, (0, import_i18n13.__)("Display", "elementor")), /* @__PURE__ */ React33.createElement(import_editor_controls16.ToggleControl, { options: options12, fullWidth: true })));
|
|
1637
1743
|
};
|
|
1638
1744
|
|
|
1639
1745
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1640
|
-
var
|
|
1641
|
-
var
|
|
1746
|
+
var React34 = __toESM(require("react"));
|
|
1747
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
1642
1748
|
var import_icons10 = require("@elementor/icons");
|
|
1643
|
-
var
|
|
1644
|
-
var
|
|
1749
|
+
var import_ui24 = require("@elementor/ui");
|
|
1750
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1645
1751
|
var options3 = [
|
|
1646
1752
|
{
|
|
1647
1753
|
value: "row",
|
|
1648
|
-
label: (0,
|
|
1754
|
+
label: (0, import_i18n14.__)("Row", "elementor"),
|
|
1649
1755
|
renderContent: ({ size }) => {
|
|
1650
|
-
const StartIcon5 = (0,
|
|
1651
|
-
return /* @__PURE__ */
|
|
1756
|
+
const StartIcon5 = (0, import_ui24.withDirection)(import_icons10.ArrowRightIcon);
|
|
1757
|
+
return /* @__PURE__ */ React34.createElement(StartIcon5, { fontSize: size });
|
|
1652
1758
|
},
|
|
1653
1759
|
showTooltip: true
|
|
1654
1760
|
},
|
|
1655
1761
|
{
|
|
1656
1762
|
value: "column",
|
|
1657
|
-
label: (0,
|
|
1658
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1763
|
+
label: (0, import_i18n14.__)("Column", "elementor"),
|
|
1764
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons10.ArrowDownSmallIcon, { fontSize: size }),
|
|
1659
1765
|
showTooltip: true
|
|
1660
1766
|
},
|
|
1661
1767
|
{
|
|
1662
1768
|
value: "row-reverse",
|
|
1663
|
-
label: (0,
|
|
1769
|
+
label: (0, import_i18n14.__)("Reversed row", "elementor"),
|
|
1664
1770
|
renderContent: ({ size }) => {
|
|
1665
|
-
const EndIcon5 = (0,
|
|
1666
|
-
return /* @__PURE__ */
|
|
1771
|
+
const EndIcon5 = (0, import_ui24.withDirection)(import_icons10.ArrowLeftIcon);
|
|
1772
|
+
return /* @__PURE__ */ React34.createElement(EndIcon5, { fontSize: size });
|
|
1667
1773
|
},
|
|
1668
1774
|
showTooltip: true
|
|
1669
1775
|
},
|
|
1670
1776
|
{
|
|
1671
1777
|
value: "column-reverse",
|
|
1672
|
-
label: (0,
|
|
1673
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1778
|
+
label: (0, import_i18n14.__)("Reversed column", "elementor"),
|
|
1779
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons10.ArrowUpSmallIcon, { fontSize: size }),
|
|
1674
1780
|
showTooltip: true
|
|
1675
1781
|
}
|
|
1676
1782
|
];
|
|
1677
1783
|
var FlexDirectionField = () => {
|
|
1678
1784
|
const { isSiteRtl } = useDirection();
|
|
1679
|
-
return /* @__PURE__ */
|
|
1785
|
+
return /* @__PURE__ */ React34.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n14.__)("Direction", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls17.ToggleControl, { options: options3 }))))));
|
|
1680
1786
|
};
|
|
1681
1787
|
|
|
1682
1788
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1683
|
-
var
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1789
|
+
var React35 = __toESM(require("react"));
|
|
1790
|
+
var import_react12 = require("react");
|
|
1791
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
1686
1792
|
var import_icons11 = require("@elementor/icons");
|
|
1687
|
-
var
|
|
1688
|
-
var
|
|
1793
|
+
var import_ui25 = require("@elementor/ui");
|
|
1794
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1689
1795
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1690
1796
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1691
1797
|
var FIRST = "first";
|
|
@@ -1698,26 +1804,26 @@ var orderValueMap = {
|
|
|
1698
1804
|
var items = [
|
|
1699
1805
|
{
|
|
1700
1806
|
value: FIRST,
|
|
1701
|
-
label: (0,
|
|
1702
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1807
|
+
label: (0, import_i18n15.__)("First", "elementor"),
|
|
1808
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons11.ArrowUpSmallIcon, { fontSize: size }),
|
|
1703
1809
|
showTooltip: true
|
|
1704
1810
|
},
|
|
1705
1811
|
{
|
|
1706
1812
|
value: LAST,
|
|
1707
|
-
label: (0,
|
|
1708
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1813
|
+
label: (0, import_i18n15.__)("Last", "elementor"),
|
|
1814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons11.ArrowDownSmallIcon, { fontSize: size }),
|
|
1709
1815
|
showTooltip: true
|
|
1710
1816
|
},
|
|
1711
1817
|
{
|
|
1712
1818
|
value: CUSTOM,
|
|
1713
|
-
label: (0,
|
|
1714
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1819
|
+
label: (0, import_i18n15.__)("Custom", "elementor"),
|
|
1820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons11.PencilIcon, { fontSize: size }),
|
|
1715
1821
|
showTooltip: true
|
|
1716
1822
|
}
|
|
1717
1823
|
];
|
|
1718
1824
|
var FlexOrderField = () => {
|
|
1719
1825
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
1720
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
1826
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react12.useState)(getGroupControlValue(order?.value || null));
|
|
1721
1827
|
const handleToggleButtonChange = (group) => {
|
|
1722
1828
|
setGroupControlValue(group);
|
|
1723
1829
|
if (!group || group === CUSTOM) {
|
|
@@ -1726,16 +1832,16 @@ var FlexOrderField = () => {
|
|
|
1726
1832
|
}
|
|
1727
1833
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1728
1834
|
};
|
|
1729
|
-
return /* @__PURE__ */
|
|
1730
|
-
|
|
1835
|
+
return /* @__PURE__ */ React35.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React35.createElement(SectionContent, null, /* @__PURE__ */ React35.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Order", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React35.createElement(
|
|
1836
|
+
import_editor_controls18.ControlToggleButtonGroup,
|
|
1731
1837
|
{
|
|
1732
1838
|
items,
|
|
1733
1839
|
value: groupControlValue,
|
|
1734
1840
|
onChange: handleToggleButtonChange,
|
|
1735
1841
|
exclusive: true
|
|
1736
1842
|
}
|
|
1737
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1738
|
-
|
|
1843
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React35.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React35.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Custom order", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React35.createElement(
|
|
1844
|
+
import_editor_controls18.NumberControl,
|
|
1739
1845
|
{
|
|
1740
1846
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
1741
1847
|
max: LAST_DEFAULT_VALUE - 1,
|
|
@@ -1754,37 +1860,37 @@ var getGroupControlValue = (order) => {
|
|
|
1754
1860
|
};
|
|
1755
1861
|
|
|
1756
1862
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1757
|
-
var
|
|
1758
|
-
var
|
|
1759
|
-
var
|
|
1863
|
+
var React36 = __toESM(require("react"));
|
|
1864
|
+
var import_react13 = require("react");
|
|
1865
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
1760
1866
|
var import_icons12 = require("@elementor/icons");
|
|
1761
|
-
var
|
|
1762
|
-
var
|
|
1867
|
+
var import_ui26 = require("@elementor/ui");
|
|
1868
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1763
1869
|
var DEFAULT = 1;
|
|
1764
1870
|
var items2 = [
|
|
1765
1871
|
{
|
|
1766
1872
|
value: "flex-grow",
|
|
1767
|
-
label: (0,
|
|
1768
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1873
|
+
label: (0, import_i18n16.__)("Grow", "elementor"),
|
|
1874
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.ExpandIcon, { fontSize: size }),
|
|
1769
1875
|
showTooltip: true
|
|
1770
1876
|
},
|
|
1771
1877
|
{
|
|
1772
1878
|
value: "flex-shrink",
|
|
1773
|
-
label: (0,
|
|
1774
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1879
|
+
label: (0, import_i18n16.__)("Shrink", "elementor"),
|
|
1880
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.ShrinkIcon, { fontSize: size }),
|
|
1775
1881
|
showTooltip: true
|
|
1776
1882
|
},
|
|
1777
1883
|
{
|
|
1778
1884
|
value: "custom",
|
|
1779
|
-
label: (0,
|
|
1780
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1885
|
+
label: (0, import_i18n16.__)("Custom", "elementor"),
|
|
1886
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.PencilIcon, { fontSize: size }),
|
|
1781
1887
|
showTooltip: true
|
|
1782
1888
|
}
|
|
1783
1889
|
];
|
|
1784
1890
|
var FlexSizeField = () => {
|
|
1785
1891
|
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1786
1892
|
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1787
|
-
const currentGroup = (0,
|
|
1893
|
+
const currentGroup = (0, import_react13.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react13.useState)(currentGroup);
|
|
1788
1894
|
const onChangeGroup = (group = null) => {
|
|
1789
1895
|
setActiveGroup(group);
|
|
1790
1896
|
setBasisField(null);
|
|
@@ -1801,17 +1907,17 @@ var FlexSizeField = () => {
|
|
|
1801
1907
|
setGrowField(null);
|
|
1802
1908
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1803
1909
|
};
|
|
1804
|
-
return /* @__PURE__ */
|
|
1805
|
-
|
|
1910
|
+
return /* @__PURE__ */ React36.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React36.createElement(SectionContent, null, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n16.__)("Size", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(
|
|
1911
|
+
import_editor_controls19.ControlToggleButtonGroup,
|
|
1806
1912
|
{
|
|
1807
1913
|
value: activeGroup,
|
|
1808
1914
|
onChange: onChangeGroup,
|
|
1809
1915
|
items: items2,
|
|
1810
1916
|
exclusive: true
|
|
1811
1917
|
}
|
|
1812
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1918
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React36.createElement(FlexCustomField, null))));
|
|
1813
1919
|
};
|
|
1814
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1920
|
+
var FlexCustomField = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n16.__)("Grow", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(import_editor_controls19.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n16.__)("Shrink", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(import_editor_controls19.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n16.__)("Basis", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(import_editor_controls19.SizeControl, { extendedValues: ["auto"] })))));
|
|
1815
1921
|
var getActiveGroup = ({
|
|
1816
1922
|
grow,
|
|
1817
1923
|
shrink,
|
|
@@ -1833,22 +1939,22 @@ var getActiveGroup = ({
|
|
|
1833
1939
|
};
|
|
1834
1940
|
|
|
1835
1941
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1836
|
-
var
|
|
1837
|
-
var
|
|
1838
|
-
var
|
|
1839
|
-
var
|
|
1942
|
+
var React37 = __toESM(require("react"));
|
|
1943
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
1944
|
+
var import_ui27 = require("@elementor/ui");
|
|
1945
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1840
1946
|
var GapControlField = () => {
|
|
1841
|
-
return /* @__PURE__ */
|
|
1947
|
+
return /* @__PURE__ */ React37.createElement(import_ui27.Stack, { gap: 1 }, /* @__PURE__ */ React37.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React37.createElement(import_editor_controls20.GapControl, { label: (0, import_i18n17.__)("Gaps", "elementor") })));
|
|
1842
1948
|
};
|
|
1843
1949
|
|
|
1844
1950
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1845
|
-
var
|
|
1846
|
-
var
|
|
1951
|
+
var React38 = __toESM(require("react"));
|
|
1952
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
1847
1953
|
var import_icons13 = require("@elementor/icons");
|
|
1848
|
-
var
|
|
1849
|
-
var
|
|
1850
|
-
var StartIcon3 = (0,
|
|
1851
|
-
var EndIcon3 = (0,
|
|
1954
|
+
var import_ui28 = require("@elementor/ui");
|
|
1955
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
1956
|
+
var StartIcon3 = (0, import_ui28.withDirection)(import_icons13.JustifyTopIcon);
|
|
1957
|
+
var EndIcon3 = (0, import_ui28.withDirection)(import_icons13.JustifyBottomIcon);
|
|
1852
1958
|
var iconProps3 = {
|
|
1853
1959
|
isClockwise: true,
|
|
1854
1960
|
offset: -90
|
|
@@ -1856,75 +1962,75 @@ var iconProps3 = {
|
|
|
1856
1962
|
var options4 = [
|
|
1857
1963
|
{
|
|
1858
1964
|
value: "start",
|
|
1859
|
-
label: (0,
|
|
1860
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1965
|
+
label: (0, import_i18n18.__)("Start", "elementor"),
|
|
1966
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1861
1967
|
showTooltip: true
|
|
1862
1968
|
},
|
|
1863
1969
|
{
|
|
1864
1970
|
value: "center",
|
|
1865
|
-
label: (0,
|
|
1866
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1971
|
+
label: (0, import_i18n18.__)("Center", "elementor"),
|
|
1972
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: import_icons13.JustifyCenterIcon, size, ...iconProps3 }),
|
|
1867
1973
|
showTooltip: true
|
|
1868
1974
|
},
|
|
1869
1975
|
{
|
|
1870
1976
|
value: "end",
|
|
1871
|
-
label: (0,
|
|
1872
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1977
|
+
label: (0, import_i18n18.__)("End", "elementor"),
|
|
1978
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1873
1979
|
showTooltip: true
|
|
1874
1980
|
},
|
|
1875
1981
|
{
|
|
1876
1982
|
value: "space-between",
|
|
1877
|
-
label: (0,
|
|
1878
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1983
|
+
label: (0, import_i18n18.__)("Space between", "elementor"),
|
|
1984
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: import_icons13.JustifySpaceBetweenVerticalIcon, size, ...iconProps3 }),
|
|
1879
1985
|
showTooltip: true
|
|
1880
1986
|
},
|
|
1881
1987
|
{
|
|
1882
1988
|
value: "space-around",
|
|
1883
|
-
label: (0,
|
|
1884
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1989
|
+
label: (0, import_i18n18.__)("Space around", "elementor"),
|
|
1990
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: import_icons13.JustifySpaceAroundVerticalIcon, size, ...iconProps3 }),
|
|
1885
1991
|
showTooltip: true
|
|
1886
1992
|
},
|
|
1887
1993
|
{
|
|
1888
1994
|
value: "space-evenly",
|
|
1889
|
-
label: (0,
|
|
1890
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1995
|
+
label: (0, import_i18n18.__)("Space evenly", "elementor"),
|
|
1996
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: import_icons13.JustifyDistributeVerticalIcon, size, ...iconProps3 }),
|
|
1891
1997
|
showTooltip: true
|
|
1892
1998
|
}
|
|
1893
1999
|
];
|
|
1894
2000
|
var JustifyContentField = () => {
|
|
1895
2001
|
const { isSiteRtl } = useDirection();
|
|
1896
|
-
return /* @__PURE__ */
|
|
2002
|
+
return /* @__PURE__ */ React38.createElement(import_ui28.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(import_ui28.ThemeProvider, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React38.createElement(import_ui28.Stack, { gap: 0.75 }, /* @__PURE__ */ React38.createElement(import_editor_controls21.ControlLabel, null, (0, import_i18n18.__)("Justify content", "elementor")), /* @__PURE__ */ React38.createElement(import_editor_controls21.ToggleControl, { options: options4, fullWidth: true })))));
|
|
1897
2003
|
};
|
|
1898
2004
|
|
|
1899
2005
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1900
|
-
var
|
|
1901
|
-
var
|
|
2006
|
+
var React39 = __toESM(require("react"));
|
|
2007
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
1902
2008
|
var import_icons14 = require("@elementor/icons");
|
|
1903
|
-
var
|
|
1904
|
-
var
|
|
2009
|
+
var import_ui29 = require("@elementor/ui");
|
|
2010
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1905
2011
|
var options5 = [
|
|
1906
2012
|
{
|
|
1907
2013
|
value: "nowrap",
|
|
1908
|
-
label: (0,
|
|
1909
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2014
|
+
label: (0, import_i18n19.__)("No wrap", "elementor"),
|
|
2015
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons14.ArrowRightIcon, { fontSize: size }),
|
|
1910
2016
|
showTooltip: true
|
|
1911
2017
|
},
|
|
1912
2018
|
{
|
|
1913
2019
|
value: "wrap",
|
|
1914
|
-
label: (0,
|
|
1915
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2020
|
+
label: (0, import_i18n19.__)("Wrap", "elementor"),
|
|
2021
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons14.ArrowBackIcon, { fontSize: size }),
|
|
1916
2022
|
showTooltip: true
|
|
1917
2023
|
},
|
|
1918
2024
|
{
|
|
1919
2025
|
value: "wrap-reverse",
|
|
1920
|
-
label: (0,
|
|
1921
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2026
|
+
label: (0, import_i18n19.__)("Reversed wrap", "elementor"),
|
|
2027
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons14.ArrowForwardIcon, { fontSize: size }),
|
|
1922
2028
|
showTooltip: true
|
|
1923
2029
|
}
|
|
1924
2030
|
];
|
|
1925
2031
|
var WrapField = () => {
|
|
1926
2032
|
const { isSiteRtl } = useDirection();
|
|
1927
|
-
return /* @__PURE__ */
|
|
2033
|
+
return /* @__PURE__ */ React39.createElement(import_ui29.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React39.createElement(import_ui29.ThemeProvider, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React39.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n19.__)("Wrap", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React39.createElement(import_editor_controls22.ToggleControl, { options: options5 }))))));
|
|
1928
2034
|
};
|
|
1929
2035
|
|
|
1930
2036
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1933,62 +2039,62 @@ var LayoutSection = () => {
|
|
|
1933
2039
|
const { element } = useElement();
|
|
1934
2040
|
const parent = (0, import_editor_elements6.useParentElement)(element.id);
|
|
1935
2041
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1936
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(DisplayField, null), ("flex" === display?.value || "inline-flex" === display?.value) && /* @__PURE__ */ React40.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React40.createElement(FlexChildFields, null));
|
|
1937
2043
|
};
|
|
1938
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1939
|
-
var FlexChildFields = () => /* @__PURE__ */
|
|
2044
|
+
var FlexFields = () => /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(FlexDirectionField, null), /* @__PURE__ */ React40.createElement(JustifyContentField, null), /* @__PURE__ */ React40.createElement(AlignItemsField, null), /* @__PURE__ */ React40.createElement(PanelDivider, null), /* @__PURE__ */ React40.createElement(GapControlField, null), /* @__PURE__ */ React40.createElement(WrapField, null));
|
|
2045
|
+
var FlexChildFields = () => /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(PanelDivider, null), /* @__PURE__ */ React40.createElement(import_editor_controls23.ControlLabel, null, (0, import_i18n20.__)("Flex child", "elementor")), /* @__PURE__ */ React40.createElement(AlignSelfChild, null), /* @__PURE__ */ React40.createElement(FlexOrderField, null), /* @__PURE__ */ React40.createElement(FlexSizeField, null));
|
|
1940
2046
|
|
|
1941
2047
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1942
|
-
var
|
|
2048
|
+
var React44 = __toESM(require("react"));
|
|
1943
2049
|
var import_session2 = require("@elementor/session");
|
|
1944
2050
|
|
|
1945
2051
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1946
|
-
var
|
|
1947
|
-
var
|
|
2052
|
+
var React41 = __toESM(require("react"));
|
|
2053
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1948
2054
|
var import_icons15 = require("@elementor/icons");
|
|
1949
|
-
var
|
|
1950
|
-
var
|
|
1951
|
-
var InlineStartIcon2 = (0,
|
|
1952
|
-
var InlineEndIcon2 = (0,
|
|
2055
|
+
var import_ui30 = require("@elementor/ui");
|
|
2056
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
2057
|
+
var InlineStartIcon2 = (0, import_ui30.withDirection)(import_icons15.SideLeftIcon);
|
|
2058
|
+
var InlineEndIcon2 = (0, import_ui30.withDirection)(import_icons15.SideRightIcon);
|
|
1953
2059
|
var sideIcons = {
|
|
1954
|
-
"inset-block-start": /* @__PURE__ */
|
|
1955
|
-
"inset-block-end": /* @__PURE__ */
|
|
1956
|
-
"inset-inline-start": /* @__PURE__ */
|
|
1957
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2060
|
+
"inset-block-start": /* @__PURE__ */ React41.createElement(import_icons15.SideTopIcon, { fontSize: "tiny" }),
|
|
2061
|
+
"inset-block-end": /* @__PURE__ */ React41.createElement(import_icons15.SideBottomIcon, { fontSize: "tiny" }),
|
|
2062
|
+
"inset-inline-start": /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2063
|
+
"inset-inline-end": /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
1958
2064
|
};
|
|
1959
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
1960
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
2065
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n21.__)("Right", "elementor") : (0, import_i18n21.__)("Left", "elementor");
|
|
2066
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n21.__)("Left", "elementor") : (0, import_i18n21.__)("Right", "elementor");
|
|
1961
2067
|
var DimensionsField = () => {
|
|
1962
2068
|
const { isSiteRtl } = useDirection();
|
|
1963
|
-
return /* @__PURE__ */
|
|
2069
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n21.__)("Top", "elementor") }), /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React41.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n21.__)("Bottom", "elementor") }), /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
1964
2070
|
};
|
|
1965
2071
|
var DimensionField = ({ side, label }) => {
|
|
1966
|
-
return /* @__PURE__ */
|
|
2072
|
+
return /* @__PURE__ */ React41.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React41.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(import_editor_controls24.ControlLabel, null, label)), /* @__PURE__ */ React41.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(StylesField, { bind: side }, /* @__PURE__ */ React41.createElement(import_editor_controls24.SizeControl, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
1967
2073
|
};
|
|
1968
2074
|
|
|
1969
2075
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1970
|
-
var
|
|
1971
|
-
var
|
|
1972
|
-
var
|
|
1973
|
-
var
|
|
2076
|
+
var React42 = __toESM(require("react"));
|
|
2077
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
2078
|
+
var import_ui31 = require("@elementor/ui");
|
|
2079
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
1974
2080
|
var positionOptions = [
|
|
1975
|
-
{ label: (0,
|
|
1976
|
-
{ label: (0,
|
|
1977
|
-
{ label: (0,
|
|
1978
|
-
{ label: (0,
|
|
1979
|
-
{ label: (0,
|
|
2081
|
+
{ label: (0, import_i18n22.__)("Static", "elementor"), value: "static" },
|
|
2082
|
+
{ label: (0, import_i18n22.__)("Relative", "elementor"), value: "relative" },
|
|
2083
|
+
{ label: (0, import_i18n22.__)("Absolute", "elementor"), value: "absolute" },
|
|
2084
|
+
{ label: (0, import_i18n22.__)("Fixed", "elementor"), value: "fixed" },
|
|
2085
|
+
{ label: (0, import_i18n22.__)("Sticky", "elementor"), value: "sticky" }
|
|
1980
2086
|
];
|
|
1981
2087
|
var PositionField = ({ onChange }) => {
|
|
1982
|
-
return /* @__PURE__ */
|
|
2088
|
+
return /* @__PURE__ */ React42.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React42.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n22.__)("Position", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React42.createElement(import_editor_controls25.SelectControl, { options: positionOptions, onChange }))));
|
|
1983
2089
|
};
|
|
1984
2090
|
|
|
1985
2091
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1986
|
-
var
|
|
1987
|
-
var
|
|
1988
|
-
var
|
|
1989
|
-
var
|
|
2092
|
+
var React43 = __toESM(require("react"));
|
|
2093
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2094
|
+
var import_ui32 = require("@elementor/ui");
|
|
2095
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1990
2096
|
var ZIndexField = () => {
|
|
1991
|
-
return /* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React43.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n23.__)("Z-index", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(import_editor_controls26.NumberControl, null))));
|
|
1992
2098
|
};
|
|
1993
2099
|
|
|
1994
2100
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -2020,7 +2126,7 @@ var PositionSection = () => {
|
|
|
2020
2126
|
}
|
|
2021
2127
|
};
|
|
2022
2128
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2023
|
-
return /* @__PURE__ */
|
|
2129
|
+
return /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(DimensionsField, null), /* @__PURE__ */ React44.createElement(ZIndexField, null)) : null);
|
|
2024
2130
|
};
|
|
2025
2131
|
var usePersistDimensions = () => {
|
|
2026
2132
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2030,116 +2136,116 @@ var usePersistDimensions = () => {
|
|
|
2030
2136
|
};
|
|
2031
2137
|
|
|
2032
2138
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2139
|
+
var React46 = __toESM(require("react"));
|
|
2140
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
2141
|
+
var import_ui34 = require("@elementor/ui");
|
|
2142
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
2143
|
+
|
|
2144
|
+
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2033
2145
|
var React45 = __toESM(require("react"));
|
|
2034
2146
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
2147
|
+
var import_icons16 = require("@elementor/icons");
|
|
2035
2148
|
var import_ui33 = require("@elementor/ui");
|
|
2036
2149
|
var import_i18n24 = require("@wordpress/i18n");
|
|
2037
|
-
|
|
2038
|
-
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2039
|
-
var React44 = __toESM(require("react"));
|
|
2040
|
-
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2041
|
-
var import_icons16 = require("@elementor/icons");
|
|
2042
|
-
var import_ui32 = require("@elementor/ui");
|
|
2043
|
-
var import_i18n23 = require("@wordpress/i18n");
|
|
2044
2150
|
var options6 = [
|
|
2045
2151
|
{
|
|
2046
2152
|
value: "visible",
|
|
2047
|
-
label: (0,
|
|
2048
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2153
|
+
label: (0, import_i18n24.__)("Visible", "elementor"),
|
|
2154
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.EyeIcon, { fontSize: size }),
|
|
2049
2155
|
showTooltip: true
|
|
2050
2156
|
},
|
|
2051
2157
|
{
|
|
2052
2158
|
value: "hidden",
|
|
2053
|
-
label: (0,
|
|
2054
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2159
|
+
label: (0, import_i18n24.__)("Hidden", "elementor"),
|
|
2160
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.EyeOffIcon, { fontSize: size }),
|
|
2055
2161
|
showTooltip: true
|
|
2056
2162
|
},
|
|
2057
2163
|
{
|
|
2058
2164
|
value: "auto",
|
|
2059
|
-
label: (0,
|
|
2060
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2165
|
+
label: (0, import_i18n24.__)("Auto", "elementor"),
|
|
2166
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.LetterAIcon, { fontSize: size }),
|
|
2061
2167
|
showTooltip: true
|
|
2062
2168
|
}
|
|
2063
2169
|
];
|
|
2064
2170
|
var OverflowField = () => {
|
|
2065
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React45.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls27.ControlLabel, null, (0, import_i18n24.__)("Overflow", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(import_editor_controls27.ToggleControl, { options: options6 }))));
|
|
2066
2172
|
};
|
|
2067
2173
|
|
|
2068
2174
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2069
2175
|
var SizeSection = () => {
|
|
2070
|
-
return /* @__PURE__ */
|
|
2176
|
+
return /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(import_ui34.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "width", label: (0, import_i18n25.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "height", label: (0, import_i18n25.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React46.createElement(import_ui34.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(
|
|
2071
2177
|
SizeField,
|
|
2072
2178
|
{
|
|
2073
2179
|
bind: "min-width",
|
|
2074
|
-
label: (0,
|
|
2180
|
+
label: (0, import_i18n25.__)("Min width", "elementor"),
|
|
2075
2181
|
extendedValues: ["auto"]
|
|
2076
2182
|
}
|
|
2077
|
-
)), /* @__PURE__ */
|
|
2183
|
+
)), /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(
|
|
2078
2184
|
SizeField,
|
|
2079
2185
|
{
|
|
2080
2186
|
bind: "min-height",
|
|
2081
|
-
label: (0,
|
|
2187
|
+
label: (0, import_i18n25.__)("Min height", "elementor"),
|
|
2082
2188
|
extendedValues: ["auto"]
|
|
2083
2189
|
}
|
|
2084
|
-
))), /* @__PURE__ */
|
|
2190
|
+
))), /* @__PURE__ */ React46.createElement(import_ui34.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "max-width", label: (0, import_i18n25.__)("Max width", "elementor") })), /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "max-height", label: (0, import_i18n25.__)("Max height", "elementor") }))), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(import_ui34.Stack, null, /* @__PURE__ */ React46.createElement(OverflowField, null)));
|
|
2085
2191
|
};
|
|
2086
2192
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2087
|
-
return /* @__PURE__ */
|
|
2193
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind }, /* @__PURE__ */ React46.createElement(import_ui34.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(import_editor_controls28.ControlLabel, null, label)), /* @__PURE__ */ React46.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(import_editor_controls28.SizeControl, { extendedValues }))));
|
|
2088
2194
|
};
|
|
2089
2195
|
|
|
2090
2196
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2091
|
-
var
|
|
2092
|
-
var
|
|
2093
|
-
var
|
|
2197
|
+
var React47 = __toESM(require("react"));
|
|
2198
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
2199
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
2094
2200
|
var SpacingSection = () => {
|
|
2095
2201
|
const { isSiteRtl } = useDirection();
|
|
2096
|
-
return /* @__PURE__ */
|
|
2097
|
-
|
|
2202
|
+
return /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React47.createElement(
|
|
2203
|
+
import_editor_controls29.LinkedDimensionsControl,
|
|
2098
2204
|
{
|
|
2099
|
-
label: (0,
|
|
2205
|
+
label: (0, import_i18n26.__)("Margin", "elementor"),
|
|
2100
2206
|
isSiteRtl,
|
|
2101
2207
|
extendedValues: ["auto"]
|
|
2102
2208
|
}
|
|
2103
|
-
)), /* @__PURE__ */
|
|
2209
|
+
)), /* @__PURE__ */ React47.createElement(PanelDivider, null), /* @__PURE__ */ React47.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React47.createElement(import_editor_controls29.LinkedDimensionsControl, { label: (0, import_i18n26.__)("Padding", "elementor"), isSiteRtl })));
|
|
2104
2210
|
};
|
|
2105
2211
|
|
|
2106
2212
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2107
|
-
var
|
|
2213
|
+
var React62 = __toESM(require("react"));
|
|
2108
2214
|
|
|
2109
2215
|
// src/components/collapsible-content.tsx
|
|
2110
|
-
var
|
|
2111
|
-
var
|
|
2112
|
-
var
|
|
2113
|
-
var
|
|
2216
|
+
var React48 = __toESM(require("react"));
|
|
2217
|
+
var import_react14 = require("react");
|
|
2218
|
+
var import_ui35 = require("@elementor/ui");
|
|
2219
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
2114
2220
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2115
|
-
const [open, setOpen] = (0,
|
|
2221
|
+
const [open, setOpen] = (0, import_react14.useState)(defaultOpen);
|
|
2116
2222
|
const handleToggle = () => {
|
|
2117
2223
|
setOpen((prevOpen) => !prevOpen);
|
|
2118
2224
|
};
|
|
2119
|
-
return /* @__PURE__ */
|
|
2120
|
-
|
|
2225
|
+
return /* @__PURE__ */ React48.createElement(import_ui35.Stack, null, /* @__PURE__ */ React48.createElement(
|
|
2226
|
+
import_ui35.Button,
|
|
2121
2227
|
{
|
|
2122
2228
|
fullWidth: true,
|
|
2123
2229
|
size: "small",
|
|
2124
2230
|
color: "secondary",
|
|
2125
2231
|
variant: "outlined",
|
|
2126
2232
|
onClick: handleToggle,
|
|
2127
|
-
endIcon: /* @__PURE__ */
|
|
2233
|
+
endIcon: /* @__PURE__ */ React48.createElement(CollapseIcon, { open }),
|
|
2128
2234
|
sx: { my: 0.5 }
|
|
2129
2235
|
},
|
|
2130
|
-
open ? (0,
|
|
2131
|
-
), /* @__PURE__ */
|
|
2236
|
+
open ? (0, import_i18n27.__)("Show less", "elementor") : (0, import_i18n27.__)("Show more", "elementor")
|
|
2237
|
+
), /* @__PURE__ */ React48.createElement(import_ui35.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2132
2238
|
};
|
|
2133
2239
|
|
|
2134
2240
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2135
|
-
var
|
|
2136
|
-
var
|
|
2137
|
-
var
|
|
2138
|
-
var
|
|
2241
|
+
var React49 = __toESM(require("react"));
|
|
2242
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
2243
|
+
var import_ui36 = require("@elementor/ui");
|
|
2244
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
2139
2245
|
|
|
2140
2246
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2141
|
-
var
|
|
2142
|
-
var
|
|
2247
|
+
var import_react15 = require("react");
|
|
2248
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
2143
2249
|
|
|
2144
2250
|
// src/sync/get-elementor-config.ts
|
|
2145
2251
|
var getElementorConfig = () => {
|
|
@@ -2149,9 +2255,9 @@ var getElementorConfig = () => {
|
|
|
2149
2255
|
|
|
2150
2256
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2151
2257
|
var supportedCategories = {
|
|
2152
|
-
system: (0,
|
|
2153
|
-
custom: (0,
|
|
2154
|
-
googlefonts: (0,
|
|
2258
|
+
system: (0, import_i18n28.__)("System", "elementor"),
|
|
2259
|
+
custom: (0, import_i18n28.__)("Custom Fonts", "elementor"),
|
|
2260
|
+
googlefonts: (0, import_i18n28.__)("Google Fonts", "elementor")
|
|
2155
2261
|
};
|
|
2156
2262
|
var getFontFamilies = () => {
|
|
2157
2263
|
const { controls } = getElementorConfig();
|
|
@@ -2163,7 +2269,7 @@ var getFontFamilies = () => {
|
|
|
2163
2269
|
};
|
|
2164
2270
|
var useFontFamilies = () => {
|
|
2165
2271
|
const fontFamilies = getFontFamilies();
|
|
2166
|
-
return (0,
|
|
2272
|
+
return (0, import_react15.useMemo)(() => {
|
|
2167
2273
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
2168
2274
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
2169
2275
|
if (!supportedCategories[category]) {
|
|
@@ -2188,188 +2294,188 @@ var FontFamilyField = () => {
|
|
|
2188
2294
|
if (fontFamilies.length === 0) {
|
|
2189
2295
|
return null;
|
|
2190
2296
|
}
|
|
2191
|
-
return /* @__PURE__ */
|
|
2297
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React49.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n29.__)("Font family", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React49.createElement(import_editor_controls30.FontFamilyControl, { fontFamilies }))));
|
|
2192
2298
|
};
|
|
2193
2299
|
|
|
2194
2300
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2195
|
-
var
|
|
2196
|
-
var
|
|
2197
|
-
var
|
|
2198
|
-
var
|
|
2301
|
+
var React50 = __toESM(require("react"));
|
|
2302
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
2303
|
+
var import_ui37 = require("@elementor/ui");
|
|
2304
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
2199
2305
|
var FontSizeField = () => {
|
|
2200
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React50.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n30.__)("Font size", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls31.SizeControl, null))));
|
|
2201
2307
|
};
|
|
2202
2308
|
|
|
2203
2309
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2204
|
-
var
|
|
2205
|
-
var
|
|
2310
|
+
var React51 = __toESM(require("react"));
|
|
2311
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
2206
2312
|
var import_icons17 = require("@elementor/icons");
|
|
2207
|
-
var
|
|
2208
|
-
var
|
|
2313
|
+
var import_ui38 = require("@elementor/ui");
|
|
2314
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
2209
2315
|
var options7 = [
|
|
2210
2316
|
{
|
|
2211
2317
|
value: "normal",
|
|
2212
|
-
label: (0,
|
|
2213
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2318
|
+
label: (0, import_i18n31.__)("Normal", "elementor"),
|
|
2319
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons17.MinusIcon, { fontSize: size }),
|
|
2214
2320
|
showTooltip: true
|
|
2215
2321
|
},
|
|
2216
2322
|
{
|
|
2217
2323
|
value: "italic",
|
|
2218
|
-
label: (0,
|
|
2219
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2324
|
+
label: (0, import_i18n31.__)("Italic", "elementor"),
|
|
2325
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons17.ItalicIcon, { fontSize: size }),
|
|
2220
2326
|
showTooltip: true
|
|
2221
2327
|
}
|
|
2222
2328
|
];
|
|
2223
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2329
|
+
var FontStyleField = () => /* @__PURE__ */ React51.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React51.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n31.__)("Font style", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui38.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React51.createElement(import_editor_controls32.ToggleControl, { options: options7 }))));
|
|
2224
2330
|
|
|
2225
2331
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2226
|
-
var React51 = __toESM(require("react"));
|
|
2227
|
-
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
2228
|
-
var import_ui38 = require("@elementor/ui");
|
|
2229
|
-
var import_i18n31 = require("@wordpress/i18n");
|
|
2230
|
-
var fontWeightOptions = [
|
|
2231
|
-
{ value: "100", label: (0, import_i18n31.__)("100 - Thin", "elementor") },
|
|
2232
|
-
{ value: "200", label: (0, import_i18n31.__)("200 - Extra light", "elementor") },
|
|
2233
|
-
{ value: "300", label: (0, import_i18n31.__)("300 - Light", "elementor") },
|
|
2234
|
-
{ value: "400", label: (0, import_i18n31.__)("400 - Normal", "elementor") },
|
|
2235
|
-
{ value: "500", label: (0, import_i18n31.__)("500 - Medium", "elementor") },
|
|
2236
|
-
{ value: "600", label: (0, import_i18n31.__)("600 - Semi bold", "elementor") },
|
|
2237
|
-
{ value: "700", label: (0, import_i18n31.__)("700 - Bold", "elementor") },
|
|
2238
|
-
{ value: "800", label: (0, import_i18n31.__)("800 - Extra bold", "elementor") },
|
|
2239
|
-
{ value: "900", label: (0, import_i18n31.__)("900 - Black", "elementor") }
|
|
2240
|
-
];
|
|
2241
|
-
var FontWeightField = () => {
|
|
2242
|
-
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React51.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n31.__)("Font weight", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React51.createElement(import_editor_controls32.SelectControl, { options: fontWeightOptions }))));
|
|
2243
|
-
};
|
|
2244
|
-
|
|
2245
|
-
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2246
2332
|
var React52 = __toESM(require("react"));
|
|
2247
2333
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
2248
2334
|
var import_ui39 = require("@elementor/ui");
|
|
2249
2335
|
var import_i18n32 = require("@wordpress/i18n");
|
|
2250
|
-
var
|
|
2251
|
-
|
|
2336
|
+
var fontWeightOptions = [
|
|
2337
|
+
{ value: "100", label: (0, import_i18n32.__)("100 - Thin", "elementor") },
|
|
2338
|
+
{ value: "200", label: (0, import_i18n32.__)("200 - Extra light", "elementor") },
|
|
2339
|
+
{ value: "300", label: (0, import_i18n32.__)("300 - Light", "elementor") },
|
|
2340
|
+
{ value: "400", label: (0, import_i18n32.__)("400 - Normal", "elementor") },
|
|
2341
|
+
{ value: "500", label: (0, import_i18n32.__)("500 - Medium", "elementor") },
|
|
2342
|
+
{ value: "600", label: (0, import_i18n32.__)("600 - Semi bold", "elementor") },
|
|
2343
|
+
{ value: "700", label: (0, import_i18n32.__)("700 - Bold", "elementor") },
|
|
2344
|
+
{ value: "800", label: (0, import_i18n32.__)("800 - Extra bold", "elementor") },
|
|
2345
|
+
{ value: "900", label: (0, import_i18n32.__)("900 - Black", "elementor") }
|
|
2346
|
+
];
|
|
2347
|
+
var FontWeightField = () => {
|
|
2348
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React52.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls33.ControlLabel, null, (0, import_i18n32.__)("Font weight", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React52.createElement(import_editor_controls33.SelectControl, { options: fontWeightOptions }))));
|
|
2252
2349
|
};
|
|
2253
2350
|
|
|
2254
|
-
// src/components/style-sections/typography-section/
|
|
2351
|
+
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2255
2352
|
var React53 = __toESM(require("react"));
|
|
2256
2353
|
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
2257
2354
|
var import_ui40 = require("@elementor/ui");
|
|
2258
2355
|
var import_i18n33 = require("@wordpress/i18n");
|
|
2259
|
-
var
|
|
2260
|
-
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "
|
|
2356
|
+
var LetterSpacingField = () => {
|
|
2357
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls34.ControlLabel, null, (0, import_i18n33.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls34.SizeControl, null))));
|
|
2261
2358
|
};
|
|
2262
2359
|
|
|
2263
|
-
// src/components/style-sections/typography-section/
|
|
2360
|
+
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2264
2361
|
var React54 = __toESM(require("react"));
|
|
2265
2362
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
2266
|
-
var import_icons18 = require("@elementor/icons");
|
|
2267
2363
|
var import_ui41 = require("@elementor/ui");
|
|
2268
2364
|
var import_i18n34 = require("@wordpress/i18n");
|
|
2269
|
-
var
|
|
2270
|
-
|
|
2365
|
+
var LineHeightField = () => {
|
|
2366
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React54.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n34.__)("Line height", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls35.SizeControl, null))));
|
|
2367
|
+
};
|
|
2368
|
+
|
|
2369
|
+
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2370
|
+
var React55 = __toESM(require("react"));
|
|
2371
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
2372
|
+
var import_icons18 = require("@elementor/icons");
|
|
2373
|
+
var import_ui42 = require("@elementor/ui");
|
|
2374
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
2375
|
+
var StartIcon4 = (0, import_ui42.withDirection)(import_icons18.AlignLeftIcon);
|
|
2376
|
+
var EndIcon4 = (0, import_ui42.withDirection)(import_icons18.AlignRightIcon);
|
|
2271
2377
|
var options8 = [
|
|
2272
2378
|
{
|
|
2273
2379
|
value: "start",
|
|
2274
|
-
label: (0,
|
|
2275
|
-
renderContent: () => /* @__PURE__ */
|
|
2380
|
+
label: (0, import_i18n35.__)("Start", "elementor"),
|
|
2381
|
+
renderContent: () => /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
2276
2382
|
showTooltip: true
|
|
2277
2383
|
},
|
|
2278
2384
|
{
|
|
2279
2385
|
value: "center",
|
|
2280
|
-
label: (0,
|
|
2281
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2386
|
+
label: (0, import_i18n35.__)("Center", "elementor"),
|
|
2387
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.AlignCenterIcon, { fontSize: size }),
|
|
2282
2388
|
showTooltip: true
|
|
2283
2389
|
},
|
|
2284
2390
|
{
|
|
2285
2391
|
value: "end",
|
|
2286
|
-
label: (0,
|
|
2287
|
-
renderContent: () => /* @__PURE__ */
|
|
2392
|
+
label: (0, import_i18n35.__)("End", "elementor"),
|
|
2393
|
+
renderContent: () => /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
2288
2394
|
showTooltip: true
|
|
2289
2395
|
},
|
|
2290
2396
|
{
|
|
2291
2397
|
value: "justify",
|
|
2292
|
-
label: (0,
|
|
2293
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2398
|
+
label: (0, import_i18n35.__)("Justify", "elementor"),
|
|
2399
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.AlignJustifiedIcon, { fontSize: size }),
|
|
2294
2400
|
showTooltip: true
|
|
2295
2401
|
}
|
|
2296
2402
|
];
|
|
2297
2403
|
var TextAlignmentField = () => {
|
|
2298
|
-
return /* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React55.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n35.__)("Alignment", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui42.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(import_editor_controls36.ToggleControl, { options: options8 }))));
|
|
2299
2405
|
};
|
|
2300
2406
|
|
|
2301
2407
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2302
|
-
var
|
|
2303
|
-
var
|
|
2304
|
-
var
|
|
2305
|
-
var
|
|
2408
|
+
var React56 = __toESM(require("react"));
|
|
2409
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
2410
|
+
var import_ui43 = require("@elementor/ui");
|
|
2411
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
2306
2412
|
var TextColorField = () => {
|
|
2307
|
-
return /* @__PURE__ */
|
|
2413
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React56.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls37.ControlLabel, null, (0, import_i18n36.__)("Text color", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls37.ColorControl, null))));
|
|
2308
2414
|
};
|
|
2309
2415
|
|
|
2310
2416
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2311
|
-
var
|
|
2312
|
-
var
|
|
2417
|
+
var React57 = __toESM(require("react"));
|
|
2418
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
2313
2419
|
var import_icons19 = require("@elementor/icons");
|
|
2314
|
-
var
|
|
2315
|
-
var
|
|
2420
|
+
var import_ui44 = require("@elementor/ui");
|
|
2421
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
2316
2422
|
var options9 = [
|
|
2317
2423
|
{
|
|
2318
2424
|
value: "none",
|
|
2319
|
-
label: (0,
|
|
2320
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2425
|
+
label: (0, import_i18n37.__)("None", "elementor"),
|
|
2426
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
2321
2427
|
showTooltip: true,
|
|
2322
2428
|
exclusive: true
|
|
2323
2429
|
},
|
|
2324
2430
|
{
|
|
2325
2431
|
value: "underline",
|
|
2326
|
-
label: (0,
|
|
2327
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2432
|
+
label: (0, import_i18n37.__)("Underline", "elementor"),
|
|
2433
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(import_icons19.UnderlineIcon, { fontSize: size }),
|
|
2328
2434
|
showTooltip: true
|
|
2329
2435
|
},
|
|
2330
2436
|
{
|
|
2331
2437
|
value: "line-through",
|
|
2332
|
-
label: (0,
|
|
2333
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2438
|
+
label: (0, import_i18n37.__)("Line-through", "elementor"),
|
|
2439
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(import_icons19.StrikethroughIcon, { fontSize: size }),
|
|
2334
2440
|
showTooltip: true
|
|
2335
2441
|
},
|
|
2336
2442
|
{
|
|
2337
2443
|
value: "overline",
|
|
2338
|
-
label: (0,
|
|
2339
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2444
|
+
label: (0, import_i18n37.__)("Overline", "elementor"),
|
|
2445
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(import_icons19.OverlineIcon, { fontSize: size }),
|
|
2340
2446
|
showTooltip: true
|
|
2341
2447
|
}
|
|
2342
2448
|
];
|
|
2343
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
2449
|
+
var TextDecorationField = () => /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(import_editor_controls38.ControlLabel, null, (0, import_i18n37.__)("Line decoration", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(import_editor_controls38.ToggleControl, { options: options9, exclusive: false }))));
|
|
2344
2450
|
|
|
2345
2451
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2346
|
-
var
|
|
2347
|
-
var
|
|
2452
|
+
var React58 = __toESM(require("react"));
|
|
2453
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
2348
2454
|
var import_icons20 = require("@elementor/icons");
|
|
2349
|
-
var
|
|
2350
|
-
var
|
|
2455
|
+
var import_ui45 = require("@elementor/ui");
|
|
2456
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
2351
2457
|
var options10 = [
|
|
2352
2458
|
{
|
|
2353
2459
|
value: "ltr",
|
|
2354
|
-
label: (0,
|
|
2355
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2460
|
+
label: (0, import_i18n38.__)("Left to right", "elementor"),
|
|
2461
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons20.TextDirectionLtrIcon, { fontSize: size }),
|
|
2356
2462
|
showTooltip: true
|
|
2357
2463
|
},
|
|
2358
2464
|
{
|
|
2359
2465
|
value: "rtl",
|
|
2360
|
-
label: (0,
|
|
2361
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2466
|
+
label: (0, import_i18n38.__)("Right to left", "elementor"),
|
|
2467
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons20.TextDirectionRtlIcon, { fontSize: size }),
|
|
2362
2468
|
showTooltip: true
|
|
2363
2469
|
}
|
|
2364
2470
|
];
|
|
2365
2471
|
var TextDirectionField = () => {
|
|
2366
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React58.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(import_editor_controls39.ControlLabel, null, (0, import_i18n38.__)("Direction", "elementor"))), /* @__PURE__ */ React58.createElement(import_ui45.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React58.createElement(import_editor_controls39.ToggleControl, { options: options10 }))));
|
|
2367
2473
|
};
|
|
2368
2474
|
|
|
2369
2475
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2370
|
-
var
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2476
|
+
var React59 = __toESM(require("react"));
|
|
2477
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
2478
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
2373
2479
|
var initTextStroke = {
|
|
2374
2480
|
$$type: "stroke",
|
|
2375
2481
|
value: {
|
|
@@ -2395,73 +2501,73 @@ var TextStrokeField = () => {
|
|
|
2395
2501
|
setTextStroke(null);
|
|
2396
2502
|
};
|
|
2397
2503
|
const hasTextStroke = Boolean(textStroke);
|
|
2398
|
-
return /* @__PURE__ */
|
|
2504
|
+
return /* @__PURE__ */ React59.createElement(
|
|
2399
2505
|
AddOrRemoveContent,
|
|
2400
2506
|
{
|
|
2401
|
-
label: (0,
|
|
2507
|
+
label: (0, import_i18n39.__)("Text stroke", "elementor"),
|
|
2402
2508
|
isAdded: hasTextStroke,
|
|
2403
2509
|
onAdd: addTextStroke,
|
|
2404
2510
|
onRemove: removeTextStroke
|
|
2405
2511
|
},
|
|
2406
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ React59.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React59.createElement(import_editor_controls40.StrokeControl, null))
|
|
2407
2513
|
);
|
|
2408
2514
|
};
|
|
2409
2515
|
|
|
2410
2516
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2411
|
-
var
|
|
2412
|
-
var
|
|
2517
|
+
var React60 = __toESM(require("react"));
|
|
2518
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
2413
2519
|
var import_icons21 = require("@elementor/icons");
|
|
2414
|
-
var
|
|
2415
|
-
var
|
|
2520
|
+
var import_ui46 = require("@elementor/ui");
|
|
2521
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
2416
2522
|
var options11 = [
|
|
2417
2523
|
{
|
|
2418
2524
|
value: "none",
|
|
2419
|
-
label: (0,
|
|
2420
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2525
|
+
label: (0, import_i18n40.__)("None", "elementor"),
|
|
2526
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
2421
2527
|
showTooltip: true
|
|
2422
2528
|
},
|
|
2423
2529
|
{
|
|
2424
2530
|
value: "capitalize",
|
|
2425
|
-
label: (0,
|
|
2426
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2531
|
+
label: (0, import_i18n40.__)("Capitalize", "elementor"),
|
|
2532
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(import_icons21.LetterCaseIcon, { fontSize: size }),
|
|
2427
2533
|
showTooltip: true
|
|
2428
2534
|
},
|
|
2429
2535
|
{
|
|
2430
2536
|
value: "uppercase",
|
|
2431
|
-
label: (0,
|
|
2432
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2537
|
+
label: (0, import_i18n40.__)("Uppercase", "elementor"),
|
|
2538
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(import_icons21.LetterCaseUpperIcon, { fontSize: size }),
|
|
2433
2539
|
showTooltip: true
|
|
2434
2540
|
},
|
|
2435
2541
|
{
|
|
2436
2542
|
value: "lowercase",
|
|
2437
|
-
label: (0,
|
|
2438
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2543
|
+
label: (0, import_i18n40.__)("Lowercase", "elementor"),
|
|
2544
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(import_icons21.LetterCaseLowerIcon, { fontSize: size }),
|
|
2439
2545
|
showTooltip: true
|
|
2440
2546
|
}
|
|
2441
2547
|
];
|
|
2442
|
-
var TransformField = () => /* @__PURE__ */
|
|
2548
|
+
var TransformField = () => /* @__PURE__ */ React60.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React60.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(import_editor_controls41.ControlLabel, null, (0, import_i18n40.__)("Text transform", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui46.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(import_editor_controls41.ToggleControl, { options: options11 }))));
|
|
2443
2549
|
|
|
2444
2550
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2445
|
-
var
|
|
2446
|
-
var
|
|
2447
|
-
var
|
|
2448
|
-
var
|
|
2551
|
+
var React61 = __toESM(require("react"));
|
|
2552
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
2553
|
+
var import_ui47 = require("@elementor/ui");
|
|
2554
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
2449
2555
|
var WordSpacingField = () => {
|
|
2450
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React61.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(import_editor_controls42.ControlLabel, null, (0, import_i18n41.__)("Word spacing", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(import_editor_controls42.SizeControl, null))));
|
|
2451
2557
|
};
|
|
2452
2558
|
|
|
2453
2559
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2454
2560
|
var TypographySection = () => {
|
|
2455
|
-
return /* @__PURE__ */
|
|
2561
|
+
return /* @__PURE__ */ React62.createElement(SectionContent, null, /* @__PURE__ */ React62.createElement(FontFamilyField, null), /* @__PURE__ */ React62.createElement(FontWeightField, null), /* @__PURE__ */ React62.createElement(FontSizeField, null), /* @__PURE__ */ React62.createElement(PanelDivider, null), /* @__PURE__ */ React62.createElement(TextAlignmentField, null), /* @__PURE__ */ React62.createElement(TextColorField, null), /* @__PURE__ */ React62.createElement(CollapsibleContent, null, /* @__PURE__ */ React62.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React62.createElement(LineHeightField, null), /* @__PURE__ */ React62.createElement(LetterSpacingField, null), /* @__PURE__ */ React62.createElement(WordSpacingField, null), /* @__PURE__ */ React62.createElement(PanelDivider, null), /* @__PURE__ */ React62.createElement(TextDecorationField, null), /* @__PURE__ */ React62.createElement(TransformField, null), /* @__PURE__ */ React62.createElement(TextDirectionField, null), /* @__PURE__ */ React62.createElement(FontStyleField, null), /* @__PURE__ */ React62.createElement(TextStrokeField, null))));
|
|
2456
2562
|
};
|
|
2457
2563
|
|
|
2458
2564
|
// src/components/style-tab.tsx
|
|
2459
2565
|
var StyleTab = () => {
|
|
2460
2566
|
const currentClassesProp = useCurrentClassesProp();
|
|
2461
2567
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2462
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
2568
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react16.useState)(null);
|
|
2463
2569
|
const breakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
|
|
2464
|
-
return /* @__PURE__ */
|
|
2570
|
+
return /* @__PURE__ */ React63.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React63.createElement(
|
|
2465
2571
|
StyleProvider,
|
|
2466
2572
|
{
|
|
2467
2573
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2472,11 +2578,11 @@ var StyleTab = () => {
|
|
|
2472
2578
|
},
|
|
2473
2579
|
setMetaState: setActiveStyleState
|
|
2474
2580
|
},
|
|
2475
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ React63.createElement(import_session3.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React63.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React63.createElement(CssClassSelector, null), /* @__PURE__ */ React63.createElement(import_ui48.Divider, null), /* @__PURE__ */ React63.createElement(SectionsList, null, /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Layout", "elementor") }, /* @__PURE__ */ React63.createElement(LayoutSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Spacing", "elementor") }, /* @__PURE__ */ React63.createElement(SpacingSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Size", "elementor") }, /* @__PURE__ */ React63.createElement(SizeSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Position", "elementor") }, /* @__PURE__ */ React63.createElement(PositionSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Typography", "elementor") }, /* @__PURE__ */ React63.createElement(TypographySection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Background", "elementor") }, /* @__PURE__ */ React63.createElement(BackgroundSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Border", "elementor") }, /* @__PURE__ */ React63.createElement(BorderSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: (0, import_i18n42.__)("Effects", "elementor") }, /* @__PURE__ */ React63.createElement(EffectsSection, null)))))
|
|
2476
2582
|
));
|
|
2477
2583
|
};
|
|
2478
2584
|
function useActiveStyleDefId(currentClassesProp) {
|
|
2479
|
-
const [activeStyledDefId, setActiveStyledDefId] = (0,
|
|
2585
|
+
const [activeStyledDefId, setActiveStyledDefId] = (0, import_react16.useState)(null);
|
|
2480
2586
|
const fallback = useFirstElementStyleDef(currentClassesProp);
|
|
2481
2587
|
return [activeStyledDefId || fallback?.id || null, setActiveStyledDefId];
|
|
2482
2588
|
}
|
|
@@ -2500,11 +2606,11 @@ function useCurrentClassesProp() {
|
|
|
2500
2606
|
// src/components/editing-panel-tabs.tsx
|
|
2501
2607
|
var EditingPanelTabs = () => {
|
|
2502
2608
|
const { element } = useElement();
|
|
2503
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
2609
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui49.useTabs)("settings");
|
|
2504
2610
|
return (
|
|
2505
2611
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2506
2612
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2507
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ React64.createElement(import_react17.Fragment, { key: element.id }, /* @__PURE__ */ React64.createElement(import_ui49.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React64.createElement(import_ui49.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React64.createElement(import_ui49.Tab, { label: (0, import_i18n43.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React64.createElement(import_ui49.Tab, { label: (0, import_i18n43.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React64.createElement(import_ui49.Divider, null), /* @__PURE__ */ React64.createElement(import_ui49.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React64.createElement(SettingsTab, null)), /* @__PURE__ */ React64.createElement(import_ui49.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React64.createElement(StyleTab, null))))
|
|
2508
2614
|
);
|
|
2509
2615
|
};
|
|
2510
2616
|
|
|
@@ -2517,8 +2623,8 @@ var EditingPanel = () => {
|
|
|
2517
2623
|
if (!element || !elementType) {
|
|
2518
2624
|
return null;
|
|
2519
2625
|
}
|
|
2520
|
-
const panelTitle = (0,
|
|
2521
|
-
return /* @__PURE__ */
|
|
2626
|
+
const panelTitle = (0, import_i18n44.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2627
|
+
return /* @__PURE__ */ React65.createElement(import_ui50.ErrorBoundary, { fallback: /* @__PURE__ */ React65.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React65.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React65.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React65.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React65.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React65.createElement(import_icons22.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React65.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React65.createElement(import_editor_controls43.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React65.createElement(import_editor_controls43.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React65.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React65.createElement(EditingPanelTabs, null))))))));
|
|
2522
2628
|
};
|
|
2523
2629
|
|
|
2524
2630
|
// src/panel.ts
|
|
@@ -2534,7 +2640,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
2534
2640
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2535
2641
|
|
|
2536
2642
|
// src/hooks/use-open-editor-panel.ts
|
|
2537
|
-
var
|
|
2643
|
+
var import_react18 = require("react");
|
|
2538
2644
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
2539
2645
|
|
|
2540
2646
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -2551,7 +2657,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
2551
2657
|
// src/hooks/use-open-editor-panel.ts
|
|
2552
2658
|
var useOpenEditorPanel = () => {
|
|
2553
2659
|
const { open } = usePanelActions();
|
|
2554
|
-
(0,
|
|
2660
|
+
(0, import_react18.useEffect)(() => {
|
|
2555
2661
|
return (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("panel/editor/open"), () => {
|
|
2556
2662
|
if (isAtomicWidgetSelected()) {
|
|
2557
2663
|
open();
|
|
@@ -2567,17 +2673,17 @@ var EditingPanelHooks = () => {
|
|
|
2567
2673
|
};
|
|
2568
2674
|
|
|
2569
2675
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2570
|
-
var
|
|
2571
|
-
var
|
|
2572
|
-
var
|
|
2676
|
+
var React69 = __toESM(require("react"));
|
|
2677
|
+
var import_react22 = require("react");
|
|
2678
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
2573
2679
|
var import_icons24 = require("@elementor/icons");
|
|
2574
|
-
var
|
|
2575
|
-
var
|
|
2680
|
+
var import_ui53 = require("@elementor/ui");
|
|
2681
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
2576
2682
|
|
|
2577
2683
|
// src/components/popover-content.tsx
|
|
2578
|
-
var
|
|
2579
|
-
var
|
|
2580
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
2684
|
+
var React66 = __toESM(require("react"));
|
|
2685
|
+
var import_ui51 = require("@elementor/ui");
|
|
2686
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React66.createElement(import_ui51.Stack, { alignItems, gap, p }, children);
|
|
2581
2687
|
|
|
2582
2688
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2583
2689
|
var import_session5 = require("@elementor/session");
|
|
@@ -2588,15 +2694,15 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2588
2694
|
};
|
|
2589
2695
|
|
|
2590
2696
|
// src/dynamics/dynamic-control.tsx
|
|
2591
|
-
var
|
|
2592
|
-
var
|
|
2697
|
+
var React67 = __toESM(require("react"));
|
|
2698
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
2593
2699
|
|
|
2594
2700
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2595
|
-
var
|
|
2701
|
+
var import_react20 = require("react");
|
|
2596
2702
|
|
|
2597
2703
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2598
|
-
var
|
|
2599
|
-
var
|
|
2704
|
+
var import_react19 = require("react");
|
|
2705
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
2600
2706
|
|
|
2601
2707
|
// src/dynamics/sync/get-elementor-config.ts
|
|
2602
2708
|
var getElementorConfig2 = () => {
|
|
@@ -2642,12 +2748,12 @@ var dynamicPropTypeUtil = (0, import_editor_props6.createPropUtils)(
|
|
|
2642
2748
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2643
2749
|
var usePropDynamicTags = () => {
|
|
2644
2750
|
let categories = [];
|
|
2645
|
-
const { propType } = (0,
|
|
2751
|
+
const { propType } = (0, import_editor_controls44.useBoundProp)();
|
|
2646
2752
|
if (propType) {
|
|
2647
2753
|
const propDynamicType = getDynamicPropType(propType);
|
|
2648
2754
|
categories = propDynamicType?.settings.categories || [];
|
|
2649
2755
|
}
|
|
2650
|
-
return (0,
|
|
2756
|
+
return (0, import_react19.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
2651
2757
|
};
|
|
2652
2758
|
var getDynamicTagsByCategories = (categories) => {
|
|
2653
2759
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -2663,12 +2769,12 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
2663
2769
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2664
2770
|
var useDynamicTag = (tagName) => {
|
|
2665
2771
|
const dynamicTags = usePropDynamicTags();
|
|
2666
|
-
return (0,
|
|
2772
|
+
return (0, import_react20.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
2667
2773
|
};
|
|
2668
2774
|
|
|
2669
2775
|
// src/dynamics/dynamic-control.tsx
|
|
2670
2776
|
var DynamicControl = ({ bind, children }) => {
|
|
2671
|
-
const { value, setValue } = (0,
|
|
2777
|
+
const { value, setValue } = (0, import_editor_controls45.useBoundProp)(dynamicPropTypeUtil);
|
|
2672
2778
|
const { name = "", settings } = value ?? {};
|
|
2673
2779
|
const dynamicTag = useDynamicTag(name);
|
|
2674
2780
|
if (!dynamicTag) {
|
|
@@ -2687,22 +2793,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2687
2793
|
});
|
|
2688
2794
|
};
|
|
2689
2795
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2690
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ React67.createElement(import_editor_controls45.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React67.createElement(import_editor_controls45.PropKeyProvider, { bind }, children));
|
|
2691
2797
|
};
|
|
2692
2798
|
|
|
2693
2799
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2694
|
-
var
|
|
2695
|
-
var
|
|
2696
|
-
var
|
|
2800
|
+
var React68 = __toESM(require("react"));
|
|
2801
|
+
var import_react21 = require("react");
|
|
2802
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
2697
2803
|
var import_icons23 = require("@elementor/icons");
|
|
2698
|
-
var
|
|
2699
|
-
var
|
|
2804
|
+
var import_ui52 = require("@elementor/ui");
|
|
2805
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
2700
2806
|
var SIZE3 = "tiny";
|
|
2701
2807
|
var DynamicSelection = ({ onSelect }) => {
|
|
2702
|
-
const [searchValue, setSearchValue] = (0,
|
|
2808
|
+
const [searchValue, setSearchValue] = (0, import_react21.useState)("");
|
|
2703
2809
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2704
|
-
const { value: anyValue } = (0,
|
|
2705
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
2810
|
+
const { value: anyValue } = (0, import_editor_controls46.useBoundProp)();
|
|
2811
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls46.useBoundProp)(dynamicPropTypeUtil);
|
|
2706
2812
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2707
2813
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2708
2814
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -2717,28 +2823,28 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2717
2823
|
setValue({ name: value, settings: {} });
|
|
2718
2824
|
onSelect?.();
|
|
2719
2825
|
};
|
|
2720
|
-
return /* @__PURE__ */
|
|
2721
|
-
|
|
2826
|
+
return /* @__PURE__ */ React68.createElement(import_ui52.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React68.createElement(NoDynamicTags, null) : /* @__PURE__ */ React68.createElement(import_react21.Fragment, null, /* @__PURE__ */ React68.createElement(import_ui52.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React68.createElement(
|
|
2827
|
+
import_ui52.TextField,
|
|
2722
2828
|
{
|
|
2723
2829
|
fullWidth: true,
|
|
2724
2830
|
size: SIZE3,
|
|
2725
2831
|
value: searchValue,
|
|
2726
2832
|
onChange: handleSearch,
|
|
2727
|
-
placeholder: (0,
|
|
2833
|
+
placeholder: (0, import_i18n45.__)("Search dynamic tags\u2026", "elementor"),
|
|
2728
2834
|
InputProps: {
|
|
2729
|
-
startAdornment: /* @__PURE__ */
|
|
2835
|
+
startAdornment: /* @__PURE__ */ React68.createElement(import_ui52.InputAdornment, { position: "start" }, /* @__PURE__ */ React68.createElement(import_icons23.SearchIcon, { fontSize: SIZE3 }))
|
|
2730
2836
|
}
|
|
2731
2837
|
}
|
|
2732
|
-
)), /* @__PURE__ */
|
|
2733
|
-
|
|
2838
|
+
)), /* @__PURE__ */ React68.createElement(import_ui52.Divider, null), /* @__PURE__ */ React68.createElement(import_ui52.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React68.createElement(import_ui52.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React68.createElement(import_react21.Fragment, { key: index }, /* @__PURE__ */ React68.createElement(
|
|
2839
|
+
import_ui52.ListSubheader,
|
|
2734
2840
|
{
|
|
2735
2841
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
2736
2842
|
},
|
|
2737
2843
|
dynamicGroups?.[category]?.title || category
|
|
2738
2844
|
), items3.map(({ value, label: tagLabel }) => {
|
|
2739
2845
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2740
|
-
return /* @__PURE__ */
|
|
2741
|
-
|
|
2846
|
+
return /* @__PURE__ */ React68.createElement(
|
|
2847
|
+
import_ui52.MenuItem,
|
|
2742
2848
|
{
|
|
2743
2849
|
key: value,
|
|
2744
2850
|
selected: isSelected,
|
|
@@ -2748,10 +2854,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2748
2854
|
},
|
|
2749
2855
|
tagLabel
|
|
2750
2856
|
);
|
|
2751
|
-
})))) : /* @__PURE__ */
|
|
2857
|
+
})))) : /* @__PURE__ */ React68.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
2752
2858
|
};
|
|
2753
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
2754
|
-
|
|
2859
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React68.createElement(
|
|
2860
|
+
import_ui52.Stack,
|
|
2755
2861
|
{
|
|
2756
2862
|
gap: 1,
|
|
2757
2863
|
alignItems: "center",
|
|
@@ -2761,12 +2867,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React67.createElem
|
|
|
2761
2867
|
color: "text.secondary",
|
|
2762
2868
|
sx: { pb: 3.5 }
|
|
2763
2869
|
},
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
/* @__PURE__ */
|
|
2766
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ React68.createElement(import_icons23.DatabaseIcon, { fontSize: "large" }),
|
|
2871
|
+
/* @__PURE__ */ React68.createElement(import_ui52.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n45.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React68.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
2872
|
+
/* @__PURE__ */ React68.createElement(import_ui52.Typography, { align: "center", variant: "caption" }, (0, import_i18n45.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React68.createElement(import_ui52.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n45.__)("Clear & try again", "elementor")))
|
|
2767
2873
|
);
|
|
2768
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
2769
|
-
|
|
2874
|
+
var NoDynamicTags = () => /* @__PURE__ */ React68.createElement(import_ui52.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React68.createElement(import_ui52.Divider, null), /* @__PURE__ */ React68.createElement(
|
|
2875
|
+
import_ui52.Stack,
|
|
2770
2876
|
{
|
|
2771
2877
|
gap: 1,
|
|
2772
2878
|
alignItems: "center",
|
|
@@ -2776,9 +2882,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React67.createElement(import_ui51.Box,
|
|
|
2776
2882
|
color: "text.secondary",
|
|
2777
2883
|
sx: { pb: 3.5 }
|
|
2778
2884
|
},
|
|
2779
|
-
/* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2885
|
+
/* @__PURE__ */ React68.createElement(import_icons23.DatabaseIcon, { fontSize: "large" }),
|
|
2886
|
+
/* @__PURE__ */ React68.createElement(import_ui52.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n45.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
2887
|
+
/* @__PURE__ */ React68.createElement(import_ui52.Typography, { align: "center", variant: "caption" }, (0, import_i18n45.__)("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
2782
2888
|
));
|
|
2783
2889
|
var useFilteredOptions = (searchValue) => {
|
|
2784
2890
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -2799,12 +2905,12 @@ var useFilteredOptions = (searchValue) => {
|
|
|
2799
2905
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2800
2906
|
var SIZE4 = "tiny";
|
|
2801
2907
|
var DynamicSelectionControl = () => {
|
|
2802
|
-
const { setValue: setAnyValue } = (0,
|
|
2803
|
-
const { bind, value } = (0,
|
|
2908
|
+
const { setValue: setAnyValue } = (0, import_editor_controls47.useBoundProp)();
|
|
2909
|
+
const { bind, value } = (0, import_editor_controls47.useBoundProp)(dynamicPropTypeUtil);
|
|
2804
2910
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
2805
2911
|
const { name: tagName = "" } = value;
|
|
2806
|
-
const selectionPopoverId = (0,
|
|
2807
|
-
const selectionPopoverState = (0,
|
|
2912
|
+
const selectionPopoverId = (0, import_react22.useId)();
|
|
2913
|
+
const selectionPopoverState = (0, import_ui53.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
|
|
2808
2914
|
const dynamicTag = useDynamicTag(tagName);
|
|
2809
2915
|
const removeDynamicTag = () => {
|
|
2810
2916
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -2812,70 +2918,70 @@ var DynamicSelectionControl = () => {
|
|
|
2812
2918
|
if (!dynamicTag) {
|
|
2813
2919
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2814
2920
|
}
|
|
2815
|
-
return /* @__PURE__ */
|
|
2816
|
-
|
|
2921
|
+
return /* @__PURE__ */ React69.createElement(import_ui53.Box, null, /* @__PURE__ */ React69.createElement(
|
|
2922
|
+
import_ui53.UnstableTag,
|
|
2817
2923
|
{
|
|
2818
2924
|
fullWidth: true,
|
|
2819
2925
|
showActionsOnHover: true,
|
|
2820
2926
|
label: dynamicTag.label,
|
|
2821
|
-
startIcon: /* @__PURE__ */
|
|
2822
|
-
...(0,
|
|
2823
|
-
actions: /* @__PURE__ */
|
|
2824
|
-
|
|
2927
|
+
startIcon: /* @__PURE__ */ React69.createElement(import_icons24.DatabaseIcon, { fontSize: SIZE4 }),
|
|
2928
|
+
...(0, import_ui53.bindTrigger)(selectionPopoverState),
|
|
2929
|
+
actions: /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React69.createElement(
|
|
2930
|
+
import_ui53.IconButton,
|
|
2825
2931
|
{
|
|
2826
2932
|
size: SIZE4,
|
|
2827
2933
|
onClick: removeDynamicTag,
|
|
2828
|
-
"aria-label": (0,
|
|
2934
|
+
"aria-label": (0, import_i18n46.__)("Remove dynamic value", "elementor")
|
|
2829
2935
|
},
|
|
2830
|
-
/* @__PURE__ */
|
|
2936
|
+
/* @__PURE__ */ React69.createElement(import_icons24.XIcon, { fontSize: SIZE4 })
|
|
2831
2937
|
))
|
|
2832
2938
|
}
|
|
2833
|
-
), /* @__PURE__ */
|
|
2834
|
-
|
|
2939
|
+
), /* @__PURE__ */ React69.createElement(
|
|
2940
|
+
import_ui53.Popover,
|
|
2835
2941
|
{
|
|
2836
2942
|
disablePortal: true,
|
|
2837
2943
|
disableScrollLock: true,
|
|
2838
2944
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2839
|
-
...(0,
|
|
2945
|
+
...(0, import_ui53.bindPopover)(selectionPopoverState)
|
|
2840
2946
|
},
|
|
2841
|
-
/* @__PURE__ */
|
|
2947
|
+
/* @__PURE__ */ React69.createElement(import_ui53.Stack, null, /* @__PURE__ */ React69.createElement(import_ui53.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React69.createElement(import_icons24.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React69.createElement(import_ui53.Typography, { variant: "subtitle2" }, (0, import_i18n46.__)("Dynamic tags", "elementor")), /* @__PURE__ */ React69.createElement(import_ui53.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React69.createElement(import_icons24.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React69.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2842
2948
|
));
|
|
2843
2949
|
};
|
|
2844
2950
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
2845
|
-
const popupId = (0,
|
|
2846
|
-
const settingsPopupState = (0,
|
|
2951
|
+
const popupId = (0, import_react22.useId)();
|
|
2952
|
+
const settingsPopupState = (0, import_ui53.usePopupState)({ variant: "popover", popupId });
|
|
2847
2953
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
2848
2954
|
if (!hasDynamicSettings) {
|
|
2849
2955
|
return null;
|
|
2850
2956
|
}
|
|
2851
|
-
return /* @__PURE__ */
|
|
2852
|
-
|
|
2957
|
+
return /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(
|
|
2958
|
+
import_ui53.IconButton,
|
|
2853
2959
|
{
|
|
2854
2960
|
size: SIZE4,
|
|
2855
|
-
...(0,
|
|
2856
|
-
"aria-label": (0,
|
|
2961
|
+
...(0, import_ui53.bindTrigger)(settingsPopupState),
|
|
2962
|
+
"aria-label": (0, import_i18n46.__)("Settings", "elementor")
|
|
2857
2963
|
},
|
|
2858
|
-
/* @__PURE__ */
|
|
2859
|
-
), /* @__PURE__ */
|
|
2860
|
-
|
|
2964
|
+
/* @__PURE__ */ React69.createElement(import_icons24.SettingsIcon, { fontSize: SIZE4 })
|
|
2965
|
+
), /* @__PURE__ */ React69.createElement(
|
|
2966
|
+
import_ui53.Popover,
|
|
2861
2967
|
{
|
|
2862
2968
|
disableScrollLock: true,
|
|
2863
2969
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2864
|
-
...(0,
|
|
2970
|
+
...(0, import_ui53.bindPopover)(settingsPopupState)
|
|
2865
2971
|
},
|
|
2866
|
-
/* @__PURE__ */
|
|
2972
|
+
/* @__PURE__ */ React69.createElement(import_ui53.Paper, { component: import_ui53.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React69.createElement(import_ui53.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React69.createElement(import_icons24.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React69.createElement(import_ui53.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React69.createElement(import_ui53.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React69.createElement(import_icons24.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React69.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2867
2973
|
));
|
|
2868
2974
|
};
|
|
2869
2975
|
var DynamicSettings = ({ controls }) => {
|
|
2870
2976
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
2871
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
2977
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui53.useTabs)(0);
|
|
2872
2978
|
if (!tabs.length) {
|
|
2873
2979
|
return null;
|
|
2874
2980
|
}
|
|
2875
|
-
return /* @__PURE__ */
|
|
2876
|
-
return /* @__PURE__ */
|
|
2981
|
+
return /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(import_ui53.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React69.createElement(import_ui53.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React69.createElement(import_ui53.Divider, null), tabs.map(({ value }, index) => {
|
|
2982
|
+
return /* @__PURE__ */ React69.createElement(import_ui53.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React69.createElement(PopoverContent, { p: 1.5 }, value.items.map((item) => {
|
|
2877
2983
|
if (item.type === "control") {
|
|
2878
|
-
return /* @__PURE__ */
|
|
2984
|
+
return /* @__PURE__ */ React69.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2879
2985
|
}
|
|
2880
2986
|
return null;
|
|
2881
2987
|
})));
|
|
@@ -2885,22 +2991,22 @@ var Control3 = ({ control }) => {
|
|
|
2885
2991
|
if (!getControlByType(control.type)) {
|
|
2886
2992
|
return null;
|
|
2887
2993
|
}
|
|
2888
|
-
return /* @__PURE__ */
|
|
2994
|
+
return /* @__PURE__ */ React69.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React69.createElement(import_ui53.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React69.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React69.createElement(import_editor_controls47.ControlLabel, null, control.label)) : null, /* @__PURE__ */ React69.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React69.createElement(Control, { type: control.type, props: control.props }))));
|
|
2889
2995
|
};
|
|
2890
2996
|
|
|
2891
2997
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2892
|
-
var
|
|
2893
|
-
var
|
|
2998
|
+
var React70 = __toESM(require("react"));
|
|
2999
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
2894
3000
|
var import_icons25 = require("@elementor/icons");
|
|
2895
|
-
var
|
|
3001
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
2896
3002
|
var usePropDynamicAction = () => {
|
|
2897
|
-
const { propType } = (0,
|
|
3003
|
+
const { propType } = (0, import_editor_controls48.useBoundProp)();
|
|
2898
3004
|
const visible = !!propType && supportsDynamic(propType);
|
|
2899
3005
|
return {
|
|
2900
3006
|
visible,
|
|
2901
3007
|
icon: import_icons25.DatabaseIcon,
|
|
2902
|
-
title: (0,
|
|
2903
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3008
|
+
title: (0, import_i18n47.__)("Dynamic tags", "elementor"),
|
|
3009
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React70.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2904
3010
|
};
|
|
2905
3011
|
};
|
|
2906
3012
|
|