@elementor/editor-editing-panel 1.4.1 → 1.5.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 +19 -0
- package/dist/index.js +487 -470
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +416 -399
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/conditional-tooltip-wrapper.tsx +13 -7
- package/src/components/css-class-selector.tsx +1 -3
- package/src/components/style-sections/background-section/background-section.tsx +4 -9
- package/src/components/style-sections/layout-section/layout-section.tsx +12 -0
- package/src/dynamics/dynamic-control.tsx +2 -3
- package/src/hooks/use-computed-style.ts +29 -0
- package/src/components/style-sections/background-section/background-color-field.tsx +0 -21
package/dist/index.mjs
CHANGED
|
@@ -19,12 +19,12 @@ import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/edi
|
|
|
19
19
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
20
20
|
|
|
21
21
|
// src/components/editing-panel.tsx
|
|
22
|
-
import * as
|
|
22
|
+
import * as React59 from "react";
|
|
23
23
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
24
24
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
25
25
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
26
26
|
import { ErrorBoundary } from "@elementor/ui";
|
|
27
|
-
import { __ as
|
|
27
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
28
28
|
|
|
29
29
|
// src/contexts/element-context.tsx
|
|
30
30
|
import * as React from "react";
|
|
@@ -95,10 +95,10 @@ function EditorPanelErrorFallback() {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// src/components/editing-panel-tabs.tsx
|
|
98
|
-
import * as
|
|
98
|
+
import * as React58 from "react";
|
|
99
99
|
import { Fragment as Fragment7 } from "react";
|
|
100
|
-
import { Divider as Divider8, Stack as
|
|
101
|
-
import { __ as
|
|
100
|
+
import { Divider as Divider8, Stack as Stack19, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
101
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
102
102
|
|
|
103
103
|
// src/components/settings-tab.tsx
|
|
104
104
|
import * as React9 from "react";
|
|
@@ -258,12 +258,12 @@ var Control2 = ({ control }) => {
|
|
|
258
258
|
};
|
|
259
259
|
|
|
260
260
|
// src/components/style-tab.tsx
|
|
261
|
-
import * as
|
|
261
|
+
import * as React57 from "react";
|
|
262
262
|
import { useState as useState7 } from "react";
|
|
263
263
|
import { useElementSetting as useElementSetting3, useElementStyles } from "@elementor/editor-elements";
|
|
264
264
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
265
265
|
import { Divider as Divider7 } from "@elementor/ui";
|
|
266
|
-
import { __ as
|
|
266
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
267
267
|
|
|
268
268
|
// src/contexts/classes-prop-context.tsx
|
|
269
269
|
import * as React10 from "react";
|
|
@@ -324,19 +324,18 @@ var ConditionalTooltipWrapper = ({ maxWidth, title }) => {
|
|
|
324
324
|
};
|
|
325
325
|
}, []);
|
|
326
326
|
if (isOverflown) {
|
|
327
|
-
return /* @__PURE__ */ React12.createElement(Tooltip2, { title, placement: "top" }, /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title
|
|
327
|
+
return /* @__PURE__ */ React12.createElement(Tooltip2, { title, placement: "top" }, /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef }, title));
|
|
328
328
|
}
|
|
329
|
-
return /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title
|
|
329
|
+
return /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef }, title);
|
|
330
330
|
};
|
|
331
|
-
var Content = React12.forwardRef(({ maxWidth,
|
|
331
|
+
var Content = React12.forwardRef(({ maxWidth, ...tooltipProps }, ref) => /* @__PURE__ */ React12.createElement(
|
|
332
332
|
Box3,
|
|
333
333
|
{
|
|
334
334
|
ref,
|
|
335
335
|
position: "relative",
|
|
336
336
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth },
|
|
337
|
-
...
|
|
338
|
-
}
|
|
339
|
-
title
|
|
337
|
+
...tooltipProps
|
|
338
|
+
}
|
|
340
339
|
));
|
|
341
340
|
|
|
342
341
|
// src/components/multi-combobox/multi-combobox.tsx
|
|
@@ -542,7 +541,7 @@ function useOptions() {
|
|
|
542
541
|
});
|
|
543
542
|
}
|
|
544
543
|
function useAppliedOptions(options10, appliedIds) {
|
|
545
|
-
const applied =
|
|
544
|
+
const applied = options10.filter((option) => appliedIds.includes(option.value));
|
|
546
545
|
const hasElementsProviderStyleApplied = applied.some(
|
|
547
546
|
(option) => option.provider === ELEMENTS_STYLES_PROVIDER_KEY
|
|
548
547
|
);
|
|
@@ -587,9 +586,8 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
587
586
|
}
|
|
588
587
|
|
|
589
588
|
// src/components/style-sections/background-section/background-section.tsx
|
|
590
|
-
import * as
|
|
591
|
-
import {
|
|
592
|
-
import { Stack as Stack4 } from "@elementor/ui";
|
|
589
|
+
import * as React16 from "react";
|
|
590
|
+
import { BackgroundControl } from "@elementor/editor-controls";
|
|
593
591
|
|
|
594
592
|
// src/controls-registry/styles-field.tsx
|
|
595
593
|
import * as React15 from "react";
|
|
@@ -639,37 +637,28 @@ var StylesField = ({ bind, children }) => {
|
|
|
639
637
|
return /* @__PURE__ */ React15.createElement(BoundPropProvider2, { setValue, value, bind }, children);
|
|
640
638
|
};
|
|
641
639
|
|
|
642
|
-
// src/components/style-sections/background-section/background-color-field.tsx
|
|
643
|
-
import * as React16 from "react";
|
|
644
|
-
import { ColorControl, ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
645
|
-
import { Grid } from "@elementor/ui";
|
|
646
|
-
import { __ as __3 } from "@wordpress/i18n";
|
|
647
|
-
var BackgroundColorField = () => {
|
|
648
|
-
return /* @__PURE__ */ React16.createElement(StylesField, { bind: "background-color" }, /* @__PURE__ */ React16.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React16.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(ControlLabel2, null, __3("Color", "elementor"))), /* @__PURE__ */ React16.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(ColorControl, null))));
|
|
649
|
-
};
|
|
650
|
-
|
|
651
640
|
// src/components/style-sections/background-section/background-section.tsx
|
|
652
641
|
var BackgroundSection = () => {
|
|
653
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ React16.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React16.createElement(BackgroundControl, null));
|
|
654
643
|
};
|
|
655
644
|
|
|
656
645
|
// src/components/style-sections/border-section/border-section.tsx
|
|
657
|
-
import * as
|
|
658
|
-
import { Divider as Divider2, Stack as
|
|
646
|
+
import * as React23 from "react";
|
|
647
|
+
import { Divider as Divider2, Stack as Stack5 } from "@elementor/ui";
|
|
659
648
|
|
|
660
649
|
// src/components/style-sections/border-section/border-field.tsx
|
|
661
|
-
import * as
|
|
662
|
-
import { __ as
|
|
650
|
+
import * as React21 from "react";
|
|
651
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
663
652
|
|
|
664
653
|
// src/components/add-or-remove-content.tsx
|
|
665
|
-
import * as
|
|
666
|
-
import { ControlLabel as
|
|
654
|
+
import * as React17 from "react";
|
|
655
|
+
import { ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
667
656
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
668
|
-
import { Collapse as Collapse2, IconButton as IconButton2, Stack as
|
|
657
|
+
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack4 } from "@elementor/ui";
|
|
669
658
|
var SIZE2 = "tiny";
|
|
670
659
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
671
|
-
return /* @__PURE__ */
|
|
672
|
-
|
|
660
|
+
return /* @__PURE__ */ React17.createElement(Stack4, { gap: 1.5 }, /* @__PURE__ */ React17.createElement(
|
|
661
|
+
Stack4,
|
|
673
662
|
{
|
|
674
663
|
direction: "row",
|
|
675
664
|
sx: {
|
|
@@ -677,75 +666,75 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
677
666
|
alignItems: "center"
|
|
678
667
|
}
|
|
679
668
|
},
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
isAdded ? /* @__PURE__ */
|
|
682
|
-
), /* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ React17.createElement(ControlLabel2, null, label),
|
|
670
|
+
isAdded ? /* @__PURE__ */ React17.createElement(IconButton2, { size: SIZE2, onClick: onRemove }, /* @__PURE__ */ React17.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React17.createElement(IconButton2, { size: SIZE2, onClick: onAdd }, /* @__PURE__ */ React17.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
671
|
+
), /* @__PURE__ */ React17.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React17.createElement(Stack4, { gap: 1.5 }, children)));
|
|
683
672
|
};
|
|
684
673
|
|
|
685
674
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
686
|
-
import * as
|
|
687
|
-
import { ColorControl
|
|
688
|
-
import { Grid
|
|
689
|
-
import { __ as
|
|
675
|
+
import * as React18 from "react";
|
|
676
|
+
import { ColorControl, ControlLabel as ControlLabel3 } from "@elementor/editor-controls";
|
|
677
|
+
import { Grid } from "@elementor/ui";
|
|
678
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
690
679
|
var BorderColorField = () => {
|
|
691
|
-
return /* @__PURE__ */
|
|
680
|
+
return /* @__PURE__ */ React18.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React18.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React18.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React18.createElement(ControlLabel3, null, __3("Border Color", "elementor"))), /* @__PURE__ */ React18.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React18.createElement(ColorControl, null))));
|
|
692
681
|
};
|
|
693
682
|
|
|
694
683
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
695
|
-
import * as
|
|
696
|
-
import { ControlLabel as
|
|
697
|
-
import { Grid as
|
|
698
|
-
import { __ as
|
|
684
|
+
import * as React19 from "react";
|
|
685
|
+
import { ControlLabel as ControlLabel4, SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
686
|
+
import { Grid as Grid2 } from "@elementor/ui";
|
|
687
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
699
688
|
var borderStyles = [
|
|
700
|
-
{ value: "none", label:
|
|
701
|
-
{ value: "solid", label:
|
|
702
|
-
{ value: "dashed", label:
|
|
703
|
-
{ value: "dotted", label:
|
|
704
|
-
{ value: "double", label:
|
|
705
|
-
{ value: "groove", label:
|
|
706
|
-
{ value: "ridge", label:
|
|
707
|
-
{ value: "inset", label:
|
|
708
|
-
{ value: "outset", label:
|
|
689
|
+
{ value: "none", label: __4("None", "elementor") },
|
|
690
|
+
{ value: "solid", label: __4("Solid", "elementor") },
|
|
691
|
+
{ value: "dashed", label: __4("Dashed", "elementor") },
|
|
692
|
+
{ value: "dotted", label: __4("Dotted", "elementor") },
|
|
693
|
+
{ value: "double", label: __4("Double", "elementor") },
|
|
694
|
+
{ value: "groove", label: __4("Groove", "elementor") },
|
|
695
|
+
{ value: "ridge", label: __4("Ridge", "elementor") },
|
|
696
|
+
{ value: "inset", label: __4("Inset", "elementor") },
|
|
697
|
+
{ value: "outset", label: __4("Outset", "elementor") }
|
|
709
698
|
];
|
|
710
699
|
var BorderStyleField = () => {
|
|
711
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React19.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlLabel4, null, __4("Border Type", "elementor"))), /* @__PURE__ */ React19.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(SelectControl2, { options: borderStyles }))));
|
|
712
701
|
};
|
|
713
702
|
|
|
714
703
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
715
|
-
import * as
|
|
704
|
+
import * as React20 from "react";
|
|
716
705
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
717
706
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
718
707
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
719
|
-
import { __ as
|
|
708
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
720
709
|
var edges = [
|
|
721
710
|
{
|
|
722
|
-
label:
|
|
723
|
-
icon: /* @__PURE__ */
|
|
711
|
+
label: __5("Top", "elementor"),
|
|
712
|
+
icon: /* @__PURE__ */ React20.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
724
713
|
bind: "top"
|
|
725
714
|
},
|
|
726
715
|
{
|
|
727
|
-
label:
|
|
728
|
-
icon: /* @__PURE__ */
|
|
716
|
+
label: __5("Right", "elementor"),
|
|
717
|
+
icon: /* @__PURE__ */ React20.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
729
718
|
bind: "right"
|
|
730
719
|
},
|
|
731
720
|
{
|
|
732
|
-
label:
|
|
733
|
-
icon: /* @__PURE__ */
|
|
721
|
+
label: __5("Bottom", "elementor"),
|
|
722
|
+
icon: /* @__PURE__ */ React20.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
734
723
|
bind: "bottom"
|
|
735
724
|
},
|
|
736
725
|
{
|
|
737
|
-
label:
|
|
738
|
-
icon: /* @__PURE__ */
|
|
726
|
+
label: __5("Left", "elementor"),
|
|
727
|
+
icon: /* @__PURE__ */ React20.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
739
728
|
bind: "left"
|
|
740
729
|
}
|
|
741
730
|
];
|
|
742
731
|
var BorderWidthField = () => {
|
|
743
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React20.createElement(
|
|
744
733
|
EqualUnequalSizesControl,
|
|
745
734
|
{
|
|
746
735
|
items: edges,
|
|
747
|
-
label:
|
|
748
|
-
icon: /* @__PURE__ */
|
|
736
|
+
label: __5("Border Width", "elementor"),
|
|
737
|
+
icon: /* @__PURE__ */ React20.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
749
738
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
750
739
|
}
|
|
751
740
|
));
|
|
@@ -774,22 +763,22 @@ var BorderField = () => {
|
|
|
774
763
|
setBorderStyle(null);
|
|
775
764
|
};
|
|
776
765
|
const hasBorder = Boolean(borderWidth || borderColor || borderStyle);
|
|
777
|
-
return /* @__PURE__ */
|
|
766
|
+
return /* @__PURE__ */ React21.createElement(
|
|
778
767
|
AddOrRemoveContent,
|
|
779
768
|
{
|
|
780
|
-
label:
|
|
769
|
+
label: __6("Border", "elementor"),
|
|
781
770
|
isAdded: hasBorder,
|
|
782
771
|
onAdd: addBorder,
|
|
783
772
|
onRemove: removeBorder
|
|
784
773
|
},
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ React21.createElement(BorderWidthField, null),
|
|
775
|
+
/* @__PURE__ */ React21.createElement(BorderColorField, null),
|
|
776
|
+
/* @__PURE__ */ React21.createElement(BorderStyleField, null)
|
|
788
777
|
);
|
|
789
778
|
};
|
|
790
779
|
|
|
791
780
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
792
|
-
import * as
|
|
781
|
+
import * as React22 from "react";
|
|
793
782
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
794
783
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
795
784
|
import {
|
|
@@ -799,69 +788,95 @@ import {
|
|
|
799
788
|
RadiusTopLeftIcon,
|
|
800
789
|
RadiusTopRightIcon
|
|
801
790
|
} from "@elementor/icons";
|
|
802
|
-
import { __ as
|
|
791
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
803
792
|
var corners = [
|
|
804
793
|
{
|
|
805
|
-
label:
|
|
806
|
-
icon: /* @__PURE__ */
|
|
794
|
+
label: __7("Top Left", "elementor"),
|
|
795
|
+
icon: /* @__PURE__ */ React22.createElement(RadiusTopLeftIcon, { fontSize: "tiny" }),
|
|
807
796
|
bind: "top-left"
|
|
808
797
|
},
|
|
809
798
|
{
|
|
810
|
-
label:
|
|
811
|
-
icon: /* @__PURE__ */
|
|
799
|
+
label: __7("Top Right", "elementor"),
|
|
800
|
+
icon: /* @__PURE__ */ React22.createElement(RadiusTopRightIcon, { fontSize: "tiny" }),
|
|
812
801
|
bind: "top-right"
|
|
813
802
|
},
|
|
814
803
|
{
|
|
815
|
-
label:
|
|
816
|
-
icon: /* @__PURE__ */
|
|
804
|
+
label: __7("Bottom Right", "elementor"),
|
|
805
|
+
icon: /* @__PURE__ */ React22.createElement(RadiusBottomRightIcon, { fontSize: "tiny" }),
|
|
817
806
|
bind: "bottom-right"
|
|
818
807
|
},
|
|
819
808
|
{
|
|
820
|
-
label:
|
|
821
|
-
icon: /* @__PURE__ */
|
|
809
|
+
label: __7("Bottom Left", "elementor"),
|
|
810
|
+
icon: /* @__PURE__ */ React22.createElement(RadiusBottomLeftIcon, { fontSize: "tiny" }),
|
|
822
811
|
bind: "bottom-left"
|
|
823
812
|
}
|
|
824
813
|
];
|
|
825
814
|
var BorderRadiusField = () => {
|
|
826
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ React22.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React22.createElement(
|
|
827
816
|
EqualUnequalSizesControl2,
|
|
828
817
|
{
|
|
829
818
|
items: corners,
|
|
830
|
-
label:
|
|
831
|
-
icon: /* @__PURE__ */
|
|
819
|
+
label: __7("Border Radius", "elementor"),
|
|
820
|
+
icon: /* @__PURE__ */ React22.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
832
821
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
833
822
|
}
|
|
834
823
|
));
|
|
835
824
|
};
|
|
836
825
|
|
|
837
826
|
// src/components/style-sections/border-section/border-section.tsx
|
|
838
|
-
var BorderSection = () => /* @__PURE__ */
|
|
827
|
+
var BorderSection = () => /* @__PURE__ */ React23.createElement(Stack5, { gap: 1.5 }, /* @__PURE__ */ React23.createElement(BorderRadiusField, null), /* @__PURE__ */ React23.createElement(Divider2, null), /* @__PURE__ */ React23.createElement(BorderField, null));
|
|
839
828
|
|
|
840
829
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
841
|
-
import * as
|
|
830
|
+
import * as React24 from "react";
|
|
842
831
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
843
|
-
import { Stack as
|
|
832
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
844
833
|
var EffectsSection = () => {
|
|
845
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ React24.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React24.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React24.createElement(BoxShadowRepeaterControl, null)));
|
|
846
835
|
};
|
|
847
836
|
|
|
848
837
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
849
|
-
import * as
|
|
850
|
-
import { ControlLabel as
|
|
851
|
-
import {
|
|
852
|
-
import {
|
|
838
|
+
import * as React35 from "react";
|
|
839
|
+
import { ControlLabel as ControlLabel13 } from "@elementor/editor-controls";
|
|
840
|
+
import { useParentElement } from "@elementor/editor-elements";
|
|
841
|
+
import { Divider as Divider3, Stack as Stack12 } from "@elementor/ui";
|
|
842
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
843
|
+
|
|
844
|
+
// src/hooks/use-computed-style.ts
|
|
845
|
+
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
846
|
+
function useComputedStyle(elementId) {
|
|
847
|
+
return useListenTo(
|
|
848
|
+
[
|
|
849
|
+
windowEvent("elementor/device-mode/change"),
|
|
850
|
+
commandEndEvent("document/elements/reset-style"),
|
|
851
|
+
commandEndEvent("document/elements/settings"),
|
|
852
|
+
commandEndEvent("document/elements/paste-style")
|
|
853
|
+
],
|
|
854
|
+
() => {
|
|
855
|
+
if (!elementId) {
|
|
856
|
+
return null;
|
|
857
|
+
}
|
|
858
|
+
const extendedWindow = window;
|
|
859
|
+
const element = extendedWindow.elementor?.getContainer?.(elementId);
|
|
860
|
+
if (!element?.view?.el) {
|
|
861
|
+
return null;
|
|
862
|
+
}
|
|
863
|
+
const resp = window.getComputedStyle(element.view.el);
|
|
864
|
+
return resp;
|
|
865
|
+
}
|
|
866
|
+
);
|
|
867
|
+
}
|
|
853
868
|
|
|
854
869
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
855
|
-
import * as
|
|
856
|
-
import { ControlLabel as
|
|
870
|
+
import * as React26 from "react";
|
|
871
|
+
import { ControlLabel as ControlLabel5, ToggleControl } from "@elementor/editor-controls";
|
|
857
872
|
import {
|
|
858
873
|
LayoutAlignCenterIcon as CenterIcon,
|
|
859
874
|
LayoutAlignLeftIcon,
|
|
860
875
|
LayoutAlignRightIcon,
|
|
861
876
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
862
877
|
} from "@elementor/icons";
|
|
863
|
-
import { DirectionProvider, Grid as
|
|
864
|
-
import { __ as
|
|
878
|
+
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection } from "@elementor/ui";
|
|
879
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
865
880
|
|
|
866
881
|
// src/hooks/use-direction.ts
|
|
867
882
|
import { useTheme } from "@elementor/ui";
|
|
@@ -872,7 +887,7 @@ function useDirection() {
|
|
|
872
887
|
}
|
|
873
888
|
|
|
874
889
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
875
|
-
import * as
|
|
890
|
+
import * as React25 from "react";
|
|
876
891
|
import { useRef as useRef2 } from "react";
|
|
877
892
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
878
893
|
var CLOCKWISE_ANGLES = {
|
|
@@ -890,7 +905,7 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
890
905
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
891
906
|
const rotate = useRef2(useGetTargetAngle(isClockwise, offset));
|
|
892
907
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
893
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
894
909
|
};
|
|
895
910
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
896
911
|
const [direction] = useStylesField("flex-direction");
|
|
@@ -914,45 +929,45 @@ var iconProps = {
|
|
|
914
929
|
var options = [
|
|
915
930
|
{
|
|
916
931
|
value: "start",
|
|
917
|
-
label:
|
|
918
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
932
|
+
label: __8("Start", "elementor"),
|
|
933
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
919
934
|
showTooltip: true
|
|
920
935
|
},
|
|
921
936
|
{
|
|
922
937
|
value: "center",
|
|
923
|
-
label:
|
|
924
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
938
|
+
label: __8("Center", "elementor"),
|
|
939
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
925
940
|
showTooltip: true
|
|
926
941
|
},
|
|
927
942
|
{
|
|
928
943
|
value: "end",
|
|
929
|
-
label:
|
|
930
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
944
|
+
label: __8("End", "elementor"),
|
|
945
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
931
946
|
showTooltip: true
|
|
932
947
|
},
|
|
933
948
|
{
|
|
934
949
|
value: "stretch",
|
|
935
|
-
label:
|
|
936
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
950
|
+
label: __8("Stretch", "elementor"),
|
|
951
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps }),
|
|
937
952
|
showTooltip: true
|
|
938
953
|
}
|
|
939
954
|
];
|
|
940
955
|
var AlignItemsField = () => {
|
|
941
956
|
const { isSiteRtl } = useDirection();
|
|
942
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ React26.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React26.createElement(ThemeProvider, null, /* @__PURE__ */ React26.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React26.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel5, null, __8("Align items", "elementor"))), /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React26.createElement(ToggleControl, { options }))))));
|
|
943
958
|
};
|
|
944
959
|
|
|
945
960
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
946
|
-
import * as
|
|
947
|
-
import { ControlLabel as
|
|
961
|
+
import * as React27 from "react";
|
|
962
|
+
import { ControlLabel as ControlLabel6, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
948
963
|
import {
|
|
949
964
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
950
965
|
LayoutAlignLeftIcon as LayoutAlignLeftIcon2,
|
|
951
966
|
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
952
967
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
953
968
|
} from "@elementor/icons";
|
|
954
|
-
import { DirectionProvider as DirectionProvider2, Grid as
|
|
955
|
-
import { __ as
|
|
969
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as withDirection2 } from "@elementor/ui";
|
|
970
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
956
971
|
var StartIcon2 = withDirection2(LayoutAlignLeftIcon2);
|
|
957
972
|
var EndIcon2 = withDirection2(LayoutAlignRightIcon2);
|
|
958
973
|
var iconProps2 = {
|
|
@@ -962,109 +977,109 @@ var iconProps2 = {
|
|
|
962
977
|
var options2 = [
|
|
963
978
|
{
|
|
964
979
|
value: "start",
|
|
965
|
-
label:
|
|
966
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
980
|
+
label: __9("Start", "elementor"),
|
|
981
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
967
982
|
showTooltip: true
|
|
968
983
|
},
|
|
969
984
|
{
|
|
970
985
|
value: "center",
|
|
971
|
-
label:
|
|
972
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
986
|
+
label: __9("Center", "elementor"),
|
|
987
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
973
988
|
showTooltip: true
|
|
974
989
|
},
|
|
975
990
|
{
|
|
976
991
|
value: "end",
|
|
977
|
-
label:
|
|
978
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
992
|
+
label: __9("End", "elementor"),
|
|
993
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
979
994
|
showTooltip: true
|
|
980
995
|
},
|
|
981
996
|
{
|
|
982
997
|
value: "stretch",
|
|
983
|
-
label:
|
|
984
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
998
|
+
label: __9("Stretch", "elementor"),
|
|
999
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps2 }),
|
|
985
1000
|
showTooltip: true
|
|
986
1001
|
}
|
|
987
1002
|
];
|
|
988
1003
|
var AlignSelfChild = () => {
|
|
989
1004
|
const { isSiteRtl } = useDirection();
|
|
990
|
-
return /* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ React27.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(ThemeProvider2, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React27.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(ControlLabel6, null, __9("Align self", "elementor"))), /* @__PURE__ */ React27.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React27.createElement(ToggleControl2, { options: options2 }))))));
|
|
991
1006
|
};
|
|
992
1007
|
|
|
993
1008
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
994
|
-
import * as
|
|
995
|
-
import { ControlLabel as
|
|
996
|
-
import { Stack as
|
|
997
|
-
import { __ as
|
|
1009
|
+
import * as React28 from "react";
|
|
1010
|
+
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1011
|
+
import { Stack as Stack7 } from "@elementor/ui";
|
|
1012
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
998
1013
|
var DisplayField = () => {
|
|
999
1014
|
const options10 = [
|
|
1000
1015
|
{
|
|
1001
1016
|
value: "block",
|
|
1002
|
-
renderContent: () =>
|
|
1003
|
-
label:
|
|
1017
|
+
renderContent: () => __10("Block", "elementor"),
|
|
1018
|
+
label: __10("Block", "elementor")
|
|
1004
1019
|
},
|
|
1005
1020
|
{
|
|
1006
1021
|
value: "flex",
|
|
1007
|
-
renderContent: () =>
|
|
1008
|
-
label:
|
|
1022
|
+
renderContent: () => __10("Flex", "elementor"),
|
|
1023
|
+
label: __10("Flex", "elementor")
|
|
1009
1024
|
}
|
|
1010
1025
|
];
|
|
1011
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ React28.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React28.createElement(Stack7, { gap: 1 }, /* @__PURE__ */ React28.createElement(ControlLabel7, null, __10("Display", "elementor")), /* @__PURE__ */ React28.createElement(ToggleControl3, { options: options10, fullWidth: true })));
|
|
1012
1027
|
};
|
|
1013
1028
|
|
|
1014
1029
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1015
|
-
import * as
|
|
1016
|
-
import { ControlLabel as
|
|
1030
|
+
import * as React29 from "react";
|
|
1031
|
+
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1017
1032
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1018
|
-
import { DirectionProvider as DirectionProvider3, Grid as
|
|
1019
|
-
import { __ as
|
|
1033
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as withDirection3 } from "@elementor/ui";
|
|
1034
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
1020
1035
|
var options3 = [
|
|
1021
1036
|
{
|
|
1022
1037
|
value: "row",
|
|
1023
|
-
label:
|
|
1038
|
+
label: __11("Row", "elementor"),
|
|
1024
1039
|
renderContent: ({ size }) => {
|
|
1025
1040
|
const StartIcon4 = withDirection3(ArrowRightIcon);
|
|
1026
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ React29.createElement(StartIcon4, { fontSize: size });
|
|
1027
1042
|
},
|
|
1028
1043
|
showTooltip: true
|
|
1029
1044
|
},
|
|
1030
1045
|
{
|
|
1031
1046
|
value: "column",
|
|
1032
|
-
label:
|
|
1033
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1047
|
+
label: __11("Column", "elementor"),
|
|
1048
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1034
1049
|
showTooltip: true
|
|
1035
1050
|
},
|
|
1036
1051
|
{
|
|
1037
1052
|
value: "row-reverse",
|
|
1038
|
-
label:
|
|
1053
|
+
label: __11("Reversed row", "elementor"),
|
|
1039
1054
|
renderContent: ({ size }) => {
|
|
1040
1055
|
const EndIcon4 = withDirection3(ArrowLeftIcon);
|
|
1041
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ React29.createElement(EndIcon4, { fontSize: size });
|
|
1042
1057
|
},
|
|
1043
1058
|
showTooltip: true
|
|
1044
1059
|
},
|
|
1045
1060
|
{
|
|
1046
1061
|
value: "column-reverse",
|
|
1047
|
-
label:
|
|
1048
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1062
|
+
label: __11("Reversed column", "elementor"),
|
|
1063
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1049
1064
|
showTooltip: true
|
|
1050
1065
|
}
|
|
1051
1066
|
];
|
|
1052
1067
|
var FlexDirectionField = () => {
|
|
1053
1068
|
const { isSiteRtl } = useDirection();
|
|
1054
|
-
return /* @__PURE__ */
|
|
1069
|
+
return /* @__PURE__ */ React29.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React29.createElement(ThemeProvider3, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React29.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(ControlLabel8, null, __11("Direction", "elementor"))), /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React29.createElement(ToggleControl4, { options: options3 }))))));
|
|
1055
1070
|
};
|
|
1056
1071
|
|
|
1057
1072
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1058
|
-
import * as
|
|
1073
|
+
import * as React30 from "react";
|
|
1059
1074
|
import { useState as useState3 } from "react";
|
|
1060
1075
|
import {
|
|
1061
|
-
ControlLabel as
|
|
1076
|
+
ControlLabel as ControlLabel9,
|
|
1062
1077
|
ControlToggleButtonGroup,
|
|
1063
1078
|
NumberControl
|
|
1064
1079
|
} from "@elementor/editor-controls";
|
|
1065
1080
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
1066
|
-
import { DirectionProvider as DirectionProvider4, Grid as
|
|
1067
|
-
import { __ as
|
|
1081
|
+
import { DirectionProvider as DirectionProvider4, Grid as Grid6, Stack as Stack8, ThemeProvider as ThemeProvider4 } from "@elementor/ui";
|
|
1082
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1068
1083
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1069
1084
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1070
1085
|
var FIRST = "first";
|
|
@@ -1077,20 +1092,20 @@ var orderValueMap = {
|
|
|
1077
1092
|
var items = [
|
|
1078
1093
|
{
|
|
1079
1094
|
value: FIRST,
|
|
1080
|
-
label:
|
|
1081
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1095
|
+
label: __12("First", "elementor"),
|
|
1096
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1082
1097
|
showTooltip: true
|
|
1083
1098
|
},
|
|
1084
1099
|
{
|
|
1085
1100
|
value: LAST,
|
|
1086
|
-
label:
|
|
1087
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1101
|
+
label: __12("Last", "elementor"),
|
|
1102
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1088
1103
|
showTooltip: true
|
|
1089
1104
|
},
|
|
1090
1105
|
{
|
|
1091
1106
|
value: CUSTOM,
|
|
1092
|
-
label:
|
|
1093
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1107
|
+
label: __12("Custom", "elementor"),
|
|
1108
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(PencilIcon, { fontSize: size }),
|
|
1094
1109
|
showTooltip: true
|
|
1095
1110
|
}
|
|
1096
1111
|
];
|
|
@@ -1105,7 +1120,7 @@ var FlexOrderField = () => {
|
|
|
1105
1120
|
}
|
|
1106
1121
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1107
1122
|
};
|
|
1108
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ React30.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(ThemeProvider4, null, /* @__PURE__ */ React30.createElement(Stack8, { gap: 2 }, /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel9, null, __12("Order", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(
|
|
1109
1124
|
ControlToggleButtonGroup,
|
|
1110
1125
|
{
|
|
1111
1126
|
items,
|
|
@@ -1113,7 +1128,7 @@ var FlexOrderField = () => {
|
|
|
1113
1128
|
onChange: handleToggleButtonChange,
|
|
1114
1129
|
exclusive: true
|
|
1115
1130
|
}
|
|
1116
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1131
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React30.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel9, null, __12("Custom order", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(
|
|
1117
1132
|
NumberControl,
|
|
1118
1133
|
{
|
|
1119
1134
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1133,41 +1148,41 @@ var getGroupControlValue = (order) => {
|
|
|
1133
1148
|
};
|
|
1134
1149
|
|
|
1135
1150
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1136
|
-
import * as
|
|
1151
|
+
import * as React31 from "react";
|
|
1137
1152
|
import {
|
|
1138
|
-
ControlLabel as
|
|
1153
|
+
ControlLabel as ControlLabel10,
|
|
1139
1154
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
1140
1155
|
NumberControl as NumberControl2,
|
|
1141
1156
|
SizeControl as SizeControl2
|
|
1142
1157
|
} from "@elementor/editor-controls";
|
|
1143
1158
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
1144
|
-
import { DirectionProvider as DirectionProvider5, Grid as
|
|
1145
|
-
import { __ as
|
|
1159
|
+
import { DirectionProvider as DirectionProvider5, Grid as Grid7, Stack as Stack9, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1160
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1146
1161
|
var DEFAULT = 1;
|
|
1147
1162
|
var items2 = [
|
|
1148
1163
|
{
|
|
1149
1164
|
value: "flex-grow",
|
|
1150
|
-
label:
|
|
1151
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1165
|
+
label: __13("Grow", "elementor"),
|
|
1166
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ExpandIcon, { fontSize: size }),
|
|
1152
1167
|
showTooltip: true
|
|
1153
1168
|
},
|
|
1154
1169
|
{
|
|
1155
1170
|
value: "flex-shrink",
|
|
1156
|
-
label:
|
|
1157
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1171
|
+
label: __13("Shrink", "elementor"),
|
|
1172
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ShrinkIcon, { fontSize: size }),
|
|
1158
1173
|
showTooltip: true
|
|
1159
1174
|
},
|
|
1160
1175
|
{
|
|
1161
1176
|
value: "custom",
|
|
1162
|
-
label:
|
|
1163
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1177
|
+
label: __13("Custom", "elementor"),
|
|
1178
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(PencilIcon2, { fontSize: size }),
|
|
1164
1179
|
showTooltip: true
|
|
1165
1180
|
}
|
|
1166
1181
|
];
|
|
1167
1182
|
var FlexSizeField = () => {
|
|
1168
1183
|
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1169
1184
|
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1170
|
-
const currentGroup =
|
|
1185
|
+
const currentGroup = React31.useMemo(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = React31.useState(currentGroup);
|
|
1171
1186
|
const onChangeGroup = (group = null) => {
|
|
1172
1187
|
setActiveGroup(group);
|
|
1173
1188
|
setBasisField(null);
|
|
@@ -1184,7 +1199,7 @@ var FlexSizeField = () => {
|
|
|
1184
1199
|
setGrowField(null);
|
|
1185
1200
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1186
1201
|
};
|
|
1187
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ React31.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider5, null, /* @__PURE__ */ React31.createElement(Stack9, { gap: 2 }, /* @__PURE__ */ React31.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel10, null, __13("Size", "elementor"))), /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1188
1203
|
ControlToggleButtonGroup2,
|
|
1189
1204
|
{
|
|
1190
1205
|
value: activeGroup,
|
|
@@ -1192,9 +1207,9 @@ var FlexSizeField = () => {
|
|
|
1192
1207
|
items: items2,
|
|
1193
1208
|
exclusive: true
|
|
1194
1209
|
}
|
|
1195
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1210
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React31.createElement(FlexCustomField, null))));
|
|
1196
1211
|
};
|
|
1197
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1212
|
+
var FlexCustomField = () => /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React31.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel10, null, __13("Grow", "elementor"))), /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React31.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel10, null, __13("Shrink", "elementor"))), /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React31.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel10, null, __13("Basis", "elementor"))), /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(SizeControl2, null)))));
|
|
1198
1213
|
var getActiveGroup = ({
|
|
1199
1214
|
grow,
|
|
1200
1215
|
shrink,
|
|
@@ -1216,17 +1231,17 @@ var getActiveGroup = ({
|
|
|
1216
1231
|
};
|
|
1217
1232
|
|
|
1218
1233
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1219
|
-
import * as
|
|
1234
|
+
import * as React32 from "react";
|
|
1220
1235
|
import { GapControl } from "@elementor/editor-controls";
|
|
1221
|
-
import { Stack as
|
|
1222
|
-
import { __ as
|
|
1236
|
+
import { Stack as Stack10 } from "@elementor/ui";
|
|
1237
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1223
1238
|
var GapControlField = () => {
|
|
1224
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ React32.createElement(Stack10, { gap: 1 }, /* @__PURE__ */ React32.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React32.createElement(GapControl, { label: __14("Gaps", "elementor") })));
|
|
1225
1240
|
};
|
|
1226
1241
|
|
|
1227
1242
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1228
|
-
import * as
|
|
1229
|
-
import { ControlLabel as
|
|
1243
|
+
import * as React33 from "react";
|
|
1244
|
+
import { ControlLabel as ControlLabel11, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1230
1245
|
import {
|
|
1231
1246
|
JustifyBottomIcon,
|
|
1232
1247
|
JustifyCenterIcon as CenterIcon3,
|
|
@@ -1235,8 +1250,8 @@ import {
|
|
|
1235
1250
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1236
1251
|
JustifyTopIcon
|
|
1237
1252
|
} from "@elementor/icons";
|
|
1238
|
-
import { DirectionProvider as DirectionProvider6, Stack as
|
|
1239
|
-
import { __ as
|
|
1253
|
+
import { DirectionProvider as DirectionProvider6, Stack as Stack11, ThemeProvider as ThemeProvider6, withDirection as withDirection4 } from "@elementor/ui";
|
|
1254
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1240
1255
|
var StartIcon3 = withDirection4(JustifyTopIcon);
|
|
1241
1256
|
var EndIcon3 = withDirection4(JustifyBottomIcon);
|
|
1242
1257
|
var iconProps3 = {
|
|
@@ -1246,87 +1261,91 @@ var iconProps3 = {
|
|
|
1246
1261
|
var options4 = [
|
|
1247
1262
|
{
|
|
1248
1263
|
value: "start",
|
|
1249
|
-
label:
|
|
1250
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1264
|
+
label: __15("Start", "elementor"),
|
|
1265
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1251
1266
|
showTooltip: true
|
|
1252
1267
|
},
|
|
1253
1268
|
{
|
|
1254
1269
|
value: "center",
|
|
1255
|
-
label:
|
|
1256
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1270
|
+
label: __15("Center", "elementor"),
|
|
1271
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1257
1272
|
showTooltip: true
|
|
1258
1273
|
},
|
|
1259
1274
|
{
|
|
1260
1275
|
value: "end",
|
|
1261
|
-
label:
|
|
1262
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1276
|
+
label: __15("End", "elementor"),
|
|
1277
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1263
1278
|
showTooltip: true
|
|
1264
1279
|
},
|
|
1265
1280
|
{
|
|
1266
1281
|
value: "space-between",
|
|
1267
|
-
label:
|
|
1268
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1282
|
+
label: __15("Space between", "elementor"),
|
|
1283
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps3 }),
|
|
1269
1284
|
showTooltip: true
|
|
1270
1285
|
},
|
|
1271
1286
|
{
|
|
1272
1287
|
value: "space-around",
|
|
1273
|
-
label:
|
|
1274
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1288
|
+
label: __15("Space around", "elementor"),
|
|
1289
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps3 }),
|
|
1275
1290
|
showTooltip: true
|
|
1276
1291
|
},
|
|
1277
1292
|
{
|
|
1278
1293
|
value: "space-evenly",
|
|
1279
|
-
label:
|
|
1280
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1294
|
+
label: __15("Space evenly", "elementor"),
|
|
1295
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps3 }),
|
|
1281
1296
|
showTooltip: true
|
|
1282
1297
|
}
|
|
1283
1298
|
];
|
|
1284
1299
|
var JustifyContentField = () => {
|
|
1285
1300
|
const { isSiteRtl } = useDirection();
|
|
1286
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ React33.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(ThemeProvider6, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React33.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React33.createElement(ControlLabel11, null, __15("Justify content", "elementor")), /* @__PURE__ */ React33.createElement(ToggleControl5, { options: options4, fullWidth: true })))));
|
|
1287
1302
|
};
|
|
1288
1303
|
|
|
1289
1304
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1290
|
-
import * as
|
|
1291
|
-
import { ControlLabel as
|
|
1305
|
+
import * as React34 from "react";
|
|
1306
|
+
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1292
1307
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1293
|
-
import { DirectionProvider as DirectionProvider7, Grid as
|
|
1294
|
-
import { __ as
|
|
1308
|
+
import { DirectionProvider as DirectionProvider7, Grid as Grid8, ThemeProvider as ThemeProvider7 } from "@elementor/ui";
|
|
1309
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1295
1310
|
var options5 = [
|
|
1296
1311
|
{
|
|
1297
1312
|
value: "nowrap",
|
|
1298
|
-
label:
|
|
1299
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1313
|
+
label: __16("No wrap", "elementor"),
|
|
1314
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1300
1315
|
showTooltip: true
|
|
1301
1316
|
},
|
|
1302
1317
|
{
|
|
1303
1318
|
value: "wrap",
|
|
1304
|
-
label:
|
|
1305
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1319
|
+
label: __16("Wrap", "elementor"),
|
|
1320
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1306
1321
|
showTooltip: true
|
|
1307
1322
|
},
|
|
1308
1323
|
{
|
|
1309
1324
|
value: "wrap-reverse",
|
|
1310
|
-
label:
|
|
1311
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1325
|
+
label: __16("Reversed wrap", "elementor"),
|
|
1326
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1312
1327
|
showTooltip: true
|
|
1313
1328
|
}
|
|
1314
1329
|
];
|
|
1315
1330
|
var WrapField = () => {
|
|
1316
1331
|
const { isSiteRtl } = useDirection();
|
|
1317
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider7, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React34.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel12, null, __16("Wrap", "elementor"))), /* @__PURE__ */ React34.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(ToggleControl6, { options: options5 }))))));
|
|
1318
1333
|
};
|
|
1319
1334
|
|
|
1320
1335
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1321
1336
|
var LayoutSection = () => {
|
|
1322
1337
|
const [display] = useStylesField("display");
|
|
1323
|
-
|
|
1338
|
+
const { element } = useElement();
|
|
1339
|
+
const parent = useParentElement(element.id);
|
|
1340
|
+
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1341
|
+
return /* @__PURE__ */ React35.createElement(Stack12, { gap: 2 }, /* @__PURE__ */ React35.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React35.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React35.createElement(FlexChildFields, null));
|
|
1324
1342
|
};
|
|
1325
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1343
|
+
var FlexFields = () => /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(FlexDirectionField, null), /* @__PURE__ */ React35.createElement(JustifyContentField, null), /* @__PURE__ */ React35.createElement(AlignItemsField, null), /* @__PURE__ */ React35.createElement(Divider3, null), /* @__PURE__ */ React35.createElement(GapControlField, null), /* @__PURE__ */ React35.createElement(WrapField, null));
|
|
1344
|
+
var FlexChildFields = () => /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(Divider3, null), /* @__PURE__ */ React35.createElement(ControlLabel13, null, __17("Flex child", "elementor")), /* @__PURE__ */ React35.createElement(AlignSelfChild, null), /* @__PURE__ */ React35.createElement(FlexOrderField, null), /* @__PURE__ */ React35.createElement(FlexSizeField, null));
|
|
1326
1345
|
|
|
1327
1346
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1328
|
-
import * as
|
|
1329
|
-
import { Stack as
|
|
1347
|
+
import * as React39 from "react";
|
|
1348
|
+
import { Stack as Stack14 } from "@elementor/ui";
|
|
1330
1349
|
|
|
1331
1350
|
// src/hooks/use-session-storage.ts
|
|
1332
1351
|
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
@@ -1366,46 +1385,46 @@ var subscribeToSessionStorage = (key, subscriber) => {
|
|
|
1366
1385
|
};
|
|
1367
1386
|
|
|
1368
1387
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1369
|
-
import * as
|
|
1370
|
-
import { ControlLabel as
|
|
1388
|
+
import * as React36 from "react";
|
|
1389
|
+
import { ControlLabel as ControlLabel14, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1371
1390
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1372
|
-
import { Grid as
|
|
1373
|
-
import { __ as
|
|
1391
|
+
import { Grid as Grid9, Stack as Stack13 } from "@elementor/ui";
|
|
1392
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1374
1393
|
var sideIcons = {
|
|
1375
|
-
left: /* @__PURE__ */
|
|
1376
|
-
right: /* @__PURE__ */
|
|
1377
|
-
top: /* @__PURE__ */
|
|
1378
|
-
bottom: /* @__PURE__ */
|
|
1394
|
+
left: /* @__PURE__ */ React36.createElement(SideLeftIcon2, { fontSize: "tiny" }),
|
|
1395
|
+
right: /* @__PURE__ */ React36.createElement(SideRightIcon2, { fontSize: "tiny" }),
|
|
1396
|
+
top: /* @__PURE__ */ React36.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
1397
|
+
bottom: /* @__PURE__ */ React36.createElement(SideBottomIcon2, { fontSize: "tiny" })
|
|
1379
1398
|
};
|
|
1380
1399
|
var DimensionsField = () => {
|
|
1381
|
-
return /* @__PURE__ */
|
|
1400
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Stack13, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(DimensionField, { side: "top", label: __18("Top", "elementor") }), /* @__PURE__ */ React36.createElement(DimensionField, { side: "right", label: __18("Right", "elementor") })), /* @__PURE__ */ React36.createElement(Stack13, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(DimensionField, { side: "bottom", label: __18("Bottom", "elementor") }), /* @__PURE__ */ React36.createElement(DimensionField, { side: "left", label: __18("Left", "elementor") })));
|
|
1382
1401
|
};
|
|
1383
1402
|
var DimensionField = ({ side, label }) => {
|
|
1384
|
-
return /* @__PURE__ */
|
|
1403
|
+
return /* @__PURE__ */ React36.createElement(Grid9, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React36.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(ControlLabel14, null, label)), /* @__PURE__ */ React36.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(StylesField, { bind: side }, /* @__PURE__ */ React36.createElement(SizeControl3, { startIcon: sideIcons[side] }))));
|
|
1385
1404
|
};
|
|
1386
1405
|
|
|
1387
1406
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1388
|
-
import * as
|
|
1389
|
-
import { ControlLabel as
|
|
1390
|
-
import { Grid as
|
|
1391
|
-
import { __ as
|
|
1407
|
+
import * as React37 from "react";
|
|
1408
|
+
import { ControlLabel as ControlLabel15, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1409
|
+
import { Grid as Grid10 } from "@elementor/ui";
|
|
1410
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1392
1411
|
var positionOptions = [
|
|
1393
|
-
{ label:
|
|
1394
|
-
{ label:
|
|
1395
|
-
{ label:
|
|
1396
|
-
{ label:
|
|
1412
|
+
{ label: __19("Static", "elementor"), value: "static" },
|
|
1413
|
+
{ label: __19("Relative", "elementor"), value: "relative" },
|
|
1414
|
+
{ label: __19("Absolute", "elementor"), value: "absolute" },
|
|
1415
|
+
{ label: __19("Fixed", "elementor"), value: "fixed" }
|
|
1397
1416
|
];
|
|
1398
1417
|
var PositionField = ({ onChange }) => {
|
|
1399
|
-
return /* @__PURE__ */
|
|
1418
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React37.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel15, null, __19("Position", "elementor"))), /* @__PURE__ */ React37.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
1400
1419
|
};
|
|
1401
1420
|
|
|
1402
1421
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1403
|
-
import * as
|
|
1404
|
-
import { ControlLabel as
|
|
1405
|
-
import { Grid as
|
|
1406
|
-
import { __ as
|
|
1422
|
+
import * as React38 from "react";
|
|
1423
|
+
import { ControlLabel as ControlLabel16, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
1424
|
+
import { Grid as Grid11 } from "@elementor/ui";
|
|
1425
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1407
1426
|
var ZIndexField = () => {
|
|
1408
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React38.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel16, null, __20("Z-Index", "elementor"))), /* @__PURE__ */ React38.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(NumberControl3, null))));
|
|
1409
1428
|
};
|
|
1410
1429
|
|
|
1411
1430
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1437,7 +1456,7 @@ var PositionSection = () => {
|
|
|
1437
1456
|
}
|
|
1438
1457
|
};
|
|
1439
1458
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1440
|
-
return /* @__PURE__ */
|
|
1459
|
+
return /* @__PURE__ */ React39.createElement(Stack14, { gap: 1.5 }, /* @__PURE__ */ React39.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(DimensionsField, null), /* @__PURE__ */ React39.createElement(ZIndexField, null)) : null);
|
|
1441
1460
|
};
|
|
1442
1461
|
var usePersistDimensions = () => {
|
|
1443
1462
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1447,73 +1466,73 @@ var usePersistDimensions = () => {
|
|
|
1447
1466
|
};
|
|
1448
1467
|
|
|
1449
1468
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1450
|
-
import * as
|
|
1451
|
-
import { ControlLabel as
|
|
1452
|
-
import { Divider as Divider4, Grid as
|
|
1453
|
-
import { __ as
|
|
1469
|
+
import * as React41 from "react";
|
|
1470
|
+
import { ControlLabel as ControlLabel18, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1471
|
+
import { Divider as Divider4, Grid as Grid13, Stack as Stack15 } from "@elementor/ui";
|
|
1472
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1454
1473
|
|
|
1455
1474
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1456
|
-
import * as
|
|
1457
|
-
import { ControlLabel as
|
|
1475
|
+
import * as React40 from "react";
|
|
1476
|
+
import { ControlLabel as ControlLabel17, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1458
1477
|
import { ExpandBottomIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1459
|
-
import { Grid as
|
|
1460
|
-
import { __ as
|
|
1478
|
+
import { Grid as Grid12 } from "@elementor/ui";
|
|
1479
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1461
1480
|
var options6 = [
|
|
1462
1481
|
{
|
|
1463
1482
|
value: "visible",
|
|
1464
|
-
label:
|
|
1465
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1483
|
+
label: __21("Visible", "elementor"),
|
|
1484
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(EyeIcon, { fontSize: size }),
|
|
1466
1485
|
showTooltip: true
|
|
1467
1486
|
},
|
|
1468
1487
|
{
|
|
1469
1488
|
value: "hidden",
|
|
1470
|
-
label:
|
|
1471
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1489
|
+
label: __21("Hidden", "elementor"),
|
|
1490
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(EyeOffIcon, { fontSize: size }),
|
|
1472
1491
|
showTooltip: true
|
|
1473
1492
|
},
|
|
1474
1493
|
{
|
|
1475
1494
|
value: "auto",
|
|
1476
|
-
label:
|
|
1477
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1495
|
+
label: __21("Auto", "elementor"),
|
|
1496
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(ExpandBottomIcon, { fontSize: size }),
|
|
1478
1497
|
showTooltip: true
|
|
1479
1498
|
}
|
|
1480
1499
|
];
|
|
1481
1500
|
var OverflowField = () => {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React40.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel17, null, __21("Overflow", "elementor"))), /* @__PURE__ */ React40.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React40.createElement(ToggleControl7, { options: options6 }))));
|
|
1483
1502
|
};
|
|
1484
1503
|
|
|
1485
1504
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1486
1505
|
var SizeSection = () => {
|
|
1487
|
-
return /* @__PURE__ */
|
|
1506
|
+
return /* @__PURE__ */ React41.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React41.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "width", label: __22("Width", "elementor") })), /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "height", label: __22("Height", "elementor") }))), /* @__PURE__ */ React41.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "min-width", label: __22("Min. Width", "elementor") })), /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "min-height", label: __22("Min. Height", "elementor") }))), /* @__PURE__ */ React41.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "max-width", label: __22("Max. Width", "elementor") })), /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "max-height", label: __22("Max. Height", "elementor") }))), /* @__PURE__ */ React41.createElement(Divider4, null), /* @__PURE__ */ React41.createElement(Stack15, null, /* @__PURE__ */ React41.createElement(OverflowField, null)));
|
|
1488
1507
|
};
|
|
1489
1508
|
var SizeField = ({ label, bind }) => {
|
|
1490
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind }, /* @__PURE__ */ React41.createElement(Grid13, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(ControlLabel18, null, label)), /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(SizeControl4, null))));
|
|
1491
1510
|
};
|
|
1492
1511
|
|
|
1493
1512
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1494
|
-
import * as
|
|
1513
|
+
import * as React42 from "react";
|
|
1495
1514
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1496
|
-
import { Divider as Divider5, Stack as
|
|
1497
|
-
import { __ as
|
|
1515
|
+
import { Divider as Divider5, Stack as Stack16 } from "@elementor/ui";
|
|
1516
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1498
1517
|
var SpacingSection = () => {
|
|
1499
|
-
return /* @__PURE__ */
|
|
1518
|
+
return /* @__PURE__ */ React42.createElement(Stack16, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React42.createElement(LinkedDimensionsControl, { label: __23("Padding", "elementor") })), /* @__PURE__ */ React42.createElement(Divider5, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React42.createElement(LinkedDimensionsControl, { label: __23("Margin", "elementor") })));
|
|
1500
1519
|
};
|
|
1501
1520
|
|
|
1502
1521
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1503
|
-
import * as
|
|
1504
|
-
import { Divider as Divider6, Stack as
|
|
1522
|
+
import * as React56 from "react";
|
|
1523
|
+
import { Divider as Divider6, Stack as Stack18 } from "@elementor/ui";
|
|
1505
1524
|
|
|
1506
1525
|
// src/components/collapsible-content.tsx
|
|
1507
|
-
import * as
|
|
1526
|
+
import * as React43 from "react";
|
|
1508
1527
|
import { useState as useState6 } from "react";
|
|
1509
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
1510
|
-
import { __ as
|
|
1528
|
+
import { Button, Collapse as Collapse3, Stack as Stack17 } from "@elementor/ui";
|
|
1529
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1511
1530
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1512
1531
|
const [open, setOpen] = useState6(defaultOpen);
|
|
1513
1532
|
const handleToggle = () => {
|
|
1514
1533
|
setOpen((prevOpen) => !prevOpen);
|
|
1515
1534
|
};
|
|
1516
|
-
return /* @__PURE__ */
|
|
1535
|
+
return /* @__PURE__ */ React43.createElement(Stack17, { sx: { py: 0.5 } }, /* @__PURE__ */ React43.createElement(
|
|
1517
1536
|
Button,
|
|
1518
1537
|
{
|
|
1519
1538
|
fullWidth: true,
|
|
@@ -1521,17 +1540,17 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1521
1540
|
color: "secondary",
|
|
1522
1541
|
variant: "outlined",
|
|
1523
1542
|
onClick: handleToggle,
|
|
1524
|
-
endIcon: /* @__PURE__ */
|
|
1543
|
+
endIcon: /* @__PURE__ */ React43.createElement(CollapseIcon, { open })
|
|
1525
1544
|
},
|
|
1526
|
-
open ?
|
|
1527
|
-
), /* @__PURE__ */
|
|
1545
|
+
open ? __24("Show less", "elementor") : __24("Show more", "elementor")
|
|
1546
|
+
), /* @__PURE__ */ React43.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1528
1547
|
};
|
|
1529
1548
|
|
|
1530
1549
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1531
|
-
import * as
|
|
1532
|
-
import { ControlLabel as
|
|
1533
|
-
import { Grid as
|
|
1534
|
-
import { __ as
|
|
1550
|
+
import * as React44 from "react";
|
|
1551
|
+
import { ControlLabel as ControlLabel19, FontFamilyControl } from "@elementor/editor-controls";
|
|
1552
|
+
import { Grid as Grid14 } from "@elementor/ui";
|
|
1553
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1535
1554
|
|
|
1536
1555
|
// src/sync/get-elementor-config.ts
|
|
1537
1556
|
var getElementorConfig = () => {
|
|
@@ -1545,7 +1564,7 @@ var FontFamilyField = () => {
|
|
|
1545
1564
|
if (!fontFamilies) {
|
|
1546
1565
|
return null;
|
|
1547
1566
|
}
|
|
1548
|
-
return /* @__PURE__ */
|
|
1567
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React44.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel19, null, __25("Font Family", "elementor"))), /* @__PURE__ */ React44.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(FontFamilyControl, { fontFamilies }))));
|
|
1549
1568
|
};
|
|
1550
1569
|
var getFontFamilies = () => {
|
|
1551
1570
|
const { controls } = getElementorConfig();
|
|
@@ -1557,115 +1576,115 @@ var getFontFamilies = () => {
|
|
|
1557
1576
|
};
|
|
1558
1577
|
|
|
1559
1578
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1560
|
-
import * as
|
|
1561
|
-
import { ControlLabel as
|
|
1562
|
-
import { Grid as
|
|
1563
|
-
import { __ as
|
|
1579
|
+
import * as React45 from "react";
|
|
1580
|
+
import { ControlLabel as ControlLabel20, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
1581
|
+
import { Grid as Grid15 } from "@elementor/ui";
|
|
1582
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1564
1583
|
var FontSizeField = () => {
|
|
1565
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React45.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel20, null, __26("Font Size", "elementor"))), /* @__PURE__ */ React45.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(SizeControl5, null))));
|
|
1566
1585
|
};
|
|
1567
1586
|
|
|
1568
1587
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1569
|
-
import * as
|
|
1570
|
-
import { ControlLabel as
|
|
1571
|
-
import { Grid as
|
|
1572
|
-
import { __ as
|
|
1588
|
+
import * as React46 from "react";
|
|
1589
|
+
import { ControlLabel as ControlLabel21, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
1590
|
+
import { Grid as Grid16 } from "@elementor/ui";
|
|
1591
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1573
1592
|
var fontWeightOptions = [
|
|
1574
|
-
{ label:
|
|
1575
|
-
{ label:
|
|
1576
|
-
{ label:
|
|
1577
|
-
{ label:
|
|
1578
|
-
{ label:
|
|
1593
|
+
{ label: __27("Light - 400", "elementor"), value: "400" },
|
|
1594
|
+
{ label: __27("Regular - 500", "elementor"), value: "500" },
|
|
1595
|
+
{ label: __27("Semi Bold - 600", "elementor"), value: "600" },
|
|
1596
|
+
{ label: __27("Bold - 700", "elementor"), value: "700" },
|
|
1597
|
+
{ label: __27("Black - 900", "elementor"), value: "900" }
|
|
1579
1598
|
];
|
|
1580
1599
|
var FontWeightField = () => {
|
|
1581
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React46.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel21, null, __27("Font Weight", "elementor"))), /* @__PURE__ */ React46.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
1582
1601
|
};
|
|
1583
1602
|
|
|
1584
1603
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1585
|
-
import * as
|
|
1586
|
-
import { ControlLabel as
|
|
1587
|
-
import { Grid as
|
|
1588
|
-
import { __ as
|
|
1604
|
+
import * as React47 from "react";
|
|
1605
|
+
import { ControlLabel as ControlLabel22, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
1606
|
+
import { Grid as Grid17 } from "@elementor/ui";
|
|
1607
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1589
1608
|
var LetterSpacingField = () => {
|
|
1590
|
-
return /* @__PURE__ */
|
|
1609
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React47.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel22, null, __28("Letter Spacing", "elementor"))), /* @__PURE__ */ React47.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SizeControl6, null))));
|
|
1591
1610
|
};
|
|
1592
1611
|
|
|
1593
1612
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1594
|
-
import * as
|
|
1595
|
-
import { ControlLabel as
|
|
1596
|
-
import { Grid as
|
|
1597
|
-
import { __ as
|
|
1613
|
+
import * as React48 from "react";
|
|
1614
|
+
import { ControlLabel as ControlLabel23, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
1615
|
+
import { Grid as Grid18 } from "@elementor/ui";
|
|
1616
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1598
1617
|
var LineHeightField = () => {
|
|
1599
|
-
return /* @__PURE__ */
|
|
1618
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React48.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel23, null, __29("Line Height", "elementor"))), /* @__PURE__ */ React48.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeControl7, null))));
|
|
1600
1619
|
};
|
|
1601
1620
|
|
|
1602
1621
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1603
|
-
import * as
|
|
1604
|
-
import { ControlLabel as
|
|
1622
|
+
import * as React49 from "react";
|
|
1623
|
+
import { ControlLabel as ControlLabel24, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
1605
1624
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
1606
|
-
import { Grid as
|
|
1607
|
-
import { __ as
|
|
1625
|
+
import { Grid as Grid19 } from "@elementor/ui";
|
|
1626
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1608
1627
|
var options7 = [
|
|
1609
1628
|
{
|
|
1610
1629
|
value: "left",
|
|
1611
|
-
label:
|
|
1612
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1630
|
+
label: __30("Left", "elementor"),
|
|
1631
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(AlignLeftIcon, { fontSize: size })
|
|
1613
1632
|
},
|
|
1614
1633
|
{
|
|
1615
1634
|
value: "center",
|
|
1616
|
-
label:
|
|
1617
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1635
|
+
label: __30("Center", "elementor"),
|
|
1636
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(AlignCenterIcon, { fontSize: size })
|
|
1618
1637
|
},
|
|
1619
1638
|
{
|
|
1620
1639
|
value: "right",
|
|
1621
|
-
label:
|
|
1622
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1640
|
+
label: __30("Right", "elementor"),
|
|
1641
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(AlignRightIcon, { fontSize: size })
|
|
1623
1642
|
},
|
|
1624
1643
|
{
|
|
1625
1644
|
value: "justify",
|
|
1626
|
-
label:
|
|
1627
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1645
|
+
label: __30("Justify", "elementor"),
|
|
1646
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(AlignJustifiedIcon, { fontSize: size })
|
|
1628
1647
|
}
|
|
1629
1648
|
];
|
|
1630
1649
|
var TextAlignmentField = () => {
|
|
1631
|
-
return /* @__PURE__ */
|
|
1650
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React49.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel24, null, __30("Alignment", "elementor"))), /* @__PURE__ */ React49.createElement(Grid19, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React49.createElement(ToggleControl8, { options: options7 }))));
|
|
1632
1651
|
};
|
|
1633
1652
|
|
|
1634
1653
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
1635
|
-
import * as
|
|
1636
|
-
import { ColorControl as
|
|
1637
|
-
import { Grid as
|
|
1638
|
-
import { __ as
|
|
1654
|
+
import * as React50 from "react";
|
|
1655
|
+
import { ColorControl as ColorControl2, ControlLabel as ControlLabel25 } from "@elementor/editor-controls";
|
|
1656
|
+
import { Grid as Grid20 } from "@elementor/ui";
|
|
1657
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
1639
1658
|
var TextColorField = () => {
|
|
1640
|
-
return /* @__PURE__ */
|
|
1659
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React50.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel25, null, __31("Text Color", "elementor"))), /* @__PURE__ */ React50.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ColorControl2, null))));
|
|
1641
1660
|
};
|
|
1642
1661
|
|
|
1643
1662
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
1644
|
-
import * as
|
|
1645
|
-
import { ControlLabel as
|
|
1663
|
+
import * as React51 from "react";
|
|
1664
|
+
import { ControlLabel as ControlLabel26, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
1646
1665
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
1647
|
-
import { Grid as
|
|
1648
|
-
import { __ as
|
|
1666
|
+
import { Grid as Grid21 } from "@elementor/ui";
|
|
1667
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
1649
1668
|
var options8 = [
|
|
1650
1669
|
{
|
|
1651
1670
|
value: "ltr",
|
|
1652
|
-
label:
|
|
1653
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1671
|
+
label: __32("Left to Right", "elementor"),
|
|
1672
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
1654
1673
|
},
|
|
1655
1674
|
{
|
|
1656
1675
|
value: "rtl",
|
|
1657
|
-
label:
|
|
1658
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1676
|
+
label: __32("Right to Left", "elementor"),
|
|
1677
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
1659
1678
|
}
|
|
1660
1679
|
];
|
|
1661
1680
|
var TextDirectionField = () => {
|
|
1662
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React51.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel26, null, __32("Direction", "elementor"))), /* @__PURE__ */ React51.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React51.createElement(ToggleControl9, { options: options8 }))));
|
|
1663
1682
|
};
|
|
1664
1683
|
|
|
1665
1684
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
1666
|
-
import * as
|
|
1685
|
+
import * as React52 from "react";
|
|
1667
1686
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
1668
|
-
import { __ as
|
|
1687
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
1669
1688
|
var initTextStroke = {
|
|
1670
1689
|
$$type: "stroke",
|
|
1671
1690
|
value: {
|
|
@@ -1691,24 +1710,24 @@ var TextStrokeField = () => {
|
|
|
1691
1710
|
setTextStroke(null);
|
|
1692
1711
|
};
|
|
1693
1712
|
const hasTextStroke = Boolean(textStroke);
|
|
1694
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ React52.createElement(
|
|
1695
1714
|
AddOrRemoveContent,
|
|
1696
1715
|
{
|
|
1697
|
-
label:
|
|
1716
|
+
label: __33("Text Stroke", "elementor"),
|
|
1698
1717
|
isAdded: hasTextStroke,
|
|
1699
1718
|
onAdd: addTextStroke,
|
|
1700
1719
|
onRemove: removeTextStroke
|
|
1701
1720
|
},
|
|
1702
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ React52.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React52.createElement(StrokeControl, null))
|
|
1703
1722
|
);
|
|
1704
1723
|
};
|
|
1705
1724
|
|
|
1706
1725
|
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
1707
|
-
import * as
|
|
1708
|
-
import { ControlLabel as
|
|
1726
|
+
import * as React53 from "react";
|
|
1727
|
+
import { ControlLabel as ControlLabel27 } from "@elementor/editor-controls";
|
|
1709
1728
|
import { ItalicIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
1710
|
-
import { Grid as
|
|
1711
|
-
import { __ as
|
|
1729
|
+
import { Grid as Grid22, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
|
|
1730
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
1712
1731
|
var buttonSize = "tiny";
|
|
1713
1732
|
var TextStyleField = () => {
|
|
1714
1733
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
@@ -1732,7 +1751,7 @@ var TextStyleField = () => {
|
|
|
1732
1751
|
value: newValue
|
|
1733
1752
|
});
|
|
1734
1753
|
};
|
|
1735
|
-
return /* @__PURE__ */
|
|
1754
|
+
return /* @__PURE__ */ React53.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel27, null, __34("Style", "elementor"))), /* @__PURE__ */ React53.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React53.createElement(
|
|
1736
1755
|
ToggleButton,
|
|
1737
1756
|
{
|
|
1738
1757
|
value: "italic",
|
|
@@ -1740,8 +1759,8 @@ var TextStyleField = () => {
|
|
|
1740
1759
|
"aria-label": "italic",
|
|
1741
1760
|
sx: { marginLeft: "auto" }
|
|
1742
1761
|
},
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
), /* @__PURE__ */
|
|
1762
|
+
/* @__PURE__ */ React53.createElement(ItalicIcon, { fontSize: buttonSize })
|
|
1763
|
+
), /* @__PURE__ */ React53.createElement(
|
|
1745
1764
|
ShorthandControl,
|
|
1746
1765
|
{
|
|
1747
1766
|
value: "line-through",
|
|
@@ -1749,8 +1768,8 @@ var TextStyleField = () => {
|
|
|
1749
1768
|
updateValues: handleSetTextDecoration,
|
|
1750
1769
|
"aria-label": "line-through"
|
|
1751
1770
|
},
|
|
1752
|
-
/* @__PURE__ */
|
|
1753
|
-
), /* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ React53.createElement(StrikethroughIcon, { fontSize: buttonSize })
|
|
1772
|
+
), /* @__PURE__ */ React53.createElement(
|
|
1754
1773
|
ShorthandControl,
|
|
1755
1774
|
{
|
|
1756
1775
|
value: "underline",
|
|
@@ -1758,7 +1777,7 @@ var TextStyleField = () => {
|
|
|
1758
1777
|
updateValues: handleSetTextDecoration,
|
|
1759
1778
|
"aria-label": "underline"
|
|
1760
1779
|
},
|
|
1761
|
-
/* @__PURE__ */
|
|
1780
|
+
/* @__PURE__ */ React53.createElement(UnderlineIcon, { fontSize: buttonSize })
|
|
1762
1781
|
))));
|
|
1763
1782
|
};
|
|
1764
1783
|
var ShorthandControl = ({
|
|
@@ -1777,52 +1796,52 @@ var ShorthandControl = ({
|
|
|
1777
1796
|
updateValues([...valuesArr, newValue].join(" "));
|
|
1778
1797
|
}
|
|
1779
1798
|
};
|
|
1780
|
-
return /* @__PURE__ */
|
|
1799
|
+
return /* @__PURE__ */ React53.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
1781
1800
|
};
|
|
1782
1801
|
var ToggleButton = ({ onChange, ...props }) => {
|
|
1783
1802
|
const handleChange = (_e, newValue) => {
|
|
1784
1803
|
onChange(newValue);
|
|
1785
1804
|
};
|
|
1786
|
-
return /* @__PURE__ */
|
|
1805
|
+
return /* @__PURE__ */ React53.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
|
|
1787
1806
|
};
|
|
1788
1807
|
|
|
1789
1808
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
1790
|
-
import * as
|
|
1791
|
-
import { ControlLabel as
|
|
1809
|
+
import * as React54 from "react";
|
|
1810
|
+
import { ControlLabel as ControlLabel28, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
1792
1811
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon } from "@elementor/icons";
|
|
1793
|
-
import { Grid as
|
|
1794
|
-
import { __ as
|
|
1812
|
+
import { Grid as Grid23 } from "@elementor/ui";
|
|
1813
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
1795
1814
|
var options9 = [
|
|
1796
1815
|
{
|
|
1797
1816
|
value: "capitalize",
|
|
1798
|
-
label:
|
|
1799
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1817
|
+
label: __35("Capitalize", "elementor"),
|
|
1818
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(LetterCaseIcon, { fontSize: size })
|
|
1800
1819
|
},
|
|
1801
1820
|
{
|
|
1802
1821
|
value: "uppercase",
|
|
1803
|
-
label:
|
|
1804
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1822
|
+
label: __35("Uppercase", "elementor"),
|
|
1823
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(LetterCaseUpperIcon, { fontSize: size })
|
|
1805
1824
|
},
|
|
1806
1825
|
{
|
|
1807
1826
|
value: "lowercase",
|
|
1808
|
-
label:
|
|
1809
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1827
|
+
label: __35("Lowercase", "elementor"),
|
|
1828
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(LetterCaseLowerIcon, { fontSize: size })
|
|
1810
1829
|
}
|
|
1811
1830
|
];
|
|
1812
|
-
var TransformField = () => /* @__PURE__ */
|
|
1831
|
+
var TransformField = () => /* @__PURE__ */ React54.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React54.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel28, null, __35("Transform", "elementor"))), /* @__PURE__ */ React54.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(ToggleControl10, { options: options9 }))));
|
|
1813
1832
|
|
|
1814
1833
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
1815
|
-
import * as
|
|
1816
|
-
import { ControlLabel as
|
|
1817
|
-
import { Grid as
|
|
1818
|
-
import { __ as
|
|
1834
|
+
import * as React55 from "react";
|
|
1835
|
+
import { ControlLabel as ControlLabel29, SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
1836
|
+
import { Grid as Grid24 } from "@elementor/ui";
|
|
1837
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
1819
1838
|
var WordSpacingField = () => {
|
|
1820
|
-
return /* @__PURE__ */
|
|
1839
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React55.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel29, null, __36("Word Spacing", "elementor"))), /* @__PURE__ */ React55.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeControl8, null))));
|
|
1821
1840
|
};
|
|
1822
1841
|
|
|
1823
1842
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1824
1843
|
var TypographySection = () => {
|
|
1825
|
-
return /* @__PURE__ */
|
|
1844
|
+
return /* @__PURE__ */ React56.createElement(Stack18, { gap: 1.5 }, /* @__PURE__ */ React56.createElement(FontFamilyField, null), /* @__PURE__ */ React56.createElement(FontWeightField, null), /* @__PURE__ */ React56.createElement(FontSizeField, null), /* @__PURE__ */ React56.createElement(Divider6, null), /* @__PURE__ */ React56.createElement(TextAlignmentField, null), /* @__PURE__ */ React56.createElement(TextColorField, null), /* @__PURE__ */ React56.createElement(CollapsibleContent, null, /* @__PURE__ */ React56.createElement(Stack18, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React56.createElement(LineHeightField, null), /* @__PURE__ */ React56.createElement(LetterSpacingField, null), /* @__PURE__ */ React56.createElement(WordSpacingField, null), /* @__PURE__ */ React56.createElement(Divider6, null), /* @__PURE__ */ React56.createElement(TextStyleField, null), /* @__PURE__ */ React56.createElement(TransformField, null), /* @__PURE__ */ React56.createElement(TextDirectionField, null), /* @__PURE__ */ React56.createElement(TextStrokeField, null))));
|
|
1826
1845
|
};
|
|
1827
1846
|
|
|
1828
1847
|
// src/components/style-tab.tsx
|
|
@@ -1831,7 +1850,7 @@ var StyleTab = () => {
|
|
|
1831
1850
|
const currentClassesProp = useCurrentClassesProp();
|
|
1832
1851
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
1833
1852
|
const breakpoint = useActiveBreakpoint();
|
|
1834
|
-
return /* @__PURE__ */
|
|
1853
|
+
return /* @__PURE__ */ React57.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React57.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: activeStyleDefId, setId: setActiveStyleDefId }, /* @__PURE__ */ React57.createElement(CssClassSelector, null), /* @__PURE__ */ React57.createElement(Divider7, null), /* @__PURE__ */ React57.createElement(SectionsList, null, /* @__PURE__ */ React57.createElement(Section, { title: __37("Layout", "elementor") }, /* @__PURE__ */ React57.createElement(LayoutSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Spacing", "elementor") }, /* @__PURE__ */ React57.createElement(SpacingSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Size", "elementor") }, /* @__PURE__ */ React57.createElement(SizeSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Position", "elementor") }, /* @__PURE__ */ React57.createElement(PositionSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Typography", "elementor") }, /* @__PURE__ */ React57.createElement(TypographySection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Background", "elementor") }, /* @__PURE__ */ React57.createElement(BackgroundSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Border", "elementor") }, /* @__PURE__ */ React57.createElement(BorderSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: __37("Effects", "elementor") }, /* @__PURE__ */ React57.createElement(EffectsSection, null)))));
|
|
1835
1854
|
};
|
|
1836
1855
|
function useActiveStyleDefId(currentClassesProp) {
|
|
1837
1856
|
const [activeStyledDefId, setActiveStyledDefId] = useState7(null);
|
|
@@ -1862,7 +1881,7 @@ var EditingPanelTabs = () => {
|
|
|
1862
1881
|
return (
|
|
1863
1882
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
1864
1883
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
1865
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ React58.createElement(Fragment7, { key: element.id }, /* @__PURE__ */ React58.createElement(Stack19, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React58.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React58.createElement(Tab, { label: __38("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React58.createElement(Tab, { label: __38("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React58.createElement(Divider8, null), /* @__PURE__ */ React58.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React58.createElement(SettingsTab, null)), /* @__PURE__ */ React58.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React58.createElement(StyleTab, null))))
|
|
1866
1885
|
);
|
|
1867
1886
|
};
|
|
1868
1887
|
|
|
@@ -1875,8 +1894,8 @@ var EditingPanel = () => {
|
|
|
1875
1894
|
if (!element || !elementType) {
|
|
1876
1895
|
return null;
|
|
1877
1896
|
}
|
|
1878
|
-
const panelTitle =
|
|
1879
|
-
return /* @__PURE__ */
|
|
1897
|
+
const panelTitle = __39("Edit %s", "elementor").replace("%s", elementType.title);
|
|
1898
|
+
return /* @__PURE__ */ React59.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React59.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React59.createElement(Panel, null, /* @__PURE__ */ React59.createElement(PanelHeader, null, /* @__PURE__ */ React59.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React59.createElement(PanelBody, null, /* @__PURE__ */ React59.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React59.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React59.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React59.createElement(EditingPanelTabs, null)))))));
|
|
1880
1899
|
};
|
|
1881
1900
|
|
|
1882
1901
|
// src/panel.ts
|
|
@@ -1933,9 +1952,9 @@ var EditingPanelHooks = () => {
|
|
|
1933
1952
|
};
|
|
1934
1953
|
|
|
1935
1954
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
1936
|
-
import * as
|
|
1955
|
+
import * as React62 from "react";
|
|
1937
1956
|
import { useId as useId3 } from "react";
|
|
1938
|
-
import { ControlLabel as
|
|
1957
|
+
import { ControlLabel as ControlLabel30, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
1939
1958
|
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1940
1959
|
import {
|
|
1941
1960
|
bindPopover as bindPopover2,
|
|
@@ -1945,7 +1964,7 @@ import {
|
|
|
1945
1964
|
IconButton as IconButton3,
|
|
1946
1965
|
Paper,
|
|
1947
1966
|
Popover as Popover2,
|
|
1948
|
-
Stack as
|
|
1967
|
+
Stack as Stack21,
|
|
1949
1968
|
Tab as Tab2,
|
|
1950
1969
|
TabPanel as TabPanel2,
|
|
1951
1970
|
Tabs as Tabs2,
|
|
@@ -1954,7 +1973,7 @@ import {
|
|
|
1954
1973
|
usePopupState as usePopupState2,
|
|
1955
1974
|
useTabs as useTabs2
|
|
1956
1975
|
} from "@elementor/ui";
|
|
1957
|
-
import { __ as
|
|
1976
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
1958
1977
|
|
|
1959
1978
|
// src/hooks/use-persist-dynamic-value.ts
|
|
1960
1979
|
var usePersistDynamicValue = (propKey) => {
|
|
@@ -1964,9 +1983,8 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
1964
1983
|
};
|
|
1965
1984
|
|
|
1966
1985
|
// src/dynamics/dynamic-control.tsx
|
|
1967
|
-
import * as
|
|
1986
|
+
import * as React60 from "react";
|
|
1968
1987
|
import { BoundPropProvider as BoundPropProvider3, useBoundProp } from "@elementor/editor-controls";
|
|
1969
|
-
import { isTransformable as isTransformable2 } from "@elementor/editor-props";
|
|
1970
1988
|
|
|
1971
1989
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
1972
1990
|
import { useMemo as useMemo3 } from "react";
|
|
@@ -2061,16 +2079,15 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2061
2079
|
name,
|
|
2062
2080
|
settings: {
|
|
2063
2081
|
...settings,
|
|
2064
|
-
|
|
2065
|
-
[bind]: isTransformable2(newValue) ? newValue.value : newValue
|
|
2082
|
+
[bind]: newValue
|
|
2066
2083
|
}
|
|
2067
2084
|
});
|
|
2068
2085
|
};
|
|
2069
|
-
return /* @__PURE__ */
|
|
2086
|
+
return /* @__PURE__ */ React60.createElement(BoundPropProvider3, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
|
|
2070
2087
|
};
|
|
2071
2088
|
|
|
2072
2089
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2073
|
-
import * as
|
|
2090
|
+
import * as React61 from "react";
|
|
2074
2091
|
import { Fragment as Fragment8, useState as useState8 } from "react";
|
|
2075
2092
|
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2076
2093
|
import { PhotoIcon, SearchIcon } from "@elementor/icons";
|
|
@@ -2082,11 +2099,11 @@ import {
|
|
|
2082
2099
|
ListSubheader,
|
|
2083
2100
|
MenuItem,
|
|
2084
2101
|
MenuList,
|
|
2085
|
-
Stack as
|
|
2102
|
+
Stack as Stack20,
|
|
2086
2103
|
TextField as TextField2,
|
|
2087
2104
|
Typography as Typography3
|
|
2088
2105
|
} from "@elementor/ui";
|
|
2089
|
-
import { __ as
|
|
2106
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
2090
2107
|
var SIZE3 = "tiny";
|
|
2091
2108
|
var DynamicSelection = ({ onSelect }) => {
|
|
2092
2109
|
const [searchValue, setSearchValue] = useState8("");
|
|
@@ -2106,21 +2123,21 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2106
2123
|
setValue({ name: value, settings: {} });
|
|
2107
2124
|
onSelect?.();
|
|
2108
2125
|
};
|
|
2109
|
-
return /* @__PURE__ */
|
|
2126
|
+
return /* @__PURE__ */ React61.createElement(Stack20, null, /* @__PURE__ */ React61.createElement(Box5, { px: 1.5, pb: 1 }, /* @__PURE__ */ React61.createElement(
|
|
2110
2127
|
TextField2,
|
|
2111
2128
|
{
|
|
2112
2129
|
fullWidth: true,
|
|
2113
2130
|
size: SIZE3,
|
|
2114
2131
|
value: searchValue,
|
|
2115
2132
|
onChange: handleSearch,
|
|
2116
|
-
placeholder:
|
|
2133
|
+
placeholder: __40("Search dynamic tag", "elementor"),
|
|
2117
2134
|
InputProps: {
|
|
2118
|
-
startAdornment: /* @__PURE__ */
|
|
2135
|
+
startAdornment: /* @__PURE__ */ React61.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React61.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2119
2136
|
}
|
|
2120
2137
|
}
|
|
2121
|
-
)), /* @__PURE__ */
|
|
2138
|
+
)), /* @__PURE__ */ React61.createElement(Divider9, null), /* @__PURE__ */ React61.createElement(Box5, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React61.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React61.createElement(Fragment8, { key: index }, /* @__PURE__ */ React61.createElement(ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2122
2139
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2123
|
-
return /* @__PURE__ */
|
|
2140
|
+
return /* @__PURE__ */ React61.createElement(
|
|
2124
2141
|
MenuItem,
|
|
2125
2142
|
{
|
|
2126
2143
|
key: value,
|
|
@@ -2131,7 +2148,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2131
2148
|
},
|
|
2132
2149
|
tagLabel
|
|
2133
2150
|
);
|
|
2134
|
-
})))) : /* @__PURE__ */
|
|
2151
|
+
})))) : /* @__PURE__ */ React61.createElement(Stack20, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React61.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React61.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __40("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React61.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React61.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React61.createElement(
|
|
2135
2152
|
Link,
|
|
2136
2153
|
{
|
|
2137
2154
|
color: "secondary",
|
|
@@ -2139,8 +2156,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2139
2156
|
component: "button",
|
|
2140
2157
|
onClick: () => setSearchValue("")
|
|
2141
2158
|
},
|
|
2142
|
-
|
|
2143
|
-
), "\xA0",
|
|
2159
|
+
__40("Clear the filters", "elementor")
|
|
2160
|
+
), "\xA0", __40("and try again.", "elementor")))));
|
|
2144
2161
|
};
|
|
2145
2162
|
var useFilteredOptions = (bind, searchValue) => {
|
|
2146
2163
|
const dynamicTags = usePropDynamicTags(bind);
|
|
@@ -2174,25 +2191,25 @@ var DynamicSelectionControl = () => {
|
|
|
2174
2191
|
if (!dynamicTag) {
|
|
2175
2192
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2176
2193
|
}
|
|
2177
|
-
return /* @__PURE__ */
|
|
2194
|
+
return /* @__PURE__ */ React62.createElement(Box6, null, /* @__PURE__ */ React62.createElement(
|
|
2178
2195
|
Tag,
|
|
2179
2196
|
{
|
|
2180
2197
|
fullWidth: true,
|
|
2181
2198
|
showActionsOnHover: true,
|
|
2182
2199
|
label: dynamicTag.label,
|
|
2183
|
-
startIcon: /* @__PURE__ */
|
|
2200
|
+
startIcon: /* @__PURE__ */ React62.createElement(DatabaseIcon, { fontSize: SIZE4 }),
|
|
2184
2201
|
...bindTrigger(selectionPopoverState),
|
|
2185
|
-
actions: /* @__PURE__ */
|
|
2202
|
+
actions: /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React62.createElement(
|
|
2186
2203
|
IconButton3,
|
|
2187
2204
|
{
|
|
2188
2205
|
size: SIZE4,
|
|
2189
2206
|
onClick: removeDynamicTag,
|
|
2190
|
-
"aria-label":
|
|
2207
|
+
"aria-label": __41("Remove dynamic value", "elementor")
|
|
2191
2208
|
},
|
|
2192
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ React62.createElement(XIcon2, { fontSize: SIZE4 })
|
|
2193
2210
|
))
|
|
2194
2211
|
}
|
|
2195
|
-
), /* @__PURE__ */
|
|
2212
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2196
2213
|
Popover2,
|
|
2197
2214
|
{
|
|
2198
2215
|
disablePortal: true,
|
|
@@ -2200,7 +2217,7 @@ var DynamicSelectionControl = () => {
|
|
|
2200
2217
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2201
2218
|
...bindPopover2(selectionPopoverState)
|
|
2202
2219
|
},
|
|
2203
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ React62.createElement(Stack21, null, /* @__PURE__ */ React62.createElement(Stack21, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React62.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React62.createElement(Typography4, { variant: "subtitle2" }, __41("Dynamic Tags", "elementor")), /* @__PURE__ */ React62.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React62.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React62.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2204
2221
|
));
|
|
2205
2222
|
};
|
|
2206
2223
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -2210,22 +2227,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2210
2227
|
if (!hasDynamicSettings) {
|
|
2211
2228
|
return null;
|
|
2212
2229
|
}
|
|
2213
|
-
return /* @__PURE__ */
|
|
2230
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
2214
2231
|
IconButton3,
|
|
2215
2232
|
{
|
|
2216
2233
|
size: SIZE4,
|
|
2217
2234
|
...bindTrigger(settingsPopupState),
|
|
2218
|
-
"aria-label":
|
|
2235
|
+
"aria-label": __41("Settings", "elementor")
|
|
2219
2236
|
},
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
), /* @__PURE__ */
|
|
2237
|
+
/* @__PURE__ */ React62.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
2238
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2222
2239
|
Popover2,
|
|
2223
2240
|
{
|
|
2224
2241
|
disableScrollLock: true,
|
|
2225
2242
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2226
2243
|
...bindPopover2(settingsPopupState)
|
|
2227
2244
|
},
|
|
2228
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ React62.createElement(Paper, { component: Stack21, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React62.createElement(Stack21, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React62.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React62.createElement(Typography4, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React62.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React62.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React62.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2229
2246
|
));
|
|
2230
2247
|
};
|
|
2231
2248
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2234,10 +2251,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
2234
2251
|
if (!tabs.length) {
|
|
2235
2252
|
return null;
|
|
2236
2253
|
}
|
|
2237
|
-
return /* @__PURE__ */
|
|
2238
|
-
return /* @__PURE__ */
|
|
2254
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React62.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React62.createElement(Divider10, null), tabs.map(({ value }, index) => {
|
|
2255
|
+
return /* @__PURE__ */ React62.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React62.createElement(Stack21, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
2239
2256
|
if (item.type === "control") {
|
|
2240
|
-
return /* @__PURE__ */
|
|
2257
|
+
return /* @__PURE__ */ React62.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2241
2258
|
}
|
|
2242
2259
|
return null;
|
|
2243
2260
|
})));
|
|
@@ -2247,14 +2264,14 @@ var Control3 = ({ control }) => {
|
|
|
2247
2264
|
if (!getControlByType(control.type)) {
|
|
2248
2265
|
return null;
|
|
2249
2266
|
}
|
|
2250
|
-
return /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ React62.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React62.createElement(ControlLabel30, null, control.label) : null, /* @__PURE__ */ React62.createElement(Control, { type: control.type, props: control.props }));
|
|
2251
2268
|
};
|
|
2252
2269
|
|
|
2253
2270
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2254
|
-
import * as
|
|
2271
|
+
import * as React63 from "react";
|
|
2255
2272
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2256
2273
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
2257
|
-
import { __ as
|
|
2274
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
2258
2275
|
var usePropDynamicAction = () => {
|
|
2259
2276
|
const { bind } = useBoundProp4();
|
|
2260
2277
|
const { elementType } = useElement();
|
|
@@ -2263,8 +2280,8 @@ var usePropDynamicAction = () => {
|
|
|
2263
2280
|
return {
|
|
2264
2281
|
visible,
|
|
2265
2282
|
icon: DatabaseIcon2,
|
|
2266
|
-
title:
|
|
2267
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2283
|
+
title: __42("Dynamic Tags", "elementor"),
|
|
2284
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React63.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2268
2285
|
};
|
|
2269
2286
|
};
|
|
2270
2287
|
|