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