@elementor/editor-editing-panel 1.43.1 → 1.45.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 +41 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1247 -977
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1025 -755
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/action.tsx +1 -1
- package/src/components/add-or-remove-content.tsx +3 -4
- package/src/components/collapsible-content.tsx +42 -14
- package/src/components/control-label.tsx +1 -1
- package/src/components/section.tsx +21 -7
- package/src/components/style-sections/border-section/border-field.tsx +2 -1
- package/src/components/style-sections/border-section/border-radius-field.tsx +12 -9
- package/src/components/style-sections/layout-section/align-content-field.tsx +10 -14
- package/src/components/style-sections/layout-section/align-items-field.tsx +13 -17
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +13 -17
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +13 -17
- package/src/components/style-sections/layout-section/flex-order-field.tsx +30 -33
- package/src/components/style-sections/layout-section/flex-size-field.tsx +60 -59
- package/src/components/style-sections/layout-section/justify-content-field.tsx +10 -14
- package/src/components/style-sections/layout-section/wrap-field.tsx +13 -17
- package/src/components/style-sections/position-section/dimensions-field.tsx +33 -15
- package/src/components/style-sections/position-section/offset-field.tsx +5 -2
- package/src/components/style-sections/size-section/size-section.tsx +54 -39
- package/src/components/style-sections/spacing-section/spacing-section.tsx +1 -1
- package/src/components/style-sections/typography-section/column-gap-field.tsx +5 -2
- package/src/components/style-sections/typography-section/font-size-field.tsx +5 -2
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +5 -2
- package/src/components/style-sections/typography-section/line-height-field.tsx +5 -2
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +12 -9
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +2 -1
- package/src/components/style-sections/typography-section/typography-section.tsx +15 -3
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +5 -2
- package/src/components/style-tab-collapsible-content.tsx +22 -0
- package/src/components/style-tab-section.tsx +30 -0
- package/src/components/style-tab.tsx +51 -35
- package/src/controls-registry/styles-field.tsx +1 -1
- package/src/dynamics/components/background-control-dynamic-tag.tsx +48 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +11 -15
- package/src/dynamics/init.ts +21 -0
- package/src/index.ts +1 -0
- package/src/popover-action.tsx +3 -9
- package/src/styles-inheritance/components/{label-chip.tsx → infotip/label-chip.tsx} +1 -1
- package/src/styles-inheritance/{styles-inheritance-indicator.tsx → components/styles-inheritance-indicator.tsx} +8 -8
- package/src/styles-inheritance/{styles-inheritance-infotip.tsx → components/styles-inheritance-infotip.tsx} +7 -7
- package/src/styles-inheritance/components/styles-inheritance-section-indicators.tsx +113 -0
- package/src/styles-inheritance/components/ui-providers.tsx +18 -0
- /package/src/styles-inheritance/components/{action-icons.tsx → infotip/action-icons.tsx} +0 -0
- /package/src/styles-inheritance/components/{breakpoint-icon.tsx → infotip/breakpoint-icon.tsx} +0 -0
- /package/src/styles-inheritance/components/{index.ts → infotip/index.ts} +0 -0
- /package/src/styles-inheritance/components/{value-component.tsx → infotip/value-component.tsx} +0 -0
package/dist/index.js
CHANGED
|
@@ -34,12 +34,13 @@ __export(index_exports, {
|
|
|
34
34
|
init: () => init3,
|
|
35
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
36
36
|
registerControlReplacement: () => registerControlReplacement,
|
|
37
|
-
useBoundProp: () =>
|
|
37
|
+
useBoundProp: () => import_editor_controls59.useBoundProp,
|
|
38
|
+
useFontFamilies: () => useFontFamilies,
|
|
38
39
|
usePanelActions: () => usePanelActions,
|
|
39
40
|
usePanelStatus: () => usePanelStatus
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(index_exports);
|
|
42
|
-
var
|
|
43
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
43
44
|
|
|
44
45
|
// src/control-replacement.tsx
|
|
45
46
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -1158,15 +1159,15 @@ function useHandleSelect() {
|
|
|
1158
1159
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
1159
1160
|
|
|
1160
1161
|
// src/components/editing-panel.tsx
|
|
1161
|
-
var
|
|
1162
|
-
var
|
|
1162
|
+
var React84 = __toESM(require("react"));
|
|
1163
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
1163
1164
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
1164
1165
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1165
|
-
var
|
|
1166
|
-
var
|
|
1166
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
1167
|
+
var import_icons24 = require("@elementor/icons");
|
|
1167
1168
|
var import_session5 = require("@elementor/session");
|
|
1168
|
-
var
|
|
1169
|
-
var
|
|
1169
|
+
var import_ui69 = require("@elementor/ui");
|
|
1170
|
+
var import_i18n55 = require("@wordpress/i18n");
|
|
1170
1171
|
|
|
1171
1172
|
// src/controls-actions.ts
|
|
1172
1173
|
var import_menus = require("@elementor/menus");
|
|
@@ -1179,13 +1180,13 @@ function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
|
1179
1180
|
if (!visible) {
|
|
1180
1181
|
return null;
|
|
1181
1182
|
}
|
|
1182
|
-
return /* @__PURE__ */ React9.createElement(import_ui7.Tooltip, { placement: "
|
|
1183
|
+
return /* @__PURE__ */ React9.createElement(import_ui7.Tooltip, { placement: "top", title, arrow: true }, /* @__PURE__ */ React9.createElement(import_ui7.IconButton, { "aria-label": title, size: SIZE, onClick }, /* @__PURE__ */ React9.createElement(Icon, { fontSize: SIZE })));
|
|
1183
1184
|
}
|
|
1184
1185
|
|
|
1185
1186
|
// src/popover-action.tsx
|
|
1186
1187
|
var React10 = __toESM(require("react"));
|
|
1187
1188
|
var import_react11 = require("react");
|
|
1188
|
-
var
|
|
1189
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1189
1190
|
var import_ui8 = require("@elementor/ui");
|
|
1190
1191
|
var SIZE2 = "tiny";
|
|
1191
1192
|
function PopoverAction({
|
|
@@ -1213,7 +1214,7 @@ function PopoverAction({
|
|
|
1213
1214
|
},
|
|
1214
1215
|
...(0, import_ui8.bindPopover)(popupState)
|
|
1215
1216
|
},
|
|
1216
|
-
/* @__PURE__ */ React10.createElement(
|
|
1217
|
+
/* @__PURE__ */ React10.createElement(import_editor_ui4.PopoverHeader, { title, onClose: popupState.close, icon: /* @__PURE__ */ React10.createElement(Icon, { fontSize: SIZE2 }) }),
|
|
1217
1218
|
/* @__PURE__ */ React10.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
1218
1219
|
));
|
|
1219
1220
|
}
|
|
@@ -1234,11 +1235,11 @@ function EditorPanelErrorFallback() {
|
|
|
1234
1235
|
}
|
|
1235
1236
|
|
|
1236
1237
|
// src/components/editing-panel-tabs.tsx
|
|
1237
|
-
var
|
|
1238
|
-
var
|
|
1239
|
-
var
|
|
1240
|
-
var
|
|
1241
|
-
var
|
|
1238
|
+
var React83 = __toESM(require("react"));
|
|
1239
|
+
var import_react36 = require("react");
|
|
1240
|
+
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1241
|
+
var import_ui68 = require("@elementor/ui");
|
|
1242
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
1242
1243
|
|
|
1243
1244
|
// src/contexts/scroll-context.tsx
|
|
1244
1245
|
var React12 = __toESM(require("react"));
|
|
@@ -1322,11 +1323,11 @@ var useStateByElement = (key, initialValue) => {
|
|
|
1322
1323
|
};
|
|
1323
1324
|
|
|
1324
1325
|
// src/components/settings-tab.tsx
|
|
1325
|
-
var
|
|
1326
|
+
var React19 = __toESM(require("react"));
|
|
1326
1327
|
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
1327
|
-
var
|
|
1328
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
1328
1329
|
var import_session2 = require("@elementor/session");
|
|
1329
|
-
var
|
|
1330
|
+
var import_ui16 = require("@elementor/ui");
|
|
1330
1331
|
|
|
1331
1332
|
// src/controls-registry/control.tsx
|
|
1332
1333
|
var React13 = __toESM(require("react"));
|
|
@@ -1414,14 +1415,15 @@ var SettingsField = ({ bind, children }) => {
|
|
|
1414
1415
|
};
|
|
1415
1416
|
|
|
1416
1417
|
// src/components/section.tsx
|
|
1417
|
-
var
|
|
1418
|
-
var
|
|
1419
|
-
var
|
|
1418
|
+
var React17 = __toESM(require("react"));
|
|
1419
|
+
var import_react16 = require("react");
|
|
1420
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1421
|
+
var import_ui14 = require("@elementor/ui");
|
|
1420
1422
|
|
|
1421
1423
|
// src/components/collapse-icon.tsx
|
|
1422
|
-
var
|
|
1424
|
+
var import_icons3 = require("@elementor/icons");
|
|
1423
1425
|
var import_ui12 = require("@elementor/ui");
|
|
1424
|
-
var CollapseIcon = (0, import_ui12.styled)(
|
|
1426
|
+
var CollapseIcon = (0, import_ui12.styled)(import_icons3.ChevronDownIcon, {
|
|
1425
1427
|
shouldForwardProp: (prop) => prop !== "open"
|
|
1426
1428
|
})(({ theme, open }) => ({
|
|
1427
1429
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -1430,49 +1432,95 @@ var CollapseIcon = (0, import_ui12.styled)(import_icons4.ChevronDownIcon, {
|
|
|
1430
1432
|
})
|
|
1431
1433
|
}));
|
|
1432
1434
|
|
|
1435
|
+
// src/components/collapsible-content.tsx
|
|
1436
|
+
var React16 = __toESM(require("react"));
|
|
1437
|
+
var import_react15 = require("react");
|
|
1438
|
+
var import_ui13 = require("@elementor/ui");
|
|
1439
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
1440
|
+
var IndicatorsWrapper = (0, import_ui13.styled)("div")`
|
|
1441
|
+
position: absolute;
|
|
1442
|
+
top: 0;
|
|
1443
|
+
right: ${({ theme }) => theme.spacing(3)};
|
|
1444
|
+
height: 100%;
|
|
1445
|
+
display: flex;
|
|
1446
|
+
flex-direction: column;
|
|
1447
|
+
align-items: center;
|
|
1448
|
+
justify-content: center;
|
|
1449
|
+
`;
|
|
1450
|
+
var CollapsibleContent = ({ children, defaultOpen = false, titleEnd = null }) => {
|
|
1451
|
+
const [open, setOpen] = (0, import_react15.useState)(defaultOpen);
|
|
1452
|
+
const handleToggle = () => {
|
|
1453
|
+
setOpen((prevOpen) => !prevOpen);
|
|
1454
|
+
};
|
|
1455
|
+
return /* @__PURE__ */ React16.createElement(import_ui13.Stack, null, /* @__PURE__ */ React16.createElement(import_ui13.Stack, { sx: { position: "relative" } }, /* @__PURE__ */ React16.createElement(
|
|
1456
|
+
import_ui13.Button,
|
|
1457
|
+
{
|
|
1458
|
+
fullWidth: true,
|
|
1459
|
+
size: "small",
|
|
1460
|
+
color: "secondary",
|
|
1461
|
+
variant: "outlined",
|
|
1462
|
+
onClick: handleToggle,
|
|
1463
|
+
endIcon: /* @__PURE__ */ React16.createElement(CollapseIcon, { open }),
|
|
1464
|
+
sx: { my: 0.5 }
|
|
1465
|
+
},
|
|
1466
|
+
open ? (0, import_i18n5.__)("Show less", "elementor") : (0, import_i18n5.__)("Show more", "elementor")
|
|
1467
|
+
), titleEnd && /* @__PURE__ */ React16.createElement(IndicatorsWrapper, null, getCollapsibleValue(titleEnd, open))), /* @__PURE__ */ React16.createElement(import_ui13.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1468
|
+
};
|
|
1469
|
+
function getCollapsibleValue(value, isOpen) {
|
|
1470
|
+
if (typeof value === "function") {
|
|
1471
|
+
return value(isOpen);
|
|
1472
|
+
}
|
|
1473
|
+
return value;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1433
1476
|
// src/components/section.tsx
|
|
1434
|
-
function Section({ title, children, defaultExpanded = false }) {
|
|
1477
|
+
function Section({ title, children, defaultExpanded = false, titleEnd }) {
|
|
1435
1478
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
1436
|
-
const
|
|
1479
|
+
const handleClick = () => {
|
|
1480
|
+
setIsOpen(!isOpen);
|
|
1481
|
+
};
|
|
1482
|
+
const id = (0, import_react16.useId)();
|
|
1437
1483
|
const labelId = `label-${id}`;
|
|
1438
1484
|
const contentId = `content-${id}`;
|
|
1439
|
-
|
|
1440
|
-
|
|
1485
|
+
const isUsingTitleEnd = (0, import_editor_v1_adapters3.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
1486
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
1487
|
+
import_ui14.ListItemButton,
|
|
1441
1488
|
{
|
|
1442
1489
|
id: labelId,
|
|
1443
1490
|
"aria-controls": contentId,
|
|
1444
|
-
onClick:
|
|
1491
|
+
onClick: handleClick,
|
|
1445
1492
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
1446
1493
|
},
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
|
|
1494
|
+
/* @__PURE__ */ React17.createElement(import_ui14.Stack, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React17.createElement(
|
|
1495
|
+
import_ui14.ListItemText,
|
|
1449
1496
|
{
|
|
1450
1497
|
secondary: title,
|
|
1451
|
-
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" }
|
|
1498
|
+
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
|
|
1499
|
+
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
1452
1500
|
}
|
|
1453
|
-
),
|
|
1454
|
-
/* @__PURE__ */
|
|
1455
|
-
), /* @__PURE__ */
|
|
1501
|
+
), isUsingTitleEnd ? getCollapsibleValue(titleEnd, isOpen) : null),
|
|
1502
|
+
/* @__PURE__ */ React17.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
1503
|
+
), /* @__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));
|
|
1456
1504
|
}
|
|
1457
1505
|
|
|
1458
1506
|
// src/components/sections-list.tsx
|
|
1459
|
-
var
|
|
1460
|
-
var
|
|
1507
|
+
var React18 = __toESM(require("react"));
|
|
1508
|
+
var import_ui15 = require("@elementor/ui");
|
|
1461
1509
|
function SectionsList(props) {
|
|
1462
|
-
return /* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ React18.createElement(import_ui15.List, { disablePadding: true, component: "div", ...props });
|
|
1463
1511
|
}
|
|
1464
1512
|
|
|
1465
1513
|
// src/components/settings-tab.tsx
|
|
1466
1514
|
var SettingsTab = () => {
|
|
1467
1515
|
const { elementType, element } = useElement();
|
|
1468
1516
|
const settingsDefault = useDefaultPanelSettings();
|
|
1469
|
-
const isDefaultExpanded = (sectionId) => (0,
|
|
1470
|
-
return /* @__PURE__ */
|
|
1517
|
+
const isDefaultExpanded = (sectionId) => (0, import_editor_v1_adapters4.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId) : true;
|
|
1518
|
+
return /* @__PURE__ */ React19.createElement(import_session2.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React19.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
1471
1519
|
if (type === "control") {
|
|
1472
|
-
return /* @__PURE__ */
|
|
1520
|
+
return /* @__PURE__ */ React19.createElement(Control2, { key: value.bind, control: value });
|
|
1473
1521
|
}
|
|
1474
1522
|
if (type === "section") {
|
|
1475
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1476
1524
|
Section,
|
|
1477
1525
|
{
|
|
1478
1526
|
title: value.label,
|
|
@@ -1481,7 +1529,7 @@ var SettingsTab = () => {
|
|
|
1481
1529
|
},
|
|
1482
1530
|
value.items?.map((item) => {
|
|
1483
1531
|
if (item.type === "control") {
|
|
1484
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ React19.createElement(Control2, { key: item.value.bind, control: item.value });
|
|
1485
1533
|
}
|
|
1486
1534
|
return null;
|
|
1487
1535
|
})
|
|
@@ -1495,22 +1543,21 @@ var Control2 = ({ control }) => {
|
|
|
1495
1543
|
return null;
|
|
1496
1544
|
}
|
|
1497
1545
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1498
|
-
return /* @__PURE__ */
|
|
1546
|
+
return /* @__PURE__ */ React19.createElement(SettingsField, { bind: control.bind }, control.meta?.topDivider && /* @__PURE__ */ React19.createElement(import_ui16.Divider, null), /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, control.label ? /* @__PURE__ */ React19.createElement(import_editor_controls4.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React19.createElement(Control, { type: control.type, props: control.props })));
|
|
1499
1547
|
};
|
|
1500
1548
|
|
|
1501
1549
|
// src/components/style-tab.tsx
|
|
1502
|
-
var
|
|
1503
|
-
var
|
|
1550
|
+
var React82 = __toESM(require("react"));
|
|
1551
|
+
var import_react35 = require("react");
|
|
1504
1552
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
1505
1553
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1506
|
-
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1507
1554
|
var import_session4 = require("@elementor/session");
|
|
1508
|
-
var
|
|
1509
|
-
var
|
|
1555
|
+
var import_ui67 = require("@elementor/ui");
|
|
1556
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
1510
1557
|
|
|
1511
1558
|
// src/contexts/styles-inheritance-context.tsx
|
|
1512
|
-
var
|
|
1513
|
-
var
|
|
1559
|
+
var React20 = __toESM(require("react"));
|
|
1560
|
+
var import_react18 = require("react");
|
|
1514
1561
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1515
1562
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
1516
1563
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
@@ -1518,11 +1565,11 @@ var import_editor_styles = require("@elementor/editor-styles");
|
|
|
1518
1565
|
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
1519
1566
|
|
|
1520
1567
|
// src/hooks/use-styles-rerender.ts
|
|
1521
|
-
var
|
|
1568
|
+
var import_react17 = require("react");
|
|
1522
1569
|
var useStylesRerender = () => {
|
|
1523
1570
|
const { provider } = useStyle();
|
|
1524
|
-
const [, reRender] = (0,
|
|
1525
|
-
(0,
|
|
1571
|
+
const [, reRender] = (0, import_react17.useReducer)((p) => !p, false);
|
|
1572
|
+
(0, import_react17.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1526
1573
|
};
|
|
1527
1574
|
|
|
1528
1575
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
@@ -1740,15 +1787,15 @@ var getFilterPropType = (propType, path) => {
|
|
|
1740
1787
|
};
|
|
1741
1788
|
|
|
1742
1789
|
// src/contexts/styles-inheritance-context.tsx
|
|
1743
|
-
var Context4 = (0,
|
|
1790
|
+
var Context4 = (0, import_react18.createContext)(null);
|
|
1744
1791
|
function StyleInheritanceProvider({ children }) {
|
|
1745
1792
|
const styleDefs = useAppliedStyles();
|
|
1746
1793
|
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
1747
1794
|
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1748
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ React20.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
1749
1796
|
}
|
|
1750
1797
|
function useStylesInheritanceSnapshot() {
|
|
1751
|
-
const context = (0,
|
|
1798
|
+
const context = (0, import_react18.useContext)(Context4);
|
|
1752
1799
|
const { meta } = useStyle();
|
|
1753
1800
|
if (!context) {
|
|
1754
1801
|
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
@@ -1759,7 +1806,7 @@ function useStylesInheritanceSnapshot() {
|
|
|
1759
1806
|
return context.getSnapshot(meta) ?? null;
|
|
1760
1807
|
}
|
|
1761
1808
|
function useStylesInheritanceChain(path) {
|
|
1762
|
-
const context = (0,
|
|
1809
|
+
const context = (0, import_react18.useContext)(Context4);
|
|
1763
1810
|
if (!context) {
|
|
1764
1811
|
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
1765
1812
|
}
|
|
@@ -1814,21 +1861,21 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1814
1861
|
}
|
|
1815
1862
|
|
|
1816
1863
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1817
|
-
var
|
|
1864
|
+
var React29 = __toESM(require("react"));
|
|
1818
1865
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1819
1866
|
|
|
1820
1867
|
// src/controls-registry/styles-field.tsx
|
|
1821
|
-
var
|
|
1868
|
+
var React28 = __toESM(require("react"));
|
|
1822
1869
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1823
1870
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1824
1871
|
|
|
1825
1872
|
// src/hooks/use-styles-fields.ts
|
|
1826
|
-
var
|
|
1873
|
+
var import_react19 = require("react");
|
|
1827
1874
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1828
1875
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1829
1876
|
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1830
|
-
var
|
|
1831
|
-
var
|
|
1877
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
1878
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
1832
1879
|
function useStylesFields(propNames) {
|
|
1833
1880
|
const { element } = useElement();
|
|
1834
1881
|
const { id, meta, provider } = useStyle();
|
|
@@ -1877,8 +1924,8 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1877
1924
|
);
|
|
1878
1925
|
}
|
|
1879
1926
|
function useUndoableCreateElementStyle() {
|
|
1880
|
-
return (0,
|
|
1881
|
-
return (0,
|
|
1927
|
+
return (0, import_react19.useMemo)(() => {
|
|
1928
|
+
return (0, import_editor_v1_adapters5.undoable)(
|
|
1882
1929
|
{
|
|
1883
1930
|
do: (payload) => {
|
|
1884
1931
|
return (0, import_editor_elements6.createElementStyle)({
|
|
@@ -1899,14 +1946,14 @@ function useUndoableCreateElementStyle() {
|
|
|
1899
1946
|
},
|
|
1900
1947
|
{
|
|
1901
1948
|
title: ({ elementId }) => (0, import_editor_elements6.getElementLabel)(elementId),
|
|
1902
|
-
subtitle: (0,
|
|
1949
|
+
subtitle: (0, import_i18n6.__)("Style edited", "elementor")
|
|
1903
1950
|
}
|
|
1904
1951
|
);
|
|
1905
1952
|
}, []);
|
|
1906
1953
|
}
|
|
1907
1954
|
function useUndoableUpdateStyle() {
|
|
1908
|
-
return (0,
|
|
1909
|
-
return (0,
|
|
1955
|
+
return (0, import_react19.useMemo)(() => {
|
|
1956
|
+
return (0, import_editor_v1_adapters5.undoable)(
|
|
1910
1957
|
{
|
|
1911
1958
|
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
1912
1959
|
if (!provider.actions.updateProps) {
|
|
@@ -1932,7 +1979,7 @@ function useUndoableUpdateStyle() {
|
|
|
1932
1979
|
},
|
|
1933
1980
|
{
|
|
1934
1981
|
title: ({ elementId }) => (0, import_editor_elements6.getElementLabel)(elementId),
|
|
1935
|
-
subtitle: (0,
|
|
1982
|
+
subtitle: (0, import_i18n6.__)("Style edited", "elementor")
|
|
1936
1983
|
}
|
|
1937
1984
|
);
|
|
1938
1985
|
}, []);
|
|
@@ -1958,17 +2005,17 @@ function useStylesField(propName) {
|
|
|
1958
2005
|
return [value, setValue];
|
|
1959
2006
|
}
|
|
1960
2007
|
|
|
1961
|
-
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1962
|
-
var
|
|
2008
|
+
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2009
|
+
var React27 = __toESM(require("react"));
|
|
1963
2010
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
1964
2011
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
1965
2012
|
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
1966
|
-
var
|
|
1967
|
-
var
|
|
1968
|
-
var
|
|
2013
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
2014
|
+
var import_ui24 = require("@elementor/ui");
|
|
2015
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1969
2016
|
|
|
1970
2017
|
// src/styles-inheritance/consts.ts
|
|
1971
|
-
var
|
|
2018
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
1972
2019
|
var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
1973
2020
|
"background-color-overlay",
|
|
1974
2021
|
"background-image-overlay",
|
|
@@ -1981,28 +2028,28 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
1981
2028
|
"image",
|
|
1982
2029
|
"background-overlay"
|
|
1983
2030
|
]);
|
|
1984
|
-
var isUsingIndicatorPopover = () => (0,
|
|
2031
|
+
var isUsingIndicatorPopover = () => (0, import_editor_v1_adapters6.isExperimentActive)("e_v_3_30");
|
|
1985
2032
|
|
|
1986
|
-
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1987
|
-
var
|
|
1988
|
-
var
|
|
2033
|
+
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2034
|
+
var React26 = __toESM(require("react"));
|
|
2035
|
+
var import_react22 = require("react");
|
|
1989
2036
|
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
1990
|
-
var
|
|
1991
|
-
var
|
|
2037
|
+
var import_ui23 = require("@elementor/ui");
|
|
2038
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1992
2039
|
|
|
1993
2040
|
// src/components/section-content.tsx
|
|
1994
|
-
var
|
|
1995
|
-
var
|
|
1996
|
-
var
|
|
1997
|
-
var SectionContentRefContext = (0,
|
|
1998
|
-
var useSectionContentRef = () => (0,
|
|
2041
|
+
var import_react20 = require("react");
|
|
2042
|
+
var React21 = __toESM(require("react"));
|
|
2043
|
+
var import_ui17 = require("@elementor/ui");
|
|
2044
|
+
var SectionContentRefContext = (0, import_react20.createContext)(null);
|
|
2045
|
+
var useSectionContentRef = () => (0, import_react20.useContext)(SectionContentRefContext);
|
|
1999
2046
|
var SectionContent = ({ gap = 2, sx, children }) => {
|
|
2000
|
-
const ref = (0,
|
|
2001
|
-
return /* @__PURE__ */
|
|
2047
|
+
const ref = (0, import_react20.useRef)(null);
|
|
2048
|
+
return /* @__PURE__ */ React21.createElement(SectionContentRefContext.Provider, { value: ref }, /* @__PURE__ */ React21.createElement(import_ui17.Stack, { gap, sx: { ...sx }, ref }, children));
|
|
2002
2049
|
};
|
|
2003
2050
|
|
|
2004
2051
|
// src/hooks/use-direction.ts
|
|
2005
|
-
var
|
|
2052
|
+
var import_ui18 = require("@elementor/ui");
|
|
2006
2053
|
|
|
2007
2054
|
// src/sync/get-elementor-globals.ts
|
|
2008
2055
|
var getElementorConfig = () => {
|
|
@@ -2016,121 +2063,33 @@ var getElementorFrontendConfig = () => {
|
|
|
2016
2063
|
|
|
2017
2064
|
// src/hooks/use-direction.ts
|
|
2018
2065
|
function useDirection() {
|
|
2019
|
-
const theme = (0,
|
|
2066
|
+
const theme = (0, import_ui18.useTheme)();
|
|
2020
2067
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2021
2068
|
return { isSiteRtl, isUiRtl };
|
|
2022
2069
|
}
|
|
2023
2070
|
|
|
2024
|
-
// src/styles-inheritance/components/breakpoint-icon.tsx
|
|
2025
|
-
var React21 = __toESM(require("react"));
|
|
2026
|
-
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2027
|
-
var import_icons5 = require("@elementor/icons");
|
|
2028
|
-
var import_ui18 = require("@elementor/ui");
|
|
2029
|
-
var SIZE3 = "tiny";
|
|
2030
|
-
var DEFAULT_BREAKPOINT2 = "desktop";
|
|
2031
|
-
var breakpointIconMap = {
|
|
2032
|
-
widescreen: import_icons5.WidescreenIcon,
|
|
2033
|
-
desktop: import_icons5.DesktopIcon,
|
|
2034
|
-
laptop: import_icons5.LaptopIcon,
|
|
2035
|
-
tablet_extra: import_icons5.TabletLandscapeIcon,
|
|
2036
|
-
tablet: import_icons5.TabletPortraitIcon,
|
|
2037
|
-
mobile_extra: import_icons5.MobileLandscapeIcon,
|
|
2038
|
-
mobile: import_icons5.MobilePortraitIcon
|
|
2039
|
-
};
|
|
2040
|
-
var BreakpointIcon = ({ breakpoint }) => {
|
|
2041
|
-
const breakpoints = (0, import_editor_responsive2.useBreakpoints)();
|
|
2042
|
-
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT2;
|
|
2043
|
-
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
2044
|
-
if (!IconComponent) {
|
|
2045
|
-
return null;
|
|
2046
|
-
}
|
|
2047
|
-
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2048
|
-
return /* @__PURE__ */ React21.createElement(import_ui18.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2049
|
-
};
|
|
2050
|
-
|
|
2051
|
-
// src/styles-inheritance/components/label-chip.tsx
|
|
2052
|
-
var React22 = __toESM(require("react"));
|
|
2053
|
-
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
2054
|
-
var import_icons6 = require("@elementor/icons");
|
|
2055
|
-
var import_ui19 = require("@elementor/ui");
|
|
2056
|
-
var import_i18n6 = require("@wordpress/i18n");
|
|
2057
|
-
var SIZE4 = "tiny";
|
|
2058
|
-
var LabelChip = ({ displayLabel, provider, chipColor }) => {
|
|
2059
|
-
const isBaseStyle = provider === import_editor_styles_repository8.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2060
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */ React22.createElement(import_ui19.Tooltip, { title: (0, import_i18n6.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React22.createElement(import_icons6.InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2061
|
-
return /* @__PURE__ */ React22.createElement(
|
|
2062
|
-
import_ui19.Chip,
|
|
2063
|
-
{
|
|
2064
|
-
label: displayLabel,
|
|
2065
|
-
size: SIZE4,
|
|
2066
|
-
color: chipColor,
|
|
2067
|
-
variant: "standard",
|
|
2068
|
-
state: "enabled",
|
|
2069
|
-
icon: chipIcon,
|
|
2070
|
-
sx: (theme) => ({
|
|
2071
|
-
lineHeight: 1,
|
|
2072
|
-
flexWrap: "nowrap",
|
|
2073
|
-
alignItems: "center",
|
|
2074
|
-
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
2075
|
-
flexDirection: "row-reverse",
|
|
2076
|
-
".MuiChip-label": {
|
|
2077
|
-
overflow: "hidden",
|
|
2078
|
-
textOverflow: "ellipsis",
|
|
2079
|
-
whiteSpace: "nowrap"
|
|
2080
|
-
}
|
|
2081
|
-
})
|
|
2082
|
-
}
|
|
2083
|
-
);
|
|
2084
|
-
};
|
|
2085
|
-
|
|
2086
|
-
// src/styles-inheritance/components/value-component.tsx
|
|
2087
|
-
var React23 = __toESM(require("react"));
|
|
2088
|
-
var import_ui20 = require("@elementor/ui");
|
|
2089
|
-
var ValueComponent = ({ index, value }) => {
|
|
2090
|
-
return /* @__PURE__ */ React23.createElement(
|
|
2091
|
-
import_ui20.Typography,
|
|
2092
|
-
{
|
|
2093
|
-
variant: "caption",
|
|
2094
|
-
color: "text.tertiary",
|
|
2095
|
-
sx: {
|
|
2096
|
-
mt: "1px",
|
|
2097
|
-
textDecoration: index === 0 ? "none" : "line-through",
|
|
2098
|
-
overflow: "hidden",
|
|
2099
|
-
textOverflow: "ellipsis",
|
|
2100
|
-
whiteSpace: "nowrap"
|
|
2101
|
-
}
|
|
2102
|
-
},
|
|
2103
|
-
value
|
|
2104
|
-
);
|
|
2105
|
-
};
|
|
2106
|
-
|
|
2107
|
-
// src/styles-inheritance/components/action-icons.tsx
|
|
2108
|
-
var React24 = __toESM(require("react"));
|
|
2109
|
-
var import_ui21 = require("@elementor/ui");
|
|
2110
|
-
var ActionIcons = () => /* @__PURE__ */ React24.createElement(import_ui21.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2111
|
-
|
|
2112
2071
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2113
|
-
var
|
|
2114
|
-
var
|
|
2072
|
+
var import_react21 = require("react");
|
|
2073
|
+
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
2115
2074
|
var import_i18n7 = require("@wordpress/i18n");
|
|
2116
2075
|
var MAXIMUM_ITEMS = 2;
|
|
2117
2076
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
2118
|
-
const [items3, setItems] = (0,
|
|
2119
|
-
(0,
|
|
2077
|
+
const [items3, setItems] = (0, import_react21.useState)([]);
|
|
2078
|
+
(0, import_react21.useEffect)(() => {
|
|
2120
2079
|
(async () => {
|
|
2121
2080
|
const normalizedItems = await Promise.all(
|
|
2122
2081
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
2123
2082
|
);
|
|
2124
2083
|
const validItems = normalizedItems.map((item) => ({
|
|
2125
2084
|
...item,
|
|
2126
|
-
displayLabel:
|
|
2085
|
+
displayLabel: import_editor_styles_repository8.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n7.__)("Base", "elementor")
|
|
2127
2086
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2128
2087
|
setItems(validItems);
|
|
2129
2088
|
})();
|
|
2130
2089
|
}, [inheritanceChain, bind, resolve]);
|
|
2131
2090
|
return items3;
|
|
2132
2091
|
};
|
|
2133
|
-
var
|
|
2092
|
+
var DEFAULT_BREAKPOINT2 = "desktop";
|
|
2134
2093
|
var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
2135
2094
|
const {
|
|
2136
2095
|
variant: {
|
|
@@ -2142,7 +2101,7 @@ var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
|
2142
2101
|
return {
|
|
2143
2102
|
id: id ? id + (state ?? "") : index,
|
|
2144
2103
|
provider: item.provider || "",
|
|
2145
|
-
breakpoint: breakpoint ??
|
|
2104
|
+
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT2,
|
|
2146
2105
|
displayLabel,
|
|
2147
2106
|
value: await getTransformedValue(item, bind, resolve),
|
|
2148
2107
|
chipColor: getChipColor(item)
|
|
@@ -2156,7 +2115,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
2156
2115
|
}
|
|
2157
2116
|
});
|
|
2158
2117
|
const value = result?.[bind] ?? result;
|
|
2159
|
-
if ((0,
|
|
2118
|
+
if ((0, import_react21.isValidElement)(value)) {
|
|
2160
2119
|
return value;
|
|
2161
2120
|
}
|
|
2162
2121
|
if (typeof value === "object") {
|
|
@@ -2169,7 +2128,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
2169
2128
|
};
|
|
2170
2129
|
var getChipColor = (item) => {
|
|
2171
2130
|
const { provider = "", style } = item;
|
|
2172
|
-
if (provider ===
|
|
2131
|
+
if (provider === import_editor_styles_repository8.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2173
2132
|
return "default";
|
|
2174
2133
|
}
|
|
2175
2134
|
if (style?.label === "local") {
|
|
@@ -2182,88 +2141,176 @@ var getChipColor = (item) => {
|
|
|
2182
2141
|
var import_editor_canvas = require("@elementor/editor-canvas");
|
|
2183
2142
|
var stylesInheritanceTransformersRegistry = (0, import_editor_canvas.createTransformersRegistry)();
|
|
2184
2143
|
|
|
2185
|
-
// src/styles-inheritance/
|
|
2186
|
-
var
|
|
2187
|
-
var
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2144
|
+
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
2145
|
+
var React22 = __toESM(require("react"));
|
|
2146
|
+
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2147
|
+
var import_icons4 = require("@elementor/icons");
|
|
2148
|
+
var import_ui19 = require("@elementor/ui");
|
|
2149
|
+
var SIZE3 = "tiny";
|
|
2150
|
+
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
2151
|
+
var breakpointIconMap = {
|
|
2152
|
+
widescreen: import_icons4.WidescreenIcon,
|
|
2153
|
+
desktop: import_icons4.DesktopIcon,
|
|
2154
|
+
laptop: import_icons4.LaptopIcon,
|
|
2155
|
+
tablet_extra: import_icons4.TabletLandscapeIcon,
|
|
2156
|
+
tablet: import_icons4.TabletPortraitIcon,
|
|
2157
|
+
mobile_extra: import_icons4.MobileLandscapeIcon,
|
|
2158
|
+
mobile: import_icons4.MobilePortraitIcon
|
|
2159
|
+
};
|
|
2160
|
+
var BreakpointIcon = ({ breakpoint }) => {
|
|
2161
|
+
const breakpoints = (0, import_editor_responsive2.useBreakpoints)();
|
|
2162
|
+
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT3;
|
|
2163
|
+
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
2164
|
+
if (!IconComponent) {
|
|
2165
|
+
return null;
|
|
2166
|
+
}
|
|
2167
|
+
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2168
|
+
return /* @__PURE__ */ React22.createElement(import_ui19.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React22.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2172
|
+
var React23 = __toESM(require("react"));
|
|
2173
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
2174
|
+
var import_icons5 = require("@elementor/icons");
|
|
2175
|
+
var import_ui20 = require("@elementor/ui");
|
|
2176
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
2177
|
+
var SIZE4 = "tiny";
|
|
2178
|
+
var LabelChip = ({ displayLabel, provider, chipColor }) => {
|
|
2179
|
+
const isBaseStyle = provider === import_editor_styles_repository9.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2180
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React23.createElement(import_ui20.Tooltip, { title: (0, import_i18n8.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React23.createElement(import_icons5.InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2181
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2182
|
+
import_ui20.Chip,
|
|
2203
2183
|
{
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
"
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2184
|
+
label: displayLabel,
|
|
2185
|
+
size: SIZE4,
|
|
2186
|
+
color: chipColor,
|
|
2187
|
+
variant: "standard",
|
|
2188
|
+
state: "enabled",
|
|
2189
|
+
icon: chipIcon,
|
|
2190
|
+
sx: (theme) => ({
|
|
2191
|
+
lineHeight: 1,
|
|
2192
|
+
flexWrap: "nowrap",
|
|
2193
|
+
alignItems: "center",
|
|
2194
|
+
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
2195
|
+
flexDirection: "row-reverse",
|
|
2196
|
+
".MuiChip-label": {
|
|
2197
|
+
overflow: "hidden",
|
|
2198
|
+
textOverflow: "ellipsis",
|
|
2199
|
+
whiteSpace: "nowrap"
|
|
2200
|
+
}
|
|
2201
|
+
})
|
|
2202
|
+
}
|
|
2203
|
+
);
|
|
2204
|
+
};
|
|
2205
|
+
|
|
2206
|
+
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
2207
|
+
var React24 = __toESM(require("react"));
|
|
2208
|
+
var import_ui21 = require("@elementor/ui");
|
|
2209
|
+
var ValueComponent = ({ index, value }) => {
|
|
2210
|
+
return /* @__PURE__ */ React24.createElement(
|
|
2211
|
+
import_ui21.Typography,
|
|
2212
|
+
{
|
|
2213
|
+
variant: "caption",
|
|
2214
|
+
color: "text.tertiary",
|
|
2215
|
+
sx: {
|
|
2216
|
+
mt: "1px",
|
|
2217
|
+
textDecoration: index === 0 ? "none" : "line-through",
|
|
2218
|
+
overflow: "hidden",
|
|
2219
|
+
textOverflow: "ellipsis",
|
|
2220
|
+
whiteSpace: "nowrap"
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2223
|
+
value
|
|
2224
|
+
);
|
|
2225
|
+
};
|
|
2226
|
+
|
|
2227
|
+
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
2228
|
+
var React25 = __toESM(require("react"));
|
|
2229
|
+
var import_ui22 = require("@elementor/ui");
|
|
2230
|
+
var ActionIcons = () => /* @__PURE__ */ React25.createElement(import_ui22.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2231
|
+
|
|
2232
|
+
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2233
|
+
var SIZE5 = "tiny";
|
|
2234
|
+
var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, children }) => {
|
|
2235
|
+
const [showInfotip, setShowInfotip] = (0, import_react22.useState)(false);
|
|
2236
|
+
const toggleInfotip = () => setShowInfotip((prev) => !prev);
|
|
2237
|
+
const closeInfotip = () => setShowInfotip(false);
|
|
2238
|
+
const key = path.join(".");
|
|
2239
|
+
const sectionContentRef = useSectionContentRef();
|
|
2240
|
+
const sectionContentWidth = sectionContentRef?.current?.offsetWidth ?? 320;
|
|
2241
|
+
const resolve = (0, import_react22.useMemo)(() => {
|
|
2242
|
+
return (0, import_editor_canvas2.createPropsResolver)({
|
|
2243
|
+
transformers: stylesInheritanceTransformersRegistry,
|
|
2244
|
+
schema: { [key]: propType }
|
|
2245
|
+
});
|
|
2246
|
+
}, [key, propType]);
|
|
2247
|
+
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
2248
|
+
const infotipContent = /* @__PURE__ */ React26.createElement(import_ui23.ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React26.createElement(
|
|
2249
|
+
import_ui23.Card,
|
|
2250
|
+
{
|
|
2251
|
+
elevation: 0,
|
|
2252
|
+
sx: {
|
|
2253
|
+
width: `${sectionContentWidth}px`,
|
|
2254
|
+
maxWidth: 500,
|
|
2255
|
+
overflowX: "hidden"
|
|
2256
|
+
}
|
|
2257
|
+
},
|
|
2258
|
+
/* @__PURE__ */ React26.createElement(
|
|
2259
|
+
import_ui23.CardContent,
|
|
2260
|
+
{
|
|
2261
|
+
sx: {
|
|
2262
|
+
display: "flex",
|
|
2263
|
+
gap: 0.5,
|
|
2264
|
+
flexDirection: "column",
|
|
2265
|
+
p: 0,
|
|
2266
|
+
"&:last-child": {
|
|
2267
|
+
pb: 0
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
},
|
|
2271
|
+
/* @__PURE__ */ React26.createElement(import_ui23.Stack, { direction: "row", alignItems: "center", sx: { pl: 1.5, pr: 0.5, minHeight: 36, py: 0.5 } }, /* @__PURE__ */ React26.createElement(import_ui23.Typography, { variant: "subtitle2", color: "secondary", sx: { fontSize: 12, fontWeight: "500" } }, (0, import_i18n9.__)("Style origin", "elementor")), /* @__PURE__ */ React26.createElement(
|
|
2272
|
+
import_ui23.CloseButton,
|
|
2273
|
+
{
|
|
2274
|
+
slotProps: { icon: { fontSize: SIZE5 } },
|
|
2275
|
+
sx: { ml: "auto" },
|
|
2276
|
+
onClick: closeInfotip
|
|
2277
|
+
}
|
|
2278
|
+
)),
|
|
2279
|
+
/* @__PURE__ */ React26.createElement(
|
|
2280
|
+
import_ui23.Stack,
|
|
2281
|
+
{
|
|
2282
|
+
gap: 1.5,
|
|
2283
|
+
sx: { pl: 2, pr: 1, pb: 2, overflowX: "hidden", overflowY: "auto" },
|
|
2237
2284
|
role: "list"
|
|
2238
2285
|
},
|
|
2239
2286
|
items3.map((item, index) => {
|
|
2240
|
-
return /* @__PURE__ */
|
|
2241
|
-
|
|
2287
|
+
return /* @__PURE__ */ React26.createElement(
|
|
2288
|
+
import_ui23.Box,
|
|
2242
2289
|
{
|
|
2243
2290
|
key: item.id,
|
|
2244
2291
|
display: "flex",
|
|
2245
2292
|
gap: 0.5,
|
|
2246
2293
|
role: "listitem",
|
|
2247
|
-
"aria-label": (0,
|
|
2294
|
+
"aria-label": (0, import_i18n9.__)("Inheritance item: %s", "elementor").replace(
|
|
2248
2295
|
"%s",
|
|
2249
2296
|
item.displayLabel
|
|
2250
2297
|
)
|
|
2251
2298
|
},
|
|
2252
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ React26.createElement(import_ui23.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(
|
|
2253
2300
|
LabelChip,
|
|
2254
2301
|
{
|
|
2255
2302
|
displayLabel: item.displayLabel,
|
|
2256
2303
|
provider: item.provider,
|
|
2257
2304
|
chipColor: item.chipColor
|
|
2258
2305
|
}
|
|
2259
|
-
), /* @__PURE__ */
|
|
2260
|
-
/* @__PURE__ */
|
|
2306
|
+
), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2307
|
+
/* @__PURE__ */ React26.createElement(ActionIcons, null)
|
|
2261
2308
|
);
|
|
2262
2309
|
})
|
|
2263
2310
|
)
|
|
2264
2311
|
)
|
|
2265
2312
|
));
|
|
2266
|
-
return /* @__PURE__ */
|
|
2313
|
+
return /* @__PURE__ */ React26.createElement(TooltipOrInfotip, { showInfotip, onClose: closeInfotip, infotipContent }, /* @__PURE__ */ React26.createElement(import_ui23.IconButton, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" } }, children));
|
|
2267
2314
|
};
|
|
2268
2315
|
function TooltipOrInfotip({
|
|
2269
2316
|
children,
|
|
@@ -2274,8 +2321,8 @@ function TooltipOrInfotip({
|
|
|
2274
2321
|
const { isSiteRtl } = useDirection();
|
|
2275
2322
|
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2276
2323
|
if (showInfotip) {
|
|
2277
|
-
return /* @__PURE__ */
|
|
2278
|
-
|
|
2324
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
2325
|
+
import_ui23.Backdrop,
|
|
2279
2326
|
{
|
|
2280
2327
|
open: showInfotip,
|
|
2281
2328
|
onClick: onClose,
|
|
@@ -2284,8 +2331,8 @@ function TooltipOrInfotip({
|
|
|
2284
2331
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
2285
2332
|
}
|
|
2286
2333
|
}
|
|
2287
|
-
), /* @__PURE__ */
|
|
2288
|
-
|
|
2334
|
+
), /* @__PURE__ */ React26.createElement(
|
|
2335
|
+
import_ui23.Infotip,
|
|
2289
2336
|
{
|
|
2290
2337
|
placement: "top",
|
|
2291
2338
|
content: infotipContent,
|
|
@@ -2311,14 +2358,14 @@ function TooltipOrInfotip({
|
|
|
2311
2358
|
children
|
|
2312
2359
|
));
|
|
2313
2360
|
}
|
|
2314
|
-
return /* @__PURE__ */
|
|
2361
|
+
return /* @__PURE__ */ React26.createElement(import_ui23.Tooltip, { title: (0, import_i18n9.__)("Style origin", "elementor"), placement: "top" }, children);
|
|
2315
2362
|
}
|
|
2316
2363
|
|
|
2317
|
-
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
2364
|
+
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2318
2365
|
var StylesInheritanceIndicator = () => {
|
|
2319
2366
|
const { path, propType } = (0, import_editor_controls5.useBoundProp)();
|
|
2320
2367
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2321
|
-
const isUsingNestedProps = (0,
|
|
2368
|
+
const isUsingNestedProps = (0, import_editor_v1_adapters7.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2322
2369
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
2323
2370
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
2324
2371
|
if (!inheritanceChain.length) {
|
|
@@ -2341,27 +2388,27 @@ var StylesInheritanceIndicator = () => {
|
|
|
2341
2388
|
const label = getLabel({ isFinalValue, hasValue });
|
|
2342
2389
|
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
2343
2390
|
if (!isUsingIndicatorPopover()) {
|
|
2344
|
-
return /* @__PURE__ */
|
|
2391
|
+
return /* @__PURE__ */ React27.createElement(import_ui24.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, { variant: variantType, "aria-label": label }));
|
|
2345
2392
|
}
|
|
2346
|
-
return /* @__PURE__ */
|
|
2347
|
-
|
|
2393
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2394
|
+
StylesInheritanceInfotip,
|
|
2348
2395
|
{
|
|
2349
2396
|
inheritanceChain,
|
|
2350
2397
|
path: finalPath,
|
|
2351
2398
|
propType,
|
|
2352
2399
|
label
|
|
2353
2400
|
},
|
|
2354
|
-
/* @__PURE__ */
|
|
2401
|
+
/* @__PURE__ */ React27.createElement(StyleIndicator, { variant: variantType })
|
|
2355
2402
|
);
|
|
2356
2403
|
};
|
|
2357
2404
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
2358
2405
|
if (isFinalValue) {
|
|
2359
|
-
return (0,
|
|
2406
|
+
return (0, import_i18n10.__)("This is the final value", "elementor");
|
|
2360
2407
|
}
|
|
2361
2408
|
if (hasValue) {
|
|
2362
|
-
return (0,
|
|
2409
|
+
return (0, import_i18n10.__)("This value is overridden by another style", "elementor");
|
|
2363
2410
|
}
|
|
2364
|
-
return (0,
|
|
2411
|
+
return (0, import_i18n10.__)("This has value from another style", "elementor");
|
|
2365
2412
|
};
|
|
2366
2413
|
var getVariant = ({
|
|
2367
2414
|
isFinalValue,
|
|
@@ -2388,7 +2435,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2388
2435
|
const setValues = (newValue) => {
|
|
2389
2436
|
setValue(newValue[bind]);
|
|
2390
2437
|
};
|
|
2391
|
-
return /* @__PURE__ */
|
|
2438
|
+
return /* @__PURE__ */ React28.createElement(
|
|
2392
2439
|
import_editor_controls6.ControlAdornmentsProvider,
|
|
2393
2440
|
{
|
|
2394
2441
|
items: [
|
|
@@ -2398,7 +2445,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2398
2445
|
}
|
|
2399
2446
|
]
|
|
2400
2447
|
},
|
|
2401
|
-
/* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ React28.createElement(
|
|
2402
2449
|
import_editor_controls6.PropProvider,
|
|
2403
2450
|
{
|
|
2404
2451
|
propType,
|
|
@@ -2407,50 +2454,41 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2407
2454
|
placeholder: placeholderValues,
|
|
2408
2455
|
disabled: !canEdit
|
|
2409
2456
|
},
|
|
2410
|
-
/* @__PURE__ */
|
|
2457
|
+
/* @__PURE__ */ React28.createElement(import_editor_controls6.PropKeyProvider, { bind }, children)
|
|
2411
2458
|
)
|
|
2412
2459
|
);
|
|
2413
2460
|
};
|
|
2414
2461
|
|
|
2415
2462
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2416
2463
|
var BackgroundSection = () => {
|
|
2417
|
-
return /* @__PURE__ */
|
|
2464
|
+
return /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React29.createElement(import_editor_controls7.BackgroundControl, null)));
|
|
2418
2465
|
};
|
|
2419
2466
|
|
|
2420
2467
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2421
|
-
var
|
|
2468
|
+
var React39 = __toESM(require("react"));
|
|
2422
2469
|
|
|
2423
2470
|
// src/components/panel-divider.tsx
|
|
2424
|
-
var
|
|
2425
|
-
var
|
|
2426
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
2471
|
+
var React30 = __toESM(require("react"));
|
|
2472
|
+
var import_ui25 = require("@elementor/ui");
|
|
2473
|
+
var PanelDivider = () => /* @__PURE__ */ React30.createElement(import_ui25.Divider, { sx: { my: 0.5 } });
|
|
2427
2474
|
|
|
2428
2475
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2429
|
-
var
|
|
2430
|
-
var
|
|
2476
|
+
var React36 = __toESM(require("react"));
|
|
2477
|
+
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
2478
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
2431
2479
|
|
|
2432
2480
|
// src/components/add-or-remove-content.tsx
|
|
2433
2481
|
var React31 = __toESM(require("react"));
|
|
2434
|
-
var
|
|
2482
|
+
var import_icons6 = require("@elementor/icons");
|
|
2435
2483
|
var import_ui26 = require("@elementor/ui");
|
|
2436
|
-
|
|
2437
|
-
// src/components/control-label.tsx
|
|
2438
|
-
var React30 = __toESM(require("react"));
|
|
2439
|
-
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
2440
|
-
var import_ui25 = require("@elementor/ui");
|
|
2441
|
-
var ControlLabel = ({ children }) => {
|
|
2442
|
-
return /* @__PURE__ */ React30.createElement(import_ui25.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React30.createElement(import_editor_controls8.ControlFormLabel, null, children), /* @__PURE__ */ React30.createElement(import_editor_controls8.ControlAdornments, null));
|
|
2443
|
-
};
|
|
2444
|
-
|
|
2445
|
-
// src/components/add-or-remove-content.tsx
|
|
2446
2484
|
var SIZE6 = "tiny";
|
|
2447
2485
|
var AddOrRemoveContent = ({
|
|
2448
2486
|
isAdded,
|
|
2449
|
-
label,
|
|
2450
2487
|
onAdd,
|
|
2451
2488
|
onRemove,
|
|
2452
2489
|
children,
|
|
2453
|
-
disabled
|
|
2490
|
+
disabled,
|
|
2491
|
+
renderLabel
|
|
2454
2492
|
}) => {
|
|
2455
2493
|
return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(
|
|
2456
2494
|
import_ui26.Stack,
|
|
@@ -2462,80 +2500,90 @@ var AddOrRemoveContent = ({
|
|
|
2462
2500
|
marginInlineEnd: -0.75
|
|
2463
2501
|
}
|
|
2464
2502
|
},
|
|
2465
|
-
|
|
2466
|
-
isAdded ? /* @__PURE__ */ React31.createElement(import_ui26.IconButton, { size: SIZE6, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React31.createElement(
|
|
2503
|
+
renderLabel(),
|
|
2504
|
+
isAdded ? /* @__PURE__ */ React31.createElement(import_ui26.IconButton, { size: SIZE6, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React31.createElement(import_icons6.MinusIcon, { fontSize: SIZE6 })) : /* @__PURE__ */ React31.createElement(import_ui26.IconButton, { size: SIZE6, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React31.createElement(import_icons6.PlusIcon, { fontSize: SIZE6 }))
|
|
2467
2505
|
), /* @__PURE__ */ React31.createElement(import_ui26.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React31.createElement(SectionContent, null, children)));
|
|
2468
2506
|
};
|
|
2469
2507
|
|
|
2470
2508
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2471
|
-
var
|
|
2509
|
+
var React33 = __toESM(require("react"));
|
|
2472
2510
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
2511
|
+
var import_ui28 = require("@elementor/ui");
|
|
2512
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
2513
|
+
|
|
2514
|
+
// src/components/control-label.tsx
|
|
2515
|
+
var React32 = __toESM(require("react"));
|
|
2516
|
+
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
2473
2517
|
var import_ui27 = require("@elementor/ui");
|
|
2474
|
-
var
|
|
2518
|
+
var ControlLabel = ({ children }) => {
|
|
2519
|
+
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));
|
|
2520
|
+
};
|
|
2521
|
+
|
|
2522
|
+
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2475
2523
|
var BorderColorField = () => {
|
|
2476
|
-
return /* @__PURE__ */
|
|
2524
|
+
return /* @__PURE__ */ React33.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React33.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, (0, import_i18n11.__)("Border color", "elementor"))), /* @__PURE__ */ React33.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(import_editor_controls9.ColorControl, null))));
|
|
2477
2525
|
};
|
|
2478
2526
|
|
|
2479
2527
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2480
|
-
var
|
|
2528
|
+
var React34 = __toESM(require("react"));
|
|
2481
2529
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
2482
|
-
var
|
|
2483
|
-
var
|
|
2530
|
+
var import_ui29 = require("@elementor/ui");
|
|
2531
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
2484
2532
|
var borderStyles = [
|
|
2485
|
-
{ value: "none", label: (0,
|
|
2486
|
-
{ value: "solid", label: (0,
|
|
2487
|
-
{ value: "dashed", label: (0,
|
|
2488
|
-
{ value: "dotted", label: (0,
|
|
2489
|
-
{ value: "double", label: (0,
|
|
2490
|
-
{ value: "groove", label: (0,
|
|
2491
|
-
{ value: "ridge", label: (0,
|
|
2492
|
-
{ value: "inset", label: (0,
|
|
2493
|
-
{ value: "outset", label: (0,
|
|
2533
|
+
{ value: "none", label: (0, import_i18n12.__)("None", "elementor") },
|
|
2534
|
+
{ value: "solid", label: (0, import_i18n12.__)("Solid", "elementor") },
|
|
2535
|
+
{ value: "dashed", label: (0, import_i18n12.__)("Dashed", "elementor") },
|
|
2536
|
+
{ value: "dotted", label: (0, import_i18n12.__)("Dotted", "elementor") },
|
|
2537
|
+
{ value: "double", label: (0, import_i18n12.__)("Double", "elementor") },
|
|
2538
|
+
{ value: "groove", label: (0, import_i18n12.__)("Groove", "elementor") },
|
|
2539
|
+
{ value: "ridge", label: (0, import_i18n12.__)("Ridge", "elementor") },
|
|
2540
|
+
{ value: "inset", label: (0, import_i18n12.__)("Inset", "elementor") },
|
|
2541
|
+
{ value: "outset", label: (0, import_i18n12.__)("Outset", "elementor") }
|
|
2494
2542
|
];
|
|
2495
2543
|
var BorderStyleField = () => {
|
|
2496
|
-
return /* @__PURE__ */
|
|
2544
|
+
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 }))));
|
|
2497
2545
|
};
|
|
2498
2546
|
|
|
2499
2547
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2500
|
-
var
|
|
2548
|
+
var React35 = __toESM(require("react"));
|
|
2501
2549
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
2502
2550
|
var import_editor_props6 = require("@elementor/editor-props");
|
|
2503
|
-
var
|
|
2504
|
-
var
|
|
2505
|
-
var
|
|
2506
|
-
var InlineStartIcon = (0,
|
|
2507
|
-
var InlineEndIcon = (0,
|
|
2551
|
+
var import_icons7 = require("@elementor/icons");
|
|
2552
|
+
var import_ui30 = require("@elementor/ui");
|
|
2553
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
2554
|
+
var InlineStartIcon = (0, import_ui30.withDirection)(import_icons7.SideRightIcon);
|
|
2555
|
+
var InlineEndIcon = (0, import_ui30.withDirection)(import_icons7.SideLeftIcon);
|
|
2508
2556
|
var getEdges = (isSiteRtl) => [
|
|
2509
2557
|
{
|
|
2510
|
-
label: (0,
|
|
2511
|
-
icon: /* @__PURE__ */
|
|
2558
|
+
label: (0, import_i18n13.__)("Top", "elementor"),
|
|
2559
|
+
icon: /* @__PURE__ */ React35.createElement(import_icons7.SideTopIcon, { fontSize: "tiny" }),
|
|
2512
2560
|
bind: "block-start"
|
|
2513
2561
|
},
|
|
2514
2562
|
{
|
|
2515
|
-
label: isSiteRtl ? (0,
|
|
2516
|
-
icon: /* @__PURE__ */
|
|
2563
|
+
label: isSiteRtl ? (0, import_i18n13.__)("Left", "elementor") : (0, import_i18n13.__)("Right", "elementor"),
|
|
2564
|
+
icon: /* @__PURE__ */ React35.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
2517
2565
|
bind: "inline-end"
|
|
2518
2566
|
},
|
|
2519
2567
|
{
|
|
2520
|
-
label: (0,
|
|
2521
|
-
icon: /* @__PURE__ */
|
|
2568
|
+
label: (0, import_i18n13.__)("Bottom", "elementor"),
|
|
2569
|
+
icon: /* @__PURE__ */ React35.createElement(import_icons7.SideBottomIcon, { fontSize: "tiny" }),
|
|
2522
2570
|
bind: "block-end"
|
|
2523
2571
|
},
|
|
2524
2572
|
{
|
|
2525
|
-
label: isSiteRtl ? (0,
|
|
2526
|
-
icon: /* @__PURE__ */
|
|
2573
|
+
label: isSiteRtl ? (0, import_i18n13.__)("Right", "elementor") : (0, import_i18n13.__)("Left", "elementor"),
|
|
2574
|
+
icon: /* @__PURE__ */ React35.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
2527
2575
|
bind: "inline-start"
|
|
2528
2576
|
}
|
|
2529
2577
|
];
|
|
2530
2578
|
var BorderWidthField = () => {
|
|
2531
2579
|
const { isSiteRtl } = useDirection();
|
|
2532
|
-
return /* @__PURE__ */
|
|
2580
|
+
return /* @__PURE__ */ React35.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React35.createElement(
|
|
2533
2581
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
2534
2582
|
{
|
|
2535
2583
|
items: getEdges(isSiteRtl),
|
|
2536
|
-
label: (0,
|
|
2537
|
-
icon: /* @__PURE__ */
|
|
2538
|
-
tooltipLabel: (0,
|
|
2584
|
+
label: (0, import_i18n13.__)("Border width", "elementor"),
|
|
2585
|
+
icon: /* @__PURE__ */ React35.createElement(import_icons7.SideAllIcon, { fontSize: "tiny" }),
|
|
2586
|
+
tooltipLabel: (0, import_i18n13.__)("Adjust borders", "elementor"),
|
|
2539
2587
|
multiSizePropTypeUtil: import_editor_props6.borderWidthPropTypeUtil
|
|
2540
2588
|
}
|
|
2541
2589
|
));
|
|
@@ -2561,97 +2609,107 @@ var BorderField = () => {
|
|
|
2561
2609
|
});
|
|
2562
2610
|
};
|
|
2563
2611
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
2564
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ React36.createElement(
|
|
2565
2613
|
AddOrRemoveContent,
|
|
2566
2614
|
{
|
|
2567
|
-
label: (0, import_i18n13.__)("Border", "elementor"),
|
|
2568
2615
|
isAdded: hasBorder,
|
|
2569
2616
|
onAdd: addBorder,
|
|
2570
2617
|
onRemove: removeBorder,
|
|
2571
|
-
disabled: !canEdit
|
|
2618
|
+
disabled: !canEdit,
|
|
2619
|
+
renderLabel: () => /* @__PURE__ */ React36.createElement(import_editor_controls12.ControlFormLabel, null, (0, import_i18n14.__)("Border", "elementor"))
|
|
2572
2620
|
},
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2575
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ React36.createElement(BorderWidthField, null),
|
|
2622
|
+
/* @__PURE__ */ React36.createElement(BorderColorField, null),
|
|
2623
|
+
/* @__PURE__ */ React36.createElement(BorderStyleField, null)
|
|
2576
2624
|
);
|
|
2577
2625
|
};
|
|
2578
2626
|
|
|
2579
2627
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2580
|
-
var
|
|
2581
|
-
var
|
|
2628
|
+
var React38 = __toESM(require("react"));
|
|
2629
|
+
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
2582
2630
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
2583
|
-
var
|
|
2584
|
-
var
|
|
2585
|
-
var
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
var
|
|
2589
|
-
var
|
|
2590
|
-
var
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2631
|
+
var import_icons8 = require("@elementor/icons");
|
|
2632
|
+
var import_ui32 = require("@elementor/ui");
|
|
2633
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
2634
|
+
|
|
2635
|
+
// src/styles-inheritance/components/ui-providers.tsx
|
|
2636
|
+
var React37 = __toESM(require("react"));
|
|
2637
|
+
var import_ui31 = require("@elementor/ui");
|
|
2638
|
+
var UiProviders = ({ children }) => {
|
|
2639
|
+
const { isSiteRtl } = useDirection();
|
|
2640
|
+
return /* @__PURE__ */ React37.createElement(import_ui31.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(import_ui31.ThemeProvider, null, children));
|
|
2641
|
+
};
|
|
2642
|
+
|
|
2643
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2644
|
+
var StartStartIcon = (0, import_ui32.withDirection)(import_icons8.RadiusTopLeftIcon);
|
|
2645
|
+
var StartEndIcon = (0, import_ui32.withDirection)(import_icons8.RadiusTopRightIcon);
|
|
2646
|
+
var EndStartIcon = (0, import_ui32.withDirection)(import_icons8.RadiusBottomLeftIcon);
|
|
2647
|
+
var EndEndIcon = (0, import_ui32.withDirection)(import_icons8.RadiusBottomRightIcon);
|
|
2648
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Top right", "elementor") : (0, import_i18n15.__)("Top left", "elementor");
|
|
2649
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Top left", "elementor") : (0, import_i18n15.__)("Top right", "elementor");
|
|
2650
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Bottom right", "elementor") : (0, import_i18n15.__)("Bottom left", "elementor");
|
|
2651
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Bottom left", "elementor") : (0, import_i18n15.__)("Bottom right", "elementor");
|
|
2594
2652
|
var getCorners = (isSiteRtl) => [
|
|
2595
2653
|
{
|
|
2596
2654
|
label: getStartStartLabel(isSiteRtl),
|
|
2597
|
-
icon: /* @__PURE__ */
|
|
2655
|
+
icon: /* @__PURE__ */ React38.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2598
2656
|
bind: "start-start"
|
|
2599
2657
|
},
|
|
2600
2658
|
{
|
|
2601
2659
|
label: getStartEndLabel(isSiteRtl),
|
|
2602
|
-
icon: /* @__PURE__ */
|
|
2660
|
+
icon: /* @__PURE__ */ React38.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2603
2661
|
bind: "start-end"
|
|
2604
2662
|
},
|
|
2605
2663
|
{
|
|
2606
2664
|
label: getEndStartLabel(isSiteRtl),
|
|
2607
|
-
icon: /* @__PURE__ */
|
|
2665
|
+
icon: /* @__PURE__ */ React38.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2608
2666
|
bind: "end-start"
|
|
2609
2667
|
},
|
|
2610
2668
|
{
|
|
2611
2669
|
label: getEndEndLabel(isSiteRtl),
|
|
2612
|
-
icon: /* @__PURE__ */
|
|
2670
|
+
icon: /* @__PURE__ */ React38.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2613
2671
|
bind: "end-end"
|
|
2614
2672
|
}
|
|
2615
2673
|
];
|
|
2616
2674
|
var BorderRadiusField = () => {
|
|
2617
2675
|
const { isSiteRtl } = useDirection();
|
|
2618
|
-
return /* @__PURE__ */
|
|
2619
|
-
|
|
2676
|
+
return /* @__PURE__ */ React38.createElement(UiProviders, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React38.createElement(
|
|
2677
|
+
import_editor_controls13.EqualUnequalSizesControl,
|
|
2620
2678
|
{
|
|
2621
2679
|
items: getCorners(isSiteRtl),
|
|
2622
|
-
label: (0,
|
|
2623
|
-
icon: /* @__PURE__ */
|
|
2624
|
-
tooltipLabel: (0,
|
|
2680
|
+
label: (0, import_i18n15.__)("Border radius", "elementor"),
|
|
2681
|
+
icon: /* @__PURE__ */ React38.createElement(import_icons8.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2682
|
+
tooltipLabel: (0, import_i18n15.__)("Adjust corners", "elementor"),
|
|
2625
2683
|
multiSizePropTypeUtil: import_editor_props7.borderRadiusPropTypeUtil
|
|
2626
2684
|
}
|
|
2627
|
-
));
|
|
2685
|
+
)));
|
|
2628
2686
|
};
|
|
2629
2687
|
|
|
2630
2688
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2631
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2689
|
+
var BorderSection = () => /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(BorderRadiusField, null), /* @__PURE__ */ React39.createElement(PanelDivider, null), /* @__PURE__ */ React39.createElement(BorderField, null));
|
|
2632
2690
|
|
|
2633
2691
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2634
|
-
var
|
|
2635
|
-
var
|
|
2692
|
+
var React40 = __toESM(require("react"));
|
|
2693
|
+
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
2636
2694
|
var EffectsSection = () => {
|
|
2637
|
-
return /* @__PURE__ */
|
|
2695
|
+
return /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React40.createElement(import_editor_controls14.BoxShadowRepeaterControl, null)));
|
|
2638
2696
|
};
|
|
2639
2697
|
|
|
2640
2698
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2641
|
-
var
|
|
2642
|
-
var
|
|
2699
|
+
var React52 = __toESM(require("react"));
|
|
2700
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
2643
2701
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2644
|
-
var
|
|
2702
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
2645
2703
|
|
|
2646
2704
|
// src/hooks/use-computed-style.ts
|
|
2647
|
-
var
|
|
2705
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
2648
2706
|
function useComputedStyle(elementId) {
|
|
2649
|
-
return (0,
|
|
2707
|
+
return (0, import_editor_v1_adapters8.__privateUseListenTo)(
|
|
2650
2708
|
[
|
|
2651
|
-
(0,
|
|
2652
|
-
(0,
|
|
2653
|
-
(0,
|
|
2654
|
-
(0,
|
|
2709
|
+
(0, import_editor_v1_adapters8.windowEvent)("elementor/device-mode/change"),
|
|
2710
|
+
(0, import_editor_v1_adapters8.commandEndEvent)("document/elements/reset-style"),
|
|
2711
|
+
(0, import_editor_v1_adapters8.commandEndEvent)("document/elements/settings"),
|
|
2712
|
+
(0, import_editor_v1_adapters8.commandEndEvent)("document/elements/paste-style")
|
|
2655
2713
|
],
|
|
2656
2714
|
() => {
|
|
2657
2715
|
if (!elementId) {
|
|
@@ -2669,16 +2727,16 @@ function useComputedStyle(elementId) {
|
|
|
2669
2727
|
}
|
|
2670
2728
|
|
|
2671
2729
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2672
|
-
var
|
|
2673
|
-
var
|
|
2674
|
-
var
|
|
2675
|
-
var
|
|
2676
|
-
var
|
|
2730
|
+
var React42 = __toESM(require("react"));
|
|
2731
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2732
|
+
var import_icons9 = require("@elementor/icons");
|
|
2733
|
+
var import_ui34 = require("@elementor/ui");
|
|
2734
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
2677
2735
|
|
|
2678
2736
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2679
|
-
var
|
|
2680
|
-
var
|
|
2681
|
-
var
|
|
2737
|
+
var React41 = __toESM(require("react"));
|
|
2738
|
+
var import_react23 = require("react");
|
|
2739
|
+
var import_ui33 = require("@elementor/ui");
|
|
2682
2740
|
var CLOCKWISE_ANGLES = {
|
|
2683
2741
|
row: 0,
|
|
2684
2742
|
column: 90,
|
|
@@ -2698,13 +2756,13 @@ var RotatedIcon = ({
|
|
|
2698
2756
|
offset = 0,
|
|
2699
2757
|
disableRotationForReversed = false
|
|
2700
2758
|
}) => {
|
|
2701
|
-
const rotate = (0,
|
|
2759
|
+
const rotate = (0, import_react23.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2702
2760
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2703
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ React41.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2704
2762
|
};
|
|
2705
2763
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2706
2764
|
const [direction] = useStylesField("flex-direction");
|
|
2707
|
-
const isRtl = "rtl" === (0,
|
|
2765
|
+
const isRtl = "rtl" === (0, import_ui33.useTheme)().direction;
|
|
2708
2766
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2709
2767
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
2710
2768
|
const currentDirection = direction?.value || "row";
|
|
@@ -2719,8 +2777,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
2719
2777
|
};
|
|
2720
2778
|
|
|
2721
2779
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2722
|
-
var StartIcon = (0,
|
|
2723
|
-
var EndIcon = (0,
|
|
2780
|
+
var StartIcon = (0, import_ui34.withDirection)(import_icons9.JustifyTopIcon);
|
|
2781
|
+
var EndIcon = (0, import_ui34.withDirection)(import_icons9.JustifyBottomIcon);
|
|
2724
2782
|
var iconProps = {
|
|
2725
2783
|
isClockwise: false,
|
|
2726
2784
|
offset: 0,
|
|
@@ -2729,54 +2787,53 @@ var iconProps = {
|
|
|
2729
2787
|
var options = [
|
|
2730
2788
|
{
|
|
2731
2789
|
value: "start",
|
|
2732
|
-
label: (0,
|
|
2733
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2790
|
+
label: (0, import_i18n16.__)("Start", "elementor"),
|
|
2791
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2734
2792
|
showTooltip: true
|
|
2735
2793
|
},
|
|
2736
2794
|
{
|
|
2737
2795
|
value: "center",
|
|
2738
|
-
label: (0,
|
|
2739
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2796
|
+
label: (0, import_i18n16.__)("Center", "elementor"),
|
|
2797
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifyCenterIcon, size, ...iconProps }),
|
|
2740
2798
|
showTooltip: true
|
|
2741
2799
|
},
|
|
2742
2800
|
{
|
|
2743
2801
|
value: "end",
|
|
2744
|
-
label: (0,
|
|
2745
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2802
|
+
label: (0, import_i18n16.__)("End", "elementor"),
|
|
2803
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2746
2804
|
showTooltip: true
|
|
2747
2805
|
},
|
|
2748
2806
|
{
|
|
2749
2807
|
value: "space-between",
|
|
2750
|
-
label: (0,
|
|
2751
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2808
|
+
label: (0, import_i18n16.__)("Space between", "elementor"),
|
|
2809
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
2752
2810
|
showTooltip: true
|
|
2753
2811
|
},
|
|
2754
2812
|
{
|
|
2755
2813
|
value: "space-around",
|
|
2756
|
-
label: (0,
|
|
2757
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2814
|
+
label: (0, import_i18n16.__)("Space around", "elementor"),
|
|
2815
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
2758
2816
|
showTooltip: true
|
|
2759
2817
|
},
|
|
2760
2818
|
{
|
|
2761
2819
|
value: "space-evenly",
|
|
2762
|
-
label: (0,
|
|
2763
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2820
|
+
label: (0, import_i18n16.__)("Space evenly", "elementor"),
|
|
2821
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
2764
2822
|
showTooltip: true
|
|
2765
2823
|
}
|
|
2766
2824
|
];
|
|
2767
2825
|
var AlignContentField = () => {
|
|
2768
|
-
|
|
2769
|
-
return /* @__PURE__ */ React40.createElement(import_ui32.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(import_ui32.ThemeProvider, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React40.createElement(import_ui32.Stack, { gap: 1 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n15.__)("Align content", "elementor")), /* @__PURE__ */ React40.createElement(import_editor_controls14.ToggleControl, { options, fullWidth: true })))));
|
|
2826
|
+
return /* @__PURE__ */ React42.createElement(UiProviders, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React42.createElement(import_ui34.Stack, { gap: 1 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n16.__)("Align content", "elementor")), /* @__PURE__ */ React42.createElement(import_editor_controls15.ToggleControl, { options, fullWidth: true }))));
|
|
2770
2827
|
};
|
|
2771
2828
|
|
|
2772
2829
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2773
|
-
var
|
|
2774
|
-
var
|
|
2775
|
-
var
|
|
2776
|
-
var
|
|
2777
|
-
var
|
|
2778
|
-
var StartIcon2 = (0,
|
|
2779
|
-
var EndIcon2 = (0,
|
|
2830
|
+
var React43 = __toESM(require("react"));
|
|
2831
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2832
|
+
var import_icons10 = require("@elementor/icons");
|
|
2833
|
+
var import_ui35 = require("@elementor/ui");
|
|
2834
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
2835
|
+
var StartIcon2 = (0, import_ui35.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
2836
|
+
var EndIcon2 = (0, import_ui35.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
2780
2837
|
var iconProps2 = {
|
|
2781
2838
|
isClockwise: false,
|
|
2782
2839
|
offset: 90
|
|
@@ -2784,56 +2841,55 @@ var iconProps2 = {
|
|
|
2784
2841
|
var options2 = [
|
|
2785
2842
|
{
|
|
2786
2843
|
value: "start",
|
|
2787
|
-
label: (0,
|
|
2788
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2844
|
+
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
2845
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2789
2846
|
showTooltip: true
|
|
2790
2847
|
},
|
|
2791
2848
|
{
|
|
2792
2849
|
value: "center",
|
|
2793
|
-
label: (0,
|
|
2794
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2850
|
+
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
2851
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons10.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
2795
2852
|
showTooltip: true
|
|
2796
2853
|
},
|
|
2797
2854
|
{
|
|
2798
2855
|
value: "end",
|
|
2799
|
-
label: (0,
|
|
2800
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2856
|
+
label: (0, import_i18n17.__)("End", "elementor"),
|
|
2857
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2801
2858
|
showTooltip: true
|
|
2802
2859
|
},
|
|
2803
2860
|
{
|
|
2804
2861
|
value: "stretch",
|
|
2805
|
-
label: (0,
|
|
2806
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2862
|
+
label: (0, import_i18n17.__)("Stretch", "elementor"),
|
|
2863
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons10.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
2807
2864
|
showTooltip: true
|
|
2808
2865
|
}
|
|
2809
2866
|
];
|
|
2810
2867
|
var AlignItemsField = () => {
|
|
2811
|
-
|
|
2812
|
-
return /* @__PURE__ */ React41.createElement(import_ui33.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(import_ui33.ThemeProvider, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, (0, import_i18n16.__)("Align items", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React41.createElement(import_editor_controls15.ToggleControl, { options: options2 }))))));
|
|
2868
|
+
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n17.__)("Align items", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React43.createElement(import_editor_controls16.ToggleControl, { options: options2 })))));
|
|
2813
2869
|
};
|
|
2814
2870
|
|
|
2815
2871
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2816
|
-
var
|
|
2817
|
-
var
|
|
2818
|
-
var
|
|
2819
|
-
var
|
|
2820
|
-
var
|
|
2872
|
+
var React44 = __toESM(require("react"));
|
|
2873
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2874
|
+
var import_icons11 = require("@elementor/icons");
|
|
2875
|
+
var import_ui36 = require("@elementor/ui");
|
|
2876
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
2821
2877
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2822
2878
|
row: 90,
|
|
2823
2879
|
"row-reverse": 90,
|
|
2824
2880
|
column: 0,
|
|
2825
2881
|
"column-reverse": 0
|
|
2826
2882
|
};
|
|
2827
|
-
var StartIcon3 = (0,
|
|
2828
|
-
var EndIcon3 = (0,
|
|
2883
|
+
var StartIcon3 = (0, import_ui36.withDirection)(import_icons11.LayoutAlignLeftIcon);
|
|
2884
|
+
var EndIcon3 = (0, import_ui36.withDirection)(import_icons11.LayoutAlignRightIcon);
|
|
2829
2885
|
var iconProps3 = {
|
|
2830
2886
|
isClockwise: false
|
|
2831
2887
|
};
|
|
2832
2888
|
var getOptions = (parentStyleDirection) => [
|
|
2833
2889
|
{
|
|
2834
2890
|
value: "start",
|
|
2835
|
-
label: (0,
|
|
2836
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2891
|
+
label: (0, import_i18n18.__)("Start", "elementor"),
|
|
2892
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2837
2893
|
RotatedIcon,
|
|
2838
2894
|
{
|
|
2839
2895
|
icon: StartIcon3,
|
|
@@ -2846,11 +2902,11 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2846
2902
|
},
|
|
2847
2903
|
{
|
|
2848
2904
|
value: "center",
|
|
2849
|
-
label: (0,
|
|
2850
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2905
|
+
label: (0, import_i18n18.__)("Center", "elementor"),
|
|
2906
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2851
2907
|
RotatedIcon,
|
|
2852
2908
|
{
|
|
2853
|
-
icon:
|
|
2909
|
+
icon: import_icons11.LayoutAlignCenterIcon,
|
|
2854
2910
|
size,
|
|
2855
2911
|
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
2856
2912
|
...iconProps3
|
|
@@ -2860,8 +2916,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2860
2916
|
},
|
|
2861
2917
|
{
|
|
2862
2918
|
value: "end",
|
|
2863
|
-
label: (0,
|
|
2864
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2919
|
+
label: (0, import_i18n18.__)("End", "elementor"),
|
|
2920
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2865
2921
|
RotatedIcon,
|
|
2866
2922
|
{
|
|
2867
2923
|
icon: EndIcon3,
|
|
@@ -2874,11 +2930,11 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2874
2930
|
},
|
|
2875
2931
|
{
|
|
2876
2932
|
value: "stretch",
|
|
2877
|
-
label: (0,
|
|
2878
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2933
|
+
label: (0, import_i18n18.__)("Stretch", "elementor"),
|
|
2934
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2879
2935
|
RotatedIcon,
|
|
2880
2936
|
{
|
|
2881
|
-
icon:
|
|
2937
|
+
icon: import_icons11.LayoutDistributeVerticalIcon,
|
|
2882
2938
|
size,
|
|
2883
2939
|
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
2884
2940
|
...iconProps3
|
|
@@ -2888,108 +2944,106 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2888
2944
|
}
|
|
2889
2945
|
];
|
|
2890
2946
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2891
|
-
|
|
2892
|
-
return /* @__PURE__ */ React42.createElement(import_ui34.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(import_ui34.ThemeProvider, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React42.createElement(import_ui34.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n17.__)("Align self", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui34.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(import_editor_controls16.ToggleControl, { options: getOptions(parentStyleDirection) }))))));
|
|
2947
|
+
return /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, (0, import_i18n18.__)("Align self", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React44.createElement(import_editor_controls17.ToggleControl, { options: getOptions(parentStyleDirection) })))));
|
|
2893
2948
|
};
|
|
2894
2949
|
|
|
2895
2950
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2896
|
-
var
|
|
2897
|
-
var
|
|
2898
|
-
var
|
|
2899
|
-
var
|
|
2900
|
-
var
|
|
2951
|
+
var React45 = __toESM(require("react"));
|
|
2952
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
2953
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
2954
|
+
var import_ui37 = require("@elementor/ui");
|
|
2955
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
2901
2956
|
var displayFieldItems = [
|
|
2902
2957
|
{
|
|
2903
2958
|
value: "block",
|
|
2904
|
-
renderContent: () => (0,
|
|
2905
|
-
label: (0,
|
|
2959
|
+
renderContent: () => (0, import_i18n19.__)("Block", "elementor"),
|
|
2960
|
+
label: (0, import_i18n19.__)("Block", "elementor"),
|
|
2906
2961
|
showTooltip: true
|
|
2907
2962
|
},
|
|
2908
2963
|
{
|
|
2909
2964
|
value: "flex",
|
|
2910
|
-
renderContent: () => (0,
|
|
2911
|
-
label: (0,
|
|
2965
|
+
renderContent: () => (0, import_i18n19.__)("Flex", "elementor"),
|
|
2966
|
+
label: (0, import_i18n19.__)("Flex", "elementor"),
|
|
2912
2967
|
showTooltip: true
|
|
2913
2968
|
},
|
|
2914
2969
|
{
|
|
2915
2970
|
value: "inline-block",
|
|
2916
|
-
renderContent: () => (0,
|
|
2917
|
-
label: (0,
|
|
2971
|
+
renderContent: () => (0, import_i18n19.__)("In-blk", "elementor"),
|
|
2972
|
+
label: (0, import_i18n19.__)("Inline-block", "elementor"),
|
|
2918
2973
|
showTooltip: true
|
|
2919
2974
|
}
|
|
2920
2975
|
];
|
|
2921
2976
|
var DisplayField = () => {
|
|
2922
|
-
const isDisplayNoneFeatureActive = (0,
|
|
2977
|
+
const isDisplayNoneFeatureActive = (0, import_editor_v1_adapters9.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2923
2978
|
const items3 = [...displayFieldItems];
|
|
2924
2979
|
if (isDisplayNoneFeatureActive) {
|
|
2925
2980
|
items3.push({
|
|
2926
2981
|
value: "none",
|
|
2927
|
-
renderContent: () => (0,
|
|
2928
|
-
label: (0,
|
|
2982
|
+
renderContent: () => (0, import_i18n19.__)("None", "elementor"),
|
|
2983
|
+
label: (0, import_i18n19.__)("None", "elementor"),
|
|
2929
2984
|
showTooltip: true
|
|
2930
2985
|
});
|
|
2931
2986
|
}
|
|
2932
2987
|
items3.push({
|
|
2933
2988
|
value: "inline-flex",
|
|
2934
|
-
renderContent: () => (0,
|
|
2935
|
-
label: (0,
|
|
2989
|
+
renderContent: () => (0, import_i18n19.__)("In-flx", "elementor"),
|
|
2990
|
+
label: (0, import_i18n19.__)("Inline-flex", "elementor"),
|
|
2936
2991
|
showTooltip: true
|
|
2937
2992
|
});
|
|
2938
2993
|
const placeholder = useDisplayPlaceholderValue();
|
|
2939
|
-
return /* @__PURE__ */
|
|
2994
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React45.createElement(import_ui37.Stack, { gap: 0.75 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n19.__)("Display", "elementor")), /* @__PURE__ */ React45.createElement(import_editor_controls18.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2940
2995
|
};
|
|
2941
2996
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2942
2997
|
|
|
2943
2998
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2944
|
-
var
|
|
2945
|
-
var
|
|
2946
|
-
var
|
|
2947
|
-
var
|
|
2948
|
-
var
|
|
2999
|
+
var React46 = __toESM(require("react"));
|
|
3000
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3001
|
+
var import_icons12 = require("@elementor/icons");
|
|
3002
|
+
var import_ui38 = require("@elementor/ui");
|
|
3003
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
2949
3004
|
var options3 = [
|
|
2950
3005
|
{
|
|
2951
3006
|
value: "row",
|
|
2952
|
-
label: (0,
|
|
3007
|
+
label: (0, import_i18n20.__)("Row", "elementor"),
|
|
2953
3008
|
renderContent: ({ size }) => {
|
|
2954
|
-
const StartIcon5 = (0,
|
|
2955
|
-
return /* @__PURE__ */
|
|
3009
|
+
const StartIcon5 = (0, import_ui38.withDirection)(import_icons12.ArrowRightIcon);
|
|
3010
|
+
return /* @__PURE__ */ React46.createElement(StartIcon5, { fontSize: size });
|
|
2956
3011
|
},
|
|
2957
3012
|
showTooltip: true
|
|
2958
3013
|
},
|
|
2959
3014
|
{
|
|
2960
3015
|
value: "column",
|
|
2961
|
-
label: (0,
|
|
2962
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3016
|
+
label: (0, import_i18n20.__)("Column", "elementor"),
|
|
3017
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
2963
3018
|
showTooltip: true
|
|
2964
3019
|
},
|
|
2965
3020
|
{
|
|
2966
3021
|
value: "row-reverse",
|
|
2967
|
-
label: (0,
|
|
3022
|
+
label: (0, import_i18n20.__)("Reversed row", "elementor"),
|
|
2968
3023
|
renderContent: ({ size }) => {
|
|
2969
|
-
const EndIcon5 = (0,
|
|
2970
|
-
return /* @__PURE__ */
|
|
3024
|
+
const EndIcon5 = (0, import_ui38.withDirection)(import_icons12.ArrowLeftIcon);
|
|
3025
|
+
return /* @__PURE__ */ React46.createElement(EndIcon5, { fontSize: size });
|
|
2971
3026
|
},
|
|
2972
3027
|
showTooltip: true
|
|
2973
3028
|
},
|
|
2974
3029
|
{
|
|
2975
3030
|
value: "column-reverse",
|
|
2976
|
-
label: (0,
|
|
2977
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3031
|
+
label: (0, import_i18n20.__)("Reversed column", "elementor"),
|
|
3032
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
2978
3033
|
showTooltip: true
|
|
2979
3034
|
}
|
|
2980
3035
|
];
|
|
2981
3036
|
var FlexDirectionField = () => {
|
|
2982
|
-
|
|
2983
|
-
return /* @__PURE__ */ React44.createElement(import_ui36.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React44.createElement(import_ui36.ThemeProvider, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, (0, import_i18n19.__)("Direction", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React44.createElement(import_editor_controls18.ToggleControl, { options: options3 }))))));
|
|
3037
|
+
return /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n20.__)("Direction", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(import_editor_controls19.ToggleControl, { options: options3 })))));
|
|
2984
3038
|
};
|
|
2985
3039
|
|
|
2986
3040
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2987
|
-
var
|
|
2988
|
-
var
|
|
2989
|
-
var
|
|
2990
|
-
var
|
|
2991
|
-
var
|
|
2992
|
-
var
|
|
3041
|
+
var React47 = __toESM(require("react"));
|
|
3042
|
+
var import_react24 = require("react");
|
|
3043
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3044
|
+
var import_icons13 = require("@elementor/icons");
|
|
3045
|
+
var import_ui39 = require("@elementor/ui");
|
|
3046
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
2993
3047
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
2994
3048
|
var LAST_DEFAULT_VALUE = 99999;
|
|
2995
3049
|
var FIRST = "first";
|
|
@@ -3002,28 +3056,27 @@ var orderValueMap = {
|
|
|
3002
3056
|
var items = [
|
|
3003
3057
|
{
|
|
3004
3058
|
value: FIRST,
|
|
3005
|
-
label: (0,
|
|
3006
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3059
|
+
label: (0, import_i18n21.__)("First", "elementor"),
|
|
3060
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons13.ArrowUpSmallIcon, { fontSize: size }),
|
|
3007
3061
|
showTooltip: true
|
|
3008
3062
|
},
|
|
3009
3063
|
{
|
|
3010
3064
|
value: LAST,
|
|
3011
|
-
label: (0,
|
|
3012
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3065
|
+
label: (0, import_i18n21.__)("Last", "elementor"),
|
|
3066
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons13.ArrowDownSmallIcon, { fontSize: size }),
|
|
3013
3067
|
showTooltip: true
|
|
3014
3068
|
},
|
|
3015
3069
|
{
|
|
3016
3070
|
value: CUSTOM,
|
|
3017
|
-
label: (0,
|
|
3018
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3071
|
+
label: (0, import_i18n21.__)("Custom", "elementor"),
|
|
3072
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
3019
3073
|
showTooltip: true
|
|
3020
3074
|
}
|
|
3021
3075
|
];
|
|
3022
3076
|
var FlexOrderField = () => {
|
|
3023
|
-
const { isSiteRtl } = useDirection();
|
|
3024
3077
|
const [order, setOrder] = useStylesField("order");
|
|
3025
3078
|
const { canEdit } = useStyle();
|
|
3026
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
3079
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react24.useState)(getGroupControlValue(order?.value || null));
|
|
3027
3080
|
const handleToggleButtonChange = (group) => {
|
|
3028
3081
|
setGroupControlValue(group);
|
|
3029
3082
|
if (!group || group === CUSTOM) {
|
|
@@ -3032,8 +3085,8 @@ var FlexOrderField = () => {
|
|
|
3032
3085
|
}
|
|
3033
3086
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3034
3087
|
};
|
|
3035
|
-
return /* @__PURE__ */
|
|
3036
|
-
|
|
3088
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n21.__)("Order", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(
|
|
3089
|
+
import_editor_controls20.ControlToggleButtonGroup,
|
|
3037
3090
|
{
|
|
3038
3091
|
items,
|
|
3039
3092
|
value: groupControlValue,
|
|
@@ -3041,14 +3094,14 @@ var FlexOrderField = () => {
|
|
|
3041
3094
|
exclusive: true,
|
|
3042
3095
|
disabled: !canEdit
|
|
3043
3096
|
}
|
|
3044
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
3045
|
-
|
|
3097
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n21.__)("Custom order", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(
|
|
3098
|
+
import_editor_controls20.NumberControl,
|
|
3046
3099
|
{
|
|
3047
3100
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3048
3101
|
max: LAST_DEFAULT_VALUE - 1,
|
|
3049
3102
|
shouldForceInt: true
|
|
3050
3103
|
}
|
|
3051
|
-
))))))
|
|
3104
|
+
))))));
|
|
3052
3105
|
};
|
|
3053
3106
|
var getGroupControlValue = (order) => {
|
|
3054
3107
|
if (LAST_DEFAULT_VALUE === order) {
|
|
@@ -3061,42 +3114,41 @@ var getGroupControlValue = (order) => {
|
|
|
3061
3114
|
};
|
|
3062
3115
|
|
|
3063
3116
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3064
|
-
var
|
|
3065
|
-
var
|
|
3066
|
-
var
|
|
3117
|
+
var React48 = __toESM(require("react"));
|
|
3118
|
+
var import_react25 = require("react");
|
|
3119
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3067
3120
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
3068
|
-
var
|
|
3069
|
-
var
|
|
3070
|
-
var
|
|
3121
|
+
var import_icons14 = require("@elementor/icons");
|
|
3122
|
+
var import_ui40 = require("@elementor/ui");
|
|
3123
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
3071
3124
|
var DEFAULT = 1;
|
|
3072
3125
|
var items2 = [
|
|
3073
3126
|
{
|
|
3074
3127
|
value: "flex-grow",
|
|
3075
|
-
label: (0,
|
|
3076
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3128
|
+
label: (0, import_i18n22.__)("Grow", "elementor"),
|
|
3129
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons14.ExpandIcon, { fontSize: size }),
|
|
3077
3130
|
showTooltip: true
|
|
3078
3131
|
},
|
|
3079
3132
|
{
|
|
3080
3133
|
value: "flex-shrink",
|
|
3081
|
-
label: (0,
|
|
3082
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3134
|
+
label: (0, import_i18n22.__)("Shrink", "elementor"),
|
|
3135
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons14.ShrinkIcon, { fontSize: size }),
|
|
3083
3136
|
showTooltip: true
|
|
3084
3137
|
},
|
|
3085
3138
|
{
|
|
3086
3139
|
value: "custom",
|
|
3087
|
-
label: (0,
|
|
3088
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3140
|
+
label: (0, import_i18n22.__)("Custom", "elementor"),
|
|
3141
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons14.PencilIcon, { fontSize: size }),
|
|
3089
3142
|
showTooltip: true
|
|
3090
3143
|
}
|
|
3091
3144
|
];
|
|
3092
3145
|
var FlexSizeField = () => {
|
|
3093
|
-
const { isSiteRtl } = useDirection();
|
|
3094
3146
|
const { canEdit } = useStyle();
|
|
3095
3147
|
const [fields, setFields] = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
3096
3148
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
3097
3149
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
3098
3150
|
const basis = fields?.["flex-basis"]?.value || null;
|
|
3099
|
-
const currentGroup = (0,
|
|
3151
|
+
const currentGroup = (0, import_react25.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
3100
3152
|
const onChangeGroup = (group = null) => {
|
|
3101
3153
|
setActiveGroup(group);
|
|
3102
3154
|
if (!group || group === "custom") {
|
|
@@ -3121,8 +3173,8 @@ var FlexSizeField = () => {
|
|
|
3121
3173
|
"flex-shrink": import_editor_props8.numberPropTypeUtil.create(DEFAULT)
|
|
3122
3174
|
});
|
|
3123
3175
|
};
|
|
3124
|
-
return /* @__PURE__ */
|
|
3125
|
-
|
|
3176
|
+
return /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Size", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3177
|
+
import_editor_controls21.ControlToggleButtonGroup,
|
|
3126
3178
|
{
|
|
3127
3179
|
value: activeGroup,
|
|
3128
3180
|
onChange: onChangeGroup,
|
|
@@ -3130,9 +3182,12 @@ var FlexSizeField = () => {
|
|
|
3130
3182
|
items: items2,
|
|
3131
3183
|
exclusive: true
|
|
3132
3184
|
}
|
|
3133
|
-
)))), "custom" === activeGroup && /* @__PURE__ */
|
|
3185
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React48.createElement(FlexCustomField, null)));
|
|
3186
|
+
};
|
|
3187
|
+
var FlexCustomField = () => {
|
|
3188
|
+
const flexBasisRowRef = (0, import_react25.useRef)();
|
|
3189
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Grow", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Shrink", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: flexBasisRowRef }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Basis", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(import_editor_controls21.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3134
3190
|
};
|
|
3135
|
-
var FlexCustomField = () => /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n21.__)("Grow", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(import_editor_controls20.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n21.__)("Shrink", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(import_editor_controls20.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n21.__)("Basis", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(import_editor_controls20.SizeControl, { extendedValues: ["auto"] })))));
|
|
3136
3191
|
var getActiveGroup = ({
|
|
3137
3192
|
grow,
|
|
3138
3193
|
shrink,
|
|
@@ -3154,22 +3209,22 @@ var getActiveGroup = ({
|
|
|
3154
3209
|
};
|
|
3155
3210
|
|
|
3156
3211
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3157
|
-
var
|
|
3158
|
-
var
|
|
3159
|
-
var
|
|
3160
|
-
var
|
|
3212
|
+
var React49 = __toESM(require("react"));
|
|
3213
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3214
|
+
var import_ui41 = require("@elementor/ui");
|
|
3215
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3161
3216
|
var GapControlField = () => {
|
|
3162
|
-
return /* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ React49.createElement(import_ui41.Stack, { gap: 1 }, /* @__PURE__ */ React49.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React49.createElement(import_editor_controls22.GapControl, { label: (0, import_i18n23.__)("Gaps", "elementor") })));
|
|
3163
3218
|
};
|
|
3164
3219
|
|
|
3165
3220
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3166
|
-
var
|
|
3167
|
-
var
|
|
3168
|
-
var
|
|
3169
|
-
var
|
|
3170
|
-
var
|
|
3171
|
-
var StartIcon4 = (0,
|
|
3172
|
-
var EndIcon4 = (0,
|
|
3221
|
+
var React50 = __toESM(require("react"));
|
|
3222
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3223
|
+
var import_icons15 = require("@elementor/icons");
|
|
3224
|
+
var import_ui42 = require("@elementor/ui");
|
|
3225
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3226
|
+
var StartIcon4 = (0, import_ui42.withDirection)(import_icons15.JustifyTopIcon);
|
|
3227
|
+
var EndIcon4 = (0, import_ui42.withDirection)(import_icons15.JustifyBottomIcon);
|
|
3173
3228
|
var iconProps4 = {
|
|
3174
3229
|
isClockwise: true,
|
|
3175
3230
|
offset: -90
|
|
@@ -3177,75 +3232,73 @@ var iconProps4 = {
|
|
|
3177
3232
|
var options4 = [
|
|
3178
3233
|
{
|
|
3179
3234
|
value: "flex-start",
|
|
3180
|
-
label: (0,
|
|
3181
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3235
|
+
label: (0, import_i18n24.__)("Start", "elementor"),
|
|
3236
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3182
3237
|
showTooltip: true
|
|
3183
3238
|
},
|
|
3184
3239
|
{
|
|
3185
3240
|
value: "center",
|
|
3186
|
-
label: (0,
|
|
3187
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3241
|
+
label: (0, import_i18n24.__)("Center", "elementor"),
|
|
3242
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifyCenterIcon, size, ...iconProps4 }),
|
|
3188
3243
|
showTooltip: true
|
|
3189
3244
|
},
|
|
3190
3245
|
{
|
|
3191
3246
|
value: "flex-end",
|
|
3192
|
-
label: (0,
|
|
3193
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3247
|
+
label: (0, import_i18n24.__)("End", "elementor"),
|
|
3248
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3194
3249
|
showTooltip: true
|
|
3195
3250
|
},
|
|
3196
3251
|
{
|
|
3197
3252
|
value: "space-between",
|
|
3198
|
-
label: (0,
|
|
3199
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3253
|
+
label: (0, import_i18n24.__)("Space between", "elementor"),
|
|
3254
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
3200
3255
|
showTooltip: true
|
|
3201
3256
|
},
|
|
3202
3257
|
{
|
|
3203
3258
|
value: "space-around",
|
|
3204
|
-
label: (0,
|
|
3205
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3259
|
+
label: (0, import_i18n24.__)("Space around", "elementor"),
|
|
3260
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
3206
3261
|
showTooltip: true
|
|
3207
3262
|
},
|
|
3208
3263
|
{
|
|
3209
3264
|
value: "space-evenly",
|
|
3210
|
-
label: (0,
|
|
3211
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3265
|
+
label: (0, import_i18n24.__)("Space evenly", "elementor"),
|
|
3266
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
3212
3267
|
showTooltip: true
|
|
3213
3268
|
}
|
|
3214
3269
|
];
|
|
3215
3270
|
var JustifyContentField = () => {
|
|
3216
|
-
|
|
3217
|
-
return /* @__PURE__ */ React48.createElement(import_ui40.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React48.createElement(import_ui40.ThemeProvider, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React48.createElement(import_ui40.Stack, { gap: 0.75 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n23.__)("Justify content", "elementor")), /* @__PURE__ */ React48.createElement(import_editor_controls22.ToggleControl, { options: options4, fullWidth: true })))));
|
|
3271
|
+
return /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React50.createElement(import_ui42.Stack, { gap: 0.75 }, /* @__PURE__ */ React50.createElement(ControlLabel, null, (0, import_i18n24.__)("Justify content", "elementor")), /* @__PURE__ */ React50.createElement(import_editor_controls23.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3218
3272
|
};
|
|
3219
3273
|
|
|
3220
3274
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3221
|
-
var
|
|
3222
|
-
var
|
|
3223
|
-
var
|
|
3224
|
-
var
|
|
3225
|
-
var
|
|
3275
|
+
var React51 = __toESM(require("react"));
|
|
3276
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3277
|
+
var import_icons16 = require("@elementor/icons");
|
|
3278
|
+
var import_ui43 = require("@elementor/ui");
|
|
3279
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3226
3280
|
var options5 = [
|
|
3227
3281
|
{
|
|
3228
3282
|
value: "nowrap",
|
|
3229
|
-
label: (0,
|
|
3230
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3283
|
+
label: (0, import_i18n25.__)("No wrap", "elementor"),
|
|
3284
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.ArrowRightIcon, { fontSize: size }),
|
|
3231
3285
|
showTooltip: true
|
|
3232
3286
|
},
|
|
3233
3287
|
{
|
|
3234
3288
|
value: "wrap",
|
|
3235
|
-
label: (0,
|
|
3236
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3289
|
+
label: (0, import_i18n25.__)("Wrap", "elementor"),
|
|
3290
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.ArrowBackIcon, { fontSize: size }),
|
|
3237
3291
|
showTooltip: true
|
|
3238
3292
|
},
|
|
3239
3293
|
{
|
|
3240
3294
|
value: "wrap-reverse",
|
|
3241
|
-
label: (0,
|
|
3242
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3295
|
+
label: (0, import_i18n25.__)("Reversed wrap", "elementor"),
|
|
3296
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.ArrowForwardIcon, { fontSize: size }),
|
|
3243
3297
|
showTooltip: true
|
|
3244
3298
|
}
|
|
3245
3299
|
];
|
|
3246
3300
|
var WrapField = () => {
|
|
3247
|
-
|
|
3248
|
-
return /* @__PURE__ */ React49.createElement(import_ui41.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React49.createElement(import_ui41.ThemeProvider, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n24.__)("Wrap", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls23.ToggleControl, { options: options5 }))))));
|
|
3301
|
+
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React51.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, (0, import_i18n25.__)("Wrap", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React51.createElement(import_editor_controls24.ToggleControl, { options: options5 })))));
|
|
3249
3302
|
};
|
|
3250
3303
|
|
|
3251
3304
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -3257,13 +3310,13 @@ var LayoutSection = () => {
|
|
|
3257
3310
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
3258
3311
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3259
3312
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3260
|
-
return /* @__PURE__ */
|
|
3313
|
+
return /* @__PURE__ */ React52.createElement(SectionContent, null, /* @__PURE__ */ React52.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React52.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React52.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3261
3314
|
};
|
|
3262
3315
|
var FlexFields = () => {
|
|
3263
3316
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
3264
|
-
return /* @__PURE__ */
|
|
3317
|
+
return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(FlexDirectionField, null), /* @__PURE__ */ React52.createElement(JustifyContentField, null), /* @__PURE__ */ React52.createElement(AlignItemsField, null), /* @__PURE__ */ React52.createElement(PanelDivider, null), /* @__PURE__ */ React52.createElement(GapControlField, null), /* @__PURE__ */ React52.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React52.createElement(AlignContentField, null));
|
|
3265
3318
|
};
|
|
3266
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3319
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(PanelDivider, null), /* @__PURE__ */ React52.createElement(import_editor_controls25.ControlFormLabel, null, (0, import_i18n26.__)("Flex child", "elementor")), /* @__PURE__ */ React52.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React52.createElement(FlexOrderField, null), /* @__PURE__ */ React52.createElement(FlexSizeField, null));
|
|
3267
3320
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3268
3321
|
const value = display?.value ?? local?.value;
|
|
3269
3322
|
if (!value) {
|
|
@@ -3273,66 +3326,86 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3273
3326
|
};
|
|
3274
3327
|
|
|
3275
3328
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3276
|
-
var
|
|
3277
|
-
var
|
|
3329
|
+
var React57 = __toESM(require("react"));
|
|
3330
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
3278
3331
|
var import_session3 = require("@elementor/session");
|
|
3279
3332
|
|
|
3280
3333
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3281
|
-
var
|
|
3282
|
-
var
|
|
3283
|
-
var
|
|
3284
|
-
var
|
|
3285
|
-
var
|
|
3286
|
-
var
|
|
3287
|
-
var
|
|
3334
|
+
var React53 = __toESM(require("react"));
|
|
3335
|
+
var import_react26 = require("react");
|
|
3336
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
3337
|
+
var import_icons17 = require("@elementor/icons");
|
|
3338
|
+
var import_ui44 = require("@elementor/ui");
|
|
3339
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
3340
|
+
var InlineStartIcon2 = (0, import_ui44.withDirection)(import_icons17.SideLeftIcon);
|
|
3341
|
+
var InlineEndIcon2 = (0, import_ui44.withDirection)(import_icons17.SideRightIcon);
|
|
3288
3342
|
var sideIcons = {
|
|
3289
|
-
"inset-block-start": /* @__PURE__ */
|
|
3290
|
-
"inset-block-end": /* @__PURE__ */
|
|
3291
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3292
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3343
|
+
"inset-block-start": /* @__PURE__ */ React53.createElement(import_icons17.SideTopIcon, { fontSize: "tiny" }),
|
|
3344
|
+
"inset-block-end": /* @__PURE__ */ React53.createElement(import_icons17.SideBottomIcon, { fontSize: "tiny" }),
|
|
3345
|
+
"inset-inline-start": /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3346
|
+
"inset-inline-end": /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3293
3347
|
};
|
|
3294
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3295
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3348
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n27.__)("Right", "elementor") : (0, import_i18n27.__)("Left", "elementor");
|
|
3349
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n27.__)("Left", "elementor") : (0, import_i18n27.__)("Right", "elementor");
|
|
3296
3350
|
var DimensionsField = () => {
|
|
3297
3351
|
const { isSiteRtl } = useDirection();
|
|
3298
|
-
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
|
-
|
|
3352
|
+
const rowRefs = [(0, import_react26.useRef)(), (0, import_react26.useRef)()];
|
|
3353
|
+
return /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(import_ui44.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React53.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n27.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React53.createElement(
|
|
3354
|
+
DimensionField,
|
|
3355
|
+
{
|
|
3356
|
+
side: "inset-inline-end",
|
|
3357
|
+
label: getInlineEndLabel(isSiteRtl),
|
|
3358
|
+
rowRef: rowRefs[0]
|
|
3359
|
+
}
|
|
3360
|
+
)), /* @__PURE__ */ React53.createElement(import_ui44.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React53.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n27.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React53.createElement(
|
|
3361
|
+
DimensionField,
|
|
3362
|
+
{
|
|
3363
|
+
side: "inset-inline-start",
|
|
3364
|
+
label: getInlineStartLabel(isSiteRtl),
|
|
3365
|
+
rowRef: rowRefs[1]
|
|
3366
|
+
}
|
|
3367
|
+
)));
|
|
3302
3368
|
};
|
|
3369
|
+
var DimensionField = ({
|
|
3370
|
+
side,
|
|
3371
|
+
label,
|
|
3372
|
+
rowRef
|
|
3373
|
+
}) => /* @__PURE__ */ React53.createElement(StylesField, { bind: side }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, label)), /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(import_editor_controls26.SizeControl, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3303
3374
|
|
|
3304
3375
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3305
|
-
var
|
|
3306
|
-
var
|
|
3307
|
-
var
|
|
3308
|
-
var
|
|
3376
|
+
var React54 = __toESM(require("react"));
|
|
3377
|
+
var import_react27 = require("react");
|
|
3378
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3379
|
+
var import_ui45 = require("@elementor/ui");
|
|
3380
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
3309
3381
|
var OffsetField = () => {
|
|
3310
|
-
|
|
3382
|
+
const rowRef = (0, import_react27.useRef)();
|
|
3383
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n28.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls27.SizeControl, { units: ["px", "em", "rem", "vw", "vh"], anchorRef: rowRef }))));
|
|
3311
3384
|
};
|
|
3312
3385
|
|
|
3313
3386
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3314
|
-
var
|
|
3315
|
-
var
|
|
3316
|
-
var
|
|
3317
|
-
var
|
|
3387
|
+
var React55 = __toESM(require("react"));
|
|
3388
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3389
|
+
var import_ui46 = require("@elementor/ui");
|
|
3390
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
3318
3391
|
var positionOptions = [
|
|
3319
|
-
{ label: (0,
|
|
3320
|
-
{ label: (0,
|
|
3321
|
-
{ label: (0,
|
|
3322
|
-
{ label: (0,
|
|
3323
|
-
{ label: (0,
|
|
3392
|
+
{ label: (0, import_i18n29.__)("Static", "elementor"), value: "static" },
|
|
3393
|
+
{ label: (0, import_i18n29.__)("Relative", "elementor"), value: "relative" },
|
|
3394
|
+
{ label: (0, import_i18n29.__)("Absolute", "elementor"), value: "absolute" },
|
|
3395
|
+
{ label: (0, import_i18n29.__)("Fixed", "elementor"), value: "fixed" },
|
|
3396
|
+
{ label: (0, import_i18n29.__)("Sticky", "elementor"), value: "sticky" }
|
|
3324
3397
|
];
|
|
3325
3398
|
var PositionField = ({ onChange }) => {
|
|
3326
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, (0, import_i18n29.__)("Position", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React55.createElement(import_editor_controls28.SelectControl, { options: positionOptions, onChange }))));
|
|
3327
3400
|
};
|
|
3328
3401
|
|
|
3329
3402
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3330
|
-
var
|
|
3331
|
-
var
|
|
3332
|
-
var
|
|
3333
|
-
var
|
|
3403
|
+
var React56 = __toESM(require("react"));
|
|
3404
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3405
|
+
var import_ui47 = require("@elementor/ui");
|
|
3406
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
3334
3407
|
var ZIndexField = () => {
|
|
3335
|
-
return /* @__PURE__ */
|
|
3408
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, (0, import_i18n30.__)("Z-index", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls29.NumberControl, null))));
|
|
3336
3409
|
};
|
|
3337
3410
|
|
|
3338
3411
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -3345,7 +3418,7 @@ var PositionSection = () => {
|
|
|
3345
3418
|
"inset-inline-end"
|
|
3346
3419
|
]);
|
|
3347
3420
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3348
|
-
const isCssIdFeatureActive = (0,
|
|
3421
|
+
const isCssIdFeatureActive = (0, import_editor_v1_adapters10.isExperimentActive)("e_v_3_30");
|
|
3349
3422
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3350
3423
|
if (newPosition === "static") {
|
|
3351
3424
|
if (dimensionsValues) {
|
|
@@ -3365,7 +3438,7 @@ var PositionSection = () => {
|
|
|
3365
3438
|
}
|
|
3366
3439
|
};
|
|
3367
3440
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3368
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ React57.createElement(SectionContent, null, /* @__PURE__ */ React57.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(DimensionsField, null), /* @__PURE__ */ React57.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(PanelDivider, null), /* @__PURE__ */ React57.createElement(OffsetField, null)));
|
|
3369
3442
|
};
|
|
3370
3443
|
var usePersistDimensions = () => {
|
|
3371
3444
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3375,179 +3448,258 @@ var usePersistDimensions = () => {
|
|
|
3375
3448
|
};
|
|
3376
3449
|
|
|
3377
3450
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3378
|
-
var
|
|
3379
|
-
var
|
|
3380
|
-
var
|
|
3381
|
-
var
|
|
3382
|
-
var
|
|
3451
|
+
var React63 = __toESM(require("react"));
|
|
3452
|
+
var import_react28 = require("react");
|
|
3453
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
3454
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
3455
|
+
var import_ui52 = require("@elementor/ui");
|
|
3456
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
3383
3457
|
|
|
3384
|
-
// src/components/collapsible-content.tsx
|
|
3385
|
-
var
|
|
3386
|
-
var
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
var
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
), /* @__PURE__ */
|
|
3458
|
+
// src/components/style-tab-collapsible-content.tsx
|
|
3459
|
+
var React59 = __toESM(require("react"));
|
|
3460
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
3461
|
+
|
|
3462
|
+
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3463
|
+
var React58 = __toESM(require("react"));
|
|
3464
|
+
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
3465
|
+
var import_ui48 = require("@elementor/ui");
|
|
3466
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
3467
|
+
var orderedVariants = ["global", "local", "overridden"];
|
|
3468
|
+
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3469
|
+
const { id, meta } = useStyle();
|
|
3470
|
+
const snapshot = useStylesInheritanceSnapshot();
|
|
3471
|
+
const snapshotFields = Object.fromEntries(
|
|
3472
|
+
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
3473
|
+
);
|
|
3474
|
+
const indicators = getIndicators(snapshotFields, id ?? "", meta);
|
|
3475
|
+
if (Object.values(indicators).filter(Boolean).length === 0) {
|
|
3476
|
+
return null;
|
|
3477
|
+
}
|
|
3478
|
+
const hasActualValues = (0, import_i18n31.__)("Has effective styles", "elementor");
|
|
3479
|
+
const hasOverriddenValues = (0, import_i18n31.__)("Has overridden styles", "elementor");
|
|
3480
|
+
return /* @__PURE__ */ React58.createElement(import_ui48.Tooltip, { title: (0, import_i18n31.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React58.createElement(import_ui48.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, orderedVariants.map(
|
|
3481
|
+
(variant) => indicators[variant] && /* @__PURE__ */ React58.createElement(
|
|
3482
|
+
StyleIndicator,
|
|
3483
|
+
{
|
|
3484
|
+
key: variant,
|
|
3485
|
+
variant,
|
|
3486
|
+
"data-variant": variant,
|
|
3487
|
+
role: "listitem",
|
|
3488
|
+
"aria-label": variant === "overridden" ? hasOverriddenValues : hasActualValues
|
|
3489
|
+
}
|
|
3490
|
+
)
|
|
3491
|
+
)));
|
|
3407
3492
|
};
|
|
3493
|
+
function getIndicators(snapshotFields, styleId, meta) {
|
|
3494
|
+
const indicators = {};
|
|
3495
|
+
Object.values(snapshotFields).forEach((inheritanceChain) => {
|
|
3496
|
+
const currentStyle = getCurrentStyleFromChain(inheritanceChain, styleId, meta);
|
|
3497
|
+
if (!currentStyle) {
|
|
3498
|
+
return;
|
|
3499
|
+
}
|
|
3500
|
+
const [actualStyle] = inheritanceChain;
|
|
3501
|
+
if (currentStyle === actualStyle) {
|
|
3502
|
+
const providerKey = actualStyle.provider ?? "";
|
|
3503
|
+
if ((0, import_editor_styles_repository11.isElementsStylesProvider)(providerKey)) {
|
|
3504
|
+
indicators.local = true;
|
|
3505
|
+
return;
|
|
3506
|
+
}
|
|
3507
|
+
if (providerKey !== import_editor_styles_repository11.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
3508
|
+
indicators.global = true;
|
|
3509
|
+
}
|
|
3510
|
+
return;
|
|
3511
|
+
}
|
|
3512
|
+
indicators.overridden = true;
|
|
3513
|
+
});
|
|
3514
|
+
return indicators;
|
|
3515
|
+
}
|
|
3516
|
+
function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
3517
|
+
return chain.find(
|
|
3518
|
+
({
|
|
3519
|
+
style: { id },
|
|
3520
|
+
variant: {
|
|
3521
|
+
meta: { breakpoint, state }
|
|
3522
|
+
}
|
|
3523
|
+
}) => id === styleId && breakpoint === meta.breakpoint && state === meta.state
|
|
3524
|
+
);
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
// src/components/style-tab-collapsible-content.tsx
|
|
3528
|
+
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3529
|
+
return /* @__PURE__ */ React59.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3530
|
+
};
|
|
3531
|
+
function getStylesInheritanceIndicators(fields) {
|
|
3532
|
+
const isUsingFieldsIndicators = (0, import_editor_v1_adapters11.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3533
|
+
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3534
|
+
return null;
|
|
3535
|
+
}
|
|
3536
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React59.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3537
|
+
}
|
|
3408
3538
|
|
|
3409
3539
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3410
|
-
var
|
|
3411
|
-
var
|
|
3412
|
-
var
|
|
3413
|
-
var
|
|
3540
|
+
var React60 = __toESM(require("react"));
|
|
3541
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3542
|
+
var import_ui49 = require("@elementor/ui");
|
|
3543
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
3414
3544
|
var positionOptions2 = [
|
|
3415
|
-
{ label: (0,
|
|
3416
|
-
{ label: (0,
|
|
3417
|
-
{ label: (0,
|
|
3418
|
-
{ label: (0,
|
|
3419
|
-
{ label: (0,
|
|
3545
|
+
{ label: (0, import_i18n32.__)("Fill", "elementor"), value: "fill" },
|
|
3546
|
+
{ label: (0, import_i18n32.__)("Cover", "elementor"), value: "cover" },
|
|
3547
|
+
{ label: (0, import_i18n32.__)("Contain", "elementor"), value: "contain" },
|
|
3548
|
+
{ label: (0, import_i18n32.__)("None", "elementor"), value: "none" },
|
|
3549
|
+
{ label: (0, import_i18n32.__)("Scale down", "elementor"), value: "scale-down" }
|
|
3420
3550
|
];
|
|
3421
3551
|
var ObjectFitField = () => {
|
|
3422
|
-
return /* @__PURE__ */
|
|
3552
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React60.createElement(import_ui49.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n32.__)("Object fit", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui49.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React60.createElement(import_editor_controls30.SelectControl, { options: positionOptions2 }))));
|
|
3423
3553
|
};
|
|
3424
3554
|
|
|
3425
3555
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3426
|
-
var
|
|
3427
|
-
var
|
|
3428
|
-
var
|
|
3429
|
-
var
|
|
3556
|
+
var React61 = __toESM(require("react"));
|
|
3557
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3558
|
+
var import_ui50 = require("@elementor/ui");
|
|
3559
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
3430
3560
|
var positionOptions3 = [
|
|
3431
|
-
{ label: (0,
|
|
3432
|
-
{ label: (0,
|
|
3433
|
-
{ label: (0,
|
|
3434
|
-
{ label: (0,
|
|
3435
|
-
{ label: (0,
|
|
3436
|
-
{ label: (0,
|
|
3437
|
-
{ label: (0,
|
|
3438
|
-
{ label: (0,
|
|
3439
|
-
{ label: (0,
|
|
3561
|
+
{ label: (0, import_i18n33.__)("Center center", "elementor"), value: "center center" },
|
|
3562
|
+
{ label: (0, import_i18n33.__)("Center left", "elementor"), value: "center left" },
|
|
3563
|
+
{ label: (0, import_i18n33.__)("Center right", "elementor"), value: "center right" },
|
|
3564
|
+
{ label: (0, import_i18n33.__)("Top center", "elementor"), value: "top center" },
|
|
3565
|
+
{ label: (0, import_i18n33.__)("Top left", "elementor"), value: "top left" },
|
|
3566
|
+
{ label: (0, import_i18n33.__)("Top right", "elementor"), value: "top right" },
|
|
3567
|
+
{ label: (0, import_i18n33.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
3568
|
+
{ label: (0, import_i18n33.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
3569
|
+
{ label: (0, import_i18n33.__)("Bottom right", "elementor"), value: "bottom right" }
|
|
3440
3570
|
];
|
|
3441
3571
|
var ObjectPositionField = () => {
|
|
3442
|
-
return /* @__PURE__ */
|
|
3572
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n33.__)("Object position", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React61.createElement(import_editor_controls31.SelectControl, { options: positionOptions3 }))));
|
|
3443
3573
|
};
|
|
3444
3574
|
|
|
3445
3575
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3446
|
-
var
|
|
3447
|
-
var
|
|
3448
|
-
var
|
|
3449
|
-
var
|
|
3450
|
-
var
|
|
3576
|
+
var React62 = __toESM(require("react"));
|
|
3577
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3578
|
+
var import_icons18 = require("@elementor/icons");
|
|
3579
|
+
var import_ui51 = require("@elementor/ui");
|
|
3580
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
3451
3581
|
var options6 = [
|
|
3452
3582
|
{
|
|
3453
3583
|
value: "visible",
|
|
3454
|
-
label: (0,
|
|
3455
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3584
|
+
label: (0, import_i18n34.__)("Visible", "elementor"),
|
|
3585
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons18.EyeIcon, { fontSize: size }),
|
|
3456
3586
|
showTooltip: true
|
|
3457
3587
|
},
|
|
3458
3588
|
{
|
|
3459
3589
|
value: "hidden",
|
|
3460
|
-
label: (0,
|
|
3461
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3590
|
+
label: (0, import_i18n34.__)("Hidden", "elementor"),
|
|
3591
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons18.EyeOffIcon, { fontSize: size }),
|
|
3462
3592
|
showTooltip: true
|
|
3463
3593
|
},
|
|
3464
3594
|
{
|
|
3465
3595
|
value: "auto",
|
|
3466
|
-
label: (0,
|
|
3467
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3596
|
+
label: (0, import_i18n34.__)("Auto", "elementor"),
|
|
3597
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons18.LetterAIcon, { fontSize: size }),
|
|
3468
3598
|
showTooltip: true
|
|
3469
3599
|
}
|
|
3470
3600
|
];
|
|
3471
3601
|
var OverflowField = () => {
|
|
3472
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n34.__)("Overflow", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React62.createElement(import_editor_controls32.ToggleControl, { options: options6 }))));
|
|
3473
3603
|
};
|
|
3474
3604
|
|
|
3475
3605
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3476
|
-
var
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
const isVersion330Active = (0, import_editor_v1_adapters10.isExperimentActive)("e_v_3_30");
|
|
3480
|
-
return /* @__PURE__ */ React60.createElement(SectionContent, null, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(SizeField, { bind: "width", label: (0, import_i18n34.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(SizeField, { bind: "height", label: (0, import_i18n34.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React60.createElement(import_ui50.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(
|
|
3481
|
-
SizeField,
|
|
3606
|
+
var EXPERIMENT_ID = "e_v_3_30";
|
|
3607
|
+
var CssSizeProps = [
|
|
3608
|
+
[
|
|
3482
3609
|
{
|
|
3483
|
-
bind: "
|
|
3484
|
-
label: (0,
|
|
3485
|
-
|
|
3610
|
+
bind: "width",
|
|
3611
|
+
label: (0, import_i18n35.__)("Width", "elementor")
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
bind: "height",
|
|
3615
|
+
label: (0, import_i18n35.__)("Height", "elementor")
|
|
3486
3616
|
}
|
|
3487
|
-
|
|
3488
|
-
|
|
3617
|
+
],
|
|
3618
|
+
[
|
|
3619
|
+
{
|
|
3620
|
+
bind: "min-width",
|
|
3621
|
+
label: (0, import_i18n35.__)("Min width", "elementor")
|
|
3622
|
+
},
|
|
3489
3623
|
{
|
|
3490
3624
|
bind: "min-height",
|
|
3491
|
-
label: (0,
|
|
3492
|
-
extendedValues: ["auto"]
|
|
3625
|
+
label: (0, import_i18n35.__)("Min height", "elementor")
|
|
3493
3626
|
}
|
|
3494
|
-
|
|
3627
|
+
],
|
|
3628
|
+
[
|
|
3629
|
+
{
|
|
3630
|
+
bind: "max-width",
|
|
3631
|
+
label: (0, import_i18n35.__)("Max width", "elementor")
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
bind: "max-height",
|
|
3635
|
+
label: (0, import_i18n35.__)("Max height", "elementor")
|
|
3636
|
+
}
|
|
3637
|
+
]
|
|
3638
|
+
];
|
|
3639
|
+
var SizeSection = () => {
|
|
3640
|
+
const [fitValue] = useStylesField("object-fit");
|
|
3641
|
+
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3642
|
+
const gridRowRefs = [(0, import_react28.useRef)(), (0, import_react28.useRef)(), (0, import_react28.useRef)()];
|
|
3643
|
+
const isVersion330Active = (0, import_editor_v1_adapters12.isExperimentActive)(EXPERIMENT_ID);
|
|
3644
|
+
return /* @__PURE__ */ React63.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React63.createElement(import_ui52.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React63.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(import_ui52.Stack, null, /* @__PURE__ */ React63.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React63.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React63.createElement(import_ui52.Stack, { gap: 2 }, /* @__PURE__ */ React63.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React63.createElement(import_editor_controls33.AspectRatioControl, { label: (0, import_i18n35.__)("Aspect Ratio", "elementor") })), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ObjectPositionField, null)))));
|
|
3495
3645
|
};
|
|
3496
|
-
var SizeField = ({ label, bind,
|
|
3497
|
-
return /* @__PURE__ */
|
|
3646
|
+
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3647
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind }, /* @__PURE__ */ React63.createElement(import_ui52.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, label)), /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React63.createElement(import_editor_controls33.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
3498
3648
|
};
|
|
3499
3649
|
|
|
3500
3650
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3501
|
-
var
|
|
3502
|
-
var
|
|
3503
|
-
var
|
|
3651
|
+
var React64 = __toESM(require("react"));
|
|
3652
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
3653
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
3504
3654
|
var SpacingSection = () => {
|
|
3505
3655
|
const { isSiteRtl } = useDirection();
|
|
3506
|
-
return /* @__PURE__ */
|
|
3507
|
-
|
|
3656
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, /* @__PURE__ */ React64.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React64.createElement(
|
|
3657
|
+
import_editor_controls34.LinkedDimensionsControl,
|
|
3508
3658
|
{
|
|
3509
|
-
label: (0,
|
|
3659
|
+
label: (0, import_i18n36.__)("Margin", "elementor"),
|
|
3510
3660
|
isSiteRtl,
|
|
3511
|
-
|
|
3661
|
+
extendedOptions: ["auto"]
|
|
3512
3662
|
}
|
|
3513
|
-
)), /* @__PURE__ */
|
|
3663
|
+
)), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React64.createElement(import_editor_controls34.LinkedDimensionsControl, { label: (0, import_i18n36.__)("Padding", "elementor"), isSiteRtl })));
|
|
3514
3664
|
};
|
|
3515
3665
|
|
|
3516
3666
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3517
|
-
var
|
|
3518
|
-
var
|
|
3667
|
+
var React80 = __toESM(require("react"));
|
|
3668
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
3519
3669
|
|
|
3520
3670
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3521
|
-
var
|
|
3522
|
-
var
|
|
3523
|
-
var
|
|
3524
|
-
var
|
|
3671
|
+
var React65 = __toESM(require("react"));
|
|
3672
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
3673
|
+
var import_ui53 = require("@elementor/ui");
|
|
3674
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
3525
3675
|
var ColumnCountField = () => {
|
|
3526
|
-
return /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React65.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, (0, import_i18n37.__)("Columns", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(import_editor_controls35.NumberControl, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
3527
3677
|
};
|
|
3528
3678
|
|
|
3529
3679
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3530
|
-
var
|
|
3531
|
-
var
|
|
3532
|
-
var
|
|
3533
|
-
var
|
|
3680
|
+
var React66 = __toESM(require("react"));
|
|
3681
|
+
var import_react29 = require("react");
|
|
3682
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
3683
|
+
var import_ui54 = require("@elementor/ui");
|
|
3684
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
3534
3685
|
var ColumnGapField = () => {
|
|
3535
|
-
|
|
3686
|
+
const rowRef = (0, import_react29.useRef)();
|
|
3687
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React66.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React66.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, (0, import_i18n38.__)("Column gap", "elementor"))), /* @__PURE__ */ React66.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(import_editor_controls36.SizeControl, { anchorRef: rowRef }))));
|
|
3536
3688
|
};
|
|
3537
3689
|
|
|
3538
3690
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3539
|
-
var
|
|
3540
|
-
var
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3691
|
+
var React67 = __toESM(require("react"));
|
|
3692
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3693
|
+
var import_ui55 = require("@elementor/ui");
|
|
3694
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
3543
3695
|
|
|
3544
3696
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3545
|
-
var
|
|
3546
|
-
var
|
|
3697
|
+
var import_react30 = require("react");
|
|
3698
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
3547
3699
|
var supportedCategories = {
|
|
3548
|
-
system: (0,
|
|
3549
|
-
custom: (0,
|
|
3550
|
-
googlefonts: (0,
|
|
3700
|
+
system: (0, import_i18n39.__)("System", "elementor"),
|
|
3701
|
+
custom: (0, import_i18n39.__)("Custom Fonts", "elementor"),
|
|
3702
|
+
googlefonts: (0, import_i18n39.__)("Google Fonts", "elementor")
|
|
3551
3703
|
};
|
|
3552
3704
|
var getFontFamilies = () => {
|
|
3553
3705
|
const { controls } = getElementorConfig();
|
|
@@ -3559,7 +3711,7 @@ var getFontFamilies = () => {
|
|
|
3559
3711
|
};
|
|
3560
3712
|
var useFontFamilies = () => {
|
|
3561
3713
|
const fontFamilies = getFontFamilies();
|
|
3562
|
-
return (0,
|
|
3714
|
+
return (0, import_react30.useMemo)(() => {
|
|
3563
3715
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
3564
3716
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
3565
3717
|
if (!supportedCategories[category]) {
|
|
@@ -3584,188 +3736,194 @@ var FontFamilyField = () => {
|
|
|
3584
3736
|
if (fontFamilies.length === 0) {
|
|
3585
3737
|
return null;
|
|
3586
3738
|
}
|
|
3587
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React67.createElement(import_ui55.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, (0, import_i18n40.__)("Font family", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui55.Grid, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React67.createElement(import_editor_controls37.FontFamilyControl, { fontFamilies }))));
|
|
3588
3740
|
};
|
|
3589
3741
|
|
|
3590
3742
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3591
|
-
var
|
|
3592
|
-
var
|
|
3593
|
-
var
|
|
3594
|
-
var
|
|
3743
|
+
var React68 = __toESM(require("react"));
|
|
3744
|
+
var import_react31 = require("react");
|
|
3745
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3746
|
+
var import_ui56 = require("@elementor/ui");
|
|
3747
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
3595
3748
|
var FontSizeField = () => {
|
|
3596
|
-
|
|
3749
|
+
const rowRef = (0, import_react31.useRef)();
|
|
3750
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React68.createElement(import_ui56.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React68.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, (0, import_i18n41.__)("Font size", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(import_editor_controls38.SizeControl, { anchorRef: rowRef }))));
|
|
3597
3751
|
};
|
|
3598
3752
|
|
|
3599
3753
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3600
|
-
var
|
|
3601
|
-
var
|
|
3602
|
-
var
|
|
3603
|
-
var
|
|
3604
|
-
var
|
|
3754
|
+
var React69 = __toESM(require("react"));
|
|
3755
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3756
|
+
var import_icons19 = require("@elementor/icons");
|
|
3757
|
+
var import_ui57 = require("@elementor/ui");
|
|
3758
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
3605
3759
|
var options7 = [
|
|
3606
3760
|
{
|
|
3607
3761
|
value: "normal",
|
|
3608
|
-
label: (0,
|
|
3609
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3762
|
+
label: (0, import_i18n42.__)("Normal", "elementor"),
|
|
3763
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
3610
3764
|
showTooltip: true
|
|
3611
3765
|
},
|
|
3612
3766
|
{
|
|
3613
3767
|
value: "italic",
|
|
3614
|
-
label: (0,
|
|
3615
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3768
|
+
label: (0, import_i18n42.__)("Italic", "elementor"),
|
|
3769
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons19.ItalicIcon, { fontSize: size }),
|
|
3616
3770
|
showTooltip: true
|
|
3617
3771
|
}
|
|
3618
3772
|
];
|
|
3619
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3773
|
+
var FontStyleField = () => /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React69.createElement(import_ui57.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(import_editor_controls39.ControlFormLabel, null, (0, import_i18n42.__)("Font style", "elementor"))), /* @__PURE__ */ React69.createElement(import_ui57.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React69.createElement(import_editor_controls39.ToggleControl, { options: options7 }))));
|
|
3620
3774
|
|
|
3621
3775
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3622
|
-
var
|
|
3623
|
-
var
|
|
3624
|
-
var
|
|
3625
|
-
var
|
|
3776
|
+
var React70 = __toESM(require("react"));
|
|
3777
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
3778
|
+
var import_ui58 = require("@elementor/ui");
|
|
3779
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
3626
3780
|
var fontWeightOptions = [
|
|
3627
|
-
{ value: "100", label: (0,
|
|
3628
|
-
{ value: "200", label: (0,
|
|
3629
|
-
{ value: "300", label: (0,
|
|
3630
|
-
{ value: "400", label: (0,
|
|
3631
|
-
{ value: "500", label: (0,
|
|
3632
|
-
{ value: "600", label: (0,
|
|
3633
|
-
{ value: "700", label: (0,
|
|
3634
|
-
{ value: "800", label: (0,
|
|
3635
|
-
{ value: "900", label: (0,
|
|
3781
|
+
{ value: "100", label: (0, import_i18n43.__)("100 - Thin", "elementor") },
|
|
3782
|
+
{ value: "200", label: (0, import_i18n43.__)("200 - Extra light", "elementor") },
|
|
3783
|
+
{ value: "300", label: (0, import_i18n43.__)("300 - Light", "elementor") },
|
|
3784
|
+
{ value: "400", label: (0, import_i18n43.__)("400 - Normal", "elementor") },
|
|
3785
|
+
{ value: "500", label: (0, import_i18n43.__)("500 - Medium", "elementor") },
|
|
3786
|
+
{ value: "600", label: (0, import_i18n43.__)("600 - Semi bold", "elementor") },
|
|
3787
|
+
{ value: "700", label: (0, import_i18n43.__)("700 - Bold", "elementor") },
|
|
3788
|
+
{ value: "800", label: (0, import_i18n43.__)("800 - Extra bold", "elementor") },
|
|
3789
|
+
{ value: "900", label: (0, import_i18n43.__)("900 - Black", "elementor") }
|
|
3636
3790
|
];
|
|
3637
3791
|
var FontWeightField = () => {
|
|
3638
|
-
return /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React70.createElement(import_ui58.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(ControlLabel, null, (0, import_i18n43.__)("Font weight", "elementor"))), /* @__PURE__ */ React70.createElement(import_ui58.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React70.createElement(import_editor_controls40.SelectControl, { options: fontWeightOptions }))));
|
|
3639
3793
|
};
|
|
3640
3794
|
|
|
3641
3795
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3642
|
-
var
|
|
3643
|
-
var
|
|
3644
|
-
var
|
|
3645
|
-
var
|
|
3796
|
+
var React71 = __toESM(require("react"));
|
|
3797
|
+
var import_react32 = require("react");
|
|
3798
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3799
|
+
var import_ui59 = require("@elementor/ui");
|
|
3800
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
3646
3801
|
var LetterSpacingField = () => {
|
|
3647
|
-
|
|
3802
|
+
const rowRef = (0, import_react32.useRef)();
|
|
3803
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React71.createElement(import_ui59.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React71.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, (0, import_i18n44.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React71.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(import_editor_controls41.SizeControl, { anchorRef: rowRef }))));
|
|
3648
3804
|
};
|
|
3649
3805
|
|
|
3650
3806
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3651
|
-
var
|
|
3652
|
-
var
|
|
3653
|
-
var
|
|
3654
|
-
var
|
|
3807
|
+
var React72 = __toESM(require("react"));
|
|
3808
|
+
var import_react33 = require("react");
|
|
3809
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3810
|
+
var import_ui60 = require("@elementor/ui");
|
|
3811
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
3655
3812
|
var LineHeightField = () => {
|
|
3656
|
-
|
|
3813
|
+
const rowRef = (0, import_react33.useRef)();
|
|
3814
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React72.createElement(import_ui60.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React72.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, (0, import_i18n45.__)("Line height", "elementor"))), /* @__PURE__ */ React72.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef }))));
|
|
3657
3815
|
};
|
|
3658
3816
|
|
|
3659
3817
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3660
|
-
var
|
|
3661
|
-
var
|
|
3662
|
-
var
|
|
3663
|
-
var
|
|
3664
|
-
var
|
|
3665
|
-
var AlignStartIcon = (0,
|
|
3666
|
-
var AlignEndIcon = (0,
|
|
3818
|
+
var React73 = __toESM(require("react"));
|
|
3819
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3820
|
+
var import_icons20 = require("@elementor/icons");
|
|
3821
|
+
var import_ui61 = require("@elementor/ui");
|
|
3822
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
3823
|
+
var AlignStartIcon = (0, import_ui61.withDirection)(import_icons20.AlignLeftIcon);
|
|
3824
|
+
var AlignEndIcon = (0, import_ui61.withDirection)(import_icons20.AlignRightIcon);
|
|
3667
3825
|
var options8 = [
|
|
3668
3826
|
{
|
|
3669
3827
|
value: "start",
|
|
3670
|
-
label: (0,
|
|
3671
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3828
|
+
label: (0, import_i18n46.__)("Start", "elementor"),
|
|
3829
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignStartIcon, { fontSize: size }),
|
|
3672
3830
|
showTooltip: true
|
|
3673
3831
|
},
|
|
3674
3832
|
{
|
|
3675
3833
|
value: "center",
|
|
3676
|
-
label: (0,
|
|
3677
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3834
|
+
label: (0, import_i18n46.__)("Center", "elementor"),
|
|
3835
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(import_icons20.AlignCenterIcon, { fontSize: size }),
|
|
3678
3836
|
showTooltip: true
|
|
3679
3837
|
},
|
|
3680
3838
|
{
|
|
3681
3839
|
value: "end",
|
|
3682
|
-
label: (0,
|
|
3683
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3840
|
+
label: (0, import_i18n46.__)("End", "elementor"),
|
|
3841
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignEndIcon, { fontSize: size }),
|
|
3684
3842
|
showTooltip: true
|
|
3685
3843
|
},
|
|
3686
3844
|
{
|
|
3687
3845
|
value: "justify",
|
|
3688
|
-
label: (0,
|
|
3689
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3846
|
+
label: (0, import_i18n46.__)("Justify", "elementor"),
|
|
3847
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(import_icons20.AlignJustifiedIcon, { fontSize: size }),
|
|
3690
3848
|
showTooltip: true
|
|
3691
3849
|
}
|
|
3692
3850
|
];
|
|
3693
3851
|
var TextAlignmentField = () => {
|
|
3694
|
-
return /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ React73.createElement(UiProviders, null, /* @__PURE__ */ React73.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React73.createElement(import_ui61.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React73.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, (0, import_i18n46.__)("Text align", "elementor"))), /* @__PURE__ */ React73.createElement(import_ui61.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React73.createElement(import_editor_controls43.ToggleControl, { options: options8 })))));
|
|
3695
3853
|
};
|
|
3696
3854
|
|
|
3697
3855
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3698
|
-
var
|
|
3699
|
-
var
|
|
3700
|
-
var
|
|
3701
|
-
var
|
|
3856
|
+
var React74 = __toESM(require("react"));
|
|
3857
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3858
|
+
var import_ui62 = require("@elementor/ui");
|
|
3859
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
3702
3860
|
var TextColorField = () => {
|
|
3703
|
-
return /* @__PURE__ */
|
|
3861
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React74.createElement(import_ui62.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React74.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlLabel, null, (0, import_i18n47.__)("Text color", "elementor"))), /* @__PURE__ */ React74.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(import_editor_controls44.ColorControl, null))));
|
|
3704
3862
|
};
|
|
3705
3863
|
|
|
3706
3864
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3707
|
-
var
|
|
3708
|
-
var
|
|
3709
|
-
var
|
|
3710
|
-
var
|
|
3711
|
-
var
|
|
3865
|
+
var React75 = __toESM(require("react"));
|
|
3866
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3867
|
+
var import_icons21 = require("@elementor/icons");
|
|
3868
|
+
var import_ui63 = require("@elementor/ui");
|
|
3869
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
3712
3870
|
var options9 = [
|
|
3713
3871
|
{
|
|
3714
3872
|
value: "none",
|
|
3715
|
-
label: (0,
|
|
3716
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3873
|
+
label: (0, import_i18n48.__)("None", "elementor"),
|
|
3874
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
3717
3875
|
showTooltip: true,
|
|
3718
3876
|
exclusive: true
|
|
3719
3877
|
},
|
|
3720
3878
|
{
|
|
3721
3879
|
value: "underline",
|
|
3722
|
-
label: (0,
|
|
3723
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3880
|
+
label: (0, import_i18n48.__)("Underline", "elementor"),
|
|
3881
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.UnderlineIcon, { fontSize: size }),
|
|
3724
3882
|
showTooltip: true
|
|
3725
3883
|
},
|
|
3726
3884
|
{
|
|
3727
3885
|
value: "line-through",
|
|
3728
|
-
label: (0,
|
|
3729
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3886
|
+
label: (0, import_i18n48.__)("Line-through", "elementor"),
|
|
3887
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.StrikethroughIcon, { fontSize: size }),
|
|
3730
3888
|
showTooltip: true
|
|
3731
3889
|
},
|
|
3732
3890
|
{
|
|
3733
3891
|
value: "overline",
|
|
3734
|
-
label: (0,
|
|
3735
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3892
|
+
label: (0, import_i18n48.__)("Overline", "elementor"),
|
|
3893
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.OverlineIcon, { fontSize: size }),
|
|
3736
3894
|
showTooltip: true
|
|
3737
3895
|
}
|
|
3738
3896
|
];
|
|
3739
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3897
|
+
var TextDecorationField = () => /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React75.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React75.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, (0, import_i18n48.__)("Line decoration", "elementor"))), /* @__PURE__ */ React75.createElement(import_ui63.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React75.createElement(import_editor_controls45.ToggleControl, { options: options9, exclusive: false }))));
|
|
3740
3898
|
|
|
3741
3899
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3742
|
-
var
|
|
3743
|
-
var
|
|
3744
|
-
var
|
|
3745
|
-
var
|
|
3746
|
-
var
|
|
3900
|
+
var React76 = __toESM(require("react"));
|
|
3901
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3902
|
+
var import_icons22 = require("@elementor/icons");
|
|
3903
|
+
var import_ui64 = require("@elementor/ui");
|
|
3904
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
3747
3905
|
var options10 = [
|
|
3748
3906
|
{
|
|
3749
3907
|
value: "ltr",
|
|
3750
|
-
label: (0,
|
|
3751
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3908
|
+
label: (0, import_i18n49.__)("Left to right", "elementor"),
|
|
3909
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.TextDirectionLtrIcon, { fontSize: size }),
|
|
3752
3910
|
showTooltip: true
|
|
3753
3911
|
},
|
|
3754
3912
|
{
|
|
3755
3913
|
value: "rtl",
|
|
3756
|
-
label: (0,
|
|
3757
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3914
|
+
label: (0, import_i18n49.__)("Right to left", "elementor"),
|
|
3915
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.TextDirectionRtlIcon, { fontSize: size }),
|
|
3758
3916
|
showTooltip: true
|
|
3759
3917
|
}
|
|
3760
3918
|
];
|
|
3761
3919
|
var TextDirectionField = () => {
|
|
3762
|
-
return /* @__PURE__ */
|
|
3920
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React76.createElement(import_ui64.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React76.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, (0, import_i18n49.__)("Direction", "elementor"))), /* @__PURE__ */ React76.createElement(import_ui64.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React76.createElement(import_editor_controls46.ToggleControl, { options: options10 }))));
|
|
3763
3921
|
};
|
|
3764
3922
|
|
|
3765
3923
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3766
|
-
var
|
|
3767
|
-
var
|
|
3768
|
-
var
|
|
3924
|
+
var React77 = __toESM(require("react"));
|
|
3925
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
3926
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
3769
3927
|
var initTextStroke = {
|
|
3770
3928
|
$$type: "stroke",
|
|
3771
3929
|
value: {
|
|
@@ -3792,68 +3950,97 @@ var TextStrokeField = () => {
|
|
|
3792
3950
|
setTextStroke(null);
|
|
3793
3951
|
};
|
|
3794
3952
|
const hasTextStroke = Boolean(textStroke);
|
|
3795
|
-
return /* @__PURE__ */
|
|
3953
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React77.createElement(
|
|
3796
3954
|
AddOrRemoveContent,
|
|
3797
3955
|
{
|
|
3798
|
-
label: (0, import_i18n49.__)("Text stroke", "elementor"),
|
|
3799
3956
|
isAdded: hasTextStroke,
|
|
3800
3957
|
onAdd: addTextStroke,
|
|
3801
3958
|
onRemove: removeTextStroke,
|
|
3802
|
-
disabled: !canEdit
|
|
3959
|
+
disabled: !canEdit,
|
|
3960
|
+
renderLabel: () => /* @__PURE__ */ React77.createElement(ControlLabel, null, (0, import_i18n50.__)("Text stroke", "elementor"))
|
|
3803
3961
|
},
|
|
3804
|
-
/* @__PURE__ */
|
|
3962
|
+
/* @__PURE__ */ React77.createElement(import_editor_controls47.StrokeControl, null)
|
|
3805
3963
|
));
|
|
3806
3964
|
};
|
|
3807
3965
|
|
|
3808
3966
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3809
|
-
var
|
|
3810
|
-
var
|
|
3811
|
-
var
|
|
3812
|
-
var
|
|
3813
|
-
var
|
|
3967
|
+
var React78 = __toESM(require("react"));
|
|
3968
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3969
|
+
var import_icons23 = require("@elementor/icons");
|
|
3970
|
+
var import_ui65 = require("@elementor/ui");
|
|
3971
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
3814
3972
|
var options11 = [
|
|
3815
3973
|
{
|
|
3816
3974
|
value: "none",
|
|
3817
|
-
label: (0,
|
|
3818
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3975
|
+
label: (0, import_i18n51.__)("None", "elementor"),
|
|
3976
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.MinusIcon, { fontSize: size }),
|
|
3819
3977
|
showTooltip: true
|
|
3820
3978
|
},
|
|
3821
3979
|
{
|
|
3822
3980
|
value: "capitalize",
|
|
3823
|
-
label: (0,
|
|
3824
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3981
|
+
label: (0, import_i18n51.__)("Capitalize", "elementor"),
|
|
3982
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.LetterCaseIcon, { fontSize: size }),
|
|
3825
3983
|
showTooltip: true
|
|
3826
3984
|
},
|
|
3827
3985
|
{
|
|
3828
3986
|
value: "uppercase",
|
|
3829
|
-
label: (0,
|
|
3830
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3987
|
+
label: (0, import_i18n51.__)("Uppercase", "elementor"),
|
|
3988
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.LetterCaseUpperIcon, { fontSize: size }),
|
|
3831
3989
|
showTooltip: true
|
|
3832
3990
|
},
|
|
3833
3991
|
{
|
|
3834
3992
|
value: "lowercase",
|
|
3835
|
-
label: (0,
|
|
3836
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3993
|
+
label: (0, import_i18n51.__)("Lowercase", "elementor"),
|
|
3994
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.LetterCaseLowerIcon, { fontSize: size }),
|
|
3837
3995
|
showTooltip: true
|
|
3838
3996
|
}
|
|
3839
3997
|
];
|
|
3840
|
-
var TransformField = () => /* @__PURE__ */
|
|
3998
|
+
var TransformField = () => /* @__PURE__ */ React78.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React78.createElement(import_ui65.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React78.createElement(import_ui65.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React78.createElement(ControlLabel, null, (0, import_i18n51.__)("Text transform", "elementor"))), /* @__PURE__ */ React78.createElement(import_ui65.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React78.createElement(import_editor_controls48.ToggleControl, { options: options11 }))));
|
|
3841
3999
|
|
|
3842
4000
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3843
|
-
var
|
|
3844
|
-
var
|
|
3845
|
-
var
|
|
3846
|
-
var
|
|
4001
|
+
var React79 = __toESM(require("react"));
|
|
4002
|
+
var import_react34 = require("react");
|
|
4003
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
4004
|
+
var import_ui66 = require("@elementor/ui");
|
|
4005
|
+
var import_i18n52 = require("@wordpress/i18n");
|
|
3847
4006
|
var WordSpacingField = () => {
|
|
3848
|
-
|
|
4007
|
+
const rowRef = (0, import_react34.useRef)();
|
|
4008
|
+
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React79.createElement(import_ui66.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React79.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(ControlLabel, null, (0, import_i18n52.__)("Word spacing", "elementor"))), /* @__PURE__ */ React79.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(import_editor_controls49.SizeControl, { anchorRef: rowRef }))));
|
|
3849
4009
|
};
|
|
3850
4010
|
|
|
3851
4011
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3852
4012
|
var TypographySection = () => {
|
|
3853
4013
|
const [columnCount] = useStylesField("column-count");
|
|
3854
|
-
const isVersion330Active = (0,
|
|
4014
|
+
const isVersion330Active = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
3855
4015
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
3856
|
-
return /* @__PURE__ */
|
|
4016
|
+
return /* @__PURE__ */ React80.createElement(SectionContent, null, /* @__PURE__ */ React80.createElement(FontFamilyField, null), /* @__PURE__ */ React80.createElement(FontWeightField, null), /* @__PURE__ */ React80.createElement(FontSizeField, null), /* @__PURE__ */ React80.createElement(PanelDivider, null), /* @__PURE__ */ React80.createElement(TextAlignmentField, null), /* @__PURE__ */ React80.createElement(TextColorField, null), /* @__PURE__ */ React80.createElement(
|
|
4017
|
+
StyleTabCollapsibleContent,
|
|
4018
|
+
{
|
|
4019
|
+
fields: [
|
|
4020
|
+
"line-height",
|
|
4021
|
+
"letter-spacing",
|
|
4022
|
+
"word-spacing",
|
|
4023
|
+
"column-count",
|
|
4024
|
+
"text-decoration",
|
|
4025
|
+
"text-transform",
|
|
4026
|
+
"direction",
|
|
4027
|
+
"font-style",
|
|
4028
|
+
"stroke"
|
|
4029
|
+
]
|
|
4030
|
+
},
|
|
4031
|
+
/* @__PURE__ */ React80.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React80.createElement(LineHeightField, null), /* @__PURE__ */ React80.createElement(LetterSpacingField, null), /* @__PURE__ */ React80.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React80.createElement(React80.Fragment, null, /* @__PURE__ */ React80.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React80.createElement(ColumnGapField, null)), /* @__PURE__ */ React80.createElement(PanelDivider, null), /* @__PURE__ */ React80.createElement(TextDecorationField, null), /* @__PURE__ */ React80.createElement(TransformField, null), /* @__PURE__ */ React80.createElement(TextDirectionField, null), /* @__PURE__ */ React80.createElement(FontStyleField, null), /* @__PURE__ */ React80.createElement(TextStrokeField, null))
|
|
4032
|
+
));
|
|
4033
|
+
};
|
|
4034
|
+
|
|
4035
|
+
// src/components/style-tab-section.tsx
|
|
4036
|
+
var React81 = __toESM(require("react"));
|
|
4037
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
4038
|
+
var StyleTabSection = ({ section, fields = [] }) => {
|
|
4039
|
+
const { component, name, title } = section;
|
|
4040
|
+
const tabDefaults = useDefaultPanelSettings();
|
|
4041
|
+
const SectionComponent = component;
|
|
4042
|
+
const isExpanded = (0, import_editor_v1_adapters14.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
4043
|
+
return /* @__PURE__ */ React81.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React81.createElement(SectionComponent, null));
|
|
3857
4044
|
};
|
|
3858
4045
|
|
|
3859
4046
|
// src/components/style-tab.tsx
|
|
@@ -3865,19 +4052,12 @@ var stickyHeaderStyles = {
|
|
|
3865
4052
|
backgroundColor: "background.default",
|
|
3866
4053
|
transition: "top 300ms ease"
|
|
3867
4054
|
};
|
|
3868
|
-
var PanelSection = ({ section }) => {
|
|
3869
|
-
const { component, name, title } = section;
|
|
3870
|
-
const tabDefaults = useDefaultPanelSettings();
|
|
3871
|
-
const SectionComponent = component;
|
|
3872
|
-
const isExpanded = (0, import_editor_v1_adapters12.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
3873
|
-
return /* @__PURE__ */ React78.createElement(Section, { title, defaultExpanded: isExpanded }, /* @__PURE__ */ React78.createElement(SectionComponent, null));
|
|
3874
|
-
};
|
|
3875
4055
|
var StyleTab = () => {
|
|
3876
4056
|
const currentClassesProp = useCurrentClassesProp();
|
|
3877
4057
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
3878
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4058
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react35.useState)(null);
|
|
3879
4059
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
3880
|
-
return /* @__PURE__ */
|
|
4060
|
+
return /* @__PURE__ */ React82.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React82.createElement(
|
|
3881
4061
|
StyleProvider,
|
|
3882
4062
|
{
|
|
3883
4063
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -3888,84 +4068,126 @@ var StyleTab = () => {
|
|
|
3888
4068
|
},
|
|
3889
4069
|
setMetaState: setActiveStyleState
|
|
3890
4070
|
},
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
|
|
4071
|
+
/* @__PURE__ */ React82.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React82.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React82.createElement(ClassesHeader, null, /* @__PURE__ */ React82.createElement(CssClassSelector, null), /* @__PURE__ */ React82.createElement(import_ui67.Divider, null)), /* @__PURE__ */ React82.createElement(SectionsList, null, /* @__PURE__ */ React82.createElement(
|
|
4072
|
+
StyleTabSection,
|
|
3893
4073
|
{
|
|
3894
4074
|
section: {
|
|
3895
4075
|
component: LayoutSection,
|
|
3896
4076
|
name: "Layout",
|
|
3897
|
-
title: (0,
|
|
3898
|
-
}
|
|
4077
|
+
title: (0, import_i18n53.__)("Layout", "elementor")
|
|
4078
|
+
},
|
|
4079
|
+
fields: [
|
|
4080
|
+
"display",
|
|
4081
|
+
"flex-direction",
|
|
4082
|
+
"flex-wrap",
|
|
4083
|
+
"justify-content",
|
|
4084
|
+
"align-items",
|
|
4085
|
+
"align-content",
|
|
4086
|
+
"align-self",
|
|
4087
|
+
"gap"
|
|
4088
|
+
]
|
|
3899
4089
|
}
|
|
3900
|
-
), /* @__PURE__ */
|
|
3901
|
-
|
|
4090
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4091
|
+
StyleTabSection,
|
|
3902
4092
|
{
|
|
3903
4093
|
section: {
|
|
3904
4094
|
component: SpacingSection,
|
|
3905
4095
|
name: "Spacing",
|
|
3906
|
-
title: (0,
|
|
3907
|
-
}
|
|
4096
|
+
title: (0, import_i18n53.__)("Spacing", "elementor")
|
|
4097
|
+
},
|
|
4098
|
+
fields: ["margin", "padding"]
|
|
3908
4099
|
}
|
|
3909
|
-
), /* @__PURE__ */
|
|
3910
|
-
|
|
4100
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4101
|
+
StyleTabSection,
|
|
3911
4102
|
{
|
|
3912
4103
|
section: {
|
|
3913
4104
|
component: SizeSection,
|
|
3914
4105
|
name: "Size",
|
|
3915
|
-
title: (0,
|
|
3916
|
-
}
|
|
4106
|
+
title: (0, import_i18n53.__)("Size", "elementor")
|
|
4107
|
+
},
|
|
4108
|
+
fields: [
|
|
4109
|
+
"width",
|
|
4110
|
+
"min-width",
|
|
4111
|
+
"max-width",
|
|
4112
|
+
"height",
|
|
4113
|
+
"min-height",
|
|
4114
|
+
"max-height",
|
|
4115
|
+
"overflow",
|
|
4116
|
+
"aspect-ratio",
|
|
4117
|
+
"object-fit"
|
|
4118
|
+
]
|
|
3917
4119
|
}
|
|
3918
|
-
), /* @__PURE__ */
|
|
3919
|
-
|
|
4120
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4121
|
+
StyleTabSection,
|
|
3920
4122
|
{
|
|
3921
4123
|
section: {
|
|
3922
4124
|
component: PositionSection,
|
|
3923
4125
|
name: "Position",
|
|
3924
|
-
title: (0,
|
|
3925
|
-
}
|
|
4126
|
+
title: (0, import_i18n53.__)("Position", "elementor")
|
|
4127
|
+
},
|
|
4128
|
+
fields: ["position", "z-index", "scroll-margin-top"]
|
|
3926
4129
|
}
|
|
3927
|
-
), /* @__PURE__ */
|
|
3928
|
-
|
|
4130
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4131
|
+
StyleTabSection,
|
|
3929
4132
|
{
|
|
3930
4133
|
section: {
|
|
3931
4134
|
component: TypographySection,
|
|
3932
4135
|
name: "Typography",
|
|
3933
|
-
title: (0,
|
|
3934
|
-
}
|
|
4136
|
+
title: (0, import_i18n53.__)("Typography", "elementor")
|
|
4137
|
+
},
|
|
4138
|
+
fields: [
|
|
4139
|
+
"font-family",
|
|
4140
|
+
"font-weight",
|
|
4141
|
+
"font-size",
|
|
4142
|
+
"text-align",
|
|
4143
|
+
"color",
|
|
4144
|
+
"line-height",
|
|
4145
|
+
"letter-spacing",
|
|
4146
|
+
"word-spacing",
|
|
4147
|
+
"column-count",
|
|
4148
|
+
"text-decoration",
|
|
4149
|
+
"text-transform",
|
|
4150
|
+
"direction",
|
|
4151
|
+
"font-style",
|
|
4152
|
+
"stroke"
|
|
4153
|
+
]
|
|
3935
4154
|
}
|
|
3936
|
-
), /* @__PURE__ */
|
|
3937
|
-
|
|
4155
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4156
|
+
StyleTabSection,
|
|
3938
4157
|
{
|
|
3939
4158
|
section: {
|
|
3940
4159
|
component: BackgroundSection,
|
|
3941
4160
|
name: "Background",
|
|
3942
|
-
title: (0,
|
|
3943
|
-
}
|
|
4161
|
+
title: (0, import_i18n53.__)("Background", "elementor")
|
|
4162
|
+
},
|
|
4163
|
+
fields: ["background"]
|
|
3944
4164
|
}
|
|
3945
|
-
), /* @__PURE__ */
|
|
3946
|
-
|
|
4165
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4166
|
+
StyleTabSection,
|
|
3947
4167
|
{
|
|
3948
4168
|
section: {
|
|
3949
4169
|
component: BorderSection,
|
|
3950
4170
|
name: "Border",
|
|
3951
|
-
title: (0,
|
|
3952
|
-
}
|
|
4171
|
+
title: (0, import_i18n53.__)("Border", "elementor")
|
|
4172
|
+
},
|
|
4173
|
+
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
3953
4174
|
}
|
|
3954
|
-
), /* @__PURE__ */
|
|
3955
|
-
|
|
4175
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4176
|
+
StyleTabSection,
|
|
3956
4177
|
{
|
|
3957
4178
|
section: {
|
|
3958
4179
|
component: EffectsSection,
|
|
3959
4180
|
name: "Effects",
|
|
3960
|
-
title: (0,
|
|
3961
|
-
}
|
|
4181
|
+
title: (0, import_i18n53.__)("Effects", "elementor")
|
|
4182
|
+
},
|
|
4183
|
+
fields: ["box-shadow"]
|
|
3962
4184
|
}
|
|
3963
4185
|
))))
|
|
3964
4186
|
));
|
|
3965
4187
|
};
|
|
3966
4188
|
function ClassesHeader({ children }) {
|
|
3967
4189
|
const scrollDirection = useScrollDirection();
|
|
3968
|
-
return /* @__PURE__ */
|
|
4190
|
+
return /* @__PURE__ */ React82.createElement(import_ui67.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3969
4191
|
}
|
|
3970
4192
|
function useCurrentClassesProp() {
|
|
3971
4193
|
const { elementType } = useElement();
|
|
@@ -3984,16 +4206,16 @@ var EditingPanelTabs = () => {
|
|
|
3984
4206
|
return (
|
|
3985
4207
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
3986
4208
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
3987
|
-
/* @__PURE__ */
|
|
4209
|
+
/* @__PURE__ */ React83.createElement(import_react36.Fragment, { key: element.id }, /* @__PURE__ */ React83.createElement(PanelTabContent, null))
|
|
3988
4210
|
);
|
|
3989
4211
|
};
|
|
3990
4212
|
var PanelTabContent = () => {
|
|
3991
4213
|
const editorDefaults = useDefaultPanelSettings();
|
|
3992
|
-
const defaultComponentTab = (0,
|
|
4214
|
+
const defaultComponentTab = (0, import_editor_v1_adapters15.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
3993
4215
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
3994
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
3995
|
-
return /* @__PURE__ */
|
|
3996
|
-
|
|
4216
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui68.useTabs)(currentTab);
|
|
4217
|
+
return /* @__PURE__ */ React83.createElement(ScrollProvider, null, /* @__PURE__ */ React83.createElement(import_ui68.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React83.createElement(import_ui68.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React83.createElement(
|
|
4218
|
+
import_ui68.Tabs,
|
|
3997
4219
|
{
|
|
3998
4220
|
variant: "fullWidth",
|
|
3999
4221
|
size: "small",
|
|
@@ -4004,9 +4226,9 @@ var PanelTabContent = () => {
|
|
|
4004
4226
|
setCurrentTab(newValue);
|
|
4005
4227
|
}
|
|
4006
4228
|
},
|
|
4007
|
-
/* @__PURE__ */
|
|
4008
|
-
/* @__PURE__ */
|
|
4009
|
-
), /* @__PURE__ */
|
|
4229
|
+
/* @__PURE__ */ React83.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4230
|
+
/* @__PURE__ */ React83.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("Style", "elementor"), ...getTabProps("style") })
|
|
4231
|
+
), /* @__PURE__ */ React83.createElement(import_ui68.Divider, null)), /* @__PURE__ */ React83.createElement(import_ui68.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React83.createElement(SettingsTab, null)), /* @__PURE__ */ React83.createElement(import_ui68.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React83.createElement(StyleTab, null))));
|
|
4010
4232
|
};
|
|
4011
4233
|
|
|
4012
4234
|
// src/components/editing-panel.tsx
|
|
@@ -4018,8 +4240,8 @@ var EditingPanel = () => {
|
|
|
4018
4240
|
if (!element || !elementType) {
|
|
4019
4241
|
return null;
|
|
4020
4242
|
}
|
|
4021
|
-
const panelTitle = (0,
|
|
4022
|
-
return /* @__PURE__ */
|
|
4243
|
+
const panelTitle = (0, import_i18n55.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4244
|
+
return /* @__PURE__ */ React84.createElement(import_ui69.ErrorBoundary, { fallback: /* @__PURE__ */ React84.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React84.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React84.createElement(import_editor_ui5.ThemeProvider, null, /* @__PURE__ */ React84.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React84.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React84.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React84.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React84.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React84.createElement(import_editor_controls50.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React84.createElement(import_editor_controls50.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React84.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React84.createElement(EditingPanelTabs, null)))))))));
|
|
4023
4245
|
};
|
|
4024
4246
|
|
|
4025
4247
|
// src/panel.ts
|
|
@@ -4032,11 +4254,11 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
4032
4254
|
var import_editor = require("@elementor/editor");
|
|
4033
4255
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
4034
4256
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
4035
|
-
var
|
|
4257
|
+
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
4036
4258
|
|
|
4037
4259
|
// src/hooks/use-open-editor-panel.ts
|
|
4038
|
-
var
|
|
4039
|
-
var
|
|
4260
|
+
var import_react37 = require("react");
|
|
4261
|
+
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
4040
4262
|
|
|
4041
4263
|
// src/sync/is-atomic-widget-selected.ts
|
|
4042
4264
|
var import_editor_elements9 = require("@elementor/editor-elements");
|
|
@@ -4052,8 +4274,8 @@ var isAtomicWidgetSelected = () => {
|
|
|
4052
4274
|
// src/hooks/use-open-editor-panel.ts
|
|
4053
4275
|
var useOpenEditorPanel = () => {
|
|
4054
4276
|
const { open } = usePanelActions();
|
|
4055
|
-
(0,
|
|
4056
|
-
return (0,
|
|
4277
|
+
(0, import_react37.useEffect)(() => {
|
|
4278
|
+
return (0, import_editor_v1_adapters16.__privateListenTo)((0, import_editor_v1_adapters16.commandStartEvent)("panel/editor/open"), () => {
|
|
4057
4279
|
if (isAtomicWidgetSelected()) {
|
|
4058
4280
|
open();
|
|
4059
4281
|
}
|
|
@@ -4069,37 +4291,20 @@ var EditingPanelHooks = () => {
|
|
|
4069
4291
|
|
|
4070
4292
|
// src/dynamics/init.ts
|
|
4071
4293
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
4294
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
4072
4295
|
|
|
4073
|
-
// src/dynamics/components/dynamic-
|
|
4074
|
-
var
|
|
4075
|
-
var
|
|
4076
|
-
var
|
|
4077
|
-
var
|
|
4078
|
-
var import_i18n56 = require("@wordpress/i18n");
|
|
4079
|
-
|
|
4080
|
-
// src/components/popover-content.tsx
|
|
4081
|
-
var React81 = __toESM(require("react"));
|
|
4082
|
-
var import_ui68 = require("@elementor/ui");
|
|
4083
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React81.createElement(import_ui68.Stack, { alignItems, gap, p }, children);
|
|
4084
|
-
|
|
4085
|
-
// src/hooks/use-persist-dynamic-value.ts
|
|
4086
|
-
var import_session6 = require("@elementor/session");
|
|
4087
|
-
var usePersistDynamicValue = (propKey) => {
|
|
4088
|
-
const { element } = useElement();
|
|
4089
|
-
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
4090
|
-
return (0, import_session6.useSessionStorage)(prefixedKey);
|
|
4091
|
-
};
|
|
4092
|
-
|
|
4093
|
-
// src/dynamics/dynamic-control.tsx
|
|
4094
|
-
var React82 = __toESM(require("react"));
|
|
4095
|
-
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4296
|
+
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4297
|
+
var React85 = __toESM(require("react"));
|
|
4298
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4299
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
4300
|
+
var import_icons25 = require("@elementor/icons");
|
|
4096
4301
|
|
|
4097
4302
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4098
|
-
var
|
|
4303
|
+
var import_react39 = require("react");
|
|
4099
4304
|
|
|
4100
4305
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4101
|
-
var
|
|
4102
|
-
var
|
|
4306
|
+
var import_react38 = require("react");
|
|
4307
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4103
4308
|
|
|
4104
4309
|
// src/dynamics/sync/get-elementor-config.ts
|
|
4105
4310
|
var getElementorConfig2 = () => {
|
|
@@ -4145,12 +4350,12 @@ var dynamicPropTypeUtil = (0, import_editor_props10.createPropUtils)(
|
|
|
4145
4350
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4146
4351
|
var usePropDynamicTags = () => {
|
|
4147
4352
|
let categories = [];
|
|
4148
|
-
const { propType } = (0,
|
|
4353
|
+
const { propType } = (0, import_editor_controls51.useBoundProp)();
|
|
4149
4354
|
if (propType) {
|
|
4150
4355
|
const propDynamicType = getDynamicPropType(propType);
|
|
4151
4356
|
categories = propDynamicType?.settings.categories || [];
|
|
4152
4357
|
}
|
|
4153
|
-
return (0,
|
|
4358
|
+
return (0, import_react38.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
4154
4359
|
};
|
|
4155
4360
|
var getDynamicTagsByCategories = (categories) => {
|
|
4156
4361
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -4166,12 +4371,52 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
4166
4371
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4167
4372
|
var useDynamicTag = (tagName) => {
|
|
4168
4373
|
const dynamicTags = usePropDynamicTags();
|
|
4169
|
-
return (0,
|
|
4374
|
+
return (0, import_react39.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
4375
|
+
};
|
|
4376
|
+
|
|
4377
|
+
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4378
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React85.createElement(import_icons25.DatabaseIcon, { fontSize: "tiny" });
|
|
4379
|
+
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4380
|
+
const context = (0, import_editor_controls52.useBoundProp)(import_editor_props11.backgroundImageOverlayPropTypeUtil);
|
|
4381
|
+
return /* @__PURE__ */ React85.createElement(import_editor_controls52.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React85.createElement(import_editor_controls52.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React85.createElement(Wrapper, { rawValue: value.value })));
|
|
4382
|
+
};
|
|
4383
|
+
var Wrapper = ({ rawValue }) => {
|
|
4384
|
+
const { propType } = (0, import_editor_controls52.useBoundProp)();
|
|
4385
|
+
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4386
|
+
return /* @__PURE__ */ React85.createElement(import_editor_controls52.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React85.createElement(import_editor_controls52.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React85.createElement(Content, { rawValue: rawValue.image })));
|
|
4387
|
+
};
|
|
4388
|
+
var Content = ({ rawValue }) => {
|
|
4389
|
+
const src = rawValue.value.src;
|
|
4390
|
+
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4391
|
+
return /* @__PURE__ */ React85.createElement(React85.Fragment, null, dynamicTag?.label);
|
|
4392
|
+
};
|
|
4393
|
+
|
|
4394
|
+
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4395
|
+
var React89 = __toESM(require("react"));
|
|
4396
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
4397
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4398
|
+
var import_icons27 = require("@elementor/icons");
|
|
4399
|
+
var import_ui72 = require("@elementor/ui");
|
|
4400
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
4401
|
+
|
|
4402
|
+
// src/components/popover-content.tsx
|
|
4403
|
+
var React86 = __toESM(require("react"));
|
|
4404
|
+
var import_ui70 = require("@elementor/ui");
|
|
4405
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React86.createElement(import_ui70.Stack, { alignItems, gap, p }, children);
|
|
4406
|
+
|
|
4407
|
+
// src/hooks/use-persist-dynamic-value.ts
|
|
4408
|
+
var import_session6 = require("@elementor/session");
|
|
4409
|
+
var usePersistDynamicValue = (propKey) => {
|
|
4410
|
+
const { element } = useElement();
|
|
4411
|
+
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
4412
|
+
return (0, import_session6.useSessionStorage)(prefixedKey);
|
|
4170
4413
|
};
|
|
4171
4414
|
|
|
4172
4415
|
// src/dynamics/dynamic-control.tsx
|
|
4416
|
+
var React87 = __toESM(require("react"));
|
|
4417
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4173
4418
|
var DynamicControl = ({ bind, children }) => {
|
|
4174
|
-
const { value, setValue } = (0,
|
|
4419
|
+
const { value, setValue } = (0, import_editor_controls53.useBoundProp)(dynamicPropTypeUtil);
|
|
4175
4420
|
const { name = "", settings } = value ?? {};
|
|
4176
4421
|
const dynamicTag = useDynamicTag(name);
|
|
4177
4422
|
if (!dynamicTag) {
|
|
@@ -4190,22 +4435,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4190
4435
|
});
|
|
4191
4436
|
};
|
|
4192
4437
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4193
|
-
return /* @__PURE__ */
|
|
4438
|
+
return /* @__PURE__ */ React87.createElement(import_editor_controls53.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React87.createElement(import_editor_controls53.PropKeyProvider, { bind }, children));
|
|
4194
4439
|
};
|
|
4195
4440
|
|
|
4196
4441
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4197
|
-
var
|
|
4198
|
-
var
|
|
4199
|
-
var
|
|
4442
|
+
var React88 = __toESM(require("react"));
|
|
4443
|
+
var import_react40 = require("react");
|
|
4444
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4200
4445
|
var import_icons26 = require("@elementor/icons");
|
|
4201
|
-
var
|
|
4202
|
-
var
|
|
4446
|
+
var import_ui71 = require("@elementor/ui");
|
|
4447
|
+
var import_i18n56 = require("@wordpress/i18n");
|
|
4203
4448
|
var SIZE7 = "tiny";
|
|
4204
4449
|
var DynamicSelection = ({ onSelect }) => {
|
|
4205
|
-
const [searchValue, setSearchValue] = (0,
|
|
4450
|
+
const [searchValue, setSearchValue] = (0, import_react40.useState)("");
|
|
4206
4451
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
4207
|
-
const { value: anyValue } = (0,
|
|
4208
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
4452
|
+
const { value: anyValue } = (0, import_editor_controls54.useBoundProp)();
|
|
4453
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls54.useBoundProp)(dynamicPropTypeUtil);
|
|
4209
4454
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
4210
4455
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
4211
4456
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -4220,28 +4465,28 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
4220
4465
|
setValue({ name: value, settings: { label } });
|
|
4221
4466
|
onSelect?.();
|
|
4222
4467
|
};
|
|
4223
|
-
return /* @__PURE__ */
|
|
4224
|
-
|
|
4468
|
+
return /* @__PURE__ */ React88.createElement(import_ui71.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React88.createElement(NoDynamicTags, null) : /* @__PURE__ */ React88.createElement(import_react40.Fragment, null, /* @__PURE__ */ React88.createElement(import_ui71.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React88.createElement(
|
|
4469
|
+
import_ui71.TextField,
|
|
4225
4470
|
{
|
|
4226
4471
|
fullWidth: true,
|
|
4227
4472
|
size: SIZE7,
|
|
4228
4473
|
value: searchValue,
|
|
4229
4474
|
onChange: handleSearch,
|
|
4230
|
-
placeholder: (0,
|
|
4475
|
+
placeholder: (0, import_i18n56.__)("Search dynamic tags\u2026", "elementor"),
|
|
4231
4476
|
InputProps: {
|
|
4232
|
-
startAdornment: /* @__PURE__ */
|
|
4477
|
+
startAdornment: /* @__PURE__ */ React88.createElement(import_ui71.InputAdornment, { position: "start" }, /* @__PURE__ */ React88.createElement(import_icons26.SearchIcon, { fontSize: SIZE7 }))
|
|
4233
4478
|
}
|
|
4234
4479
|
}
|
|
4235
|
-
)), /* @__PURE__ */
|
|
4236
|
-
|
|
4480
|
+
)), /* @__PURE__ */ React88.createElement(import_ui71.Divider, null), /* @__PURE__ */ React88.createElement(import_ui71.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React88.createElement(import_ui71.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React88.createElement(import_react40.Fragment, { key: index }, /* @__PURE__ */ React88.createElement(
|
|
4481
|
+
import_ui71.MenuSubheader,
|
|
4237
4482
|
{
|
|
4238
4483
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
4239
4484
|
},
|
|
4240
4485
|
dynamicGroups?.[category]?.title || category
|
|
4241
4486
|
), items3.map(({ value, label: tagLabel }) => {
|
|
4242
4487
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
4243
|
-
return /* @__PURE__ */
|
|
4244
|
-
|
|
4488
|
+
return /* @__PURE__ */ React88.createElement(
|
|
4489
|
+
import_ui71.MenuItem,
|
|
4245
4490
|
{
|
|
4246
4491
|
key: value,
|
|
4247
4492
|
selected: isSelected,
|
|
@@ -4251,10 +4496,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
4251
4496
|
},
|
|
4252
4497
|
tagLabel
|
|
4253
4498
|
);
|
|
4254
|
-
})))) : /* @__PURE__ */
|
|
4499
|
+
})))) : /* @__PURE__ */ React88.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
4255
4500
|
};
|
|
4256
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4257
|
-
|
|
4501
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElement(
|
|
4502
|
+
import_ui71.Stack,
|
|
4258
4503
|
{
|
|
4259
4504
|
gap: 1,
|
|
4260
4505
|
alignItems: "center",
|
|
@@ -4264,12 +4509,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React83.createElem
|
|
|
4264
4509
|
color: "text.secondary",
|
|
4265
4510
|
sx: { pb: 3.5 }
|
|
4266
4511
|
},
|
|
4267
|
-
/* @__PURE__ */
|
|
4268
|
-
/* @__PURE__ */
|
|
4269
|
-
/* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ React88.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4513
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React88.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4514
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React88.createElement(import_ui71.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n56.__)("Clear & try again", "elementor")))
|
|
4270
4515
|
);
|
|
4271
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4272
|
-
|
|
4516
|
+
var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(import_ui71.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React88.createElement(import_ui71.Divider, null), /* @__PURE__ */ React88.createElement(
|
|
4517
|
+
import_ui71.Stack,
|
|
4273
4518
|
{
|
|
4274
4519
|
gap: 1,
|
|
4275
4520
|
alignItems: "center",
|
|
@@ -4279,9 +4524,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React83.createElement(import_ui69.Box,
|
|
|
4279
4524
|
color: "text.secondary",
|
|
4280
4525
|
sx: { pb: 3.5 }
|
|
4281
4526
|
},
|
|
4282
|
-
/* @__PURE__ */
|
|
4283
|
-
/* @__PURE__ */
|
|
4284
|
-
/* @__PURE__ */
|
|
4527
|
+
/* @__PURE__ */ React88.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4528
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
4529
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
4285
4530
|
));
|
|
4286
4531
|
var useFilteredOptions = (searchValue) => {
|
|
4287
4532
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4302,10 +4547,10 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4302
4547
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4303
4548
|
var SIZE8 = "tiny";
|
|
4304
4549
|
var DynamicSelectionControl = () => {
|
|
4305
|
-
const { setValue: setAnyValue } = (0,
|
|
4306
|
-
const { bind, value } = (0,
|
|
4550
|
+
const { setValue: setAnyValue } = (0, import_editor_controls55.useBoundProp)();
|
|
4551
|
+
const { bind, value } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
|
|
4307
4552
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
4308
|
-
const selectionPopoverState = (0,
|
|
4553
|
+
const selectionPopoverState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4309
4554
|
const { name: tagName = "" } = value;
|
|
4310
4555
|
const dynamicTag = useDynamicTag(tagName);
|
|
4311
4556
|
const removeDynamicTag = () => {
|
|
@@ -4314,62 +4559,76 @@ var DynamicSelectionControl = () => {
|
|
|
4314
4559
|
if (!dynamicTag) {
|
|
4315
4560
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4316
4561
|
}
|
|
4317
|
-
return /* @__PURE__ */
|
|
4318
|
-
|
|
4562
|
+
return /* @__PURE__ */ React89.createElement(import_ui72.Box, null, /* @__PURE__ */ React89.createElement(
|
|
4563
|
+
import_ui72.UnstableTag,
|
|
4319
4564
|
{
|
|
4320
4565
|
fullWidth: true,
|
|
4321
4566
|
showActionsOnHover: true,
|
|
4322
4567
|
label: dynamicTag.label,
|
|
4323
|
-
startIcon: /* @__PURE__ */
|
|
4324
|
-
...(0,
|
|
4325
|
-
actions: /* @__PURE__ */
|
|
4326
|
-
|
|
4568
|
+
startIcon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 }),
|
|
4569
|
+
...(0, import_ui72.bindTrigger)(selectionPopoverState),
|
|
4570
|
+
actions: /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React89.createElement(
|
|
4571
|
+
import_ui72.IconButton,
|
|
4327
4572
|
{
|
|
4328
4573
|
size: SIZE8,
|
|
4329
4574
|
onClick: removeDynamicTag,
|
|
4330
|
-
"aria-label": (0,
|
|
4575
|
+
"aria-label": (0, import_i18n57.__)("Remove dynamic value", "elementor")
|
|
4331
4576
|
},
|
|
4332
|
-
/* @__PURE__ */
|
|
4577
|
+
/* @__PURE__ */ React89.createElement(import_icons27.XIcon, { fontSize: SIZE8 })
|
|
4333
4578
|
))
|
|
4334
4579
|
}
|
|
4335
|
-
), /* @__PURE__ */
|
|
4336
|
-
|
|
4580
|
+
), /* @__PURE__ */ React89.createElement(
|
|
4581
|
+
import_ui72.Popover,
|
|
4337
4582
|
{
|
|
4338
4583
|
disablePortal: true,
|
|
4339
4584
|
disableScrollLock: true,
|
|
4340
4585
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4341
|
-
...(0,
|
|
4586
|
+
...(0, import_ui72.bindPopover)(selectionPopoverState)
|
|
4342
4587
|
},
|
|
4343
|
-
/* @__PURE__ */
|
|
4588
|
+
/* @__PURE__ */ React89.createElement(import_ui72.Stack, null, /* @__PURE__ */ React89.createElement(
|
|
4589
|
+
import_editor_ui6.PopoverHeader,
|
|
4590
|
+
{
|
|
4591
|
+
title: (0, import_i18n57.__)("Dynamic tags", "elementor"),
|
|
4592
|
+
onClose: selectionPopoverState.close,
|
|
4593
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4594
|
+
}
|
|
4595
|
+
), /* @__PURE__ */ React89.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
4344
4596
|
));
|
|
4345
4597
|
};
|
|
4346
4598
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
4347
|
-
const popupState = (0,
|
|
4599
|
+
const popupState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4348
4600
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
4349
4601
|
if (!hasDynamicSettings) {
|
|
4350
4602
|
return null;
|
|
4351
4603
|
}
|
|
4352
|
-
return /* @__PURE__ */
|
|
4353
|
-
|
|
4604
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(import_ui72.IconButton, { size: SIZE8, ...(0, import_ui72.bindTrigger)(popupState), "aria-label": (0, import_i18n57.__)("Settings", "elementor") }, /* @__PURE__ */ React89.createElement(import_icons27.SettingsIcon, { fontSize: SIZE8 })), /* @__PURE__ */ React89.createElement(
|
|
4605
|
+
import_ui72.Popover,
|
|
4354
4606
|
{
|
|
4355
4607
|
disablePortal: true,
|
|
4356
4608
|
disableScrollLock: true,
|
|
4357
4609
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4358
|
-
...(0,
|
|
4610
|
+
...(0, import_ui72.bindPopover)(popupState)
|
|
4359
4611
|
},
|
|
4360
|
-
/* @__PURE__ */
|
|
4612
|
+
/* @__PURE__ */ React89.createElement(import_ui72.Paper, { component: import_ui72.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React89.createElement(
|
|
4613
|
+
import_editor_ui6.PopoverHeader,
|
|
4614
|
+
{
|
|
4615
|
+
title: dynamicTag.label,
|
|
4616
|
+
onClose: popupState.close,
|
|
4617
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4618
|
+
}
|
|
4619
|
+
), /* @__PURE__ */ React89.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
4361
4620
|
));
|
|
4362
4621
|
};
|
|
4363
4622
|
var DynamicSettings = ({ controls }) => {
|
|
4364
4623
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
4365
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4624
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui72.useTabs)(0);
|
|
4366
4625
|
if (!tabs.length) {
|
|
4367
4626
|
return null;
|
|
4368
4627
|
}
|
|
4369
|
-
return /* @__PURE__ */
|
|
4370
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(import_ui72.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React89.createElement(import_ui72.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React89.createElement(import_ui72.Divider, null), tabs.map(({ value }, index) => {
|
|
4629
|
+
return /* @__PURE__ */ React89.createElement(import_ui72.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React89.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4371
4630
|
if (item.type === "control") {
|
|
4372
|
-
return /* @__PURE__ */
|
|
4631
|
+
return /* @__PURE__ */ React89.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4373
4632
|
}
|
|
4374
4633
|
return null;
|
|
4375
4634
|
})));
|
|
@@ -4379,12 +4638,12 @@ var Control3 = ({ control }) => {
|
|
|
4379
4638
|
if (!getControl(control.type)) {
|
|
4380
4639
|
return null;
|
|
4381
4640
|
}
|
|
4382
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(import_ui72.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React89.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(import_editor_controls55.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React89.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Control, { type: control.type, props: control.props }))));
|
|
4383
4642
|
};
|
|
4384
4643
|
|
|
4385
4644
|
// src/dynamics/dynamic-transformer.ts
|
|
4386
4645
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
4387
|
-
var
|
|
4646
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
4388
4647
|
|
|
4389
4648
|
// src/dynamics/errors.ts
|
|
4390
4649
|
var import_utils8 = require("@elementor/utils");
|
|
@@ -4402,7 +4661,7 @@ var dynamicTransformer = (0, import_editor_canvas3.createTransformer)((value) =>
|
|
|
4402
4661
|
});
|
|
4403
4662
|
function simpleTransform(props) {
|
|
4404
4663
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
4405
|
-
const value = (0,
|
|
4664
|
+
const value = (0, import_editor_props12.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
4406
4665
|
return [settingKey, value];
|
|
4407
4666
|
});
|
|
4408
4667
|
return Object.fromEntries(transformed);
|
|
@@ -4432,18 +4691,18 @@ function getDynamicValue(name, settings) {
|
|
|
4432
4691
|
}
|
|
4433
4692
|
|
|
4434
4693
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4435
|
-
var
|
|
4436
|
-
var
|
|
4694
|
+
var React90 = __toESM(require("react"));
|
|
4695
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4437
4696
|
var import_icons28 = require("@elementor/icons");
|
|
4438
|
-
var
|
|
4697
|
+
var import_i18n58 = require("@wordpress/i18n");
|
|
4439
4698
|
var usePropDynamicAction = () => {
|
|
4440
|
-
const { propType } = (0,
|
|
4699
|
+
const { propType } = (0, import_editor_controls56.useBoundProp)();
|
|
4441
4700
|
const visible = !!propType && supportsDynamic(propType);
|
|
4442
4701
|
return {
|
|
4443
4702
|
visible,
|
|
4444
4703
|
icon: import_icons28.DatabaseIcon,
|
|
4445
|
-
title: (0,
|
|
4446
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
4704
|
+
title: (0, import_i18n58.__)("Dynamic tags", "elementor"),
|
|
4705
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React90.createElement(DynamicSelection, { onSelect: closePopover })
|
|
4447
4706
|
};
|
|
4448
4707
|
};
|
|
4449
4708
|
|
|
@@ -4454,6 +4713,16 @@ var init = () => {
|
|
|
4454
4713
|
component: DynamicSelectionControl,
|
|
4455
4714
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
4456
4715
|
});
|
|
4716
|
+
(0, import_editor_controls57.injectIntoRepeaterItemLabel)({
|
|
4717
|
+
id: "dynamic-background-image",
|
|
4718
|
+
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4719
|
+
component: BackgroundControlDynamicTagLabel
|
|
4720
|
+
});
|
|
4721
|
+
(0, import_editor_controls57.injectIntoRepeaterItemIcon)({
|
|
4722
|
+
id: "dynamic-background-image",
|
|
4723
|
+
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4724
|
+
component: BackgroundControlDynamicTagIcon
|
|
4725
|
+
});
|
|
4457
4726
|
registerPopoverAction({
|
|
4458
4727
|
id: "dynamic-tags",
|
|
4459
4728
|
useProps: usePropDynamicAction
|
|
@@ -4463,9 +4732,9 @@ var init = () => {
|
|
|
4463
4732
|
};
|
|
4464
4733
|
|
|
4465
4734
|
// src/reset-style-props.tsx
|
|
4466
|
-
var
|
|
4735
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4467
4736
|
var import_icons29 = require("@elementor/icons");
|
|
4468
|
-
var
|
|
4737
|
+
var import_i18n59 = require("@wordpress/i18n");
|
|
4469
4738
|
var { registerAction } = controlActionsMenu;
|
|
4470
4739
|
function initResetStyleProps() {
|
|
4471
4740
|
registerAction({
|
|
@@ -4476,10 +4745,10 @@ function initResetStyleProps() {
|
|
|
4476
4745
|
var EXCLUDED_BINDS = ["order", "flex-grow", "flex-shrink", "flex-basis"];
|
|
4477
4746
|
function useResetStyleValueProps() {
|
|
4478
4747
|
const isStyle = useIsStyle();
|
|
4479
|
-
const { value, setValue, path, bind } = (0,
|
|
4748
|
+
const { value, setValue, path, bind } = (0, import_editor_controls58.useBoundProp)();
|
|
4480
4749
|
return {
|
|
4481
4750
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4482
|
-
title: (0,
|
|
4751
|
+
title: (0, import_i18n59.__)("Clear", "elementor"),
|
|
4483
4752
|
icon: import_icons29.BrushBigIcon,
|
|
4484
4753
|
onClick: () => setValue(null)
|
|
4485
4754
|
};
|
|
@@ -4489,36 +4758,36 @@ function useResetStyleValueProps() {
|
|
|
4489
4758
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
4490
4759
|
|
|
4491
4760
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4492
|
-
var
|
|
4761
|
+
var React91 = __toESM(require("react"));
|
|
4493
4762
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
4494
|
-
var
|
|
4495
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */
|
|
4763
|
+
var import_ui73 = require("@elementor/ui");
|
|
4764
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React91.createElement(import_ui73.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React91.createElement(ItemIconColor, { value }), /* @__PURE__ */ React91.createElement(ItemLabelColor, { value })));
|
|
4496
4765
|
var ItemIconColor = ({ value }) => {
|
|
4497
4766
|
const { color } = value;
|
|
4498
|
-
return /* @__PURE__ */
|
|
4767
|
+
return /* @__PURE__ */ React91.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4499
4768
|
};
|
|
4500
4769
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4501
|
-
return /* @__PURE__ */
|
|
4770
|
+
return /* @__PURE__ */ React91.createElement("span", null, color);
|
|
4502
4771
|
};
|
|
4503
|
-
var StyledUnstableColorIndicator = (0,
|
|
4772
|
+
var StyledUnstableColorIndicator = (0, import_ui73.styled)(import_ui73.UnstableColorIndicator)(({ theme }) => ({
|
|
4504
4773
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4505
4774
|
}));
|
|
4506
4775
|
|
|
4507
4776
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4508
|
-
var
|
|
4777
|
+
var React92 = __toESM(require("react"));
|
|
4509
4778
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
4510
|
-
var
|
|
4511
|
-
var
|
|
4512
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */
|
|
4779
|
+
var import_ui74 = require("@elementor/ui");
|
|
4780
|
+
var import_i18n60 = require("@wordpress/i18n");
|
|
4781
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React92.createElement(import_ui74.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React92.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React92.createElement(ItemLabelGradient, { value })));
|
|
4513
4782
|
var ItemIconGradient = ({ value }) => {
|
|
4514
4783
|
const gradient = getGradientValue(value);
|
|
4515
|
-
return /* @__PURE__ */
|
|
4784
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4516
4785
|
};
|
|
4517
4786
|
var ItemLabelGradient = ({ value }) => {
|
|
4518
4787
|
if (value.type === "linear") {
|
|
4519
|
-
return /* @__PURE__ */
|
|
4788
|
+
return /* @__PURE__ */ React92.createElement("span", null, (0, import_i18n60.__)("Linear Gradient", "elementor"));
|
|
4520
4789
|
}
|
|
4521
|
-
return /* @__PURE__ */
|
|
4790
|
+
return /* @__PURE__ */ React92.createElement("span", null, (0, import_i18n60.__)("Radial Gradient", "elementor"));
|
|
4522
4791
|
};
|
|
4523
4792
|
var getGradientValue = (gradient) => {
|
|
4524
4793
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4529,16 +4798,16 @@ var getGradientValue = (gradient) => {
|
|
|
4529
4798
|
};
|
|
4530
4799
|
|
|
4531
4800
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4532
|
-
var
|
|
4801
|
+
var React93 = __toESM(require("react"));
|
|
4533
4802
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
4534
|
-
var
|
|
4535
|
-
var
|
|
4803
|
+
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4804
|
+
var import_ui75 = require("@elementor/ui");
|
|
4536
4805
|
var import_wp_media = require("@elementor/wp-media");
|
|
4537
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
4806
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React93.createElement(import_ui75.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconImage, { value }), /* @__PURE__ */ React93.createElement(ItemLabelImage, { value })));
|
|
4538
4807
|
var ItemIconImage = ({ value }) => {
|
|
4539
4808
|
const { imageUrl } = useImage(value);
|
|
4540
|
-
return /* @__PURE__ */
|
|
4541
|
-
|
|
4809
|
+
return /* @__PURE__ */ React93.createElement(
|
|
4810
|
+
import_ui75.CardMedia,
|
|
4542
4811
|
{
|
|
4543
4812
|
image: imageUrl,
|
|
4544
4813
|
sx: (theme) => ({
|
|
@@ -4552,7 +4821,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4552
4821
|
};
|
|
4553
4822
|
var ItemLabelImage = ({ value }) => {
|
|
4554
4823
|
const { imageTitle } = useImage(value);
|
|
4555
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ React93.createElement(import_editor_ui7.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React93.createElement("span", null, imageTitle));
|
|
4556
4825
|
};
|
|
4557
4826
|
var useImage = (image) => {
|
|
4558
4827
|
let imageTitle, imageUrl = null;
|
|
@@ -4577,14 +4846,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4577
4846
|
};
|
|
4578
4847
|
|
|
4579
4848
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4580
|
-
var
|
|
4849
|
+
var React94 = __toESM(require("react"));
|
|
4581
4850
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
4582
|
-
var
|
|
4851
|
+
var import_ui76 = require("@elementor/ui");
|
|
4583
4852
|
var backgroundOverlayTransformer = (0, import_editor_canvas8.createTransformer)((values) => {
|
|
4584
4853
|
if (!values || values.length === 0) {
|
|
4585
4854
|
return null;
|
|
4586
4855
|
}
|
|
4587
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ React94.createElement(import_ui76.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React94.createElement(import_ui76.Stack, { key: index }, item)));
|
|
4588
4857
|
});
|
|
4589
4858
|
|
|
4590
4859
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -4634,12 +4903,12 @@ function init3() {
|
|
|
4634
4903
|
});
|
|
4635
4904
|
init();
|
|
4636
4905
|
init2();
|
|
4637
|
-
if ((0,
|
|
4906
|
+
if ((0, import_editor_v1_adapters17.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30)) {
|
|
4638
4907
|
initResetStyleProps();
|
|
4639
4908
|
}
|
|
4640
4909
|
}
|
|
4641
4910
|
var blockV1Panel = () => {
|
|
4642
|
-
(0,
|
|
4911
|
+
(0, import_editor_v1_adapters17.blockCommand)({
|
|
4643
4912
|
command: "panel/editor/open",
|
|
4644
4913
|
condition: isAtomicWidgetSelected
|
|
4645
4914
|
});
|
|
@@ -4651,6 +4920,7 @@ var blockV1Panel = () => {
|
|
|
4651
4920
|
injectIntoClassSelectorActions,
|
|
4652
4921
|
registerControlReplacement,
|
|
4653
4922
|
useBoundProp,
|
|
4923
|
+
useFontFamilies,
|
|
4654
4924
|
usePanelActions,
|
|
4655
4925
|
usePanelStatus
|
|
4656
4926
|
});
|