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