@elementor/editor-editing-panel 1.46.0 → 1.48.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 +85 -0
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1094 -889
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +979 -780
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -18
- package/src/components/popover-scrollable-content.tsx +12 -0
- package/src/components/section-content.tsx +6 -16
- package/src/components/section.tsx +8 -4
- package/src/components/settings-tab.tsx +5 -2
- package/src/components/style-sections/background-section/background-section.tsx +4 -1
- package/src/components/style-sections/border-section/border-color-field.tsx +10 -16
- package/src/components/style-sections/border-section/border-field.tsx +14 -7
- package/src/components/style-sections/border-section/border-radius-field.tsx +4 -2
- package/src/components/style-sections/border-section/border-style-field.tsx +11 -16
- package/src/components/style-sections/border-section/border-width-field.tsx +4 -2
- package/src/components/style-sections/effects-section/effects-section.tsx +29 -6
- package/src/components/style-sections/layout-section/align-content-field.tsx +11 -12
- package/src/components/style-sections/layout-section/align-items-field.tsx +8 -11
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +11 -16
- package/src/components/style-sections/layout-section/display-field.tsx +6 -6
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +11 -14
- package/src/components/style-sections/layout-section/flex-order-field.tsx +23 -20
- package/src/components/style-sections/layout-section/flex-size-field.tsx +42 -64
- package/src/components/style-sections/layout-section/gap-control-field.tsx +5 -6
- package/src/components/style-sections/layout-section/justify-content-field.tsx +11 -12
- package/src/components/style-sections/layout-section/layout-section.tsx +9 -2
- package/src/components/style-sections/layout-section/opacity-control-field.tsx +9 -13
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +6 -1
- package/src/components/style-sections/layout-section/wrap-field.tsx +10 -14
- package/src/components/style-sections/position-section/dimensions-field.tsx +4 -4
- package/src/components/style-sections/position-section/offset-field.tsx +12 -14
- package/src/components/style-sections/position-section/position-field.tsx +7 -11
- package/src/components/style-sections/position-section/position-section.tsx +19 -8
- package/src/components/style-sections/position-section/z-index-field.tsx +7 -11
- package/src/components/style-sections/size-section/object-fit-field.tsx +7 -11
- package/src/components/style-sections/size-section/object-position-field.tsx +4 -1
- package/src/components/style-sections/size-section/overflow-field.tsx +7 -11
- package/src/components/style-sections/size-section/size-section.tsx +13 -8
- package/src/components/style-sections/spacing-section/spacing-section.tsx +7 -4
- package/src/components/style-sections/typography-section/column-count-field.tsx +7 -11
- package/src/components/style-sections/typography-section/column-gap-field.tsx +9 -13
- package/src/components/style-sections/typography-section/font-family-field.tsx +9 -11
- package/src/components/style-sections/typography-section/font-size-field.tsx +9 -13
- package/src/components/style-sections/typography-section/font-style-field.tsx +13 -13
- package/src/components/style-sections/typography-section/font-weight-field.tsx +7 -11
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +9 -13
- package/src/components/style-sections/typography-section/line-height-field.tsx +9 -13
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +11 -14
- package/src/components/style-sections/typography-section/text-color-field.tsx +7 -11
- package/src/components/style-sections/typography-section/text-decoration-field.tsx +7 -11
- package/src/components/style-sections/typography-section/text-direction-field.tsx +7 -11
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +7 -3
- package/src/components/style-sections/typography-section/transform-field.tsx +7 -11
- package/src/components/style-sections/typography-section/typography-section.tsx +6 -1
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +9 -13
- package/src/components/style-tab.tsx +1 -1
- package/src/components/styles-field-layout.tsx +50 -0
- package/src/contexts/section-context.tsx +14 -0
- package/src/controls-registry/control-type-container.tsx +6 -2
- package/src/controls-registry/controls-registry.tsx +1 -1
- package/src/controls-registry/settings-field.tsx +85 -10
- package/src/controls-registry/styles-field.tsx +15 -5
- package/src/dynamics/components/dynamic-selection-control.tsx +10 -4
- package/src/dynamics/components/dynamic-selection.tsx +18 -14
- package/src/hooks/use-default-panel-settings.ts +4 -0
- package/src/hooks/use-styles-field.ts +3 -4
- package/src/hooks/use-styles-fields.ts +141 -73
- package/src/index.ts +4 -0
- package/src/init.ts +0 -6
- package/src/popover-action.tsx +8 -1
- package/src/styles-inheritance/components/styles-inheritance-indicator.tsx +4 -1
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +9 -19
- package/src/sync/experiments-flags.ts +1 -0
- package/src/components/popover-content.tsx +0 -15
package/dist/index.js
CHANGED
|
@@ -30,6 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
EXPERIMENTAL_FEATURES: () => EXPERIMENTAL_FEATURES,
|
|
34
|
+
PopoverScrollableContent: () => PopoverScrollableContent,
|
|
33
35
|
controlActionsMenu: () => controlActionsMenu,
|
|
34
36
|
init: () => init3,
|
|
35
37
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
@@ -38,9 +40,18 @@ __export(index_exports, {
|
|
|
38
40
|
useBoundProp: () => import_editor_controls60.useBoundProp,
|
|
39
41
|
useFontFamilies: () => useFontFamilies,
|
|
40
42
|
usePanelActions: () => usePanelActions,
|
|
41
|
-
usePanelStatus: () => usePanelStatus
|
|
43
|
+
usePanelStatus: () => usePanelStatus,
|
|
44
|
+
useSectionWidth: () => useSectionWidth
|
|
42
45
|
});
|
|
43
46
|
module.exports = __toCommonJS(index_exports);
|
|
47
|
+
|
|
48
|
+
// src/sync/experiments-flags.ts
|
|
49
|
+
var EXPERIMENTAL_FEATURES = {
|
|
50
|
+
V_3_30: "e_v_3_30",
|
|
51
|
+
V_3_31: "e_v_3_31"
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/index.ts
|
|
44
55
|
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
45
56
|
|
|
46
57
|
// src/control-replacement.tsx
|
|
@@ -554,13 +565,6 @@ var import_editor_props = require("@elementor/editor-props");
|
|
|
554
565
|
var import_editor_styles_repository3 = require("@elementor/editor-styles-repository");
|
|
555
566
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
556
567
|
var import_i18n = require("@wordpress/i18n");
|
|
557
|
-
|
|
558
|
-
// src/sync/experiments-flags.ts
|
|
559
|
-
var EXPERIMENTAL_FEATURES = {
|
|
560
|
-
V_3_30: "e_v_3_30"
|
|
561
|
-
};
|
|
562
|
-
|
|
563
|
-
// src/components/css-classes/use-apply-and-unapply-class.ts
|
|
564
568
|
function useApplyClass() {
|
|
565
569
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
566
570
|
const { element } = useElement();
|
|
@@ -1183,15 +1187,15 @@ function useHandleSelect() {
|
|
|
1183
1187
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
1184
1188
|
|
|
1185
1189
|
// src/components/editing-panel.tsx
|
|
1186
|
-
var
|
|
1190
|
+
var React86 = __toESM(require("react"));
|
|
1187
1191
|
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
1188
1192
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
1189
1193
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1190
|
-
var
|
|
1194
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
1191
1195
|
var import_icons24 = require("@elementor/icons");
|
|
1192
1196
|
var import_session5 = require("@elementor/session");
|
|
1193
|
-
var
|
|
1194
|
-
var
|
|
1197
|
+
var import_ui45 = require("@elementor/ui");
|
|
1198
|
+
var import_i18n62 = require("@wordpress/i18n");
|
|
1195
1199
|
|
|
1196
1200
|
// src/controls-actions.ts
|
|
1197
1201
|
var import_menus = require("@elementor/menus");
|
|
@@ -1216,7 +1220,7 @@ function PopoverAction({
|
|
|
1216
1220
|
title,
|
|
1217
1221
|
visible = true,
|
|
1218
1222
|
icon: Icon,
|
|
1219
|
-
content:
|
|
1223
|
+
content: PopoverContent
|
|
1220
1224
|
}) {
|
|
1221
1225
|
const id = (0, import_react11.useId)();
|
|
1222
1226
|
const popupState = (0, import_ui8.usePopupState)({
|
|
@@ -1233,11 +1237,18 @@ function PopoverAction({
|
|
|
1233
1237
|
disableScrollLock: true,
|
|
1234
1238
|
anchorOrigin: {
|
|
1235
1239
|
vertical: "bottom",
|
|
1236
|
-
horizontal: "
|
|
1240
|
+
horizontal: "right"
|
|
1241
|
+
},
|
|
1242
|
+
transformOrigin: {
|
|
1243
|
+
vertical: "top",
|
|
1244
|
+
horizontal: "right"
|
|
1245
|
+
},
|
|
1246
|
+
PaperProps: {
|
|
1247
|
+
sx: { my: 2.5 }
|
|
1237
1248
|
},
|
|
1238
1249
|
...(0, import_ui8.bindPopover)(popupState)
|
|
1239
1250
|
},
|
|
1240
|
-
/* @__PURE__ */ React10.createElement(
|
|
1251
|
+
/* @__PURE__ */ React10.createElement(PopoverContent, { close: popupState.close })
|
|
1241
1252
|
));
|
|
1242
1253
|
}
|
|
1243
1254
|
|
|
@@ -1257,11 +1268,11 @@ function EditorPanelErrorFallback() {
|
|
|
1257
1268
|
}
|
|
1258
1269
|
|
|
1259
1270
|
// src/components/editing-panel-tabs.tsx
|
|
1260
|
-
var
|
|
1261
|
-
var
|
|
1262
|
-
var
|
|
1263
|
-
var
|
|
1264
|
-
var
|
|
1271
|
+
var React85 = __toESM(require("react"));
|
|
1272
|
+
var import_react38 = require("react");
|
|
1273
|
+
var import_editor_v1_adapters18 = require("@elementor/editor-v1-adapters");
|
|
1274
|
+
var import_ui44 = require("@elementor/ui");
|
|
1275
|
+
var import_i18n61 = require("@wordpress/i18n");
|
|
1265
1276
|
|
|
1266
1277
|
// src/contexts/scroll-context.tsx
|
|
1267
1278
|
var React12 = __toESM(require("react"));
|
|
@@ -1319,6 +1330,10 @@ var defaultPanelSettingsContext = (0, import_react13.createContext)({
|
|
|
1319
1330
|
"e-flexbox": {
|
|
1320
1331
|
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
1321
1332
|
defaultTab: "style"
|
|
1333
|
+
},
|
|
1334
|
+
"e-divider": {
|
|
1335
|
+
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
1336
|
+
defaultTab: "style"
|
|
1322
1337
|
}
|
|
1323
1338
|
});
|
|
1324
1339
|
var useDefaultPanelSettings = () => {
|
|
@@ -1347,7 +1362,7 @@ var useStateByElement = (key, initialValue) => {
|
|
|
1347
1362
|
// src/components/settings-tab.tsx
|
|
1348
1363
|
var React19 = __toESM(require("react"));
|
|
1349
1364
|
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
1350
|
-
var
|
|
1365
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
1351
1366
|
var import_session2 = require("@elementor/session");
|
|
1352
1367
|
var import_ui16 = require("@elementor/ui");
|
|
1353
1368
|
|
|
@@ -1364,7 +1379,7 @@ var controlTypes = {
|
|
|
1364
1379
|
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1365
1380
|
size: { component: import_editor_controls2.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props2.sizePropTypeUtil },
|
|
1366
1381
|
select: { component: import_editor_controls2.SelectControl, layout: "two-columns", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1367
|
-
link: { component: import_editor_controls2.LinkControl, layout: "
|
|
1382
|
+
link: { component: import_editor_controls2.LinkControl, layout: "custom", propTypeUtil: import_editor_props2.linkPropTypeUtil },
|
|
1368
1383
|
url: { component: import_editor_controls2.UrlControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1369
1384
|
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props2.booleanPropTypeUtil },
|
|
1370
1385
|
repeatable: { component: import_editor_controls2.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
@@ -1390,6 +1405,9 @@ var Control = ({ props, type }) => {
|
|
|
1390
1405
|
var React14 = __toESM(require("react"));
|
|
1391
1406
|
var import_ui11 = require("@elementor/ui");
|
|
1392
1407
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
1408
|
+
if (layout === "custom") {
|
|
1409
|
+
return children;
|
|
1410
|
+
}
|
|
1393
1411
|
return /* @__PURE__ */ React14.createElement(StyledContainer, { layout }, children);
|
|
1394
1412
|
};
|
|
1395
1413
|
var StyledContainer = (0, import_ui11.styled)(import_ui11.Box, {
|
|
@@ -1409,8 +1427,13 @@ var getGridLayout = (layout) => ({
|
|
|
1409
1427
|
|
|
1410
1428
|
// src/controls-registry/settings-field.tsx
|
|
1411
1429
|
var React15 = __toESM(require("react"));
|
|
1430
|
+
var import_react15 = require("react");
|
|
1412
1431
|
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
1432
|
+
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
1413
1433
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
1434
|
+
var import_editor_props3 = require("@elementor/editor-props");
|
|
1435
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1436
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
1414
1437
|
|
|
1415
1438
|
// src/controls-registry/create-top-level-object-type.ts
|
|
1416
1439
|
var createTopLevelOjectType = ({ schema }) => {
|
|
@@ -1426,26 +1449,80 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
1426
1449
|
};
|
|
1427
1450
|
|
|
1428
1451
|
// src/controls-registry/settings-field.tsx
|
|
1429
|
-
var SettingsField = ({ bind, children }) => {
|
|
1452
|
+
var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
1430
1453
|
const { element, elementType } = useElement();
|
|
1431
|
-
const
|
|
1432
|
-
const value = { [bind]:
|
|
1454
|
+
const elementSettingValues = (0, import_editor_elements3.useElementSettings)(element.id, Object.keys(elementType.propsSchema));
|
|
1455
|
+
const value = { [bind]: elementSettingValues?.[bind] };
|
|
1433
1456
|
const propType = createTopLevelOjectType({ schema: elementType.propsSchema });
|
|
1457
|
+
const undoableUpdateElementProp = useUndoableUpdateElementProp({
|
|
1458
|
+
propKey: bind,
|
|
1459
|
+
elementId: element.id,
|
|
1460
|
+
propDisplayName
|
|
1461
|
+
});
|
|
1434
1462
|
const setValue = (newValue) => {
|
|
1435
|
-
(0,
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
}
|
|
1463
|
+
const isVersion331Active = (0, import_editor_v1_adapters3.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_31);
|
|
1464
|
+
if (isVersion331Active) {
|
|
1465
|
+
undoableUpdateElementProp({ newValue });
|
|
1466
|
+
} else {
|
|
1467
|
+
(0, import_editor_elements3.updateElementSettings)({ id: element.id, props: newValue });
|
|
1468
|
+
}
|
|
1439
1469
|
};
|
|
1440
|
-
|
|
1470
|
+
const isDisabled = (prop) => getDisableState(prop, elementSettingValues);
|
|
1471
|
+
return /* @__PURE__ */ React15.createElement(import_editor_controls3.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React15.createElement(import_editor_controls3.PropKeyProvider, { bind }, children));
|
|
1441
1472
|
};
|
|
1473
|
+
function getDisableState(propType, elementValues) {
|
|
1474
|
+
const disablingDependencies = propType.dependencies?.filter(({ effect }) => effect === "disable") || [];
|
|
1475
|
+
if (!disablingDependencies.length) {
|
|
1476
|
+
return false;
|
|
1477
|
+
}
|
|
1478
|
+
if (disablingDependencies.length > 1) {
|
|
1479
|
+
throw new Error("Multiple disabling dependencies are not supported.");
|
|
1480
|
+
}
|
|
1481
|
+
return (0, import_editor_props3.shouldApplyEffect)(disablingDependencies[0], elementValues);
|
|
1482
|
+
}
|
|
1483
|
+
function useUndoableUpdateElementProp({
|
|
1484
|
+
propKey,
|
|
1485
|
+
elementId,
|
|
1486
|
+
propDisplayName
|
|
1487
|
+
}) {
|
|
1488
|
+
return (0, import_react15.useMemo)(() => {
|
|
1489
|
+
return (0, import_editor_v1_adapters3.undoable)(
|
|
1490
|
+
{
|
|
1491
|
+
do: ({ newValue }) => {
|
|
1492
|
+
const prevPropValue = (0, import_editor_elements3.getElementSetting)(elementId, propKey);
|
|
1493
|
+
(0, import_editor_elements3.updateElementSettings)({ id: elementId, props: { ...newValue }, withHistory: false });
|
|
1494
|
+
(0, import_editor_documents2.setDocumentModifiedStatus)(true);
|
|
1495
|
+
return { [propKey]: prevPropValue };
|
|
1496
|
+
},
|
|
1497
|
+
undo: ({}, prevProps) => {
|
|
1498
|
+
(0, import_editor_elements3.updateElementSettings)({ id: elementId, props: prevProps, withHistory: false });
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
title: (0, import_editor_elements3.getElementLabel)(elementId),
|
|
1503
|
+
// translators: %s is the name of the property that was edited.
|
|
1504
|
+
subtitle: (0, import_i18n5.__)("%s edited", "elementor").replace("%s", propDisplayName)
|
|
1505
|
+
}
|
|
1506
|
+
);
|
|
1507
|
+
}, [propKey, elementId, propDisplayName]);
|
|
1508
|
+
}
|
|
1442
1509
|
|
|
1443
1510
|
// src/components/section.tsx
|
|
1444
1511
|
var React17 = __toESM(require("react"));
|
|
1445
|
-
var
|
|
1446
|
-
var
|
|
1512
|
+
var import_react18 = require("react");
|
|
1513
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
1447
1514
|
var import_ui14 = require("@elementor/ui");
|
|
1448
1515
|
|
|
1516
|
+
// src/contexts/section-context.tsx
|
|
1517
|
+
var import_react16 = require("react");
|
|
1518
|
+
var FALLBACK_SECTION_WIDTH = 320;
|
|
1519
|
+
var SectionRefContext = (0, import_react16.createContext)(null);
|
|
1520
|
+
var useSectionRef = () => (0, import_react16.useContext)(SectionRefContext);
|
|
1521
|
+
var useSectionWidth = () => {
|
|
1522
|
+
const sectionRef = useSectionRef();
|
|
1523
|
+
return sectionRef?.current?.offsetWidth ?? FALLBACK_SECTION_WIDTH;
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1449
1526
|
// src/components/collapse-icon.tsx
|
|
1450
1527
|
var import_icons3 = require("@elementor/icons");
|
|
1451
1528
|
var import_ui12 = require("@elementor/ui");
|
|
@@ -1460,9 +1537,9 @@ var CollapseIcon = (0, import_ui12.styled)(import_icons3.ChevronDownIcon, {
|
|
|
1460
1537
|
|
|
1461
1538
|
// src/components/collapsible-content.tsx
|
|
1462
1539
|
var React16 = __toESM(require("react"));
|
|
1463
|
-
var
|
|
1540
|
+
var import_react17 = require("react");
|
|
1464
1541
|
var import_ui13 = require("@elementor/ui");
|
|
1465
|
-
var
|
|
1542
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
1466
1543
|
var IndicatorsWrapper = (0, import_ui13.styled)("div")`
|
|
1467
1544
|
position: absolute;
|
|
1468
1545
|
top: 0;
|
|
@@ -1474,7 +1551,7 @@ var IndicatorsWrapper = (0, import_ui13.styled)("div")`
|
|
|
1474
1551
|
justify-content: center;
|
|
1475
1552
|
`;
|
|
1476
1553
|
var CollapsibleContent = ({ children, defaultOpen = false, titleEnd = null }) => {
|
|
1477
|
-
const [open, setOpen] = (0,
|
|
1554
|
+
const [open, setOpen] = (0, import_react17.useState)(defaultOpen);
|
|
1478
1555
|
const handleToggle = () => {
|
|
1479
1556
|
setOpen((prevOpen) => !prevOpen);
|
|
1480
1557
|
};
|
|
@@ -1489,7 +1566,7 @@ var CollapsibleContent = ({ children, defaultOpen = false, titleEnd = null }) =>
|
|
|
1489
1566
|
endIcon: /* @__PURE__ */ React16.createElement(CollapseIcon, { open }),
|
|
1490
1567
|
sx: { my: 0.5 }
|
|
1491
1568
|
},
|
|
1492
|
-
open ? (0,
|
|
1569
|
+
open ? (0, import_i18n6.__)("Show less", "elementor") : (0, import_i18n6.__)("Show more", "elementor")
|
|
1493
1570
|
), titleEnd && /* @__PURE__ */ React16.createElement(IndicatorsWrapper, null, getCollapsibleValue(titleEnd, open))), /* @__PURE__ */ React16.createElement(import_ui13.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1494
1571
|
};
|
|
1495
1572
|
function getCollapsibleValue(value, isOpen) {
|
|
@@ -1502,13 +1579,14 @@ function getCollapsibleValue(value, isOpen) {
|
|
|
1502
1579
|
// src/components/section.tsx
|
|
1503
1580
|
function Section({ title, children, defaultExpanded = false, titleEnd }) {
|
|
1504
1581
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
1582
|
+
const ref = (0, import_react18.useRef)(null);
|
|
1505
1583
|
const handleClick = () => {
|
|
1506
1584
|
setIsOpen(!isOpen);
|
|
1507
1585
|
};
|
|
1508
|
-
const id = (0,
|
|
1586
|
+
const id = (0, import_react18.useId)();
|
|
1509
1587
|
const labelId = `label-${id}`;
|
|
1510
1588
|
const contentId = `content-${id}`;
|
|
1511
|
-
const isUsingTitleEnd = (0,
|
|
1589
|
+
const isUsingTitleEnd = (0, import_editor_v1_adapters4.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
1512
1590
|
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
1513
1591
|
import_ui14.ListItemButton,
|
|
1514
1592
|
{
|
|
@@ -1526,7 +1604,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd }) {
|
|
|
1526
1604
|
}
|
|
1527
1605
|
), isUsingTitleEnd ? getCollapsibleValue(titleEnd, isOpen) : null),
|
|
1528
1606
|
/* @__PURE__ */ React17.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
1529
|
-
), /* @__PURE__ */ React17.createElement(import_ui14.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React17.createElement(import_ui14.Stack, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React17.createElement(import_ui14.Divider, null));
|
|
1607
|
+
), /* @__PURE__ */ React17.createElement(import_ui14.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React17.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React17.createElement(import_ui14.Stack, { ref, gap: 2.5, p: 2 }, children))), /* @__PURE__ */ React17.createElement(import_ui14.Divider, null));
|
|
1530
1608
|
}
|
|
1531
1609
|
|
|
1532
1610
|
// src/components/sections-list.tsx
|
|
@@ -1540,7 +1618,7 @@ function SectionsList(props) {
|
|
|
1540
1618
|
var SettingsTab = () => {
|
|
1541
1619
|
const { elementType, element } = useElement();
|
|
1542
1620
|
const settingsDefault = useDefaultPanelSettings();
|
|
1543
|
-
const isDefaultExpanded = (sectionId) => (0,
|
|
1621
|
+
const isDefaultExpanded = (sectionId) => (0, import_editor_v1_adapters5.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId) : true;
|
|
1544
1622
|
return /* @__PURE__ */ React19.createElement(import_session2.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React19.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
1545
1623
|
if (type === "control") {
|
|
1546
1624
|
return /* @__PURE__ */ React19.createElement(Control2, { key: value.bind, control: value });
|
|
@@ -1570,7 +1648,10 @@ var Control2 = ({ control }) => {
|
|
|
1570
1648
|
}
|
|
1571
1649
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1572
1650
|
const controlProps = populateChildControlProps(control.props);
|
|
1573
|
-
|
|
1651
|
+
if (layout === "custom") {
|
|
1652
|
+
controlProps.label = control.label;
|
|
1653
|
+
}
|
|
1654
|
+
return /* @__PURE__ */ React19.createElement(SettingsField, { bind: control.bind, propDisplayName: control.label || control.bind }, control.meta?.topDivider && /* @__PURE__ */ React19.createElement(import_ui16.Divider, null), /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React19.createElement(import_editor_controls4.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React19.createElement(Control, { type: control.type, props: controlProps })));
|
|
1574
1655
|
};
|
|
1575
1656
|
function populateChildControlProps(props) {
|
|
1576
1657
|
if (props.childControlType) {
|
|
@@ -1589,36 +1670,36 @@ function populateChildControlProps(props) {
|
|
|
1589
1670
|
}
|
|
1590
1671
|
|
|
1591
1672
|
// src/components/style-tab.tsx
|
|
1592
|
-
var
|
|
1593
|
-
var
|
|
1594
|
-
var
|
|
1673
|
+
var React84 = __toESM(require("react"));
|
|
1674
|
+
var import_react37 = require("react");
|
|
1675
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
1595
1676
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1596
1677
|
var import_session4 = require("@elementor/session");
|
|
1597
|
-
var
|
|
1598
|
-
var
|
|
1678
|
+
var import_ui43 = require("@elementor/ui");
|
|
1679
|
+
var import_i18n60 = require("@wordpress/i18n");
|
|
1599
1680
|
|
|
1600
1681
|
// src/contexts/styles-inheritance-context.tsx
|
|
1601
1682
|
var React20 = __toESM(require("react"));
|
|
1602
|
-
var
|
|
1683
|
+
var import_react20 = require("react");
|
|
1603
1684
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1604
|
-
var
|
|
1685
|
+
var import_editor_props6 = require("@elementor/editor-props");
|
|
1605
1686
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1606
1687
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
1607
1688
|
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1608
1689
|
|
|
1609
1690
|
// src/hooks/use-styles-rerender.ts
|
|
1610
|
-
var
|
|
1691
|
+
var import_react19 = require("react");
|
|
1611
1692
|
var useStylesRerender = () => {
|
|
1612
1693
|
const { provider } = useStyle();
|
|
1613
|
-
const [, reRender] = (0,
|
|
1614
|
-
(0,
|
|
1694
|
+
const [, reRender] = (0, import_react19.useReducer)((p) => !p, false);
|
|
1695
|
+
(0, import_react19.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1615
1696
|
};
|
|
1616
1697
|
|
|
1617
1698
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1618
|
-
var
|
|
1699
|
+
var import_editor_props5 = require("@elementor/editor-props");
|
|
1619
1700
|
|
|
1620
1701
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1621
|
-
var
|
|
1702
|
+
var import_editor_props4 = require("@elementor/editor-props");
|
|
1622
1703
|
|
|
1623
1704
|
// src/styles-inheritance/utils.ts
|
|
1624
1705
|
var DEFAULT_STATE = "normal";
|
|
@@ -1718,7 +1799,7 @@ function buildInitialSnapshotFromStyles(styles) {
|
|
|
1718
1799
|
variant: { props }
|
|
1719
1800
|
} = styleData;
|
|
1720
1801
|
Object.entries(props).forEach(([key, value]) => {
|
|
1721
|
-
const filteredValue = (0,
|
|
1802
|
+
const filteredValue = (0, import_editor_props4.filterEmptyValues)(value);
|
|
1722
1803
|
if (filteredValue === null) {
|
|
1723
1804
|
return;
|
|
1724
1805
|
}
|
|
@@ -1764,7 +1845,7 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
1764
1845
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
1765
1846
|
...rest,
|
|
1766
1847
|
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
1767
|
-
})).filter(({ value: styleValue }) => !(0,
|
|
1848
|
+
})).filter(({ value: styleValue }) => !(0, import_editor_props5.isEmpty)(styleValue));
|
|
1768
1849
|
}
|
|
1769
1850
|
return inheritanceChain;
|
|
1770
1851
|
}
|
|
@@ -1806,7 +1887,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
1806
1887
|
if (!currentScope) {
|
|
1807
1888
|
return null;
|
|
1808
1889
|
}
|
|
1809
|
-
if ((0,
|
|
1890
|
+
if ((0, import_editor_props5.isTransformable)(currentScope)) {
|
|
1810
1891
|
return currentScope.value?.[key] ?? null;
|
|
1811
1892
|
}
|
|
1812
1893
|
if (typeof currentScope === "object") {
|
|
@@ -1816,7 +1897,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
1816
1897
|
}, value);
|
|
1817
1898
|
}
|
|
1818
1899
|
function shouldUseOriginalValue(filterPropType, value) {
|
|
1819
|
-
return !!filterPropType && (0,
|
|
1900
|
+
return !!filterPropType && (0, import_editor_props5.isTransformable)(value) && filterPropType.key !== value.$$type;
|
|
1820
1901
|
}
|
|
1821
1902
|
var getFilterPropType = (propType, path) => {
|
|
1822
1903
|
if (!propType || propType.kind !== "union") {
|
|
@@ -1837,7 +1918,7 @@ var getFilterPropType = (propType, path) => {
|
|
|
1837
1918
|
};
|
|
1838
1919
|
|
|
1839
1920
|
// src/contexts/styles-inheritance-context.tsx
|
|
1840
|
-
var Context4 = (0,
|
|
1921
|
+
var Context4 = (0, import_react20.createContext)(null);
|
|
1841
1922
|
function StyleInheritanceProvider({ children }) {
|
|
1842
1923
|
const styleDefs = useAppliedStyles();
|
|
1843
1924
|
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
@@ -1845,7 +1926,7 @@ function StyleInheritanceProvider({ children }) {
|
|
|
1845
1926
|
return /* @__PURE__ */ React20.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
1846
1927
|
}
|
|
1847
1928
|
function useStylesInheritanceSnapshot() {
|
|
1848
|
-
const context = (0,
|
|
1929
|
+
const context = (0, import_react20.useContext)(Context4);
|
|
1849
1930
|
const { meta } = useStyle();
|
|
1850
1931
|
if (!context) {
|
|
1851
1932
|
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
@@ -1856,7 +1937,7 @@ function useStylesInheritanceSnapshot() {
|
|
|
1856
1937
|
return context.getSnapshot(meta) ?? null;
|
|
1857
1938
|
}
|
|
1858
1939
|
function useStylesInheritanceChain(path) {
|
|
1859
|
-
const context = (0,
|
|
1940
|
+
const context = (0, import_react20.useContext)(Context4);
|
|
1860
1941
|
if (!context) {
|
|
1861
1942
|
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
1862
1943
|
}
|
|
@@ -1874,7 +1955,7 @@ var useAppliedStyles = () => {
|
|
|
1874
1955
|
const baseStyles = useBaseStyles();
|
|
1875
1956
|
useStylesRerender();
|
|
1876
1957
|
const classesProp = (0, import_editor_elements4.useElementSetting)(element.id, currentClassesProp);
|
|
1877
|
-
const appliedStyles =
|
|
1958
|
+
const appliedStyles = import_editor_props6.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
1878
1959
|
return import_editor_styles_repository7.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
1879
1960
|
};
|
|
1880
1961
|
var useBaseStyles = () => {
|
|
@@ -1913,50 +1994,37 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1913
1994
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1914
1995
|
var React29 = __toESM(require("react"));
|
|
1915
1996
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1997
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1916
1998
|
|
|
1917
1999
|
// src/controls-registry/styles-field.tsx
|
|
1918
|
-
var
|
|
2000
|
+
var React27 = __toESM(require("react"));
|
|
1919
2001
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1920
2002
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
2003
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1921
2004
|
|
|
1922
2005
|
// src/hooks/use-styles-fields.ts
|
|
1923
|
-
var
|
|
2006
|
+
var import_react21 = require("react");
|
|
1924
2007
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1925
2008
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1926
2009
|
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
1927
|
-
var
|
|
1928
|
-
var
|
|
2010
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
2011
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
2012
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
1929
2013
|
function useStylesFields(propNames) {
|
|
1930
|
-
const {
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
const
|
|
1934
|
-
const
|
|
2014
|
+
const {
|
|
2015
|
+
element: { id: elementId }
|
|
2016
|
+
} = useElement();
|
|
2017
|
+
const { id: styleId, meta, provider, canEdit } = useStyle();
|
|
2018
|
+
const undoableUpdateStyle = useUndoableUpdateStyle({ elementId, meta });
|
|
2019
|
+
const undoableCreateElementStyle = useUndoableCreateElementStyle({ elementId, meta });
|
|
1935
2020
|
useStylesRerender();
|
|
1936
|
-
const values = getProps({
|
|
1937
|
-
|
|
1938
|
-
styleId
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
});
|
|
1943
|
-
const setValues = (props) => {
|
|
1944
|
-
if (id === null) {
|
|
1945
|
-
undoableCreateElementStyle({
|
|
1946
|
-
elementId: element.id,
|
|
1947
|
-
classesProp,
|
|
1948
|
-
meta,
|
|
1949
|
-
props
|
|
1950
|
-
});
|
|
1951
|
-
return;
|
|
2021
|
+
const values = getProps({ elementId, styleId, provider, meta, propNames });
|
|
2022
|
+
const setValues = (props, { history: { propDisplayName } }) => {
|
|
2023
|
+
if (styleId === null) {
|
|
2024
|
+
undoableCreateElementStyle({ props, propDisplayName });
|
|
2025
|
+
} else {
|
|
2026
|
+
undoableUpdateStyle({ provider, styleId, props, propDisplayName });
|
|
1952
2027
|
}
|
|
1953
|
-
undoableUpdateStyle({
|
|
1954
|
-
elementId: element.id,
|
|
1955
|
-
styleId: id,
|
|
1956
|
-
provider,
|
|
1957
|
-
meta,
|
|
1958
|
-
props
|
|
1959
|
-
});
|
|
1960
2028
|
};
|
|
1961
2029
|
return { values, setValues, canEdit };
|
|
1962
2030
|
}
|
|
@@ -1973,39 +2041,52 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1973
2041
|
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
1974
2042
|
);
|
|
1975
2043
|
}
|
|
1976
|
-
function useUndoableCreateElementStyle(
|
|
1977
|
-
|
|
1978
|
-
|
|
2044
|
+
function useUndoableCreateElementStyle({
|
|
2045
|
+
elementId,
|
|
2046
|
+
meta
|
|
2047
|
+
}) {
|
|
2048
|
+
const classesProp = useClassesProp();
|
|
2049
|
+
return (0, import_react21.useMemo)(() => {
|
|
2050
|
+
const isVersion331Active = (0, import_editor_v1_adapters6.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_31);
|
|
2051
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository9.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
2052
|
+
return (0, import_editor_v1_adapters6.undoable)(
|
|
1979
2053
|
{
|
|
1980
|
-
do: (
|
|
1981
|
-
return (0, import_editor_elements6.createElementStyle)({
|
|
1982
|
-
...payload,
|
|
1983
|
-
label: import_editor_styles_repository8.ELEMENTS_STYLES_RESERVED_LABEL
|
|
1984
|
-
});
|
|
2054
|
+
do: ({ props }) => {
|
|
2055
|
+
return (0, import_editor_elements6.createElementStyle)({ ...createStyleArgs, props });
|
|
1985
2056
|
},
|
|
1986
|
-
undo: (
|
|
2057
|
+
undo: (_, styleId) => {
|
|
1987
2058
|
(0, import_editor_elements6.deleteElementStyle)(elementId, styleId);
|
|
1988
2059
|
},
|
|
1989
|
-
redo: (
|
|
1990
|
-
return (0, import_editor_elements6.createElementStyle)({
|
|
1991
|
-
...payload,
|
|
1992
|
-
styleId,
|
|
1993
|
-
label: import_editor_styles_repository8.ELEMENTS_STYLES_RESERVED_LABEL
|
|
1994
|
-
});
|
|
2060
|
+
redo: ({ props }, styleId) => {
|
|
2061
|
+
return (0, import_editor_elements6.createElementStyle)({ ...createStyleArgs, props, styleId });
|
|
1995
2062
|
}
|
|
1996
2063
|
},
|
|
1997
2064
|
{
|
|
1998
|
-
title: (
|
|
1999
|
-
|
|
2065
|
+
title: () => {
|
|
2066
|
+
if (isVersion331Active) {
|
|
2067
|
+
return localStyleHistoryTitlesV331.title({ elementId });
|
|
2068
|
+
}
|
|
2069
|
+
return historyTitlesV330.title({ elementId });
|
|
2070
|
+
},
|
|
2071
|
+
subtitle: ({ propDisplayName }) => {
|
|
2072
|
+
if (isVersion331Active) {
|
|
2073
|
+
return localStyleHistoryTitlesV331.subtitle({ propDisplayName });
|
|
2074
|
+
}
|
|
2075
|
+
return historyTitlesV330.subtitle;
|
|
2076
|
+
}
|
|
2000
2077
|
}
|
|
2001
2078
|
);
|
|
2002
|
-
}, []);
|
|
2079
|
+
}, [classesProp, elementId, meta]);
|
|
2003
2080
|
}
|
|
2004
|
-
function useUndoableUpdateStyle(
|
|
2005
|
-
|
|
2006
|
-
|
|
2081
|
+
function useUndoableUpdateStyle({
|
|
2082
|
+
elementId,
|
|
2083
|
+
meta
|
|
2084
|
+
}) {
|
|
2085
|
+
return (0, import_react21.useMemo)(() => {
|
|
2086
|
+
const isVersion331Active = (0, import_editor_v1_adapters6.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_31);
|
|
2087
|
+
return (0, import_editor_v1_adapters6.undoable)(
|
|
2007
2088
|
{
|
|
2008
|
-
do: ({
|
|
2089
|
+
do: ({ provider, styleId, props }) => {
|
|
2009
2090
|
if (!provider.actions.updateProps) {
|
|
2010
2091
|
throw new StylesProviderCannotUpdatePropsError({
|
|
2011
2092
|
context: { providerKey: provider.getKey() }
|
|
@@ -2013,26 +2094,37 @@ function useUndoableUpdateStyle() {
|
|
|
2013
2094
|
}
|
|
2014
2095
|
const style = provider.actions.get(styleId, { elementId });
|
|
2015
2096
|
const prevProps = getCurrentProps(style, meta);
|
|
2016
|
-
provider.actions.updateProps(
|
|
2017
|
-
{
|
|
2018
|
-
id: styleId,
|
|
2019
|
-
meta,
|
|
2020
|
-
props
|
|
2021
|
-
},
|
|
2022
|
-
{ elementId }
|
|
2023
|
-
);
|
|
2097
|
+
provider.actions.updateProps({ id: styleId, meta, props }, { elementId });
|
|
2024
2098
|
return prevProps;
|
|
2025
2099
|
},
|
|
2026
|
-
undo: ({
|
|
2100
|
+
undo: ({ provider, styleId }, prevProps) => {
|
|
2027
2101
|
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
2028
2102
|
}
|
|
2029
2103
|
},
|
|
2030
2104
|
{
|
|
2031
|
-
title: ({
|
|
2032
|
-
|
|
2105
|
+
title: ({ provider }) => {
|
|
2106
|
+
if (isVersion331Active) {
|
|
2107
|
+
const isLocal = (0, import_editor_styles_repository8.isElementsStylesProvider)(provider.getKey());
|
|
2108
|
+
if (isLocal) {
|
|
2109
|
+
return localStyleHistoryTitlesV331.title({ elementId });
|
|
2110
|
+
}
|
|
2111
|
+
return defaultHistoryTitlesV331.title({ provider });
|
|
2112
|
+
}
|
|
2113
|
+
return historyTitlesV330.title({ elementId });
|
|
2114
|
+
},
|
|
2115
|
+
subtitle: ({ provider, styleId, propDisplayName }) => {
|
|
2116
|
+
if (isVersion331Active) {
|
|
2117
|
+
const isLocal = (0, import_editor_styles_repository8.isElementsStylesProvider)(provider.getKey());
|
|
2118
|
+
if (isLocal) {
|
|
2119
|
+
return localStyleHistoryTitlesV331.subtitle({ propDisplayName });
|
|
2120
|
+
}
|
|
2121
|
+
return defaultHistoryTitlesV331.subtitle({ provider, styleId, elementId, propDisplayName });
|
|
2122
|
+
}
|
|
2123
|
+
return historyTitlesV330.subtitle;
|
|
2124
|
+
}
|
|
2033
2125
|
}
|
|
2034
2126
|
);
|
|
2035
|
-
}, []);
|
|
2127
|
+
}, [elementId, meta]);
|
|
2036
2128
|
}
|
|
2037
2129
|
function getCurrentProps(style, meta) {
|
|
2038
2130
|
if (!style) {
|
|
@@ -2042,30 +2134,55 @@ function getCurrentProps(style, meta) {
|
|
|
2042
2134
|
const props = variant?.props ?? {};
|
|
2043
2135
|
return structuredClone(props);
|
|
2044
2136
|
}
|
|
2137
|
+
var historyTitlesV330 = {
|
|
2138
|
+
title: ({ elementId }) => (0, import_editor_elements6.getElementLabel)(elementId),
|
|
2139
|
+
subtitle: (0, import_i18n7.__)("Style edited", "elementor")
|
|
2140
|
+
};
|
|
2141
|
+
var defaultHistoryTitlesV331 = {
|
|
2142
|
+
title: ({ provider }) => {
|
|
2143
|
+
const providerLabel = provider.labels?.singular;
|
|
2144
|
+
return providerLabel ? capitalize(providerLabel) : (0, import_i18n7.__)("Style", "elementor");
|
|
2145
|
+
},
|
|
2146
|
+
subtitle: ({ provider, styleId, elementId, propDisplayName }) => {
|
|
2147
|
+
const styleLabel = provider.actions.get(styleId, { elementId })?.label;
|
|
2148
|
+
if (!styleLabel) {
|
|
2149
|
+
throw new Error(`Style ${styleId} not found`);
|
|
2150
|
+
}
|
|
2151
|
+
return (0, import_i18n7.__)(`%s$1 %s$2 edited`, "elementor").replace("%s$1", styleLabel).replace("%s$2", propDisplayName);
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
var localStyleHistoryTitlesV331 = {
|
|
2155
|
+
title: ({ elementId }) => (0, import_editor_elements6.getElementLabel)(elementId),
|
|
2156
|
+
subtitle: ({ propDisplayName }) => (
|
|
2157
|
+
// translators: %s is the name of the style property being edited
|
|
2158
|
+
(0, import_i18n7.__)(`%s edited`, "elementor").replace("%s", propDisplayName)
|
|
2159
|
+
)
|
|
2160
|
+
};
|
|
2161
|
+
function capitalize(str) {
|
|
2162
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
2163
|
+
}
|
|
2045
2164
|
|
|
2046
2165
|
// src/hooks/use-styles-field.ts
|
|
2047
|
-
function useStylesField(propName) {
|
|
2166
|
+
function useStylesField(propName, meta) {
|
|
2048
2167
|
const { values, setValues, canEdit } = useStylesFields([propName]);
|
|
2049
2168
|
const value = values?.[propName] ?? null;
|
|
2050
2169
|
const setValue = (newValue) => {
|
|
2051
|
-
setValues({
|
|
2052
|
-
[propName]: newValue
|
|
2053
|
-
});
|
|
2170
|
+
setValues({ [propName]: newValue }, meta);
|
|
2054
2171
|
};
|
|
2055
2172
|
return { value, setValue, canEdit };
|
|
2056
2173
|
}
|
|
2057
2174
|
|
|
2058
2175
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2059
|
-
var
|
|
2176
|
+
var React26 = __toESM(require("react"));
|
|
2060
2177
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2061
|
-
var
|
|
2062
|
-
var
|
|
2063
|
-
var
|
|
2064
|
-
var
|
|
2065
|
-
var
|
|
2178
|
+
var import_editor_props7 = require("@elementor/editor-props");
|
|
2179
|
+
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
2180
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
2181
|
+
var import_ui23 = require("@elementor/ui");
|
|
2182
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
2066
2183
|
|
|
2067
2184
|
// src/styles-inheritance/consts.ts
|
|
2068
|
-
var
|
|
2185
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
2069
2186
|
var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
2070
2187
|
"background-color-overlay",
|
|
2071
2188
|
"background-image-overlay",
|
|
@@ -2078,28 +2195,18 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
2078
2195
|
"image",
|
|
2079
2196
|
"background-overlay"
|
|
2080
2197
|
]);
|
|
2081
|
-
var isUsingIndicatorPopover = () => (0,
|
|
2198
|
+
var isUsingIndicatorPopover = () => (0, import_editor_v1_adapters7.isExperimentActive)("e_v_3_30");
|
|
2082
2199
|
|
|
2083
2200
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2084
|
-
var
|
|
2085
|
-
var
|
|
2201
|
+
var React25 = __toESM(require("react"));
|
|
2202
|
+
var import_react23 = require("react");
|
|
2086
2203
|
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
2087
|
-
var
|
|
2088
|
-
var
|
|
2089
|
-
|
|
2090
|
-
// src/components/section-content.tsx
|
|
2091
|
-
var import_react20 = require("react");
|
|
2092
|
-
var React21 = __toESM(require("react"));
|
|
2093
|
-
var import_ui17 = require("@elementor/ui");
|
|
2094
|
-
var SectionContentRefContext = (0, import_react20.createContext)(null);
|
|
2095
|
-
var useSectionContentRef = () => (0, import_react20.useContext)(SectionContentRefContext);
|
|
2096
|
-
var SectionContent = ({ gap = 2, sx, children }) => {
|
|
2097
|
-
const ref = (0, import_react20.useRef)(null);
|
|
2098
|
-
return /* @__PURE__ */ React21.createElement(SectionContentRefContext.Provider, { value: ref }, /* @__PURE__ */ React21.createElement(import_ui17.Stack, { gap, sx: { ...sx }, ref }, children));
|
|
2099
|
-
};
|
|
2204
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
2205
|
+
var import_ui22 = require("@elementor/ui");
|
|
2206
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
2100
2207
|
|
|
2101
2208
|
// src/hooks/use-direction.ts
|
|
2102
|
-
var
|
|
2209
|
+
var import_ui17 = require("@elementor/ui");
|
|
2103
2210
|
|
|
2104
2211
|
// src/sync/get-elementor-globals.ts
|
|
2105
2212
|
var getElementorConfig = () => {
|
|
@@ -2113,26 +2220,26 @@ var getElementorFrontendConfig = () => {
|
|
|
2113
2220
|
|
|
2114
2221
|
// src/hooks/use-direction.ts
|
|
2115
2222
|
function useDirection() {
|
|
2116
|
-
const theme = (0,
|
|
2223
|
+
const theme = (0, import_ui17.useTheme)();
|
|
2117
2224
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2118
2225
|
return { isSiteRtl, isUiRtl };
|
|
2119
2226
|
}
|
|
2120
2227
|
|
|
2121
2228
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2122
|
-
var
|
|
2123
|
-
var
|
|
2124
|
-
var
|
|
2229
|
+
var import_react22 = require("react");
|
|
2230
|
+
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
2231
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
2125
2232
|
var MAXIMUM_ITEMS = 2;
|
|
2126
2233
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
2127
|
-
const [items3, setItems] = (0,
|
|
2128
|
-
(0,
|
|
2234
|
+
const [items3, setItems] = (0, import_react22.useState)([]);
|
|
2235
|
+
(0, import_react22.useEffect)(() => {
|
|
2129
2236
|
(async () => {
|
|
2130
2237
|
const normalizedItems = await Promise.all(
|
|
2131
2238
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
2132
2239
|
);
|
|
2133
2240
|
const validItems = normalizedItems.map((item) => ({
|
|
2134
2241
|
...item,
|
|
2135
|
-
displayLabel:
|
|
2242
|
+
displayLabel: import_editor_styles_repository10.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n8.__)("Base", "elementor")
|
|
2136
2243
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2137
2244
|
setItems(validItems);
|
|
2138
2245
|
})();
|
|
@@ -2164,7 +2271,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
2164
2271
|
}
|
|
2165
2272
|
});
|
|
2166
2273
|
const value = result?.[bind] ?? result;
|
|
2167
|
-
if ((0,
|
|
2274
|
+
if ((0, import_react22.isValidElement)(value)) {
|
|
2168
2275
|
return value;
|
|
2169
2276
|
}
|
|
2170
2277
|
if (typeof value === "object") {
|
|
@@ -2181,10 +2288,10 @@ var import_editor_canvas = require("@elementor/editor-canvas");
|
|
|
2181
2288
|
var stylesInheritanceTransformersRegistry = (0, import_editor_canvas.createTransformersRegistry)();
|
|
2182
2289
|
|
|
2183
2290
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
2184
|
-
var
|
|
2291
|
+
var React21 = __toESM(require("react"));
|
|
2185
2292
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2186
2293
|
var import_icons4 = require("@elementor/icons");
|
|
2187
|
-
var
|
|
2294
|
+
var import_ui18 = require("@elementor/ui");
|
|
2188
2295
|
var SIZE3 = "tiny";
|
|
2189
2296
|
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
2190
2297
|
var breakpointIconMap = {
|
|
@@ -2204,21 +2311,21 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
2204
2311
|
return null;
|
|
2205
2312
|
}
|
|
2206
2313
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2207
|
-
return /* @__PURE__ */
|
|
2314
|
+
return /* @__PURE__ */ React21.createElement(import_ui18.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2208
2315
|
};
|
|
2209
2316
|
|
|
2210
2317
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2211
|
-
var
|
|
2212
|
-
var
|
|
2318
|
+
var React22 = __toESM(require("react"));
|
|
2319
|
+
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
2213
2320
|
var import_icons5 = require("@elementor/icons");
|
|
2214
|
-
var
|
|
2215
|
-
var
|
|
2321
|
+
var import_ui19 = require("@elementor/ui");
|
|
2322
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
2216
2323
|
var SIZE4 = "tiny";
|
|
2217
2324
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
2218
|
-
const isBaseStyle = provider ===
|
|
2219
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
2220
|
-
return /* @__PURE__ */
|
|
2221
|
-
|
|
2325
|
+
const isBaseStyle = provider === import_editor_styles_repository11.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2326
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React22.createElement(import_ui19.Tooltip, { title: (0, import_i18n9.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React22.createElement(import_icons5.InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2327
|
+
return /* @__PURE__ */ React22.createElement(
|
|
2328
|
+
import_ui19.Chip,
|
|
2222
2329
|
{
|
|
2223
2330
|
label: displayLabel,
|
|
2224
2331
|
size: SIZE4,
|
|
@@ -2243,11 +2350,11 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
2243
2350
|
};
|
|
2244
2351
|
|
|
2245
2352
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
2246
|
-
var
|
|
2247
|
-
var
|
|
2353
|
+
var React23 = __toESM(require("react"));
|
|
2354
|
+
var import_ui20 = require("@elementor/ui");
|
|
2248
2355
|
var ValueComponent = ({ index, value }) => {
|
|
2249
|
-
return /* @__PURE__ */
|
|
2250
|
-
|
|
2356
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2357
|
+
import_ui20.Typography,
|
|
2251
2358
|
{
|
|
2252
2359
|
variant: "caption",
|
|
2253
2360
|
color: "text.tertiary",
|
|
@@ -2264,38 +2371,37 @@ var ValueComponent = ({ index, value }) => {
|
|
|
2264
2371
|
};
|
|
2265
2372
|
|
|
2266
2373
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
2267
|
-
var
|
|
2268
|
-
var
|
|
2269
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
2374
|
+
var React24 = __toESM(require("react"));
|
|
2375
|
+
var import_ui21 = require("@elementor/ui");
|
|
2376
|
+
var ActionIcons = () => /* @__PURE__ */ React24.createElement(import_ui21.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2270
2377
|
|
|
2271
2378
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2272
|
-
var
|
|
2379
|
+
var SECTION_PADDING_INLINE = 32;
|
|
2273
2380
|
var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, children }) => {
|
|
2274
|
-
const [showInfotip, setShowInfotip] = (0,
|
|
2381
|
+
const [showInfotip, setShowInfotip] = (0, import_react23.useState)(false);
|
|
2275
2382
|
const toggleInfotip = () => setShowInfotip((prev) => !prev);
|
|
2276
2383
|
const closeInfotip = () => setShowInfotip(false);
|
|
2277
2384
|
const key = path.join(".");
|
|
2278
|
-
const
|
|
2279
|
-
const
|
|
2280
|
-
const resolve = (0, import_react22.useMemo)(() => {
|
|
2385
|
+
const sectionWidth = useSectionWidth() + SECTION_PADDING_INLINE;
|
|
2386
|
+
const resolve = (0, import_react23.useMemo)(() => {
|
|
2281
2387
|
return (0, import_editor_canvas2.createPropsResolver)({
|
|
2282
2388
|
transformers: stylesInheritanceTransformersRegistry,
|
|
2283
2389
|
schema: { [key]: propType }
|
|
2284
2390
|
});
|
|
2285
2391
|
}, [key, propType]);
|
|
2286
2392
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
2287
|
-
const infotipContent = /* @__PURE__ */
|
|
2288
|
-
|
|
2393
|
+
const infotipContent = /* @__PURE__ */ React25.createElement(import_ui22.ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React25.createElement(
|
|
2394
|
+
import_ui22.Card,
|
|
2289
2395
|
{
|
|
2290
2396
|
elevation: 0,
|
|
2291
2397
|
sx: {
|
|
2292
|
-
width: `${
|
|
2293
|
-
maxWidth:
|
|
2398
|
+
width: `${sectionWidth - SECTION_PADDING_INLINE}px`,
|
|
2399
|
+
maxWidth: 496,
|
|
2294
2400
|
overflowX: "hidden"
|
|
2295
2401
|
}
|
|
2296
2402
|
},
|
|
2297
|
-
/* @__PURE__ */
|
|
2298
|
-
|
|
2403
|
+
/* @__PURE__ */ React25.createElement(
|
|
2404
|
+
import_ui22.CardContent,
|
|
2299
2405
|
{
|
|
2300
2406
|
sx: {
|
|
2301
2407
|
display: "flex",
|
|
@@ -2307,42 +2413,35 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2307
2413
|
}
|
|
2308
2414
|
}
|
|
2309
2415
|
},
|
|
2310
|
-
/* @__PURE__ */
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
slotProps: { icon: { fontSize: SIZE5 } },
|
|
2314
|
-
sx: { ml: "auto" },
|
|
2315
|
-
onClick: closeInfotip
|
|
2316
|
-
}
|
|
2317
|
-
)),
|
|
2318
|
-
/* @__PURE__ */ React26.createElement(
|
|
2319
|
-
import_ui23.Stack,
|
|
2416
|
+
/* @__PURE__ */ React25.createElement(import_editor_ui4.PopoverHeader, { title: (0, import_i18n10.__)("Style origin", "elementor"), onClose: closeInfotip }),
|
|
2417
|
+
/* @__PURE__ */ React25.createElement(
|
|
2418
|
+
import_ui22.Stack,
|
|
2320
2419
|
{
|
|
2321
2420
|
gap: 1.5,
|
|
2322
2421
|
sx: { pl: 2, pr: 1, pb: 2, overflowX: "hidden", overflowY: "auto" },
|
|
2323
2422
|
role: "list"
|
|
2324
2423
|
},
|
|
2325
2424
|
items3.map((item, index) => {
|
|
2326
|
-
return /* @__PURE__ */
|
|
2327
|
-
|
|
2425
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2426
|
+
import_ui22.Box,
|
|
2328
2427
|
{
|
|
2329
2428
|
key: item.id,
|
|
2330
2429
|
display: "flex",
|
|
2331
2430
|
gap: 0.5,
|
|
2332
2431
|
role: "listitem",
|
|
2333
|
-
"aria-label": (0,
|
|
2432
|
+
"aria-label": (0, import_i18n10.__)("Inheritance item: %s", "elementor").replace(
|
|
2334
2433
|
"%s",
|
|
2335
2434
|
item.displayLabel
|
|
2336
2435
|
)
|
|
2337
2436
|
},
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ React25.createElement(import_ui22.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React25.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React25.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React25.createElement(ValueComponent, { index, value: item.value })),
|
|
2438
|
+
/* @__PURE__ */ React25.createElement(ActionIcons, null)
|
|
2340
2439
|
);
|
|
2341
2440
|
})
|
|
2342
2441
|
)
|
|
2343
2442
|
)
|
|
2344
2443
|
));
|
|
2345
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ React25.createElement(TooltipOrInfotip, { showInfotip, onClose: closeInfotip, infotipContent }, /* @__PURE__ */ React25.createElement(import_ui22.IconButton, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" } }, children));
|
|
2346
2445
|
};
|
|
2347
2446
|
function TooltipOrInfotip({
|
|
2348
2447
|
children,
|
|
@@ -2353,8 +2452,8 @@ function TooltipOrInfotip({
|
|
|
2353
2452
|
const { isSiteRtl } = useDirection();
|
|
2354
2453
|
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2355
2454
|
if (showInfotip) {
|
|
2356
|
-
return /* @__PURE__ */
|
|
2357
|
-
|
|
2455
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
2456
|
+
import_ui22.Backdrop,
|
|
2358
2457
|
{
|
|
2359
2458
|
open: showInfotip,
|
|
2360
2459
|
onClick: onClose,
|
|
@@ -2363,8 +2462,8 @@ function TooltipOrInfotip({
|
|
|
2363
2462
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
2364
2463
|
}
|
|
2365
2464
|
}
|
|
2366
|
-
), /* @__PURE__ */
|
|
2367
|
-
|
|
2465
|
+
), /* @__PURE__ */ React25.createElement(
|
|
2466
|
+
import_ui22.Infotip,
|
|
2368
2467
|
{
|
|
2369
2468
|
placement: "top",
|
|
2370
2469
|
content: infotipContent,
|
|
@@ -2390,26 +2489,26 @@ function TooltipOrInfotip({
|
|
|
2390
2489
|
children
|
|
2391
2490
|
));
|
|
2392
2491
|
}
|
|
2393
|
-
return /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ React25.createElement(import_ui22.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, children);
|
|
2394
2493
|
}
|
|
2395
2494
|
|
|
2396
2495
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2397
2496
|
var StylesInheritanceIndicator = () => {
|
|
2398
2497
|
const { path, propType } = (0, import_editor_controls5.useBoundProp)();
|
|
2399
|
-
const isUsingNestedProps = (0,
|
|
2498
|
+
const isUsingNestedProps = (0, import_editor_v1_adapters8.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2400
2499
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
2401
2500
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
2402
2501
|
if (!inheritanceChain.length) {
|
|
2403
2502
|
return null;
|
|
2404
2503
|
}
|
|
2405
|
-
return /* @__PURE__ */
|
|
2504
|
+
return /* @__PURE__ */ React26.createElement(Indicator, { inheritanceChain, path: finalPath, propType });
|
|
2406
2505
|
};
|
|
2407
2506
|
var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
2408
2507
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2409
2508
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2410
|
-
const hasValue = !(0,
|
|
2509
|
+
const hasValue = !(0, import_editor_props7.isEmpty)(currentItem?.value);
|
|
2411
2510
|
const [actualStyle] = inheritanceChain;
|
|
2412
|
-
if (actualStyle.provider ===
|
|
2511
|
+
if (!(0, import_editor_v1_adapters8.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_31) && actualStyle.provider === import_editor_styles_repository12.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2413
2512
|
return null;
|
|
2414
2513
|
}
|
|
2415
2514
|
const isFinalValue = currentItem === actualStyle;
|
|
@@ -2419,9 +2518,9 @@ var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
|
2419
2518
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
2420
2519
|
};
|
|
2421
2520
|
if (!isUsingIndicatorPopover()) {
|
|
2422
|
-
return /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ React26.createElement(import_ui23.Tooltip, { title: (0, import_i18n11.__)("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React26.createElement(StyleIndicator, { ...styleIndicatorProps, "aria-label": label }));
|
|
2423
2522
|
}
|
|
2424
|
-
return /* @__PURE__ */
|
|
2523
|
+
return /* @__PURE__ */ React26.createElement(
|
|
2425
2524
|
StylesInheritanceInfotip,
|
|
2426
2525
|
{
|
|
2427
2526
|
inheritanceChain,
|
|
@@ -2429,30 +2528,37 @@ var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
|
2429
2528
|
propType,
|
|
2430
2529
|
label
|
|
2431
2530
|
},
|
|
2432
|
-
/* @__PURE__ */
|
|
2531
|
+
/* @__PURE__ */ React26.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2433
2532
|
);
|
|
2434
2533
|
};
|
|
2435
2534
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
2436
2535
|
if (isFinalValue) {
|
|
2437
|
-
return (0,
|
|
2536
|
+
return (0, import_i18n11.__)("This is the final value", "elementor");
|
|
2438
2537
|
}
|
|
2439
2538
|
if (hasValue) {
|
|
2440
|
-
return (0,
|
|
2539
|
+
return (0, import_i18n11.__)("This value is overridden by another style", "elementor");
|
|
2441
2540
|
}
|
|
2442
|
-
return (0,
|
|
2541
|
+
return (0, import_i18n11.__)("This has value from another style", "elementor");
|
|
2443
2542
|
};
|
|
2444
2543
|
|
|
2445
2544
|
// src/controls-registry/styles-field.tsx
|
|
2446
|
-
var StylesField = ({ bind, placeholder, children }) => {
|
|
2447
|
-
const { value, setValue, canEdit } = useStylesField(bind
|
|
2545
|
+
var StylesField = ({ bind, placeholder, propDisplayName, children }) => {
|
|
2546
|
+
const { value, setValue, canEdit } = useStylesField(bind, {
|
|
2547
|
+
history: { propDisplayName }
|
|
2548
|
+
});
|
|
2549
|
+
const isVersion331Active = (0, import_editor_v1_adapters9.isExperimentActive)("e_v_3_31");
|
|
2550
|
+
const stylesInheritanceChain = useStylesInheritanceChain([bind]);
|
|
2448
2551
|
const stylesSchema = (0, import_editor_styles3.getStylesSchema)();
|
|
2449
2552
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2450
2553
|
const values = { [bind]: value };
|
|
2451
|
-
const
|
|
2554
|
+
const [actualValue] = stylesInheritanceChain;
|
|
2555
|
+
const placeholderValues = {
|
|
2556
|
+
[bind]: isVersion331Active ? actualValue?.value : placeholder
|
|
2557
|
+
};
|
|
2452
2558
|
const setValues = (newValue) => {
|
|
2453
2559
|
setValue(newValue[bind]);
|
|
2454
2560
|
};
|
|
2455
|
-
return /* @__PURE__ */
|
|
2561
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2456
2562
|
import_editor_controls6.ControlAdornmentsProvider,
|
|
2457
2563
|
{
|
|
2458
2564
|
items: [
|
|
@@ -2462,27 +2568,33 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2462
2568
|
}
|
|
2463
2569
|
]
|
|
2464
2570
|
},
|
|
2465
|
-
/* @__PURE__ */
|
|
2571
|
+
/* @__PURE__ */ React27.createElement(
|
|
2466
2572
|
import_editor_controls6.PropProvider,
|
|
2467
2573
|
{
|
|
2468
2574
|
propType,
|
|
2469
2575
|
value: values,
|
|
2470
2576
|
setValue: setValues,
|
|
2471
2577
|
placeholder: placeholderValues,
|
|
2472
|
-
|
|
2578
|
+
isDisabled: () => !canEdit
|
|
2473
2579
|
},
|
|
2474
|
-
/* @__PURE__ */
|
|
2580
|
+
/* @__PURE__ */ React27.createElement(import_editor_controls6.PropKeyProvider, { bind }, children)
|
|
2475
2581
|
)
|
|
2476
2582
|
);
|
|
2477
2583
|
};
|
|
2478
2584
|
|
|
2585
|
+
// src/components/section-content.tsx
|
|
2586
|
+
var React28 = __toESM(require("react"));
|
|
2587
|
+
var import_ui24 = require("@elementor/ui");
|
|
2588
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React28.createElement(import_ui24.Stack, { gap, sx: { ...sx } }, children);
|
|
2589
|
+
|
|
2479
2590
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2591
|
+
var BACKGROUND_LABEL = (0, import_i18n12.__)("Background", "elementor");
|
|
2480
2592
|
var BackgroundSection = () => {
|
|
2481
|
-
return /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React29.createElement(import_editor_controls7.BackgroundControl, null)));
|
|
2593
|
+
return /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React29.createElement(import_editor_controls7.BackgroundControl, null)));
|
|
2482
2594
|
};
|
|
2483
2595
|
|
|
2484
2596
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2485
|
-
var
|
|
2597
|
+
var React40 = __toESM(require("react"));
|
|
2486
2598
|
|
|
2487
2599
|
// src/components/panel-divider.tsx
|
|
2488
2600
|
var React30 = __toESM(require("react"));
|
|
@@ -2490,15 +2602,15 @@ var import_ui25 = require("@elementor/ui");
|
|
|
2490
2602
|
var PanelDivider = () => /* @__PURE__ */ React30.createElement(import_ui25.Divider, { sx: { my: 0.5 } });
|
|
2491
2603
|
|
|
2492
2604
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2493
|
-
var
|
|
2605
|
+
var React37 = __toESM(require("react"));
|
|
2494
2606
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
2495
|
-
var
|
|
2607
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
2496
2608
|
|
|
2497
2609
|
// src/components/add-or-remove-content.tsx
|
|
2498
2610
|
var React31 = __toESM(require("react"));
|
|
2499
2611
|
var import_icons6 = require("@elementor/icons");
|
|
2500
2612
|
var import_ui26 = require("@elementor/ui");
|
|
2501
|
-
var
|
|
2613
|
+
var SIZE5 = "tiny";
|
|
2502
2614
|
var AddOrRemoveContent = ({
|
|
2503
2615
|
isAdded,
|
|
2504
2616
|
onAdd,
|
|
@@ -2518,15 +2630,18 @@ var AddOrRemoveContent = ({
|
|
|
2518
2630
|
}
|
|
2519
2631
|
},
|
|
2520
2632
|
renderLabel(),
|
|
2521
|
-
isAdded ? /* @__PURE__ */ React31.createElement(import_ui26.IconButton, { size:
|
|
2633
|
+
isAdded ? /* @__PURE__ */ React31.createElement(import_ui26.IconButton, { size: SIZE5, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React31.createElement(import_icons6.MinusIcon, { fontSize: SIZE5 })) : /* @__PURE__ */ React31.createElement(import_ui26.IconButton, { size: SIZE5, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React31.createElement(import_icons6.PlusIcon, { fontSize: SIZE5 }))
|
|
2522
2634
|
), /* @__PURE__ */ React31.createElement(import_ui26.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React31.createElement(SectionContent, null, children)));
|
|
2523
2635
|
};
|
|
2524
2636
|
|
|
2525
2637
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2526
|
-
var
|
|
2638
|
+
var React34 = __toESM(require("react"));
|
|
2527
2639
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
2640
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
2641
|
+
|
|
2642
|
+
// src/components/styles-field-layout.tsx
|
|
2643
|
+
var React33 = __toESM(require("react"));
|
|
2528
2644
|
var import_ui28 = require("@elementor/ui");
|
|
2529
|
-
var import_i18n11 = require("@wordpress/i18n");
|
|
2530
2645
|
|
|
2531
2646
|
// src/components/control-label.tsx
|
|
2532
2647
|
var React32 = __toESM(require("react"));
|
|
@@ -2536,77 +2651,103 @@ var ControlLabel = ({ children }) => {
|
|
|
2536
2651
|
return /* @__PURE__ */ React32.createElement(import_ui27.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React32.createElement(import_editor_controls8.ControlFormLabel, null, children), /* @__PURE__ */ React32.createElement(import_editor_controls8.ControlAdornments, null));
|
|
2537
2652
|
};
|
|
2538
2653
|
|
|
2654
|
+
// src/components/styles-field-layout.tsx
|
|
2655
|
+
var StylesFieldLayout = React33.forwardRef((props, ref) => {
|
|
2656
|
+
const { direction = "row", children, label } = props;
|
|
2657
|
+
const LayoutComponent = direction === "row" ? Row : Column;
|
|
2658
|
+
return /* @__PURE__ */ React33.createElement(LayoutComponent, { label, ref, children });
|
|
2659
|
+
});
|
|
2660
|
+
var Row = React33.forwardRef(
|
|
2661
|
+
({ label, children }, ref) => {
|
|
2662
|
+
return /* @__PURE__ */ React33.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React33.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label)), /* @__PURE__ */ React33.createElement(
|
|
2663
|
+
import_ui28.Grid,
|
|
2664
|
+
{
|
|
2665
|
+
item: true,
|
|
2666
|
+
xs: 6,
|
|
2667
|
+
sx: (theme) => ({
|
|
2668
|
+
width: `calc(50% - ${theme.spacing(2)})`
|
|
2669
|
+
})
|
|
2670
|
+
},
|
|
2671
|
+
children
|
|
2672
|
+
));
|
|
2673
|
+
}
|
|
2674
|
+
);
|
|
2675
|
+
var Column = React33.forwardRef(
|
|
2676
|
+
({ label, children }, ref) => {
|
|
2677
|
+
return /* @__PURE__ */ React33.createElement(import_ui28.Stack, { gap: 0.75, ref }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label), children);
|
|
2678
|
+
}
|
|
2679
|
+
);
|
|
2680
|
+
|
|
2539
2681
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2540
|
-
var
|
|
2541
|
-
|
|
2542
|
-
};
|
|
2682
|
+
var BORDER_COLOR_LABEL = (0, import_i18n13.__)("Border color", "elementor");
|
|
2683
|
+
var BorderColorField = () => /* @__PURE__ */ React34.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React34.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React34.createElement(import_editor_controls9.ColorControl, null)));
|
|
2543
2684
|
|
|
2544
2685
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2545
|
-
var
|
|
2686
|
+
var React35 = __toESM(require("react"));
|
|
2546
2687
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
2547
|
-
var
|
|
2548
|
-
var
|
|
2688
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
2689
|
+
var BORDER_TYPE_LABEL = (0, import_i18n14.__)("Border type", "elementor");
|
|
2549
2690
|
var borderStyles = [
|
|
2550
|
-
{ value: "none", label: (0,
|
|
2551
|
-
{ value: "solid", label: (0,
|
|
2552
|
-
{ value: "dashed", label: (0,
|
|
2553
|
-
{ value: "dotted", label: (0,
|
|
2554
|
-
{ value: "double", label: (0,
|
|
2555
|
-
{ value: "groove", label: (0,
|
|
2556
|
-
{ value: "ridge", label: (0,
|
|
2557
|
-
{ value: "inset", label: (0,
|
|
2558
|
-
{ value: "outset", label: (0,
|
|
2691
|
+
{ value: "none", label: (0, import_i18n14.__)("None", "elementor") },
|
|
2692
|
+
{ value: "solid", label: (0, import_i18n14.__)("Solid", "elementor") },
|
|
2693
|
+
{ value: "dashed", label: (0, import_i18n14.__)("Dashed", "elementor") },
|
|
2694
|
+
{ value: "dotted", label: (0, import_i18n14.__)("Dotted", "elementor") },
|
|
2695
|
+
{ value: "double", label: (0, import_i18n14.__)("Double", "elementor") },
|
|
2696
|
+
{ value: "groove", label: (0, import_i18n14.__)("Groove", "elementor") },
|
|
2697
|
+
{ value: "ridge", label: (0, import_i18n14.__)("Ridge", "elementor") },
|
|
2698
|
+
{ value: "inset", label: (0, import_i18n14.__)("Inset", "elementor") },
|
|
2699
|
+
{ value: "outset", label: (0, import_i18n14.__)("Outset", "elementor") }
|
|
2559
2700
|
];
|
|
2560
|
-
var BorderStyleField = () => {
|
|
2561
|
-
return /* @__PURE__ */ React34.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React34.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0, import_i18n12.__)("Border type", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React34.createElement(import_editor_controls10.SelectControl, { options: borderStyles }))));
|
|
2562
|
-
};
|
|
2701
|
+
var BorderStyleField = () => /* @__PURE__ */ React35.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React35.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React35.createElement(import_editor_controls10.SelectControl, { options: borderStyles })));
|
|
2563
2702
|
|
|
2564
2703
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2565
|
-
var
|
|
2704
|
+
var React36 = __toESM(require("react"));
|
|
2566
2705
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
2567
|
-
var
|
|
2706
|
+
var import_editor_props8 = require("@elementor/editor-props");
|
|
2568
2707
|
var import_icons7 = require("@elementor/icons");
|
|
2569
|
-
var
|
|
2570
|
-
var
|
|
2571
|
-
var
|
|
2572
|
-
var
|
|
2708
|
+
var import_ui29 = require("@elementor/ui");
|
|
2709
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
2710
|
+
var BORDER_WIDTH_LABEL = (0, import_i18n15.__)("Border width", "elementor");
|
|
2711
|
+
var InlineStartIcon = (0, import_ui29.withDirection)(import_icons7.SideRightIcon);
|
|
2712
|
+
var InlineEndIcon = (0, import_ui29.withDirection)(import_icons7.SideLeftIcon);
|
|
2573
2713
|
var getEdges = (isSiteRtl) => [
|
|
2574
2714
|
{
|
|
2575
|
-
label: (0,
|
|
2576
|
-
icon: /* @__PURE__ */
|
|
2715
|
+
label: (0, import_i18n15.__)("Top", "elementor"),
|
|
2716
|
+
icon: /* @__PURE__ */ React36.createElement(import_icons7.SideTopIcon, { fontSize: "tiny" }),
|
|
2577
2717
|
bind: "block-start"
|
|
2578
2718
|
},
|
|
2579
2719
|
{
|
|
2580
|
-
label: isSiteRtl ? (0,
|
|
2581
|
-
icon: /* @__PURE__ */
|
|
2720
|
+
label: isSiteRtl ? (0, import_i18n15.__)("Left", "elementor") : (0, import_i18n15.__)("Right", "elementor"),
|
|
2721
|
+
icon: /* @__PURE__ */ React36.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
2582
2722
|
bind: "inline-end"
|
|
2583
2723
|
},
|
|
2584
2724
|
{
|
|
2585
|
-
label: (0,
|
|
2586
|
-
icon: /* @__PURE__ */
|
|
2725
|
+
label: (0, import_i18n15.__)("Bottom", "elementor"),
|
|
2726
|
+
icon: /* @__PURE__ */ React36.createElement(import_icons7.SideBottomIcon, { fontSize: "tiny" }),
|
|
2587
2727
|
bind: "block-end"
|
|
2588
2728
|
},
|
|
2589
2729
|
{
|
|
2590
|
-
label: isSiteRtl ? (0,
|
|
2591
|
-
icon: /* @__PURE__ */
|
|
2730
|
+
label: isSiteRtl ? (0, import_i18n15.__)("Right", "elementor") : (0, import_i18n15.__)("Left", "elementor"),
|
|
2731
|
+
icon: /* @__PURE__ */ React36.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
2592
2732
|
bind: "inline-start"
|
|
2593
2733
|
}
|
|
2594
2734
|
];
|
|
2595
2735
|
var BorderWidthField = () => {
|
|
2596
2736
|
const { isSiteRtl } = useDirection();
|
|
2597
|
-
return /* @__PURE__ */
|
|
2737
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "border-width", propDisplayName: BORDER_WIDTH_LABEL }, /* @__PURE__ */ React36.createElement(
|
|
2598
2738
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
2599
2739
|
{
|
|
2600
2740
|
items: getEdges(isSiteRtl),
|
|
2601
|
-
label:
|
|
2602
|
-
icon: /* @__PURE__ */
|
|
2603
|
-
tooltipLabel: (0,
|
|
2604
|
-
multiSizePropTypeUtil:
|
|
2741
|
+
label: BORDER_WIDTH_LABEL,
|
|
2742
|
+
icon: /* @__PURE__ */ React36.createElement(import_icons7.SideAllIcon, { fontSize: "tiny" }),
|
|
2743
|
+
tooltipLabel: (0, import_i18n15.__)("Adjust borders", "elementor"),
|
|
2744
|
+
multiSizePropTypeUtil: import_editor_props8.borderWidthPropTypeUtil
|
|
2605
2745
|
}
|
|
2606
2746
|
));
|
|
2607
2747
|
};
|
|
2608
2748
|
|
|
2609
2749
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2750
|
+
var BORDER_LABEL = (0, import_i18n16.__)("Border", "elementor");
|
|
2610
2751
|
var initialBorder = {
|
|
2611
2752
|
"border-width": { $$type: "size", value: { size: 1, unit: "px" } },
|
|
2612
2753
|
"border-color": { $$type: "color", value: "#000000" },
|
|
@@ -2614,131 +2755,142 @@ var initialBorder = {
|
|
|
2614
2755
|
};
|
|
2615
2756
|
var BorderField = () => {
|
|
2616
2757
|
const { values, setValues, canEdit } = useStylesFields(Object.keys(initialBorder));
|
|
2758
|
+
const meta = { history: { propDisplayName: BORDER_LABEL } };
|
|
2617
2759
|
const addBorder = () => {
|
|
2618
|
-
setValues(initialBorder);
|
|
2760
|
+
setValues(initialBorder, meta);
|
|
2619
2761
|
};
|
|
2620
2762
|
const removeBorder = () => {
|
|
2621
|
-
setValues(
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2763
|
+
setValues(
|
|
2764
|
+
{
|
|
2765
|
+
"border-width": null,
|
|
2766
|
+
"border-color": null,
|
|
2767
|
+
"border-style": null
|
|
2768
|
+
},
|
|
2769
|
+
meta
|
|
2770
|
+
);
|
|
2626
2771
|
};
|
|
2627
2772
|
const hasBorder = Object.values(values ?? {}).some(Boolean);
|
|
2628
|
-
return /* @__PURE__ */
|
|
2773
|
+
return /* @__PURE__ */ React37.createElement(
|
|
2629
2774
|
AddOrRemoveContent,
|
|
2630
2775
|
{
|
|
2631
2776
|
isAdded: hasBorder,
|
|
2632
2777
|
onAdd: addBorder,
|
|
2633
2778
|
onRemove: removeBorder,
|
|
2634
2779
|
disabled: !canEdit,
|
|
2635
|
-
renderLabel: () => /* @__PURE__ */
|
|
2780
|
+
renderLabel: () => /* @__PURE__ */ React37.createElement(import_editor_controls12.ControlFormLabel, null, BORDER_LABEL)
|
|
2636
2781
|
},
|
|
2637
|
-
/* @__PURE__ */
|
|
2638
|
-
/* @__PURE__ */
|
|
2639
|
-
/* @__PURE__ */
|
|
2782
|
+
/* @__PURE__ */ React37.createElement(BorderWidthField, null),
|
|
2783
|
+
/* @__PURE__ */ React37.createElement(BorderColorField, null),
|
|
2784
|
+
/* @__PURE__ */ React37.createElement(BorderStyleField, null)
|
|
2640
2785
|
);
|
|
2641
2786
|
};
|
|
2642
2787
|
|
|
2643
2788
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2644
|
-
var
|
|
2789
|
+
var React39 = __toESM(require("react"));
|
|
2645
2790
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
2646
|
-
var
|
|
2791
|
+
var import_editor_props9 = require("@elementor/editor-props");
|
|
2647
2792
|
var import_icons8 = require("@elementor/icons");
|
|
2648
|
-
var
|
|
2649
|
-
var
|
|
2793
|
+
var import_ui31 = require("@elementor/ui");
|
|
2794
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
2650
2795
|
|
|
2651
2796
|
// src/styles-inheritance/components/ui-providers.tsx
|
|
2652
|
-
var
|
|
2653
|
-
var
|
|
2797
|
+
var React38 = __toESM(require("react"));
|
|
2798
|
+
var import_ui30 = require("@elementor/ui");
|
|
2654
2799
|
var UiProviders = ({ children }) => {
|
|
2655
2800
|
const { isSiteRtl } = useDirection();
|
|
2656
|
-
return /* @__PURE__ */
|
|
2801
|
+
return /* @__PURE__ */ React38.createElement(import_ui30.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(import_ui30.ThemeProvider, null, children));
|
|
2657
2802
|
};
|
|
2658
2803
|
|
|
2659
2804
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2660
|
-
var
|
|
2661
|
-
var
|
|
2662
|
-
var
|
|
2663
|
-
var
|
|
2664
|
-
var
|
|
2665
|
-
var
|
|
2666
|
-
var
|
|
2667
|
-
var
|
|
2805
|
+
var BORDER_RADIUS_LABEL = (0, import_i18n17.__)("Border radius", "elementor");
|
|
2806
|
+
var StartStartIcon = (0, import_ui31.withDirection)(import_icons8.RadiusTopLeftIcon);
|
|
2807
|
+
var StartEndIcon = (0, import_ui31.withDirection)(import_icons8.RadiusTopRightIcon);
|
|
2808
|
+
var EndStartIcon = (0, import_ui31.withDirection)(import_icons8.RadiusBottomLeftIcon);
|
|
2809
|
+
var EndEndIcon = (0, import_ui31.withDirection)(import_icons8.RadiusBottomRightIcon);
|
|
2810
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n17.__)("Top right", "elementor") : (0, import_i18n17.__)("Top left", "elementor");
|
|
2811
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n17.__)("Top left", "elementor") : (0, import_i18n17.__)("Top right", "elementor");
|
|
2812
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n17.__)("Bottom right", "elementor") : (0, import_i18n17.__)("Bottom left", "elementor");
|
|
2813
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n17.__)("Bottom left", "elementor") : (0, import_i18n17.__)("Bottom right", "elementor");
|
|
2668
2814
|
var getCorners = (isSiteRtl) => [
|
|
2669
2815
|
{
|
|
2670
2816
|
label: getStartStartLabel(isSiteRtl),
|
|
2671
|
-
icon: /* @__PURE__ */
|
|
2817
|
+
icon: /* @__PURE__ */ React39.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2672
2818
|
bind: "start-start"
|
|
2673
2819
|
},
|
|
2674
2820
|
{
|
|
2675
2821
|
label: getStartEndLabel(isSiteRtl),
|
|
2676
|
-
icon: /* @__PURE__ */
|
|
2822
|
+
icon: /* @__PURE__ */ React39.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2677
2823
|
bind: "start-end"
|
|
2678
2824
|
},
|
|
2679
2825
|
{
|
|
2680
2826
|
label: getEndStartLabel(isSiteRtl),
|
|
2681
|
-
icon: /* @__PURE__ */
|
|
2827
|
+
icon: /* @__PURE__ */ React39.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2682
2828
|
bind: "end-start"
|
|
2683
2829
|
},
|
|
2684
2830
|
{
|
|
2685
2831
|
label: getEndEndLabel(isSiteRtl),
|
|
2686
|
-
icon: /* @__PURE__ */
|
|
2832
|
+
icon: /* @__PURE__ */ React39.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2687
2833
|
bind: "end-end"
|
|
2688
2834
|
}
|
|
2689
2835
|
];
|
|
2690
2836
|
var BorderRadiusField = () => {
|
|
2691
2837
|
const { isSiteRtl } = useDirection();
|
|
2692
|
-
return /* @__PURE__ */
|
|
2838
|
+
return /* @__PURE__ */ React39.createElement(UiProviders, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "border-radius", propDisplayName: BORDER_RADIUS_LABEL }, /* @__PURE__ */ React39.createElement(
|
|
2693
2839
|
import_editor_controls13.EqualUnequalSizesControl,
|
|
2694
2840
|
{
|
|
2695
2841
|
items: getCorners(isSiteRtl),
|
|
2696
|
-
label:
|
|
2697
|
-
icon: /* @__PURE__ */
|
|
2698
|
-
tooltipLabel: (0,
|
|
2699
|
-
multiSizePropTypeUtil:
|
|
2842
|
+
label: BORDER_RADIUS_LABEL,
|
|
2843
|
+
icon: /* @__PURE__ */ React39.createElement(import_icons8.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2844
|
+
tooltipLabel: (0, import_i18n17.__)("Adjust corners", "elementor"),
|
|
2845
|
+
multiSizePropTypeUtil: import_editor_props9.borderRadiusPropTypeUtil
|
|
2700
2846
|
}
|
|
2701
2847
|
)));
|
|
2702
2848
|
};
|
|
2703
2849
|
|
|
2704
2850
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2705
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2851
|
+
var BorderSection = () => /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(BorderRadiusField, null), /* @__PURE__ */ React40.createElement(PanelDivider, null), /* @__PURE__ */ React40.createElement(BorderField, null));
|
|
2706
2852
|
|
|
2707
2853
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2708
|
-
var
|
|
2854
|
+
var React42 = __toESM(require("react"));
|
|
2709
2855
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2856
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
2857
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
2710
2858
|
|
|
2711
2859
|
// src/components/style-sections/layout-section/opacity-control-field.tsx
|
|
2712
|
-
var
|
|
2713
|
-
var
|
|
2860
|
+
var React41 = __toESM(require("react"));
|
|
2861
|
+
var import_react24 = require("react");
|
|
2714
2862
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
2715
|
-
var
|
|
2716
|
-
var
|
|
2863
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
2864
|
+
var OPACITY_LABEL = (0, import_i18n18.__)("Opacity", "elementor");
|
|
2717
2865
|
var OpacityControlField = () => {
|
|
2718
|
-
const rowRef = (0,
|
|
2719
|
-
return /* @__PURE__ */
|
|
2866
|
+
const rowRef = (0, import_react24.useRef)(null);
|
|
2867
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React41.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React41.createElement(import_editor_controls14.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
2720
2868
|
};
|
|
2721
2869
|
|
|
2722
2870
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2871
|
+
var BOX_SHADOW_LABEL = (0, import_i18n19.__)("Box shadow", "elementor");
|
|
2872
|
+
var FILTER_LABEL = (0, import_i18n19.__)("Filter", "elementor");
|
|
2873
|
+
var TRANSFORM_LABEL = (0, import_i18n19.__)("Transform", "elementor");
|
|
2723
2874
|
var EffectsSection = () => {
|
|
2724
|
-
|
|
2875
|
+
const isVersion331Active = (0, import_editor_v1_adapters10.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_31);
|
|
2876
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, null, isVersion331Active && /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(OpacityControlField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null)), /* @__PURE__ */ React42.createElement(StylesField, { bind: "box-shadow", propDisplayName: BOX_SHADOW_LABEL }, /* @__PURE__ */ React42.createElement(import_editor_controls15.BoxShadowRepeaterControl, null)), isVersion331Active && /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "transform", propDisplayName: TRANSFORM_LABEL }, /* @__PURE__ */ React42.createElement(import_editor_controls15.TransformRepeaterControl, null)), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "filter", propDisplayName: FILTER_LABEL }, /* @__PURE__ */ React42.createElement(import_editor_controls15.FilterRepeaterControl, null))));
|
|
2725
2877
|
};
|
|
2726
2878
|
|
|
2727
2879
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2728
|
-
var
|
|
2880
|
+
var React54 = __toESM(require("react"));
|
|
2729
2881
|
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2730
2882
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2731
|
-
var
|
|
2883
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
2732
2884
|
|
|
2733
2885
|
// src/hooks/use-computed-style.ts
|
|
2734
|
-
var
|
|
2886
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
2735
2887
|
function useComputedStyle(elementId) {
|
|
2736
|
-
return (0,
|
|
2888
|
+
return (0, import_editor_v1_adapters11.__privateUseListenTo)(
|
|
2737
2889
|
[
|
|
2738
|
-
(0,
|
|
2739
|
-
(0,
|
|
2740
|
-
(0,
|
|
2741
|
-
(0,
|
|
2890
|
+
(0, import_editor_v1_adapters11.windowEvent)("elementor/device-mode/change"),
|
|
2891
|
+
(0, import_editor_v1_adapters11.commandEndEvent)("document/elements/reset-style"),
|
|
2892
|
+
(0, import_editor_v1_adapters11.commandEndEvent)("document/elements/settings"),
|
|
2893
|
+
(0, import_editor_v1_adapters11.commandEndEvent)("document/elements/paste-style")
|
|
2742
2894
|
],
|
|
2743
2895
|
() => {
|
|
2744
2896
|
if (!elementId) {
|
|
@@ -2756,16 +2908,18 @@ function useComputedStyle(elementId) {
|
|
|
2756
2908
|
}
|
|
2757
2909
|
|
|
2758
2910
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2759
|
-
var
|
|
2911
|
+
var React44 = __toESM(require("react"));
|
|
2760
2912
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2761
2913
|
var import_icons9 = require("@elementor/icons");
|
|
2762
|
-
var
|
|
2763
|
-
var
|
|
2914
|
+
var import_ui33 = require("@elementor/ui");
|
|
2915
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
2764
2916
|
|
|
2765
2917
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2766
|
-
var
|
|
2767
|
-
var
|
|
2768
|
-
var
|
|
2918
|
+
var React43 = __toESM(require("react"));
|
|
2919
|
+
var import_react25 = require("react");
|
|
2920
|
+
var import_ui32 = require("@elementor/ui");
|
|
2921
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
2922
|
+
var FLEX_DIRECTION_LABEL = (0, import_i18n20.__)("Flex direction", "elementor");
|
|
2769
2923
|
var CLOCKWISE_ANGLES = {
|
|
2770
2924
|
row: 0,
|
|
2771
2925
|
column: 90,
|
|
@@ -2785,13 +2939,15 @@ var RotatedIcon = ({
|
|
|
2785
2939
|
offset = 0,
|
|
2786
2940
|
disableRotationForReversed = false
|
|
2787
2941
|
}) => {
|
|
2788
|
-
const rotate = (0,
|
|
2942
|
+
const rotate = (0, import_react25.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2789
2943
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2790
|
-
return /* @__PURE__ */
|
|
2944
|
+
return /* @__PURE__ */ React43.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2791
2945
|
};
|
|
2792
2946
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2793
|
-
const { value: direction } = useStylesField("flex-direction"
|
|
2794
|
-
|
|
2947
|
+
const { value: direction } = useStylesField("flex-direction", {
|
|
2948
|
+
history: { propDisplayName: FLEX_DIRECTION_LABEL }
|
|
2949
|
+
});
|
|
2950
|
+
const isRtl = "rtl" === (0, import_ui32.useTheme)().direction;
|
|
2795
2951
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2796
2952
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
2797
2953
|
const currentDirection = direction?.value || "row";
|
|
@@ -2806,8 +2962,9 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
2806
2962
|
};
|
|
2807
2963
|
|
|
2808
2964
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2809
|
-
var
|
|
2810
|
-
var
|
|
2965
|
+
var ALIGN_CONTENT_LABEL = (0, import_i18n21.__)("Align content", "elementor");
|
|
2966
|
+
var StartIcon = (0, import_ui33.withDirection)(import_icons9.JustifyTopIcon);
|
|
2967
|
+
var EndIcon = (0, import_ui33.withDirection)(import_icons9.JustifyBottomIcon);
|
|
2811
2968
|
var iconProps = {
|
|
2812
2969
|
isClockwise: false,
|
|
2813
2970
|
offset: 0,
|
|
@@ -2816,53 +2973,52 @@ var iconProps = {
|
|
|
2816
2973
|
var options = [
|
|
2817
2974
|
{
|
|
2818
2975
|
value: "start",
|
|
2819
|
-
label: (0,
|
|
2820
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2976
|
+
label: (0, import_i18n21.__)("Start", "elementor"),
|
|
2977
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2821
2978
|
showTooltip: true
|
|
2822
2979
|
},
|
|
2823
2980
|
{
|
|
2824
2981
|
value: "center",
|
|
2825
|
-
label: (0,
|
|
2826
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2982
|
+
label: (0, import_i18n21.__)("Center", "elementor"),
|
|
2983
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons9.JustifyCenterIcon, size, ...iconProps }),
|
|
2827
2984
|
showTooltip: true
|
|
2828
2985
|
},
|
|
2829
2986
|
{
|
|
2830
2987
|
value: "end",
|
|
2831
|
-
label: (0,
|
|
2832
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2988
|
+
label: (0, import_i18n21.__)("End", "elementor"),
|
|
2989
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2833
2990
|
showTooltip: true
|
|
2834
2991
|
},
|
|
2835
2992
|
{
|
|
2836
2993
|
value: "space-between",
|
|
2837
|
-
label: (0,
|
|
2838
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2994
|
+
label: (0, import_i18n21.__)("Space between", "elementor"),
|
|
2995
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
2839
2996
|
showTooltip: true
|
|
2840
2997
|
},
|
|
2841
2998
|
{
|
|
2842
2999
|
value: "space-around",
|
|
2843
|
-
label: (0,
|
|
2844
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3000
|
+
label: (0, import_i18n21.__)("Space around", "elementor"),
|
|
3001
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
2845
3002
|
showTooltip: true
|
|
2846
3003
|
},
|
|
2847
3004
|
{
|
|
2848
3005
|
value: "space-evenly",
|
|
2849
|
-
label: (0,
|
|
2850
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3006
|
+
label: (0, import_i18n21.__)("Space evenly", "elementor"),
|
|
3007
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons9.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
2851
3008
|
showTooltip: true
|
|
2852
3009
|
}
|
|
2853
3010
|
];
|
|
2854
|
-
var AlignContentField = () => {
|
|
2855
|
-
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React43.createElement(import_ui35.Stack, { gap: 1 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n17.__)("Align content", "elementor")), /* @__PURE__ */ React43.createElement(import_editor_controls16.ToggleControl, { options, fullWidth: true }))));
|
|
2856
|
-
};
|
|
3011
|
+
var AlignContentField = () => /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-content", propDisplayName: ALIGN_CONTENT_LABEL }, /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesFieldLayout, { label: ALIGN_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React44.createElement(import_editor_controls16.ToggleControl, { options, fullWidth: true }))));
|
|
2857
3012
|
|
|
2858
3013
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2859
|
-
var
|
|
3014
|
+
var React45 = __toESM(require("react"));
|
|
2860
3015
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2861
3016
|
var import_icons10 = require("@elementor/icons");
|
|
2862
|
-
var
|
|
2863
|
-
var
|
|
2864
|
-
var
|
|
2865
|
-
var
|
|
3017
|
+
var import_ui34 = require("@elementor/ui");
|
|
3018
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
3019
|
+
var ALIGN_ITEMS_LABEL = (0, import_i18n22.__)("Align items", "elementor");
|
|
3020
|
+
var StartIcon2 = (0, import_ui34.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
3021
|
+
var EndIcon2 = (0, import_ui34.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
2866
3022
|
var iconProps2 = {
|
|
2867
3023
|
isClockwise: false,
|
|
2868
3024
|
offset: 90
|
|
@@ -2870,55 +3026,56 @@ var iconProps2 = {
|
|
|
2870
3026
|
var options2 = [
|
|
2871
3027
|
{
|
|
2872
3028
|
value: "start",
|
|
2873
|
-
label: (0,
|
|
2874
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3029
|
+
label: (0, import_i18n22.__)("Start", "elementor"),
|
|
3030
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2875
3031
|
showTooltip: true
|
|
2876
3032
|
},
|
|
2877
3033
|
{
|
|
2878
3034
|
value: "center",
|
|
2879
|
-
label: (0,
|
|
2880
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3035
|
+
label: (0, import_i18n22.__)("Center", "elementor"),
|
|
3036
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: import_icons10.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
2881
3037
|
showTooltip: true
|
|
2882
3038
|
},
|
|
2883
3039
|
{
|
|
2884
3040
|
value: "end",
|
|
2885
|
-
label: (0,
|
|
2886
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3041
|
+
label: (0, import_i18n22.__)("End", "elementor"),
|
|
3042
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2887
3043
|
showTooltip: true
|
|
2888
3044
|
},
|
|
2889
3045
|
{
|
|
2890
3046
|
value: "stretch",
|
|
2891
|
-
label: (0,
|
|
2892
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3047
|
+
label: (0, import_i18n22.__)("Stretch", "elementor"),
|
|
3048
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: import_icons10.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
2893
3049
|
showTooltip: true
|
|
2894
3050
|
}
|
|
2895
3051
|
];
|
|
2896
3052
|
var AlignItemsField = () => {
|
|
2897
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "align-items", propDisplayName: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { label: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React45.createElement(import_editor_controls17.ToggleControl, { options: options2 }))));
|
|
2898
3054
|
};
|
|
2899
3055
|
|
|
2900
3056
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2901
|
-
var
|
|
3057
|
+
var React46 = __toESM(require("react"));
|
|
2902
3058
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
2903
3059
|
var import_icons11 = require("@elementor/icons");
|
|
2904
|
-
var
|
|
2905
|
-
var
|
|
3060
|
+
var import_ui35 = require("@elementor/ui");
|
|
3061
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3062
|
+
var ALIGN_SELF_LABEL = (0, import_i18n23.__)("Align self", "elementor");
|
|
2906
3063
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2907
3064
|
row: 90,
|
|
2908
3065
|
"row-reverse": 90,
|
|
2909
3066
|
column: 0,
|
|
2910
3067
|
"column-reverse": 0
|
|
2911
3068
|
};
|
|
2912
|
-
var StartIcon3 = (0,
|
|
2913
|
-
var EndIcon3 = (0,
|
|
3069
|
+
var StartIcon3 = (0, import_ui35.withDirection)(import_icons11.LayoutAlignLeftIcon);
|
|
3070
|
+
var EndIcon3 = (0, import_ui35.withDirection)(import_icons11.LayoutAlignRightIcon);
|
|
2914
3071
|
var iconProps3 = {
|
|
2915
3072
|
isClockwise: false
|
|
2916
3073
|
};
|
|
2917
3074
|
var getOptions = (parentStyleDirection) => [
|
|
2918
3075
|
{
|
|
2919
3076
|
value: "start",
|
|
2920
|
-
label: (0,
|
|
2921
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3077
|
+
label: (0, import_i18n23.__)("Start", "elementor"),
|
|
3078
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
2922
3079
|
RotatedIcon,
|
|
2923
3080
|
{
|
|
2924
3081
|
icon: StartIcon3,
|
|
@@ -2931,8 +3088,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2931
3088
|
},
|
|
2932
3089
|
{
|
|
2933
3090
|
value: "center",
|
|
2934
|
-
label: (0,
|
|
2935
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3091
|
+
label: (0, import_i18n23.__)("Center", "elementor"),
|
|
3092
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
2936
3093
|
RotatedIcon,
|
|
2937
3094
|
{
|
|
2938
3095
|
icon: import_icons11.LayoutAlignCenterIcon,
|
|
@@ -2945,8 +3102,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2945
3102
|
},
|
|
2946
3103
|
{
|
|
2947
3104
|
value: "end",
|
|
2948
|
-
label: (0,
|
|
2949
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3105
|
+
label: (0, import_i18n23.__)("End", "elementor"),
|
|
3106
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
2950
3107
|
RotatedIcon,
|
|
2951
3108
|
{
|
|
2952
3109
|
icon: EndIcon3,
|
|
@@ -2959,8 +3116,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2959
3116
|
},
|
|
2960
3117
|
{
|
|
2961
3118
|
value: "stretch",
|
|
2962
|
-
label: (0,
|
|
2963
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3119
|
+
label: (0, import_i18n23.__)("Stretch", "elementor"),
|
|
3120
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
2964
3121
|
RotatedIcon,
|
|
2965
3122
|
{
|
|
2966
3123
|
icon: import_icons11.LayoutDistributeVerticalIcon,
|
|
@@ -2972,107 +3129,107 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2972
3129
|
showTooltip: true
|
|
2973
3130
|
}
|
|
2974
3131
|
];
|
|
2975
|
-
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2976
|
-
return /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n19.__)("Align self", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(import_editor_controls18.ToggleControl, { options: getOptions(parentStyleDirection) })))));
|
|
2977
|
-
};
|
|
3132
|
+
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React46.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React46.createElement(import_editor_controls18.ToggleControl, { options: getOptions(parentStyleDirection) }))));
|
|
2978
3133
|
|
|
2979
3134
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2980
|
-
var
|
|
3135
|
+
var React47 = __toESM(require("react"));
|
|
2981
3136
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2982
|
-
var
|
|
2983
|
-
var
|
|
2984
|
-
var
|
|
3137
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
3138
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3139
|
+
var DISPLAY_LABEL = (0, import_i18n24.__)("Display", "elementor");
|
|
2985
3140
|
var displayFieldItems = [
|
|
2986
3141
|
{
|
|
2987
3142
|
value: "block",
|
|
2988
|
-
renderContent: () => (0,
|
|
2989
|
-
label: (0,
|
|
3143
|
+
renderContent: () => (0, import_i18n24.__)("Block", "elementor"),
|
|
3144
|
+
label: (0, import_i18n24.__)("Block", "elementor"),
|
|
2990
3145
|
showTooltip: true
|
|
2991
3146
|
},
|
|
2992
3147
|
{
|
|
2993
3148
|
value: "flex",
|
|
2994
|
-
renderContent: () => (0,
|
|
2995
|
-
label: (0,
|
|
3149
|
+
renderContent: () => (0, import_i18n24.__)("Flex", "elementor"),
|
|
3150
|
+
label: (0, import_i18n24.__)("Flex", "elementor"),
|
|
2996
3151
|
showTooltip: true
|
|
2997
3152
|
},
|
|
2998
3153
|
{
|
|
2999
3154
|
value: "inline-block",
|
|
3000
|
-
renderContent: () => (0,
|
|
3001
|
-
label: (0,
|
|
3155
|
+
renderContent: () => (0, import_i18n24.__)("In-blk", "elementor"),
|
|
3156
|
+
label: (0, import_i18n24.__)("Inline-block", "elementor"),
|
|
3002
3157
|
showTooltip: true
|
|
3003
3158
|
}
|
|
3004
3159
|
];
|
|
3005
3160
|
var DisplayField = () => {
|
|
3006
|
-
const isDisplayNoneFeatureActive = (0,
|
|
3161
|
+
const isDisplayNoneFeatureActive = (0, import_editor_v1_adapters12.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3007
3162
|
const items3 = [...displayFieldItems];
|
|
3008
3163
|
if (isDisplayNoneFeatureActive) {
|
|
3009
3164
|
items3.push({
|
|
3010
3165
|
value: "none",
|
|
3011
|
-
renderContent: () => (0,
|
|
3012
|
-
label: (0,
|
|
3166
|
+
renderContent: () => (0, import_i18n24.__)("None", "elementor"),
|
|
3167
|
+
label: (0, import_i18n24.__)("None", "elementor"),
|
|
3013
3168
|
showTooltip: true
|
|
3014
3169
|
});
|
|
3015
3170
|
}
|
|
3016
3171
|
items3.push({
|
|
3017
3172
|
value: "inline-flex",
|
|
3018
|
-
renderContent: () => (0,
|
|
3019
|
-
label: (0,
|
|
3173
|
+
renderContent: () => (0, import_i18n24.__)("In-flx", "elementor"),
|
|
3174
|
+
label: (0, import_i18n24.__)("Inline-flex", "elementor"),
|
|
3020
3175
|
showTooltip: true
|
|
3021
3176
|
});
|
|
3022
3177
|
const placeholder = useDisplayPlaceholderValue();
|
|
3023
|
-
return /* @__PURE__ */
|
|
3178
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React47.createElement(import_editor_controls19.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
3024
3179
|
};
|
|
3025
3180
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3026
3181
|
|
|
3027
3182
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3028
|
-
var
|
|
3183
|
+
var React48 = __toESM(require("react"));
|
|
3029
3184
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3030
3185
|
var import_icons12 = require("@elementor/icons");
|
|
3031
|
-
var
|
|
3032
|
-
var
|
|
3186
|
+
var import_ui36 = require("@elementor/ui");
|
|
3187
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3188
|
+
var FLEX_DIRECTION_LABEL2 = (0, import_i18n25.__)("Direction", "elementor");
|
|
3033
3189
|
var options3 = [
|
|
3034
3190
|
{
|
|
3035
3191
|
value: "row",
|
|
3036
|
-
label: (0,
|
|
3192
|
+
label: (0, import_i18n25.__)("Row", "elementor"),
|
|
3037
3193
|
renderContent: ({ size }) => {
|
|
3038
|
-
const StartIcon5 = (0,
|
|
3039
|
-
return /* @__PURE__ */
|
|
3194
|
+
const StartIcon5 = (0, import_ui36.withDirection)(import_icons12.ArrowRightIcon);
|
|
3195
|
+
return /* @__PURE__ */ React48.createElement(StartIcon5, { fontSize: size });
|
|
3040
3196
|
},
|
|
3041
3197
|
showTooltip: true
|
|
3042
3198
|
},
|
|
3043
3199
|
{
|
|
3044
3200
|
value: "column",
|
|
3045
|
-
label: (0,
|
|
3046
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3201
|
+
label: (0, import_i18n25.__)("Column", "elementor"),
|
|
3202
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
3047
3203
|
showTooltip: true
|
|
3048
3204
|
},
|
|
3049
3205
|
{
|
|
3050
3206
|
value: "row-reverse",
|
|
3051
|
-
label: (0,
|
|
3207
|
+
label: (0, import_i18n25.__)("Reversed row", "elementor"),
|
|
3052
3208
|
renderContent: ({ size }) => {
|
|
3053
|
-
const EndIcon5 = (0,
|
|
3054
|
-
return /* @__PURE__ */
|
|
3209
|
+
const EndIcon5 = (0, import_ui36.withDirection)(import_icons12.ArrowLeftIcon);
|
|
3210
|
+
return /* @__PURE__ */ React48.createElement(EndIcon5, { fontSize: size });
|
|
3055
3211
|
},
|
|
3056
3212
|
showTooltip: true
|
|
3057
3213
|
},
|
|
3058
3214
|
{
|
|
3059
3215
|
value: "column-reverse",
|
|
3060
|
-
label: (0,
|
|
3061
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3216
|
+
label: (0, import_i18n25.__)("Reversed column", "elementor"),
|
|
3217
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
3062
3218
|
showTooltip: true
|
|
3063
3219
|
}
|
|
3064
3220
|
];
|
|
3065
3221
|
var FlexDirectionField = () => {
|
|
3066
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React48.createElement(import_editor_controls20.ToggleControl, { options: options3 }))));
|
|
3067
3223
|
};
|
|
3068
3224
|
|
|
3069
3225
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3070
|
-
var
|
|
3071
|
-
var
|
|
3226
|
+
var React49 = __toESM(require("react"));
|
|
3227
|
+
var import_react26 = require("react");
|
|
3072
3228
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3073
3229
|
var import_icons13 = require("@elementor/icons");
|
|
3074
|
-
var
|
|
3075
|
-
var
|
|
3230
|
+
var import_ui37 = require("@elementor/ui");
|
|
3231
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
3232
|
+
var ORDER_LABEL = (0, import_i18n26.__)("Order", "elementor");
|
|
3076
3233
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3077
3234
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3078
3235
|
var FIRST = "first";
|
|
@@ -3085,26 +3242,32 @@ var orderValueMap = {
|
|
|
3085
3242
|
var items = [
|
|
3086
3243
|
{
|
|
3087
3244
|
value: FIRST,
|
|
3088
|
-
label: (0,
|
|
3089
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3245
|
+
label: (0, import_i18n26.__)("First", "elementor"),
|
|
3246
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons13.ArrowUpSmallIcon, { fontSize: size }),
|
|
3090
3247
|
showTooltip: true
|
|
3091
3248
|
},
|
|
3092
3249
|
{
|
|
3093
3250
|
value: LAST,
|
|
3094
|
-
label: (0,
|
|
3095
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3251
|
+
label: (0, import_i18n26.__)("Last", "elementor"),
|
|
3252
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons13.ArrowDownSmallIcon, { fontSize: size }),
|
|
3096
3253
|
showTooltip: true
|
|
3097
3254
|
},
|
|
3098
3255
|
{
|
|
3099
3256
|
value: CUSTOM,
|
|
3100
|
-
label: (0,
|
|
3101
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3257
|
+
label: (0, import_i18n26.__)("Custom", "elementor"),
|
|
3258
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
3102
3259
|
showTooltip: true
|
|
3103
3260
|
}
|
|
3104
3261
|
];
|
|
3105
3262
|
var FlexOrderField = () => {
|
|
3106
|
-
const {
|
|
3107
|
-
|
|
3263
|
+
const {
|
|
3264
|
+
value: order,
|
|
3265
|
+
setValue: setOrder,
|
|
3266
|
+
canEdit
|
|
3267
|
+
} = useStylesField("order", {
|
|
3268
|
+
history: { propDisplayName: ORDER_LABEL }
|
|
3269
|
+
});
|
|
3270
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react26.useState)(getGroupControlValue(order?.value || null));
|
|
3108
3271
|
const handleToggleButtonChange = (group) => {
|
|
3109
3272
|
setGroupControlValue(group);
|
|
3110
3273
|
if (!group || group === CUSTOM) {
|
|
@@ -3113,7 +3276,7 @@ var FlexOrderField = () => {
|
|
|
3113
3276
|
}
|
|
3114
3277
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3115
3278
|
};
|
|
3116
|
-
return /* @__PURE__ */
|
|
3279
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React49.createElement(
|
|
3117
3280
|
import_editor_controls21.ControlToggleButtonGroup,
|
|
3118
3281
|
{
|
|
3119
3282
|
items,
|
|
@@ -3122,7 +3285,7 @@ var FlexOrderField = () => {
|
|
|
3122
3285
|
exclusive: true,
|
|
3123
3286
|
disabled: !canEdit
|
|
3124
3287
|
}
|
|
3125
|
-
))
|
|
3288
|
+
)), CUSTOM === groupControlValue && /* @__PURE__ */ React49.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n26.__)("Custom order", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(
|
|
3126
3289
|
import_editor_controls21.NumberControl,
|
|
3127
3290
|
{
|
|
3128
3291
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -3142,31 +3305,31 @@ var getGroupControlValue = (order) => {
|
|
|
3142
3305
|
};
|
|
3143
3306
|
|
|
3144
3307
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3145
|
-
var
|
|
3146
|
-
var
|
|
3308
|
+
var React50 = __toESM(require("react"));
|
|
3309
|
+
var import_react27 = require("react");
|
|
3147
3310
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3148
|
-
var
|
|
3311
|
+
var import_editor_props10 = require("@elementor/editor-props");
|
|
3149
3312
|
var import_icons14 = require("@elementor/icons");
|
|
3150
|
-
var
|
|
3151
|
-
var
|
|
3313
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
3314
|
+
var FLEX_SIZE_LABEL = (0, import_i18n27.__)("Flex Size", "elementor");
|
|
3152
3315
|
var DEFAULT = 1;
|
|
3153
3316
|
var items2 = [
|
|
3154
3317
|
{
|
|
3155
3318
|
value: "flex-grow",
|
|
3156
|
-
label: (0,
|
|
3157
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3319
|
+
label: (0, import_i18n27.__)("Grow", "elementor"),
|
|
3320
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons14.ExpandIcon, { fontSize: size }),
|
|
3158
3321
|
showTooltip: true
|
|
3159
3322
|
},
|
|
3160
3323
|
{
|
|
3161
3324
|
value: "flex-shrink",
|
|
3162
|
-
label: (0,
|
|
3163
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3325
|
+
label: (0, import_i18n27.__)("Shrink", "elementor"),
|
|
3326
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons14.ShrinkIcon, { fontSize: size }),
|
|
3164
3327
|
showTooltip: true
|
|
3165
3328
|
},
|
|
3166
3329
|
{
|
|
3167
3330
|
value: "custom",
|
|
3168
|
-
label: (0,
|
|
3169
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3331
|
+
label: (0, import_i18n27.__)("Custom", "elementor"),
|
|
3332
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons14.PencilIcon, { fontSize: size }),
|
|
3170
3333
|
showTooltip: true
|
|
3171
3334
|
}
|
|
3172
3335
|
];
|
|
@@ -3175,32 +3338,32 @@ var FlexSizeField = () => {
|
|
|
3175
3338
|
const grow = values?.["flex-grow"]?.value || null;
|
|
3176
3339
|
const shrink = values?.["flex-shrink"]?.value || null;
|
|
3177
3340
|
const basis = values?.["flex-basis"]?.value || null;
|
|
3178
|
-
const currentGroup = (0,
|
|
3341
|
+
const currentGroup = (0, import_react27.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react27.useState)(currentGroup);
|
|
3179
3342
|
const onChangeGroup = (group = null) => {
|
|
3180
3343
|
setActiveGroup(group);
|
|
3344
|
+
let props;
|
|
3181
3345
|
if (!group || group === "custom") {
|
|
3182
|
-
|
|
3346
|
+
props = {
|
|
3183
3347
|
"flex-basis": null,
|
|
3184
3348
|
"flex-grow": null,
|
|
3185
3349
|
"flex-shrink": null
|
|
3186
|
-
}
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
if (group === "flex-grow") {
|
|
3190
|
-
setValues({
|
|
3350
|
+
};
|
|
3351
|
+
} else if (group === "flex-grow") {
|
|
3352
|
+
props = {
|
|
3191
3353
|
"flex-basis": null,
|
|
3192
|
-
"flex-grow":
|
|
3354
|
+
"flex-grow": import_editor_props10.numberPropTypeUtil.create(DEFAULT),
|
|
3193
3355
|
"flex-shrink": null
|
|
3194
|
-
}
|
|
3195
|
-
|
|
3356
|
+
};
|
|
3357
|
+
} else {
|
|
3358
|
+
props = {
|
|
3359
|
+
"flex-basis": null,
|
|
3360
|
+
"flex-grow": null,
|
|
3361
|
+
"flex-shrink": import_editor_props10.numberPropTypeUtil.create(DEFAULT)
|
|
3362
|
+
};
|
|
3196
3363
|
}
|
|
3197
|
-
setValues({
|
|
3198
|
-
"flex-basis": null,
|
|
3199
|
-
"flex-grow": null,
|
|
3200
|
-
"flex-shrink": import_editor_props9.numberPropTypeUtil.create(DEFAULT)
|
|
3201
|
-
});
|
|
3364
|
+
setValues(props, { history: { propDisplayName: FLEX_SIZE_LABEL } });
|
|
3202
3365
|
};
|
|
3203
|
-
return /* @__PURE__ */
|
|
3366
|
+
return /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(SectionContent, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: activeGroup ?? "", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(
|
|
3204
3367
|
import_editor_controls22.ControlToggleButtonGroup,
|
|
3205
3368
|
{
|
|
3206
3369
|
value: activeGroup,
|
|
@@ -3209,11 +3372,11 @@ var FlexSizeField = () => {
|
|
|
3209
3372
|
items: items2,
|
|
3210
3373
|
exclusive: true
|
|
3211
3374
|
}
|
|
3212
|
-
)))
|
|
3375
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React50.createElement(FlexCustomField, null)));
|
|
3213
3376
|
};
|
|
3214
3377
|
var FlexCustomField = () => {
|
|
3215
|
-
const flexBasisRowRef = (0,
|
|
3216
|
-
return /* @__PURE__ */
|
|
3378
|
+
const flexBasisRowRef = (0, import_react27.useRef)(null);
|
|
3379
|
+
return /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-grow", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Grow", "elementor") }, /* @__PURE__ */ React50.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-shrink", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Shrink", "elementor") }, /* @__PURE__ */ React50.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-basis", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React50.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef }))));
|
|
3217
3380
|
};
|
|
3218
3381
|
var getActiveGroup = ({
|
|
3219
3382
|
grow,
|
|
@@ -3236,22 +3399,23 @@ var getActiveGroup = ({
|
|
|
3236
3399
|
};
|
|
3237
3400
|
|
|
3238
3401
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3239
|
-
var
|
|
3402
|
+
var React51 = __toESM(require("react"));
|
|
3240
3403
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3241
|
-
var
|
|
3242
|
-
var
|
|
3404
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
3405
|
+
var GAPS_LABEL = (0, import_i18n28.__)("Gaps", "elementor");
|
|
3243
3406
|
var GapControlField = () => {
|
|
3244
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React51.createElement(import_editor_controls23.GapControl, { label: GAPS_LABEL }));
|
|
3245
3408
|
};
|
|
3246
3409
|
|
|
3247
3410
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3248
|
-
var
|
|
3411
|
+
var React52 = __toESM(require("react"));
|
|
3249
3412
|
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3250
3413
|
var import_icons15 = require("@elementor/icons");
|
|
3251
|
-
var
|
|
3252
|
-
var
|
|
3253
|
-
var
|
|
3254
|
-
var
|
|
3414
|
+
var import_ui38 = require("@elementor/ui");
|
|
3415
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
3416
|
+
var JUSTIFY_CONTENT_LABEL = (0, import_i18n29.__)("Justify content", "elementor");
|
|
3417
|
+
var StartIcon4 = (0, import_ui38.withDirection)(import_icons15.JustifyTopIcon);
|
|
3418
|
+
var EndIcon4 = (0, import_ui38.withDirection)(import_icons15.JustifyBottomIcon);
|
|
3255
3419
|
var iconProps4 = {
|
|
3256
3420
|
isClockwise: true,
|
|
3257
3421
|
offset: -90
|
|
@@ -3259,91 +3423,95 @@ var iconProps4 = {
|
|
|
3259
3423
|
var options4 = [
|
|
3260
3424
|
{
|
|
3261
3425
|
value: "flex-start",
|
|
3262
|
-
label: (0,
|
|
3263
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3426
|
+
label: (0, import_i18n29.__)("Start", "elementor"),
|
|
3427
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3264
3428
|
showTooltip: true
|
|
3265
3429
|
},
|
|
3266
3430
|
{
|
|
3267
3431
|
value: "center",
|
|
3268
|
-
label: (0,
|
|
3269
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3432
|
+
label: (0, import_i18n29.__)("Center", "elementor"),
|
|
3433
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: import_icons15.JustifyCenterIcon, size, ...iconProps4 }),
|
|
3270
3434
|
showTooltip: true
|
|
3271
3435
|
},
|
|
3272
3436
|
{
|
|
3273
3437
|
value: "flex-end",
|
|
3274
|
-
label: (0,
|
|
3275
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3438
|
+
label: (0, import_i18n29.__)("End", "elementor"),
|
|
3439
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3276
3440
|
showTooltip: true
|
|
3277
3441
|
},
|
|
3278
3442
|
{
|
|
3279
3443
|
value: "space-between",
|
|
3280
|
-
label: (0,
|
|
3281
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3444
|
+
label: (0, import_i18n29.__)("Space between", "elementor"),
|
|
3445
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
3282
3446
|
showTooltip: true
|
|
3283
3447
|
},
|
|
3284
3448
|
{
|
|
3285
3449
|
value: "space-around",
|
|
3286
|
-
label: (0,
|
|
3287
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3450
|
+
label: (0, import_i18n29.__)("Space around", "elementor"),
|
|
3451
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
3288
3452
|
showTooltip: true
|
|
3289
3453
|
},
|
|
3290
3454
|
{
|
|
3291
3455
|
value: "space-evenly",
|
|
3292
|
-
label: (0,
|
|
3293
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3456
|
+
label: (0, import_i18n29.__)("Space evenly", "elementor"),
|
|
3457
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: import_icons15.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
3294
3458
|
showTooltip: true
|
|
3295
3459
|
}
|
|
3296
3460
|
];
|
|
3297
|
-
var JustifyContentField = () => {
|
|
3298
|
-
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React51.createElement(import_ui43.Stack, { gap: 0.75 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, (0, import_i18n25.__)("Justify content", "elementor")), /* @__PURE__ */ React51.createElement(import_editor_controls24.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3299
|
-
};
|
|
3461
|
+
var JustifyContentField = () => /* @__PURE__ */ React52.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React52.createElement(import_editor_controls24.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3300
3462
|
|
|
3301
3463
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3302
|
-
var
|
|
3464
|
+
var React53 = __toESM(require("react"));
|
|
3303
3465
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
3304
3466
|
var import_icons16 = require("@elementor/icons");
|
|
3305
|
-
var
|
|
3306
|
-
var
|
|
3467
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
3468
|
+
var FLEX_WRAP_LABEL = (0, import_i18n30.__)("Wrap", "elementor");
|
|
3307
3469
|
var options5 = [
|
|
3308
3470
|
{
|
|
3309
3471
|
value: "nowrap",
|
|
3310
|
-
label: (0,
|
|
3311
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3472
|
+
label: (0, import_i18n30.__)("No wrap", "elementor"),
|
|
3473
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons16.ArrowRightIcon, { fontSize: size }),
|
|
3312
3474
|
showTooltip: true
|
|
3313
3475
|
},
|
|
3314
3476
|
{
|
|
3315
3477
|
value: "wrap",
|
|
3316
|
-
label: (0,
|
|
3317
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3478
|
+
label: (0, import_i18n30.__)("Wrap", "elementor"),
|
|
3479
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons16.ArrowBackIcon, { fontSize: size }),
|
|
3318
3480
|
showTooltip: true
|
|
3319
3481
|
},
|
|
3320
3482
|
{
|
|
3321
3483
|
value: "wrap-reverse",
|
|
3322
|
-
label: (0,
|
|
3323
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3484
|
+
label: (0, import_i18n30.__)("Reversed wrap", "elementor"),
|
|
3485
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons16.ArrowForwardIcon, { fontSize: size }),
|
|
3324
3486
|
showTooltip: true
|
|
3325
3487
|
}
|
|
3326
3488
|
];
|
|
3327
3489
|
var WrapField = () => {
|
|
3328
|
-
return /* @__PURE__ */
|
|
3490
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React53.createElement(import_editor_controls25.ToggleControl, { options: options5 }))));
|
|
3329
3491
|
};
|
|
3330
3492
|
|
|
3331
3493
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3494
|
+
var DISPLAY_LABEL2 = (0, import_i18n31.__)("Display", "elementor");
|
|
3495
|
+
var FLEX_WRAP_LABEL2 = (0, import_i18n31.__)("Flex wrap", "elementor");
|
|
3332
3496
|
var LayoutSection = () => {
|
|
3333
|
-
const { value: display } = useStylesField("display"
|
|
3497
|
+
const { value: display } = useStylesField("display", {
|
|
3498
|
+
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
3499
|
+
});
|
|
3334
3500
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
3335
3501
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
3336
3502
|
const { element } = useElement();
|
|
3337
3503
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
3338
3504
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3339
3505
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3340
|
-
return /* @__PURE__ */
|
|
3506
|
+
return /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React54.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React54.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3341
3507
|
};
|
|
3342
3508
|
var FlexFields = () => {
|
|
3343
|
-
const { value: flexWrap } = useStylesField("flex-wrap"
|
|
3344
|
-
|
|
3509
|
+
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
3510
|
+
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
3511
|
+
});
|
|
3512
|
+
return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(FlexDirectionField, null), /* @__PURE__ */ React54.createElement(JustifyContentField, null), /* @__PURE__ */ React54.createElement(AlignItemsField, null), /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(GapControlField, null), /* @__PURE__ */ React54.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React54.createElement(AlignContentField, null));
|
|
3345
3513
|
};
|
|
3346
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3514
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(import_editor_controls26.ControlFormLabel, null, (0, import_i18n31.__)("Flex child", "elementor")), /* @__PURE__ */ React54.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React54.createElement(FlexOrderField, null), /* @__PURE__ */ React54.createElement(FlexSizeField, null));
|
|
3347
3515
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3348
3516
|
const value = display?.value ?? local?.value;
|
|
3349
3517
|
if (!value) {
|
|
@@ -3353,38 +3521,39 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3353
3521
|
};
|
|
3354
3522
|
|
|
3355
3523
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3356
|
-
var
|
|
3357
|
-
var
|
|
3524
|
+
var React59 = __toESM(require("react"));
|
|
3525
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
3358
3526
|
var import_session3 = require("@elementor/session");
|
|
3527
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
3359
3528
|
|
|
3360
3529
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3530
|
+
var React55 = __toESM(require("react"));
|
|
3531
|
+
var import_react28 = require("react");
|
|
3363
3532
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3364
3533
|
var import_icons17 = require("@elementor/icons");
|
|
3365
|
-
var
|
|
3366
|
-
var
|
|
3367
|
-
var InlineStartIcon2 = (0,
|
|
3368
|
-
var InlineEndIcon2 = (0,
|
|
3534
|
+
var import_ui39 = require("@elementor/ui");
|
|
3535
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
3536
|
+
var InlineStartIcon2 = (0, import_ui39.withDirection)(import_icons17.SideLeftIcon);
|
|
3537
|
+
var InlineEndIcon2 = (0, import_ui39.withDirection)(import_icons17.SideRightIcon);
|
|
3369
3538
|
var sideIcons = {
|
|
3370
|
-
"inset-block-start": /* @__PURE__ */
|
|
3371
|
-
"inset-block-end": /* @__PURE__ */
|
|
3372
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3373
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3539
|
+
"inset-block-start": /* @__PURE__ */ React55.createElement(import_icons17.SideTopIcon, { fontSize: "tiny" }),
|
|
3540
|
+
"inset-block-end": /* @__PURE__ */ React55.createElement(import_icons17.SideBottomIcon, { fontSize: "tiny" }),
|
|
3541
|
+
"inset-inline-start": /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3542
|
+
"inset-inline-end": /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3374
3543
|
};
|
|
3375
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3376
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3544
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n32.__)("Right", "elementor") : (0, import_i18n32.__)("Left", "elementor");
|
|
3545
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n32.__)("Left", "elementor") : (0, import_i18n32.__)("Right", "elementor");
|
|
3377
3546
|
var DimensionsField = () => {
|
|
3378
3547
|
const { isSiteRtl } = useDirection();
|
|
3379
|
-
const rowRefs = [(0,
|
|
3380
|
-
return /* @__PURE__ */
|
|
3548
|
+
const rowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
3549
|
+
return /* @__PURE__ */ React55.createElement(UiProviders, null, /* @__PURE__ */ React55.createElement(import_ui39.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React55.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n32.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React55.createElement(
|
|
3381
3550
|
DimensionField,
|
|
3382
3551
|
{
|
|
3383
3552
|
side: "inset-inline-end",
|
|
3384
3553
|
label: getInlineEndLabel(isSiteRtl),
|
|
3385
3554
|
rowRef: rowRefs[0]
|
|
3386
3555
|
}
|
|
3387
|
-
)), /* @__PURE__ */
|
|
3556
|
+
)), /* @__PURE__ */ React55.createElement(import_ui39.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React55.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n32.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React55.createElement(
|
|
3388
3557
|
DimensionField,
|
|
3389
3558
|
{
|
|
3390
3559
|
side: "inset-inline-start",
|
|
@@ -3397,47 +3566,52 @@ var DimensionField = ({
|
|
|
3397
3566
|
side,
|
|
3398
3567
|
label,
|
|
3399
3568
|
rowRef
|
|
3400
|
-
}) => /* @__PURE__ */
|
|
3569
|
+
}) => /* @__PURE__ */ React55.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React55.createElement(import_ui39.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React55.createElement(import_ui39.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(import_ui39.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(import_editor_controls27.SizeControl, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3401
3570
|
|
|
3402
3571
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3403
|
-
var
|
|
3404
|
-
var
|
|
3572
|
+
var React56 = __toESM(require("react"));
|
|
3573
|
+
var import_react29 = require("react");
|
|
3405
3574
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3406
|
-
var
|
|
3407
|
-
var
|
|
3575
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
3576
|
+
var OFFSET_LABEL = (0, import_i18n33.__)("Anchor offset", "elementor");
|
|
3577
|
+
var UNITS = ["px", "em", "rem", "vw", "vh"];
|
|
3408
3578
|
var OffsetField = () => {
|
|
3409
|
-
const rowRef = (0,
|
|
3410
|
-
return /* @__PURE__ */
|
|
3579
|
+
const rowRef = (0, import_react29.useRef)(null);
|
|
3580
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React56.createElement(import_editor_controls28.SizeControl, { units: UNITS, anchorRef: rowRef })));
|
|
3411
3581
|
};
|
|
3412
3582
|
|
|
3413
3583
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3414
|
-
var
|
|
3584
|
+
var React57 = __toESM(require("react"));
|
|
3415
3585
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3416
|
-
var
|
|
3417
|
-
var
|
|
3586
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
3587
|
+
var POSITION_LABEL = (0, import_i18n34.__)("Position", "elementor");
|
|
3418
3588
|
var positionOptions = [
|
|
3419
|
-
{ label: (0,
|
|
3420
|
-
{ label: (0,
|
|
3421
|
-
{ label: (0,
|
|
3422
|
-
{ label: (0,
|
|
3423
|
-
{ label: (0,
|
|
3589
|
+
{ label: (0, import_i18n34.__)("Static", "elementor"), value: "static" },
|
|
3590
|
+
{ label: (0, import_i18n34.__)("Relative", "elementor"), value: "relative" },
|
|
3591
|
+
{ label: (0, import_i18n34.__)("Absolute", "elementor"), value: "absolute" },
|
|
3592
|
+
{ label: (0, import_i18n34.__)("Fixed", "elementor"), value: "fixed" },
|
|
3593
|
+
{ label: (0, import_i18n34.__)("Sticky", "elementor"), value: "sticky" }
|
|
3424
3594
|
];
|
|
3425
3595
|
var PositionField = ({ onChange }) => {
|
|
3426
|
-
return /* @__PURE__ */
|
|
3596
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React57.createElement(import_editor_controls29.SelectControl, { options: positionOptions, onChange })));
|
|
3427
3597
|
};
|
|
3428
3598
|
|
|
3429
3599
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3430
|
-
var
|
|
3600
|
+
var React58 = __toESM(require("react"));
|
|
3431
3601
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3432
|
-
var
|
|
3433
|
-
var
|
|
3602
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
3603
|
+
var Z_INDEX_LABEL = (0, import_i18n35.__)("Z-index", "elementor");
|
|
3434
3604
|
var ZIndexField = () => {
|
|
3435
|
-
return /* @__PURE__ */
|
|
3605
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React58.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React58.createElement(import_editor_controls30.NumberControl, null)));
|
|
3436
3606
|
};
|
|
3437
3607
|
|
|
3438
3608
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3609
|
+
var POSITION_LABEL2 = (0, import_i18n36.__)("Position", "elementor");
|
|
3610
|
+
var DIMENSIONS_LABEL = (0, import_i18n36.__)("Dimensions", "elementor");
|
|
3439
3611
|
var PositionSection = () => {
|
|
3440
|
-
const { value: positionValue } = useStylesField("position"
|
|
3612
|
+
const { value: positionValue } = useStylesField("position", {
|
|
3613
|
+
history: { propDisplayName: POSITION_LABEL2 }
|
|
3614
|
+
});
|
|
3441
3615
|
const { values: dimensions, setValues: setDimensions } = useStylesFields([
|
|
3442
3616
|
"inset-block-start",
|
|
3443
3617
|
"inset-block-end",
|
|
@@ -3445,27 +3619,31 @@ var PositionSection = () => {
|
|
|
3445
3619
|
"inset-inline-end"
|
|
3446
3620
|
]);
|
|
3447
3621
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3448
|
-
const isCssIdFeatureActive = (0,
|
|
3622
|
+
const isCssIdFeatureActive = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
3449
3623
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3624
|
+
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
3450
3625
|
if (newPosition === "static") {
|
|
3451
3626
|
if (dimensions) {
|
|
3452
3627
|
updateDimensionsHistory(dimensions);
|
|
3453
|
-
setDimensions(
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3628
|
+
setDimensions(
|
|
3629
|
+
{
|
|
3630
|
+
"inset-block-start": void 0,
|
|
3631
|
+
"inset-block-end": void 0,
|
|
3632
|
+
"inset-inline-start": void 0,
|
|
3633
|
+
"inset-inline-end": void 0
|
|
3634
|
+
},
|
|
3635
|
+
meta
|
|
3636
|
+
);
|
|
3459
3637
|
}
|
|
3460
3638
|
} else if (previousPosition === "static") {
|
|
3461
3639
|
if (dimensionsValuesFromHistory) {
|
|
3462
|
-
setDimensions(dimensionsValuesFromHistory);
|
|
3640
|
+
setDimensions(dimensionsValuesFromHistory, meta);
|
|
3463
3641
|
clearDimensionsHistory();
|
|
3464
3642
|
}
|
|
3465
3643
|
}
|
|
3466
3644
|
};
|
|
3467
3645
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3468
|
-
return /* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ React59.createElement(SectionContent, null, /* @__PURE__ */ React59.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(DimensionsField, null), /* @__PURE__ */ React59.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(OffsetField, null)));
|
|
3469
3647
|
};
|
|
3470
3648
|
var usePersistDimensions = () => {
|
|
3471
3649
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3475,22 +3653,22 @@ var usePersistDimensions = () => {
|
|
|
3475
3653
|
};
|
|
3476
3654
|
|
|
3477
3655
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3478
|
-
var
|
|
3479
|
-
var
|
|
3656
|
+
var React65 = __toESM(require("react"));
|
|
3657
|
+
var import_react30 = require("react");
|
|
3480
3658
|
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
3481
|
-
var
|
|
3482
|
-
var
|
|
3483
|
-
var
|
|
3659
|
+
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
3660
|
+
var import_ui41 = require("@elementor/ui");
|
|
3661
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
3484
3662
|
|
|
3485
3663
|
// src/components/style-tab-collapsible-content.tsx
|
|
3486
|
-
var
|
|
3487
|
-
var
|
|
3664
|
+
var React61 = __toESM(require("react"));
|
|
3665
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
3488
3666
|
|
|
3489
3667
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3490
|
-
var
|
|
3491
|
-
var
|
|
3492
|
-
var
|
|
3493
|
-
var
|
|
3668
|
+
var React60 = __toESM(require("react"));
|
|
3669
|
+
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
3670
|
+
var import_ui40 = require("@elementor/ui");
|
|
3671
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
3494
3672
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3495
3673
|
const { id, meta, provider } = useStyle();
|
|
3496
3674
|
const snapshot = useStylesInheritanceSnapshot();
|
|
@@ -3501,17 +3679,17 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
3501
3679
|
if (!hasValues && !hasOverrides) {
|
|
3502
3680
|
return null;
|
|
3503
3681
|
}
|
|
3504
|
-
const hasValueLabel = (0,
|
|
3505
|
-
const hasOverridesLabel = (0,
|
|
3506
|
-
return /* @__PURE__ */
|
|
3682
|
+
const hasValueLabel = (0, import_i18n37.__)("Has effective styles", "elementor");
|
|
3683
|
+
const hasOverridesLabel = (0, import_i18n37.__)("Has overridden styles", "elementor");
|
|
3684
|
+
return /* @__PURE__ */ React60.createElement(import_ui40.Tooltip, { title: (0, import_i18n37.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React60.createElement(import_ui40.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React60.createElement(
|
|
3507
3685
|
StyleIndicator,
|
|
3508
3686
|
{
|
|
3509
3687
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3510
|
-
"data-variant": (0,
|
|
3688
|
+
"data-variant": (0, import_editor_styles_repository13.isElementsStylesProvider)(provider.getKey()) ? "local" : "global",
|
|
3511
3689
|
role: "listitem",
|
|
3512
3690
|
"aria-label": hasValueLabel
|
|
3513
3691
|
}
|
|
3514
|
-
), hasOverrides && /* @__PURE__ */
|
|
3692
|
+
), hasOverrides && /* @__PURE__ */ React60.createElement(
|
|
3515
3693
|
StyleIndicator,
|
|
3516
3694
|
{
|
|
3517
3695
|
isOverridden: true,
|
|
@@ -3551,67 +3729,69 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3551
3729
|
|
|
3552
3730
|
// src/components/style-tab-collapsible-content.tsx
|
|
3553
3731
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3554
|
-
return /* @__PURE__ */
|
|
3732
|
+
return /* @__PURE__ */ React61.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3555
3733
|
};
|
|
3556
3734
|
function getStylesInheritanceIndicators(fields) {
|
|
3557
|
-
const isUsingFieldsIndicators = (0,
|
|
3735
|
+
const isUsingFieldsIndicators = (0, import_editor_v1_adapters14.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3558
3736
|
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3559
3737
|
return null;
|
|
3560
3738
|
}
|
|
3561
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3739
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React61.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3562
3740
|
}
|
|
3563
3741
|
|
|
3564
3742
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3565
|
-
var
|
|
3743
|
+
var React62 = __toESM(require("react"));
|
|
3566
3744
|
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3567
|
-
var
|
|
3568
|
-
var
|
|
3745
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
3746
|
+
var OBJECT_FIT_LABEL = (0, import_i18n38.__)("Object fit", "elementor");
|
|
3569
3747
|
var positionOptions2 = [
|
|
3570
|
-
{ label: (0,
|
|
3571
|
-
{ label: (0,
|
|
3572
|
-
{ label: (0,
|
|
3573
|
-
{ label: (0,
|
|
3574
|
-
{ label: (0,
|
|
3748
|
+
{ label: (0, import_i18n38.__)("Fill", "elementor"), value: "fill" },
|
|
3749
|
+
{ label: (0, import_i18n38.__)("Cover", "elementor"), value: "cover" },
|
|
3750
|
+
{ label: (0, import_i18n38.__)("Contain", "elementor"), value: "contain" },
|
|
3751
|
+
{ label: (0, import_i18n38.__)("None", "elementor"), value: "none" },
|
|
3752
|
+
{ label: (0, import_i18n38.__)("Scale down", "elementor"), value: "scale-down" }
|
|
3575
3753
|
];
|
|
3576
3754
|
var ObjectFitField = () => {
|
|
3577
|
-
return /* @__PURE__ */
|
|
3755
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React62.createElement(import_editor_controls31.SelectControl, { options: positionOptions2 })));
|
|
3578
3756
|
};
|
|
3579
3757
|
|
|
3580
3758
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3581
|
-
var
|
|
3759
|
+
var React63 = __toESM(require("react"));
|
|
3582
3760
|
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3761
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
3762
|
+
var OBJECT_POSITION_LABEL = (0, import_i18n39.__)("Object position", "elementor");
|
|
3583
3763
|
var ObjectPositionField = () => {
|
|
3584
|
-
return /* @__PURE__ */
|
|
3764
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "object-position", propDisplayName: OBJECT_POSITION_LABEL }, /* @__PURE__ */ React63.createElement(import_editor_controls32.PositionControl, null));
|
|
3585
3765
|
};
|
|
3586
3766
|
|
|
3587
3767
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3588
|
-
var
|
|
3768
|
+
var React64 = __toESM(require("react"));
|
|
3589
3769
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
3590
3770
|
var import_icons18 = require("@elementor/icons");
|
|
3591
|
-
var
|
|
3592
|
-
var
|
|
3771
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
3772
|
+
var OVERFLOW_LABEL = (0, import_i18n40.__)("Overflow", "elementor");
|
|
3593
3773
|
var options6 = [
|
|
3594
3774
|
{
|
|
3595
3775
|
value: "visible",
|
|
3596
|
-
label: (0,
|
|
3597
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3776
|
+
label: (0, import_i18n40.__)("Visible", "elementor"),
|
|
3777
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons18.EyeIcon, { fontSize: size }),
|
|
3598
3778
|
showTooltip: true
|
|
3599
3779
|
},
|
|
3600
3780
|
{
|
|
3601
3781
|
value: "hidden",
|
|
3602
|
-
label: (0,
|
|
3603
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3782
|
+
label: (0, import_i18n40.__)("Hidden", "elementor"),
|
|
3783
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons18.EyeOffIcon, { fontSize: size }),
|
|
3604
3784
|
showTooltip: true
|
|
3605
3785
|
},
|
|
3606
3786
|
{
|
|
3607
3787
|
value: "auto",
|
|
3608
|
-
label: (0,
|
|
3609
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3788
|
+
label: (0, import_i18n40.__)("Auto", "elementor"),
|
|
3789
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons18.LetterAIcon, { fontSize: size }),
|
|
3610
3790
|
showTooltip: true
|
|
3611
3791
|
}
|
|
3612
3792
|
];
|
|
3613
3793
|
var OverflowField = () => {
|
|
3614
|
-
return /* @__PURE__ */
|
|
3794
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React64.createElement(import_editor_controls33.ToggleControl, { options: options6 })));
|
|
3615
3795
|
};
|
|
3616
3796
|
|
|
3617
3797
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -3620,98 +3800,104 @@ var CssSizeProps = [
|
|
|
3620
3800
|
[
|
|
3621
3801
|
{
|
|
3622
3802
|
bind: "width",
|
|
3623
|
-
label: (0,
|
|
3803
|
+
label: (0, import_i18n41.__)("Width", "elementor")
|
|
3624
3804
|
},
|
|
3625
3805
|
{
|
|
3626
3806
|
bind: "height",
|
|
3627
|
-
label: (0,
|
|
3807
|
+
label: (0, import_i18n41.__)("Height", "elementor")
|
|
3628
3808
|
}
|
|
3629
3809
|
],
|
|
3630
3810
|
[
|
|
3631
3811
|
{
|
|
3632
3812
|
bind: "min-width",
|
|
3633
|
-
label: (0,
|
|
3813
|
+
label: (0, import_i18n41.__)("Min width", "elementor")
|
|
3634
3814
|
},
|
|
3635
3815
|
{
|
|
3636
3816
|
bind: "min-height",
|
|
3637
|
-
label: (0,
|
|
3817
|
+
label: (0, import_i18n41.__)("Min height", "elementor")
|
|
3638
3818
|
}
|
|
3639
3819
|
],
|
|
3640
3820
|
[
|
|
3641
3821
|
{
|
|
3642
3822
|
bind: "max-width",
|
|
3643
|
-
label: (0,
|
|
3823
|
+
label: (0, import_i18n41.__)("Max width", "elementor")
|
|
3644
3824
|
},
|
|
3645
3825
|
{
|
|
3646
3826
|
bind: "max-height",
|
|
3647
|
-
label: (0,
|
|
3827
|
+
label: (0, import_i18n41.__)("Max height", "elementor")
|
|
3648
3828
|
}
|
|
3649
3829
|
]
|
|
3650
3830
|
];
|
|
3831
|
+
var ASPECT_RATIO_LABEL = (0, import_i18n41.__)("Aspect Ratio", "elementor");
|
|
3832
|
+
var OBJECT_FIT_LABEL2 = (0, import_i18n41.__)("Object fit", "elementor");
|
|
3651
3833
|
var SizeSection = () => {
|
|
3652
|
-
const { value: fitValue } = useStylesField("object-fit"
|
|
3834
|
+
const { value: fitValue } = useStylesField("object-fit", {
|
|
3835
|
+
history: { propDisplayName: OBJECT_FIT_LABEL2 }
|
|
3836
|
+
});
|
|
3653
3837
|
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3654
|
-
const gridRowRefs = [(0,
|
|
3655
|
-
const isVersion330Active = (0,
|
|
3656
|
-
return /* @__PURE__ */
|
|
3838
|
+
const gridRowRefs = [(0, import_react30.useRef)(null), (0, import_react30.useRef)(null), (0, import_react30.useRef)(null)];
|
|
3839
|
+
const isVersion330Active = (0, import_editor_v1_adapters15.isExperimentActive)(EXPERIMENT_ID);
|
|
3840
|
+
return /* @__PURE__ */ React65.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React65.createElement(import_ui41.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React65.createElement(import_ui41.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React65.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(import_ui41.Stack, null, /* @__PURE__ */ React65.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React65.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React65.createElement(import_ui41.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React65.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React65.createElement(import_editor_controls34.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React65.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ObjectPositionField, null)))));
|
|
3657
3841
|
};
|
|
3658
3842
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3659
|
-
return /* @__PURE__ */
|
|
3843
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React65.createElement(import_ui41.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React65.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, label)), /* @__PURE__ */ React65.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(import_editor_controls34.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
3660
3844
|
};
|
|
3661
3845
|
|
|
3662
3846
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3663
|
-
var
|
|
3847
|
+
var React66 = __toESM(require("react"));
|
|
3664
3848
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
3665
|
-
var
|
|
3849
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
3850
|
+
var MARGIN_LABEL = (0, import_i18n42.__)("Margin", "elementor");
|
|
3851
|
+
var PADDING_LABEL = (0, import_i18n42.__)("Padding", "elementor");
|
|
3666
3852
|
var SpacingSection = () => {
|
|
3667
3853
|
const { isSiteRtl } = useDirection();
|
|
3668
|
-
return /* @__PURE__ */
|
|
3854
|
+
return /* @__PURE__ */ React66.createElement(SectionContent, null, /* @__PURE__ */ React66.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React66.createElement(
|
|
3669
3855
|
import_editor_controls35.LinkedDimensionsControl,
|
|
3670
3856
|
{
|
|
3671
|
-
label:
|
|
3857
|
+
label: MARGIN_LABEL,
|
|
3672
3858
|
isSiteRtl,
|
|
3673
3859
|
extendedOptions: ["auto"]
|
|
3674
3860
|
}
|
|
3675
|
-
)), /* @__PURE__ */
|
|
3861
|
+
)), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React66.createElement(import_editor_controls35.LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
3676
3862
|
};
|
|
3677
3863
|
|
|
3678
3864
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3679
|
-
var
|
|
3680
|
-
var
|
|
3865
|
+
var React82 = __toESM(require("react"));
|
|
3866
|
+
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
3867
|
+
var import_i18n59 = require("@wordpress/i18n");
|
|
3681
3868
|
|
|
3682
3869
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3683
|
-
var
|
|
3870
|
+
var React67 = __toESM(require("react"));
|
|
3684
3871
|
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
3685
|
-
var
|
|
3686
|
-
var
|
|
3872
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
3873
|
+
var COLUMN_COUNT_LABEL = (0, import_i18n43.__)("Columns", "elementor");
|
|
3687
3874
|
var ColumnCountField = () => {
|
|
3688
|
-
return /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React67.createElement(import_editor_controls36.NumberControl, { shouldForceInt: true, min: 0, step: 1 })));
|
|
3689
3876
|
};
|
|
3690
3877
|
|
|
3691
3878
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3692
|
-
var
|
|
3693
|
-
var
|
|
3879
|
+
var React68 = __toESM(require("react"));
|
|
3880
|
+
var import_react31 = require("react");
|
|
3694
3881
|
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3695
|
-
var
|
|
3696
|
-
var
|
|
3882
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
3883
|
+
var COLUMN_GAP_LABEL = (0, import_i18n44.__)("Column gap", "elementor");
|
|
3697
3884
|
var ColumnGapField = () => {
|
|
3698
|
-
const rowRef = (0,
|
|
3699
|
-
return /* @__PURE__ */
|
|
3885
|
+
const rowRef = (0, import_react31.useRef)(null);
|
|
3886
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(import_editor_controls37.SizeControl, { anchorRef: rowRef })));
|
|
3700
3887
|
};
|
|
3701
3888
|
|
|
3702
3889
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3703
|
-
var
|
|
3890
|
+
var React69 = __toESM(require("react"));
|
|
3704
3891
|
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3705
|
-
var
|
|
3706
|
-
var import_i18n40 = require("@wordpress/i18n");
|
|
3892
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
3707
3893
|
|
|
3708
3894
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3709
|
-
var
|
|
3710
|
-
var
|
|
3895
|
+
var import_react32 = require("react");
|
|
3896
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
3711
3897
|
var supportedCategories = {
|
|
3712
|
-
system: (0,
|
|
3713
|
-
custom: (0,
|
|
3714
|
-
googlefonts: (0,
|
|
3898
|
+
system: (0, import_i18n45.__)("System", "elementor"),
|
|
3899
|
+
custom: (0, import_i18n45.__)("Custom Fonts", "elementor"),
|
|
3900
|
+
googlefonts: (0, import_i18n45.__)("Google Fonts", "elementor")
|
|
3715
3901
|
};
|
|
3716
3902
|
var getFontFamilies = () => {
|
|
3717
3903
|
const { controls } = getElementorConfig();
|
|
@@ -3723,7 +3909,7 @@ var getFontFamilies = () => {
|
|
|
3723
3909
|
};
|
|
3724
3910
|
var useFontFamilies = () => {
|
|
3725
3911
|
const fontFamilies = getFontFamilies();
|
|
3726
|
-
return (0,
|
|
3912
|
+
return (0, import_react32.useMemo)(() => {
|
|
3727
3913
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
3728
3914
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
3729
3915
|
if (!supportedCategories[category]) {
|
|
@@ -3743,199 +3929,204 @@ var useFontFamilies = () => {
|
|
|
3743
3929
|
};
|
|
3744
3930
|
|
|
3745
3931
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3932
|
+
var FONT_FAMILY_LABEL = (0, import_i18n46.__)("Font family", "elementor");
|
|
3746
3933
|
var FontFamilyField = () => {
|
|
3747
3934
|
const fontFamilies = useFontFamilies();
|
|
3935
|
+
const sectionWidth = useSectionWidth();
|
|
3748
3936
|
if (fontFamilies.length === 0) {
|
|
3749
3937
|
return null;
|
|
3750
3938
|
}
|
|
3751
|
-
return /* @__PURE__ */
|
|
3939
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React69.createElement(import_editor_controls38.FontFamilyControl, { fontFamilies, sectionWidth })));
|
|
3752
3940
|
};
|
|
3753
3941
|
|
|
3754
3942
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3755
|
-
var
|
|
3756
|
-
var
|
|
3943
|
+
var React70 = __toESM(require("react"));
|
|
3944
|
+
var import_react33 = require("react");
|
|
3757
3945
|
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3758
|
-
var
|
|
3759
|
-
var
|
|
3946
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
3947
|
+
var FONT_SIZE_LABEL = (0, import_i18n47.__)("Font size", "elementor");
|
|
3760
3948
|
var FontSizeField = () => {
|
|
3761
|
-
const rowRef = (0,
|
|
3762
|
-
return /* @__PURE__ */
|
|
3949
|
+
const rowRef = (0, import_react33.useRef)(null);
|
|
3950
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React70.createElement(import_editor_controls39.SizeControl, { anchorRef: rowRef })));
|
|
3763
3951
|
};
|
|
3764
3952
|
|
|
3765
3953
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3766
|
-
var
|
|
3954
|
+
var React71 = __toESM(require("react"));
|
|
3767
3955
|
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
3768
3956
|
var import_icons19 = require("@elementor/icons");
|
|
3769
|
-
var
|
|
3770
|
-
var
|
|
3957
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
3958
|
+
var FONT_STYLE_LABEL = (0, import_i18n48.__)("Font style", "elementor");
|
|
3771
3959
|
var options7 = [
|
|
3772
3960
|
{
|
|
3773
3961
|
value: "normal",
|
|
3774
|
-
label: (0,
|
|
3775
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3962
|
+
label: (0, import_i18n48.__)("Normal", "elementor"),
|
|
3963
|
+
renderContent: ({ size }) => /* @__PURE__ */ React71.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
3776
3964
|
showTooltip: true
|
|
3777
3965
|
},
|
|
3778
3966
|
{
|
|
3779
3967
|
value: "italic",
|
|
3780
|
-
label: (0,
|
|
3781
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3968
|
+
label: (0, import_i18n48.__)("Italic", "elementor"),
|
|
3969
|
+
renderContent: ({ size }) => /* @__PURE__ */ React71.createElement(import_icons19.ItalicIcon, { fontSize: size }),
|
|
3782
3970
|
showTooltip: true
|
|
3783
3971
|
}
|
|
3784
3972
|
];
|
|
3785
|
-
var FontStyleField = () =>
|
|
3973
|
+
var FontStyleField = () => {
|
|
3974
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React71.createElement(import_editor_controls40.ToggleControl, { options: options7 })));
|
|
3975
|
+
};
|
|
3786
3976
|
|
|
3787
3977
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3788
|
-
var
|
|
3978
|
+
var React72 = __toESM(require("react"));
|
|
3789
3979
|
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3790
|
-
var
|
|
3791
|
-
var
|
|
3980
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
3981
|
+
var FONT_WEIGHT_LABEL = (0, import_i18n49.__)("Font weight", "elementor");
|
|
3792
3982
|
var fontWeightOptions = [
|
|
3793
|
-
{ value: "100", label: (0,
|
|
3794
|
-
{ value: "200", label: (0,
|
|
3795
|
-
{ value: "300", label: (0,
|
|
3796
|
-
{ value: "400", label: (0,
|
|
3797
|
-
{ value: "500", label: (0,
|
|
3798
|
-
{ value: "600", label: (0,
|
|
3799
|
-
{ value: "700", label: (0,
|
|
3800
|
-
{ value: "800", label: (0,
|
|
3801
|
-
{ value: "900", label: (0,
|
|
3983
|
+
{ value: "100", label: (0, import_i18n49.__)("100 - Thin", "elementor") },
|
|
3984
|
+
{ value: "200", label: (0, import_i18n49.__)("200 - Extra light", "elementor") },
|
|
3985
|
+
{ value: "300", label: (0, import_i18n49.__)("300 - Light", "elementor") },
|
|
3986
|
+
{ value: "400", label: (0, import_i18n49.__)("400 - Normal", "elementor") },
|
|
3987
|
+
{ value: "500", label: (0, import_i18n49.__)("500 - Medium", "elementor") },
|
|
3988
|
+
{ value: "600", label: (0, import_i18n49.__)("600 - Semi bold", "elementor") },
|
|
3989
|
+
{ value: "700", label: (0, import_i18n49.__)("700 - Bold", "elementor") },
|
|
3990
|
+
{ value: "800", label: (0, import_i18n49.__)("800 - Extra bold", "elementor") },
|
|
3991
|
+
{ value: "900", label: (0, import_i18n49.__)("900 - Black", "elementor") }
|
|
3802
3992
|
];
|
|
3803
3993
|
var FontWeightField = () => {
|
|
3804
|
-
return /* @__PURE__ */
|
|
3994
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(import_editor_controls41.SelectControl, { options: fontWeightOptions })));
|
|
3805
3995
|
};
|
|
3806
3996
|
|
|
3807
3997
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3808
|
-
var
|
|
3809
|
-
var
|
|
3998
|
+
var React73 = __toESM(require("react"));
|
|
3999
|
+
var import_react34 = require("react");
|
|
3810
4000
|
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3811
|
-
var
|
|
3812
|
-
var
|
|
4001
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
4002
|
+
var LETTER_SPACING_LABEL = (0, import_i18n50.__)("Letter spacing", "elementor");
|
|
3813
4003
|
var LetterSpacingField = () => {
|
|
3814
|
-
const rowRef = (0,
|
|
3815
|
-
return /* @__PURE__ */
|
|
4004
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
4005
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef })));
|
|
3816
4006
|
};
|
|
3817
4007
|
|
|
3818
4008
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3819
|
-
var
|
|
3820
|
-
var
|
|
4009
|
+
var React74 = __toESM(require("react"));
|
|
4010
|
+
var import_react35 = require("react");
|
|
3821
4011
|
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3822
|
-
var
|
|
3823
|
-
var
|
|
4012
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
4013
|
+
var LINE_HEIGHT_LABEL = (0, import_i18n51.__)("Line height", "elementor");
|
|
3824
4014
|
var LineHeightField = () => {
|
|
3825
|
-
const rowRef = (0,
|
|
3826
|
-
return /* @__PURE__ */
|
|
4015
|
+
const rowRef = (0, import_react35.useRef)(null);
|
|
4016
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React74.createElement(import_editor_controls43.SizeControl, { anchorRef: rowRef })));
|
|
3827
4017
|
};
|
|
3828
4018
|
|
|
3829
4019
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3830
|
-
var
|
|
4020
|
+
var React75 = __toESM(require("react"));
|
|
3831
4021
|
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3832
4022
|
var import_icons20 = require("@elementor/icons");
|
|
3833
|
-
var
|
|
3834
|
-
var
|
|
3835
|
-
var
|
|
3836
|
-
var
|
|
4023
|
+
var import_ui42 = require("@elementor/ui");
|
|
4024
|
+
var import_i18n52 = require("@wordpress/i18n");
|
|
4025
|
+
var TEXT_ALIGNMENT_LABEL = (0, import_i18n52.__)("Text align", "elementor");
|
|
4026
|
+
var AlignStartIcon = (0, import_ui42.withDirection)(import_icons20.AlignLeftIcon);
|
|
4027
|
+
var AlignEndIcon = (0, import_ui42.withDirection)(import_icons20.AlignRightIcon);
|
|
3837
4028
|
var options8 = [
|
|
3838
4029
|
{
|
|
3839
4030
|
value: "start",
|
|
3840
|
-
label: (0,
|
|
3841
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4031
|
+
label: (0, import_i18n52.__)("Start", "elementor"),
|
|
4032
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignStartIcon, { fontSize: size }),
|
|
3842
4033
|
showTooltip: true
|
|
3843
4034
|
},
|
|
3844
4035
|
{
|
|
3845
4036
|
value: "center",
|
|
3846
|
-
label: (0,
|
|
3847
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4037
|
+
label: (0, import_i18n52.__)("Center", "elementor"),
|
|
4038
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons20.AlignCenterIcon, { fontSize: size }),
|
|
3848
4039
|
showTooltip: true
|
|
3849
4040
|
},
|
|
3850
4041
|
{
|
|
3851
4042
|
value: "end",
|
|
3852
|
-
label: (0,
|
|
3853
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4043
|
+
label: (0, import_i18n52.__)("End", "elementor"),
|
|
4044
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignEndIcon, { fontSize: size }),
|
|
3854
4045
|
showTooltip: true
|
|
3855
4046
|
},
|
|
3856
4047
|
{
|
|
3857
4048
|
value: "justify",
|
|
3858
|
-
label: (0,
|
|
3859
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4049
|
+
label: (0, import_i18n52.__)("Justify", "elementor"),
|
|
4050
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons20.AlignJustifiedIcon, { fontSize: size }),
|
|
3860
4051
|
showTooltip: true
|
|
3861
4052
|
}
|
|
3862
4053
|
];
|
|
3863
4054
|
var TextAlignmentField = () => {
|
|
3864
|
-
return /* @__PURE__ */
|
|
4055
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React75.createElement(UiProviders, null, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React75.createElement(import_editor_controls44.ToggleControl, { options: options8 }))));
|
|
3865
4056
|
};
|
|
3866
4057
|
|
|
3867
4058
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3868
|
-
var
|
|
4059
|
+
var React76 = __toESM(require("react"));
|
|
3869
4060
|
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3870
|
-
var
|
|
3871
|
-
var
|
|
4061
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
4062
|
+
var TEXT_COLOR_LABEL = (0, import_i18n53.__)("Text color", "elementor");
|
|
3872
4063
|
var TextColorField = () => {
|
|
3873
|
-
return /* @__PURE__ */
|
|
4064
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React76.createElement(import_editor_controls45.ColorControl, null)));
|
|
3874
4065
|
};
|
|
3875
4066
|
|
|
3876
4067
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3877
|
-
var
|
|
4068
|
+
var React77 = __toESM(require("react"));
|
|
3878
4069
|
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3879
4070
|
var import_icons21 = require("@elementor/icons");
|
|
3880
|
-
var
|
|
3881
|
-
var
|
|
4071
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
4072
|
+
var TEXT_DECORATION_LABEL = (0, import_i18n54.__)("Line decoration", "elementor");
|
|
3882
4073
|
var options9 = [
|
|
3883
4074
|
{
|
|
3884
4075
|
value: "none",
|
|
3885
|
-
label: (0,
|
|
3886
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4076
|
+
label: (0, import_i18n54.__)("None", "elementor"),
|
|
4077
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
3887
4078
|
showTooltip: true,
|
|
3888
4079
|
exclusive: true
|
|
3889
4080
|
},
|
|
3890
4081
|
{
|
|
3891
4082
|
value: "underline",
|
|
3892
|
-
label: (0,
|
|
3893
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4083
|
+
label: (0, import_i18n54.__)("Underline", "elementor"),
|
|
4084
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.UnderlineIcon, { fontSize: size }),
|
|
3894
4085
|
showTooltip: true
|
|
3895
4086
|
},
|
|
3896
4087
|
{
|
|
3897
4088
|
value: "line-through",
|
|
3898
|
-
label: (0,
|
|
3899
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4089
|
+
label: (0, import_i18n54.__)("Line-through", "elementor"),
|
|
4090
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.StrikethroughIcon, { fontSize: size }),
|
|
3900
4091
|
showTooltip: true
|
|
3901
4092
|
},
|
|
3902
4093
|
{
|
|
3903
4094
|
value: "overline",
|
|
3904
|
-
label: (0,
|
|
3905
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4095
|
+
label: (0, import_i18n54.__)("Overline", "elementor"),
|
|
4096
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.OverlineIcon, { fontSize: size }),
|
|
3906
4097
|
showTooltip: true
|
|
3907
4098
|
}
|
|
3908
4099
|
];
|
|
3909
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
4100
|
+
var TextDecorationField = () => /* @__PURE__ */ React77.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React77.createElement(import_editor_controls46.ToggleControl, { options: options9, exclusive: false })));
|
|
3910
4101
|
|
|
3911
4102
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3912
|
-
var
|
|
4103
|
+
var React78 = __toESM(require("react"));
|
|
3913
4104
|
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
3914
4105
|
var import_icons22 = require("@elementor/icons");
|
|
3915
|
-
var
|
|
3916
|
-
var
|
|
4106
|
+
var import_i18n55 = require("@wordpress/i18n");
|
|
4107
|
+
var TEXT_DIRECTION_LABEL = (0, import_i18n55.__)("Direction", "elementor");
|
|
3917
4108
|
var options10 = [
|
|
3918
4109
|
{
|
|
3919
4110
|
value: "ltr",
|
|
3920
|
-
label: (0,
|
|
3921
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4111
|
+
label: (0, import_i18n55.__)("Left to right", "elementor"),
|
|
4112
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons22.TextDirectionLtrIcon, { fontSize: size }),
|
|
3922
4113
|
showTooltip: true
|
|
3923
4114
|
},
|
|
3924
4115
|
{
|
|
3925
4116
|
value: "rtl",
|
|
3926
|
-
label: (0,
|
|
3927
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4117
|
+
label: (0, import_i18n55.__)("Right to left", "elementor"),
|
|
4118
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons22.TextDirectionRtlIcon, { fontSize: size }),
|
|
3928
4119
|
showTooltip: true
|
|
3929
4120
|
}
|
|
3930
4121
|
];
|
|
3931
4122
|
var TextDirectionField = () => {
|
|
3932
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React78.createElement(import_editor_controls47.ToggleControl, { options: options10 })));
|
|
3933
4124
|
};
|
|
3934
4125
|
|
|
3935
4126
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3936
|
-
var
|
|
4127
|
+
var React79 = __toESM(require("react"));
|
|
3937
4128
|
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3938
|
-
var
|
|
4129
|
+
var import_i18n56 = require("@wordpress/i18n");
|
|
3939
4130
|
var initTextStroke = {
|
|
3940
4131
|
$$type: "stroke",
|
|
3941
4132
|
value: {
|
|
@@ -3952,8 +4143,11 @@ var initTextStroke = {
|
|
|
3952
4143
|
}
|
|
3953
4144
|
}
|
|
3954
4145
|
};
|
|
4146
|
+
var TEXT_STROKE_LABEL = (0, import_i18n56.__)("Text stroke", "elementor");
|
|
3955
4147
|
var TextStrokeField = () => {
|
|
3956
|
-
const { value, setValue, canEdit } = useStylesField("stroke"
|
|
4148
|
+
const { value, setValue, canEdit } = useStylesField("stroke", {
|
|
4149
|
+
history: { propDisplayName: TEXT_STROKE_LABEL }
|
|
4150
|
+
});
|
|
3957
4151
|
const addTextStroke = () => {
|
|
3958
4152
|
setValue(initTextStroke);
|
|
3959
4153
|
};
|
|
@@ -3961,70 +4155,73 @@ var TextStrokeField = () => {
|
|
|
3961
4155
|
setValue(null);
|
|
3962
4156
|
};
|
|
3963
4157
|
const hasTextStroke = Boolean(value);
|
|
3964
|
-
return /* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React79.createElement(
|
|
3965
4159
|
AddOrRemoveContent,
|
|
3966
4160
|
{
|
|
3967
4161
|
isAdded: hasTextStroke,
|
|
3968
4162
|
onAdd: addTextStroke,
|
|
3969
4163
|
onRemove: removeTextStroke,
|
|
3970
4164
|
disabled: !canEdit,
|
|
3971
|
-
renderLabel: () => /* @__PURE__ */
|
|
4165
|
+
renderLabel: () => /* @__PURE__ */ React79.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
3972
4166
|
},
|
|
3973
|
-
/* @__PURE__ */
|
|
4167
|
+
/* @__PURE__ */ React79.createElement(import_editor_controls48.StrokeControl, null)
|
|
3974
4168
|
));
|
|
3975
4169
|
};
|
|
3976
4170
|
|
|
3977
4171
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3978
|
-
var
|
|
4172
|
+
var React80 = __toESM(require("react"));
|
|
3979
4173
|
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
3980
4174
|
var import_icons23 = require("@elementor/icons");
|
|
3981
|
-
var
|
|
3982
|
-
var
|
|
4175
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
4176
|
+
var TEXT_TRANSFORM_LABEL = (0, import_i18n57.__)("Text transform", "elementor");
|
|
3983
4177
|
var options11 = [
|
|
3984
4178
|
{
|
|
3985
4179
|
value: "none",
|
|
3986
|
-
label: (0,
|
|
3987
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4180
|
+
label: (0, import_i18n57.__)("None", "elementor"),
|
|
4181
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(import_icons23.MinusIcon, { fontSize: size }),
|
|
3988
4182
|
showTooltip: true
|
|
3989
4183
|
},
|
|
3990
4184
|
{
|
|
3991
4185
|
value: "capitalize",
|
|
3992
|
-
label: (0,
|
|
3993
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4186
|
+
label: (0, import_i18n57.__)("Capitalize", "elementor"),
|
|
4187
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(import_icons23.LetterCaseIcon, { fontSize: size }),
|
|
3994
4188
|
showTooltip: true
|
|
3995
4189
|
},
|
|
3996
4190
|
{
|
|
3997
4191
|
value: "uppercase",
|
|
3998
|
-
label: (0,
|
|
3999
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4192
|
+
label: (0, import_i18n57.__)("Uppercase", "elementor"),
|
|
4193
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(import_icons23.LetterCaseUpperIcon, { fontSize: size }),
|
|
4000
4194
|
showTooltip: true
|
|
4001
4195
|
},
|
|
4002
4196
|
{
|
|
4003
4197
|
value: "lowercase",
|
|
4004
|
-
label: (0,
|
|
4005
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4198
|
+
label: (0, import_i18n57.__)("Lowercase", "elementor"),
|
|
4199
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(import_icons23.LetterCaseLowerIcon, { fontSize: size }),
|
|
4006
4200
|
showTooltip: true
|
|
4007
4201
|
}
|
|
4008
4202
|
];
|
|
4009
|
-
var TransformField = () => /* @__PURE__ */
|
|
4203
|
+
var TransformField = () => /* @__PURE__ */ React80.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React80.createElement(import_editor_controls49.ToggleControl, { options: options11 })));
|
|
4010
4204
|
|
|
4011
4205
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4012
|
-
var
|
|
4013
|
-
var
|
|
4206
|
+
var React81 = __toESM(require("react"));
|
|
4207
|
+
var import_react36 = require("react");
|
|
4014
4208
|
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4015
|
-
var
|
|
4016
|
-
var
|
|
4209
|
+
var import_i18n58 = require("@wordpress/i18n");
|
|
4210
|
+
var WORD_SPACING_LABEL = (0, import_i18n58.__)("Word spacing", "elementor");
|
|
4017
4211
|
var WordSpacingField = () => {
|
|
4018
|
-
const rowRef = (0,
|
|
4019
|
-
return /* @__PURE__ */
|
|
4212
|
+
const rowRef = (0, import_react36.useRef)(null);
|
|
4213
|
+
return /* @__PURE__ */ React81.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React81.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React81.createElement(import_editor_controls50.SizeControl, { anchorRef: rowRef })));
|
|
4020
4214
|
};
|
|
4021
4215
|
|
|
4022
4216
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4217
|
+
var COLUMN_COUNT_LABEL2 = (0, import_i18n59.__)("Column count", "elementor");
|
|
4023
4218
|
var TypographySection = () => {
|
|
4024
|
-
const { value: columnCount } = useStylesField("column-count"
|
|
4219
|
+
const { value: columnCount } = useStylesField("column-count", {
|
|
4220
|
+
history: { propDisplayName: COLUMN_COUNT_LABEL2 }
|
|
4221
|
+
});
|
|
4025
4222
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
4026
|
-
const isVersion330Active = (0,
|
|
4027
|
-
return /* @__PURE__ */
|
|
4223
|
+
const isVersion330Active = (0, import_editor_v1_adapters16.isExperimentActive)("e_v_3_30");
|
|
4224
|
+
return /* @__PURE__ */ React82.createElement(SectionContent, null, /* @__PURE__ */ React82.createElement(FontFamilyField, null), /* @__PURE__ */ React82.createElement(FontWeightField, null), /* @__PURE__ */ React82.createElement(FontSizeField, null), /* @__PURE__ */ React82.createElement(PanelDivider, null), /* @__PURE__ */ React82.createElement(TextAlignmentField, null), /* @__PURE__ */ React82.createElement(TextColorField, null), /* @__PURE__ */ React82.createElement(
|
|
4028
4225
|
StyleTabCollapsibleContent,
|
|
4029
4226
|
{
|
|
4030
4227
|
fields: [
|
|
@@ -4039,26 +4236,26 @@ var TypographySection = () => {
|
|
|
4039
4236
|
"stroke"
|
|
4040
4237
|
]
|
|
4041
4238
|
},
|
|
4042
|
-
/* @__PURE__ */
|
|
4239
|
+
/* @__PURE__ */ React82.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React82.createElement(LineHeightField, null), /* @__PURE__ */ React82.createElement(LetterSpacingField, null), /* @__PURE__ */ React82.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React82.createElement(ColumnGapField, null)), /* @__PURE__ */ React82.createElement(PanelDivider, null), /* @__PURE__ */ React82.createElement(TextDecorationField, null), /* @__PURE__ */ React82.createElement(TransformField, null), /* @__PURE__ */ React82.createElement(TextDirectionField, null), /* @__PURE__ */ React82.createElement(FontStyleField, null), /* @__PURE__ */ React82.createElement(TextStrokeField, null))
|
|
4043
4240
|
));
|
|
4044
4241
|
};
|
|
4045
4242
|
|
|
4046
4243
|
// src/components/style-tab-section.tsx
|
|
4047
|
-
var
|
|
4048
|
-
var
|
|
4244
|
+
var React83 = __toESM(require("react"));
|
|
4245
|
+
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
4049
4246
|
var StyleTabSection = ({ section, fields = [] }) => {
|
|
4050
4247
|
const { component, name, title } = section;
|
|
4051
4248
|
const tabDefaults = useDefaultPanelSettings();
|
|
4052
4249
|
const SectionComponent = component;
|
|
4053
|
-
const isExpanded = (0,
|
|
4054
|
-
return /* @__PURE__ */
|
|
4250
|
+
const isExpanded = (0, import_editor_v1_adapters17.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
4251
|
+
return /* @__PURE__ */ React83.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React83.createElement(SectionComponent, null));
|
|
4055
4252
|
};
|
|
4056
4253
|
|
|
4057
4254
|
// src/components/style-tab.tsx
|
|
4058
4255
|
var TABS_HEADER_HEIGHT = "37px";
|
|
4059
4256
|
var stickyHeaderStyles = {
|
|
4060
4257
|
position: "sticky",
|
|
4061
|
-
zIndex:
|
|
4258
|
+
zIndex: 1100,
|
|
4062
4259
|
opacity: 1,
|
|
4063
4260
|
backgroundColor: "background.default",
|
|
4064
4261
|
transition: "top 300ms ease"
|
|
@@ -4066,9 +4263,9 @@ var stickyHeaderStyles = {
|
|
|
4066
4263
|
var StyleTab = () => {
|
|
4067
4264
|
const currentClassesProp = useCurrentClassesProp();
|
|
4068
4265
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
4069
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4266
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react37.useState)(null);
|
|
4070
4267
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4071
|
-
return /* @__PURE__ */
|
|
4268
|
+
return /* @__PURE__ */ React84.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React84.createElement(
|
|
4072
4269
|
StyleProvider,
|
|
4073
4270
|
{
|
|
4074
4271
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4079,13 +4276,13 @@ var StyleTab = () => {
|
|
|
4079
4276
|
},
|
|
4080
4277
|
setMetaState: setActiveStyleState
|
|
4081
4278
|
},
|
|
4082
|
-
/* @__PURE__ */
|
|
4279
|
+
/* @__PURE__ */ React84.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React84.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React84.createElement(ClassesHeader, null, /* @__PURE__ */ React84.createElement(CssClassSelector, null), /* @__PURE__ */ React84.createElement(import_ui43.Divider, null)), /* @__PURE__ */ React84.createElement(SectionsList, null, /* @__PURE__ */ React84.createElement(
|
|
4083
4280
|
StyleTabSection,
|
|
4084
4281
|
{
|
|
4085
4282
|
section: {
|
|
4086
4283
|
component: LayoutSection,
|
|
4087
4284
|
name: "Layout",
|
|
4088
|
-
title: (0,
|
|
4285
|
+
title: (0, import_i18n60.__)("Layout", "elementor")
|
|
4089
4286
|
},
|
|
4090
4287
|
fields: [
|
|
4091
4288
|
"display",
|
|
@@ -4098,23 +4295,23 @@ var StyleTab = () => {
|
|
|
4098
4295
|
"gap"
|
|
4099
4296
|
]
|
|
4100
4297
|
}
|
|
4101
|
-
), /* @__PURE__ */
|
|
4298
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4102
4299
|
StyleTabSection,
|
|
4103
4300
|
{
|
|
4104
4301
|
section: {
|
|
4105
4302
|
component: SpacingSection,
|
|
4106
4303
|
name: "Spacing",
|
|
4107
|
-
title: (0,
|
|
4304
|
+
title: (0, import_i18n60.__)("Spacing", "elementor")
|
|
4108
4305
|
},
|
|
4109
4306
|
fields: ["margin", "padding"]
|
|
4110
4307
|
}
|
|
4111
|
-
), /* @__PURE__ */
|
|
4308
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4112
4309
|
StyleTabSection,
|
|
4113
4310
|
{
|
|
4114
4311
|
section: {
|
|
4115
4312
|
component: SizeSection,
|
|
4116
4313
|
name: "Size",
|
|
4117
|
-
title: (0,
|
|
4314
|
+
title: (0, import_i18n60.__)("Size", "elementor")
|
|
4118
4315
|
},
|
|
4119
4316
|
fields: [
|
|
4120
4317
|
"width",
|
|
@@ -4128,23 +4325,23 @@ var StyleTab = () => {
|
|
|
4128
4325
|
"object-fit"
|
|
4129
4326
|
]
|
|
4130
4327
|
}
|
|
4131
|
-
), /* @__PURE__ */
|
|
4328
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4132
4329
|
StyleTabSection,
|
|
4133
4330
|
{
|
|
4134
4331
|
section: {
|
|
4135
4332
|
component: PositionSection,
|
|
4136
4333
|
name: "Position",
|
|
4137
|
-
title: (0,
|
|
4334
|
+
title: (0, import_i18n60.__)("Position", "elementor")
|
|
4138
4335
|
},
|
|
4139
4336
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4140
4337
|
}
|
|
4141
|
-
), /* @__PURE__ */
|
|
4338
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4142
4339
|
StyleTabSection,
|
|
4143
4340
|
{
|
|
4144
4341
|
section: {
|
|
4145
4342
|
component: TypographySection,
|
|
4146
4343
|
name: "Typography",
|
|
4147
|
-
title: (0,
|
|
4344
|
+
title: (0, import_i18n60.__)("Typography", "elementor")
|
|
4148
4345
|
},
|
|
4149
4346
|
fields: [
|
|
4150
4347
|
"font-family",
|
|
@@ -4163,33 +4360,33 @@ var StyleTab = () => {
|
|
|
4163
4360
|
"stroke"
|
|
4164
4361
|
]
|
|
4165
4362
|
}
|
|
4166
|
-
), /* @__PURE__ */
|
|
4363
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4167
4364
|
StyleTabSection,
|
|
4168
4365
|
{
|
|
4169
4366
|
section: {
|
|
4170
4367
|
component: BackgroundSection,
|
|
4171
4368
|
name: "Background",
|
|
4172
|
-
title: (0,
|
|
4369
|
+
title: (0, import_i18n60.__)("Background", "elementor")
|
|
4173
4370
|
},
|
|
4174
4371
|
fields: ["background"]
|
|
4175
4372
|
}
|
|
4176
|
-
), /* @__PURE__ */
|
|
4373
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4177
4374
|
StyleTabSection,
|
|
4178
4375
|
{
|
|
4179
4376
|
section: {
|
|
4180
4377
|
component: BorderSection,
|
|
4181
4378
|
name: "Border",
|
|
4182
|
-
title: (0,
|
|
4379
|
+
title: (0, import_i18n60.__)("Border", "elementor")
|
|
4183
4380
|
},
|
|
4184
4381
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4185
4382
|
}
|
|
4186
|
-
), /* @__PURE__ */
|
|
4383
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4187
4384
|
StyleTabSection,
|
|
4188
4385
|
{
|
|
4189
4386
|
section: {
|
|
4190
4387
|
component: EffectsSection,
|
|
4191
4388
|
name: "Effects",
|
|
4192
|
-
title: (0,
|
|
4389
|
+
title: (0, import_i18n60.__)("Effects", "elementor")
|
|
4193
4390
|
},
|
|
4194
4391
|
fields: ["box-shadow"]
|
|
4195
4392
|
}
|
|
@@ -4198,12 +4395,12 @@ var StyleTab = () => {
|
|
|
4198
4395
|
};
|
|
4199
4396
|
function ClassesHeader({ children }) {
|
|
4200
4397
|
const scrollDirection = useScrollDirection();
|
|
4201
|
-
return /* @__PURE__ */
|
|
4398
|
+
return /* @__PURE__ */ React84.createElement(import_ui43.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4202
4399
|
}
|
|
4203
4400
|
function useCurrentClassesProp() {
|
|
4204
4401
|
const { elementType } = useElement();
|
|
4205
4402
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
4206
|
-
([, propType]) => propType.kind === "plain" && propType.key ===
|
|
4403
|
+
([, propType]) => propType.kind === "plain" && propType.key === import_editor_props11.CLASSES_PROP_KEY
|
|
4207
4404
|
);
|
|
4208
4405
|
if (!prop) {
|
|
4209
4406
|
throw new Error("Element does not have a classes prop");
|
|
@@ -4217,16 +4414,16 @@ var EditingPanelTabs = () => {
|
|
|
4217
4414
|
return (
|
|
4218
4415
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4219
4416
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4220
|
-
/* @__PURE__ */
|
|
4417
|
+
/* @__PURE__ */ React85.createElement(import_react38.Fragment, { key: element.id }, /* @__PURE__ */ React85.createElement(PanelTabContent, null))
|
|
4221
4418
|
);
|
|
4222
4419
|
};
|
|
4223
4420
|
var PanelTabContent = () => {
|
|
4224
4421
|
const editorDefaults = useDefaultPanelSettings();
|
|
4225
|
-
const defaultComponentTab = (0,
|
|
4422
|
+
const defaultComponentTab = (0, import_editor_v1_adapters18.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
4226
4423
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4227
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
4228
|
-
return /* @__PURE__ */
|
|
4229
|
-
|
|
4424
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui44.useTabs)(currentTab);
|
|
4425
|
+
return /* @__PURE__ */ React85.createElement(ScrollProvider, null, /* @__PURE__ */ React85.createElement(import_ui44.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React85.createElement(import_ui44.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React85.createElement(
|
|
4426
|
+
import_ui44.Tabs,
|
|
4230
4427
|
{
|
|
4231
4428
|
variant: "fullWidth",
|
|
4232
4429
|
size: "small",
|
|
@@ -4237,9 +4434,9 @@ var PanelTabContent = () => {
|
|
|
4237
4434
|
setCurrentTab(newValue);
|
|
4238
4435
|
}
|
|
4239
4436
|
},
|
|
4240
|
-
/* @__PURE__ */
|
|
4241
|
-
/* @__PURE__ */
|
|
4242
|
-
), /* @__PURE__ */
|
|
4437
|
+
/* @__PURE__ */ React85.createElement(import_ui44.Tab, { label: (0, import_i18n61.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4438
|
+
/* @__PURE__ */ React85.createElement(import_ui44.Tab, { label: (0, import_i18n61.__)("Style", "elementor"), ...getTabProps("style") })
|
|
4439
|
+
), /* @__PURE__ */ React85.createElement(import_ui44.Divider, null)), /* @__PURE__ */ React85.createElement(import_ui44.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React85.createElement(SettingsTab, null)), /* @__PURE__ */ React85.createElement(import_ui44.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React85.createElement(StyleTab, null))));
|
|
4243
4440
|
};
|
|
4244
4441
|
|
|
4245
4442
|
// src/components/editing-panel.tsx
|
|
@@ -4251,8 +4448,8 @@ var EditingPanel = () => {
|
|
|
4251
4448
|
if (!element || !elementType) {
|
|
4252
4449
|
return null;
|
|
4253
4450
|
}
|
|
4254
|
-
const panelTitle = (0,
|
|
4255
|
-
return /* @__PURE__ */
|
|
4451
|
+
const panelTitle = (0, import_i18n62.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4452
|
+
return /* @__PURE__ */ React86.createElement(import_ui45.ErrorBoundary, { fallback: /* @__PURE__ */ React86.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React86.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React86.createElement(import_editor_ui5.ThemeProvider, null, /* @__PURE__ */ React86.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React86.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React86.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React86.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React86.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React86.createElement(import_editor_controls51.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React86.createElement(import_editor_controls51.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React86.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React86.createElement(EditingPanelTabs, null)))))))));
|
|
4256
4453
|
};
|
|
4257
4454
|
|
|
4258
4455
|
// src/panel.ts
|
|
@@ -4261,15 +4458,22 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
4261
4458
|
component: EditingPanel
|
|
4262
4459
|
});
|
|
4263
4460
|
|
|
4461
|
+
// src/components/popover-scrollable-content.tsx
|
|
4462
|
+
var React87 = __toESM(require("react"));
|
|
4463
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4464
|
+
var PopoverScrollableContent = (props) => {
|
|
4465
|
+
const sectionWidth = useSectionWidth();
|
|
4466
|
+
return /* @__PURE__ */ React87.createElement(import_editor_ui6.PopoverScrollableContent, { ...props, width: sectionWidth });
|
|
4467
|
+
};
|
|
4468
|
+
|
|
4264
4469
|
// src/init.ts
|
|
4265
4470
|
var import_editor = require("@elementor/editor");
|
|
4266
|
-
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
4267
4471
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
4268
|
-
var
|
|
4472
|
+
var import_editor_v1_adapters20 = require("@elementor/editor-v1-adapters");
|
|
4269
4473
|
|
|
4270
4474
|
// src/hooks/use-open-editor-panel.ts
|
|
4271
|
-
var
|
|
4272
|
-
var
|
|
4475
|
+
var import_react39 = require("react");
|
|
4476
|
+
var import_editor_v1_adapters19 = require("@elementor/editor-v1-adapters");
|
|
4273
4477
|
|
|
4274
4478
|
// src/sync/is-atomic-widget-selected.ts
|
|
4275
4479
|
var import_editor_elements9 = require("@elementor/editor-elements");
|
|
@@ -4285,8 +4489,8 @@ var isAtomicWidgetSelected = () => {
|
|
|
4285
4489
|
// src/hooks/use-open-editor-panel.ts
|
|
4286
4490
|
var useOpenEditorPanel = () => {
|
|
4287
4491
|
const { open } = usePanelActions();
|
|
4288
|
-
(0,
|
|
4289
|
-
return (0,
|
|
4492
|
+
(0, import_react39.useEffect)(() => {
|
|
4493
|
+
return (0, import_editor_v1_adapters19.__privateListenTo)((0, import_editor_v1_adapters19.commandStartEvent)("panel/editor/open"), () => {
|
|
4290
4494
|
if (isAtomicWidgetSelected()) {
|
|
4291
4495
|
open();
|
|
4292
4496
|
}
|
|
@@ -4305,16 +4509,16 @@ var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
|
4305
4509
|
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4306
4510
|
|
|
4307
4511
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4308
|
-
var
|
|
4512
|
+
var React88 = __toESM(require("react"));
|
|
4309
4513
|
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4310
|
-
var
|
|
4514
|
+
var import_editor_props13 = require("@elementor/editor-props");
|
|
4311
4515
|
var import_icons25 = require("@elementor/icons");
|
|
4312
4516
|
|
|
4313
4517
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4314
|
-
var
|
|
4518
|
+
var import_react41 = require("react");
|
|
4315
4519
|
|
|
4316
4520
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4317
|
-
var
|
|
4521
|
+
var import_react40 = require("react");
|
|
4318
4522
|
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4319
4523
|
|
|
4320
4524
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -4336,7 +4540,7 @@ var getAtomicDynamicTags = () => {
|
|
|
4336
4540
|
};
|
|
4337
4541
|
|
|
4338
4542
|
// src/dynamics/utils.ts
|
|
4339
|
-
var
|
|
4543
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
4340
4544
|
var import_schema = require("@elementor/schema");
|
|
4341
4545
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
4342
4546
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
@@ -4345,12 +4549,12 @@ var getDynamicPropType = (propType) => {
|
|
|
4345
4549
|
return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
|
|
4346
4550
|
};
|
|
4347
4551
|
var isDynamicPropValue = (prop) => {
|
|
4348
|
-
return (0,
|
|
4552
|
+
return (0, import_editor_props12.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
|
|
4349
4553
|
};
|
|
4350
4554
|
var supportsDynamic = (propType) => {
|
|
4351
4555
|
return !!getDynamicPropType(propType);
|
|
4352
4556
|
};
|
|
4353
|
-
var dynamicPropTypeUtil = (0,
|
|
4557
|
+
var dynamicPropTypeUtil = (0, import_editor_props12.createPropUtils)(
|
|
4354
4558
|
DYNAMIC_PROP_TYPE_KEY,
|
|
4355
4559
|
import_schema.z.strictObject({
|
|
4356
4560
|
name: import_schema.z.string(),
|
|
@@ -4366,7 +4570,7 @@ var usePropDynamicTags = () => {
|
|
|
4366
4570
|
const propDynamicType = getDynamicPropType(propType);
|
|
4367
4571
|
categories = propDynamicType?.settings.categories || [];
|
|
4368
4572
|
}
|
|
4369
|
-
return (0,
|
|
4573
|
+
return (0, import_react40.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
4370
4574
|
};
|
|
4371
4575
|
var getDynamicTagsByCategories = (categories) => {
|
|
4372
4576
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -4382,38 +4586,33 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
4382
4586
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4383
4587
|
var useDynamicTag = (tagName) => {
|
|
4384
4588
|
const dynamicTags = usePropDynamicTags();
|
|
4385
|
-
return (0,
|
|
4589
|
+
return (0, import_react41.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
4386
4590
|
};
|
|
4387
4591
|
|
|
4388
4592
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4389
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
4593
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React88.createElement(import_icons25.DatabaseIcon, { fontSize: "tiny" });
|
|
4390
4594
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4391
|
-
const context = (0, import_editor_controls53.useBoundProp)(
|
|
4392
|
-
return /* @__PURE__ */
|
|
4595
|
+
const context = (0, import_editor_controls53.useBoundProp)(import_editor_props13.backgroundImageOverlayPropTypeUtil);
|
|
4596
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls53.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React88.createElement(import_editor_controls53.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React88.createElement(Wrapper, { rawValue: value.value })));
|
|
4393
4597
|
};
|
|
4394
4598
|
var Wrapper = ({ rawValue }) => {
|
|
4395
4599
|
const { propType } = (0, import_editor_controls53.useBoundProp)();
|
|
4396
4600
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4397
|
-
return /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls53.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React88.createElement(import_editor_controls53.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React88.createElement(Content, { rawValue: rawValue.image })));
|
|
4398
4602
|
};
|
|
4399
4603
|
var Content = ({ rawValue }) => {
|
|
4400
4604
|
const src = rawValue.value.src;
|
|
4401
4605
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4402
|
-
return /* @__PURE__ */
|
|
4606
|
+
return /* @__PURE__ */ React88.createElement(React88.Fragment, null, dynamicTag?.label);
|
|
4403
4607
|
};
|
|
4404
4608
|
|
|
4405
4609
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4406
|
-
var
|
|
4610
|
+
var React91 = __toESM(require("react"));
|
|
4407
4611
|
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4408
|
-
var
|
|
4612
|
+
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
4409
4613
|
var import_icons27 = require("@elementor/icons");
|
|
4410
|
-
var
|
|
4411
|
-
var
|
|
4412
|
-
|
|
4413
|
-
// src/components/popover-content.tsx
|
|
4414
|
-
var React87 = __toESM(require("react"));
|
|
4415
|
-
var import_ui70 = require("@elementor/ui");
|
|
4416
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React87.createElement(import_ui70.Stack, { alignItems, gap, p }, children);
|
|
4614
|
+
var import_ui47 = require("@elementor/ui");
|
|
4615
|
+
var import_i18n64 = require("@wordpress/i18n");
|
|
4417
4616
|
|
|
4418
4617
|
// src/hooks/use-persist-dynamic-value.ts
|
|
4419
4618
|
var import_session6 = require("@elementor/session");
|
|
@@ -4424,7 +4623,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
4424
4623
|
};
|
|
4425
4624
|
|
|
4426
4625
|
// src/dynamics/dynamic-control.tsx
|
|
4427
|
-
var
|
|
4626
|
+
var React89 = __toESM(require("react"));
|
|
4428
4627
|
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4429
4628
|
var DynamicControl = ({ bind, children }) => {
|
|
4430
4629
|
const { value, setValue } = (0, import_editor_controls54.useBoundProp)(dynamicPropTypeUtil);
|
|
@@ -4446,22 +4645,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4446
4645
|
});
|
|
4447
4646
|
};
|
|
4448
4647
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4449
|
-
return /* @__PURE__ */
|
|
4648
|
+
return /* @__PURE__ */ React89.createElement(import_editor_controls54.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React89.createElement(import_editor_controls54.PropKeyProvider, { bind }, children));
|
|
4450
4649
|
};
|
|
4451
4650
|
|
|
4452
4651
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4453
|
-
var
|
|
4454
|
-
var
|
|
4652
|
+
var import_react42 = require("react");
|
|
4653
|
+
var React90 = __toESM(require("react"));
|
|
4455
4654
|
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
4456
|
-
var
|
|
4655
|
+
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4457
4656
|
var import_icons26 = require("@elementor/icons");
|
|
4458
|
-
var
|
|
4459
|
-
var
|
|
4460
|
-
var
|
|
4657
|
+
var import_ui46 = require("@elementor/ui");
|
|
4658
|
+
var import_i18n63 = require("@wordpress/i18n");
|
|
4659
|
+
var SIZE6 = "tiny";
|
|
4461
4660
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
4462
|
-
const [searchValue, setSearchValue] = (0,
|
|
4661
|
+
const [searchValue, setSearchValue] = (0, import_react42.useState)("");
|
|
4463
4662
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
4464
|
-
const theme = (0,
|
|
4663
|
+
const theme = (0, import_ui46.useTheme)();
|
|
4465
4664
|
const { value: anyValue } = (0, import_editor_controls55.useBoundProp)();
|
|
4466
4665
|
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
|
|
4467
4666
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
@@ -4491,34 +4690,34 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
4491
4690
|
label: item.label
|
|
4492
4691
|
}))
|
|
4493
4692
|
]);
|
|
4494
|
-
return /* @__PURE__ */
|
|
4495
|
-
|
|
4693
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(
|
|
4694
|
+
import_editor_ui7.PopoverHeader,
|
|
4496
4695
|
{
|
|
4497
|
-
title: (0,
|
|
4696
|
+
title: (0, import_i18n63.__)("Dynamic tags", "elementor"),
|
|
4498
4697
|
onClose: closePopover,
|
|
4499
|
-
icon: /* @__PURE__ */
|
|
4698
|
+
icon: /* @__PURE__ */ React90.createElement(import_icons26.DatabaseIcon, { fontSize: SIZE6 })
|
|
4500
4699
|
}
|
|
4501
|
-
), /* @__PURE__ */
|
|
4502
|
-
|
|
4700
|
+
), /* @__PURE__ */ React90.createElement(import_ui46.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React90.createElement(NoDynamicTags, null) : /* @__PURE__ */ React90.createElement(import_react42.Fragment, null, /* @__PURE__ */ React90.createElement(
|
|
4701
|
+
import_editor_ui7.PopoverSearch,
|
|
4503
4702
|
{
|
|
4504
4703
|
value: searchValue,
|
|
4505
4704
|
onSearch: handleSearch,
|
|
4506
|
-
placeholder: (0,
|
|
4705
|
+
placeholder: (0, import_i18n63.__)("Search dynamic tags\u2026", "elementor")
|
|
4507
4706
|
}
|
|
4508
|
-
), /* @__PURE__ */
|
|
4509
|
-
|
|
4707
|
+
), /* @__PURE__ */ React90.createElement(import_ui46.Divider, null), /* @__PURE__ */ React90.createElement(PopoverScrollableContent, null, /* @__PURE__ */ React90.createElement(
|
|
4708
|
+
import_editor_ui7.PopoverMenuList,
|
|
4510
4709
|
{
|
|
4511
4710
|
items: virtualizedItems,
|
|
4512
4711
|
onSelect: handleSetDynamicTag,
|
|
4513
4712
|
onClose: closePopover,
|
|
4514
4713
|
selectedValue: dynamicValue?.name,
|
|
4515
4714
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
4516
|
-
noResultsComponent: /* @__PURE__ */
|
|
4715
|
+
noResultsComponent: /* @__PURE__ */ React90.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
4517
4716
|
}
|
|
4518
|
-
))));
|
|
4717
|
+
)))));
|
|
4519
4718
|
};
|
|
4520
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4521
|
-
|
|
4719
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React90.createElement(
|
|
4720
|
+
import_ui46.Stack,
|
|
4522
4721
|
{
|
|
4523
4722
|
gap: 1,
|
|
4524
4723
|
alignItems: "center",
|
|
@@ -4528,12 +4727,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React89.createElem
|
|
|
4528
4727
|
color: "text.secondary",
|
|
4529
4728
|
sx: { pb: 3.5 }
|
|
4530
4729
|
},
|
|
4531
|
-
/* @__PURE__ */
|
|
4532
|
-
/* @__PURE__ */
|
|
4533
|
-
/* @__PURE__ */
|
|
4730
|
+
/* @__PURE__ */ React90.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4731
|
+
/* @__PURE__ */ React90.createElement(import_ui46.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n63.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React90.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4732
|
+
/* @__PURE__ */ React90.createElement(import_ui46.Typography, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, (0, import_i18n63.__)("Try something else.", "elementor"), /* @__PURE__ */ React90.createElement(import_ui46.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n63.__)("Clear & try again", "elementor")))
|
|
4534
4733
|
);
|
|
4535
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4536
|
-
|
|
4734
|
+
var NoDynamicTags = () => /* @__PURE__ */ React90.createElement(import_ui46.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React90.createElement(import_ui46.Divider, null), /* @__PURE__ */ React90.createElement(
|
|
4735
|
+
import_ui46.Stack,
|
|
4537
4736
|
{
|
|
4538
4737
|
gap: 1,
|
|
4539
4738
|
alignItems: "center",
|
|
@@ -4543,9 +4742,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React89.createElement(import_ui71.Box,
|
|
|
4543
4742
|
color: "text.secondary",
|
|
4544
4743
|
sx: { pb: 3.5 }
|
|
4545
4744
|
},
|
|
4546
|
-
/* @__PURE__ */
|
|
4547
|
-
/* @__PURE__ */
|
|
4548
|
-
/* @__PURE__ */
|
|
4745
|
+
/* @__PURE__ */ React90.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4746
|
+
/* @__PURE__ */ React90.createElement(import_ui46.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n63.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
4747
|
+
/* @__PURE__ */ React90.createElement(import_ui46.Typography, { align: "center", variant: "caption" }, (0, import_i18n63.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
4549
4748
|
));
|
|
4550
4749
|
var useFilteredOptions = (searchValue) => {
|
|
4551
4750
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4564,12 +4763,12 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4564
4763
|
};
|
|
4565
4764
|
|
|
4566
4765
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4567
|
-
var
|
|
4766
|
+
var SIZE7 = "tiny";
|
|
4568
4767
|
var DynamicSelectionControl = () => {
|
|
4569
4768
|
const { setValue: setAnyValue } = (0, import_editor_controls56.useBoundProp)();
|
|
4570
4769
|
const { bind, value } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
|
|
4571
4770
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
4572
|
-
const selectionPopoverState = (0,
|
|
4771
|
+
const selectionPopoverState = (0, import_ui47.usePopupState)({ variant: "popover" });
|
|
4573
4772
|
const { name: tagName = "" } = value;
|
|
4574
4773
|
const dynamicTag = useDynamicTag(tagName);
|
|
4575
4774
|
const removeDynamicTag = () => {
|
|
@@ -4578,70 +4777,77 @@ var DynamicSelectionControl = () => {
|
|
|
4578
4777
|
if (!dynamicTag) {
|
|
4579
4778
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4580
4779
|
}
|
|
4581
|
-
return /* @__PURE__ */
|
|
4582
|
-
|
|
4780
|
+
return /* @__PURE__ */ React91.createElement(import_ui47.Box, null, /* @__PURE__ */ React91.createElement(
|
|
4781
|
+
import_ui47.UnstableTag,
|
|
4583
4782
|
{
|
|
4584
4783
|
fullWidth: true,
|
|
4585
4784
|
showActionsOnHover: true,
|
|
4586
4785
|
label: dynamicTag.label,
|
|
4587
|
-
startIcon: /* @__PURE__ */
|
|
4588
|
-
...(0,
|
|
4589
|
-
actions: /* @__PURE__ */
|
|
4590
|
-
|
|
4786
|
+
startIcon: /* @__PURE__ */ React91.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE7 }),
|
|
4787
|
+
...(0, import_ui47.bindTrigger)(selectionPopoverState),
|
|
4788
|
+
actions: /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React91.createElement(
|
|
4789
|
+
import_ui47.IconButton,
|
|
4591
4790
|
{
|
|
4592
|
-
size:
|
|
4791
|
+
size: SIZE7,
|
|
4593
4792
|
onClick: removeDynamicTag,
|
|
4594
|
-
"aria-label": (0,
|
|
4793
|
+
"aria-label": (0, import_i18n64.__)("Remove dynamic value", "elementor")
|
|
4595
4794
|
},
|
|
4596
|
-
/* @__PURE__ */
|
|
4795
|
+
/* @__PURE__ */ React91.createElement(import_icons27.XIcon, { fontSize: SIZE7 })
|
|
4597
4796
|
))
|
|
4598
4797
|
}
|
|
4599
|
-
), /* @__PURE__ */
|
|
4600
|
-
|
|
4798
|
+
), /* @__PURE__ */ React91.createElement(
|
|
4799
|
+
import_ui47.Popover,
|
|
4601
4800
|
{
|
|
4602
4801
|
disablePortal: true,
|
|
4603
4802
|
disableScrollLock: true,
|
|
4604
|
-
anchorOrigin: { vertical: "bottom", horizontal: "
|
|
4605
|
-
|
|
4803
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
4804
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
4805
|
+
PaperProps: {
|
|
4806
|
+
sx: { my: 1 }
|
|
4807
|
+
},
|
|
4808
|
+
...(0, import_ui47.bindPopover)(selectionPopoverState)
|
|
4606
4809
|
},
|
|
4607
|
-
/* @__PURE__ */
|
|
4810
|
+
/* @__PURE__ */ React91.createElement(import_ui47.Stack, null, /* @__PURE__ */ React91.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
4608
4811
|
));
|
|
4609
4812
|
};
|
|
4610
4813
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
4611
|
-
const popupState = (0,
|
|
4814
|
+
const popupState = (0, import_ui47.usePopupState)({ variant: "popover" });
|
|
4612
4815
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
4613
4816
|
if (!hasDynamicSettings) {
|
|
4614
4817
|
return null;
|
|
4615
4818
|
}
|
|
4616
|
-
return /* @__PURE__ */
|
|
4617
|
-
|
|
4819
|
+
return /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(import_ui47.IconButton, { size: SIZE7, ...(0, import_ui47.bindTrigger)(popupState), "aria-label": (0, import_i18n64.__)("Settings", "elementor") }, /* @__PURE__ */ React91.createElement(import_icons27.SettingsIcon, { fontSize: SIZE7 })), /* @__PURE__ */ React91.createElement(
|
|
4820
|
+
import_ui47.Popover,
|
|
4618
4821
|
{
|
|
4619
4822
|
disablePortal: true,
|
|
4620
4823
|
disableScrollLock: true,
|
|
4621
4824
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4622
|
-
|
|
4825
|
+
PaperProps: {
|
|
4826
|
+
sx: { my: 0.5 }
|
|
4827
|
+
},
|
|
4828
|
+
...(0, import_ui47.bindPopover)(popupState)
|
|
4623
4829
|
},
|
|
4624
|
-
/* @__PURE__ */
|
|
4625
|
-
|
|
4830
|
+
/* @__PURE__ */ React91.createElement(
|
|
4831
|
+
import_editor_ui8.PopoverHeader,
|
|
4626
4832
|
{
|
|
4627
4833
|
title: dynamicTag.label,
|
|
4628
4834
|
onClose: popupState.close,
|
|
4629
|
-
icon: /* @__PURE__ */
|
|
4835
|
+
icon: /* @__PURE__ */ React91.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE7 })
|
|
4630
4836
|
}
|
|
4631
4837
|
),
|
|
4632
|
-
/* @__PURE__ */
|
|
4838
|
+
/* @__PURE__ */ React91.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls })
|
|
4633
4839
|
));
|
|
4634
4840
|
};
|
|
4635
4841
|
var DynamicSettings = ({ controls }) => {
|
|
4636
4842
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
4637
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4843
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui47.useTabs)(0);
|
|
4638
4844
|
if (!tabs.length) {
|
|
4639
4845
|
return null;
|
|
4640
4846
|
}
|
|
4641
|
-
return /* @__PURE__ */
|
|
4642
|
-
return /* @__PURE__ */
|
|
4847
|
+
return /* @__PURE__ */ React91.createElement(import_editor_ui8.PopoverScrollableContent, null, /* @__PURE__ */ React91.createElement(import_ui47.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React91.createElement(import_ui47.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React91.createElement(import_ui47.Divider, null), tabs.map(({ value }, index) => {
|
|
4848
|
+
return /* @__PURE__ */ React91.createElement(import_ui47.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React91.createElement(import_ui47.Stack, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4643
4849
|
if (item.type === "control") {
|
|
4644
|
-
return /* @__PURE__ */
|
|
4850
|
+
return /* @__PURE__ */ React91.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4645
4851
|
}
|
|
4646
4852
|
return null;
|
|
4647
4853
|
})));
|
|
@@ -4651,12 +4857,12 @@ var Control3 = ({ control }) => {
|
|
|
4651
4857
|
if (!getControl(control.type)) {
|
|
4652
4858
|
return null;
|
|
4653
4859
|
}
|
|
4654
|
-
return /* @__PURE__ */
|
|
4860
|
+
return /* @__PURE__ */ React91.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React91.createElement(import_ui47.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React91.createElement(import_ui47.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(import_editor_controls56.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React91.createElement(import_ui47.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(Control, { type: control.type, props: control.props }))));
|
|
4655
4861
|
};
|
|
4656
4862
|
|
|
4657
4863
|
// src/dynamics/dynamic-transformer.ts
|
|
4658
4864
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
4659
|
-
var
|
|
4865
|
+
var import_editor_props14 = require("@elementor/editor-props");
|
|
4660
4866
|
|
|
4661
4867
|
// src/dynamics/errors.ts
|
|
4662
4868
|
var import_utils9 = require("@elementor/utils");
|
|
@@ -4674,7 +4880,7 @@ var dynamicTransformer = (0, import_editor_canvas3.createTransformer)((value) =>
|
|
|
4674
4880
|
});
|
|
4675
4881
|
function simpleTransform(props) {
|
|
4676
4882
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
4677
|
-
const value = (0,
|
|
4883
|
+
const value = (0, import_editor_props14.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
4678
4884
|
return [settingKey, value];
|
|
4679
4885
|
});
|
|
4680
4886
|
return Object.fromEntries(transformed);
|
|
@@ -4704,18 +4910,18 @@ function getDynamicValue(name, settings) {
|
|
|
4704
4910
|
}
|
|
4705
4911
|
|
|
4706
4912
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4707
|
-
var
|
|
4913
|
+
var React92 = __toESM(require("react"));
|
|
4708
4914
|
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
4709
4915
|
var import_icons28 = require("@elementor/icons");
|
|
4710
|
-
var
|
|
4916
|
+
var import_i18n65 = require("@wordpress/i18n");
|
|
4711
4917
|
var usePropDynamicAction = () => {
|
|
4712
4918
|
const { propType } = (0, import_editor_controls57.useBoundProp)();
|
|
4713
4919
|
const visible = !!propType && supportsDynamic(propType);
|
|
4714
4920
|
return {
|
|
4715
4921
|
visible,
|
|
4716
4922
|
icon: import_icons28.DatabaseIcon,
|
|
4717
|
-
title: (0,
|
|
4718
|
-
content: ({ close }) => /* @__PURE__ */
|
|
4923
|
+
title: (0, import_i18n65.__)("Dynamic tags", "elementor"),
|
|
4924
|
+
content: ({ close }) => /* @__PURE__ */ React92.createElement(DynamicSelection, { close })
|
|
4719
4925
|
};
|
|
4720
4926
|
};
|
|
4721
4927
|
|
|
@@ -4747,7 +4953,7 @@ var init = () => {
|
|
|
4747
4953
|
// src/reset-style-props.tsx
|
|
4748
4954
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
4749
4955
|
var import_icons29 = require("@elementor/icons");
|
|
4750
|
-
var
|
|
4956
|
+
var import_i18n66 = require("@wordpress/i18n");
|
|
4751
4957
|
var { registerAction } = controlActionsMenu;
|
|
4752
4958
|
function initResetStyleProps() {
|
|
4753
4959
|
registerAction({
|
|
@@ -4761,7 +4967,7 @@ function useResetStyleValueProps() {
|
|
|
4761
4967
|
const { value, setValue, path, bind } = (0, import_editor_controls59.useBoundProp)();
|
|
4762
4968
|
return {
|
|
4763
4969
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4764
|
-
title: (0,
|
|
4970
|
+
title: (0, import_i18n66.__)("Clear", "elementor"),
|
|
4765
4971
|
icon: import_icons29.BrushBigIcon,
|
|
4766
4972
|
onClick: () => setValue(null)
|
|
4767
4973
|
};
|
|
@@ -4771,36 +4977,36 @@ function useResetStyleValueProps() {
|
|
|
4771
4977
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
4772
4978
|
|
|
4773
4979
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4774
|
-
var
|
|
4980
|
+
var React93 = __toESM(require("react"));
|
|
4775
4981
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
4776
|
-
var
|
|
4777
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */
|
|
4982
|
+
var import_ui48 = require("@elementor/ui");
|
|
4983
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React93.createElement(import_ui48.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconColor, { value }), /* @__PURE__ */ React93.createElement(ItemLabelColor, { value })));
|
|
4778
4984
|
var ItemIconColor = ({ value }) => {
|
|
4779
4985
|
const { color } = value;
|
|
4780
|
-
return /* @__PURE__ */
|
|
4986
|
+
return /* @__PURE__ */ React93.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4781
4987
|
};
|
|
4782
4988
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4783
|
-
return /* @__PURE__ */
|
|
4989
|
+
return /* @__PURE__ */ React93.createElement("span", null, color);
|
|
4784
4990
|
};
|
|
4785
|
-
var StyledUnstableColorIndicator = (0,
|
|
4991
|
+
var StyledUnstableColorIndicator = (0, import_ui48.styled)(import_ui48.UnstableColorIndicator)(({ theme }) => ({
|
|
4786
4992
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4787
4993
|
}));
|
|
4788
4994
|
|
|
4789
4995
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4790
|
-
var
|
|
4996
|
+
var React94 = __toESM(require("react"));
|
|
4791
4997
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
4792
|
-
var
|
|
4793
|
-
var
|
|
4794
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */
|
|
4998
|
+
var import_ui49 = require("@elementor/ui");
|
|
4999
|
+
var import_i18n67 = require("@wordpress/i18n");
|
|
5000
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React94.createElement(import_ui49.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React94.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React94.createElement(ItemLabelGradient, { value })));
|
|
4795
5001
|
var ItemIconGradient = ({ value }) => {
|
|
4796
5002
|
const gradient = getGradientValue(value);
|
|
4797
|
-
return /* @__PURE__ */
|
|
5003
|
+
return /* @__PURE__ */ React94.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4798
5004
|
};
|
|
4799
5005
|
var ItemLabelGradient = ({ value }) => {
|
|
4800
5006
|
if (value.type === "linear") {
|
|
4801
|
-
return /* @__PURE__ */
|
|
5007
|
+
return /* @__PURE__ */ React94.createElement("span", null, (0, import_i18n67.__)("Linear Gradient", "elementor"));
|
|
4802
5008
|
}
|
|
4803
|
-
return /* @__PURE__ */
|
|
5009
|
+
return /* @__PURE__ */ React94.createElement("span", null, (0, import_i18n67.__)("Radial Gradient", "elementor"));
|
|
4804
5010
|
};
|
|
4805
5011
|
var getGradientValue = (gradient) => {
|
|
4806
5012
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4811,16 +5017,16 @@ var getGradientValue = (gradient) => {
|
|
|
4811
5017
|
};
|
|
4812
5018
|
|
|
4813
5019
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4814
|
-
var
|
|
5020
|
+
var React95 = __toESM(require("react"));
|
|
4815
5021
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
4816
|
-
var
|
|
4817
|
-
var
|
|
5022
|
+
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5023
|
+
var import_ui50 = require("@elementor/ui");
|
|
4818
5024
|
var import_wp_media = require("@elementor/wp-media");
|
|
4819
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
5025
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React95.createElement(import_ui50.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React95.createElement(ItemIconImage, { value }), /* @__PURE__ */ React95.createElement(ItemLabelImage, { value })));
|
|
4820
5026
|
var ItemIconImage = ({ value }) => {
|
|
4821
5027
|
const { imageUrl } = useImage(value);
|
|
4822
|
-
return /* @__PURE__ */
|
|
4823
|
-
|
|
5028
|
+
return /* @__PURE__ */ React95.createElement(
|
|
5029
|
+
import_ui50.CardMedia,
|
|
4824
5030
|
{
|
|
4825
5031
|
image: imageUrl,
|
|
4826
5032
|
sx: (theme) => ({
|
|
@@ -4834,7 +5040,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4834
5040
|
};
|
|
4835
5041
|
var ItemLabelImage = ({ value }) => {
|
|
4836
5042
|
const { imageTitle } = useImage(value);
|
|
4837
|
-
return /* @__PURE__ */
|
|
5043
|
+
return /* @__PURE__ */ React95.createElement(import_editor_ui9.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React95.createElement("span", null, imageTitle));
|
|
4838
5044
|
};
|
|
4839
5045
|
var useImage = (image) => {
|
|
4840
5046
|
let imageTitle, imageUrl = null;
|
|
@@ -4859,14 +5065,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4859
5065
|
};
|
|
4860
5066
|
|
|
4861
5067
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4862
|
-
var
|
|
5068
|
+
var React96 = __toESM(require("react"));
|
|
4863
5069
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
4864
|
-
var
|
|
5070
|
+
var import_ui51 = require("@elementor/ui");
|
|
4865
5071
|
var backgroundOverlayTransformer = (0, import_editor_canvas8.createTransformer)((values) => {
|
|
4866
5072
|
if (!values || values.length === 0) {
|
|
4867
5073
|
return null;
|
|
4868
5074
|
}
|
|
4869
|
-
return /* @__PURE__ */
|
|
5075
|
+
return /* @__PURE__ */ React96.createElement(import_ui51.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React96.createElement(import_ui51.Stack, { key: index }, item)));
|
|
4870
5076
|
});
|
|
4871
5077
|
|
|
4872
5078
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -4910,24 +5116,22 @@ function init3() {
|
|
|
4910
5116
|
id: "editing-panel-hooks",
|
|
4911
5117
|
component: EditingPanelHooks
|
|
4912
5118
|
});
|
|
4913
|
-
(0, import_editor.injectIntoLogic)({
|
|
4914
|
-
id: "current-user-data",
|
|
4915
|
-
component: import_editor_current_user.PrefetchUserData
|
|
4916
|
-
});
|
|
4917
5119
|
init();
|
|
4918
5120
|
init2();
|
|
4919
|
-
if ((0,
|
|
5121
|
+
if ((0, import_editor_v1_adapters20.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30)) {
|
|
4920
5122
|
initResetStyleProps();
|
|
4921
5123
|
}
|
|
4922
5124
|
}
|
|
4923
5125
|
var blockV1Panel = () => {
|
|
4924
|
-
(0,
|
|
5126
|
+
(0, import_editor_v1_adapters20.blockCommand)({
|
|
4925
5127
|
command: "panel/editor/open",
|
|
4926
5128
|
condition: isAtomicWidgetSelected
|
|
4927
5129
|
});
|
|
4928
5130
|
};
|
|
4929
5131
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4930
5132
|
0 && (module.exports = {
|
|
5133
|
+
EXPERIMENTAL_FEATURES,
|
|
5134
|
+
PopoverScrollableContent,
|
|
4931
5135
|
controlActionsMenu,
|
|
4932
5136
|
init,
|
|
4933
5137
|
injectIntoClassSelectorActions,
|
|
@@ -4936,6 +5140,7 @@ var blockV1Panel = () => {
|
|
|
4936
5140
|
useBoundProp,
|
|
4937
5141
|
useFontFamilies,
|
|
4938
5142
|
usePanelActions,
|
|
4939
|
-
usePanelStatus
|
|
5143
|
+
usePanelStatus,
|
|
5144
|
+
useSectionWidth
|
|
4940
5145
|
});
|
|
4941
5146
|
//# sourceMappingURL=index.js.map
|