@elementor/editor-editing-panel 1.19.0 → 1.21.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 +32 -0
- package/dist/index.js +508 -432
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +466 -383
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/components/section.tsx +6 -2
- package/src/components/style-sections/layout-section/align-content-field.tsx +83 -0
- package/src/components/style-sections/layout-section/display-field.tsx +1 -1
- package/src/components/style-sections/layout-section/justify-content-field.tsx +1 -1
- package/src/components/style-sections/layout-section/layout-section.tsx +16 -10
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +25 -10
- package/src/components/style-sections/position-section/dimensions-field.tsx +1 -1
- package/src/components/style-sections/size-section/size-section.tsx +1 -1
- package/src/dynamics/components/dynamic-selection-control.tsx +2 -2
package/dist/index.mjs
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
function MultiCombobox({
|
|
111
111
|
actions = [],
|
|
112
112
|
selected,
|
|
113
|
-
options:
|
|
113
|
+
options: options13,
|
|
114
114
|
onSelect,
|
|
115
115
|
...props
|
|
116
116
|
}) {
|
|
@@ -128,14 +128,14 @@ function MultiCombobox({
|
|
|
128
128
|
handleHomeEndKeys: true,
|
|
129
129
|
disabled: loading,
|
|
130
130
|
value: selected,
|
|
131
|
-
options:
|
|
131
|
+
options: options13,
|
|
132
132
|
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
133
133
|
renderInput: (params) => /* @__PURE__ */ React4.createElement(TextField, { ...params }),
|
|
134
134
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
135
135
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
136
136
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
137
137
|
if (reason === "createOption") {
|
|
138
|
-
const [firstAction] = filterActions(actions, { options:
|
|
138
|
+
const [firstAction] = filterActions(actions, { options: options13, inputValue: inputValue ?? "" });
|
|
139
139
|
if (firstAction.value) {
|
|
140
140
|
return run(firstAction.apply, firstAction.value);
|
|
141
141
|
}
|
|
@@ -144,7 +144,7 @@ function MultiCombobox({
|
|
|
144
144
|
if (reason === "selectOption" && action?.value) {
|
|
145
145
|
return run(action.apply, action.value);
|
|
146
146
|
}
|
|
147
|
-
const fixedValues =
|
|
147
|
+
const fixedValues = options13.filter((option) => !!option.fixed);
|
|
148
148
|
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
149
149
|
},
|
|
150
150
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
@@ -202,8 +202,8 @@ function useActionRunner() {
|
|
|
202
202
|
};
|
|
203
203
|
return { run, loading };
|
|
204
204
|
}
|
|
205
|
-
function filterActions(actions, { options:
|
|
206
|
-
return actions.filter((action) => action.condition(
|
|
205
|
+
function filterActions(actions, { options: options13, inputValue }) {
|
|
206
|
+
return actions.filter((action) => action.condition(options13, inputValue)).map((action, index) => ({
|
|
207
207
|
label: action.label(inputValue),
|
|
208
208
|
value: inputValue,
|
|
209
209
|
group: action.group,
|
|
@@ -487,19 +487,19 @@ var EMPTY_OPTION = {
|
|
|
487
487
|
};
|
|
488
488
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation();
|
|
489
489
|
function CssClassSelector() {
|
|
490
|
-
const
|
|
490
|
+
const options13 = useOptions();
|
|
491
491
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
492
492
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
493
493
|
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
494
494
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
495
|
-
const applied = useAppliedOptions(
|
|
495
|
+
const applied = useAppliedOptions(options13, appliedIds);
|
|
496
496
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
497
497
|
return /* @__PURE__ */ React7.createElement(Stack2, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("CSS classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
498
498
|
MultiCombobox,
|
|
499
499
|
{
|
|
500
500
|
id: ID,
|
|
501
501
|
size: "tiny",
|
|
502
|
-
options:
|
|
502
|
+
options: options13,
|
|
503
503
|
selected: applied,
|
|
504
504
|
onSelect: handleApply,
|
|
505
505
|
limitTags: TAGS_LIMIT,
|
|
@@ -584,8 +584,8 @@ function useCreateActions({
|
|
|
584
584
|
};
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
function useAppliedOptions(
|
|
588
|
-
const applied =
|
|
587
|
+
function useAppliedOptions(options13, appliedIds) {
|
|
588
|
+
const applied = options13.filter((option) => option.value && appliedIds.includes(option.value));
|
|
589
589
|
const hasElementsProviderStyleApplied = applied.some(
|
|
590
590
|
(option) => option.provider === ELEMENTS_STYLES_PROVIDER_KEY
|
|
591
591
|
);
|
|
@@ -641,14 +641,14 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
641
641
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
642
642
|
|
|
643
643
|
// src/components/editing-panel.tsx
|
|
644
|
-
import * as
|
|
644
|
+
import * as React66 from "react";
|
|
645
645
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
646
646
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
647
647
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
648
648
|
import { AtomIcon } from "@elementor/icons";
|
|
649
649
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
650
650
|
import { ErrorBoundary } from "@elementor/ui";
|
|
651
|
-
import { __ as
|
|
651
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
652
652
|
|
|
653
653
|
// src/controls-actions.ts
|
|
654
654
|
import { createMenu } from "@elementor/menus";
|
|
@@ -704,10 +704,10 @@ function EditorPanelErrorFallback() {
|
|
|
704
704
|
}
|
|
705
705
|
|
|
706
706
|
// src/components/editing-panel-tabs.tsx
|
|
707
|
-
import * as
|
|
707
|
+
import * as React65 from "react";
|
|
708
708
|
import { Fragment as Fragment8 } from "react";
|
|
709
|
-
import { Divider as Divider5, Stack as
|
|
710
|
-
import { __ as
|
|
709
|
+
import { Divider as Divider5, Stack as Stack14, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
710
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
711
711
|
|
|
712
712
|
// src/components/settings-tab.tsx
|
|
713
713
|
import * as React15 from "react";
|
|
@@ -839,10 +839,17 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
839
839
|
{
|
|
840
840
|
id: labelId,
|
|
841
841
|
"aria-controls": contentId,
|
|
842
|
-
onClick: () => setIsOpen((prev) => !prev)
|
|
842
|
+
onClick: () => setIsOpen((prev) => !prev),
|
|
843
|
+
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
843
844
|
},
|
|
844
|
-
/* @__PURE__ */ React13.createElement(
|
|
845
|
-
|
|
845
|
+
/* @__PURE__ */ React13.createElement(
|
|
846
|
+
ListItemText,
|
|
847
|
+
{
|
|
848
|
+
secondary: title,
|
|
849
|
+
secondaryTypographyProps: { sx: { typography: "caption", fontWeight: "bold" } }
|
|
850
|
+
}
|
|
851
|
+
),
|
|
852
|
+
/* @__PURE__ */ React13.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
846
853
|
), /* @__PURE__ */ React13.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(Stack4, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React13.createElement(Divider2, null));
|
|
847
854
|
}
|
|
848
855
|
|
|
@@ -879,14 +886,14 @@ var Control2 = ({ control }) => {
|
|
|
879
886
|
};
|
|
880
887
|
|
|
881
888
|
// src/components/style-tab.tsx
|
|
882
|
-
import * as
|
|
889
|
+
import * as React64 from "react";
|
|
883
890
|
import { useState as useState7 } from "react";
|
|
884
891
|
import { getElementStyles, useElementSetting as useElementSetting5 } from "@elementor/editor-elements";
|
|
885
892
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
886
893
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
887
894
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
888
895
|
import { Divider as Divider4 } from "@elementor/ui";
|
|
889
|
-
import { __ as
|
|
896
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
890
897
|
|
|
891
898
|
// src/contexts/styles-inheritance-context.tsx
|
|
892
899
|
import * as React16 from "react";
|
|
@@ -1426,20 +1433,30 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
1426
1433
|
"row-reverse": -180,
|
|
1427
1434
|
"column-reverse": -270
|
|
1428
1435
|
};
|
|
1429
|
-
var RotatedIcon = ({
|
|
1430
|
-
|
|
1431
|
-
|
|
1436
|
+
var RotatedIcon = ({
|
|
1437
|
+
icon: Icon,
|
|
1438
|
+
size,
|
|
1439
|
+
isClockwise = true,
|
|
1440
|
+
offset = 0,
|
|
1441
|
+
disableRotationForReversed = false
|
|
1442
|
+
}) => {
|
|
1443
|
+
const rotate = useRef(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
1444
|
+
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
1432
1445
|
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1433
1446
|
};
|
|
1434
|
-
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1447
|
+
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
1435
1448
|
const [direction] = useStylesField("flex-direction");
|
|
1436
1449
|
const isRtl = "rtl" === useTheme2().direction;
|
|
1437
1450
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1438
1451
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1439
|
-
const
|
|
1440
|
-
const
|
|
1452
|
+
const currentDirection = direction?.value || "row";
|
|
1453
|
+
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[currentDirection] + offset;
|
|
1454
|
+
const targetAngle = angleMap[currentDirection] + offset;
|
|
1441
1455
|
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1442
1456
|
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1457
|
+
if (disableRotationForReversed && ["row-reverse", "column-reverse"].includes(currentDirection)) {
|
|
1458
|
+
return 0;
|
|
1459
|
+
}
|
|
1443
1460
|
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1444
1461
|
};
|
|
1445
1462
|
|
|
@@ -1583,10 +1600,10 @@ var EffectsSection = () => {
|
|
|
1583
1600
|
};
|
|
1584
1601
|
|
|
1585
1602
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1586
|
-
import * as
|
|
1587
|
-
import { ControlLabel as
|
|
1603
|
+
import * as React41 from "react";
|
|
1604
|
+
import { ControlLabel as ControlLabel14 } from "@elementor/editor-controls";
|
|
1588
1605
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1589
|
-
import { __ as
|
|
1606
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1590
1607
|
|
|
1591
1608
|
// src/hooks/use-computed-style.ts
|
|
1592
1609
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -1613,22 +1630,25 @@ function useComputedStyle(elementId) {
|
|
|
1613
1630
|
);
|
|
1614
1631
|
}
|
|
1615
1632
|
|
|
1616
|
-
// src/components/style-sections/layout-section/align-
|
|
1633
|
+
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1617
1634
|
import * as React31 from "react";
|
|
1618
1635
|
import { ControlLabel as ControlLabel5, ToggleControl } from "@elementor/editor-controls";
|
|
1619
1636
|
import {
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1637
|
+
JustifyBottomIcon,
|
|
1638
|
+
JustifyCenterIcon as CenterIcon,
|
|
1639
|
+
JustifyDistributeVerticalIcon as EvenlyIcon,
|
|
1640
|
+
JustifySpaceAroundVerticalIcon as AroundIcon,
|
|
1641
|
+
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1642
|
+
JustifyTopIcon
|
|
1624
1643
|
} from "@elementor/icons";
|
|
1625
|
-
import { DirectionProvider,
|
|
1644
|
+
import { DirectionProvider, Stack as Stack7, ThemeProvider, withDirection as withDirection3 } from "@elementor/ui";
|
|
1626
1645
|
import { __ as __11 } from "@wordpress/i18n";
|
|
1627
|
-
var StartIcon = withDirection3(
|
|
1628
|
-
var EndIcon = withDirection3(
|
|
1646
|
+
var StartIcon = withDirection3(JustifyTopIcon);
|
|
1647
|
+
var EndIcon = withDirection3(JustifyBottomIcon);
|
|
1629
1648
|
var iconProps = {
|
|
1630
1649
|
isClockwise: false,
|
|
1631
|
-
offset:
|
|
1650
|
+
offset: 0,
|
|
1651
|
+
disableRotationForReversed: true
|
|
1632
1652
|
};
|
|
1633
1653
|
var options = [
|
|
1634
1654
|
{
|
|
@@ -1650,30 +1670,42 @@ var options = [
|
|
|
1650
1670
|
showTooltip: true
|
|
1651
1671
|
},
|
|
1652
1672
|
{
|
|
1653
|
-
value: "
|
|
1654
|
-
label: __11("
|
|
1655
|
-
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon:
|
|
1673
|
+
value: "space-between",
|
|
1674
|
+
label: __11("Space between", "elementor"),
|
|
1675
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
1676
|
+
showTooltip: true
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
value: "space-around",
|
|
1680
|
+
label: __11("Space around", "elementor"),
|
|
1681
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
1682
|
+
showTooltip: true
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
value: "space-evenly",
|
|
1686
|
+
label: __11("Space evenly", "elementor"),
|
|
1687
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
1656
1688
|
showTooltip: true
|
|
1657
1689
|
}
|
|
1658
1690
|
];
|
|
1659
|
-
var
|
|
1691
|
+
var AlignContentField = () => {
|
|
1660
1692
|
const { isSiteRtl } = useDirection();
|
|
1661
|
-
return /* @__PURE__ */ React31.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "align-
|
|
1693
|
+
return /* @__PURE__ */ React31.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React31.createElement(Stack7, { gap: 1 }, /* @__PURE__ */ React31.createElement(ControlLabel5, null, __11("Align content", "elementor")), /* @__PURE__ */ React31.createElement(ToggleControl, { options, fullWidth: true })))));
|
|
1662
1694
|
};
|
|
1663
1695
|
|
|
1664
|
-
// src/components/style-sections/layout-section/align-
|
|
1696
|
+
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1665
1697
|
import * as React32 from "react";
|
|
1666
1698
|
import { ControlLabel as ControlLabel6, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
1667
1699
|
import {
|
|
1668
1700
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
1669
|
-
LayoutAlignLeftIcon
|
|
1670
|
-
LayoutAlignRightIcon
|
|
1671
|
-
LayoutDistributeVerticalIcon as
|
|
1701
|
+
LayoutAlignLeftIcon,
|
|
1702
|
+
LayoutAlignRightIcon,
|
|
1703
|
+
LayoutDistributeVerticalIcon as JustifyIcon
|
|
1672
1704
|
} from "@elementor/icons";
|
|
1673
|
-
import { DirectionProvider as DirectionProvider2, Grid as
|
|
1705
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid3, ThemeProvider as ThemeProvider2, withDirection as withDirection4 } from "@elementor/ui";
|
|
1674
1706
|
import { __ as __12 } from "@wordpress/i18n";
|
|
1675
|
-
var StartIcon2 = withDirection4(
|
|
1676
|
-
var EndIcon2 = withDirection4(
|
|
1707
|
+
var StartIcon2 = withDirection4(LayoutAlignLeftIcon);
|
|
1708
|
+
var EndIcon2 = withDirection4(LayoutAlignRightIcon);
|
|
1677
1709
|
var iconProps2 = {
|
|
1678
1710
|
isClockwise: false,
|
|
1679
1711
|
offset: 90
|
|
@@ -1700,104 +1732,152 @@ var options2 = [
|
|
|
1700
1732
|
{
|
|
1701
1733
|
value: "stretch",
|
|
1702
1734
|
label: __12("Stretch", "elementor"),
|
|
1703
|
-
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon:
|
|
1735
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
1704
1736
|
showTooltip: true
|
|
1705
1737
|
}
|
|
1706
1738
|
];
|
|
1707
|
-
var
|
|
1739
|
+
var AlignItemsField = () => {
|
|
1708
1740
|
const { isSiteRtl } = useDirection();
|
|
1709
|
-
return /* @__PURE__ */ React32.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider2, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "align-
|
|
1741
|
+
return /* @__PURE__ */ React32.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider2, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React32.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel6, null, __12("Align items", "elementor"))), /* @__PURE__ */ React32.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(ToggleControl2, { options: options2 }))))));
|
|
1710
1742
|
};
|
|
1711
1743
|
|
|
1712
|
-
// src/components/style-sections/layout-section/
|
|
1744
|
+
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1713
1745
|
import * as React33 from "react";
|
|
1714
1746
|
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1715
|
-
import {
|
|
1747
|
+
import {
|
|
1748
|
+
LayoutAlignCenterIcon as CenterIcon3,
|
|
1749
|
+
LayoutAlignLeftIcon as LayoutAlignLeftIcon2,
|
|
1750
|
+
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
1751
|
+
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
1752
|
+
} from "@elementor/icons";
|
|
1753
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid4, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
|
|
1716
1754
|
import { __ as __13 } from "@wordpress/i18n";
|
|
1755
|
+
var StartIcon3 = withDirection5(LayoutAlignLeftIcon2);
|
|
1756
|
+
var EndIcon3 = withDirection5(LayoutAlignRightIcon2);
|
|
1757
|
+
var iconProps3 = {
|
|
1758
|
+
isClockwise: false,
|
|
1759
|
+
offset: 90
|
|
1760
|
+
};
|
|
1761
|
+
var options3 = [
|
|
1762
|
+
{
|
|
1763
|
+
value: "start",
|
|
1764
|
+
label: __13("Start", "elementor"),
|
|
1765
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1766
|
+
showTooltip: true
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
value: "center",
|
|
1770
|
+
label: __13("Center", "elementor"),
|
|
1771
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1772
|
+
showTooltip: true
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
value: "end",
|
|
1776
|
+
label: __13("End", "elementor"),
|
|
1777
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1778
|
+
showTooltip: true
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
value: "stretch",
|
|
1782
|
+
label: __13("Stretch", "elementor"),
|
|
1783
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps3 }),
|
|
1784
|
+
showTooltip: true
|
|
1785
|
+
}
|
|
1786
|
+
];
|
|
1787
|
+
var AlignSelfChild = () => {
|
|
1788
|
+
const { isSiteRtl } = useDirection();
|
|
1789
|
+
return /* @__PURE__ */ React33.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(ThemeProvider3, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React33.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel7, null, __13("Align self", "elementor"))), /* @__PURE__ */ React33.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React33.createElement(ToggleControl3, { options: options3 }))))));
|
|
1790
|
+
};
|
|
1791
|
+
|
|
1792
|
+
// src/components/style-sections/layout-section/display-field.tsx
|
|
1793
|
+
import * as React34 from "react";
|
|
1794
|
+
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1795
|
+
import { Stack as Stack8 } from "@elementor/ui";
|
|
1796
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1717
1797
|
var DisplayField = () => {
|
|
1718
|
-
const
|
|
1798
|
+
const options13 = [
|
|
1719
1799
|
{
|
|
1720
1800
|
value: "block",
|
|
1721
|
-
renderContent: () =>
|
|
1722
|
-
label:
|
|
1801
|
+
renderContent: () => __14("Block", "elementor"),
|
|
1802
|
+
label: __14("Block", "elementor"),
|
|
1723
1803
|
showTooltip: true
|
|
1724
1804
|
},
|
|
1725
1805
|
{
|
|
1726
1806
|
value: "flex",
|
|
1727
|
-
renderContent: () =>
|
|
1728
|
-
label:
|
|
1807
|
+
renderContent: () => __14("Flex", "elementor"),
|
|
1808
|
+
label: __14("Flex", "elementor"),
|
|
1729
1809
|
showTooltip: true
|
|
1730
1810
|
},
|
|
1731
1811
|
{
|
|
1732
1812
|
value: "inline-block",
|
|
1733
|
-
renderContent: () =>
|
|
1734
|
-
label:
|
|
1813
|
+
renderContent: () => __14("In-blk", "elementor"),
|
|
1814
|
+
label: __14("Inline-block", "elementor"),
|
|
1735
1815
|
showTooltip: true
|
|
1736
1816
|
},
|
|
1737
1817
|
{
|
|
1738
1818
|
value: "inline-flex",
|
|
1739
|
-
renderContent: () =>
|
|
1740
|
-
label:
|
|
1819
|
+
renderContent: () => __14("In-flx", "elementor"),
|
|
1820
|
+
label: __14("Inline-flex", "elementor"),
|
|
1741
1821
|
showTooltip: true
|
|
1742
1822
|
}
|
|
1743
1823
|
];
|
|
1744
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ React34.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React34.createElement(Stack8, { gap: 0.75 }, /* @__PURE__ */ React34.createElement(ControlLabel8, null, __14("Display", "elementor")), /* @__PURE__ */ React34.createElement(ToggleControl4, { options: options13, fullWidth: true })));
|
|
1745
1825
|
};
|
|
1746
1826
|
|
|
1747
1827
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1748
|
-
import * as
|
|
1749
|
-
import { ControlLabel as
|
|
1828
|
+
import * as React35 from "react";
|
|
1829
|
+
import { ControlLabel as ControlLabel9, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1750
1830
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1751
|
-
import { DirectionProvider as
|
|
1752
|
-
import { __ as
|
|
1753
|
-
var
|
|
1831
|
+
import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
|
|
1832
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1833
|
+
var options4 = [
|
|
1754
1834
|
{
|
|
1755
1835
|
value: "row",
|
|
1756
|
-
label:
|
|
1836
|
+
label: __15("Row", "elementor"),
|
|
1757
1837
|
renderContent: ({ size }) => {
|
|
1758
|
-
const
|
|
1759
|
-
return /* @__PURE__ */
|
|
1838
|
+
const StartIcon6 = withDirection6(ArrowRightIcon);
|
|
1839
|
+
return /* @__PURE__ */ React35.createElement(StartIcon6, { fontSize: size });
|
|
1760
1840
|
},
|
|
1761
1841
|
showTooltip: true
|
|
1762
1842
|
},
|
|
1763
1843
|
{
|
|
1764
1844
|
value: "column",
|
|
1765
|
-
label:
|
|
1766
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1845
|
+
label: __15("Column", "elementor"),
|
|
1846
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1767
1847
|
showTooltip: true
|
|
1768
1848
|
},
|
|
1769
1849
|
{
|
|
1770
1850
|
value: "row-reverse",
|
|
1771
|
-
label:
|
|
1851
|
+
label: __15("Reversed row", "elementor"),
|
|
1772
1852
|
renderContent: ({ size }) => {
|
|
1773
|
-
const
|
|
1774
|
-
return /* @__PURE__ */
|
|
1853
|
+
const EndIcon6 = withDirection6(ArrowLeftIcon);
|
|
1854
|
+
return /* @__PURE__ */ React35.createElement(EndIcon6, { fontSize: size });
|
|
1775
1855
|
},
|
|
1776
1856
|
showTooltip: true
|
|
1777
1857
|
},
|
|
1778
1858
|
{
|
|
1779
1859
|
value: "column-reverse",
|
|
1780
|
-
label:
|
|
1781
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1860
|
+
label: __15("Reversed column", "elementor"),
|
|
1861
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1782
1862
|
showTooltip: true
|
|
1783
1863
|
}
|
|
1784
1864
|
];
|
|
1785
1865
|
var FlexDirectionField = () => {
|
|
1786
1866
|
const { isSiteRtl } = useDirection();
|
|
1787
|
-
return /* @__PURE__ */
|
|
1867
|
+
return /* @__PURE__ */ React35.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider4, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React35.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel9, null, __15("Direction", "elementor"))), /* @__PURE__ */ React35.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React35.createElement(ToggleControl5, { options: options4 }))))));
|
|
1788
1868
|
};
|
|
1789
1869
|
|
|
1790
1870
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1791
|
-
import * as
|
|
1871
|
+
import * as React36 from "react";
|
|
1792
1872
|
import { useState as useState4 } from "react";
|
|
1793
1873
|
import {
|
|
1794
|
-
ControlLabel as
|
|
1874
|
+
ControlLabel as ControlLabel10,
|
|
1795
1875
|
ControlToggleButtonGroup,
|
|
1796
1876
|
NumberControl
|
|
1797
1877
|
} from "@elementor/editor-controls";
|
|
1798
1878
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
1799
|
-
import { DirectionProvider as
|
|
1800
|
-
import { __ as
|
|
1879
|
+
import { DirectionProvider as DirectionProvider5, Grid as Grid6, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1880
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1801
1881
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1802
1882
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1803
1883
|
var FIRST = "first";
|
|
@@ -1810,20 +1890,20 @@ var orderValueMap = {
|
|
|
1810
1890
|
var items = [
|
|
1811
1891
|
{
|
|
1812
1892
|
value: FIRST,
|
|
1813
|
-
label:
|
|
1814
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1893
|
+
label: __16("First", "elementor"),
|
|
1894
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1815
1895
|
showTooltip: true
|
|
1816
1896
|
},
|
|
1817
1897
|
{
|
|
1818
1898
|
value: LAST,
|
|
1819
|
-
label:
|
|
1820
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1899
|
+
label: __16("Last", "elementor"),
|
|
1900
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1821
1901
|
showTooltip: true
|
|
1822
1902
|
},
|
|
1823
1903
|
{
|
|
1824
1904
|
value: CUSTOM,
|
|
1825
|
-
label:
|
|
1826
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1905
|
+
label: __16("Custom", "elementor"),
|
|
1906
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(PencilIcon, { fontSize: size }),
|
|
1827
1907
|
showTooltip: true
|
|
1828
1908
|
}
|
|
1829
1909
|
];
|
|
@@ -1838,7 +1918,7 @@ var FlexOrderField = () => {
|
|
|
1838
1918
|
}
|
|
1839
1919
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1840
1920
|
};
|
|
1841
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ React36.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(ThemeProvider5, null, /* @__PURE__ */ React36.createElement(SectionContent, null, /* @__PURE__ */ React36.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel10, null, __16("Order", "elementor"))), /* @__PURE__ */ React36.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(
|
|
1842
1922
|
ControlToggleButtonGroup,
|
|
1843
1923
|
{
|
|
1844
1924
|
items,
|
|
@@ -1846,7 +1926,7 @@ var FlexOrderField = () => {
|
|
|
1846
1926
|
onChange: handleToggleButtonChange,
|
|
1847
1927
|
exclusive: true
|
|
1848
1928
|
}
|
|
1849
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1929
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React36.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React36.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel10, null, __16("Custom order", "elementor"))), /* @__PURE__ */ React36.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(
|
|
1850
1930
|
NumberControl,
|
|
1851
1931
|
{
|
|
1852
1932
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1866,35 +1946,35 @@ var getGroupControlValue = (order) => {
|
|
|
1866
1946
|
};
|
|
1867
1947
|
|
|
1868
1948
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1869
|
-
import * as
|
|
1949
|
+
import * as React37 from "react";
|
|
1870
1950
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1871
1951
|
import {
|
|
1872
|
-
ControlLabel as
|
|
1952
|
+
ControlLabel as ControlLabel11,
|
|
1873
1953
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
1874
1954
|
NumberControl as NumberControl2,
|
|
1875
1955
|
SizeControl as SizeControl2
|
|
1876
1956
|
} from "@elementor/editor-controls";
|
|
1877
1957
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
1878
|
-
import { DirectionProvider as
|
|
1879
|
-
import { __ as
|
|
1958
|
+
import { DirectionProvider as DirectionProvider6, Grid as Grid7, ThemeProvider as ThemeProvider6 } from "@elementor/ui";
|
|
1959
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1880
1960
|
var DEFAULT = 1;
|
|
1881
1961
|
var items2 = [
|
|
1882
1962
|
{
|
|
1883
1963
|
value: "flex-grow",
|
|
1884
|
-
label:
|
|
1885
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1964
|
+
label: __17("Grow", "elementor"),
|
|
1965
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(ExpandIcon, { fontSize: size }),
|
|
1886
1966
|
showTooltip: true
|
|
1887
1967
|
},
|
|
1888
1968
|
{
|
|
1889
1969
|
value: "flex-shrink",
|
|
1890
|
-
label:
|
|
1891
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1970
|
+
label: __17("Shrink", "elementor"),
|
|
1971
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(ShrinkIcon, { fontSize: size }),
|
|
1892
1972
|
showTooltip: true
|
|
1893
1973
|
},
|
|
1894
1974
|
{
|
|
1895
1975
|
value: "custom",
|
|
1896
|
-
label:
|
|
1897
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1976
|
+
label: __17("Custom", "elementor"),
|
|
1977
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(PencilIcon2, { fontSize: size }),
|
|
1898
1978
|
showTooltip: true
|
|
1899
1979
|
}
|
|
1900
1980
|
];
|
|
@@ -1918,7 +1998,7 @@ var FlexSizeField = () => {
|
|
|
1918
1998
|
setGrowField(null);
|
|
1919
1999
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1920
2000
|
};
|
|
1921
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ React37.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(ThemeProvider6, null, /* @__PURE__ */ React37.createElement(SectionContent, null, /* @__PURE__ */ React37.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel11, null, __17("Size", "elementor"))), /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(
|
|
1922
2002
|
ControlToggleButtonGroup2,
|
|
1923
2003
|
{
|
|
1924
2004
|
value: activeGroup,
|
|
@@ -1926,9 +2006,9 @@ var FlexSizeField = () => {
|
|
|
1926
2006
|
items: items2,
|
|
1927
2007
|
exclusive: true
|
|
1928
2008
|
}
|
|
1929
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
2009
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React37.createElement(FlexCustomField, null))));
|
|
1930
2010
|
};
|
|
1931
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
2011
|
+
var FlexCustomField = () => /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React37.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel11, null, __17("Grow", "elementor"))), /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React37.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React37.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel11, null, __17("Shrink", "elementor"))), /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React37.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React37.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel11, null, __17("Basis", "elementor"))), /* @__PURE__ */ React37.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(SizeControl2, { extendedValues: ["auto"] })))));
|
|
1932
2012
|
var getActiveGroup = ({
|
|
1933
2013
|
grow,
|
|
1934
2014
|
shrink,
|
|
@@ -1950,105 +2030,105 @@ var getActiveGroup = ({
|
|
|
1950
2030
|
};
|
|
1951
2031
|
|
|
1952
2032
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1953
|
-
import * as
|
|
2033
|
+
import * as React38 from "react";
|
|
1954
2034
|
import { GapControl } from "@elementor/editor-controls";
|
|
1955
|
-
import { Stack as
|
|
1956
|
-
import { __ as
|
|
2035
|
+
import { Stack as Stack9 } from "@elementor/ui";
|
|
2036
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1957
2037
|
var GapControlField = () => {
|
|
1958
|
-
return /* @__PURE__ */
|
|
2038
|
+
return /* @__PURE__ */ React38.createElement(Stack9, { gap: 1 }, /* @__PURE__ */ React38.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React38.createElement(GapControl, { label: __18("Gaps", "elementor") })));
|
|
1959
2039
|
};
|
|
1960
2040
|
|
|
1961
2041
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1962
|
-
import * as
|
|
1963
|
-
import { ControlLabel as
|
|
2042
|
+
import * as React39 from "react";
|
|
2043
|
+
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1964
2044
|
import {
|
|
1965
|
-
JustifyBottomIcon,
|
|
1966
|
-
JustifyCenterIcon as
|
|
1967
|
-
JustifyDistributeVerticalIcon as
|
|
1968
|
-
JustifySpaceAroundVerticalIcon as
|
|
1969
|
-
JustifySpaceBetweenVerticalIcon as
|
|
1970
|
-
JustifyTopIcon
|
|
2045
|
+
JustifyBottomIcon as JustifyBottomIcon2,
|
|
2046
|
+
JustifyCenterIcon as CenterIcon4,
|
|
2047
|
+
JustifyDistributeVerticalIcon as EvenlyIcon2,
|
|
2048
|
+
JustifySpaceAroundVerticalIcon as AroundIcon2,
|
|
2049
|
+
JustifySpaceBetweenVerticalIcon as BetweenIcon2,
|
|
2050
|
+
JustifyTopIcon as JustifyTopIcon2
|
|
1971
2051
|
} from "@elementor/icons";
|
|
1972
|
-
import { DirectionProvider as
|
|
1973
|
-
import { __ as
|
|
1974
|
-
var
|
|
1975
|
-
var
|
|
1976
|
-
var
|
|
2052
|
+
import { DirectionProvider as DirectionProvider7, Stack as Stack10, ThemeProvider as ThemeProvider7, withDirection as withDirection7 } from "@elementor/ui";
|
|
2053
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
2054
|
+
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
2055
|
+
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
2056
|
+
var iconProps4 = {
|
|
1977
2057
|
isClockwise: true,
|
|
1978
2058
|
offset: -90
|
|
1979
2059
|
};
|
|
1980
|
-
var
|
|
2060
|
+
var options5 = [
|
|
1981
2061
|
{
|
|
1982
2062
|
value: "start",
|
|
1983
|
-
label:
|
|
1984
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2063
|
+
label: __19("Start", "elementor"),
|
|
2064
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
1985
2065
|
showTooltip: true
|
|
1986
2066
|
},
|
|
1987
2067
|
{
|
|
1988
2068
|
value: "center",
|
|
1989
|
-
label:
|
|
1990
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2069
|
+
label: __19("Center", "elementor"),
|
|
2070
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
1991
2071
|
showTooltip: true
|
|
1992
2072
|
},
|
|
1993
2073
|
{
|
|
1994
2074
|
value: "end",
|
|
1995
|
-
label:
|
|
1996
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2075
|
+
label: __19("End", "elementor"),
|
|
2076
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
1997
2077
|
showTooltip: true
|
|
1998
2078
|
},
|
|
1999
2079
|
{
|
|
2000
2080
|
value: "space-between",
|
|
2001
|
-
label:
|
|
2002
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2081
|
+
label: __19("Space between", "elementor"),
|
|
2082
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
2003
2083
|
showTooltip: true
|
|
2004
2084
|
},
|
|
2005
2085
|
{
|
|
2006
2086
|
value: "space-around",
|
|
2007
|
-
label:
|
|
2008
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2087
|
+
label: __19("Space around", "elementor"),
|
|
2088
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
2009
2089
|
showTooltip: true
|
|
2010
2090
|
},
|
|
2011
2091
|
{
|
|
2012
2092
|
value: "space-evenly",
|
|
2013
|
-
label:
|
|
2014
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2093
|
+
label: __19("Space evenly", "elementor"),
|
|
2094
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
2015
2095
|
showTooltip: true
|
|
2016
2096
|
}
|
|
2017
2097
|
];
|
|
2018
2098
|
var JustifyContentField = () => {
|
|
2019
2099
|
const { isSiteRtl } = useDirection();
|
|
2020
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ React39.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React39.createElement(ThemeProvider7, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React39.createElement(Stack10, { gap: 0.75 }, /* @__PURE__ */ React39.createElement(ControlLabel12, null, __19("Justify content", "elementor")), /* @__PURE__ */ React39.createElement(ToggleControl6, { options: options5, fullWidth: true })))));
|
|
2021
2101
|
};
|
|
2022
2102
|
|
|
2023
2103
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2024
|
-
import * as
|
|
2025
|
-
import { ControlLabel as
|
|
2104
|
+
import * as React40 from "react";
|
|
2105
|
+
import { ControlLabel as ControlLabel13, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
2026
2106
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
2027
|
-
import { DirectionProvider as
|
|
2028
|
-
import { __ as
|
|
2029
|
-
var
|
|
2107
|
+
import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
|
|
2108
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
2109
|
+
var options6 = [
|
|
2030
2110
|
{
|
|
2031
2111
|
value: "nowrap",
|
|
2032
|
-
label:
|
|
2033
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2112
|
+
label: __20("No wrap", "elementor"),
|
|
2113
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
2034
2114
|
showTooltip: true
|
|
2035
2115
|
},
|
|
2036
2116
|
{
|
|
2037
2117
|
value: "wrap",
|
|
2038
|
-
label:
|
|
2039
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2118
|
+
label: __20("Wrap", "elementor"),
|
|
2119
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(ArrowBackIcon, { fontSize: size }),
|
|
2040
2120
|
showTooltip: true
|
|
2041
2121
|
},
|
|
2042
2122
|
{
|
|
2043
2123
|
value: "wrap-reverse",
|
|
2044
|
-
label:
|
|
2045
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2124
|
+
label: __20("Reversed wrap", "elementor"),
|
|
2125
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
2046
2126
|
showTooltip: true
|
|
2047
2127
|
}
|
|
2048
2128
|
];
|
|
2049
2129
|
var WrapField = () => {
|
|
2050
2130
|
const { isSiteRtl } = useDirection();
|
|
2051
|
-
return /* @__PURE__ */
|
|
2131
|
+
return /* @__PURE__ */ React40.createElement(DirectionProvider8, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(ThemeProvider8, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React40.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel13, null, __20("Wrap", "elementor"))), /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React40.createElement(ToggleControl7, { options: options6 }))))));
|
|
2052
2132
|
};
|
|
2053
2133
|
|
|
2054
2134
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2057,62 +2137,65 @@ var LayoutSection = () => {
|
|
|
2057
2137
|
const { element } = useElement();
|
|
2058
2138
|
const parent = useParentElement(element.id);
|
|
2059
2139
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2060
|
-
return /* @__PURE__ */
|
|
2140
|
+
return /* @__PURE__ */ React41.createElement(SectionContent, null, /* @__PURE__ */ React41.createElement(DisplayField, null), ("flex" === display?.value || "inline-flex" === display?.value) && /* @__PURE__ */ React41.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React41.createElement(FlexChildFields, null));
|
|
2061
2141
|
};
|
|
2062
|
-
var FlexFields = () =>
|
|
2063
|
-
|
|
2142
|
+
var FlexFields = () => {
|
|
2143
|
+
const [flexWrap] = useStylesField("flex-wrap");
|
|
2144
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(FlexDirectionField, null), /* @__PURE__ */ React41.createElement(JustifyContentField, null), /* @__PURE__ */ React41.createElement(AlignItemsField, null), /* @__PURE__ */ React41.createElement(PanelDivider, null), /* @__PURE__ */ React41.createElement(GapControlField, null), /* @__PURE__ */ React41.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React41.createElement(AlignContentField, null));
|
|
2145
|
+
};
|
|
2146
|
+
var FlexChildFields = () => /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(PanelDivider, null), /* @__PURE__ */ React41.createElement(ControlLabel14, null, __21("Flex child", "elementor")), /* @__PURE__ */ React41.createElement(AlignSelfChild, null), /* @__PURE__ */ React41.createElement(FlexOrderField, null), /* @__PURE__ */ React41.createElement(FlexSizeField, null));
|
|
2064
2147
|
|
|
2065
2148
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2066
|
-
import * as
|
|
2149
|
+
import * as React45 from "react";
|
|
2067
2150
|
import { useSessionStorage } from "@elementor/session";
|
|
2068
2151
|
|
|
2069
2152
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2070
|
-
import * as
|
|
2071
|
-
import { ControlLabel as
|
|
2153
|
+
import * as React42 from "react";
|
|
2154
|
+
import { ControlLabel as ControlLabel15, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
2072
2155
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
2073
|
-
import { Grid as Grid9, Stack as
|
|
2074
|
-
import { __ as
|
|
2075
|
-
var InlineStartIcon2 =
|
|
2076
|
-
var InlineEndIcon2 =
|
|
2156
|
+
import { Grid as Grid9, Stack as Stack11, withDirection as withDirection8 } from "@elementor/ui";
|
|
2157
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
2158
|
+
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
2159
|
+
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
2077
2160
|
var sideIcons = {
|
|
2078
|
-
"inset-block-start": /* @__PURE__ */
|
|
2079
|
-
"inset-block-end": /* @__PURE__ */
|
|
2080
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2081
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2161
|
+
"inset-block-start": /* @__PURE__ */ React42.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
2162
|
+
"inset-block-end": /* @__PURE__ */ React42.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
2163
|
+
"inset-inline-start": /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2164
|
+
"inset-inline-end": /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2082
2165
|
};
|
|
2083
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2084
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2166
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __22("Right", "elementor") : __22("Left", "elementor");
|
|
2167
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __22("Left", "elementor") : __22("Right", "elementor");
|
|
2085
2168
|
var DimensionsField = () => {
|
|
2086
2169
|
const { isSiteRtl } = useDirection();
|
|
2087
|
-
return /* @__PURE__ */
|
|
2170
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(DimensionField, { side: "inset-block-start", label: __22("Top", "elementor") }), /* @__PURE__ */ React42.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React42.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(DimensionField, { side: "inset-block-end", label: __22("Bottom", "elementor") }), /* @__PURE__ */ React42.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
2088
2171
|
};
|
|
2089
2172
|
var DimensionField = ({ side, label }) => {
|
|
2090
|
-
return /* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ React42.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React42.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(ControlLabel15, null, label)), /* @__PURE__ */ React42.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(StylesField, { bind: side }, /* @__PURE__ */ React42.createElement(SizeControl3, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
2091
2174
|
};
|
|
2092
2175
|
|
|
2093
2176
|
// src/components/style-sections/position-section/position-field.tsx
|
|
2094
|
-
import * as
|
|
2095
|
-
import { ControlLabel as
|
|
2177
|
+
import * as React43 from "react";
|
|
2178
|
+
import { ControlLabel as ControlLabel16, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
2096
2179
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2097
|
-
import { __ as
|
|
2180
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
2098
2181
|
var positionOptions = [
|
|
2099
|
-
{ label:
|
|
2100
|
-
{ label:
|
|
2101
|
-
{ label:
|
|
2102
|
-
{ label:
|
|
2103
|
-
{ label:
|
|
2182
|
+
{ label: __23("Static", "elementor"), value: "static" },
|
|
2183
|
+
{ label: __23("Relative", "elementor"), value: "relative" },
|
|
2184
|
+
{ label: __23("Absolute", "elementor"), value: "absolute" },
|
|
2185
|
+
{ label: __23("Fixed", "elementor"), value: "fixed" },
|
|
2186
|
+
{ label: __23("Sticky", "elementor"), value: "sticky" }
|
|
2104
2187
|
];
|
|
2105
2188
|
var PositionField = ({ onChange }) => {
|
|
2106
|
-
return /* @__PURE__ */
|
|
2189
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React43.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel16, null, __23("Position", "elementor"))), /* @__PURE__ */ React43.createElement(Grid10, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React43.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
2107
2190
|
};
|
|
2108
2191
|
|
|
2109
2192
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
2110
|
-
import * as
|
|
2111
|
-
import { ControlLabel as
|
|
2193
|
+
import * as React44 from "react";
|
|
2194
|
+
import { ControlLabel as ControlLabel17, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
2112
2195
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2113
|
-
import { __ as
|
|
2196
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
2114
2197
|
var ZIndexField = () => {
|
|
2115
|
-
return /* @__PURE__ */
|
|
2198
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React44.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel17, null, __24("Z-index", "elementor"))), /* @__PURE__ */ React44.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(NumberControl3, null))));
|
|
2116
2199
|
};
|
|
2117
2200
|
|
|
2118
2201
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -2144,7 +2227,7 @@ var PositionSection = () => {
|
|
|
2144
2227
|
}
|
|
2145
2228
|
};
|
|
2146
2229
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2147
|
-
return /* @__PURE__ */
|
|
2230
|
+
return /* @__PURE__ */ React45.createElement(SectionContent, null, /* @__PURE__ */ React45.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(DimensionsField, null), /* @__PURE__ */ React45.createElement(ZIndexField, null)) : null);
|
|
2148
2231
|
};
|
|
2149
2232
|
var usePersistDimensions = () => {
|
|
2150
2233
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2154,93 +2237,93 @@ var usePersistDimensions = () => {
|
|
|
2154
2237
|
};
|
|
2155
2238
|
|
|
2156
2239
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2157
|
-
import * as
|
|
2158
|
-
import { ControlLabel as
|
|
2159
|
-
import { Grid as Grid13, Stack as
|
|
2160
|
-
import { __ as
|
|
2240
|
+
import * as React47 from "react";
|
|
2241
|
+
import { ControlLabel as ControlLabel19, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
2242
|
+
import { Grid as Grid13, Stack as Stack12 } from "@elementor/ui";
|
|
2243
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
2161
2244
|
|
|
2162
2245
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2163
|
-
import * as
|
|
2164
|
-
import { ControlLabel as
|
|
2246
|
+
import * as React46 from "react";
|
|
2247
|
+
import { ControlLabel as ControlLabel18, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
2165
2248
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
2166
2249
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
2167
|
-
import { __ as
|
|
2168
|
-
var
|
|
2250
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
2251
|
+
var options7 = [
|
|
2169
2252
|
{
|
|
2170
2253
|
value: "visible",
|
|
2171
|
-
label:
|
|
2172
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2254
|
+
label: __25("Visible", "elementor"),
|
|
2255
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(EyeIcon, { fontSize: size }),
|
|
2173
2256
|
showTooltip: true
|
|
2174
2257
|
},
|
|
2175
2258
|
{
|
|
2176
2259
|
value: "hidden",
|
|
2177
|
-
label:
|
|
2178
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2260
|
+
label: __25("Hidden", "elementor"),
|
|
2261
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(EyeOffIcon, { fontSize: size }),
|
|
2179
2262
|
showTooltip: true
|
|
2180
2263
|
},
|
|
2181
2264
|
{
|
|
2182
2265
|
value: "auto",
|
|
2183
|
-
label:
|
|
2184
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2266
|
+
label: __25("Auto", "elementor"),
|
|
2267
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(LetterAIcon, { fontSize: size }),
|
|
2185
2268
|
showTooltip: true
|
|
2186
2269
|
}
|
|
2187
2270
|
];
|
|
2188
2271
|
var OverflowField = () => {
|
|
2189
|
-
return /* @__PURE__ */
|
|
2272
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React46.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel18, null, __25("Overflow", "elementor"))), /* @__PURE__ */ React46.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React46.createElement(ToggleControl8, { options: options7 }))));
|
|
2190
2273
|
};
|
|
2191
2274
|
|
|
2192
2275
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2193
2276
|
var SizeSection = () => {
|
|
2194
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SizeField, { bind: "width", label: __26("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SizeField, { bind: "height", label: __26("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React47.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(
|
|
2195
2278
|
SizeField,
|
|
2196
2279
|
{
|
|
2197
2280
|
bind: "min-width",
|
|
2198
|
-
label:
|
|
2281
|
+
label: __26("Min width", "elementor"),
|
|
2199
2282
|
extendedValues: ["auto"]
|
|
2200
2283
|
}
|
|
2201
|
-
)), /* @__PURE__ */
|
|
2284
|
+
)), /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(
|
|
2202
2285
|
SizeField,
|
|
2203
2286
|
{
|
|
2204
2287
|
bind: "min-height",
|
|
2205
|
-
label:
|
|
2288
|
+
label: __26("Min height", "elementor"),
|
|
2206
2289
|
extendedValues: ["auto"]
|
|
2207
2290
|
}
|
|
2208
|
-
))), /* @__PURE__ */
|
|
2291
|
+
))), /* @__PURE__ */ React47.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SizeField, { bind: "max-width", label: __26("Max width", "elementor") })), /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SizeField, { bind: "max-height", label: __26("Max height", "elementor") }))), /* @__PURE__ */ React47.createElement(PanelDivider, null), /* @__PURE__ */ React47.createElement(Stack12, null, /* @__PURE__ */ React47.createElement(OverflowField, null)));
|
|
2209
2292
|
};
|
|
2210
2293
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2211
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind }, /* @__PURE__ */ React47.createElement(Grid13, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(ControlLabel19, null, label)), /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(SizeControl4, { extendedValues }))));
|
|
2212
2295
|
};
|
|
2213
2296
|
|
|
2214
2297
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2215
|
-
import * as
|
|
2298
|
+
import * as React48 from "react";
|
|
2216
2299
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
2217
|
-
import { __ as
|
|
2300
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
2218
2301
|
var SpacingSection = () => {
|
|
2219
2302
|
const { isSiteRtl } = useDirection();
|
|
2220
|
-
return /* @__PURE__ */
|
|
2303
|
+
return /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React48.createElement(
|
|
2221
2304
|
LinkedDimensionsControl,
|
|
2222
2305
|
{
|
|
2223
|
-
label:
|
|
2306
|
+
label: __27("Margin", "elementor"),
|
|
2224
2307
|
isSiteRtl,
|
|
2225
2308
|
extendedValues: ["auto"]
|
|
2226
2309
|
}
|
|
2227
|
-
)), /* @__PURE__ */
|
|
2310
|
+
)), /* @__PURE__ */ React48.createElement(PanelDivider, null), /* @__PURE__ */ React48.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React48.createElement(LinkedDimensionsControl, { label: __27("Padding", "elementor"), isSiteRtl })));
|
|
2228
2311
|
};
|
|
2229
2312
|
|
|
2230
2313
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2231
|
-
import * as
|
|
2314
|
+
import * as React63 from "react";
|
|
2232
2315
|
|
|
2233
2316
|
// src/components/collapsible-content.tsx
|
|
2234
|
-
import * as
|
|
2317
|
+
import * as React49 from "react";
|
|
2235
2318
|
import { useState as useState6 } from "react";
|
|
2236
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
2237
|
-
import { __ as
|
|
2319
|
+
import { Button, Collapse as Collapse3, Stack as Stack13 } from "@elementor/ui";
|
|
2320
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
2238
2321
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2239
2322
|
const [open, setOpen] = useState6(defaultOpen);
|
|
2240
2323
|
const handleToggle = () => {
|
|
2241
2324
|
setOpen((prevOpen) => !prevOpen);
|
|
2242
2325
|
};
|
|
2243
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ React49.createElement(Stack13, null, /* @__PURE__ */ React49.createElement(
|
|
2244
2327
|
Button,
|
|
2245
2328
|
{
|
|
2246
2329
|
fullWidth: true,
|
|
@@ -2248,22 +2331,22 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
2248
2331
|
color: "secondary",
|
|
2249
2332
|
variant: "outlined",
|
|
2250
2333
|
onClick: handleToggle,
|
|
2251
|
-
endIcon: /* @__PURE__ */
|
|
2334
|
+
endIcon: /* @__PURE__ */ React49.createElement(CollapseIcon, { open }),
|
|
2252
2335
|
sx: { my: 0.5 }
|
|
2253
2336
|
},
|
|
2254
|
-
open ?
|
|
2255
|
-
), /* @__PURE__ */
|
|
2337
|
+
open ? __28("Show less", "elementor") : __28("Show more", "elementor")
|
|
2338
|
+
), /* @__PURE__ */ React49.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2256
2339
|
};
|
|
2257
2340
|
|
|
2258
2341
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2259
|
-
import * as
|
|
2260
|
-
import { ControlLabel as
|
|
2342
|
+
import * as React50 from "react";
|
|
2343
|
+
import { ControlLabel as ControlLabel20, FontFamilyControl } from "@elementor/editor-controls";
|
|
2261
2344
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
2262
|
-
import { __ as
|
|
2345
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
2263
2346
|
|
|
2264
2347
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2265
2348
|
import { useMemo as useMemo3 } from "react";
|
|
2266
|
-
import { __ as
|
|
2349
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
2267
2350
|
|
|
2268
2351
|
// src/sync/get-elementor-config.ts
|
|
2269
2352
|
var getElementorConfig = () => {
|
|
@@ -2273,17 +2356,17 @@ var getElementorConfig = () => {
|
|
|
2273
2356
|
|
|
2274
2357
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2275
2358
|
var supportedCategories = {
|
|
2276
|
-
system:
|
|
2277
|
-
custom:
|
|
2278
|
-
googlefonts:
|
|
2359
|
+
system: __29("System", "elementor"),
|
|
2360
|
+
custom: __29("Custom Fonts", "elementor"),
|
|
2361
|
+
googlefonts: __29("Google Fonts", "elementor")
|
|
2279
2362
|
};
|
|
2280
2363
|
var getFontFamilies = () => {
|
|
2281
2364
|
const { controls } = getElementorConfig();
|
|
2282
|
-
const
|
|
2283
|
-
if (!
|
|
2365
|
+
const options13 = controls?.font?.options;
|
|
2366
|
+
if (!options13) {
|
|
2284
2367
|
return null;
|
|
2285
2368
|
}
|
|
2286
|
-
return
|
|
2369
|
+
return options13;
|
|
2287
2370
|
};
|
|
2288
2371
|
var useFontFamilies = () => {
|
|
2289
2372
|
const fontFamilies = getFontFamilies();
|
|
@@ -2312,188 +2395,188 @@ var FontFamilyField = () => {
|
|
|
2312
2395
|
if (fontFamilies.length === 0) {
|
|
2313
2396
|
return null;
|
|
2314
2397
|
}
|
|
2315
|
-
return /* @__PURE__ */
|
|
2398
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React50.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel20, null, __30("Font family", "elementor"))), /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React50.createElement(FontFamilyControl, { fontFamilies }))));
|
|
2316
2399
|
};
|
|
2317
2400
|
|
|
2318
2401
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2319
|
-
import * as
|
|
2320
|
-
import { ControlLabel as
|
|
2402
|
+
import * as React51 from "react";
|
|
2403
|
+
import { ControlLabel as ControlLabel21, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
2321
2404
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
2322
|
-
import { __ as
|
|
2405
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
2323
2406
|
var FontSizeField = () => {
|
|
2324
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React51.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel21, null, __31("Font size", "elementor"))), /* @__PURE__ */ React51.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(SizeControl5, null))));
|
|
2325
2408
|
};
|
|
2326
2409
|
|
|
2327
2410
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2328
|
-
import * as
|
|
2329
|
-
import { ControlLabel as
|
|
2411
|
+
import * as React52 from "react";
|
|
2412
|
+
import { ControlLabel as ControlLabel22, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2330
2413
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
2331
2414
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
2332
|
-
import { __ as
|
|
2333
|
-
var
|
|
2415
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
2416
|
+
var options8 = [
|
|
2334
2417
|
{
|
|
2335
2418
|
value: "normal",
|
|
2336
|
-
label:
|
|
2337
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2419
|
+
label: __32("Normal", "elementor"),
|
|
2420
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(MinusIcon2, { fontSize: size }),
|
|
2338
2421
|
showTooltip: true
|
|
2339
2422
|
},
|
|
2340
2423
|
{
|
|
2341
2424
|
value: "italic",
|
|
2342
|
-
label:
|
|
2343
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2425
|
+
label: __32("Italic", "elementor"),
|
|
2426
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ItalicIcon, { fontSize: size }),
|
|
2344
2427
|
showTooltip: true
|
|
2345
2428
|
}
|
|
2346
2429
|
];
|
|
2347
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2430
|
+
var FontStyleField = () => /* @__PURE__ */ React52.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React52.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel22, null, __32("Font style", "elementor"))), /* @__PURE__ */ React52.createElement(Grid16, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(ToggleControl9, { options: options8 }))));
|
|
2348
2431
|
|
|
2349
2432
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2350
|
-
import * as
|
|
2351
|
-
import { ControlLabel as
|
|
2433
|
+
import * as React53 from "react";
|
|
2434
|
+
import { ControlLabel as ControlLabel23, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
2352
2435
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
2353
|
-
import { __ as
|
|
2436
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
2354
2437
|
var fontWeightOptions = [
|
|
2355
|
-
{ value: "100", label:
|
|
2356
|
-
{ value: "200", label:
|
|
2357
|
-
{ value: "300", label:
|
|
2358
|
-
{ value: "400", label:
|
|
2359
|
-
{ value: "500", label:
|
|
2360
|
-
{ value: "600", label:
|
|
2361
|
-
{ value: "700", label:
|
|
2362
|
-
{ value: "800", label:
|
|
2363
|
-
{ value: "900", label:
|
|
2438
|
+
{ value: "100", label: __33("100 - Thin", "elementor") },
|
|
2439
|
+
{ value: "200", label: __33("200 - Extra light", "elementor") },
|
|
2440
|
+
{ value: "300", label: __33("300 - Light", "elementor") },
|
|
2441
|
+
{ value: "400", label: __33("400 - Normal", "elementor") },
|
|
2442
|
+
{ value: "500", label: __33("500 - Medium", "elementor") },
|
|
2443
|
+
{ value: "600", label: __33("600 - Semi bold", "elementor") },
|
|
2444
|
+
{ value: "700", label: __33("700 - Bold", "elementor") },
|
|
2445
|
+
{ value: "800", label: __33("800 - Extra bold", "elementor") },
|
|
2446
|
+
{ value: "900", label: __33("900 - Black", "elementor") }
|
|
2364
2447
|
];
|
|
2365
2448
|
var FontWeightField = () => {
|
|
2366
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React53.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel23, null, __33("Font weight", "elementor"))), /* @__PURE__ */ React53.createElement(Grid17, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
2367
2450
|
};
|
|
2368
2451
|
|
|
2369
2452
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2370
|
-
import * as
|
|
2371
|
-
import { ControlLabel as
|
|
2453
|
+
import * as React54 from "react";
|
|
2454
|
+
import { ControlLabel as ControlLabel24, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
2372
2455
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
2373
|
-
import { __ as
|
|
2456
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
2374
2457
|
var LetterSpacingField = () => {
|
|
2375
|
-
return /* @__PURE__ */
|
|
2458
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React54.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel24, null, __34("Letter spacing", "elementor"))), /* @__PURE__ */ React54.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeControl6, null))));
|
|
2376
2459
|
};
|
|
2377
2460
|
|
|
2378
2461
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2379
|
-
import * as
|
|
2380
|
-
import { ControlLabel as
|
|
2462
|
+
import * as React55 from "react";
|
|
2463
|
+
import { ControlLabel as ControlLabel25, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
2381
2464
|
import { Grid as Grid19 } from "@elementor/ui";
|
|
2382
|
-
import { __ as
|
|
2465
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2383
2466
|
var LineHeightField = () => {
|
|
2384
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React55.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel25, null, __35("Line height", "elementor"))), /* @__PURE__ */ React55.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeControl7, null))));
|
|
2385
2468
|
};
|
|
2386
2469
|
|
|
2387
2470
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2388
|
-
import * as
|
|
2389
|
-
import { ControlLabel as
|
|
2471
|
+
import * as React56 from "react";
|
|
2472
|
+
import { ControlLabel as ControlLabel26, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2390
2473
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
2391
|
-
import { Grid as Grid20, withDirection as
|
|
2392
|
-
import { __ as
|
|
2393
|
-
var
|
|
2394
|
-
var
|
|
2395
|
-
var
|
|
2474
|
+
import { Grid as Grid20, withDirection as withDirection9 } from "@elementor/ui";
|
|
2475
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2476
|
+
var StartIcon5 = withDirection9(AlignLeftIcon);
|
|
2477
|
+
var EndIcon5 = withDirection9(AlignRightIcon);
|
|
2478
|
+
var options9 = [
|
|
2396
2479
|
{
|
|
2397
2480
|
value: "start",
|
|
2398
|
-
label:
|
|
2399
|
-
renderContent: () => /* @__PURE__ */
|
|
2481
|
+
label: __36("Start", "elementor"),
|
|
2482
|
+
renderContent: () => /* @__PURE__ */ React56.createElement(RotatedIcon, { icon: StartIcon5, size: "tiny" }),
|
|
2400
2483
|
showTooltip: true
|
|
2401
2484
|
},
|
|
2402
2485
|
{
|
|
2403
2486
|
value: "center",
|
|
2404
|
-
label:
|
|
2405
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2487
|
+
label: __36("Center", "elementor"),
|
|
2488
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(AlignCenterIcon, { fontSize: size }),
|
|
2406
2489
|
showTooltip: true
|
|
2407
2490
|
},
|
|
2408
2491
|
{
|
|
2409
2492
|
value: "end",
|
|
2410
|
-
label:
|
|
2411
|
-
renderContent: () => /* @__PURE__ */
|
|
2493
|
+
label: __36("End", "elementor"),
|
|
2494
|
+
renderContent: () => /* @__PURE__ */ React56.createElement(RotatedIcon, { icon: EndIcon5, size: "tiny" }),
|
|
2412
2495
|
showTooltip: true
|
|
2413
2496
|
},
|
|
2414
2497
|
{
|
|
2415
2498
|
value: "justify",
|
|
2416
|
-
label:
|
|
2417
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2499
|
+
label: __36("Justify", "elementor"),
|
|
2500
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2418
2501
|
showTooltip: true
|
|
2419
2502
|
}
|
|
2420
2503
|
];
|
|
2421
2504
|
var TextAlignmentField = () => {
|
|
2422
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React56.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel26, null, __36("Alignment", "elementor"))), /* @__PURE__ */ React56.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React56.createElement(ToggleControl10, { options: options9 }))));
|
|
2423
2506
|
};
|
|
2424
2507
|
|
|
2425
2508
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2426
|
-
import * as
|
|
2427
|
-
import { ColorControl as ColorControl2, ControlLabel as
|
|
2509
|
+
import * as React57 from "react";
|
|
2510
|
+
import { ColorControl as ColorControl2, ControlLabel as ControlLabel27 } from "@elementor/editor-controls";
|
|
2428
2511
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
2429
|
-
import { __ as
|
|
2512
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
2430
2513
|
var TextColorField = () => {
|
|
2431
|
-
return /* @__PURE__ */
|
|
2514
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React57.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel27, null, __37("Text color", "elementor"))), /* @__PURE__ */ React57.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ColorControl2, null))));
|
|
2432
2515
|
};
|
|
2433
2516
|
|
|
2434
2517
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2435
|
-
import * as
|
|
2436
|
-
import { ControlLabel as
|
|
2518
|
+
import * as React58 from "react";
|
|
2519
|
+
import { ControlLabel as ControlLabel28, ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
2437
2520
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2438
2521
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
2439
|
-
import { __ as
|
|
2440
|
-
var
|
|
2522
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
2523
|
+
var options10 = [
|
|
2441
2524
|
{
|
|
2442
2525
|
value: "none",
|
|
2443
|
-
label:
|
|
2444
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2526
|
+
label: __38("None", "elementor"),
|
|
2527
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(MinusIcon3, { fontSize: size }),
|
|
2445
2528
|
showTooltip: true,
|
|
2446
2529
|
exclusive: true
|
|
2447
2530
|
},
|
|
2448
2531
|
{
|
|
2449
2532
|
value: "underline",
|
|
2450
|
-
label:
|
|
2451
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2533
|
+
label: __38("Underline", "elementor"),
|
|
2534
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(UnderlineIcon, { fontSize: size }),
|
|
2452
2535
|
showTooltip: true
|
|
2453
2536
|
},
|
|
2454
2537
|
{
|
|
2455
2538
|
value: "line-through",
|
|
2456
|
-
label:
|
|
2457
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2539
|
+
label: __38("Line-through", "elementor"),
|
|
2540
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(StrikethroughIcon, { fontSize: size }),
|
|
2458
2541
|
showTooltip: true
|
|
2459
2542
|
},
|
|
2460
2543
|
{
|
|
2461
2544
|
value: "overline",
|
|
2462
|
-
label:
|
|
2463
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2545
|
+
label: __38("Overline", "elementor"),
|
|
2546
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(OverlineIcon, { fontSize: size }),
|
|
2464
2547
|
showTooltip: true
|
|
2465
2548
|
}
|
|
2466
2549
|
];
|
|
2467
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
2550
|
+
var TextDecorationField = () => /* @__PURE__ */ React58.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React58.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel28, null, __38("Line decoration", "elementor"))), /* @__PURE__ */ React58.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React58.createElement(ToggleControl11, { options: options10, exclusive: false }))));
|
|
2468
2551
|
|
|
2469
2552
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2470
|
-
import * as
|
|
2471
|
-
import { ControlLabel as
|
|
2553
|
+
import * as React59 from "react";
|
|
2554
|
+
import { ControlLabel as ControlLabel29, ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
2472
2555
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2473
2556
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
2474
|
-
import { __ as
|
|
2475
|
-
var
|
|
2557
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
2558
|
+
var options11 = [
|
|
2476
2559
|
{
|
|
2477
2560
|
value: "ltr",
|
|
2478
|
-
label:
|
|
2479
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2561
|
+
label: __39("Left to right", "elementor"),
|
|
2562
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
2480
2563
|
showTooltip: true
|
|
2481
2564
|
},
|
|
2482
2565
|
{
|
|
2483
2566
|
value: "rtl",
|
|
2484
|
-
label:
|
|
2485
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2567
|
+
label: __39("Right to left", "elementor"),
|
|
2568
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
2486
2569
|
showTooltip: true
|
|
2487
2570
|
}
|
|
2488
2571
|
];
|
|
2489
2572
|
var TextDirectionField = () => {
|
|
2490
|
-
return /* @__PURE__ */
|
|
2573
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React59.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel29, null, __39("Direction", "elementor"))), /* @__PURE__ */ React59.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(ToggleControl12, { options: options11 }))));
|
|
2491
2574
|
};
|
|
2492
2575
|
|
|
2493
2576
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2494
|
-
import * as
|
|
2577
|
+
import * as React60 from "react";
|
|
2495
2578
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
2496
|
-
import { __ as
|
|
2579
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
2497
2580
|
var initTextStroke = {
|
|
2498
2581
|
$$type: "stroke",
|
|
2499
2582
|
value: {
|
|
@@ -2519,64 +2602,64 @@ var TextStrokeField = () => {
|
|
|
2519
2602
|
setTextStroke(null);
|
|
2520
2603
|
};
|
|
2521
2604
|
const hasTextStroke = Boolean(textStroke);
|
|
2522
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ React60.createElement(
|
|
2523
2606
|
AddOrRemoveContent,
|
|
2524
2607
|
{
|
|
2525
|
-
label:
|
|
2608
|
+
label: __40("Text stroke", "elementor"),
|
|
2526
2609
|
isAdded: hasTextStroke,
|
|
2527
2610
|
onAdd: addTextStroke,
|
|
2528
2611
|
onRemove: removeTextStroke
|
|
2529
2612
|
},
|
|
2530
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ React60.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React60.createElement(StrokeControl, null))
|
|
2531
2614
|
);
|
|
2532
2615
|
};
|
|
2533
2616
|
|
|
2534
2617
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2535
|
-
import * as
|
|
2536
|
-
import { ControlLabel as
|
|
2618
|
+
import * as React61 from "react";
|
|
2619
|
+
import { ControlLabel as ControlLabel30, ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
2537
2620
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
2538
2621
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
2539
|
-
import { __ as
|
|
2540
|
-
var
|
|
2622
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
2623
|
+
var options12 = [
|
|
2541
2624
|
{
|
|
2542
2625
|
value: "none",
|
|
2543
|
-
label:
|
|
2544
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2626
|
+
label: __41("None", "elementor"),
|
|
2627
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(MinusIcon4, { fontSize: size }),
|
|
2545
2628
|
showTooltip: true
|
|
2546
2629
|
},
|
|
2547
2630
|
{
|
|
2548
2631
|
value: "capitalize",
|
|
2549
|
-
label:
|
|
2550
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2632
|
+
label: __41("Capitalize", "elementor"),
|
|
2633
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2551
2634
|
showTooltip: true
|
|
2552
2635
|
},
|
|
2553
2636
|
{
|
|
2554
2637
|
value: "uppercase",
|
|
2555
|
-
label:
|
|
2556
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2638
|
+
label: __41("Uppercase", "elementor"),
|
|
2639
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2557
2640
|
showTooltip: true
|
|
2558
2641
|
},
|
|
2559
2642
|
{
|
|
2560
2643
|
value: "lowercase",
|
|
2561
|
-
label:
|
|
2562
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2644
|
+
label: __41("Lowercase", "elementor"),
|
|
2645
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2563
2646
|
showTooltip: true
|
|
2564
2647
|
}
|
|
2565
2648
|
];
|
|
2566
|
-
var TransformField = () => /* @__PURE__ */
|
|
2649
|
+
var TransformField = () => /* @__PURE__ */ React61.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React61.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel30, null, __41("Text transform", "elementor"))), /* @__PURE__ */ React61.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React61.createElement(ToggleControl13, { options: options12 }))));
|
|
2567
2650
|
|
|
2568
2651
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2569
|
-
import * as
|
|
2570
|
-
import { ControlLabel as
|
|
2652
|
+
import * as React62 from "react";
|
|
2653
|
+
import { ControlLabel as ControlLabel31, SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
2571
2654
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
2572
|
-
import { __ as
|
|
2655
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
2573
2656
|
var WordSpacingField = () => {
|
|
2574
|
-
return /* @__PURE__ */
|
|
2657
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React62.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel31, null, __42("Word spacing", "elementor"))), /* @__PURE__ */ React62.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(SizeControl8, null))));
|
|
2575
2658
|
};
|
|
2576
2659
|
|
|
2577
2660
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2578
2661
|
var TypographySection = () => {
|
|
2579
|
-
return /* @__PURE__ */
|
|
2662
|
+
return /* @__PURE__ */ React63.createElement(SectionContent, null, /* @__PURE__ */ React63.createElement(FontFamilyField, null), /* @__PURE__ */ React63.createElement(FontWeightField, null), /* @__PURE__ */ React63.createElement(FontSizeField, null), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(TextAlignmentField, null), /* @__PURE__ */ React63.createElement(TextColorField, null), /* @__PURE__ */ React63.createElement(CollapsibleContent, null, /* @__PURE__ */ React63.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React63.createElement(LineHeightField, null), /* @__PURE__ */ React63.createElement(LetterSpacingField, null), /* @__PURE__ */ React63.createElement(WordSpacingField, null), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(TextDecorationField, null), /* @__PURE__ */ React63.createElement(TransformField, null), /* @__PURE__ */ React63.createElement(TextDirectionField, null), /* @__PURE__ */ React63.createElement(FontStyleField, null), /* @__PURE__ */ React63.createElement(TextStrokeField, null))));
|
|
2580
2663
|
};
|
|
2581
2664
|
|
|
2582
2665
|
// src/components/style-tab.tsx
|
|
@@ -2585,7 +2668,7 @@ var StyleTab = () => {
|
|
|
2585
2668
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2586
2669
|
const [activeStyleState, setActiveStyleState] = useState7(null);
|
|
2587
2670
|
const breakpoint = useActiveBreakpoint();
|
|
2588
|
-
return /* @__PURE__ */
|
|
2671
|
+
return /* @__PURE__ */ React64.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React64.createElement(
|
|
2589
2672
|
StyleProvider,
|
|
2590
2673
|
{
|
|
2591
2674
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2596,7 +2679,7 @@ var StyleTab = () => {
|
|
|
2596
2679
|
},
|
|
2597
2680
|
setMetaState: setActiveStyleState
|
|
2598
2681
|
},
|
|
2599
|
-
/* @__PURE__ */
|
|
2682
|
+
/* @__PURE__ */ React64.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React64.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React64.createElement(CssClassSelector, null), /* @__PURE__ */ React64.createElement(Divider4, null), /* @__PURE__ */ React64.createElement(SectionsList, null, /* @__PURE__ */ React64.createElement(Section, { title: __43("Layout", "elementor") }, /* @__PURE__ */ React64.createElement(LayoutSection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Spacing", "elementor") }, /* @__PURE__ */ React64.createElement(SpacingSection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Size", "elementor") }, /* @__PURE__ */ React64.createElement(SizeSection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Position", "elementor") }, /* @__PURE__ */ React64.createElement(PositionSection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Typography", "elementor") }, /* @__PURE__ */ React64.createElement(TypographySection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Background", "elementor") }, /* @__PURE__ */ React64.createElement(BackgroundSection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Border", "elementor") }, /* @__PURE__ */ React64.createElement(BorderSection, null)), /* @__PURE__ */ React64.createElement(Section, { title: __43("Effects", "elementor") }, /* @__PURE__ */ React64.createElement(EffectsSection, null)))))
|
|
2600
2683
|
));
|
|
2601
2684
|
};
|
|
2602
2685
|
function useActiveStyleDefId(currentClassesProp) {
|
|
@@ -2628,7 +2711,7 @@ var EditingPanelTabs = () => {
|
|
|
2628
2711
|
return (
|
|
2629
2712
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2630
2713
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2631
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ React65.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React65.createElement(Stack14, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React65.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React65.createElement(Tab, { label: __44("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React65.createElement(Tab, { label: __44("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React65.createElement(Divider5, null), /* @__PURE__ */ React65.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React65.createElement(SettingsTab, null)), /* @__PURE__ */ React65.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React65.createElement(StyleTab, null))))
|
|
2632
2715
|
);
|
|
2633
2716
|
};
|
|
2634
2717
|
|
|
@@ -2641,8 +2724,8 @@ var EditingPanel = () => {
|
|
|
2641
2724
|
if (!element || !elementType) {
|
|
2642
2725
|
return null;
|
|
2643
2726
|
}
|
|
2644
|
-
const panelTitle =
|
|
2645
|
-
return /* @__PURE__ */
|
|
2727
|
+
const panelTitle = __45("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2728
|
+
return /* @__PURE__ */ React66.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React66.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React66.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React66.createElement(Panel, null, /* @__PURE__ */ React66.createElement(PanelHeader, null, /* @__PURE__ */ React66.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React66.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React66.createElement(PanelBody, null, /* @__PURE__ */ React66.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React66.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React66.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React66.createElement(EditingPanelTabs, null))))))));
|
|
2646
2729
|
};
|
|
2647
2730
|
|
|
2648
2731
|
// src/panel.ts
|
|
@@ -2691,9 +2774,9 @@ var EditingPanelHooks = () => {
|
|
|
2691
2774
|
};
|
|
2692
2775
|
|
|
2693
2776
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2694
|
-
import * as
|
|
2777
|
+
import * as React70 from "react";
|
|
2695
2778
|
import { useId as useId4 } from "react";
|
|
2696
|
-
import { ControlLabel as
|
|
2779
|
+
import { ControlLabel as ControlLabel32, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2697
2780
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2698
2781
|
import {
|
|
2699
2782
|
bindPopover as bindPopover2,
|
|
@@ -2704,7 +2787,7 @@ import {
|
|
|
2704
2787
|
IconButton as IconButton3,
|
|
2705
2788
|
Paper,
|
|
2706
2789
|
Popover as Popover2,
|
|
2707
|
-
Stack as
|
|
2790
|
+
Stack as Stack17,
|
|
2708
2791
|
Tab as Tab2,
|
|
2709
2792
|
TabPanel as TabPanel2,
|
|
2710
2793
|
Tabs as Tabs2,
|
|
@@ -2713,12 +2796,12 @@ import {
|
|
|
2713
2796
|
usePopupState as usePopupState3,
|
|
2714
2797
|
useTabs as useTabs2
|
|
2715
2798
|
} from "@elementor/ui";
|
|
2716
|
-
import { __ as
|
|
2799
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
2717
2800
|
|
|
2718
2801
|
// src/components/popover-content.tsx
|
|
2719
|
-
import * as
|
|
2720
|
-
import { Stack as
|
|
2721
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
2802
|
+
import * as React67 from "react";
|
|
2803
|
+
import { Stack as Stack15 } from "@elementor/ui";
|
|
2804
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React67.createElement(Stack15, { alignItems, gap, p }, children);
|
|
2722
2805
|
|
|
2723
2806
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2724
2807
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -2729,7 +2812,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2729
2812
|
};
|
|
2730
2813
|
|
|
2731
2814
|
// src/dynamics/dynamic-control.tsx
|
|
2732
|
-
import * as
|
|
2815
|
+
import * as React68 from "react";
|
|
2733
2816
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2734
2817
|
|
|
2735
2818
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -2831,11 +2914,11 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2831
2914
|
});
|
|
2832
2915
|
};
|
|
2833
2916
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2834
|
-
return /* @__PURE__ */
|
|
2917
|
+
return /* @__PURE__ */ React68.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React68.createElement(PropKeyProvider3, { bind }, children));
|
|
2835
2918
|
};
|
|
2836
2919
|
|
|
2837
2920
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2838
|
-
import * as
|
|
2921
|
+
import * as React69 from "react";
|
|
2839
2922
|
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2840
2923
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2841
2924
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
@@ -2847,11 +2930,11 @@ import {
|
|
|
2847
2930
|
ListSubheader as ListSubheader2,
|
|
2848
2931
|
MenuItem as MenuItem2,
|
|
2849
2932
|
MenuList,
|
|
2850
|
-
Stack as
|
|
2933
|
+
Stack as Stack16,
|
|
2851
2934
|
TextField as TextField2,
|
|
2852
2935
|
Typography as Typography4
|
|
2853
2936
|
} from "@elementor/ui";
|
|
2854
|
-
import { __ as
|
|
2937
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
2855
2938
|
var SIZE3 = "tiny";
|
|
2856
2939
|
var DynamicSelection = ({ onSelect }) => {
|
|
2857
2940
|
const [searchValue, setSearchValue] = useState8("");
|
|
@@ -2860,8 +2943,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2860
2943
|
const { bind, value: dynamicValue, setValue } = useBoundProp4(dynamicPropTypeUtil);
|
|
2861
2944
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2862
2945
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2863
|
-
const
|
|
2864
|
-
const hasNoDynamicTags = !
|
|
2946
|
+
const options13 = useFilteredOptions(searchValue);
|
|
2947
|
+
const hasNoDynamicTags = !options13.length && !searchValue.trim();
|
|
2865
2948
|
const handleSearch = (event) => {
|
|
2866
2949
|
setSearchValue(event.target.value);
|
|
2867
2950
|
};
|
|
@@ -2872,19 +2955,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2872
2955
|
setValue({ name: value, settings: {} });
|
|
2873
2956
|
onSelect?.();
|
|
2874
2957
|
};
|
|
2875
|
-
return /* @__PURE__ */
|
|
2958
|
+
return /* @__PURE__ */ React69.createElement(Stack16, null, hasNoDynamicTags ? /* @__PURE__ */ React69.createElement(NoDynamicTags, null) : /* @__PURE__ */ React69.createElement(Fragment9, null, /* @__PURE__ */ React69.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React69.createElement(
|
|
2876
2959
|
TextField2,
|
|
2877
2960
|
{
|
|
2878
2961
|
fullWidth: true,
|
|
2879
2962
|
size: SIZE3,
|
|
2880
2963
|
value: searchValue,
|
|
2881
2964
|
onChange: handleSearch,
|
|
2882
|
-
placeholder:
|
|
2965
|
+
placeholder: __46("Search dynamic tags\u2026", "elementor"),
|
|
2883
2966
|
InputProps: {
|
|
2884
|
-
startAdornment: /* @__PURE__ */
|
|
2967
|
+
startAdornment: /* @__PURE__ */ React69.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React69.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2885
2968
|
}
|
|
2886
2969
|
}
|
|
2887
|
-
)), /* @__PURE__ */
|
|
2970
|
+
)), /* @__PURE__ */ React69.createElement(Divider6, null), /* @__PURE__ */ React69.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options13.length > 0 ? /* @__PURE__ */ React69.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options13.map(([category, items3], index) => /* @__PURE__ */ React69.createElement(Fragment9, { key: index }, /* @__PURE__ */ React69.createElement(
|
|
2888
2971
|
ListSubheader2,
|
|
2889
2972
|
{
|
|
2890
2973
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -2892,7 +2975,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2892
2975
|
dynamicGroups?.[category]?.title || category
|
|
2893
2976
|
), items3.map(({ value, label: tagLabel }) => {
|
|
2894
2977
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2895
|
-
return /* @__PURE__ */
|
|
2978
|
+
return /* @__PURE__ */ React69.createElement(
|
|
2896
2979
|
MenuItem2,
|
|
2897
2980
|
{
|
|
2898
2981
|
key: value,
|
|
@@ -2903,10 +2986,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2903
2986
|
},
|
|
2904
2987
|
tagLabel
|
|
2905
2988
|
);
|
|
2906
|
-
})))) : /* @__PURE__ */
|
|
2989
|
+
})))) : /* @__PURE__ */ React69.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
2907
2990
|
};
|
|
2908
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
2909
|
-
|
|
2991
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React69.createElement(
|
|
2992
|
+
Stack16,
|
|
2910
2993
|
{
|
|
2911
2994
|
gap: 1,
|
|
2912
2995
|
alignItems: "center",
|
|
@@ -2916,12 +2999,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React68.createElem
|
|
|
2916
2999
|
color: "text.secondary",
|
|
2917
3000
|
sx: { pb: 3.5 }
|
|
2918
3001
|
},
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
/* @__PURE__ */
|
|
2921
|
-
/* @__PURE__ */
|
|
3002
|
+
/* @__PURE__ */ React69.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3003
|
+
/* @__PURE__ */ React69.createElement(Typography4, { align: "center", variant: "subtitle2" }, __46("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React69.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3004
|
+
/* @__PURE__ */ React69.createElement(Typography4, { align: "center", variant: "caption" }, __46("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React69.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __46("Clear & try again", "elementor")))
|
|
2922
3005
|
);
|
|
2923
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
2924
|
-
|
|
3006
|
+
var NoDynamicTags = () => /* @__PURE__ */ React69.createElement(Box4, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React69.createElement(Divider6, null), /* @__PURE__ */ React69.createElement(
|
|
3007
|
+
Stack16,
|
|
2925
3008
|
{
|
|
2926
3009
|
gap: 1,
|
|
2927
3010
|
alignItems: "center",
|
|
@@ -2931,13 +3014,13 @@ var NoDynamicTags = () => /* @__PURE__ */ React68.createElement(Box4, { sx: { ov
|
|
|
2931
3014
|
color: "text.secondary",
|
|
2932
3015
|
sx: { pb: 3.5 }
|
|
2933
3016
|
},
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
3017
|
+
/* @__PURE__ */ React69.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3018
|
+
/* @__PURE__ */ React69.createElement(Typography4, { align: "center", variant: "subtitle2" }, __46("Streamline your workflow with dynamic tags", "elementor")),
|
|
3019
|
+
/* @__PURE__ */ React69.createElement(Typography4, { align: "center", variant: "caption" }, __46("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
2937
3020
|
));
|
|
2938
3021
|
var useFilteredOptions = (searchValue) => {
|
|
2939
3022
|
const dynamicTags = usePropDynamicTags();
|
|
2940
|
-
const
|
|
3023
|
+
const options13 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
2941
3024
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
2942
3025
|
if (!isVisible) {
|
|
2943
3026
|
return categories;
|
|
@@ -2948,7 +3031,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
2948
3031
|
categories.get(group)?.push({ label, value: name });
|
|
2949
3032
|
return categories;
|
|
2950
3033
|
}, /* @__PURE__ */ new Map());
|
|
2951
|
-
return [...
|
|
3034
|
+
return [...options13];
|
|
2952
3035
|
};
|
|
2953
3036
|
|
|
2954
3037
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
@@ -2967,25 +3050,25 @@ var DynamicSelectionControl = () => {
|
|
|
2967
3050
|
if (!dynamicTag) {
|
|
2968
3051
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2969
3052
|
}
|
|
2970
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ React70.createElement(Box5, null, /* @__PURE__ */ React70.createElement(
|
|
2971
3054
|
Tag,
|
|
2972
3055
|
{
|
|
2973
3056
|
fullWidth: true,
|
|
2974
3057
|
showActionsOnHover: true,
|
|
2975
3058
|
label: dynamicTag.label,
|
|
2976
|
-
startIcon: /* @__PURE__ */
|
|
3059
|
+
startIcon: /* @__PURE__ */ React70.createElement(DatabaseIcon2, { fontSize: SIZE4 }),
|
|
2977
3060
|
...bindTrigger2(selectionPopoverState),
|
|
2978
|
-
actions: /* @__PURE__ */
|
|
3061
|
+
actions: /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React70.createElement(
|
|
2979
3062
|
IconButton3,
|
|
2980
3063
|
{
|
|
2981
3064
|
size: SIZE4,
|
|
2982
3065
|
onClick: removeDynamicTag,
|
|
2983
|
-
"aria-label":
|
|
3066
|
+
"aria-label": __47("Remove dynamic value", "elementor")
|
|
2984
3067
|
},
|
|
2985
|
-
/* @__PURE__ */
|
|
3068
|
+
/* @__PURE__ */ React70.createElement(XIcon2, { fontSize: SIZE4 })
|
|
2986
3069
|
))
|
|
2987
3070
|
}
|
|
2988
|
-
), /* @__PURE__ */
|
|
3071
|
+
), /* @__PURE__ */ React70.createElement(
|
|
2989
3072
|
Popover2,
|
|
2990
3073
|
{
|
|
2991
3074
|
disablePortal: true,
|
|
@@ -2993,7 +3076,7 @@ var DynamicSelectionControl = () => {
|
|
|
2993
3076
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2994
3077
|
...bindPopover2(selectionPopoverState)
|
|
2995
3078
|
},
|
|
2996
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ React70.createElement(Stack17, null, /* @__PURE__ */ React70.createElement(Stack17, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React70.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React70.createElement(Typography5, { variant: "subtitle2" }, __47("Dynamic tags", "elementor")), /* @__PURE__ */ React70.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React70.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React70.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2997
3080
|
));
|
|
2998
3081
|
};
|
|
2999
3082
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -3003,22 +3086,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
3003
3086
|
if (!hasDynamicSettings) {
|
|
3004
3087
|
return null;
|
|
3005
3088
|
}
|
|
3006
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
3007
3090
|
IconButton3,
|
|
3008
3091
|
{
|
|
3009
3092
|
size: SIZE4,
|
|
3010
3093
|
...bindTrigger2(settingsPopupState),
|
|
3011
|
-
"aria-label":
|
|
3094
|
+
"aria-label": __47("Settings", "elementor")
|
|
3012
3095
|
},
|
|
3013
|
-
/* @__PURE__ */
|
|
3014
|
-
), /* @__PURE__ */
|
|
3096
|
+
/* @__PURE__ */ React70.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
3097
|
+
), /* @__PURE__ */ React70.createElement(
|
|
3015
3098
|
Popover2,
|
|
3016
3099
|
{
|
|
3017
3100
|
disableScrollLock: true,
|
|
3018
3101
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3019
3102
|
...bindPopover2(settingsPopupState)
|
|
3020
3103
|
},
|
|
3021
|
-
/* @__PURE__ */
|
|
3104
|
+
/* @__PURE__ */ React70.createElement(Paper, { component: Stack17, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React70.createElement(Stack17, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React70.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React70.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React70.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React70.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React70.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3022
3105
|
));
|
|
3023
3106
|
};
|
|
3024
3107
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -3027,10 +3110,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
3027
3110
|
if (!tabs.length) {
|
|
3028
3111
|
return null;
|
|
3029
3112
|
}
|
|
3030
|
-
return /* @__PURE__ */
|
|
3031
|
-
return /* @__PURE__ */
|
|
3113
|
+
return /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React70.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React70.createElement(Divider7, null), tabs.map(({ value }, index) => {
|
|
3114
|
+
return /* @__PURE__ */ React70.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React70.createElement(PopoverContent, { p: 1.5 }, value.items.map((item) => {
|
|
3032
3115
|
if (item.type === "control") {
|
|
3033
|
-
return /* @__PURE__ */
|
|
3116
|
+
return /* @__PURE__ */ React70.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3034
3117
|
}
|
|
3035
3118
|
return null;
|
|
3036
3119
|
})));
|
|
@@ -3040,22 +3123,22 @@ var Control3 = ({ control }) => {
|
|
|
3040
3123
|
if (!getControlByType(control.type)) {
|
|
3041
3124
|
return null;
|
|
3042
3125
|
}
|
|
3043
|
-
return /* @__PURE__ */
|
|
3126
|
+
return /* @__PURE__ */ React70.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React70.createElement(Grid26, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React70.createElement(Grid26, { item: true, xs: 12 }, /* @__PURE__ */ React70.createElement(ControlLabel32, null, control.label)) : null, /* @__PURE__ */ React70.createElement(Grid26, { item: true, xs: 12 }, /* @__PURE__ */ React70.createElement(Control, { type: control.type, props: control.props }))));
|
|
3044
3127
|
};
|
|
3045
3128
|
|
|
3046
3129
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3047
|
-
import * as
|
|
3130
|
+
import * as React71 from "react";
|
|
3048
3131
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
3049
3132
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
3050
|
-
import { __ as
|
|
3133
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
3051
3134
|
var usePropDynamicAction = () => {
|
|
3052
3135
|
const { propType } = useBoundProp6();
|
|
3053
3136
|
const visible = !!propType && supportsDynamic(propType);
|
|
3054
3137
|
return {
|
|
3055
3138
|
visible,
|
|
3056
3139
|
icon: DatabaseIcon3,
|
|
3057
|
-
title:
|
|
3058
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3140
|
+
title: __48("Dynamic tags", "elementor"),
|
|
3141
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React71.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3059
3142
|
};
|
|
3060
3143
|
};
|
|
3061
3144
|
|