@elementor/editor-editing-panel 1.31.0 → 1.33.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 +29 -0
- package/dist/index.js +463 -366
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +380 -283
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/components/settings-tab.tsx +7 -3
- package/src/controls-registry/control-type-container.tsx +2 -8
- package/src/controls-registry/control.tsx +2 -2
- package/src/controls-registry/controls-registry.tsx +3 -4
- package/src/dynamics/components/dynamic-selection-control.tsx +2 -2
- package/src/hooks/use-normalized-inheritance-chain-items.tsx +68 -0
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +65 -19
- package/src/styles-inheritance/styles-inheritance-infotip.tsx +50 -0
- package/src/sync/get-experiments-config.ts +7 -0
- package/src/sync/types.ts +7 -0
package/dist/index.js
CHANGED
|
@@ -916,14 +916,14 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
916
916
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
917
917
|
|
|
918
918
|
// src/components/editing-panel.tsx
|
|
919
|
-
var
|
|
919
|
+
var React70 = __toESM(require("react"));
|
|
920
920
|
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
921
921
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
922
922
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
923
923
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
924
924
|
var import_icons23 = require("@elementor/icons");
|
|
925
925
|
var import_session4 = require("@elementor/session");
|
|
926
|
-
var
|
|
926
|
+
var import_ui58 = require("@elementor/ui");
|
|
927
927
|
var import_i18n46 = require("@wordpress/i18n");
|
|
928
928
|
|
|
929
929
|
// src/controls-actions.ts
|
|
@@ -980,9 +980,9 @@ function EditorPanelErrorFallback() {
|
|
|
980
980
|
}
|
|
981
981
|
|
|
982
982
|
// src/components/editing-panel-tabs.tsx
|
|
983
|
-
var
|
|
984
|
-
var
|
|
985
|
-
var
|
|
983
|
+
var React69 = __toESM(require("react"));
|
|
984
|
+
var import_react24 = require("react");
|
|
985
|
+
var import_ui57 = require("@elementor/ui");
|
|
986
986
|
var import_i18n45 = require("@wordpress/i18n");
|
|
987
987
|
|
|
988
988
|
// src/contexts/scroll-context.tsx
|
|
@@ -1028,6 +1028,7 @@ function useScrollDirection() {
|
|
|
1028
1028
|
var React16 = __toESM(require("react"));
|
|
1029
1029
|
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
1030
1030
|
var import_session = require("@elementor/session");
|
|
1031
|
+
var import_ui14 = require("@elementor/ui");
|
|
1031
1032
|
|
|
1032
1033
|
// src/controls-registry/control.tsx
|
|
1033
1034
|
var React11 = __toESM(require("react"));
|
|
@@ -1044,12 +1045,12 @@ var controlTypes = {
|
|
|
1044
1045
|
link: { component: import_editor_controls2.LinkControl, layout: "full" },
|
|
1045
1046
|
url: { component: import_editor_controls2.UrlControl, layout: "full" }
|
|
1046
1047
|
};
|
|
1047
|
-
var
|
|
1048
|
-
var
|
|
1048
|
+
var getControl = (type) => controlTypes[type]?.component;
|
|
1049
|
+
var getDefaultLayout = (type) => controlTypes[type].layout;
|
|
1049
1050
|
|
|
1050
1051
|
// src/controls-registry/control.tsx
|
|
1051
1052
|
var Control = ({ props, type }) => {
|
|
1052
|
-
const ControlByType =
|
|
1053
|
+
const ControlByType = getControl(type);
|
|
1053
1054
|
const { element } = useElement();
|
|
1054
1055
|
if (!ControlByType) {
|
|
1055
1056
|
throw new ControlTypeNotFoundError({
|
|
@@ -1062,11 +1063,7 @@ var Control = ({ props, type }) => {
|
|
|
1062
1063
|
// src/controls-registry/control-type-container.tsx
|
|
1063
1064
|
var React12 = __toESM(require("react"));
|
|
1064
1065
|
var import_ui10 = require("@elementor/ui");
|
|
1065
|
-
var ControlTypeContainer = ({
|
|
1066
|
-
controlType,
|
|
1067
|
-
children
|
|
1068
|
-
}) => {
|
|
1069
|
-
const layout = getLayoutByType(controlType);
|
|
1066
|
+
var ControlTypeContainer = ({ children, layout }) => {
|
|
1070
1067
|
return /* @__PURE__ */ React12.createElement(StyledContainer, { layout }, children);
|
|
1071
1068
|
};
|
|
1072
1069
|
var StyledContainer = (0, import_ui10.styled)(import_ui10.Box, {
|
|
@@ -1185,19 +1182,20 @@ var SettingsTab = () => {
|
|
|
1185
1182
|
})));
|
|
1186
1183
|
};
|
|
1187
1184
|
var Control2 = ({ control }) => {
|
|
1188
|
-
if (!
|
|
1185
|
+
if (!getControl(control.type)) {
|
|
1189
1186
|
return null;
|
|
1190
1187
|
}
|
|
1191
|
-
|
|
1188
|
+
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1189
|
+
return /* @__PURE__ */ React16.createElement(SettingsField, { bind: control.bind }, control.meta?.topDivider && /* @__PURE__ */ React16.createElement(import_ui14.Divider, null), /* @__PURE__ */ React16.createElement(ControlTypeContainer, { layout }, control.label ? /* @__PURE__ */ React16.createElement(import_editor_controls4.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React16.createElement(Control, { type: control.type, props: control.props })));
|
|
1192
1190
|
};
|
|
1193
1191
|
|
|
1194
1192
|
// src/components/style-tab.tsx
|
|
1195
|
-
var
|
|
1196
|
-
var
|
|
1193
|
+
var React68 = __toESM(require("react"));
|
|
1194
|
+
var import_react23 = require("react");
|
|
1197
1195
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
1198
1196
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
1199
1197
|
var import_session3 = require("@elementor/session");
|
|
1200
|
-
var
|
|
1198
|
+
var import_ui56 = require("@elementor/ui");
|
|
1201
1199
|
var import_i18n44 = require("@wordpress/i18n");
|
|
1202
1200
|
|
|
1203
1201
|
// src/contexts/styles-inheritance-context.tsx
|
|
@@ -1440,13 +1438,13 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1440
1438
|
}
|
|
1441
1439
|
|
|
1442
1440
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1443
|
-
var
|
|
1441
|
+
var React21 = __toESM(require("react"));
|
|
1444
1442
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1445
1443
|
|
|
1446
1444
|
// src/controls-registry/styles-field.tsx
|
|
1447
|
-
var
|
|
1445
|
+
var React20 = __toESM(require("react"));
|
|
1448
1446
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1449
|
-
var
|
|
1447
|
+
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1450
1448
|
|
|
1451
1449
|
// src/hooks/use-styles-fields.ts
|
|
1452
1450
|
var import_react14 = require("react");
|
|
@@ -1585,11 +1583,87 @@ function useStylesField(propName) {
|
|
|
1585
1583
|
}
|
|
1586
1584
|
|
|
1587
1585
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1588
|
-
var
|
|
1586
|
+
var React19 = __toESM(require("react"));
|
|
1587
|
+
var import_react17 = require("react");
|
|
1589
1588
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
1590
1589
|
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1590
|
+
var import_ui16 = require("@elementor/ui");
|
|
1591
1591
|
var import_i18n5 = require("@wordpress/i18n");
|
|
1592
|
+
|
|
1593
|
+
// src/sync/get-experiments-config.ts
|
|
1594
|
+
var getExperimentsConfig = () => {
|
|
1595
|
+
const extendedWindow = window;
|
|
1596
|
+
return extendedWindow.elementorCommon?.config?.experimentalFeatures ?? {};
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1599
|
+
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1600
|
+
var React18 = __toESM(require("react"));
|
|
1601
|
+
var import_react16 = require("react");
|
|
1602
|
+
var import_editor_canvas = require("@elementor/editor-canvas");
|
|
1603
|
+
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1604
|
+
var import_ui15 = require("@elementor/ui");
|
|
1605
|
+
|
|
1606
|
+
// src/hooks/use-normalized-inheritance-chain-items.tsx
|
|
1607
|
+
var import_react15 = require("react");
|
|
1608
|
+
var MAXIMUM_ITEMS = 2;
|
|
1609
|
+
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
1610
|
+
const [items3, setItems] = (0, import_react15.useState)([]);
|
|
1611
|
+
(0, import_react15.useEffect)(() => {
|
|
1612
|
+
(async () => {
|
|
1613
|
+
const normalizedItems = await Promise.all(
|
|
1614
|
+
inheritanceChain.filter((item) => item.style?.label).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
1615
|
+
);
|
|
1616
|
+
const validItems = normalizedItems.filter((item) => item.value !== "").slice(0, MAXIMUM_ITEMS);
|
|
1617
|
+
setItems(validItems);
|
|
1618
|
+
})();
|
|
1619
|
+
}, [inheritanceChain, bind, resolve]);
|
|
1620
|
+
return items3;
|
|
1621
|
+
};
|
|
1622
|
+
var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
1623
|
+
const state = item.variant?.meta?.state || "";
|
|
1624
|
+
const label = item.style?.label || "";
|
|
1625
|
+
const displayLabel = state ? `${label}:${state}` : label;
|
|
1626
|
+
return {
|
|
1627
|
+
id: item.style?.id ? item.style?.id + state : index,
|
|
1628
|
+
breakpoint: item.variant?.meta?.breakpoint,
|
|
1629
|
+
displayLabel,
|
|
1630
|
+
value: await getTransformedValue(item, bind, resolve)
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
var getTransformedValue = async (item, bind, resolve) => {
|
|
1634
|
+
try {
|
|
1635
|
+
const result = await resolve({
|
|
1636
|
+
props: {
|
|
1637
|
+
[bind]: item.value
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
return Object.values(result).join(" ");
|
|
1641
|
+
} catch {
|
|
1642
|
+
return "";
|
|
1643
|
+
}
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1646
|
+
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1647
|
+
var StyleIndicatorInfotip = ({ inheritanceChain, bind }) => {
|
|
1648
|
+
const resolve = (0, import_react16.useMemo)(() => {
|
|
1649
|
+
const stylesSchema = (0, import_editor_styles2.getStylesSchema)();
|
|
1650
|
+
return (0, import_editor_canvas.createPropsResolver)({
|
|
1651
|
+
transformers: import_editor_canvas.styleTransformersRegistry,
|
|
1652
|
+
schema: { [bind]: stylesSchema[bind] }
|
|
1653
|
+
});
|
|
1654
|
+
}, [bind]);
|
|
1655
|
+
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, bind, resolve);
|
|
1656
|
+
return /* @__PURE__ */ React18.createElement(import_ui15.Card, { elevation: 0, sx: { maxWidth: 320 } }, /* @__PURE__ */ React18.createElement(import_ui15.CardContent, { sx: { p: 1.5, pb: 2.5 } }, /* @__PURE__ */ React18.createElement(import_ui15.List, null, items3.map((item) => /* @__PURE__ */ React18.createElement(import_ui15.ListItem, { key: item.id }, /* @__PURE__ */ React18.createElement(
|
|
1657
|
+
import_ui15.ListItemText,
|
|
1658
|
+
{
|
|
1659
|
+
primary: `${item.breakpoint} | ${item.displayLabel}. ${item.value}`
|
|
1660
|
+
}
|
|
1661
|
+
))))));
|
|
1662
|
+
};
|
|
1663
|
+
|
|
1664
|
+
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1592
1665
|
var StylesInheritanceIndicator = () => {
|
|
1666
|
+
const [open, setOpen] = (0, import_react17.useState)(false);
|
|
1593
1667
|
const { value, path } = (0, import_editor_controls5.useBoundProp)();
|
|
1594
1668
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1595
1669
|
const [bind] = path;
|
|
@@ -1602,38 +1676,61 @@ var StylesInheritanceIndicator = () => {
|
|
|
1602
1676
|
return null;
|
|
1603
1677
|
}
|
|
1604
1678
|
const { breakpoint, state } = variant.meta;
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1679
|
+
const isFinalValue = style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state;
|
|
1680
|
+
const hasValue = value !== null && value !== void 0;
|
|
1681
|
+
const label = getLabel({ isFinalValue, hasValue });
|
|
1682
|
+
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
1683
|
+
const { e_indications_popover: eIndicationsPopover } = getExperimentsConfig();
|
|
1684
|
+
if (!eIndicationsPopover) {
|
|
1685
|
+
return /* @__PURE__ */ React19.createElement(StyleIndicator, { variant: variantType, "aria-label": label });
|
|
1686
|
+
}
|
|
1687
|
+
const toggleOpen = () => setOpen((prev) => !prev);
|
|
1688
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1689
|
+
import_ui16.Infotip,
|
|
1690
|
+
{
|
|
1691
|
+
placement: "top",
|
|
1692
|
+
content: /* @__PURE__ */ React19.createElement(StyleIndicatorInfotip, { inheritanceChain, bind }),
|
|
1693
|
+
open,
|
|
1694
|
+
onClose: () => setOpen(false),
|
|
1695
|
+
trigger: "manual"
|
|
1696
|
+
},
|
|
1697
|
+
/* @__PURE__ */ React19.createElement(import_ui16.IconButton, { onClick: toggleOpen, "aria-label": label }, /* @__PURE__ */ React19.createElement(StyleIndicator, { variant: variantType }))
|
|
1698
|
+
);
|
|
1699
|
+
};
|
|
1700
|
+
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
1701
|
+
if (isFinalValue) {
|
|
1702
|
+
return (0, import_i18n5.__)("This is the final value", "elementor");
|
|
1613
1703
|
}
|
|
1614
|
-
if (
|
|
1615
|
-
return
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1704
|
+
if (hasValue) {
|
|
1705
|
+
return (0, import_i18n5.__)("This value is overridden by another style", "elementor");
|
|
1706
|
+
}
|
|
1707
|
+
return (0, import_i18n5.__)("This has value from another style", "elementor");
|
|
1708
|
+
};
|
|
1709
|
+
var getVariant = ({
|
|
1710
|
+
isFinalValue,
|
|
1711
|
+
hasValue,
|
|
1712
|
+
currentStyleProvider
|
|
1713
|
+
}) => {
|
|
1714
|
+
if (isFinalValue) {
|
|
1715
|
+
return (0, import_editor_styles_repository7.isElementsStylesProvider)(currentStyleProvider?.getKey?.()) ? "local" : "global";
|
|
1716
|
+
}
|
|
1717
|
+
if (hasValue) {
|
|
1718
|
+
return "overridden";
|
|
1622
1719
|
}
|
|
1623
|
-
return
|
|
1720
|
+
return void 0;
|
|
1624
1721
|
};
|
|
1625
1722
|
|
|
1626
1723
|
// src/controls-registry/styles-field.tsx
|
|
1627
1724
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
1628
1725
|
const [value, setValue] = useStylesField(bind);
|
|
1629
|
-
const stylesSchema = (0,
|
|
1726
|
+
const stylesSchema = (0, import_editor_styles3.getStylesSchema)();
|
|
1630
1727
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
1631
1728
|
const values = { [bind]: value };
|
|
1632
1729
|
const placeholderValues = { [bind]: placeholder };
|
|
1633
1730
|
const setValues = (newValue) => {
|
|
1634
1731
|
setValue(newValue[bind]);
|
|
1635
1732
|
};
|
|
1636
|
-
return /* @__PURE__ */
|
|
1733
|
+
return /* @__PURE__ */ React20.createElement(
|
|
1637
1734
|
import_editor_controls6.ControlAdornmentsProvider,
|
|
1638
1735
|
{
|
|
1639
1736
|
items: [
|
|
@@ -1643,7 +1740,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1643
1740
|
}
|
|
1644
1741
|
]
|
|
1645
1742
|
},
|
|
1646
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ React20.createElement(
|
|
1647
1744
|
import_editor_controls6.PropProvider,
|
|
1648
1745
|
{
|
|
1649
1746
|
propType,
|
|
@@ -1651,51 +1748,51 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1651
1748
|
setValue: setValues,
|
|
1652
1749
|
placeholder: placeholderValues
|
|
1653
1750
|
},
|
|
1654
|
-
/* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ React20.createElement(import_editor_controls6.PropKeyProvider, { bind }, children)
|
|
1655
1752
|
)
|
|
1656
1753
|
);
|
|
1657
1754
|
};
|
|
1658
1755
|
|
|
1659
1756
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1660
1757
|
var BackgroundSection = () => {
|
|
1661
|
-
return /* @__PURE__ */
|
|
1758
|
+
return /* @__PURE__ */ React21.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React21.createElement(import_editor_controls7.BackgroundControl, null));
|
|
1662
1759
|
};
|
|
1663
1760
|
|
|
1664
1761
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1665
|
-
var
|
|
1762
|
+
var React31 = __toESM(require("react"));
|
|
1666
1763
|
|
|
1667
1764
|
// src/components/panel-divider.tsx
|
|
1668
|
-
var
|
|
1669
|
-
var
|
|
1670
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
1765
|
+
var React22 = __toESM(require("react"));
|
|
1766
|
+
var import_ui17 = require("@elementor/ui");
|
|
1767
|
+
var PanelDivider = () => /* @__PURE__ */ React22.createElement(import_ui17.Divider, { sx: { my: 0.5 } });
|
|
1671
1768
|
|
|
1672
1769
|
// src/components/section-content.tsx
|
|
1673
|
-
var
|
|
1674
|
-
var
|
|
1675
|
-
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */
|
|
1770
|
+
var React23 = __toESM(require("react"));
|
|
1771
|
+
var import_ui18 = require("@elementor/ui");
|
|
1772
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React23.createElement(import_ui18.Stack, { gap, sx: { ...sx } }, children);
|
|
1676
1773
|
|
|
1677
1774
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1678
|
-
var
|
|
1775
|
+
var React29 = __toESM(require("react"));
|
|
1679
1776
|
var import_i18n9 = require("@wordpress/i18n");
|
|
1680
1777
|
|
|
1681
1778
|
// src/components/add-or-remove-content.tsx
|
|
1682
|
-
var
|
|
1779
|
+
var React25 = __toESM(require("react"));
|
|
1683
1780
|
var import_icons5 = require("@elementor/icons");
|
|
1684
|
-
var
|
|
1781
|
+
var import_ui20 = require("@elementor/ui");
|
|
1685
1782
|
|
|
1686
1783
|
// src/components/control-label.tsx
|
|
1687
|
-
var
|
|
1784
|
+
var React24 = __toESM(require("react"));
|
|
1688
1785
|
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1689
|
-
var
|
|
1786
|
+
var import_ui19 = require("@elementor/ui");
|
|
1690
1787
|
var ControlLabel = ({ children }) => {
|
|
1691
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ React24.createElement(import_ui19.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React24.createElement(import_editor_controls8.ControlFormLabel, null, children), /* @__PURE__ */ React24.createElement(import_editor_controls8.ControlAdornments, null));
|
|
1692
1789
|
};
|
|
1693
1790
|
|
|
1694
1791
|
// src/components/add-or-remove-content.tsx
|
|
1695
1792
|
var SIZE2 = "tiny";
|
|
1696
1793
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1697
|
-
return /* @__PURE__ */
|
|
1698
|
-
|
|
1794
|
+
return /* @__PURE__ */ React25.createElement(SectionContent, null, /* @__PURE__ */ React25.createElement(
|
|
1795
|
+
import_ui20.Stack,
|
|
1699
1796
|
{
|
|
1700
1797
|
direction: "row",
|
|
1701
1798
|
sx: {
|
|
@@ -1704,24 +1801,24 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1704
1801
|
marginInlineEnd: -0.75
|
|
1705
1802
|
}
|
|
1706
1803
|
},
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
isAdded ? /* @__PURE__ */
|
|
1709
|
-
), /* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ React25.createElement(ControlLabel, null, label),
|
|
1805
|
+
isAdded ? /* @__PURE__ */ React25.createElement(import_ui20.IconButton, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React25.createElement(import_icons5.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React25.createElement(import_ui20.IconButton, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React25.createElement(import_icons5.PlusIcon, { fontSize: SIZE2 }))
|
|
1806
|
+
), /* @__PURE__ */ React25.createElement(import_ui20.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React25.createElement(SectionContent, null, children)));
|
|
1710
1807
|
};
|
|
1711
1808
|
|
|
1712
1809
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1713
|
-
var
|
|
1810
|
+
var React26 = __toESM(require("react"));
|
|
1714
1811
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
1715
|
-
var
|
|
1812
|
+
var import_ui21 = require("@elementor/ui");
|
|
1716
1813
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1717
1814
|
var BorderColorField = () => {
|
|
1718
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React26.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, (0, import_i18n6.__)("Border color", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(import_editor_controls9.ColorControl, null))));
|
|
1719
1816
|
};
|
|
1720
1817
|
|
|
1721
1818
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1722
|
-
var
|
|
1819
|
+
var React27 = __toESM(require("react"));
|
|
1723
1820
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
1724
|
-
var
|
|
1821
|
+
var import_ui22 = require("@elementor/ui");
|
|
1725
1822
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1726
1823
|
var borderStyles = [
|
|
1727
1824
|
{ value: "none", label: (0, import_i18n7.__)("None", "elementor") },
|
|
@@ -1735,58 +1832,58 @@ var borderStyles = [
|
|
|
1735
1832
|
{ value: "outset", label: (0, import_i18n7.__)("Outset", "elementor") }
|
|
1736
1833
|
];
|
|
1737
1834
|
var BorderStyleField = () => {
|
|
1738
|
-
return /* @__PURE__ */
|
|
1835
|
+
return /* @__PURE__ */ React27.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n7.__)("Border type", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React27.createElement(import_editor_controls10.SelectControl, { options: borderStyles }))));
|
|
1739
1836
|
};
|
|
1740
1837
|
|
|
1741
1838
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1742
|
-
var
|
|
1839
|
+
var React28 = __toESM(require("react"));
|
|
1743
1840
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
1744
1841
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
1745
1842
|
var import_icons6 = require("@elementor/icons");
|
|
1746
|
-
var
|
|
1843
|
+
var import_ui24 = require("@elementor/ui");
|
|
1747
1844
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1748
1845
|
|
|
1749
1846
|
// src/hooks/use-direction.ts
|
|
1750
|
-
var
|
|
1847
|
+
var import_ui23 = require("@elementor/ui");
|
|
1751
1848
|
function useDirection() {
|
|
1752
|
-
const theme = (0,
|
|
1849
|
+
const theme = (0, import_ui23.useTheme)(), extendedWindow = window;
|
|
1753
1850
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1754
1851
|
return { isSiteRtl, isUiRtl };
|
|
1755
1852
|
}
|
|
1756
1853
|
|
|
1757
1854
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1758
|
-
var InlineStartIcon = (0,
|
|
1759
|
-
var InlineEndIcon = (0,
|
|
1855
|
+
var InlineStartIcon = (0, import_ui24.withDirection)(import_icons6.SideRightIcon);
|
|
1856
|
+
var InlineEndIcon = (0, import_ui24.withDirection)(import_icons6.SideLeftIcon);
|
|
1760
1857
|
var getEdges = (isSiteRtl) => [
|
|
1761
1858
|
{
|
|
1762
1859
|
label: (0, import_i18n8.__)("Top", "elementor"),
|
|
1763
|
-
icon: /* @__PURE__ */
|
|
1860
|
+
icon: /* @__PURE__ */ React28.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" }),
|
|
1764
1861
|
bind: "block-start"
|
|
1765
1862
|
},
|
|
1766
1863
|
{
|
|
1767
1864
|
label: isSiteRtl ? (0, import_i18n8.__)("Left", "elementor") : (0, import_i18n8.__)("Right", "elementor"),
|
|
1768
|
-
icon: /* @__PURE__ */
|
|
1865
|
+
icon: /* @__PURE__ */ React28.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
1769
1866
|
bind: "inline-end"
|
|
1770
1867
|
},
|
|
1771
1868
|
{
|
|
1772
1869
|
label: (0, import_i18n8.__)("Bottom", "elementor"),
|
|
1773
|
-
icon: /* @__PURE__ */
|
|
1870
|
+
icon: /* @__PURE__ */ React28.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" }),
|
|
1774
1871
|
bind: "block-end"
|
|
1775
1872
|
},
|
|
1776
1873
|
{
|
|
1777
1874
|
label: isSiteRtl ? (0, import_i18n8.__)("Right", "elementor") : (0, import_i18n8.__)("Left", "elementor"),
|
|
1778
|
-
icon: /* @__PURE__ */
|
|
1875
|
+
icon: /* @__PURE__ */ React28.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
1779
1876
|
bind: "inline-start"
|
|
1780
1877
|
}
|
|
1781
1878
|
];
|
|
1782
1879
|
var BorderWidthField = () => {
|
|
1783
1880
|
const { isSiteRtl } = useDirection();
|
|
1784
|
-
return /* @__PURE__ */
|
|
1881
|
+
return /* @__PURE__ */ React28.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React28.createElement(
|
|
1785
1882
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
1786
1883
|
{
|
|
1787
1884
|
items: getEdges(isSiteRtl),
|
|
1788
1885
|
label: (0, import_i18n8.__)("Border width", "elementor"),
|
|
1789
|
-
icon: /* @__PURE__ */
|
|
1886
|
+
icon: /* @__PURE__ */ React28.createElement(import_icons6.SideAllIcon, { fontSize: "tiny" }),
|
|
1790
1887
|
tooltipLabel: (0, import_i18n8.__)("Adjust borders", "elementor"),
|
|
1791
1888
|
multiSizePropTypeUtil: import_editor_props4.borderWidthPropTypeUtil
|
|
1792
1889
|
}
|
|
@@ -1812,7 +1909,7 @@ var BorderField = () => {
|
|
|
1812
1909
|
});
|
|
1813
1910
|
};
|
|
1814
1911
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1815
|
-
return /* @__PURE__ */
|
|
1912
|
+
return /* @__PURE__ */ React29.createElement(
|
|
1816
1913
|
AddOrRemoveContent,
|
|
1817
1914
|
{
|
|
1818
1915
|
label: (0, import_i18n9.__)("Border", "elementor"),
|
|
@@ -1820,23 +1917,23 @@ var BorderField = () => {
|
|
|
1820
1917
|
onAdd: addBorder,
|
|
1821
1918
|
onRemove: removeBorder
|
|
1822
1919
|
},
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ React29.createElement(BorderWidthField, null),
|
|
1921
|
+
/* @__PURE__ */ React29.createElement(BorderColorField, null),
|
|
1922
|
+
/* @__PURE__ */ React29.createElement(BorderStyleField, null)
|
|
1826
1923
|
);
|
|
1827
1924
|
};
|
|
1828
1925
|
|
|
1829
1926
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1830
|
-
var
|
|
1927
|
+
var React30 = __toESM(require("react"));
|
|
1831
1928
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
1832
1929
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
1833
1930
|
var import_icons7 = require("@elementor/icons");
|
|
1834
|
-
var
|
|
1931
|
+
var import_ui25 = require("@elementor/ui");
|
|
1835
1932
|
var import_i18n10 = require("@wordpress/i18n");
|
|
1836
|
-
var StartStartIcon = (0,
|
|
1837
|
-
var StartEndIcon = (0,
|
|
1838
|
-
var EndStartIcon = (0,
|
|
1839
|
-
var EndEndIcon = (0,
|
|
1933
|
+
var StartStartIcon = (0, import_ui25.withDirection)(import_icons7.RadiusTopLeftIcon);
|
|
1934
|
+
var StartEndIcon = (0, import_ui25.withDirection)(import_icons7.RadiusTopRightIcon);
|
|
1935
|
+
var EndStartIcon = (0, import_ui25.withDirection)(import_icons7.RadiusBottomLeftIcon);
|
|
1936
|
+
var EndEndIcon = (0, import_ui25.withDirection)(import_icons7.RadiusBottomRightIcon);
|
|
1840
1937
|
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top right", "elementor") : (0, import_i18n10.__)("Top left", "elementor");
|
|
1841
1938
|
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top left", "elementor") : (0, import_i18n10.__)("Top right", "elementor");
|
|
1842
1939
|
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom right", "elementor") : (0, import_i18n10.__)("Bottom left", "elementor");
|
|
@@ -1844,33 +1941,33 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom le
|
|
|
1844
1941
|
var getCorners = (isSiteRtl) => [
|
|
1845
1942
|
{
|
|
1846
1943
|
label: getStartStartLabel(isSiteRtl),
|
|
1847
|
-
icon: /* @__PURE__ */
|
|
1944
|
+
icon: /* @__PURE__ */ React30.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
1848
1945
|
bind: "start-start"
|
|
1849
1946
|
},
|
|
1850
1947
|
{
|
|
1851
1948
|
label: getStartEndLabel(isSiteRtl),
|
|
1852
|
-
icon: /* @__PURE__ */
|
|
1949
|
+
icon: /* @__PURE__ */ React30.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
1853
1950
|
bind: "start-end"
|
|
1854
1951
|
},
|
|
1855
1952
|
{
|
|
1856
1953
|
label: getEndStartLabel(isSiteRtl),
|
|
1857
|
-
icon: /* @__PURE__ */
|
|
1954
|
+
icon: /* @__PURE__ */ React30.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
1858
1955
|
bind: "end-start"
|
|
1859
1956
|
},
|
|
1860
1957
|
{
|
|
1861
1958
|
label: getEndEndLabel(isSiteRtl),
|
|
1862
|
-
icon: /* @__PURE__ */
|
|
1959
|
+
icon: /* @__PURE__ */ React30.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
1863
1960
|
bind: "end-end"
|
|
1864
1961
|
}
|
|
1865
1962
|
];
|
|
1866
1963
|
var BorderRadiusField = () => {
|
|
1867
1964
|
const { isSiteRtl } = useDirection();
|
|
1868
|
-
return /* @__PURE__ */
|
|
1965
|
+
return /* @__PURE__ */ React30.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React30.createElement(
|
|
1869
1966
|
import_editor_controls12.EqualUnequalSizesControl,
|
|
1870
1967
|
{
|
|
1871
1968
|
items: getCorners(isSiteRtl),
|
|
1872
1969
|
label: (0, import_i18n10.__)("Border radius", "elementor"),
|
|
1873
|
-
icon: /* @__PURE__ */
|
|
1970
|
+
icon: /* @__PURE__ */ React30.createElement(import_icons7.BorderCornersIcon, { fontSize: "tiny" }),
|
|
1874
1971
|
tooltipLabel: (0, import_i18n10.__)("Adjust corners", "elementor"),
|
|
1875
1972
|
multiSizePropTypeUtil: import_editor_props5.borderRadiusPropTypeUtil
|
|
1876
1973
|
}
|
|
@@ -1878,17 +1975,17 @@ var BorderRadiusField = () => {
|
|
|
1878
1975
|
};
|
|
1879
1976
|
|
|
1880
1977
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1881
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1978
|
+
var BorderSection = () => /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(BorderRadiusField, null), /* @__PURE__ */ React31.createElement(PanelDivider, null), /* @__PURE__ */ React31.createElement(BorderField, null));
|
|
1882
1979
|
|
|
1883
1980
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1884
|
-
var
|
|
1981
|
+
var React32 = __toESM(require("react"));
|
|
1885
1982
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
1886
1983
|
var EffectsSection = () => {
|
|
1887
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ React32.createElement(SectionContent, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React32.createElement(import_editor_controls13.BoxShadowRepeaterControl, null)));
|
|
1888
1985
|
};
|
|
1889
1986
|
|
|
1890
1987
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1891
|
-
var
|
|
1988
|
+
var React44 = __toESM(require("react"));
|
|
1892
1989
|
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1893
1990
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
1894
1991
|
var import_i18n21 = require("@wordpress/i18n");
|
|
@@ -1919,16 +2016,16 @@ function useComputedStyle(elementId) {
|
|
|
1919
2016
|
}
|
|
1920
2017
|
|
|
1921
2018
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1922
|
-
var
|
|
2019
|
+
var React34 = __toESM(require("react"));
|
|
1923
2020
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
1924
2021
|
var import_icons8 = require("@elementor/icons");
|
|
1925
|
-
var
|
|
2022
|
+
var import_ui27 = require("@elementor/ui");
|
|
1926
2023
|
var import_i18n11 = require("@wordpress/i18n");
|
|
1927
2024
|
|
|
1928
2025
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1929
|
-
var
|
|
1930
|
-
var
|
|
1931
|
-
var
|
|
2026
|
+
var React33 = __toESM(require("react"));
|
|
2027
|
+
var import_react18 = require("react");
|
|
2028
|
+
var import_ui26 = require("@elementor/ui");
|
|
1932
2029
|
var CLOCKWISE_ANGLES = {
|
|
1933
2030
|
row: 0,
|
|
1934
2031
|
column: 90,
|
|
@@ -1948,13 +2045,13 @@ var RotatedIcon = ({
|
|
|
1948
2045
|
offset = 0,
|
|
1949
2046
|
disableRotationForReversed = false
|
|
1950
2047
|
}) => {
|
|
1951
|
-
const rotate = (0,
|
|
2048
|
+
const rotate = (0, import_react18.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
1952
2049
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
1953
|
-
return /* @__PURE__ */
|
|
2050
|
+
return /* @__PURE__ */ React33.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1954
2051
|
};
|
|
1955
2052
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
1956
2053
|
const [direction] = useStylesField("flex-direction");
|
|
1957
|
-
const isRtl = "rtl" === (0,
|
|
2054
|
+
const isRtl = "rtl" === (0, import_ui26.useTheme)().direction;
|
|
1958
2055
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1959
2056
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1960
2057
|
const currentDirection = direction?.value || "row";
|
|
@@ -1969,8 +2066,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
1969
2066
|
};
|
|
1970
2067
|
|
|
1971
2068
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1972
|
-
var StartIcon = (0,
|
|
1973
|
-
var EndIcon = (0,
|
|
2069
|
+
var StartIcon = (0, import_ui27.withDirection)(import_icons8.JustifyTopIcon);
|
|
2070
|
+
var EndIcon = (0, import_ui27.withDirection)(import_icons8.JustifyBottomIcon);
|
|
1974
2071
|
var iconProps = {
|
|
1975
2072
|
isClockwise: false,
|
|
1976
2073
|
offset: 0,
|
|
@@ -1980,53 +2077,53 @@ var options = [
|
|
|
1980
2077
|
{
|
|
1981
2078
|
value: "start",
|
|
1982
2079
|
label: (0, import_i18n11.__)("Start", "elementor"),
|
|
1983
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2080
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1984
2081
|
showTooltip: true
|
|
1985
2082
|
},
|
|
1986
2083
|
{
|
|
1987
2084
|
value: "center",
|
|
1988
2085
|
label: (0, import_i18n11.__)("Center", "elementor"),
|
|
1989
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2086
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons8.JustifyCenterIcon, size, ...iconProps }),
|
|
1990
2087
|
showTooltip: true
|
|
1991
2088
|
},
|
|
1992
2089
|
{
|
|
1993
2090
|
value: "end",
|
|
1994
2091
|
label: (0, import_i18n11.__)("End", "elementor"),
|
|
1995
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2092
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1996
2093
|
showTooltip: true
|
|
1997
2094
|
},
|
|
1998
2095
|
{
|
|
1999
2096
|
value: "space-between",
|
|
2000
2097
|
label: (0, import_i18n11.__)("Space between", "elementor"),
|
|
2001
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2098
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons8.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
2002
2099
|
showTooltip: true
|
|
2003
2100
|
},
|
|
2004
2101
|
{
|
|
2005
2102
|
value: "space-around",
|
|
2006
2103
|
label: (0, import_i18n11.__)("Space around", "elementor"),
|
|
2007
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2104
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons8.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
2008
2105
|
showTooltip: true
|
|
2009
2106
|
},
|
|
2010
2107
|
{
|
|
2011
2108
|
value: "space-evenly",
|
|
2012
2109
|
label: (0, import_i18n11.__)("Space evenly", "elementor"),
|
|
2013
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2110
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons8.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
2014
2111
|
showTooltip: true
|
|
2015
2112
|
}
|
|
2016
2113
|
];
|
|
2017
2114
|
var AlignContentField = () => {
|
|
2018
2115
|
const { isSiteRtl } = useDirection();
|
|
2019
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ React34.createElement(import_ui27.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui27.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React34.createElement(import_ui27.Stack, { gap: 1 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0, import_i18n11.__)("Align content", "elementor")), /* @__PURE__ */ React34.createElement(import_editor_controls14.ToggleControl, { options, fullWidth: true })))));
|
|
2020
2117
|
};
|
|
2021
2118
|
|
|
2022
2119
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2023
|
-
var
|
|
2120
|
+
var React35 = __toESM(require("react"));
|
|
2024
2121
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2025
2122
|
var import_icons9 = require("@elementor/icons");
|
|
2026
|
-
var
|
|
2123
|
+
var import_ui28 = require("@elementor/ui");
|
|
2027
2124
|
var import_i18n12 = require("@wordpress/i18n");
|
|
2028
|
-
var StartIcon2 = (0,
|
|
2029
|
-
var EndIcon2 = (0,
|
|
2125
|
+
var StartIcon2 = (0, import_ui28.withDirection)(import_icons9.LayoutAlignLeftIcon);
|
|
2126
|
+
var EndIcon2 = (0, import_ui28.withDirection)(import_icons9.LayoutAlignRightIcon);
|
|
2030
2127
|
var iconProps2 = {
|
|
2031
2128
|
isClockwise: false,
|
|
2032
2129
|
offset: 90
|
|
@@ -2035,38 +2132,38 @@ var options2 = [
|
|
|
2035
2132
|
{
|
|
2036
2133
|
value: "start",
|
|
2037
2134
|
label: (0, import_i18n12.__)("Start", "elementor"),
|
|
2038
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2135
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2039
2136
|
showTooltip: true
|
|
2040
2137
|
},
|
|
2041
2138
|
{
|
|
2042
2139
|
value: "center",
|
|
2043
2140
|
label: (0, import_i18n12.__)("Center", "elementor"),
|
|
2044
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2141
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: import_icons9.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
2045
2142
|
showTooltip: true
|
|
2046
2143
|
},
|
|
2047
2144
|
{
|
|
2048
2145
|
value: "end",
|
|
2049
2146
|
label: (0, import_i18n12.__)("End", "elementor"),
|
|
2050
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2147
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2051
2148
|
showTooltip: true
|
|
2052
2149
|
},
|
|
2053
2150
|
{
|
|
2054
2151
|
value: "stretch",
|
|
2055
2152
|
label: (0, import_i18n12.__)("Stretch", "elementor"),
|
|
2056
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2153
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: import_icons9.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
2057
2154
|
showTooltip: true
|
|
2058
2155
|
}
|
|
2059
2156
|
];
|
|
2060
2157
|
var AlignItemsField = () => {
|
|
2061
2158
|
const { isSiteRtl } = useDirection();
|
|
2062
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ React35.createElement(import_ui28.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(import_ui28.ThemeProvider, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React35.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, (0, import_i18n12.__)("Align items", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui28.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React35.createElement(import_editor_controls15.ToggleControl, { options: options2 }))))));
|
|
2063
2160
|
};
|
|
2064
2161
|
|
|
2065
2162
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2066
|
-
var
|
|
2163
|
+
var React36 = __toESM(require("react"));
|
|
2067
2164
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2068
2165
|
var import_icons10 = require("@elementor/icons");
|
|
2069
|
-
var
|
|
2166
|
+
var import_ui29 = require("@elementor/ui");
|
|
2070
2167
|
var import_i18n13 = require("@wordpress/i18n");
|
|
2071
2168
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2072
2169
|
row: 90,
|
|
@@ -2074,8 +2171,8 @@ var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
|
2074
2171
|
column: 0,
|
|
2075
2172
|
"column-reverse": 0
|
|
2076
2173
|
};
|
|
2077
|
-
var StartIcon3 = (0,
|
|
2078
|
-
var EndIcon3 = (0,
|
|
2174
|
+
var StartIcon3 = (0, import_ui29.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
2175
|
+
var EndIcon3 = (0, import_ui29.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
2079
2176
|
var iconProps3 = {
|
|
2080
2177
|
isClockwise: false
|
|
2081
2178
|
};
|
|
@@ -2083,7 +2180,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2083
2180
|
{
|
|
2084
2181
|
value: "start",
|
|
2085
2182
|
label: (0, import_i18n13.__)("Start", "elementor"),
|
|
2086
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2183
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(
|
|
2087
2184
|
RotatedIcon,
|
|
2088
2185
|
{
|
|
2089
2186
|
icon: StartIcon3,
|
|
@@ -2097,7 +2194,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2097
2194
|
{
|
|
2098
2195
|
value: "center",
|
|
2099
2196
|
label: (0, import_i18n13.__)("Center", "elementor"),
|
|
2100
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2197
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(
|
|
2101
2198
|
RotatedIcon,
|
|
2102
2199
|
{
|
|
2103
2200
|
icon: import_icons10.LayoutAlignCenterIcon,
|
|
@@ -2111,7 +2208,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2111
2208
|
{
|
|
2112
2209
|
value: "end",
|
|
2113
2210
|
label: (0, import_i18n13.__)("End", "elementor"),
|
|
2114
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2211
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(
|
|
2115
2212
|
RotatedIcon,
|
|
2116
2213
|
{
|
|
2117
2214
|
icon: EndIcon3,
|
|
@@ -2125,7 +2222,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2125
2222
|
{
|
|
2126
2223
|
value: "stretch",
|
|
2127
2224
|
label: (0, import_i18n13.__)("Stretch", "elementor"),
|
|
2128
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2225
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(
|
|
2129
2226
|
RotatedIcon,
|
|
2130
2227
|
{
|
|
2131
2228
|
icon: import_icons10.LayoutDistributeVerticalIcon,
|
|
@@ -2139,13 +2236,13 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2139
2236
|
];
|
|
2140
2237
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2141
2238
|
const { isSiteRtl } = useDirection();
|
|
2142
|
-
return /* @__PURE__ */
|
|
2239
|
+
return /* @__PURE__ */ React36.createElement(import_ui29.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(import_ui29.ThemeProvider, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0, import_i18n13.__)("Align self", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React36.createElement(import_editor_controls16.ToggleControl, { options: getOptions(parentStyleDirection) }))))));
|
|
2143
2240
|
};
|
|
2144
2241
|
|
|
2145
2242
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2146
|
-
var
|
|
2243
|
+
var React37 = __toESM(require("react"));
|
|
2147
2244
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2148
|
-
var
|
|
2245
|
+
var import_ui30 = require("@elementor/ui");
|
|
2149
2246
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2150
2247
|
var displayFieldOptions = [
|
|
2151
2248
|
{
|
|
@@ -2175,59 +2272,59 @@ var displayFieldOptions = [
|
|
|
2175
2272
|
];
|
|
2176
2273
|
var DisplayField = () => {
|
|
2177
2274
|
const placeholder = useDisplayPlaceholderValue();
|
|
2178
|
-
return /* @__PURE__ */
|
|
2275
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React37.createElement(import_ui30.Stack, { gap: 0.75 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n14.__)("Display", "elementor")), /* @__PURE__ */ React37.createElement(import_editor_controls17.ToggleControl, { options: displayFieldOptions, fullWidth: true })));
|
|
2179
2276
|
};
|
|
2180
2277
|
var useDisplayPlaceholderValue = () => useStylesInheritanceField("display")[0]?.value ?? void 0;
|
|
2181
2278
|
|
|
2182
2279
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2183
|
-
var
|
|
2280
|
+
var React38 = __toESM(require("react"));
|
|
2184
2281
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
2185
2282
|
var import_icons11 = require("@elementor/icons");
|
|
2186
|
-
var
|
|
2283
|
+
var import_ui31 = require("@elementor/ui");
|
|
2187
2284
|
var import_i18n15 = require("@wordpress/i18n");
|
|
2188
2285
|
var options3 = [
|
|
2189
2286
|
{
|
|
2190
2287
|
value: "row",
|
|
2191
2288
|
label: (0, import_i18n15.__)("Row", "elementor"),
|
|
2192
2289
|
renderContent: ({ size }) => {
|
|
2193
|
-
const StartIcon5 = (0,
|
|
2194
|
-
return /* @__PURE__ */
|
|
2290
|
+
const StartIcon5 = (0, import_ui31.withDirection)(import_icons11.ArrowRightIcon);
|
|
2291
|
+
return /* @__PURE__ */ React38.createElement(StartIcon5, { fontSize: size });
|
|
2195
2292
|
},
|
|
2196
2293
|
showTooltip: true
|
|
2197
2294
|
},
|
|
2198
2295
|
{
|
|
2199
2296
|
value: "column",
|
|
2200
2297
|
label: (0, import_i18n15.__)("Column", "elementor"),
|
|
2201
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2298
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons11.ArrowDownSmallIcon, { fontSize: size }),
|
|
2202
2299
|
showTooltip: true
|
|
2203
2300
|
},
|
|
2204
2301
|
{
|
|
2205
2302
|
value: "row-reverse",
|
|
2206
2303
|
label: (0, import_i18n15.__)("Reversed row", "elementor"),
|
|
2207
2304
|
renderContent: ({ size }) => {
|
|
2208
|
-
const EndIcon5 = (0,
|
|
2209
|
-
return /* @__PURE__ */
|
|
2305
|
+
const EndIcon5 = (0, import_ui31.withDirection)(import_icons11.ArrowLeftIcon);
|
|
2306
|
+
return /* @__PURE__ */ React38.createElement(EndIcon5, { fontSize: size });
|
|
2210
2307
|
},
|
|
2211
2308
|
showTooltip: true
|
|
2212
2309
|
},
|
|
2213
2310
|
{
|
|
2214
2311
|
value: "column-reverse",
|
|
2215
2312
|
label: (0, import_i18n15.__)("Reversed column", "elementor"),
|
|
2216
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2313
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons11.ArrowUpSmallIcon, { fontSize: size }),
|
|
2217
2314
|
showTooltip: true
|
|
2218
2315
|
}
|
|
2219
2316
|
];
|
|
2220
2317
|
var FlexDirectionField = () => {
|
|
2221
2318
|
const { isSiteRtl } = useDirection();
|
|
2222
|
-
return /* @__PURE__ */
|
|
2319
|
+
return /* @__PURE__ */ React38.createElement(import_ui31.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(import_ui31.ThemeProvider, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n15.__)("Direction", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(import_editor_controls18.ToggleControl, { options: options3 }))))));
|
|
2223
2320
|
};
|
|
2224
2321
|
|
|
2225
2322
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2226
|
-
var
|
|
2227
|
-
var
|
|
2323
|
+
var React39 = __toESM(require("react"));
|
|
2324
|
+
var import_react19 = require("react");
|
|
2228
2325
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2229
2326
|
var import_icons12 = require("@elementor/icons");
|
|
2230
|
-
var
|
|
2327
|
+
var import_ui32 = require("@elementor/ui");
|
|
2231
2328
|
var import_i18n16 = require("@wordpress/i18n");
|
|
2232
2329
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
2233
2330
|
var LAST_DEFAULT_VALUE = 99999;
|
|
@@ -2242,25 +2339,25 @@ var items = [
|
|
|
2242
2339
|
{
|
|
2243
2340
|
value: FIRST,
|
|
2244
2341
|
label: (0, import_i18n16.__)("First", "elementor"),
|
|
2245
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2342
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
2246
2343
|
showTooltip: true
|
|
2247
2344
|
},
|
|
2248
2345
|
{
|
|
2249
2346
|
value: LAST,
|
|
2250
2347
|
label: (0, import_i18n16.__)("Last", "elementor"),
|
|
2251
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2348
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
2252
2349
|
showTooltip: true
|
|
2253
2350
|
},
|
|
2254
2351
|
{
|
|
2255
2352
|
value: CUSTOM,
|
|
2256
2353
|
label: (0, import_i18n16.__)("Custom", "elementor"),
|
|
2257
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2354
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons12.PencilIcon, { fontSize: size }),
|
|
2258
2355
|
showTooltip: true
|
|
2259
2356
|
}
|
|
2260
2357
|
];
|
|
2261
2358
|
var FlexOrderField = () => {
|
|
2262
2359
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
2263
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
2360
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react19.useState)(getGroupControlValue(order?.value || null));
|
|
2264
2361
|
const handleToggleButtonChange = (group) => {
|
|
2265
2362
|
setGroupControlValue(group);
|
|
2266
2363
|
if (!group || group === CUSTOM) {
|
|
@@ -2269,7 +2366,7 @@ var FlexOrderField = () => {
|
|
|
2269
2366
|
}
|
|
2270
2367
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
2271
2368
|
};
|
|
2272
|
-
return /* @__PURE__ */
|
|
2369
|
+
return /* @__PURE__ */ React39.createElement(import_ui32.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React39.createElement(import_ui32.ThemeProvider, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n16.__)("Order", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(
|
|
2273
2370
|
import_editor_controls19.ControlToggleButtonGroup,
|
|
2274
2371
|
{
|
|
2275
2372
|
items,
|
|
@@ -2277,7 +2374,7 @@ var FlexOrderField = () => {
|
|
|
2277
2374
|
onChange: handleToggleButtonChange,
|
|
2278
2375
|
exclusive: true
|
|
2279
2376
|
}
|
|
2280
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
2377
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n16.__)("Custom order", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(
|
|
2281
2378
|
import_editor_controls19.NumberControl,
|
|
2282
2379
|
{
|
|
2283
2380
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -2297,31 +2394,31 @@ var getGroupControlValue = (order) => {
|
|
|
2297
2394
|
};
|
|
2298
2395
|
|
|
2299
2396
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
2300
|
-
var
|
|
2301
|
-
var
|
|
2397
|
+
var React40 = __toESM(require("react"));
|
|
2398
|
+
var import_react20 = require("react");
|
|
2302
2399
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
2303
2400
|
var import_editor_props6 = require("@elementor/editor-props");
|
|
2304
2401
|
var import_icons13 = require("@elementor/icons");
|
|
2305
|
-
var
|
|
2402
|
+
var import_ui33 = require("@elementor/ui");
|
|
2306
2403
|
var import_i18n17 = require("@wordpress/i18n");
|
|
2307
2404
|
var DEFAULT = 1;
|
|
2308
2405
|
var items2 = [
|
|
2309
2406
|
{
|
|
2310
2407
|
value: "flex-grow",
|
|
2311
2408
|
label: (0, import_i18n17.__)("Grow", "elementor"),
|
|
2312
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2409
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons13.ExpandIcon, { fontSize: size }),
|
|
2313
2410
|
showTooltip: true
|
|
2314
2411
|
},
|
|
2315
2412
|
{
|
|
2316
2413
|
value: "flex-shrink",
|
|
2317
2414
|
label: (0, import_i18n17.__)("Shrink", "elementor"),
|
|
2318
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2415
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons13.ShrinkIcon, { fontSize: size }),
|
|
2319
2416
|
showTooltip: true
|
|
2320
2417
|
},
|
|
2321
2418
|
{
|
|
2322
2419
|
value: "custom",
|
|
2323
2420
|
label: (0, import_i18n17.__)("Custom", "elementor"),
|
|
2324
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2421
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
2325
2422
|
showTooltip: true
|
|
2326
2423
|
}
|
|
2327
2424
|
];
|
|
@@ -2331,7 +2428,7 @@ var FlexSizeField = () => {
|
|
|
2331
2428
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
2332
2429
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
2333
2430
|
const basis = fields?.["flex-basis"]?.value || null;
|
|
2334
|
-
const currentGroup = (0,
|
|
2431
|
+
const currentGroup = (0, import_react20.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react20.useState)(currentGroup);
|
|
2335
2432
|
const onChangeGroup = (group = null) => {
|
|
2336
2433
|
setActiveGroup(group);
|
|
2337
2434
|
if (!group || group === "custom") {
|
|
@@ -2356,7 +2453,7 @@ var FlexSizeField = () => {
|
|
|
2356
2453
|
"flex-shrink": import_editor_props6.numberPropTypeUtil.create(DEFAULT)
|
|
2357
2454
|
});
|
|
2358
2455
|
};
|
|
2359
|
-
return /* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ React40.createElement(import_ui33.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(import_ui33.ThemeProvider, null, /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n17.__)("Size", "elementor")))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React40.createElement(
|
|
2360
2457
|
import_editor_controls20.ControlToggleButtonGroup,
|
|
2361
2458
|
{
|
|
2362
2459
|
value: activeGroup,
|
|
@@ -2364,9 +2461,9 @@ var FlexSizeField = () => {
|
|
|
2364
2461
|
items: items2,
|
|
2365
2462
|
exclusive: true
|
|
2366
2463
|
}
|
|
2367
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
2464
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React40.createElement(FlexCustomField, null))));
|
|
2368
2465
|
};
|
|
2369
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
2466
|
+
var FlexCustomField = () => /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n17.__)("Grow", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React40.createElement(import_editor_controls20.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React40.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n17.__)("Shrink", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React40.createElement(import_editor_controls20.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React40.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n17.__)("Basis", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React40.createElement(import_editor_controls20.SizeControl, { extendedValues: ["auto"] })))));
|
|
2370
2467
|
var getActiveGroup = ({
|
|
2371
2468
|
grow,
|
|
2372
2469
|
shrink,
|
|
@@ -2388,22 +2485,22 @@ var getActiveGroup = ({
|
|
|
2388
2485
|
};
|
|
2389
2486
|
|
|
2390
2487
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
2391
|
-
var
|
|
2488
|
+
var React41 = __toESM(require("react"));
|
|
2392
2489
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
2393
|
-
var
|
|
2490
|
+
var import_ui34 = require("@elementor/ui");
|
|
2394
2491
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2395
2492
|
var GapControlField = () => {
|
|
2396
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ React41.createElement(import_ui34.Stack, { gap: 1 }, /* @__PURE__ */ React41.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React41.createElement(import_editor_controls21.GapControl, { label: (0, import_i18n18.__)("Gaps", "elementor") })));
|
|
2397
2494
|
};
|
|
2398
2495
|
|
|
2399
2496
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
2400
|
-
var
|
|
2497
|
+
var React42 = __toESM(require("react"));
|
|
2401
2498
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
2402
2499
|
var import_icons14 = require("@elementor/icons");
|
|
2403
|
-
var
|
|
2500
|
+
var import_ui35 = require("@elementor/ui");
|
|
2404
2501
|
var import_i18n19 = require("@wordpress/i18n");
|
|
2405
|
-
var StartIcon4 = (0,
|
|
2406
|
-
var EndIcon4 = (0,
|
|
2502
|
+
var StartIcon4 = (0, import_ui35.withDirection)(import_icons14.JustifyTopIcon);
|
|
2503
|
+
var EndIcon4 = (0, import_ui35.withDirection)(import_icons14.JustifyBottomIcon);
|
|
2407
2504
|
var iconProps4 = {
|
|
2408
2505
|
isClockwise: true,
|
|
2409
2506
|
offset: -90
|
|
@@ -2412,74 +2509,74 @@ var options4 = [
|
|
|
2412
2509
|
{
|
|
2413
2510
|
value: "flex-start",
|
|
2414
2511
|
label: (0, import_i18n19.__)("Start", "elementor"),
|
|
2415
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2512
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
2416
2513
|
showTooltip: true
|
|
2417
2514
|
},
|
|
2418
2515
|
{
|
|
2419
2516
|
value: "center",
|
|
2420
2517
|
label: (0, import_i18n19.__)("Center", "elementor"),
|
|
2421
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2518
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons14.JustifyCenterIcon, size, ...iconProps4 }),
|
|
2422
2519
|
showTooltip: true
|
|
2423
2520
|
},
|
|
2424
2521
|
{
|
|
2425
2522
|
value: "flex-end",
|
|
2426
2523
|
label: (0, import_i18n19.__)("End", "elementor"),
|
|
2427
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2524
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
2428
2525
|
showTooltip: true
|
|
2429
2526
|
},
|
|
2430
2527
|
{
|
|
2431
2528
|
value: "space-between",
|
|
2432
2529
|
label: (0, import_i18n19.__)("Space between", "elementor"),
|
|
2433
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2530
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons14.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
2434
2531
|
showTooltip: true
|
|
2435
2532
|
},
|
|
2436
2533
|
{
|
|
2437
2534
|
value: "space-around",
|
|
2438
2535
|
label: (0, import_i18n19.__)("Space around", "elementor"),
|
|
2439
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2536
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons14.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
2440
2537
|
showTooltip: true
|
|
2441
2538
|
},
|
|
2442
2539
|
{
|
|
2443
2540
|
value: "space-evenly",
|
|
2444
2541
|
label: (0, import_i18n19.__)("Space evenly", "elementor"),
|
|
2445
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2542
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons14.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
2446
2543
|
showTooltip: true
|
|
2447
2544
|
}
|
|
2448
2545
|
];
|
|
2449
2546
|
var JustifyContentField = () => {
|
|
2450
2547
|
const { isSiteRtl } = useDirection();
|
|
2451
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ React42.createElement(import_ui35.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(import_ui35.ThemeProvider, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React42.createElement(import_ui35.Stack, { gap: 0.75 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n19.__)("Justify content", "elementor")), /* @__PURE__ */ React42.createElement(import_editor_controls22.ToggleControl, { options: options4, fullWidth: true })))));
|
|
2452
2549
|
};
|
|
2453
2550
|
|
|
2454
2551
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2455
|
-
var
|
|
2552
|
+
var React43 = __toESM(require("react"));
|
|
2456
2553
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
2457
2554
|
var import_icons15 = require("@elementor/icons");
|
|
2458
|
-
var
|
|
2555
|
+
var import_ui36 = require("@elementor/ui");
|
|
2459
2556
|
var import_i18n20 = require("@wordpress/i18n");
|
|
2460
2557
|
var options5 = [
|
|
2461
2558
|
{
|
|
2462
2559
|
value: "nowrap",
|
|
2463
2560
|
label: (0, import_i18n20.__)("No wrap", "elementor"),
|
|
2464
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2561
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(import_icons15.ArrowRightIcon, { fontSize: size }),
|
|
2465
2562
|
showTooltip: true
|
|
2466
2563
|
},
|
|
2467
2564
|
{
|
|
2468
2565
|
value: "wrap",
|
|
2469
2566
|
label: (0, import_i18n20.__)("Wrap", "elementor"),
|
|
2470
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2567
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(import_icons15.ArrowBackIcon, { fontSize: size }),
|
|
2471
2568
|
showTooltip: true
|
|
2472
2569
|
},
|
|
2473
2570
|
{
|
|
2474
2571
|
value: "wrap-reverse",
|
|
2475
2572
|
label: (0, import_i18n20.__)("Reversed wrap", "elementor"),
|
|
2476
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2573
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(import_icons15.ArrowForwardIcon, { fontSize: size }),
|
|
2477
2574
|
showTooltip: true
|
|
2478
2575
|
}
|
|
2479
2576
|
];
|
|
2480
2577
|
var WrapField = () => {
|
|
2481
2578
|
const { isSiteRtl } = useDirection();
|
|
2482
|
-
return /* @__PURE__ */
|
|
2579
|
+
return /* @__PURE__ */ React43.createElement(import_ui36.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React43.createElement(import_ui36.ThemeProvider, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n20.__)("Wrap", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React43.createElement(import_editor_controls23.ToggleControl, { options: options5 }))))));
|
|
2483
2580
|
};
|
|
2484
2581
|
|
|
2485
2582
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2491,13 +2588,13 @@ var LayoutSection = () => {
|
|
|
2491
2588
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
2492
2589
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2493
2590
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
2494
|
-
return /* @__PURE__ */
|
|
2591
|
+
return /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React44.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React44.createElement(FlexChildFields, { parentStyleDirection }));
|
|
2495
2592
|
};
|
|
2496
2593
|
var FlexFields = () => {
|
|
2497
2594
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2498
|
-
return /* @__PURE__ */
|
|
2595
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(FlexDirectionField, null), /* @__PURE__ */ React44.createElement(JustifyContentField, null), /* @__PURE__ */ React44.createElement(AlignItemsField, null), /* @__PURE__ */ React44.createElement(PanelDivider, null), /* @__PURE__ */ React44.createElement(GapControlField, null), /* @__PURE__ */ React44.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React44.createElement(AlignContentField, null));
|
|
2499
2596
|
};
|
|
2500
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
2597
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(PanelDivider, null), /* @__PURE__ */ React44.createElement(import_editor_controls24.ControlFormLabel, null, (0, import_i18n21.__)("Flex child", "elementor")), /* @__PURE__ */ React44.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React44.createElement(FlexOrderField, null), /* @__PURE__ */ React44.createElement(FlexSizeField, null));
|
|
2501
2598
|
var shouldDisplayFlexFields = (display, local) => {
|
|
2502
2599
|
const value = display?.value ?? local?.value;
|
|
2503
2600
|
if (!value) {
|
|
@@ -2507,46 +2604,46 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
2507
2604
|
};
|
|
2508
2605
|
|
|
2509
2606
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2510
|
-
var
|
|
2607
|
+
var React49 = __toESM(require("react"));
|
|
2511
2608
|
var import_session2 = require("@elementor/session");
|
|
2512
2609
|
|
|
2513
2610
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2514
|
-
var
|
|
2611
|
+
var React45 = __toESM(require("react"));
|
|
2515
2612
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
2516
2613
|
var import_icons16 = require("@elementor/icons");
|
|
2517
|
-
var
|
|
2614
|
+
var import_ui37 = require("@elementor/ui");
|
|
2518
2615
|
var import_i18n22 = require("@wordpress/i18n");
|
|
2519
|
-
var InlineStartIcon2 = (0,
|
|
2520
|
-
var InlineEndIcon2 = (0,
|
|
2616
|
+
var InlineStartIcon2 = (0, import_ui37.withDirection)(import_icons16.SideLeftIcon);
|
|
2617
|
+
var InlineEndIcon2 = (0, import_ui37.withDirection)(import_icons16.SideRightIcon);
|
|
2521
2618
|
var sideIcons = {
|
|
2522
|
-
"inset-block-start": /* @__PURE__ */
|
|
2523
|
-
"inset-block-end": /* @__PURE__ */
|
|
2524
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2525
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2619
|
+
"inset-block-start": /* @__PURE__ */ React45.createElement(import_icons16.SideTopIcon, { fontSize: "tiny" }),
|
|
2620
|
+
"inset-block-end": /* @__PURE__ */ React45.createElement(import_icons16.SideBottomIcon, { fontSize: "tiny" }),
|
|
2621
|
+
"inset-inline-start": /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2622
|
+
"inset-inline-end": /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2526
2623
|
};
|
|
2527
2624
|
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n22.__)("Right", "elementor") : (0, import_i18n22.__)("Left", "elementor");
|
|
2528
2625
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n22.__)("Left", "elementor") : (0, import_i18n22.__)("Right", "elementor");
|
|
2529
2626
|
var DimensionsField = () => {
|
|
2530
2627
|
const { isSiteRtl } = useDirection();
|
|
2531
|
-
return /* @__PURE__ */
|
|
2628
|
+
return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(import_ui37.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n22.__)("Top", "elementor") }), /* @__PURE__ */ React45.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React45.createElement(import_ui37.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n22.__)("Bottom", "elementor") }), /* @__PURE__ */ React45.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
2532
2629
|
};
|
|
2533
2630
|
var DimensionField = ({ side, label }) => {
|
|
2534
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, label)), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(StylesField, { bind: side }, /* @__PURE__ */ React45.createElement(import_editor_controls25.SizeControl, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
2535
2632
|
};
|
|
2536
2633
|
|
|
2537
2634
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
2538
|
-
var
|
|
2635
|
+
var React46 = __toESM(require("react"));
|
|
2539
2636
|
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2540
|
-
var
|
|
2637
|
+
var import_ui38 = require("@elementor/ui");
|
|
2541
2638
|
var import_i18n23 = require("@wordpress/i18n");
|
|
2542
2639
|
var OffsetField = () => {
|
|
2543
|
-
return /* @__PURE__ */
|
|
2640
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__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_i18n23.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls26.SizeControl, { units: ["px", "em", "rem", "vw", "vh"] }))));
|
|
2544
2641
|
};
|
|
2545
2642
|
|
|
2546
2643
|
// src/components/style-sections/position-section/position-field.tsx
|
|
2547
|
-
var
|
|
2644
|
+
var React47 = __toESM(require("react"));
|
|
2548
2645
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
2549
|
-
var
|
|
2646
|
+
var import_ui39 = require("@elementor/ui");
|
|
2550
2647
|
var import_i18n24 = require("@wordpress/i18n");
|
|
2551
2648
|
var positionOptions = [
|
|
2552
2649
|
{ label: (0, import_i18n24.__)("Static", "elementor"), value: "static" },
|
|
@@ -2556,16 +2653,16 @@ var positionOptions = [
|
|
|
2556
2653
|
{ label: (0, import_i18n24.__)("Sticky", "elementor"), value: "sticky" }
|
|
2557
2654
|
];
|
|
2558
2655
|
var PositionField = ({ onChange }) => {
|
|
2559
|
-
return /* @__PURE__ */
|
|
2656
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "position" }, /* @__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_i18n24.__)("Position", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React47.createElement(import_editor_controls27.SelectControl, { options: positionOptions, onChange }))));
|
|
2560
2657
|
};
|
|
2561
2658
|
|
|
2562
2659
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
2563
|
-
var
|
|
2660
|
+
var React48 = __toESM(require("react"));
|
|
2564
2661
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
2565
|
-
var
|
|
2662
|
+
var import_ui40 = require("@elementor/ui");
|
|
2566
2663
|
var import_i18n25 = require("@wordpress/i18n");
|
|
2567
2664
|
var ZIndexField = () => {
|
|
2568
|
-
return /* @__PURE__ */
|
|
2665
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "z-index" }, /* @__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_i18n25.__)("Z-index", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls28.NumberControl, null))));
|
|
2569
2666
|
};
|
|
2570
2667
|
|
|
2571
2668
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -2597,7 +2694,7 @@ var PositionSection = () => {
|
|
|
2597
2694
|
}
|
|
2598
2695
|
};
|
|
2599
2696
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2600
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(DimensionsField, null), /* @__PURE__ */ React49.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React49.createElement(PanelDivider, null), /* @__PURE__ */ React49.createElement(OffsetField, null));
|
|
2601
2698
|
};
|
|
2602
2699
|
var usePersistDimensions = () => {
|
|
2603
2700
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2607,115 +2704,115 @@ var usePersistDimensions = () => {
|
|
|
2607
2704
|
};
|
|
2608
2705
|
|
|
2609
2706
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2610
|
-
var
|
|
2707
|
+
var React51 = __toESM(require("react"));
|
|
2611
2708
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
2612
|
-
var
|
|
2709
|
+
var import_ui42 = require("@elementor/ui");
|
|
2613
2710
|
var import_i18n27 = require("@wordpress/i18n");
|
|
2614
2711
|
|
|
2615
2712
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2616
|
-
var
|
|
2713
|
+
var React50 = __toESM(require("react"));
|
|
2617
2714
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
2618
2715
|
var import_icons17 = require("@elementor/icons");
|
|
2619
|
-
var
|
|
2716
|
+
var import_ui41 = require("@elementor/ui");
|
|
2620
2717
|
var import_i18n26 = require("@wordpress/i18n");
|
|
2621
2718
|
var options6 = [
|
|
2622
2719
|
{
|
|
2623
2720
|
value: "visible",
|
|
2624
2721
|
label: (0, import_i18n26.__)("Visible", "elementor"),
|
|
2625
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2722
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons17.EyeIcon, { fontSize: size }),
|
|
2626
2723
|
showTooltip: true
|
|
2627
2724
|
},
|
|
2628
2725
|
{
|
|
2629
2726
|
value: "hidden",
|
|
2630
2727
|
label: (0, import_i18n26.__)("Hidden", "elementor"),
|
|
2631
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2728
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons17.EyeOffIcon, { fontSize: size }),
|
|
2632
2729
|
showTooltip: true
|
|
2633
2730
|
},
|
|
2634
2731
|
{
|
|
2635
2732
|
value: "auto",
|
|
2636
2733
|
label: (0, import_i18n26.__)("Auto", "elementor"),
|
|
2637
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2734
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons17.LetterAIcon, { fontSize: size }),
|
|
2638
2735
|
showTooltip: true
|
|
2639
2736
|
}
|
|
2640
2737
|
];
|
|
2641
2738
|
var OverflowField = () => {
|
|
2642
|
-
return /* @__PURE__ */
|
|
2739
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React50.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel, null, (0, import_i18n26.__)("Overflow", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React50.createElement(import_editor_controls29.ToggleControl, { options: options6 }))));
|
|
2643
2740
|
};
|
|
2644
2741
|
|
|
2645
2742
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2646
2743
|
var SizeSection = () => {
|
|
2647
|
-
return /* @__PURE__ */
|
|
2744
|
+
return /* @__PURE__ */ React51.createElement(SectionContent, null, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(SizeField, { bind: "width", label: (0, import_i18n27.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(SizeField, { bind: "height", label: (0, import_i18n27.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(
|
|
2648
2745
|
SizeField,
|
|
2649
2746
|
{
|
|
2650
2747
|
bind: "min-width",
|
|
2651
2748
|
label: (0, import_i18n27.__)("Min width", "elementor"),
|
|
2652
2749
|
extendedValues: ["auto"]
|
|
2653
2750
|
}
|
|
2654
|
-
)), /* @__PURE__ */
|
|
2751
|
+
)), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(
|
|
2655
2752
|
SizeField,
|
|
2656
2753
|
{
|
|
2657
2754
|
bind: "min-height",
|
|
2658
2755
|
label: (0, import_i18n27.__)("Min height", "elementor"),
|
|
2659
2756
|
extendedValues: ["auto"]
|
|
2660
2757
|
}
|
|
2661
|
-
))), /* @__PURE__ */
|
|
2758
|
+
))), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(SizeField, { bind: "max-width", label: (0, import_i18n27.__)("Max width", "elementor") })), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(SizeField, { bind: "max-height", label: (0, import_i18n27.__)("Max height", "elementor") }))), /* @__PURE__ */ React51.createElement(PanelDivider, null), /* @__PURE__ */ React51.createElement(import_ui42.Stack, null, /* @__PURE__ */ React51.createElement(OverflowField, null)));
|
|
2662
2759
|
};
|
|
2663
2760
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2664
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, label)), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React51.createElement(import_editor_controls30.SizeControl, { extendedValues }))));
|
|
2665
2762
|
};
|
|
2666
2763
|
|
|
2667
2764
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2668
|
-
var
|
|
2765
|
+
var React52 = __toESM(require("react"));
|
|
2669
2766
|
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
2670
2767
|
var import_i18n28 = require("@wordpress/i18n");
|
|
2671
2768
|
var SpacingSection = () => {
|
|
2672
2769
|
const { isSiteRtl } = useDirection();
|
|
2673
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ React52.createElement(SectionContent, null, /* @__PURE__ */ React52.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React52.createElement(
|
|
2674
2771
|
import_editor_controls31.LinkedDimensionsControl,
|
|
2675
2772
|
{
|
|
2676
2773
|
label: (0, import_i18n28.__)("Margin", "elementor"),
|
|
2677
2774
|
isSiteRtl,
|
|
2678
2775
|
extendedValues: ["auto"]
|
|
2679
2776
|
}
|
|
2680
|
-
)), /* @__PURE__ */
|
|
2777
|
+
)), /* @__PURE__ */ React52.createElement(PanelDivider, null), /* @__PURE__ */ React52.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React52.createElement(import_editor_controls31.LinkedDimensionsControl, { label: (0, import_i18n28.__)("Padding", "elementor"), isSiteRtl })));
|
|
2681
2778
|
};
|
|
2682
2779
|
|
|
2683
2780
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2684
|
-
var
|
|
2781
|
+
var React67 = __toESM(require("react"));
|
|
2685
2782
|
|
|
2686
2783
|
// src/components/collapsible-content.tsx
|
|
2687
|
-
var
|
|
2688
|
-
var
|
|
2689
|
-
var
|
|
2784
|
+
var React53 = __toESM(require("react"));
|
|
2785
|
+
var import_react21 = require("react");
|
|
2786
|
+
var import_ui43 = require("@elementor/ui");
|
|
2690
2787
|
var import_i18n29 = require("@wordpress/i18n");
|
|
2691
2788
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2692
|
-
const [open, setOpen] = (0,
|
|
2789
|
+
const [open, setOpen] = (0, import_react21.useState)(defaultOpen);
|
|
2693
2790
|
const handleToggle = () => {
|
|
2694
2791
|
setOpen((prevOpen) => !prevOpen);
|
|
2695
2792
|
};
|
|
2696
|
-
return /* @__PURE__ */
|
|
2697
|
-
|
|
2793
|
+
return /* @__PURE__ */ React53.createElement(import_ui43.Stack, null, /* @__PURE__ */ React53.createElement(
|
|
2794
|
+
import_ui43.Button,
|
|
2698
2795
|
{
|
|
2699
2796
|
fullWidth: true,
|
|
2700
2797
|
size: "small",
|
|
2701
2798
|
color: "secondary",
|
|
2702
2799
|
variant: "outlined",
|
|
2703
2800
|
onClick: handleToggle,
|
|
2704
|
-
endIcon: /* @__PURE__ */
|
|
2801
|
+
endIcon: /* @__PURE__ */ React53.createElement(CollapseIcon, { open }),
|
|
2705
2802
|
sx: { my: 0.5 }
|
|
2706
2803
|
},
|
|
2707
2804
|
open ? (0, import_i18n29.__)("Show less", "elementor") : (0, import_i18n29.__)("Show more", "elementor")
|
|
2708
|
-
), /* @__PURE__ */
|
|
2805
|
+
), /* @__PURE__ */ React53.createElement(import_ui43.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2709
2806
|
};
|
|
2710
2807
|
|
|
2711
2808
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2712
|
-
var
|
|
2809
|
+
var React54 = __toESM(require("react"));
|
|
2713
2810
|
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
2714
|
-
var
|
|
2811
|
+
var import_ui44 = require("@elementor/ui");
|
|
2715
2812
|
var import_i18n31 = require("@wordpress/i18n");
|
|
2716
2813
|
|
|
2717
2814
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2718
|
-
var
|
|
2815
|
+
var import_react22 = require("react");
|
|
2719
2816
|
var import_i18n30 = require("@wordpress/i18n");
|
|
2720
2817
|
|
|
2721
2818
|
// src/sync/get-elementor-config.ts
|
|
@@ -2740,7 +2837,7 @@ var getFontFamilies = () => {
|
|
|
2740
2837
|
};
|
|
2741
2838
|
var useFontFamilies = () => {
|
|
2742
2839
|
const fontFamilies = getFontFamilies();
|
|
2743
|
-
return (0,
|
|
2840
|
+
return (0, import_react22.useMemo)(() => {
|
|
2744
2841
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
2745
2842
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
2746
2843
|
if (!supportedCategories[category]) {
|
|
@@ -2765,44 +2862,44 @@ var FontFamilyField = () => {
|
|
|
2765
2862
|
if (fontFamilies.length === 0) {
|
|
2766
2863
|
return null;
|
|
2767
2864
|
}
|
|
2768
|
-
return /* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n31.__)("Font family", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React54.createElement(import_editor_controls32.FontFamilyControl, { fontFamilies }))));
|
|
2769
2866
|
};
|
|
2770
2867
|
|
|
2771
2868
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2772
|
-
var
|
|
2869
|
+
var React55 = __toESM(require("react"));
|
|
2773
2870
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
2774
|
-
var
|
|
2871
|
+
var import_ui45 = require("@elementor/ui");
|
|
2775
2872
|
var import_i18n32 = require("@wordpress/i18n");
|
|
2776
2873
|
var FontSizeField = () => {
|
|
2777
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React55.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, (0, import_i18n32.__)("Font size", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls33.SizeControl, null))));
|
|
2778
2875
|
};
|
|
2779
2876
|
|
|
2780
2877
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2781
|
-
var
|
|
2878
|
+
var React56 = __toESM(require("react"));
|
|
2782
2879
|
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
2783
2880
|
var import_icons18 = require("@elementor/icons");
|
|
2784
|
-
var
|
|
2881
|
+
var import_ui46 = require("@elementor/ui");
|
|
2785
2882
|
var import_i18n33 = require("@wordpress/i18n");
|
|
2786
2883
|
var options7 = [
|
|
2787
2884
|
{
|
|
2788
2885
|
value: "normal",
|
|
2789
2886
|
label: (0, import_i18n33.__)("Normal", "elementor"),
|
|
2790
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2887
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(import_icons18.MinusIcon, { fontSize: size }),
|
|
2791
2888
|
showTooltip: true
|
|
2792
2889
|
},
|
|
2793
2890
|
{
|
|
2794
2891
|
value: "italic",
|
|
2795
2892
|
label: (0, import_i18n33.__)("Italic", "elementor"),
|
|
2796
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2893
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(import_icons18.ItalicIcon, { fontSize: size }),
|
|
2797
2894
|
showTooltip: true
|
|
2798
2895
|
}
|
|
2799
2896
|
];
|
|
2800
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2897
|
+
var FontStyleField = () => /* @__PURE__ */ React56.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls34.ControlFormLabel, null, (0, import_i18n33.__)("Font style", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React56.createElement(import_editor_controls34.ToggleControl, { options: options7 }))));
|
|
2801
2898
|
|
|
2802
2899
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2803
|
-
var
|
|
2900
|
+
var React57 = __toESM(require("react"));
|
|
2804
2901
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
2805
|
-
var
|
|
2902
|
+
var import_ui47 = require("@elementor/ui");
|
|
2806
2903
|
var import_i18n34 = require("@wordpress/i18n");
|
|
2807
2904
|
var fontWeightOptions = [
|
|
2808
2905
|
{ value: "100", label: (0, import_i18n34.__)("100 - Thin", "elementor") },
|
|
@@ -2816,135 +2913,135 @@ var fontWeightOptions = [
|
|
|
2816
2913
|
{ value: "900", label: (0, import_i18n34.__)("900 - Black", "elementor") }
|
|
2817
2914
|
];
|
|
2818
2915
|
var FontWeightField = () => {
|
|
2819
|
-
return /* @__PURE__ */
|
|
2916
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React57.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n34.__)("Font weight", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui47.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React57.createElement(import_editor_controls35.SelectControl, { options: fontWeightOptions }))));
|
|
2820
2917
|
};
|
|
2821
2918
|
|
|
2822
2919
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2823
|
-
var
|
|
2920
|
+
var React58 = __toESM(require("react"));
|
|
2824
2921
|
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
2825
|
-
var
|
|
2922
|
+
var import_ui48 = require("@elementor/ui");
|
|
2826
2923
|
var import_i18n35 = require("@wordpress/i18n");
|
|
2827
2924
|
var LetterSpacingField = () => {
|
|
2828
|
-
return /* @__PURE__ */
|
|
2925
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React58.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, (0, import_i18n35.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React58.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(import_editor_controls36.SizeControl, null))));
|
|
2829
2926
|
};
|
|
2830
2927
|
|
|
2831
2928
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2832
|
-
var
|
|
2929
|
+
var React59 = __toESM(require("react"));
|
|
2833
2930
|
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
2834
|
-
var
|
|
2931
|
+
var import_ui49 = require("@elementor/ui");
|
|
2835
2932
|
var import_i18n36 = require("@wordpress/i18n");
|
|
2836
2933
|
var LineHeightField = () => {
|
|
2837
|
-
return /* @__PURE__ */
|
|
2934
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React59.createElement(import_ui49.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, (0, import_i18n36.__)("Line height", "elementor"))), /* @__PURE__ */ React59.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(import_editor_controls37.SizeControl, null))));
|
|
2838
2935
|
};
|
|
2839
2936
|
|
|
2840
2937
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2841
|
-
var
|
|
2938
|
+
var React60 = __toESM(require("react"));
|
|
2842
2939
|
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
2843
2940
|
var import_icons19 = require("@elementor/icons");
|
|
2844
|
-
var
|
|
2941
|
+
var import_ui50 = require("@elementor/ui");
|
|
2845
2942
|
var import_i18n37 = require("@wordpress/i18n");
|
|
2846
|
-
var AlignStartIcon = (0,
|
|
2847
|
-
var AlignEndIcon = (0,
|
|
2943
|
+
var AlignStartIcon = (0, import_ui50.withDirection)(import_icons19.AlignLeftIcon);
|
|
2944
|
+
var AlignEndIcon = (0, import_ui50.withDirection)(import_icons19.AlignRightIcon);
|
|
2848
2945
|
var options8 = [
|
|
2849
2946
|
{
|
|
2850
2947
|
value: "start",
|
|
2851
2948
|
label: (0, import_i18n37.__)("Start", "elementor"),
|
|
2852
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2949
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(AlignStartIcon, { fontSize: size }),
|
|
2853
2950
|
showTooltip: true
|
|
2854
2951
|
},
|
|
2855
2952
|
{
|
|
2856
2953
|
value: "center",
|
|
2857
2954
|
label: (0, import_i18n37.__)("Center", "elementor"),
|
|
2858
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2955
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(import_icons19.AlignCenterIcon, { fontSize: size }),
|
|
2859
2956
|
showTooltip: true
|
|
2860
2957
|
},
|
|
2861
2958
|
{
|
|
2862
2959
|
value: "end",
|
|
2863
2960
|
label: (0, import_i18n37.__)("End", "elementor"),
|
|
2864
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2961
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(AlignEndIcon, { fontSize: size }),
|
|
2865
2962
|
showTooltip: true
|
|
2866
2963
|
},
|
|
2867
2964
|
{
|
|
2868
2965
|
value: "justify",
|
|
2869
2966
|
label: (0, import_i18n37.__)("Justify", "elementor"),
|
|
2870
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2967
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(import_icons19.AlignJustifiedIcon, { fontSize: size }),
|
|
2871
2968
|
showTooltip: true
|
|
2872
2969
|
}
|
|
2873
2970
|
];
|
|
2874
2971
|
var TextAlignmentField = () => {
|
|
2875
|
-
return /* @__PURE__ */
|
|
2972
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n37.__)("Text align", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(import_editor_controls38.ToggleControl, { options: options8 }))));
|
|
2876
2973
|
};
|
|
2877
2974
|
|
|
2878
2975
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2879
|
-
var
|
|
2976
|
+
var React61 = __toESM(require("react"));
|
|
2880
2977
|
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
2881
|
-
var
|
|
2978
|
+
var import_ui51 = require("@elementor/ui");
|
|
2882
2979
|
var import_i18n38 = require("@wordpress/i18n");
|
|
2883
2980
|
var TextColorField = () => {
|
|
2884
|
-
return /* @__PURE__ */
|
|
2981
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React61.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n38.__)("Text color", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(import_editor_controls39.ColorControl, null))));
|
|
2885
2982
|
};
|
|
2886
2983
|
|
|
2887
2984
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2888
|
-
var
|
|
2985
|
+
var React62 = __toESM(require("react"));
|
|
2889
2986
|
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
2890
2987
|
var import_icons20 = require("@elementor/icons");
|
|
2891
|
-
var
|
|
2988
|
+
var import_ui52 = require("@elementor/ui");
|
|
2892
2989
|
var import_i18n39 = require("@wordpress/i18n");
|
|
2893
2990
|
var options9 = [
|
|
2894
2991
|
{
|
|
2895
2992
|
value: "none",
|
|
2896
2993
|
label: (0, import_i18n39.__)("None", "elementor"),
|
|
2897
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2994
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons20.MinusIcon, { fontSize: size }),
|
|
2898
2995
|
showTooltip: true,
|
|
2899
2996
|
exclusive: true
|
|
2900
2997
|
},
|
|
2901
2998
|
{
|
|
2902
2999
|
value: "underline",
|
|
2903
3000
|
label: (0, import_i18n39.__)("Underline", "elementor"),
|
|
2904
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3001
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons20.UnderlineIcon, { fontSize: size }),
|
|
2905
3002
|
showTooltip: true
|
|
2906
3003
|
},
|
|
2907
3004
|
{
|
|
2908
3005
|
value: "line-through",
|
|
2909
3006
|
label: (0, import_i18n39.__)("Line-through", "elementor"),
|
|
2910
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3007
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons20.StrikethroughIcon, { fontSize: size }),
|
|
2911
3008
|
showTooltip: true
|
|
2912
3009
|
},
|
|
2913
3010
|
{
|
|
2914
3011
|
value: "overline",
|
|
2915
3012
|
label: (0, import_i18n39.__)("Overline", "elementor"),
|
|
2916
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3013
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons20.OverlineIcon, { fontSize: size }),
|
|
2917
3014
|
showTooltip: true
|
|
2918
3015
|
}
|
|
2919
3016
|
];
|
|
2920
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3017
|
+
var TextDecorationField = () => /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React62.createElement(import_ui52.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n39.__)("Line decoration", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui52.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(import_editor_controls40.ToggleControl, { options: options9, exclusive: false }))));
|
|
2921
3018
|
|
|
2922
3019
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2923
|
-
var
|
|
3020
|
+
var React63 = __toESM(require("react"));
|
|
2924
3021
|
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
2925
3022
|
var import_icons21 = require("@elementor/icons");
|
|
2926
|
-
var
|
|
3023
|
+
var import_ui53 = require("@elementor/ui");
|
|
2927
3024
|
var import_i18n40 = require("@wordpress/i18n");
|
|
2928
3025
|
var options10 = [
|
|
2929
3026
|
{
|
|
2930
3027
|
value: "ltr",
|
|
2931
3028
|
label: (0, import_i18n40.__)("Left to right", "elementor"),
|
|
2932
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3029
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons21.TextDirectionLtrIcon, { fontSize: size }),
|
|
2933
3030
|
showTooltip: true
|
|
2934
3031
|
},
|
|
2935
3032
|
{
|
|
2936
3033
|
value: "rtl",
|
|
2937
3034
|
label: (0, import_i18n40.__)("Right to left", "elementor"),
|
|
2938
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3035
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons21.TextDirectionRtlIcon, { fontSize: size }),
|
|
2939
3036
|
showTooltip: true
|
|
2940
3037
|
}
|
|
2941
3038
|
];
|
|
2942
3039
|
var TextDirectionField = () => {
|
|
2943
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React63.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, (0, import_i18n40.__)("Direction", "elementor"))), /* @__PURE__ */ React63.createElement(import_ui53.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React63.createElement(import_editor_controls41.ToggleControl, { options: options10 }))));
|
|
2944
3041
|
};
|
|
2945
3042
|
|
|
2946
3043
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2947
|
-
var
|
|
3044
|
+
var React64 = __toESM(require("react"));
|
|
2948
3045
|
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
2949
3046
|
var import_i18n41 = require("@wordpress/i18n");
|
|
2950
3047
|
var initTextStroke = {
|
|
@@ -2972,7 +3069,7 @@ var TextStrokeField = () => {
|
|
|
2972
3069
|
setTextStroke(null);
|
|
2973
3070
|
};
|
|
2974
3071
|
const hasTextStroke = Boolean(textStroke);
|
|
2975
|
-
return /* @__PURE__ */
|
|
3072
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React64.createElement(
|
|
2976
3073
|
AddOrRemoveContent,
|
|
2977
3074
|
{
|
|
2978
3075
|
label: (0, import_i18n41.__)("Text stroke", "elementor"),
|
|
@@ -2980,56 +3077,56 @@ var TextStrokeField = () => {
|
|
|
2980
3077
|
onAdd: addTextStroke,
|
|
2981
3078
|
onRemove: removeTextStroke
|
|
2982
3079
|
},
|
|
2983
|
-
/* @__PURE__ */
|
|
3080
|
+
/* @__PURE__ */ React64.createElement(import_editor_controls42.StrokeControl, null)
|
|
2984
3081
|
));
|
|
2985
3082
|
};
|
|
2986
3083
|
|
|
2987
3084
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2988
|
-
var
|
|
3085
|
+
var React65 = __toESM(require("react"));
|
|
2989
3086
|
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
2990
3087
|
var import_icons22 = require("@elementor/icons");
|
|
2991
|
-
var
|
|
3088
|
+
var import_ui54 = require("@elementor/ui");
|
|
2992
3089
|
var import_i18n42 = require("@wordpress/i18n");
|
|
2993
3090
|
var options11 = [
|
|
2994
3091
|
{
|
|
2995
3092
|
value: "none",
|
|
2996
3093
|
label: (0, import_i18n42.__)("None", "elementor"),
|
|
2997
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3094
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons22.MinusIcon, { fontSize: size }),
|
|
2998
3095
|
showTooltip: true
|
|
2999
3096
|
},
|
|
3000
3097
|
{
|
|
3001
3098
|
value: "capitalize",
|
|
3002
3099
|
label: (0, import_i18n42.__)("Capitalize", "elementor"),
|
|
3003
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3100
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons22.LetterCaseIcon, { fontSize: size }),
|
|
3004
3101
|
showTooltip: true
|
|
3005
3102
|
},
|
|
3006
3103
|
{
|
|
3007
3104
|
value: "uppercase",
|
|
3008
3105
|
label: (0, import_i18n42.__)("Uppercase", "elementor"),
|
|
3009
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3106
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons22.LetterCaseUpperIcon, { fontSize: size }),
|
|
3010
3107
|
showTooltip: true
|
|
3011
3108
|
},
|
|
3012
3109
|
{
|
|
3013
3110
|
value: "lowercase",
|
|
3014
3111
|
label: (0, import_i18n42.__)("Lowercase", "elementor"),
|
|
3015
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3112
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons22.LetterCaseLowerIcon, { fontSize: size }),
|
|
3016
3113
|
showTooltip: true
|
|
3017
3114
|
}
|
|
3018
3115
|
];
|
|
3019
|
-
var TransformField = () => /* @__PURE__ */
|
|
3116
|
+
var TransformField = () => /* @__PURE__ */ React65.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React65.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, (0, import_i18n42.__)("Text transform", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui54.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React65.createElement(import_editor_controls43.ToggleControl, { options: options11 }))));
|
|
3020
3117
|
|
|
3021
3118
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3022
|
-
var
|
|
3119
|
+
var React66 = __toESM(require("react"));
|
|
3023
3120
|
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3024
|
-
var
|
|
3121
|
+
var import_ui55 = require("@elementor/ui");
|
|
3025
3122
|
var import_i18n43 = require("@wordpress/i18n");
|
|
3026
3123
|
var WordSpacingField = () => {
|
|
3027
|
-
return /* @__PURE__ */
|
|
3124
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React66.createElement(import_ui55.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React66.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, (0, import_i18n43.__)("Word spacing", "elementor"))), /* @__PURE__ */ React66.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(import_editor_controls44.SizeControl, null))));
|
|
3028
3125
|
};
|
|
3029
3126
|
|
|
3030
3127
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3031
3128
|
var TypographySection = () => {
|
|
3032
|
-
return /* @__PURE__ */
|
|
3129
|
+
return /* @__PURE__ */ React67.createElement(SectionContent, null, /* @__PURE__ */ React67.createElement(FontFamilyField, null), /* @__PURE__ */ React67.createElement(FontWeightField, null), /* @__PURE__ */ React67.createElement(FontSizeField, null), /* @__PURE__ */ React67.createElement(PanelDivider, null), /* @__PURE__ */ React67.createElement(TextAlignmentField, null), /* @__PURE__ */ React67.createElement(TextColorField, null), /* @__PURE__ */ React67.createElement(CollapsibleContent, null, /* @__PURE__ */ React67.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React67.createElement(LineHeightField, null), /* @__PURE__ */ React67.createElement(LetterSpacingField, null), /* @__PURE__ */ React67.createElement(WordSpacingField, null), /* @__PURE__ */ React67.createElement(PanelDivider, null), /* @__PURE__ */ React67.createElement(TextDecorationField, null), /* @__PURE__ */ React67.createElement(TransformField, null), /* @__PURE__ */ React67.createElement(TextDirectionField, null), /* @__PURE__ */ React67.createElement(FontStyleField, null), /* @__PURE__ */ React67.createElement(TextStrokeField, null))));
|
|
3033
3130
|
};
|
|
3034
3131
|
|
|
3035
3132
|
// src/components/style-tab.tsx
|
|
@@ -3044,9 +3141,9 @@ var stickyHeaderStyles = {
|
|
|
3044
3141
|
var StyleTab = () => {
|
|
3045
3142
|
const currentClassesProp = useCurrentClassesProp();
|
|
3046
3143
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
3047
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
3144
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react23.useState)(null);
|
|
3048
3145
|
const breakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
|
|
3049
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ React68.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React68.createElement(
|
|
3050
3147
|
StyleProvider,
|
|
3051
3148
|
{
|
|
3052
3149
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -3057,12 +3154,12 @@ var StyleTab = () => {
|
|
|
3057
3154
|
},
|
|
3058
3155
|
setMetaState: setActiveStyleState
|
|
3059
3156
|
},
|
|
3060
|
-
/* @__PURE__ */
|
|
3157
|
+
/* @__PURE__ */ React68.createElement(import_session3.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React68.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React68.createElement(ClassesHeader, null, /* @__PURE__ */ React68.createElement(CssClassSelector, null), /* @__PURE__ */ React68.createElement(import_ui56.Divider, null)), /* @__PURE__ */ React68.createElement(SectionsList, null, /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Layout", "elementor") }, /* @__PURE__ */ React68.createElement(LayoutSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Spacing", "elementor") }, /* @__PURE__ */ React68.createElement(SpacingSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Size", "elementor") }, /* @__PURE__ */ React68.createElement(SizeSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Position", "elementor") }, /* @__PURE__ */ React68.createElement(PositionSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Typography", "elementor") }, /* @__PURE__ */ React68.createElement(TypographySection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Background", "elementor") }, /* @__PURE__ */ React68.createElement(BackgroundSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Border", "elementor") }, /* @__PURE__ */ React68.createElement(BorderSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Effects", "elementor") }, /* @__PURE__ */ React68.createElement(EffectsSection, null)))))
|
|
3061
3158
|
));
|
|
3062
3159
|
};
|
|
3063
3160
|
function ClassesHeader({ children }) {
|
|
3064
3161
|
const scrollDirection = useScrollDirection();
|
|
3065
|
-
return /* @__PURE__ */
|
|
3162
|
+
return /* @__PURE__ */ React68.createElement(import_ui56.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3066
3163
|
}
|
|
3067
3164
|
function useCurrentClassesProp() {
|
|
3068
3165
|
const { elementType } = useElement();
|
|
@@ -3078,11 +3175,11 @@ function useCurrentClassesProp() {
|
|
|
3078
3175
|
// src/components/editing-panel-tabs.tsx
|
|
3079
3176
|
var EditingPanelTabs = () => {
|
|
3080
3177
|
const { element } = useElement();
|
|
3081
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
3178
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui57.useTabs)("settings");
|
|
3082
3179
|
return (
|
|
3083
3180
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
3084
3181
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
3085
|
-
/* @__PURE__ */
|
|
3182
|
+
/* @__PURE__ */ React69.createElement(import_react24.Fragment, { key: element.id }, /* @__PURE__ */ React69.createElement(ScrollProvider, null, /* @__PURE__ */ React69.createElement(import_ui57.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React69.createElement(import_ui57.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React69.createElement(import_ui57.Tabs, { variant: "fullWidth", size: "small", sx: { mt: 0.5 }, ...getTabsProps() }, /* @__PURE__ */ React69.createElement(import_ui57.Tab, { label: (0, import_i18n45.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React69.createElement(import_ui57.Tab, { label: (0, import_i18n45.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React69.createElement(import_ui57.Divider, null)), /* @__PURE__ */ React69.createElement(import_ui57.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React69.createElement(SettingsTab, null)), /* @__PURE__ */ React69.createElement(import_ui57.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React69.createElement(StyleTab, null)))))
|
|
3086
3183
|
);
|
|
3087
3184
|
};
|
|
3088
3185
|
|
|
@@ -3096,7 +3193,7 @@ var EditingPanel = () => {
|
|
|
3096
3193
|
return null;
|
|
3097
3194
|
}
|
|
3098
3195
|
const panelTitle = (0, import_i18n46.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
3099
|
-
return /* @__PURE__ */
|
|
3196
|
+
return /* @__PURE__ */ React70.createElement(import_ui58.ErrorBoundary, { fallback: /* @__PURE__ */ React70.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React70.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React70.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React70.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React70.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React70.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React70.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React70.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React70.createElement(import_editor_controls45.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React70.createElement(import_editor_controls45.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React70.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React70.createElement(EditingPanelTabs, null)))))))));
|
|
3100
3197
|
};
|
|
3101
3198
|
|
|
3102
3199
|
// src/panel.ts
|
|
@@ -3112,7 +3209,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
3112
3209
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
3113
3210
|
|
|
3114
3211
|
// src/hooks/use-open-editor-panel.ts
|
|
3115
|
-
var
|
|
3212
|
+
var import_react25 = require("react");
|
|
3116
3213
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
3117
3214
|
|
|
3118
3215
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -3129,7 +3226,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
3129
3226
|
// src/hooks/use-open-editor-panel.ts
|
|
3130
3227
|
var useOpenEditorPanel = () => {
|
|
3131
3228
|
const { open } = usePanelActions();
|
|
3132
|
-
(0,
|
|
3229
|
+
(0, import_react25.useEffect)(() => {
|
|
3133
3230
|
return (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("panel/editor/open"), () => {
|
|
3134
3231
|
if (isAtomicWidgetSelected()) {
|
|
3135
3232
|
open();
|
|
@@ -3145,19 +3242,19 @@ var EditingPanelHooks = () => {
|
|
|
3145
3242
|
};
|
|
3146
3243
|
|
|
3147
3244
|
// src/dynamics/init.ts
|
|
3148
|
-
var
|
|
3245
|
+
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
3149
3246
|
|
|
3150
3247
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3151
|
-
var
|
|
3248
|
+
var React74 = __toESM(require("react"));
|
|
3152
3249
|
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
3153
3250
|
var import_icons25 = require("@elementor/icons");
|
|
3154
|
-
var
|
|
3251
|
+
var import_ui61 = require("@elementor/ui");
|
|
3155
3252
|
var import_i18n48 = require("@wordpress/i18n");
|
|
3156
3253
|
|
|
3157
3254
|
// src/components/popover-content.tsx
|
|
3158
|
-
var
|
|
3159
|
-
var
|
|
3160
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
3255
|
+
var React71 = __toESM(require("react"));
|
|
3256
|
+
var import_ui59 = require("@elementor/ui");
|
|
3257
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React71.createElement(import_ui59.Stack, { alignItems, gap, p }, children);
|
|
3161
3258
|
|
|
3162
3259
|
// src/hooks/use-persist-dynamic-value.ts
|
|
3163
3260
|
var import_session5 = require("@elementor/session");
|
|
@@ -3168,14 +3265,14 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
3168
3265
|
};
|
|
3169
3266
|
|
|
3170
3267
|
// src/dynamics/dynamic-control.tsx
|
|
3171
|
-
var
|
|
3268
|
+
var React72 = __toESM(require("react"));
|
|
3172
3269
|
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
3173
3270
|
|
|
3174
3271
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
3175
|
-
var
|
|
3272
|
+
var import_react27 = require("react");
|
|
3176
3273
|
|
|
3177
3274
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
3178
|
-
var
|
|
3275
|
+
var import_react26 = require("react");
|
|
3179
3276
|
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3180
3277
|
|
|
3181
3278
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -3227,7 +3324,7 @@ var usePropDynamicTags = () => {
|
|
|
3227
3324
|
const propDynamicType = getDynamicPropType(propType);
|
|
3228
3325
|
categories = propDynamicType?.settings.categories || [];
|
|
3229
3326
|
}
|
|
3230
|
-
return (0,
|
|
3327
|
+
return (0, import_react26.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
3231
3328
|
};
|
|
3232
3329
|
var getDynamicTagsByCategories = (categories) => {
|
|
3233
3330
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -3243,7 +3340,7 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
3243
3340
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
3244
3341
|
var useDynamicTag = (tagName) => {
|
|
3245
3342
|
const dynamicTags = usePropDynamicTags();
|
|
3246
|
-
return (0,
|
|
3343
|
+
return (0, import_react27.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
3247
3344
|
};
|
|
3248
3345
|
|
|
3249
3346
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -3267,19 +3364,19 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3267
3364
|
});
|
|
3268
3365
|
};
|
|
3269
3366
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3270
|
-
return /* @__PURE__ */
|
|
3367
|
+
return /* @__PURE__ */ React72.createElement(import_editor_controls47.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React72.createElement(import_editor_controls47.PropKeyProvider, { bind }, children));
|
|
3271
3368
|
};
|
|
3272
3369
|
|
|
3273
3370
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3274
|
-
var
|
|
3275
|
-
var
|
|
3371
|
+
var React73 = __toESM(require("react"));
|
|
3372
|
+
var import_react28 = require("react");
|
|
3276
3373
|
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3277
3374
|
var import_icons24 = require("@elementor/icons");
|
|
3278
|
-
var
|
|
3375
|
+
var import_ui60 = require("@elementor/ui");
|
|
3279
3376
|
var import_i18n47 = require("@wordpress/i18n");
|
|
3280
3377
|
var SIZE3 = "tiny";
|
|
3281
3378
|
var DynamicSelection = ({ onSelect }) => {
|
|
3282
|
-
const [searchValue, setSearchValue] = (0,
|
|
3379
|
+
const [searchValue, setSearchValue] = (0, import_react28.useState)("");
|
|
3283
3380
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
3284
3381
|
const { value: anyValue } = (0, import_editor_controls48.useBoundProp)();
|
|
3285
3382
|
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls48.useBoundProp)(dynamicPropTypeUtil);
|
|
@@ -3297,8 +3394,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3297
3394
|
setValue({ name: value, settings: { label } });
|
|
3298
3395
|
onSelect?.();
|
|
3299
3396
|
};
|
|
3300
|
-
return /* @__PURE__ */
|
|
3301
|
-
|
|
3397
|
+
return /* @__PURE__ */ React73.createElement(import_ui60.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React73.createElement(NoDynamicTags, null) : /* @__PURE__ */ React73.createElement(import_react28.Fragment, null, /* @__PURE__ */ React73.createElement(import_ui60.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React73.createElement(
|
|
3398
|
+
import_ui60.TextField,
|
|
3302
3399
|
{
|
|
3303
3400
|
fullWidth: true,
|
|
3304
3401
|
size: SIZE3,
|
|
@@ -3306,19 +3403,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3306
3403
|
onChange: handleSearch,
|
|
3307
3404
|
placeholder: (0, import_i18n47.__)("Search dynamic tags\u2026", "elementor"),
|
|
3308
3405
|
InputProps: {
|
|
3309
|
-
startAdornment: /* @__PURE__ */
|
|
3406
|
+
startAdornment: /* @__PURE__ */ React73.createElement(import_ui60.InputAdornment, { position: "start" }, /* @__PURE__ */ React73.createElement(import_icons24.SearchIcon, { fontSize: SIZE3 }))
|
|
3310
3407
|
}
|
|
3311
3408
|
}
|
|
3312
|
-
)), /* @__PURE__ */
|
|
3313
|
-
|
|
3409
|
+
)), /* @__PURE__ */ React73.createElement(import_ui60.Divider, null), /* @__PURE__ */ React73.createElement(import_ui60.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React73.createElement(import_ui60.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React73.createElement(import_react28.Fragment, { key: index }, /* @__PURE__ */ React73.createElement(
|
|
3410
|
+
import_ui60.MenuSubheader,
|
|
3314
3411
|
{
|
|
3315
3412
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
3316
3413
|
},
|
|
3317
3414
|
dynamicGroups?.[category]?.title || category
|
|
3318
3415
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3319
3416
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3320
|
-
return /* @__PURE__ */
|
|
3321
|
-
|
|
3417
|
+
return /* @__PURE__ */ React73.createElement(
|
|
3418
|
+
import_ui60.MenuItem,
|
|
3322
3419
|
{
|
|
3323
3420
|
key: value,
|
|
3324
3421
|
selected: isSelected,
|
|
@@ -3328,10 +3425,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3328
3425
|
},
|
|
3329
3426
|
tagLabel
|
|
3330
3427
|
);
|
|
3331
|
-
})))) : /* @__PURE__ */
|
|
3428
|
+
})))) : /* @__PURE__ */ React73.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3332
3429
|
};
|
|
3333
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3334
|
-
|
|
3430
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React73.createElement(
|
|
3431
|
+
import_ui60.Stack,
|
|
3335
3432
|
{
|
|
3336
3433
|
gap: 1,
|
|
3337
3434
|
alignItems: "center",
|
|
@@ -3341,12 +3438,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React72.createElem
|
|
|
3341
3438
|
color: "text.secondary",
|
|
3342
3439
|
sx: { pb: 3.5 }
|
|
3343
3440
|
},
|
|
3344
|
-
/* @__PURE__ */
|
|
3345
|
-
/* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ React73.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
3442
|
+
/* @__PURE__ */ React73.createElement(import_ui60.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n47.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React73.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3443
|
+
/* @__PURE__ */ React73.createElement(import_ui60.Typography, { align: "center", variant: "caption" }, (0, import_i18n47.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React73.createElement(import_ui60.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n47.__)("Clear & try again", "elementor")))
|
|
3347
3444
|
);
|
|
3348
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3349
|
-
|
|
3445
|
+
var NoDynamicTags = () => /* @__PURE__ */ React73.createElement(import_ui60.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React73.createElement(import_ui60.Divider, null), /* @__PURE__ */ React73.createElement(
|
|
3446
|
+
import_ui60.Stack,
|
|
3350
3447
|
{
|
|
3351
3448
|
gap: 1,
|
|
3352
3449
|
alignItems: "center",
|
|
@@ -3356,9 +3453,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React72.createElement(import_ui57.Box,
|
|
|
3356
3453
|
color: "text.secondary",
|
|
3357
3454
|
sx: { pb: 3.5 }
|
|
3358
3455
|
},
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3456
|
+
/* @__PURE__ */ React73.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
3457
|
+
/* @__PURE__ */ React73.createElement(import_ui60.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n47.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
3458
|
+
/* @__PURE__ */ React73.createElement(import_ui60.Typography, { align: "center", variant: "caption" }, (0, import_i18n47.__)("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3362
3459
|
));
|
|
3363
3460
|
var useFilteredOptions = (searchValue) => {
|
|
3364
3461
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -3382,7 +3479,7 @@ var DynamicSelectionControl = () => {
|
|
|
3382
3479
|
const { setValue: setAnyValue } = (0, import_editor_controls49.useBoundProp)();
|
|
3383
3480
|
const { bind, value } = (0, import_editor_controls49.useBoundProp)(dynamicPropTypeUtil);
|
|
3384
3481
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
3385
|
-
const selectionPopoverState = (0,
|
|
3482
|
+
const selectionPopoverState = (0, import_ui61.usePopupState)({ variant: "popover" });
|
|
3386
3483
|
const { name: tagName = "" } = value;
|
|
3387
3484
|
const dynamicTag = useDynamicTag(tagName);
|
|
3388
3485
|
const removeDynamicTag = () => {
|
|
@@ -3391,76 +3488,76 @@ var DynamicSelectionControl = () => {
|
|
|
3391
3488
|
if (!dynamicTag) {
|
|
3392
3489
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
3393
3490
|
}
|
|
3394
|
-
return /* @__PURE__ */
|
|
3395
|
-
|
|
3491
|
+
return /* @__PURE__ */ React74.createElement(import_ui61.Box, null, /* @__PURE__ */ React74.createElement(
|
|
3492
|
+
import_ui61.UnstableTag,
|
|
3396
3493
|
{
|
|
3397
3494
|
fullWidth: true,
|
|
3398
3495
|
showActionsOnHover: true,
|
|
3399
3496
|
label: dynamicTag.label,
|
|
3400
|
-
startIcon: /* @__PURE__ */
|
|
3401
|
-
...(0,
|
|
3402
|
-
actions: /* @__PURE__ */
|
|
3403
|
-
|
|
3497
|
+
startIcon: /* @__PURE__ */ React74.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4 }),
|
|
3498
|
+
...(0, import_ui61.bindTrigger)(selectionPopoverState),
|
|
3499
|
+
actions: /* @__PURE__ */ React74.createElement(React74.Fragment, null, /* @__PURE__ */ React74.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React74.createElement(
|
|
3500
|
+
import_ui61.IconButton,
|
|
3404
3501
|
{
|
|
3405
3502
|
size: SIZE4,
|
|
3406
3503
|
onClick: removeDynamicTag,
|
|
3407
3504
|
"aria-label": (0, import_i18n48.__)("Remove dynamic value", "elementor")
|
|
3408
3505
|
},
|
|
3409
|
-
/* @__PURE__ */
|
|
3506
|
+
/* @__PURE__ */ React74.createElement(import_icons25.XIcon, { fontSize: SIZE4 })
|
|
3410
3507
|
))
|
|
3411
3508
|
}
|
|
3412
|
-
), /* @__PURE__ */
|
|
3413
|
-
|
|
3509
|
+
), /* @__PURE__ */ React74.createElement(
|
|
3510
|
+
import_ui61.Popover,
|
|
3414
3511
|
{
|
|
3415
3512
|
disablePortal: true,
|
|
3416
3513
|
disableScrollLock: true,
|
|
3417
3514
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3418
|
-
...(0,
|
|
3515
|
+
...(0, import_ui61.bindPopover)(selectionPopoverState)
|
|
3419
3516
|
},
|
|
3420
|
-
/* @__PURE__ */
|
|
3517
|
+
/* @__PURE__ */ React74.createElement(import_ui61.Stack, null, /* @__PURE__ */ React74.createElement(import_ui61.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React74.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React74.createElement(import_ui61.Typography, { variant: "subtitle2" }, (0, import_i18n48.__)("Dynamic tags", "elementor")), /* @__PURE__ */ React74.createElement(import_ui61.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React74.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React74.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
3421
3518
|
));
|
|
3422
3519
|
};
|
|
3423
3520
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
3424
|
-
const popupState = (0,
|
|
3521
|
+
const popupState = (0, import_ui61.usePopupState)({ variant: "popover" });
|
|
3425
3522
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
3426
3523
|
if (!hasDynamicSettings) {
|
|
3427
3524
|
return null;
|
|
3428
3525
|
}
|
|
3429
|
-
return /* @__PURE__ */
|
|
3430
|
-
|
|
3526
|
+
return /* @__PURE__ */ React74.createElement(React74.Fragment, null, /* @__PURE__ */ React74.createElement(import_ui61.IconButton, { size: SIZE4, ...(0, import_ui61.bindTrigger)(popupState), "aria-label": (0, import_i18n48.__)("Settings", "elementor") }, /* @__PURE__ */ React74.createElement(import_icons25.SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React74.createElement(
|
|
3527
|
+
import_ui61.Popover,
|
|
3431
3528
|
{
|
|
3432
3529
|
disablePortal: true,
|
|
3433
3530
|
disableScrollLock: true,
|
|
3434
3531
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3435
|
-
...(0,
|
|
3532
|
+
...(0, import_ui61.bindPopover)(popupState)
|
|
3436
3533
|
},
|
|
3437
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ React74.createElement(import_ui61.Paper, { component: import_ui61.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React74.createElement(import_ui61.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React74.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React74.createElement(import_ui61.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React74.createElement(import_ui61.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React74.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React74.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3438
3535
|
));
|
|
3439
3536
|
};
|
|
3440
3537
|
var DynamicSettings = ({ controls }) => {
|
|
3441
3538
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
3442
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
3539
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui61.useTabs)(0);
|
|
3443
3540
|
if (!tabs.length) {
|
|
3444
3541
|
return null;
|
|
3445
3542
|
}
|
|
3446
|
-
return /* @__PURE__ */
|
|
3447
|
-
return /* @__PURE__ */
|
|
3543
|
+
return /* @__PURE__ */ React74.createElement(React74.Fragment, null, /* @__PURE__ */ React74.createElement(import_ui61.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React74.createElement(import_ui61.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React74.createElement(import_ui61.Divider, null), tabs.map(({ value }, index) => {
|
|
3544
|
+
return /* @__PURE__ */ React74.createElement(import_ui61.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React74.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
3448
3545
|
if (item.type === "control") {
|
|
3449
|
-
return /* @__PURE__ */
|
|
3546
|
+
return /* @__PURE__ */ React74.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3450
3547
|
}
|
|
3451
3548
|
return null;
|
|
3452
3549
|
})));
|
|
3453
3550
|
}));
|
|
3454
3551
|
};
|
|
3455
3552
|
var Control3 = ({ control }) => {
|
|
3456
|
-
if (!
|
|
3553
|
+
if (!getControl(control.type)) {
|
|
3457
3554
|
return null;
|
|
3458
3555
|
}
|
|
3459
|
-
return /* @__PURE__ */
|
|
3556
|
+
return /* @__PURE__ */ React74.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React74.createElement(import_ui61.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React74.createElement(import_ui61.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React74.createElement(import_editor_controls49.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React74.createElement(import_ui61.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React74.createElement(Control, { type: control.type, props: control.props }))));
|
|
3460
3557
|
};
|
|
3461
3558
|
|
|
3462
3559
|
// src/dynamics/dynamic-transformer.ts
|
|
3463
|
-
var
|
|
3560
|
+
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
3464
3561
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
3465
3562
|
|
|
3466
3563
|
// src/dynamics/errors.ts
|
|
@@ -3471,7 +3568,7 @@ var DynamicTagsManagerNotFoundError = (0, import_utils8.createError)({
|
|
|
3471
3568
|
});
|
|
3472
3569
|
|
|
3473
3570
|
// src/dynamics/dynamic-transformer.ts
|
|
3474
|
-
var dynamicTransformer = (0,
|
|
3571
|
+
var dynamicTransformer = (0, import_editor_canvas2.createTransformer)((value) => {
|
|
3475
3572
|
if (!value.name) {
|
|
3476
3573
|
return null;
|
|
3477
3574
|
}
|
|
@@ -3509,7 +3606,7 @@ function getDynamicValue(name, settings) {
|
|
|
3509
3606
|
}
|
|
3510
3607
|
|
|
3511
3608
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3512
|
-
var
|
|
3609
|
+
var React75 = __toESM(require("react"));
|
|
3513
3610
|
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
3514
3611
|
var import_icons26 = require("@elementor/icons");
|
|
3515
3612
|
var import_i18n49 = require("@wordpress/i18n");
|
|
@@ -3520,7 +3617,7 @@ var usePropDynamicAction = () => {
|
|
|
3520
3617
|
visible,
|
|
3521
3618
|
icon: import_icons26.DatabaseIcon,
|
|
3522
3619
|
title: (0, import_i18n49.__)("Dynamic tags", "elementor"),
|
|
3523
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3620
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React75.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3524
3621
|
};
|
|
3525
3622
|
};
|
|
3526
3623
|
|
|
@@ -3535,8 +3632,8 @@ var init = () => {
|
|
|
3535
3632
|
id: "dynamic-tags",
|
|
3536
3633
|
useProps: usePropDynamicAction
|
|
3537
3634
|
});
|
|
3538
|
-
|
|
3539
|
-
|
|
3635
|
+
import_editor_canvas3.styleTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
3636
|
+
import_editor_canvas3.settingsTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
3540
3637
|
};
|
|
3541
3638
|
|
|
3542
3639
|
// src/init.ts
|