@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.js
CHANGED
|
@@ -31,10 +31,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
replaceControl: () => replaceControl,
|
|
34
|
-
useBoundProp: () =>
|
|
34
|
+
useBoundProp: () => import_editor_controls46.useBoundProp
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
38
38
|
|
|
39
39
|
// src/control-replacement.tsx
|
|
40
40
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -43,23 +43,23 @@ var { replaceControl, getControlReplacement } = (0, import_editor_controls.creat
|
|
|
43
43
|
// src/init.ts
|
|
44
44
|
var import_editor = require("@elementor/editor");
|
|
45
45
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
46
|
-
var
|
|
46
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
47
47
|
|
|
48
48
|
// src/hooks/use-close-editor-panel.ts
|
|
49
49
|
var import_react13 = require("react");
|
|
50
|
-
var
|
|
51
|
-
var
|
|
50
|
+
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
51
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
52
52
|
|
|
53
53
|
// src/panel.ts
|
|
54
54
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
55
55
|
|
|
56
56
|
// src/components/editing-panel.tsx
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
57
|
+
var React59 = __toESM(require("react"));
|
|
58
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
59
|
+
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
60
60
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
61
|
-
var
|
|
62
|
-
var
|
|
61
|
+
var import_ui50 = require("@elementor/ui");
|
|
62
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
63
63
|
|
|
64
64
|
// src/contexts/element-context.tsx
|
|
65
65
|
var React = __toESM(require("react"));
|
|
@@ -130,10 +130,10 @@ function EditorPanelErrorFallback() {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// src/components/editing-panel-tabs.tsx
|
|
133
|
-
var
|
|
133
|
+
var React58 = __toESM(require("react"));
|
|
134
134
|
var import_react12 = require("react");
|
|
135
|
-
var
|
|
136
|
-
var
|
|
135
|
+
var import_ui49 = require("@elementor/ui");
|
|
136
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
137
137
|
|
|
138
138
|
// src/components/settings-tab.tsx
|
|
139
139
|
var React9 = __toESM(require("react"));
|
|
@@ -285,12 +285,12 @@ var Control2 = ({ control }) => {
|
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
// src/components/style-tab.tsx
|
|
288
|
-
var
|
|
288
|
+
var React57 = __toESM(require("react"));
|
|
289
289
|
var import_react11 = require("react");
|
|
290
|
-
var
|
|
290
|
+
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
291
291
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
292
|
-
var
|
|
293
|
-
var
|
|
292
|
+
var import_ui48 = require("@elementor/ui");
|
|
293
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
294
294
|
|
|
295
295
|
// src/contexts/classes-prop-context.tsx
|
|
296
296
|
var React10 = __toESM(require("react"));
|
|
@@ -351,19 +351,18 @@ var ConditionalTooltipWrapper = ({ maxWidth, title }) => {
|
|
|
351
351
|
};
|
|
352
352
|
}, []);
|
|
353
353
|
if (isOverflown) {
|
|
354
|
-
return /* @__PURE__ */ React12.createElement(import_ui7.Tooltip, { title, placement: "top" }, /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title
|
|
354
|
+
return /* @__PURE__ */ React12.createElement(import_ui7.Tooltip, { title, placement: "top" }, /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef }, title));
|
|
355
355
|
}
|
|
356
|
-
return /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title
|
|
356
|
+
return /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef }, title);
|
|
357
357
|
};
|
|
358
|
-
var Content = React12.forwardRef(({ maxWidth,
|
|
358
|
+
var Content = React12.forwardRef(({ maxWidth, ...tooltipProps }, ref) => /* @__PURE__ */ React12.createElement(
|
|
359
359
|
import_ui7.Box,
|
|
360
360
|
{
|
|
361
361
|
ref,
|
|
362
362
|
position: "relative",
|
|
363
363
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth },
|
|
364
|
-
...
|
|
365
|
-
}
|
|
366
|
-
title
|
|
364
|
+
...tooltipProps
|
|
365
|
+
}
|
|
367
366
|
));
|
|
368
367
|
|
|
369
368
|
// src/components/multi-combobox/multi-combobox.tsx
|
|
@@ -563,7 +562,7 @@ function useOptions() {
|
|
|
563
562
|
});
|
|
564
563
|
}
|
|
565
564
|
function useAppliedOptions(options10, appliedIds) {
|
|
566
|
-
const applied =
|
|
565
|
+
const applied = options10.filter((option) => appliedIds.includes(option.value));
|
|
567
566
|
const hasElementsProviderStyleApplied = applied.some(
|
|
568
567
|
(option) => option.provider === import_editor_styles_repository.ELEMENTS_STYLES_PROVIDER_KEY
|
|
569
568
|
);
|
|
@@ -608,9 +607,8 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
608
607
|
}
|
|
609
608
|
|
|
610
609
|
// src/components/style-sections/background-section/background-section.tsx
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var import_ui12 = require("@elementor/ui");
|
|
610
|
+
var React16 = __toESM(require("react"));
|
|
611
|
+
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
614
612
|
|
|
615
613
|
// src/controls-registry/styles-field.tsx
|
|
616
614
|
var React15 = __toESM(require("react"));
|
|
@@ -660,37 +658,28 @@ var StylesField = ({ bind, children }) => {
|
|
|
660
658
|
return /* @__PURE__ */ React15.createElement(import_editor_controls5.BoundPropProvider, { setValue, value, bind }, children);
|
|
661
659
|
};
|
|
662
660
|
|
|
663
|
-
// src/components/style-sections/background-section/background-color-field.tsx
|
|
664
|
-
var React16 = __toESM(require("react"));
|
|
665
|
-
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
666
|
-
var import_ui11 = require("@elementor/ui");
|
|
667
|
-
var import_i18n3 = require("@wordpress/i18n");
|
|
668
|
-
var BackgroundColorField = () => {
|
|
669
|
-
return /* @__PURE__ */ React16.createElement(StylesField, { bind: "background-color" }, /* @__PURE__ */ React16.createElement(import_ui11.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React16.createElement(import_ui11.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(import_editor_controls6.ControlLabel, null, (0, import_i18n3.__)("Color", "elementor"))), /* @__PURE__ */ React16.createElement(import_ui11.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(import_editor_controls6.ColorControl, null))));
|
|
670
|
-
};
|
|
671
|
-
|
|
672
661
|
// src/components/style-sections/background-section/background-section.tsx
|
|
673
662
|
var BackgroundSection = () => {
|
|
674
|
-
return /* @__PURE__ */
|
|
663
|
+
return /* @__PURE__ */ React16.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React16.createElement(import_editor_controls6.BackgroundControl, null));
|
|
675
664
|
};
|
|
676
665
|
|
|
677
666
|
// src/components/style-sections/border-section/border-section.tsx
|
|
678
|
-
var
|
|
679
|
-
var
|
|
667
|
+
var React23 = __toESM(require("react"));
|
|
668
|
+
var import_ui14 = require("@elementor/ui");
|
|
680
669
|
|
|
681
670
|
// src/components/style-sections/border-section/border-field.tsx
|
|
682
|
-
var
|
|
683
|
-
var
|
|
671
|
+
var React21 = __toESM(require("react"));
|
|
672
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
684
673
|
|
|
685
674
|
// src/components/add-or-remove-content.tsx
|
|
686
|
-
var
|
|
687
|
-
var
|
|
675
|
+
var React17 = __toESM(require("react"));
|
|
676
|
+
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
688
677
|
var import_icons3 = require("@elementor/icons");
|
|
689
|
-
var
|
|
678
|
+
var import_ui11 = require("@elementor/ui");
|
|
690
679
|
var SIZE2 = "tiny";
|
|
691
680
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
692
|
-
return /* @__PURE__ */
|
|
693
|
-
|
|
681
|
+
return /* @__PURE__ */ React17.createElement(import_ui11.Stack, { gap: 1.5 }, /* @__PURE__ */ React17.createElement(
|
|
682
|
+
import_ui11.Stack,
|
|
694
683
|
{
|
|
695
684
|
direction: "row",
|
|
696
685
|
sx: {
|
|
@@ -698,75 +687,75 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
698
687
|
alignItems: "center"
|
|
699
688
|
}
|
|
700
689
|
},
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
isAdded ? /* @__PURE__ */
|
|
703
|
-
), /* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ React17.createElement(import_editor_controls7.ControlLabel, null, label),
|
|
691
|
+
isAdded ? /* @__PURE__ */ React17.createElement(import_ui11.IconButton, { size: SIZE2, onClick: onRemove }, /* @__PURE__ */ React17.createElement(import_icons3.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React17.createElement(import_ui11.IconButton, { size: SIZE2, onClick: onAdd }, /* @__PURE__ */ React17.createElement(import_icons3.PlusIcon, { fontSize: SIZE2 }))
|
|
692
|
+
), /* @__PURE__ */ React17.createElement(import_ui11.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React17.createElement(import_ui11.Stack, { gap: 1.5 }, children)));
|
|
704
693
|
};
|
|
705
694
|
|
|
706
695
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
707
|
-
var
|
|
708
|
-
var
|
|
709
|
-
var
|
|
710
|
-
var
|
|
696
|
+
var React18 = __toESM(require("react"));
|
|
697
|
+
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
698
|
+
var import_ui12 = require("@elementor/ui");
|
|
699
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
711
700
|
var BorderColorField = () => {
|
|
712
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ React18.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React18.createElement(import_ui12.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React18.createElement(import_ui12.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React18.createElement(import_editor_controls8.ControlLabel, null, (0, import_i18n3.__)("Border Color", "elementor"))), /* @__PURE__ */ React18.createElement(import_ui12.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React18.createElement(import_editor_controls8.ColorControl, null))));
|
|
713
702
|
};
|
|
714
703
|
|
|
715
704
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
716
|
-
var
|
|
717
|
-
var
|
|
718
|
-
var
|
|
719
|
-
var
|
|
705
|
+
var React19 = __toESM(require("react"));
|
|
706
|
+
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
707
|
+
var import_ui13 = require("@elementor/ui");
|
|
708
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
720
709
|
var borderStyles = [
|
|
721
|
-
{ value: "none", label: (0,
|
|
722
|
-
{ value: "solid", label: (0,
|
|
723
|
-
{ value: "dashed", label: (0,
|
|
724
|
-
{ value: "dotted", label: (0,
|
|
725
|
-
{ value: "double", label: (0,
|
|
726
|
-
{ value: "groove", label: (0,
|
|
727
|
-
{ value: "ridge", label: (0,
|
|
728
|
-
{ value: "inset", label: (0,
|
|
729
|
-
{ value: "outset", label: (0,
|
|
710
|
+
{ value: "none", label: (0, import_i18n4.__)("None", "elementor") },
|
|
711
|
+
{ value: "solid", label: (0, import_i18n4.__)("Solid", "elementor") },
|
|
712
|
+
{ value: "dashed", label: (0, import_i18n4.__)("Dashed", "elementor") },
|
|
713
|
+
{ value: "dotted", label: (0, import_i18n4.__)("Dotted", "elementor") },
|
|
714
|
+
{ value: "double", label: (0, import_i18n4.__)("Double", "elementor") },
|
|
715
|
+
{ value: "groove", label: (0, import_i18n4.__)("Groove", "elementor") },
|
|
716
|
+
{ value: "ridge", label: (0, import_i18n4.__)("Ridge", "elementor") },
|
|
717
|
+
{ value: "inset", label: (0, import_i18n4.__)("Inset", "elementor") },
|
|
718
|
+
{ value: "outset", label: (0, import_i18n4.__)("Outset", "elementor") }
|
|
730
719
|
];
|
|
731
720
|
var BorderStyleField = () => {
|
|
732
|
-
return /* @__PURE__ */
|
|
721
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React19.createElement(import_ui13.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(import_ui13.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls9.ControlLabel, null, (0, import_i18n4.__)("Border Type", "elementor"))), /* @__PURE__ */ React19.createElement(import_ui13.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls9.SelectControl, { options: borderStyles }))));
|
|
733
722
|
};
|
|
734
723
|
|
|
735
724
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
736
|
-
var
|
|
737
|
-
var
|
|
725
|
+
var React20 = __toESM(require("react"));
|
|
726
|
+
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
738
727
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
739
728
|
var import_icons4 = require("@elementor/icons");
|
|
740
|
-
var
|
|
729
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
741
730
|
var edges = [
|
|
742
731
|
{
|
|
743
|
-
label: (0,
|
|
744
|
-
icon: /* @__PURE__ */
|
|
732
|
+
label: (0, import_i18n5.__)("Top", "elementor"),
|
|
733
|
+
icon: /* @__PURE__ */ React20.createElement(import_icons4.SideTopIcon, { fontSize: "tiny" }),
|
|
745
734
|
bind: "top"
|
|
746
735
|
},
|
|
747
736
|
{
|
|
748
|
-
label: (0,
|
|
749
|
-
icon: /* @__PURE__ */
|
|
737
|
+
label: (0, import_i18n5.__)("Right", "elementor"),
|
|
738
|
+
icon: /* @__PURE__ */ React20.createElement(import_icons4.SideRightIcon, { fontSize: "tiny" }),
|
|
750
739
|
bind: "right"
|
|
751
740
|
},
|
|
752
741
|
{
|
|
753
|
-
label: (0,
|
|
754
|
-
icon: /* @__PURE__ */
|
|
742
|
+
label: (0, import_i18n5.__)("Bottom", "elementor"),
|
|
743
|
+
icon: /* @__PURE__ */ React20.createElement(import_icons4.SideBottomIcon, { fontSize: "tiny" }),
|
|
755
744
|
bind: "bottom"
|
|
756
745
|
},
|
|
757
746
|
{
|
|
758
|
-
label: (0,
|
|
759
|
-
icon: /* @__PURE__ */
|
|
747
|
+
label: (0, import_i18n5.__)("Left", "elementor"),
|
|
748
|
+
icon: /* @__PURE__ */ React20.createElement(import_icons4.SideLeftIcon, { fontSize: "tiny" }),
|
|
760
749
|
bind: "left"
|
|
761
750
|
}
|
|
762
751
|
];
|
|
763
752
|
var BorderWidthField = () => {
|
|
764
|
-
return /* @__PURE__ */
|
|
765
|
-
|
|
753
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React20.createElement(
|
|
754
|
+
import_editor_controls10.EqualUnequalSizesControl,
|
|
766
755
|
{
|
|
767
756
|
items: edges,
|
|
768
|
-
label: (0,
|
|
769
|
-
icon: /* @__PURE__ */
|
|
757
|
+
label: (0, import_i18n5.__)("Border Width", "elementor"),
|
|
758
|
+
icon: /* @__PURE__ */ React20.createElement(import_icons4.SideAllIcon, { fontSize: "tiny" }),
|
|
770
759
|
multiSizePropTypeUtil: import_editor_props2.borderWidthPropTypeUtil
|
|
771
760
|
}
|
|
772
761
|
));
|
|
@@ -795,96 +784,122 @@ var BorderField = () => {
|
|
|
795
784
|
setBorderStyle(null);
|
|
796
785
|
};
|
|
797
786
|
const hasBorder = Boolean(borderWidth || borderColor || borderStyle);
|
|
798
|
-
return /* @__PURE__ */
|
|
787
|
+
return /* @__PURE__ */ React21.createElement(
|
|
799
788
|
AddOrRemoveContent,
|
|
800
789
|
{
|
|
801
|
-
label: (0,
|
|
790
|
+
label: (0, import_i18n6.__)("Border", "elementor"),
|
|
802
791
|
isAdded: hasBorder,
|
|
803
792
|
onAdd: addBorder,
|
|
804
793
|
onRemove: removeBorder
|
|
805
794
|
},
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ React21.createElement(BorderWidthField, null),
|
|
796
|
+
/* @__PURE__ */ React21.createElement(BorderColorField, null),
|
|
797
|
+
/* @__PURE__ */ React21.createElement(BorderStyleField, null)
|
|
809
798
|
);
|
|
810
799
|
};
|
|
811
800
|
|
|
812
801
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
813
|
-
var
|
|
814
|
-
var
|
|
802
|
+
var React22 = __toESM(require("react"));
|
|
803
|
+
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
815
804
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
816
805
|
var import_icons5 = require("@elementor/icons");
|
|
817
|
-
var
|
|
806
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
818
807
|
var corners = [
|
|
819
808
|
{
|
|
820
|
-
label: (0,
|
|
821
|
-
icon: /* @__PURE__ */
|
|
809
|
+
label: (0, import_i18n7.__)("Top Left", "elementor"),
|
|
810
|
+
icon: /* @__PURE__ */ React22.createElement(import_icons5.RadiusTopLeftIcon, { fontSize: "tiny" }),
|
|
822
811
|
bind: "top-left"
|
|
823
812
|
},
|
|
824
813
|
{
|
|
825
|
-
label: (0,
|
|
826
|
-
icon: /* @__PURE__ */
|
|
814
|
+
label: (0, import_i18n7.__)("Top Right", "elementor"),
|
|
815
|
+
icon: /* @__PURE__ */ React22.createElement(import_icons5.RadiusTopRightIcon, { fontSize: "tiny" }),
|
|
827
816
|
bind: "top-right"
|
|
828
817
|
},
|
|
829
818
|
{
|
|
830
|
-
label: (0,
|
|
831
|
-
icon: /* @__PURE__ */
|
|
819
|
+
label: (0, import_i18n7.__)("Bottom Right", "elementor"),
|
|
820
|
+
icon: /* @__PURE__ */ React22.createElement(import_icons5.RadiusBottomRightIcon, { fontSize: "tiny" }),
|
|
832
821
|
bind: "bottom-right"
|
|
833
822
|
},
|
|
834
823
|
{
|
|
835
|
-
label: (0,
|
|
836
|
-
icon: /* @__PURE__ */
|
|
824
|
+
label: (0, import_i18n7.__)("Bottom Left", "elementor"),
|
|
825
|
+
icon: /* @__PURE__ */ React22.createElement(import_icons5.RadiusBottomLeftIcon, { fontSize: "tiny" }),
|
|
837
826
|
bind: "bottom-left"
|
|
838
827
|
}
|
|
839
828
|
];
|
|
840
829
|
var BorderRadiusField = () => {
|
|
841
|
-
return /* @__PURE__ */
|
|
842
|
-
|
|
830
|
+
return /* @__PURE__ */ React22.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React22.createElement(
|
|
831
|
+
import_editor_controls11.EqualUnequalSizesControl,
|
|
843
832
|
{
|
|
844
833
|
items: corners,
|
|
845
|
-
label: (0,
|
|
846
|
-
icon: /* @__PURE__ */
|
|
834
|
+
label: (0, import_i18n7.__)("Border Radius", "elementor"),
|
|
835
|
+
icon: /* @__PURE__ */ React22.createElement(import_icons5.BorderCornersIcon, { fontSize: "tiny" }),
|
|
847
836
|
multiSizePropTypeUtil: import_editor_props3.borderRadiusPropTypeUtil
|
|
848
837
|
}
|
|
849
838
|
));
|
|
850
839
|
};
|
|
851
840
|
|
|
852
841
|
// src/components/style-sections/border-section/border-section.tsx
|
|
853
|
-
var BorderSection = () => /* @__PURE__ */
|
|
842
|
+
var BorderSection = () => /* @__PURE__ */ React23.createElement(import_ui14.Stack, { gap: 1.5 }, /* @__PURE__ */ React23.createElement(BorderRadiusField, null), /* @__PURE__ */ React23.createElement(import_ui14.Divider, null), /* @__PURE__ */ React23.createElement(BorderField, null));
|
|
854
843
|
|
|
855
844
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
856
|
-
var
|
|
857
|
-
var
|
|
858
|
-
var
|
|
845
|
+
var React24 = __toESM(require("react"));
|
|
846
|
+
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
847
|
+
var import_ui15 = require("@elementor/ui");
|
|
859
848
|
var EffectsSection = () => {
|
|
860
|
-
return /* @__PURE__ */
|
|
849
|
+
return /* @__PURE__ */ React24.createElement(import_ui15.Stack, { gap: 1.5 }, /* @__PURE__ */ React24.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React24.createElement(import_editor_controls12.BoxShadowRepeaterControl, null)));
|
|
861
850
|
};
|
|
862
851
|
|
|
863
852
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
864
|
-
var
|
|
865
|
-
var
|
|
866
|
-
var
|
|
867
|
-
var
|
|
853
|
+
var React35 = __toESM(require("react"));
|
|
854
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
855
|
+
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
856
|
+
var import_ui27 = require("@elementor/ui");
|
|
857
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
858
|
+
|
|
859
|
+
// src/hooks/use-computed-style.ts
|
|
860
|
+
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
861
|
+
function useComputedStyle(elementId) {
|
|
862
|
+
return (0, import_editor_v1_adapters.__privateUseListenTo)(
|
|
863
|
+
[
|
|
864
|
+
(0, import_editor_v1_adapters.windowEvent)("elementor/device-mode/change"),
|
|
865
|
+
(0, import_editor_v1_adapters.commandEndEvent)("document/elements/reset-style"),
|
|
866
|
+
(0, import_editor_v1_adapters.commandEndEvent)("document/elements/settings"),
|
|
867
|
+
(0, import_editor_v1_adapters.commandEndEvent)("document/elements/paste-style")
|
|
868
|
+
],
|
|
869
|
+
() => {
|
|
870
|
+
if (!elementId) {
|
|
871
|
+
return null;
|
|
872
|
+
}
|
|
873
|
+
const extendedWindow = window;
|
|
874
|
+
const element = extendedWindow.elementor?.getContainer?.(elementId);
|
|
875
|
+
if (!element?.view?.el) {
|
|
876
|
+
return null;
|
|
877
|
+
}
|
|
878
|
+
const resp = window.getComputedStyle(element.view.el);
|
|
879
|
+
return resp;
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
}
|
|
868
883
|
|
|
869
884
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
870
|
-
var
|
|
871
|
-
var
|
|
885
|
+
var React26 = __toESM(require("react"));
|
|
886
|
+
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
872
887
|
var import_icons6 = require("@elementor/icons");
|
|
873
|
-
var
|
|
874
|
-
var
|
|
888
|
+
var import_ui18 = require("@elementor/ui");
|
|
889
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
875
890
|
|
|
876
891
|
// src/hooks/use-direction.ts
|
|
877
|
-
var
|
|
892
|
+
var import_ui16 = require("@elementor/ui");
|
|
878
893
|
function useDirection() {
|
|
879
|
-
const theme = (0,
|
|
894
|
+
const theme = (0, import_ui16.useTheme)(), extendedWindow = window;
|
|
880
895
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
881
896
|
return { isSiteRtl, isUiRtl };
|
|
882
897
|
}
|
|
883
898
|
|
|
884
899
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
885
|
-
var
|
|
900
|
+
var React25 = __toESM(require("react"));
|
|
886
901
|
var import_react7 = require("react");
|
|
887
|
-
var
|
|
902
|
+
var import_ui17 = require("@elementor/ui");
|
|
888
903
|
var CLOCKWISE_ANGLES = {
|
|
889
904
|
row: 0,
|
|
890
905
|
column: 90,
|
|
@@ -900,11 +915,11 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
900
915
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
901
916
|
const rotate = (0, import_react7.useRef)(useGetTargetAngle(isClockwise, offset));
|
|
902
917
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
903
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
904
919
|
};
|
|
905
920
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
906
921
|
const [direction] = useStylesField("flex-direction");
|
|
907
|
-
const isRtl = "rtl" === (0,
|
|
922
|
+
const isRtl = "rtl" === (0, import_ui17.useTheme)().direction;
|
|
908
923
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
909
924
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
910
925
|
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
@@ -915,8 +930,8 @@ var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
|
915
930
|
};
|
|
916
931
|
|
|
917
932
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
918
|
-
var StartIcon = (0,
|
|
919
|
-
var EndIcon = (0,
|
|
933
|
+
var StartIcon = (0, import_ui18.withDirection)(import_icons6.LayoutAlignLeftIcon);
|
|
934
|
+
var EndIcon = (0, import_ui18.withDirection)(import_icons6.LayoutAlignRightIcon);
|
|
920
935
|
var iconProps = {
|
|
921
936
|
isClockwise: false,
|
|
922
937
|
offset: 90
|
|
@@ -924,42 +939,42 @@ var iconProps = {
|
|
|
924
939
|
var options = [
|
|
925
940
|
{
|
|
926
941
|
value: "start",
|
|
927
|
-
label: (0,
|
|
928
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
942
|
+
label: (0, import_i18n8.__)("Start", "elementor"),
|
|
943
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
929
944
|
showTooltip: true
|
|
930
945
|
},
|
|
931
946
|
{
|
|
932
947
|
value: "center",
|
|
933
|
-
label: (0,
|
|
934
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
948
|
+
label: (0, import_i18n8.__)("Center", "elementor"),
|
|
949
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: import_icons6.LayoutAlignCenterIcon, size, ...iconProps }),
|
|
935
950
|
showTooltip: true
|
|
936
951
|
},
|
|
937
952
|
{
|
|
938
953
|
value: "end",
|
|
939
|
-
label: (0,
|
|
940
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
954
|
+
label: (0, import_i18n8.__)("End", "elementor"),
|
|
955
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
941
956
|
showTooltip: true
|
|
942
957
|
},
|
|
943
958
|
{
|
|
944
959
|
value: "stretch",
|
|
945
|
-
label: (0,
|
|
946
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
960
|
+
label: (0, import_i18n8.__)("Stretch", "elementor"),
|
|
961
|
+
renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: import_icons6.LayoutDistributeVerticalIcon, size, ...iconProps }),
|
|
947
962
|
showTooltip: true
|
|
948
963
|
}
|
|
949
964
|
];
|
|
950
965
|
var AlignItemsField = () => {
|
|
951
966
|
const { isSiteRtl } = useDirection();
|
|
952
|
-
return /* @__PURE__ */
|
|
967
|
+
return /* @__PURE__ */ React26.createElement(import_ui18.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React26.createElement(import_ui18.ThemeProvider, null, /* @__PURE__ */ React26.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React26.createElement(import_ui18.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(import_ui18.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(import_editor_controls13.ControlLabel, null, (0, import_i18n8.__)("Align items", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui18.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React26.createElement(import_editor_controls13.ToggleControl, { options }))))));
|
|
953
968
|
};
|
|
954
969
|
|
|
955
970
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
956
|
-
var
|
|
957
|
-
var
|
|
971
|
+
var React27 = __toESM(require("react"));
|
|
972
|
+
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
958
973
|
var import_icons7 = require("@elementor/icons");
|
|
959
|
-
var
|
|
960
|
-
var
|
|
961
|
-
var StartIcon2 = (0,
|
|
962
|
-
var EndIcon2 = (0,
|
|
974
|
+
var import_ui19 = require("@elementor/ui");
|
|
975
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
976
|
+
var StartIcon2 = (0, import_ui19.withDirection)(import_icons7.LayoutAlignLeftIcon);
|
|
977
|
+
var EndIcon2 = (0, import_ui19.withDirection)(import_icons7.LayoutAlignRightIcon);
|
|
963
978
|
var iconProps2 = {
|
|
964
979
|
isClockwise: false,
|
|
965
980
|
offset: 90
|
|
@@ -967,105 +982,105 @@ var iconProps2 = {
|
|
|
967
982
|
var options2 = [
|
|
968
983
|
{
|
|
969
984
|
value: "start",
|
|
970
|
-
label: (0,
|
|
971
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
985
|
+
label: (0, import_i18n9.__)("Start", "elementor"),
|
|
986
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
972
987
|
showTooltip: true
|
|
973
988
|
},
|
|
974
989
|
{
|
|
975
990
|
value: "center",
|
|
976
|
-
label: (0,
|
|
977
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
991
|
+
label: (0, import_i18n9.__)("Center", "elementor"),
|
|
992
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons7.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
978
993
|
showTooltip: true
|
|
979
994
|
},
|
|
980
995
|
{
|
|
981
996
|
value: "end",
|
|
982
|
-
label: (0,
|
|
983
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
997
|
+
label: (0, import_i18n9.__)("End", "elementor"),
|
|
998
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
984
999
|
showTooltip: true
|
|
985
1000
|
},
|
|
986
1001
|
{
|
|
987
1002
|
value: "stretch",
|
|
988
|
-
label: (0,
|
|
989
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1003
|
+
label: (0, import_i18n9.__)("Stretch", "elementor"),
|
|
1004
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons7.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
990
1005
|
showTooltip: true
|
|
991
1006
|
}
|
|
992
1007
|
];
|
|
993
1008
|
var AlignSelfChild = () => {
|
|
994
1009
|
const { isSiteRtl } = useDirection();
|
|
995
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ React27.createElement(import_ui19.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(import_ui19.ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React27.createElement(import_ui19.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n9.__)("Align self", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui19.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React27.createElement(import_editor_controls14.ToggleControl, { options: options2 }))))));
|
|
996
1011
|
};
|
|
997
1012
|
|
|
998
1013
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
999
|
-
var
|
|
1000
|
-
var
|
|
1001
|
-
var
|
|
1002
|
-
var
|
|
1014
|
+
var React28 = __toESM(require("react"));
|
|
1015
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
1016
|
+
var import_ui20 = require("@elementor/ui");
|
|
1017
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1003
1018
|
var DisplayField = () => {
|
|
1004
1019
|
const options10 = [
|
|
1005
1020
|
{
|
|
1006
1021
|
value: "block",
|
|
1007
|
-
renderContent: () => (0,
|
|
1008
|
-
label: (0,
|
|
1022
|
+
renderContent: () => (0, import_i18n10.__)("Block", "elementor"),
|
|
1023
|
+
label: (0, import_i18n10.__)("Block", "elementor")
|
|
1009
1024
|
},
|
|
1010
1025
|
{
|
|
1011
1026
|
value: "flex",
|
|
1012
|
-
renderContent: () => (0,
|
|
1013
|
-
label: (0,
|
|
1027
|
+
renderContent: () => (0, import_i18n10.__)("Flex", "elementor"),
|
|
1028
|
+
label: (0, import_i18n10.__)("Flex", "elementor")
|
|
1014
1029
|
}
|
|
1015
1030
|
];
|
|
1016
|
-
return /* @__PURE__ */
|
|
1031
|
+
return /* @__PURE__ */ React28.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React28.createElement(import_ui20.Stack, { gap: 1 }, /* @__PURE__ */ React28.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n10.__)("Display", "elementor")), /* @__PURE__ */ React28.createElement(import_editor_controls15.ToggleControl, { options: options10, fullWidth: true })));
|
|
1017
1032
|
};
|
|
1018
1033
|
|
|
1019
1034
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1020
|
-
var
|
|
1021
|
-
var
|
|
1035
|
+
var React29 = __toESM(require("react"));
|
|
1036
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
1022
1037
|
var import_icons8 = require("@elementor/icons");
|
|
1023
|
-
var
|
|
1024
|
-
var
|
|
1038
|
+
var import_ui21 = require("@elementor/ui");
|
|
1039
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1025
1040
|
var options3 = [
|
|
1026
1041
|
{
|
|
1027
1042
|
value: "row",
|
|
1028
|
-
label: (0,
|
|
1043
|
+
label: (0, import_i18n11.__)("Row", "elementor"),
|
|
1029
1044
|
renderContent: ({ size }) => {
|
|
1030
|
-
const StartIcon4 = (0,
|
|
1031
|
-
return /* @__PURE__ */
|
|
1045
|
+
const StartIcon4 = (0, import_ui21.withDirection)(import_icons8.ArrowRightIcon);
|
|
1046
|
+
return /* @__PURE__ */ React29.createElement(StartIcon4, { fontSize: size });
|
|
1032
1047
|
},
|
|
1033
1048
|
showTooltip: true
|
|
1034
1049
|
},
|
|
1035
1050
|
{
|
|
1036
1051
|
value: "column",
|
|
1037
|
-
label: (0,
|
|
1038
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1052
|
+
label: (0, import_i18n11.__)("Column", "elementor"),
|
|
1053
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(import_icons8.ArrowDownSmallIcon, { fontSize: size }),
|
|
1039
1054
|
showTooltip: true
|
|
1040
1055
|
},
|
|
1041
1056
|
{
|
|
1042
1057
|
value: "row-reverse",
|
|
1043
|
-
label: (0,
|
|
1058
|
+
label: (0, import_i18n11.__)("Reversed row", "elementor"),
|
|
1044
1059
|
renderContent: ({ size }) => {
|
|
1045
|
-
const EndIcon4 = (0,
|
|
1046
|
-
return /* @__PURE__ */
|
|
1060
|
+
const EndIcon4 = (0, import_ui21.withDirection)(import_icons8.ArrowLeftIcon);
|
|
1061
|
+
return /* @__PURE__ */ React29.createElement(EndIcon4, { fontSize: size });
|
|
1047
1062
|
},
|
|
1048
1063
|
showTooltip: true
|
|
1049
1064
|
},
|
|
1050
1065
|
{
|
|
1051
1066
|
value: "column-reverse",
|
|
1052
|
-
label: (0,
|
|
1053
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1067
|
+
label: (0, import_i18n11.__)("Reversed column", "elementor"),
|
|
1068
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(import_icons8.ArrowUpSmallIcon, { fontSize: size }),
|
|
1054
1069
|
showTooltip: true
|
|
1055
1070
|
}
|
|
1056
1071
|
];
|
|
1057
1072
|
var FlexDirectionField = () => {
|
|
1058
1073
|
const { isSiteRtl } = useDirection();
|
|
1059
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ React29.createElement(import_ui21.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React29.createElement(import_ui21.ThemeProvider, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React29.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React29.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(import_editor_controls16.ControlLabel, null, (0, import_i18n11.__)("Direction", "elementor"))), /* @__PURE__ */ React29.createElement(import_ui21.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React29.createElement(import_editor_controls16.ToggleControl, { options: options3 }))))));
|
|
1060
1075
|
};
|
|
1061
1076
|
|
|
1062
1077
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1063
|
-
var
|
|
1078
|
+
var React30 = __toESM(require("react"));
|
|
1064
1079
|
var import_react8 = require("react");
|
|
1065
|
-
var
|
|
1080
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
1066
1081
|
var import_icons9 = require("@elementor/icons");
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1082
|
+
var import_ui22 = require("@elementor/ui");
|
|
1083
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1069
1084
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1070
1085
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1071
1086
|
var FIRST = "first";
|
|
@@ -1078,20 +1093,20 @@ var orderValueMap = {
|
|
|
1078
1093
|
var items = [
|
|
1079
1094
|
{
|
|
1080
1095
|
value: FIRST,
|
|
1081
|
-
label: (0,
|
|
1082
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1096
|
+
label: (0, import_i18n12.__)("First", "elementor"),
|
|
1097
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
|
|
1083
1098
|
showTooltip: true
|
|
1084
1099
|
},
|
|
1085
1100
|
{
|
|
1086
1101
|
value: LAST,
|
|
1087
|
-
label: (0,
|
|
1088
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1102
|
+
label: (0, import_i18n12.__)("Last", "elementor"),
|
|
1103
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
|
|
1089
1104
|
showTooltip: true
|
|
1090
1105
|
},
|
|
1091
1106
|
{
|
|
1092
1107
|
value: CUSTOM,
|
|
1093
|
-
label: (0,
|
|
1094
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1108
|
+
label: (0, import_i18n12.__)("Custom", "elementor"),
|
|
1109
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.PencilIcon, { fontSize: size }),
|
|
1095
1110
|
showTooltip: true
|
|
1096
1111
|
}
|
|
1097
1112
|
];
|
|
@@ -1106,16 +1121,16 @@ var FlexOrderField = () => {
|
|
|
1106
1121
|
}
|
|
1107
1122
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1108
1123
|
};
|
|
1109
|
-
return /* @__PURE__ */
|
|
1110
|
-
|
|
1124
|
+
return /* @__PURE__ */ React30.createElement(import_ui22.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(import_ui22.ThemeProvider, null, /* @__PURE__ */ React30.createElement(import_ui22.Stack, { gap: 2 }, /* @__PURE__ */ React30.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n12.__)("Order", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(
|
|
1125
|
+
import_editor_controls17.ControlToggleButtonGroup,
|
|
1111
1126
|
{
|
|
1112
1127
|
items,
|
|
1113
1128
|
value: groupControlValue,
|
|
1114
1129
|
onChange: handleToggleButtonChange,
|
|
1115
1130
|
exclusive: true
|
|
1116
1131
|
}
|
|
1117
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1118
|
-
|
|
1132
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React30.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React30.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n12.__)("Custom order", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(
|
|
1133
|
+
import_editor_controls17.NumberControl,
|
|
1119
1134
|
{
|
|
1120
1135
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
1121
1136
|
max: LAST_DEFAULT_VALUE - 1,
|
|
@@ -1134,36 +1149,36 @@ var getGroupControlValue = (order) => {
|
|
|
1134
1149
|
};
|
|
1135
1150
|
|
|
1136
1151
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1137
|
-
var
|
|
1138
|
-
var
|
|
1152
|
+
var React31 = __toESM(require("react"));
|
|
1153
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
1139
1154
|
var import_icons10 = require("@elementor/icons");
|
|
1140
|
-
var
|
|
1141
|
-
var
|
|
1155
|
+
var import_ui23 = require("@elementor/ui");
|
|
1156
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1142
1157
|
var DEFAULT = 1;
|
|
1143
1158
|
var items2 = [
|
|
1144
1159
|
{
|
|
1145
1160
|
value: "flex-grow",
|
|
1146
|
-
label: (0,
|
|
1147
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1161
|
+
label: (0, import_i18n13.__)("Grow", "elementor"),
|
|
1162
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.ExpandIcon, { fontSize: size }),
|
|
1148
1163
|
showTooltip: true
|
|
1149
1164
|
},
|
|
1150
1165
|
{
|
|
1151
1166
|
value: "flex-shrink",
|
|
1152
|
-
label: (0,
|
|
1153
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1167
|
+
label: (0, import_i18n13.__)("Shrink", "elementor"),
|
|
1168
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.ShrinkIcon, { fontSize: size }),
|
|
1154
1169
|
showTooltip: true
|
|
1155
1170
|
},
|
|
1156
1171
|
{
|
|
1157
1172
|
value: "custom",
|
|
1158
|
-
label: (0,
|
|
1159
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1173
|
+
label: (0, import_i18n13.__)("Custom", "elementor"),
|
|
1174
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.PencilIcon, { fontSize: size }),
|
|
1160
1175
|
showTooltip: true
|
|
1161
1176
|
}
|
|
1162
1177
|
];
|
|
1163
1178
|
var FlexSizeField = () => {
|
|
1164
1179
|
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1165
1180
|
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1166
|
-
const currentGroup =
|
|
1181
|
+
const currentGroup = React31.useMemo(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = React31.useState(currentGroup);
|
|
1167
1182
|
const onChangeGroup = (group = null) => {
|
|
1168
1183
|
setActiveGroup(group);
|
|
1169
1184
|
setBasisField(null);
|
|
@@ -1180,17 +1195,17 @@ var FlexSizeField = () => {
|
|
|
1180
1195
|
setGrowField(null);
|
|
1181
1196
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1182
1197
|
};
|
|
1183
|
-
return /* @__PURE__ */
|
|
1184
|
-
|
|
1198
|
+
return /* @__PURE__ */ React31.createElement(import_ui23.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(import_ui23.ThemeProvider, null, /* @__PURE__ */ React31.createElement(import_ui23.Stack, { gap: 2 }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n13.__)("Size", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1199
|
+
import_editor_controls18.ControlToggleButtonGroup,
|
|
1185
1200
|
{
|
|
1186
1201
|
value: activeGroup,
|
|
1187
1202
|
onChange: onChangeGroup,
|
|
1188
1203
|
items: items2,
|
|
1189
1204
|
exclusive: true
|
|
1190
1205
|
}
|
|
1191
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1206
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React31.createElement(FlexCustomField, null))));
|
|
1192
1207
|
};
|
|
1193
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1208
|
+
var FlexCustomField = () => /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n13.__)("Grow", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n13.__)("Shrink", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n13.__)("Basis", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls18.SizeControl, null)))));
|
|
1194
1209
|
var getActiveGroup = ({
|
|
1195
1210
|
grow,
|
|
1196
1211
|
shrink,
|
|
@@ -1212,22 +1227,22 @@ var getActiveGroup = ({
|
|
|
1212
1227
|
};
|
|
1213
1228
|
|
|
1214
1229
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1215
|
-
var
|
|
1216
|
-
var
|
|
1217
|
-
var
|
|
1218
|
-
var
|
|
1230
|
+
var React32 = __toESM(require("react"));
|
|
1231
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
1232
|
+
var import_ui24 = require("@elementor/ui");
|
|
1233
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1219
1234
|
var GapControlField = () => {
|
|
1220
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ React32.createElement(import_ui24.Stack, { gap: 1 }, /* @__PURE__ */ React32.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React32.createElement(import_editor_controls19.GapControl, { label: (0, import_i18n14.__)("Gaps", "elementor") })));
|
|
1221
1236
|
};
|
|
1222
1237
|
|
|
1223
1238
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1224
|
-
var
|
|
1225
|
-
var
|
|
1239
|
+
var React33 = __toESM(require("react"));
|
|
1240
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
1226
1241
|
var import_icons11 = require("@elementor/icons");
|
|
1227
|
-
var
|
|
1228
|
-
var
|
|
1229
|
-
var StartIcon3 = (0,
|
|
1230
|
-
var EndIcon3 = (0,
|
|
1242
|
+
var import_ui25 = require("@elementor/ui");
|
|
1243
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1244
|
+
var StartIcon3 = (0, import_ui25.withDirection)(import_icons11.JustifyTopIcon);
|
|
1245
|
+
var EndIcon3 = (0, import_ui25.withDirection)(import_icons11.JustifyBottomIcon);
|
|
1231
1246
|
var iconProps3 = {
|
|
1232
1247
|
isClockwise: true,
|
|
1233
1248
|
offset: -90
|
|
@@ -1235,87 +1250,91 @@ var iconProps3 = {
|
|
|
1235
1250
|
var options4 = [
|
|
1236
1251
|
{
|
|
1237
1252
|
value: "start",
|
|
1238
|
-
label: (0,
|
|
1239
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1253
|
+
label: (0, import_i18n15.__)("Start", "elementor"),
|
|
1254
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1240
1255
|
showTooltip: true
|
|
1241
1256
|
},
|
|
1242
1257
|
{
|
|
1243
1258
|
value: "center",
|
|
1244
|
-
label: (0,
|
|
1245
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1259
|
+
label: (0, import_i18n15.__)("Center", "elementor"),
|
|
1260
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons11.JustifyCenterIcon, size, ...iconProps3 }),
|
|
1246
1261
|
showTooltip: true
|
|
1247
1262
|
},
|
|
1248
1263
|
{
|
|
1249
1264
|
value: "end",
|
|
1250
|
-
label: (0,
|
|
1251
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1265
|
+
label: (0, import_i18n15.__)("End", "elementor"),
|
|
1266
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1252
1267
|
showTooltip: true
|
|
1253
1268
|
},
|
|
1254
1269
|
{
|
|
1255
1270
|
value: "space-between",
|
|
1256
|
-
label: (0,
|
|
1257
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1271
|
+
label: (0, import_i18n15.__)("Space between", "elementor"),
|
|
1272
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceBetweenVerticalIcon, size, ...iconProps3 }),
|
|
1258
1273
|
showTooltip: true
|
|
1259
1274
|
},
|
|
1260
1275
|
{
|
|
1261
1276
|
value: "space-around",
|
|
1262
|
-
label: (0,
|
|
1263
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1277
|
+
label: (0, import_i18n15.__)("Space around", "elementor"),
|
|
1278
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceAroundVerticalIcon, size, ...iconProps3 }),
|
|
1264
1279
|
showTooltip: true
|
|
1265
1280
|
},
|
|
1266
1281
|
{
|
|
1267
1282
|
value: "space-evenly",
|
|
1268
|
-
label: (0,
|
|
1269
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1283
|
+
label: (0, import_i18n15.__)("Space evenly", "elementor"),
|
|
1284
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons11.JustifyDistributeVerticalIcon, size, ...iconProps3 }),
|
|
1270
1285
|
showTooltip: true
|
|
1271
1286
|
}
|
|
1272
1287
|
];
|
|
1273
1288
|
var JustifyContentField = () => {
|
|
1274
1289
|
const { isSiteRtl } = useDirection();
|
|
1275
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ React33.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React33.createElement(import_ui25.Stack, { gap: 1 }, /* @__PURE__ */ React33.createElement(import_editor_controls20.ControlLabel, null, (0, import_i18n15.__)("Justify content", "elementor")), /* @__PURE__ */ React33.createElement(import_editor_controls20.ToggleControl, { options: options4, fullWidth: true })))));
|
|
1276
1291
|
};
|
|
1277
1292
|
|
|
1278
1293
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1279
|
-
var
|
|
1280
|
-
var
|
|
1294
|
+
var React34 = __toESM(require("react"));
|
|
1295
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
1281
1296
|
var import_icons12 = require("@elementor/icons");
|
|
1282
|
-
var
|
|
1283
|
-
var
|
|
1297
|
+
var import_ui26 = require("@elementor/ui");
|
|
1298
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1284
1299
|
var options5 = [
|
|
1285
1300
|
{
|
|
1286
1301
|
value: "nowrap",
|
|
1287
|
-
label: (0,
|
|
1288
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1302
|
+
label: (0, import_i18n16.__)("No wrap", "elementor"),
|
|
1303
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons12.ArrowRightIcon, { fontSize: size }),
|
|
1289
1304
|
showTooltip: true
|
|
1290
1305
|
},
|
|
1291
1306
|
{
|
|
1292
1307
|
value: "wrap",
|
|
1293
|
-
label: (0,
|
|
1294
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1308
|
+
label: (0, import_i18n16.__)("Wrap", "elementor"),
|
|
1309
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons12.ArrowBackIcon, { fontSize: size }),
|
|
1295
1310
|
showTooltip: true
|
|
1296
1311
|
},
|
|
1297
1312
|
{
|
|
1298
1313
|
value: "wrap-reverse",
|
|
1299
|
-
label: (0,
|
|
1300
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1314
|
+
label: (0, import_i18n16.__)("Reversed wrap", "elementor"),
|
|
1315
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons12.ArrowForwardIcon, { fontSize: size }),
|
|
1301
1316
|
showTooltip: true
|
|
1302
1317
|
}
|
|
1303
1318
|
];
|
|
1304
1319
|
var WrapField = () => {
|
|
1305
1320
|
const { isSiteRtl } = useDirection();
|
|
1306
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ React34.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React34.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(import_editor_controls21.ControlLabel, null, (0, import_i18n16.__)("Wrap", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls21.ToggleControl, { options: options5 }))))));
|
|
1307
1322
|
};
|
|
1308
1323
|
|
|
1309
1324
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1310
1325
|
var LayoutSection = () => {
|
|
1311
1326
|
const [display] = useStylesField("display");
|
|
1312
|
-
|
|
1327
|
+
const { element } = useElement();
|
|
1328
|
+
const parent = (0, import_editor_elements4.useParentElement)(element.id);
|
|
1329
|
+
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1330
|
+
return /* @__PURE__ */ React35.createElement(import_ui27.Stack, { gap: 2 }, /* @__PURE__ */ React35.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React35.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React35.createElement(FlexChildFields, null));
|
|
1313
1331
|
};
|
|
1314
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1332
|
+
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(import_ui27.Divider, null), /* @__PURE__ */ React35.createElement(GapControlField, null), /* @__PURE__ */ React35.createElement(WrapField, null));
|
|
1333
|
+
var FlexChildFields = () => /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(import_ui27.Divider, null), /* @__PURE__ */ React35.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n17.__)("Flex child", "elementor")), /* @__PURE__ */ React35.createElement(AlignSelfChild, null), /* @__PURE__ */ React35.createElement(FlexOrderField, null), /* @__PURE__ */ React35.createElement(FlexSizeField, null));
|
|
1315
1334
|
|
|
1316
1335
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1317
|
-
var
|
|
1318
|
-
var
|
|
1336
|
+
var React39 = __toESM(require("react"));
|
|
1337
|
+
var import_ui31 = require("@elementor/ui");
|
|
1319
1338
|
|
|
1320
1339
|
// src/hooks/use-session-storage.ts
|
|
1321
1340
|
var import_react9 = require("react");
|
|
@@ -1355,46 +1374,46 @@ var subscribeToSessionStorage = (key, subscriber) => {
|
|
|
1355
1374
|
};
|
|
1356
1375
|
|
|
1357
1376
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1358
|
-
var
|
|
1359
|
-
var
|
|
1377
|
+
var React36 = __toESM(require("react"));
|
|
1378
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
1360
1379
|
var import_icons13 = require("@elementor/icons");
|
|
1361
|
-
var
|
|
1362
|
-
var
|
|
1380
|
+
var import_ui28 = require("@elementor/ui");
|
|
1381
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
1363
1382
|
var sideIcons = {
|
|
1364
|
-
left: /* @__PURE__ */
|
|
1365
|
-
right: /* @__PURE__ */
|
|
1366
|
-
top: /* @__PURE__ */
|
|
1367
|
-
bottom: /* @__PURE__ */
|
|
1383
|
+
left: /* @__PURE__ */ React36.createElement(import_icons13.SideLeftIcon, { fontSize: "tiny" }),
|
|
1384
|
+
right: /* @__PURE__ */ React36.createElement(import_icons13.SideRightIcon, { fontSize: "tiny" }),
|
|
1385
|
+
top: /* @__PURE__ */ React36.createElement(import_icons13.SideTopIcon, { fontSize: "tiny" }),
|
|
1386
|
+
bottom: /* @__PURE__ */ React36.createElement(import_icons13.SideBottomIcon, { fontSize: "tiny" })
|
|
1368
1387
|
};
|
|
1369
1388
|
var DimensionsField = () => {
|
|
1370
|
-
return /* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(DimensionField, { side: "top", label: (0, import_i18n18.__)("Top", "elementor") }), /* @__PURE__ */ React36.createElement(DimensionField, { side: "right", label: (0, import_i18n18.__)("Right", "elementor") })), /* @__PURE__ */ React36.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(DimensionField, { side: "bottom", label: (0, import_i18n18.__)("Bottom", "elementor") }), /* @__PURE__ */ React36.createElement(DimensionField, { side: "left", label: (0, import_i18n18.__)("Left", "elementor") })));
|
|
1371
1390
|
};
|
|
1372
1391
|
var DimensionField = ({ side, label }) => {
|
|
1373
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ React36.createElement(import_ui28.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React36.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(import_editor_controls23.ControlLabel, null, label)), /* @__PURE__ */ React36.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(StylesField, { bind: side }, /* @__PURE__ */ React36.createElement(import_editor_controls23.SizeControl, { startIcon: sideIcons[side] }))));
|
|
1374
1393
|
};
|
|
1375
1394
|
|
|
1376
1395
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1377
|
-
var
|
|
1378
|
-
var
|
|
1379
|
-
var
|
|
1380
|
-
var
|
|
1396
|
+
var React37 = __toESM(require("react"));
|
|
1397
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1398
|
+
var import_ui29 = require("@elementor/ui");
|
|
1399
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1381
1400
|
var positionOptions = [
|
|
1382
|
-
{ label: (0,
|
|
1383
|
-
{ label: (0,
|
|
1384
|
-
{ label: (0,
|
|
1385
|
-
{ label: (0,
|
|
1401
|
+
{ label: (0, import_i18n19.__)("Static", "elementor"), value: "static" },
|
|
1402
|
+
{ label: (0, import_i18n19.__)("Relative", "elementor"), value: "relative" },
|
|
1403
|
+
{ label: (0, import_i18n19.__)("Absolute", "elementor"), value: "absolute" },
|
|
1404
|
+
{ label: (0, import_i18n19.__)("Fixed", "elementor"), value: "fixed" }
|
|
1386
1405
|
];
|
|
1387
1406
|
var PositionField = ({ onChange }) => {
|
|
1388
|
-
return /* @__PURE__ */
|
|
1407
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls24.ControlLabel, null, (0, import_i18n19.__)("Position", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls24.SelectControl, { options: positionOptions, onChange }))));
|
|
1389
1408
|
};
|
|
1390
1409
|
|
|
1391
1410
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1392
|
-
var
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1395
|
-
var
|
|
1411
|
+
var React38 = __toESM(require("react"));
|
|
1412
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
1413
|
+
var import_ui30 = require("@elementor/ui");
|
|
1414
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1396
1415
|
var ZIndexField = () => {
|
|
1397
|
-
return /* @__PURE__ */
|
|
1416
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React38.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n20.__)("Z-Index", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls25.NumberControl, null))));
|
|
1398
1417
|
};
|
|
1399
1418
|
|
|
1400
1419
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1426,7 +1445,7 @@ var PositionSection = () => {
|
|
|
1426
1445
|
}
|
|
1427
1446
|
};
|
|
1428
1447
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1429
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ React39.createElement(import_ui31.Stack, { 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);
|
|
1430
1449
|
};
|
|
1431
1450
|
var usePersistDimensions = () => {
|
|
1432
1451
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1436,91 +1455,91 @@ var usePersistDimensions = () => {
|
|
|
1436
1455
|
};
|
|
1437
1456
|
|
|
1438
1457
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1439
|
-
var React42 = __toESM(require("react"));
|
|
1440
|
-
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
1441
|
-
var import_ui35 = require("@elementor/ui");
|
|
1442
|
-
var import_i18n23 = require("@wordpress/i18n");
|
|
1443
|
-
|
|
1444
|
-
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1445
1458
|
var React41 = __toESM(require("react"));
|
|
1446
1459
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
1447
|
-
var
|
|
1448
|
-
var import_ui34 = require("@elementor/ui");
|
|
1460
|
+
var import_ui33 = require("@elementor/ui");
|
|
1449
1461
|
var import_i18n22 = require("@wordpress/i18n");
|
|
1462
|
+
|
|
1463
|
+
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1464
|
+
var React40 = __toESM(require("react"));
|
|
1465
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
1466
|
+
var import_icons14 = require("@elementor/icons");
|
|
1467
|
+
var import_ui32 = require("@elementor/ui");
|
|
1468
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
1450
1469
|
var options6 = [
|
|
1451
1470
|
{
|
|
1452
1471
|
value: "visible",
|
|
1453
|
-
label: (0,
|
|
1454
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1472
|
+
label: (0, import_i18n21.__)("Visible", "elementor"),
|
|
1473
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons14.EyeIcon, { fontSize: size }),
|
|
1455
1474
|
showTooltip: true
|
|
1456
1475
|
},
|
|
1457
1476
|
{
|
|
1458
1477
|
value: "hidden",
|
|
1459
|
-
label: (0,
|
|
1460
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1478
|
+
label: (0, import_i18n21.__)("Hidden", "elementor"),
|
|
1479
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons14.EyeOffIcon, { fontSize: size }),
|
|
1461
1480
|
showTooltip: true
|
|
1462
1481
|
},
|
|
1463
1482
|
{
|
|
1464
1483
|
value: "auto",
|
|
1465
|
-
label: (0,
|
|
1466
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1484
|
+
label: (0, import_i18n21.__)("Auto", "elementor"),
|
|
1485
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons14.ExpandBottomIcon, { fontSize: size }),
|
|
1467
1486
|
showTooltip: true
|
|
1468
1487
|
}
|
|
1469
1488
|
];
|
|
1470
1489
|
var OverflowField = () => {
|
|
1471
|
-
return /* @__PURE__ */
|
|
1490
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React40.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n21.__)("Overflow", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React40.createElement(import_editor_controls26.ToggleControl, { options: options6 }))));
|
|
1472
1491
|
};
|
|
1473
1492
|
|
|
1474
1493
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1475
1494
|
var SizeSection = () => {
|
|
1476
|
-
return /* @__PURE__ */
|
|
1495
|
+
return /* @__PURE__ */ React41.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "width", label: (0, import_i18n22.__)("Width", "elementor") })), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "height", label: (0, import_i18n22.__)("Height", "elementor") }))), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "min-width", label: (0, import_i18n22.__)("Min. Width", "elementor") })), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "min-height", label: (0, import_i18n22.__)("Min. Height", "elementor") }))), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "max-width", label: (0, import_i18n22.__)("Max. Width", "elementor") })), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeField, { bind: "max-height", label: (0, import_i18n22.__)("Max. Height", "elementor") }))), /* @__PURE__ */ React41.createElement(import_ui33.Divider, null), /* @__PURE__ */ React41.createElement(import_ui33.Stack, null, /* @__PURE__ */ React41.createElement(OverflowField, null)));
|
|
1477
1496
|
};
|
|
1478
1497
|
var SizeField = ({ label, bind }) => {
|
|
1479
|
-
return /* @__PURE__ */
|
|
1498
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(import_editor_controls27.ControlLabel, null, label)), /* @__PURE__ */ React41.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(import_editor_controls27.SizeControl, null))));
|
|
1480
1499
|
};
|
|
1481
1500
|
|
|
1482
1501
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1483
|
-
var
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
1486
|
-
var
|
|
1502
|
+
var React42 = __toESM(require("react"));
|
|
1503
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
1504
|
+
var import_ui34 = require("@elementor/ui");
|
|
1505
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1487
1506
|
var SpacingSection = () => {
|
|
1488
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ React42.createElement(import_ui34.Stack, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React42.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n23.__)("Padding", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui34.Divider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React42.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n23.__)("Margin", "elementor") })));
|
|
1489
1508
|
};
|
|
1490
1509
|
|
|
1491
1510
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1492
|
-
var
|
|
1493
|
-
var
|
|
1511
|
+
var React56 = __toESM(require("react"));
|
|
1512
|
+
var import_ui47 = require("@elementor/ui");
|
|
1494
1513
|
|
|
1495
1514
|
// src/components/collapsible-content.tsx
|
|
1496
|
-
var
|
|
1515
|
+
var React43 = __toESM(require("react"));
|
|
1497
1516
|
var import_react10 = require("react");
|
|
1498
|
-
var
|
|
1499
|
-
var
|
|
1517
|
+
var import_ui35 = require("@elementor/ui");
|
|
1518
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
1500
1519
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1501
1520
|
const [open, setOpen] = (0, import_react10.useState)(defaultOpen);
|
|
1502
1521
|
const handleToggle = () => {
|
|
1503
1522
|
setOpen((prevOpen) => !prevOpen);
|
|
1504
1523
|
};
|
|
1505
|
-
return /* @__PURE__ */
|
|
1506
|
-
|
|
1524
|
+
return /* @__PURE__ */ React43.createElement(import_ui35.Stack, { sx: { py: 0.5 } }, /* @__PURE__ */ React43.createElement(
|
|
1525
|
+
import_ui35.Button,
|
|
1507
1526
|
{
|
|
1508
1527
|
fullWidth: true,
|
|
1509
1528
|
size: "small",
|
|
1510
1529
|
color: "secondary",
|
|
1511
1530
|
variant: "outlined",
|
|
1512
1531
|
onClick: handleToggle,
|
|
1513
|
-
endIcon: /* @__PURE__ */
|
|
1532
|
+
endIcon: /* @__PURE__ */ React43.createElement(CollapseIcon, { open })
|
|
1514
1533
|
},
|
|
1515
|
-
open ? (0,
|
|
1516
|
-
), /* @__PURE__ */
|
|
1534
|
+
open ? (0, import_i18n24.__)("Show less", "elementor") : (0, import_i18n24.__)("Show more", "elementor")
|
|
1535
|
+
), /* @__PURE__ */ React43.createElement(import_ui35.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1517
1536
|
};
|
|
1518
1537
|
|
|
1519
1538
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1520
|
-
var
|
|
1521
|
-
var
|
|
1522
|
-
var
|
|
1523
|
-
var
|
|
1539
|
+
var React44 = __toESM(require("react"));
|
|
1540
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
1541
|
+
var import_ui36 = require("@elementor/ui");
|
|
1542
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
1524
1543
|
|
|
1525
1544
|
// src/sync/get-elementor-config.ts
|
|
1526
1545
|
var getElementorConfig = () => {
|
|
@@ -1534,7 +1553,7 @@ var FontFamilyField = () => {
|
|
|
1534
1553
|
if (!fontFamilies) {
|
|
1535
1554
|
return null;
|
|
1536
1555
|
}
|
|
1537
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(import_editor_controls29.ControlLabel, null, (0, import_i18n25.__)("Font Family", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(import_editor_controls29.FontFamilyControl, { fontFamilies }))));
|
|
1538
1557
|
};
|
|
1539
1558
|
var getFontFamilies = () => {
|
|
1540
1559
|
const { controls } = getElementorConfig();
|
|
@@ -1546,115 +1565,115 @@ var getFontFamilies = () => {
|
|
|
1546
1565
|
};
|
|
1547
1566
|
|
|
1548
1567
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1549
|
-
var
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
var
|
|
1568
|
+
var React45 = __toESM(require("react"));
|
|
1569
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
1570
|
+
var import_ui37 = require("@elementor/ui");
|
|
1571
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
1553
1572
|
var FontSizeField = () => {
|
|
1554
|
-
return /* @__PURE__ */
|
|
1573
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n26.__)("Font Size", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls30.SizeControl, null))));
|
|
1555
1574
|
};
|
|
1556
1575
|
|
|
1557
1576
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1558
|
-
var
|
|
1559
|
-
var
|
|
1560
|
-
var
|
|
1561
|
-
var
|
|
1577
|
+
var React46 = __toESM(require("react"));
|
|
1578
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
1579
|
+
var import_ui38 = require("@elementor/ui");
|
|
1580
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
1562
1581
|
var fontWeightOptions = [
|
|
1563
|
-
{ label: (0,
|
|
1564
|
-
{ label: (0,
|
|
1565
|
-
{ label: (0,
|
|
1566
|
-
{ label: (0,
|
|
1567
|
-
{ label: (0,
|
|
1582
|
+
{ label: (0, import_i18n27.__)("Light - 400", "elementor"), value: "400" },
|
|
1583
|
+
{ label: (0, import_i18n27.__)("Regular - 500", "elementor"), value: "500" },
|
|
1584
|
+
{ label: (0, import_i18n27.__)("Semi Bold - 600", "elementor"), value: "600" },
|
|
1585
|
+
{ label: (0, import_i18n27.__)("Bold - 700", "elementor"), value: "700" },
|
|
1586
|
+
{ label: (0, import_i18n27.__)("Black - 900", "elementor"), value: "900" }
|
|
1568
1587
|
];
|
|
1569
1588
|
var FontWeightField = () => {
|
|
1570
|
-
return /* @__PURE__ */
|
|
1589
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n27.__)("Font Weight", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls31.SelectControl, { options: fontWeightOptions }))));
|
|
1571
1590
|
};
|
|
1572
1591
|
|
|
1573
1592
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1574
|
-
var
|
|
1575
|
-
var
|
|
1576
|
-
var
|
|
1577
|
-
var
|
|
1593
|
+
var React47 = __toESM(require("react"));
|
|
1594
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
1595
|
+
var import_ui39 = require("@elementor/ui");
|
|
1596
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
1578
1597
|
var LetterSpacingField = () => {
|
|
1579
|
-
return /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n28.__)("Letter Spacing", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls32.SizeControl, null))));
|
|
1580
1599
|
};
|
|
1581
1600
|
|
|
1582
1601
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1583
|
-
var
|
|
1584
|
-
var
|
|
1585
|
-
var
|
|
1586
|
-
var
|
|
1602
|
+
var React48 = __toESM(require("react"));
|
|
1603
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
1604
|
+
var import_ui40 = require("@elementor/ui");
|
|
1605
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
1587
1606
|
var LineHeightField = () => {
|
|
1588
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls33.ControlLabel, null, (0, import_i18n29.__)("Line Height", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls33.SizeControl, null))));
|
|
1589
1608
|
};
|
|
1590
1609
|
|
|
1591
1610
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1592
|
-
var
|
|
1593
|
-
var
|
|
1611
|
+
var React49 = __toESM(require("react"));
|
|
1612
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
1594
1613
|
var import_icons15 = require("@elementor/icons");
|
|
1595
|
-
var
|
|
1596
|
-
var
|
|
1614
|
+
var import_ui41 = require("@elementor/ui");
|
|
1615
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
1597
1616
|
var options7 = [
|
|
1598
1617
|
{
|
|
1599
1618
|
value: "left",
|
|
1600
|
-
label: (0,
|
|
1601
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1619
|
+
label: (0, import_i18n30.__)("Left", "elementor"),
|
|
1620
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons15.AlignLeftIcon, { fontSize: size })
|
|
1602
1621
|
},
|
|
1603
1622
|
{
|
|
1604
1623
|
value: "center",
|
|
1605
|
-
label: (0,
|
|
1606
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1624
|
+
label: (0, import_i18n30.__)("Center", "elementor"),
|
|
1625
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons15.AlignCenterIcon, { fontSize: size })
|
|
1607
1626
|
},
|
|
1608
1627
|
{
|
|
1609
1628
|
value: "right",
|
|
1610
|
-
label: (0,
|
|
1611
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1629
|
+
label: (0, import_i18n30.__)("Right", "elementor"),
|
|
1630
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons15.AlignRightIcon, { fontSize: size })
|
|
1612
1631
|
},
|
|
1613
1632
|
{
|
|
1614
1633
|
value: "justify",
|
|
1615
|
-
label: (0,
|
|
1616
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1634
|
+
label: (0, import_i18n30.__)("Justify", "elementor"),
|
|
1635
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons15.AlignJustifiedIcon, { fontSize: size })
|
|
1617
1636
|
}
|
|
1618
1637
|
];
|
|
1619
1638
|
var TextAlignmentField = () => {
|
|
1620
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls34.ControlLabel, null, (0, import_i18n30.__)("Alignment", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React49.createElement(import_editor_controls34.ToggleControl, { options: options7 }))));
|
|
1621
1640
|
};
|
|
1622
1641
|
|
|
1623
1642
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
1624
|
-
var
|
|
1625
|
-
var
|
|
1626
|
-
var
|
|
1627
|
-
var
|
|
1643
|
+
var React50 = __toESM(require("react"));
|
|
1644
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
1645
|
+
var import_ui42 = require("@elementor/ui");
|
|
1646
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
1628
1647
|
var TextColorField = () => {
|
|
1629
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React50.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n31.__)("Text Color", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls35.ColorControl, null))));
|
|
1630
1649
|
};
|
|
1631
1650
|
|
|
1632
1651
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
1633
|
-
var
|
|
1634
|
-
var
|
|
1652
|
+
var React51 = __toESM(require("react"));
|
|
1653
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
1635
1654
|
var import_icons16 = require("@elementor/icons");
|
|
1636
|
-
var
|
|
1637
|
-
var
|
|
1655
|
+
var import_ui43 = require("@elementor/ui");
|
|
1656
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
1638
1657
|
var options8 = [
|
|
1639
1658
|
{
|
|
1640
1659
|
value: "ltr",
|
|
1641
|
-
label: (0,
|
|
1642
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1660
|
+
label: (0, import_i18n32.__)("Left to Right", "elementor"),
|
|
1661
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.TextDirectionLtrIcon, { fontSize: size })
|
|
1643
1662
|
},
|
|
1644
1663
|
{
|
|
1645
1664
|
value: "rtl",
|
|
1646
|
-
label: (0,
|
|
1647
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1665
|
+
label: (0, import_i18n32.__)("Right to Left", "elementor"),
|
|
1666
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.TextDirectionRtlIcon, { fontSize: size })
|
|
1648
1667
|
}
|
|
1649
1668
|
];
|
|
1650
1669
|
var TextDirectionField = () => {
|
|
1651
|
-
return /* @__PURE__ */
|
|
1670
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React51.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n32.__)("Direction", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React51.createElement(import_editor_controls36.ToggleControl, { options: options8 }))));
|
|
1652
1671
|
};
|
|
1653
1672
|
|
|
1654
1673
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
1655
|
-
var
|
|
1656
|
-
var
|
|
1657
|
-
var
|
|
1674
|
+
var React52 = __toESM(require("react"));
|
|
1675
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
1676
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
1658
1677
|
var initTextStroke = {
|
|
1659
1678
|
$$type: "stroke",
|
|
1660
1679
|
value: {
|
|
@@ -1680,24 +1699,24 @@ var TextStrokeField = () => {
|
|
|
1680
1699
|
setTextStroke(null);
|
|
1681
1700
|
};
|
|
1682
1701
|
const hasTextStroke = Boolean(textStroke);
|
|
1683
|
-
return /* @__PURE__ */
|
|
1702
|
+
return /* @__PURE__ */ React52.createElement(
|
|
1684
1703
|
AddOrRemoveContent,
|
|
1685
1704
|
{
|
|
1686
|
-
label: (0,
|
|
1705
|
+
label: (0, import_i18n33.__)("Text Stroke", "elementor"),
|
|
1687
1706
|
isAdded: hasTextStroke,
|
|
1688
1707
|
onAdd: addTextStroke,
|
|
1689
1708
|
onRemove: removeTextStroke
|
|
1690
1709
|
},
|
|
1691
|
-
/* @__PURE__ */
|
|
1710
|
+
/* @__PURE__ */ React52.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React52.createElement(import_editor_controls37.StrokeControl, null))
|
|
1692
1711
|
);
|
|
1693
1712
|
};
|
|
1694
1713
|
|
|
1695
1714
|
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
1696
|
-
var
|
|
1697
|
-
var
|
|
1715
|
+
var React53 = __toESM(require("react"));
|
|
1716
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
1698
1717
|
var import_icons17 = require("@elementor/icons");
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
1718
|
+
var import_ui44 = require("@elementor/ui");
|
|
1719
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
1701
1720
|
var buttonSize = "tiny";
|
|
1702
1721
|
var TextStyleField = () => {
|
|
1703
1722
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
@@ -1721,7 +1740,7 @@ var TextStyleField = () => {
|
|
|
1721
1740
|
value: newValue
|
|
1722
1741
|
});
|
|
1723
1742
|
};
|
|
1724
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ React53.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls38.ControlLabel, null, (0, import_i18n34.__)("Style", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(import_ui44.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React53.createElement(
|
|
1725
1744
|
ToggleButton,
|
|
1726
1745
|
{
|
|
1727
1746
|
value: "italic",
|
|
@@ -1729,8 +1748,8 @@ var TextStyleField = () => {
|
|
|
1729
1748
|
"aria-label": "italic",
|
|
1730
1749
|
sx: { marginLeft: "auto" }
|
|
1731
1750
|
},
|
|
1732
|
-
/* @__PURE__ */
|
|
1733
|
-
), /* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ React53.createElement(import_icons17.ItalicIcon, { fontSize: buttonSize })
|
|
1752
|
+
), /* @__PURE__ */ React53.createElement(
|
|
1734
1753
|
ShorthandControl,
|
|
1735
1754
|
{
|
|
1736
1755
|
value: "line-through",
|
|
@@ -1738,8 +1757,8 @@ var TextStyleField = () => {
|
|
|
1738
1757
|
updateValues: handleSetTextDecoration,
|
|
1739
1758
|
"aria-label": "line-through"
|
|
1740
1759
|
},
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
), /* @__PURE__ */
|
|
1760
|
+
/* @__PURE__ */ React53.createElement(import_icons17.StrikethroughIcon, { fontSize: buttonSize })
|
|
1761
|
+
), /* @__PURE__ */ React53.createElement(
|
|
1743
1762
|
ShorthandControl,
|
|
1744
1763
|
{
|
|
1745
1764
|
value: "underline",
|
|
@@ -1747,7 +1766,7 @@ var TextStyleField = () => {
|
|
|
1747
1766
|
updateValues: handleSetTextDecoration,
|
|
1748
1767
|
"aria-label": "underline"
|
|
1749
1768
|
},
|
|
1750
|
-
/* @__PURE__ */
|
|
1769
|
+
/* @__PURE__ */ React53.createElement(import_icons17.UnderlineIcon, { fontSize: buttonSize })
|
|
1751
1770
|
))));
|
|
1752
1771
|
};
|
|
1753
1772
|
var ShorthandControl = ({
|
|
@@ -1766,52 +1785,52 @@ var ShorthandControl = ({
|
|
|
1766
1785
|
updateValues([...valuesArr, newValue].join(" "));
|
|
1767
1786
|
}
|
|
1768
1787
|
};
|
|
1769
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ React53.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
1770
1789
|
};
|
|
1771
1790
|
var ToggleButton = ({ onChange, ...props }) => {
|
|
1772
1791
|
const handleChange = (_e, newValue) => {
|
|
1773
1792
|
onChange(newValue);
|
|
1774
1793
|
};
|
|
1775
|
-
return /* @__PURE__ */
|
|
1794
|
+
return /* @__PURE__ */ React53.createElement(import_ui44.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
|
|
1776
1795
|
};
|
|
1777
1796
|
|
|
1778
1797
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
1779
|
-
var
|
|
1780
|
-
var
|
|
1798
|
+
var React54 = __toESM(require("react"));
|
|
1799
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
1781
1800
|
var import_icons18 = require("@elementor/icons");
|
|
1782
|
-
var
|
|
1783
|
-
var
|
|
1801
|
+
var import_ui45 = require("@elementor/ui");
|
|
1802
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
1784
1803
|
var options9 = [
|
|
1785
1804
|
{
|
|
1786
1805
|
value: "capitalize",
|
|
1787
|
-
label: (0,
|
|
1788
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1806
|
+
label: (0, import_i18n35.__)("Capitalize", "elementor"),
|
|
1807
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(import_icons18.LetterCaseIcon, { fontSize: size })
|
|
1789
1808
|
},
|
|
1790
1809
|
{
|
|
1791
1810
|
value: "uppercase",
|
|
1792
|
-
label: (0,
|
|
1793
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1811
|
+
label: (0, import_i18n35.__)("Uppercase", "elementor"),
|
|
1812
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(import_icons18.LetterCaseUpperIcon, { fontSize: size })
|
|
1794
1813
|
},
|
|
1795
1814
|
{
|
|
1796
1815
|
value: "lowercase",
|
|
1797
|
-
label: (0,
|
|
1798
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1816
|
+
label: (0, import_i18n35.__)("Lowercase", "elementor"),
|
|
1817
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(import_icons18.LetterCaseLowerIcon, { fontSize: size })
|
|
1799
1818
|
}
|
|
1800
1819
|
];
|
|
1801
|
-
var TransformField = () => /* @__PURE__ */
|
|
1820
|
+
var TransformField = () => /* @__PURE__ */ React54.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls39.ControlLabel, null, (0, import_i18n35.__)("Transform", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(import_editor_controls39.ToggleControl, { options: options9 }))));
|
|
1802
1821
|
|
|
1803
1822
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
1804
|
-
var
|
|
1805
|
-
var
|
|
1806
|
-
var
|
|
1807
|
-
var
|
|
1823
|
+
var React55 = __toESM(require("react"));
|
|
1824
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
1825
|
+
var import_ui46 = require("@elementor/ui");
|
|
1826
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
1808
1827
|
var WordSpacingField = () => {
|
|
1809
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls40.ControlLabel, null, (0, import_i18n36.__)("Word Spacing", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls40.SizeControl, null))));
|
|
1810
1829
|
};
|
|
1811
1830
|
|
|
1812
1831
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1813
1832
|
var TypographySection = () => {
|
|
1814
|
-
return /* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ React56.createElement(import_ui47.Stack, { gap: 1.5 }, /* @__PURE__ */ React56.createElement(FontFamilyField, null), /* @__PURE__ */ React56.createElement(FontWeightField, null), /* @__PURE__ */ React56.createElement(FontSizeField, null), /* @__PURE__ */ React56.createElement(import_ui47.Divider, null), /* @__PURE__ */ React56.createElement(TextAlignmentField, null), /* @__PURE__ */ React56.createElement(TextColorField, null), /* @__PURE__ */ React56.createElement(CollapsibleContent, null, /* @__PURE__ */ React56.createElement(import_ui47.Stack, { 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(import_ui47.Divider, null), /* @__PURE__ */ React56.createElement(TextStyleField, null), /* @__PURE__ */ React56.createElement(TransformField, null), /* @__PURE__ */ React56.createElement(TextDirectionField, null), /* @__PURE__ */ React56.createElement(TextStrokeField, null))));
|
|
1815
1834
|
};
|
|
1816
1835
|
|
|
1817
1836
|
// src/components/style-tab.tsx
|
|
@@ -1820,7 +1839,7 @@ var StyleTab = () => {
|
|
|
1820
1839
|
const currentClassesProp = useCurrentClassesProp();
|
|
1821
1840
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
1822
1841
|
const breakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
1823
|
-
return /* @__PURE__ */
|
|
1842
|
+
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(import_ui48.Divider, null), /* @__PURE__ */ React57.createElement(SectionsList, null, /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Layout", "elementor") }, /* @__PURE__ */ React57.createElement(LayoutSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Spacing", "elementor") }, /* @__PURE__ */ React57.createElement(SpacingSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Size", "elementor") }, /* @__PURE__ */ React57.createElement(SizeSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Position", "elementor") }, /* @__PURE__ */ React57.createElement(PositionSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Typography", "elementor") }, /* @__PURE__ */ React57.createElement(TypographySection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Background", "elementor") }, /* @__PURE__ */ React57.createElement(BackgroundSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Border", "elementor") }, /* @__PURE__ */ React57.createElement(BorderSection, null)), /* @__PURE__ */ React57.createElement(Section, { title: (0, import_i18n37.__)("Effects", "elementor") }, /* @__PURE__ */ React57.createElement(EffectsSection, null)))));
|
|
1824
1843
|
};
|
|
1825
1844
|
function useActiveStyleDefId(currentClassesProp) {
|
|
1826
1845
|
const [activeStyledDefId, setActiveStyledDefId] = (0, import_react11.useState)(null);
|
|
@@ -1829,8 +1848,8 @@ function useActiveStyleDefId(currentClassesProp) {
|
|
|
1829
1848
|
}
|
|
1830
1849
|
function useFirstElementStyleDef(currentClassesProp) {
|
|
1831
1850
|
const { element } = useElement();
|
|
1832
|
-
const classesIds = (0,
|
|
1833
|
-
const stylesDefs = (0,
|
|
1851
|
+
const classesIds = (0, import_editor_elements5.useElementSetting)(element.id, currentClassesProp)?.value || [];
|
|
1852
|
+
const stylesDefs = (0, import_editor_elements5.useElementStyles)(element.id);
|
|
1834
1853
|
return Object.values(stylesDefs).find((styleDef) => classesIds.includes(styleDef.id));
|
|
1835
1854
|
}
|
|
1836
1855
|
function useCurrentClassesProp() {
|
|
@@ -1847,25 +1866,25 @@ function useCurrentClassesProp() {
|
|
|
1847
1866
|
// src/components/editing-panel-tabs.tsx
|
|
1848
1867
|
var EditingPanelTabs = () => {
|
|
1849
1868
|
const { element } = useElement();
|
|
1850
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
1869
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui49.useTabs)("settings");
|
|
1851
1870
|
return (
|
|
1852
1871
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
1853
1872
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
1854
|
-
/* @__PURE__ */
|
|
1873
|
+
/* @__PURE__ */ React58.createElement(import_react12.Fragment, { key: element.id }, /* @__PURE__ */ React58.createElement(import_ui49.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React58.createElement(import_ui49.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React58.createElement(import_ui49.Tab, { label: (0, import_i18n38.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React58.createElement(import_ui49.Tab, { label: (0, import_i18n38.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React58.createElement(import_ui49.Divider, null), /* @__PURE__ */ React58.createElement(import_ui49.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React58.createElement(SettingsTab, null)), /* @__PURE__ */ React58.createElement(import_ui49.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React58.createElement(StyleTab, null))))
|
|
1855
1874
|
);
|
|
1856
1875
|
};
|
|
1857
1876
|
|
|
1858
1877
|
// src/components/editing-panel.tsx
|
|
1859
1878
|
var { useMenuItems } = controlActionsMenu;
|
|
1860
1879
|
var EditingPanel = () => {
|
|
1861
|
-
const { element, elementType } = (0,
|
|
1880
|
+
const { element, elementType } = (0, import_editor_elements6.useSelectedElement)();
|
|
1862
1881
|
const controlReplacement = getControlReplacement();
|
|
1863
1882
|
const menuItems = useMenuItems().default;
|
|
1864
1883
|
if (!element || !elementType) {
|
|
1865
1884
|
return null;
|
|
1866
1885
|
}
|
|
1867
|
-
const panelTitle = (0,
|
|
1868
|
-
return /* @__PURE__ */
|
|
1886
|
+
const panelTitle = (0, import_i18n39.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
1887
|
+
return /* @__PURE__ */ React59.createElement(import_ui50.ErrorBoundary, { fallback: /* @__PURE__ */ React59.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React59.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React59.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React59.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React59.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React59.createElement(import_editor_controls41.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React59.createElement(import_editor_controls41.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React59.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React59.createElement(EditingPanelTabs, null)))))));
|
|
1869
1888
|
};
|
|
1870
1889
|
|
|
1871
1890
|
// src/panel.ts
|
|
@@ -1875,10 +1894,10 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
1875
1894
|
});
|
|
1876
1895
|
|
|
1877
1896
|
// src/sync/is-atomic-widget-selected.ts
|
|
1878
|
-
var
|
|
1897
|
+
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
1879
1898
|
var isAtomicWidgetSelected = () => {
|
|
1880
|
-
const selectedElements = (0,
|
|
1881
|
-
const widgetCache = (0,
|
|
1899
|
+
const selectedElements = (0, import_editor_elements7.getSelectedElements)();
|
|
1900
|
+
const widgetCache = (0, import_editor_elements7.getWidgetsCache)();
|
|
1882
1901
|
if (selectedElements.length !== 1) {
|
|
1883
1902
|
return false;
|
|
1884
1903
|
}
|
|
@@ -1889,10 +1908,10 @@ var isAtomicWidgetSelected = () => {
|
|
|
1889
1908
|
var useCloseEditorPanel = () => {
|
|
1890
1909
|
const { close } = usePanelActions();
|
|
1891
1910
|
return (0, import_react13.useEffect)(() => {
|
|
1892
|
-
return (0,
|
|
1893
|
-
const selectedElement = (0,
|
|
1911
|
+
return (0, import_editor_v1_adapters2.__privateListenTo)((0, import_editor_v1_adapters2.commandStartEvent)("document/elements/delete"), (e) => {
|
|
1912
|
+
const selectedElement = (0, import_editor_elements8.getSelectedElements)()[0];
|
|
1894
1913
|
const { container: deletedContainer } = e?.args;
|
|
1895
|
-
const isSelectedElementInDeletedContainer = deletedContainer && selectedElement && (0,
|
|
1914
|
+
const isSelectedElementInDeletedContainer = deletedContainer && selectedElement && (0, import_editor_elements8.isElementInContainer)(selectedElement, deletedContainer);
|
|
1896
1915
|
if (isSelectedElementInDeletedContainer && isAtomicWidgetSelected()) {
|
|
1897
1916
|
close();
|
|
1898
1917
|
}
|
|
@@ -1902,11 +1921,11 @@ var useCloseEditorPanel = () => {
|
|
|
1902
1921
|
|
|
1903
1922
|
// src/hooks/use-open-editor-panel.ts
|
|
1904
1923
|
var import_react14 = require("react");
|
|
1905
|
-
var
|
|
1924
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1906
1925
|
var useOpenEditorPanel = () => {
|
|
1907
1926
|
const { open } = usePanelActions();
|
|
1908
1927
|
(0, import_react14.useEffect)(() => {
|
|
1909
|
-
return (0,
|
|
1928
|
+
return (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("panel/editor/open"), () => {
|
|
1910
1929
|
if (isAtomicWidgetSelected()) {
|
|
1911
1930
|
open();
|
|
1912
1931
|
}
|
|
@@ -1922,12 +1941,12 @@ var EditingPanelHooks = () => {
|
|
|
1922
1941
|
};
|
|
1923
1942
|
|
|
1924
1943
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
1925
|
-
var
|
|
1944
|
+
var React62 = __toESM(require("react"));
|
|
1926
1945
|
var import_react18 = require("react");
|
|
1927
|
-
var
|
|
1946
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
1928
1947
|
var import_icons20 = require("@elementor/icons");
|
|
1929
|
-
var
|
|
1930
|
-
var
|
|
1948
|
+
var import_ui52 = require("@elementor/ui");
|
|
1949
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
1931
1950
|
|
|
1932
1951
|
// src/hooks/use-persist-dynamic-value.ts
|
|
1933
1952
|
var usePersistDynamicValue = (propKey) => {
|
|
@@ -1937,9 +1956,8 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
1937
1956
|
};
|
|
1938
1957
|
|
|
1939
1958
|
// src/dynamics/dynamic-control.tsx
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
1942
|
-
var import_editor_props5 = require("@elementor/editor-props");
|
|
1959
|
+
var React60 = __toESM(require("react"));
|
|
1960
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
1943
1961
|
|
|
1944
1962
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
1945
1963
|
var import_react16 = require("react");
|
|
@@ -2018,7 +2036,7 @@ var useDynamicTag = (propName, tagName) => {
|
|
|
2018
2036
|
|
|
2019
2037
|
// src/dynamics/dynamic-control.tsx
|
|
2020
2038
|
var DynamicControl = ({ bind, children }) => {
|
|
2021
|
-
const { value, setValue, bind: propName } = (0,
|
|
2039
|
+
const { value, setValue, bind: propName } = (0, import_editor_controls42.useBoundProp)(dynamicPropTypeUtil);
|
|
2022
2040
|
const { name = "", settings } = value ?? {};
|
|
2023
2041
|
const dynamicTag = useDynamicTag(propName, name);
|
|
2024
2042
|
if (!dynamicTag) {
|
|
@@ -2031,27 +2049,26 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2031
2049
|
name,
|
|
2032
2050
|
settings: {
|
|
2033
2051
|
...settings,
|
|
2034
|
-
|
|
2035
|
-
[bind]: (0, import_editor_props5.isTransformable)(newValue) ? newValue.value : newValue
|
|
2052
|
+
[bind]: newValue
|
|
2036
2053
|
}
|
|
2037
2054
|
});
|
|
2038
2055
|
};
|
|
2039
|
-
return /* @__PURE__ */
|
|
2056
|
+
return /* @__PURE__ */ React60.createElement(import_editor_controls42.BoundPropProvider, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
|
|
2040
2057
|
};
|
|
2041
2058
|
|
|
2042
2059
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2043
|
-
var
|
|
2060
|
+
var React61 = __toESM(require("react"));
|
|
2044
2061
|
var import_react17 = require("react");
|
|
2045
|
-
var
|
|
2062
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
2046
2063
|
var import_icons19 = require("@elementor/icons");
|
|
2047
|
-
var
|
|
2048
|
-
var
|
|
2064
|
+
var import_ui51 = require("@elementor/ui");
|
|
2065
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
2049
2066
|
var SIZE3 = "tiny";
|
|
2050
2067
|
var DynamicSelection = ({ onSelect }) => {
|
|
2051
2068
|
const [searchValue, setSearchValue] = (0, import_react17.useState)("");
|
|
2052
2069
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2053
|
-
const { value: anyValue } = (0,
|
|
2054
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
2070
|
+
const { value: anyValue } = (0, import_editor_controls43.useBoundProp)();
|
|
2071
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls43.useBoundProp)(dynamicPropTypeUtil);
|
|
2055
2072
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2056
2073
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2057
2074
|
const options10 = useFilteredOptions(bind, searchValue);
|
|
@@ -2065,22 +2082,22 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2065
2082
|
setValue({ name: value, settings: {} });
|
|
2066
2083
|
onSelect?.();
|
|
2067
2084
|
};
|
|
2068
|
-
return /* @__PURE__ */
|
|
2069
|
-
|
|
2085
|
+
return /* @__PURE__ */ React61.createElement(import_ui51.Stack, null, /* @__PURE__ */ React61.createElement(import_ui51.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React61.createElement(
|
|
2086
|
+
import_ui51.TextField,
|
|
2070
2087
|
{
|
|
2071
2088
|
fullWidth: true,
|
|
2072
2089
|
size: SIZE3,
|
|
2073
2090
|
value: searchValue,
|
|
2074
2091
|
onChange: handleSearch,
|
|
2075
|
-
placeholder: (0,
|
|
2092
|
+
placeholder: (0, import_i18n40.__)("Search dynamic tag", "elementor"),
|
|
2076
2093
|
InputProps: {
|
|
2077
|
-
startAdornment: /* @__PURE__ */
|
|
2094
|
+
startAdornment: /* @__PURE__ */ React61.createElement(import_ui51.InputAdornment, { position: "start" }, /* @__PURE__ */ React61.createElement(import_icons19.SearchIcon, { fontSize: SIZE3 }))
|
|
2078
2095
|
}
|
|
2079
2096
|
}
|
|
2080
|
-
)), /* @__PURE__ */
|
|
2097
|
+
)), /* @__PURE__ */ React61.createElement(import_ui51.Divider, null), /* @__PURE__ */ React61.createElement(import_ui51.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React61.createElement(import_ui51.MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React61.createElement(import_react17.Fragment, { key: index }, /* @__PURE__ */ React61.createElement(import_ui51.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2081
2098
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2082
|
-
return /* @__PURE__ */
|
|
2083
|
-
|
|
2099
|
+
return /* @__PURE__ */ React61.createElement(
|
|
2100
|
+
import_ui51.MenuItem,
|
|
2084
2101
|
{
|
|
2085
2102
|
key: value,
|
|
2086
2103
|
selected: isSelected,
|
|
@@ -2090,16 +2107,16 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2090
2107
|
},
|
|
2091
2108
|
tagLabel
|
|
2092
2109
|
);
|
|
2093
|
-
})))) : /* @__PURE__ */
|
|
2094
|
-
|
|
2110
|
+
})))) : /* @__PURE__ */ React61.createElement(import_ui51.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React61.createElement(import_icons19.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React61.createElement(import_ui51.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n40.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React61.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React61.createElement(import_ui51.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React61.createElement(
|
|
2111
|
+
import_ui51.Link,
|
|
2095
2112
|
{
|
|
2096
2113
|
color: "secondary",
|
|
2097
2114
|
variant: "caption",
|
|
2098
2115
|
component: "button",
|
|
2099
2116
|
onClick: () => setSearchValue("")
|
|
2100
2117
|
},
|
|
2101
|
-
(0,
|
|
2102
|
-
), "\xA0", (0,
|
|
2118
|
+
(0, import_i18n40.__)("Clear the filters", "elementor")
|
|
2119
|
+
), "\xA0", (0, import_i18n40.__)("and try again.", "elementor")))));
|
|
2103
2120
|
};
|
|
2104
2121
|
var useFilteredOptions = (bind, searchValue) => {
|
|
2105
2122
|
const dynamicTags = usePropDynamicTags(bind);
|
|
@@ -2120,12 +2137,12 @@ var useFilteredOptions = (bind, searchValue) => {
|
|
|
2120
2137
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2121
2138
|
var SIZE4 = "tiny";
|
|
2122
2139
|
var DynamicSelectionControl = () => {
|
|
2123
|
-
const { setValue: setAnyValue } = (0,
|
|
2124
|
-
const { bind, value } = (0,
|
|
2140
|
+
const { setValue: setAnyValue } = (0, import_editor_controls44.useBoundProp)();
|
|
2141
|
+
const { bind, value } = (0, import_editor_controls44.useBoundProp)(dynamicPropTypeUtil);
|
|
2125
2142
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
2126
2143
|
const { name: tagName = "" } = value;
|
|
2127
2144
|
const selectionPopoverId = (0, import_react18.useId)();
|
|
2128
|
-
const selectionPopoverState = (0,
|
|
2145
|
+
const selectionPopoverState = (0, import_ui52.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
|
|
2129
2146
|
const dynamicTag = useDynamicTag(bind, tagName);
|
|
2130
2147
|
const removeDynamicTag = () => {
|
|
2131
2148
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -2133,70 +2150,70 @@ var DynamicSelectionControl = () => {
|
|
|
2133
2150
|
if (!dynamicTag) {
|
|
2134
2151
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2135
2152
|
}
|
|
2136
|
-
return /* @__PURE__ */
|
|
2137
|
-
|
|
2153
|
+
return /* @__PURE__ */ React62.createElement(import_ui52.Box, null, /* @__PURE__ */ React62.createElement(
|
|
2154
|
+
import_ui52.UnstableTag,
|
|
2138
2155
|
{
|
|
2139
2156
|
fullWidth: true,
|
|
2140
2157
|
showActionsOnHover: true,
|
|
2141
2158
|
label: dynamicTag.label,
|
|
2142
|
-
startIcon: /* @__PURE__ */
|
|
2143
|
-
...(0,
|
|
2144
|
-
actions: /* @__PURE__ */
|
|
2145
|
-
|
|
2159
|
+
startIcon: /* @__PURE__ */ React62.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4 }),
|
|
2160
|
+
...(0, import_ui52.bindTrigger)(selectionPopoverState),
|
|
2161
|
+
actions: /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React62.createElement(
|
|
2162
|
+
import_ui52.IconButton,
|
|
2146
2163
|
{
|
|
2147
2164
|
size: SIZE4,
|
|
2148
2165
|
onClick: removeDynamicTag,
|
|
2149
|
-
"aria-label": (0,
|
|
2166
|
+
"aria-label": (0, import_i18n41.__)("Remove dynamic value", "elementor")
|
|
2150
2167
|
},
|
|
2151
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ React62.createElement(import_icons20.XIcon, { fontSize: SIZE4 })
|
|
2152
2169
|
))
|
|
2153
2170
|
}
|
|
2154
|
-
), /* @__PURE__ */
|
|
2155
|
-
|
|
2171
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2172
|
+
import_ui52.Popover,
|
|
2156
2173
|
{
|
|
2157
2174
|
disablePortal: true,
|
|
2158
2175
|
disableScrollLock: true,
|
|
2159
2176
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2160
|
-
...(0,
|
|
2177
|
+
...(0, import_ui52.bindPopover)(selectionPopoverState)
|
|
2161
2178
|
},
|
|
2162
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ React62.createElement(import_ui52.Stack, null, /* @__PURE__ */ React62.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React62.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React62.createElement(import_ui52.Typography, { variant: "subtitle2" }, (0, import_i18n41.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React62.createElement(import_ui52.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React62.createElement(import_icons20.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React62.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2163
2180
|
));
|
|
2164
2181
|
};
|
|
2165
2182
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
2166
2183
|
const popupId = (0, import_react18.useId)();
|
|
2167
|
-
const settingsPopupState = (0,
|
|
2184
|
+
const settingsPopupState = (0, import_ui52.usePopupState)({ variant: "popover", popupId });
|
|
2168
2185
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
2169
2186
|
if (!hasDynamicSettings) {
|
|
2170
2187
|
return null;
|
|
2171
2188
|
}
|
|
2172
|
-
return /* @__PURE__ */
|
|
2173
|
-
|
|
2189
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
2190
|
+
import_ui52.IconButton,
|
|
2174
2191
|
{
|
|
2175
2192
|
size: SIZE4,
|
|
2176
|
-
...(0,
|
|
2177
|
-
"aria-label": (0,
|
|
2193
|
+
...(0, import_ui52.bindTrigger)(settingsPopupState),
|
|
2194
|
+
"aria-label": (0, import_i18n41.__)("Settings", "elementor")
|
|
2178
2195
|
},
|
|
2179
|
-
/* @__PURE__ */
|
|
2180
|
-
), /* @__PURE__ */
|
|
2181
|
-
|
|
2196
|
+
/* @__PURE__ */ React62.createElement(import_icons20.SettingsIcon, { fontSize: SIZE4 })
|
|
2197
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2198
|
+
import_ui52.Popover,
|
|
2182
2199
|
{
|
|
2183
2200
|
disableScrollLock: true,
|
|
2184
2201
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2185
|
-
...(0,
|
|
2202
|
+
...(0, import_ui52.bindPopover)(settingsPopupState)
|
|
2186
2203
|
},
|
|
2187
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ React62.createElement(import_ui52.Paper, { component: import_ui52.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React62.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React62.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React62.createElement(import_ui52.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React62.createElement(import_ui52.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React62.createElement(import_icons20.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React62.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2188
2205
|
));
|
|
2189
2206
|
};
|
|
2190
2207
|
var DynamicSettings = ({ controls }) => {
|
|
2191
2208
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
2192
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
2209
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui52.useTabs)(0);
|
|
2193
2210
|
if (!tabs.length) {
|
|
2194
2211
|
return null;
|
|
2195
2212
|
}
|
|
2196
|
-
return /* @__PURE__ */
|
|
2197
|
-
return /* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(import_ui52.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React62.createElement(import_ui52.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React62.createElement(import_ui52.Divider, null), tabs.map(({ value }, index) => {
|
|
2214
|
+
return /* @__PURE__ */ React62.createElement(import_ui52.TabPanel, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React62.createElement(import_ui52.Stack, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
2198
2215
|
if (item.type === "control") {
|
|
2199
|
-
return /* @__PURE__ */
|
|
2216
|
+
return /* @__PURE__ */ React62.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2200
2217
|
}
|
|
2201
2218
|
return null;
|
|
2202
2219
|
})));
|
|
@@ -2206,24 +2223,24 @@ var Control3 = ({ control }) => {
|
|
|
2206
2223
|
if (!getControlByType(control.type)) {
|
|
2207
2224
|
return null;
|
|
2208
2225
|
}
|
|
2209
|
-
return /* @__PURE__ */
|
|
2226
|
+
return /* @__PURE__ */ React62.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React62.createElement(import_editor_controls44.ControlLabel, null, control.label) : null, /* @__PURE__ */ React62.createElement(Control, { type: control.type, props: control.props }));
|
|
2210
2227
|
};
|
|
2211
2228
|
|
|
2212
2229
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2213
|
-
var
|
|
2214
|
-
var
|
|
2230
|
+
var React63 = __toESM(require("react"));
|
|
2231
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
2215
2232
|
var import_icons21 = require("@elementor/icons");
|
|
2216
|
-
var
|
|
2233
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
2217
2234
|
var usePropDynamicAction = () => {
|
|
2218
|
-
const { bind } = (0,
|
|
2235
|
+
const { bind } = (0, import_editor_controls45.useBoundProp)();
|
|
2219
2236
|
const { elementType } = useElement();
|
|
2220
2237
|
const propType = elementType.propsSchema[bind];
|
|
2221
2238
|
const visible = !!propType && supportsDynamic(propType);
|
|
2222
2239
|
return {
|
|
2223
2240
|
visible,
|
|
2224
2241
|
icon: import_icons21.DatabaseIcon,
|
|
2225
|
-
title: (0,
|
|
2226
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2242
|
+
title: (0, import_i18n42.__)("Dynamic Tags", "elementor"),
|
|
2243
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React63.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2227
2244
|
};
|
|
2228
2245
|
};
|
|
2229
2246
|
|
|
@@ -2251,7 +2268,7 @@ function init2() {
|
|
|
2251
2268
|
init();
|
|
2252
2269
|
}
|
|
2253
2270
|
var blockV1Panel = () => {
|
|
2254
|
-
(0,
|
|
2271
|
+
(0, import_editor_v1_adapters4.__privateBlockDataCommand)({
|
|
2255
2272
|
command: "panel/editor/open",
|
|
2256
2273
|
condition: isAtomicWidgetSelected
|
|
2257
2274
|
});
|