@elementor/editor-editing-panel 1.44.0 → 1.45.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 +20 -0
- package/dist/index.js +479 -391
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +410 -320
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/style-sections/border-section/border-radius-field.tsx +12 -9
- package/src/components/style-sections/layout-section/align-content-field.tsx +10 -14
- package/src/components/style-sections/layout-section/align-items-field.tsx +13 -17
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +13 -17
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +13 -17
- package/src/components/style-sections/layout-section/flex-order-field.tsx +30 -33
- package/src/components/style-sections/layout-section/flex-size-field.tsx +60 -59
- package/src/components/style-sections/layout-section/justify-content-field.tsx +10 -14
- package/src/components/style-sections/layout-section/wrap-field.tsx +13 -17
- package/src/components/style-sections/position-section/dimensions-field.tsx +39 -21
- package/src/components/style-sections/position-section/offset-field.tsx +5 -2
- package/src/components/style-sections/size-section/size-section.tsx +51 -36
- package/src/components/style-sections/spacing-section/spacing-section.tsx +1 -1
- package/src/components/style-sections/typography-section/column-gap-field.tsx +5 -2
- package/src/components/style-sections/typography-section/font-size-field.tsx +5 -2
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +5 -2
- package/src/components/style-sections/typography-section/line-height-field.tsx +5 -2
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +12 -9
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +5 -2
- package/src/dynamics/components/background-control-dynamic-tag.tsx +48 -0
- package/src/dynamics/init.ts +21 -0
- package/src/styles-inheritance/components/ui-providers.tsx +18 -0
package/dist/index.js
CHANGED
|
@@ -34,13 +34,13 @@ __export(index_exports, {
|
|
|
34
34
|
init: () => init3,
|
|
35
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
36
36
|
registerControlReplacement: () => registerControlReplacement,
|
|
37
|
-
useBoundProp: () =>
|
|
37
|
+
useBoundProp: () => import_editor_controls59.useBoundProp,
|
|
38
38
|
useFontFamilies: () => useFontFamilies,
|
|
39
39
|
usePanelActions: () => usePanelActions,
|
|
40
40
|
usePanelStatus: () => usePanelStatus
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
var
|
|
43
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
44
44
|
|
|
45
45
|
// src/control-replacement.tsx
|
|
46
46
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -1159,14 +1159,14 @@ function useHandleSelect() {
|
|
|
1159
1159
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
1160
1160
|
|
|
1161
1161
|
// src/components/editing-panel.tsx
|
|
1162
|
-
var
|
|
1162
|
+
var React84 = __toESM(require("react"));
|
|
1163
1163
|
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
1164
1164
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
1165
1165
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1166
1166
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
1167
1167
|
var import_icons24 = require("@elementor/icons");
|
|
1168
1168
|
var import_session5 = require("@elementor/session");
|
|
1169
|
-
var
|
|
1169
|
+
var import_ui69 = require("@elementor/ui");
|
|
1170
1170
|
var import_i18n55 = require("@wordpress/i18n");
|
|
1171
1171
|
|
|
1172
1172
|
// src/controls-actions.ts
|
|
@@ -1235,10 +1235,10 @@ function EditorPanelErrorFallback() {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
1237
|
// src/components/editing-panel-tabs.tsx
|
|
1238
|
-
var
|
|
1239
|
-
var
|
|
1238
|
+
var React83 = __toESM(require("react"));
|
|
1239
|
+
var import_react36 = require("react");
|
|
1240
1240
|
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1241
|
-
var
|
|
1241
|
+
var import_ui68 = require("@elementor/ui");
|
|
1242
1242
|
var import_i18n54 = require("@wordpress/i18n");
|
|
1243
1243
|
|
|
1244
1244
|
// src/contexts/scroll-context.tsx
|
|
@@ -1547,12 +1547,12 @@ var Control2 = ({ control }) => {
|
|
|
1547
1547
|
};
|
|
1548
1548
|
|
|
1549
1549
|
// src/components/style-tab.tsx
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1550
|
+
var React82 = __toESM(require("react"));
|
|
1551
|
+
var import_react35 = require("react");
|
|
1552
1552
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
1553
1553
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1554
1554
|
var import_session4 = require("@elementor/session");
|
|
1555
|
-
var
|
|
1555
|
+
var import_ui67 = require("@elementor/ui");
|
|
1556
1556
|
var import_i18n53 = require("@wordpress/i18n");
|
|
1557
1557
|
|
|
1558
1558
|
// src/contexts/styles-inheritance-context.tsx
|
|
@@ -2465,7 +2465,7 @@ var BackgroundSection = () => {
|
|
|
2465
2465
|
};
|
|
2466
2466
|
|
|
2467
2467
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2468
|
-
var
|
|
2468
|
+
var React39 = __toESM(require("react"));
|
|
2469
2469
|
|
|
2470
2470
|
// src/components/panel-divider.tsx
|
|
2471
2471
|
var React30 = __toESM(require("react"));
|
|
@@ -2625,16 +2625,26 @@ var BorderField = () => {
|
|
|
2625
2625
|
};
|
|
2626
2626
|
|
|
2627
2627
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2628
|
-
var
|
|
2628
|
+
var React38 = __toESM(require("react"));
|
|
2629
2629
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
2630
2630
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
2631
2631
|
var import_icons8 = require("@elementor/icons");
|
|
2632
|
-
var
|
|
2632
|
+
var import_ui32 = require("@elementor/ui");
|
|
2633
2633
|
var import_i18n15 = require("@wordpress/i18n");
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
var
|
|
2637
|
-
var
|
|
2634
|
+
|
|
2635
|
+
// src/styles-inheritance/components/ui-providers.tsx
|
|
2636
|
+
var React37 = __toESM(require("react"));
|
|
2637
|
+
var import_ui31 = require("@elementor/ui");
|
|
2638
|
+
var UiProviders = ({ children }) => {
|
|
2639
|
+
const { isSiteRtl } = useDirection();
|
|
2640
|
+
return /* @__PURE__ */ React37.createElement(import_ui31.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(import_ui31.ThemeProvider, null, children));
|
|
2641
|
+
};
|
|
2642
|
+
|
|
2643
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2644
|
+
var StartStartIcon = (0, import_ui32.withDirection)(import_icons8.RadiusTopLeftIcon);
|
|
2645
|
+
var StartEndIcon = (0, import_ui32.withDirection)(import_icons8.RadiusTopRightIcon);
|
|
2646
|
+
var EndStartIcon = (0, import_ui32.withDirection)(import_icons8.RadiusBottomLeftIcon);
|
|
2647
|
+
var EndEndIcon = (0, import_ui32.withDirection)(import_icons8.RadiusBottomRightIcon);
|
|
2638
2648
|
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Top right", "elementor") : (0, import_i18n15.__)("Top left", "elementor");
|
|
2639
2649
|
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Top left", "elementor") : (0, import_i18n15.__)("Top right", "elementor");
|
|
2640
2650
|
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Bottom right", "elementor") : (0, import_i18n15.__)("Bottom left", "elementor");
|
|
@@ -2642,51 +2652,51 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Bottom le
|
|
|
2642
2652
|
var getCorners = (isSiteRtl) => [
|
|
2643
2653
|
{
|
|
2644
2654
|
label: getStartStartLabel(isSiteRtl),
|
|
2645
|
-
icon: /* @__PURE__ */
|
|
2655
|
+
icon: /* @__PURE__ */ React38.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2646
2656
|
bind: "start-start"
|
|
2647
2657
|
},
|
|
2648
2658
|
{
|
|
2649
2659
|
label: getStartEndLabel(isSiteRtl),
|
|
2650
|
-
icon: /* @__PURE__ */
|
|
2660
|
+
icon: /* @__PURE__ */ React38.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2651
2661
|
bind: "start-end"
|
|
2652
2662
|
},
|
|
2653
2663
|
{
|
|
2654
2664
|
label: getEndStartLabel(isSiteRtl),
|
|
2655
|
-
icon: /* @__PURE__ */
|
|
2665
|
+
icon: /* @__PURE__ */ React38.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2656
2666
|
bind: "end-start"
|
|
2657
2667
|
},
|
|
2658
2668
|
{
|
|
2659
2669
|
label: getEndEndLabel(isSiteRtl),
|
|
2660
|
-
icon: /* @__PURE__ */
|
|
2670
|
+
icon: /* @__PURE__ */ React38.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2661
2671
|
bind: "end-end"
|
|
2662
2672
|
}
|
|
2663
2673
|
];
|
|
2664
2674
|
var BorderRadiusField = () => {
|
|
2665
2675
|
const { isSiteRtl } = useDirection();
|
|
2666
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ React38.createElement(UiProviders, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React38.createElement(
|
|
2667
2677
|
import_editor_controls13.EqualUnequalSizesControl,
|
|
2668
2678
|
{
|
|
2669
2679
|
items: getCorners(isSiteRtl),
|
|
2670
2680
|
label: (0, import_i18n15.__)("Border radius", "elementor"),
|
|
2671
|
-
icon: /* @__PURE__ */
|
|
2681
|
+
icon: /* @__PURE__ */ React38.createElement(import_icons8.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2672
2682
|
tooltipLabel: (0, import_i18n15.__)("Adjust corners", "elementor"),
|
|
2673
2683
|
multiSizePropTypeUtil: import_editor_props7.borderRadiusPropTypeUtil
|
|
2674
2684
|
}
|
|
2675
|
-
));
|
|
2685
|
+
)));
|
|
2676
2686
|
};
|
|
2677
2687
|
|
|
2678
2688
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2679
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2689
|
+
var BorderSection = () => /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(BorderRadiusField, null), /* @__PURE__ */ React39.createElement(PanelDivider, null), /* @__PURE__ */ React39.createElement(BorderField, null));
|
|
2680
2690
|
|
|
2681
2691
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2682
|
-
var
|
|
2692
|
+
var React40 = __toESM(require("react"));
|
|
2683
2693
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
2684
2694
|
var EffectsSection = () => {
|
|
2685
|
-
return /* @__PURE__ */
|
|
2695
|
+
return /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React40.createElement(import_editor_controls14.BoxShadowRepeaterControl, null)));
|
|
2686
2696
|
};
|
|
2687
2697
|
|
|
2688
2698
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2689
|
-
var
|
|
2699
|
+
var React52 = __toESM(require("react"));
|
|
2690
2700
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
2691
2701
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2692
2702
|
var import_i18n26 = require("@wordpress/i18n");
|
|
@@ -2717,16 +2727,16 @@ function useComputedStyle(elementId) {
|
|
|
2717
2727
|
}
|
|
2718
2728
|
|
|
2719
2729
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2720
|
-
var
|
|
2730
|
+
var React42 = __toESM(require("react"));
|
|
2721
2731
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2722
2732
|
var import_icons9 = require("@elementor/icons");
|
|
2723
|
-
var
|
|
2733
|
+
var import_ui34 = require("@elementor/ui");
|
|
2724
2734
|
var import_i18n16 = require("@wordpress/i18n");
|
|
2725
2735
|
|
|
2726
2736
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2727
|
-
var
|
|
2737
|
+
var React41 = __toESM(require("react"));
|
|
2728
2738
|
var import_react23 = require("react");
|
|
2729
|
-
var
|
|
2739
|
+
var import_ui33 = require("@elementor/ui");
|
|
2730
2740
|
var CLOCKWISE_ANGLES = {
|
|
2731
2741
|
row: 0,
|
|
2732
2742
|
column: 90,
|
|
@@ -2748,11 +2758,11 @@ var RotatedIcon = ({
|
|
|
2748
2758
|
}) => {
|
|
2749
2759
|
const rotate = (0, import_react23.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2750
2760
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2751
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ React41.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2752
2762
|
};
|
|
2753
2763
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2754
2764
|
const [direction] = useStylesField("flex-direction");
|
|
2755
|
-
const isRtl = "rtl" === (0,
|
|
2765
|
+
const isRtl = "rtl" === (0, import_ui33.useTheme)().direction;
|
|
2756
2766
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2757
2767
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
2758
2768
|
const currentDirection = direction?.value || "row";
|
|
@@ -2767,8 +2777,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
2767
2777
|
};
|
|
2768
2778
|
|
|
2769
2779
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2770
|
-
var StartIcon = (0,
|
|
2771
|
-
var EndIcon = (0,
|
|
2780
|
+
var StartIcon = (0, import_ui34.withDirection)(import_icons9.JustifyTopIcon);
|
|
2781
|
+
var EndIcon = (0, import_ui34.withDirection)(import_icons9.JustifyBottomIcon);
|
|
2772
2782
|
var iconProps = {
|
|
2773
2783
|
isClockwise: false,
|
|
2774
2784
|
offset: 0,
|
|
@@ -2778,53 +2788,52 @@ var options = [
|
|
|
2778
2788
|
{
|
|
2779
2789
|
value: "start",
|
|
2780
2790
|
label: (0, import_i18n16.__)("Start", "elementor"),
|
|
2781
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2791
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2782
2792
|
showTooltip: true
|
|
2783
2793
|
},
|
|
2784
2794
|
{
|
|
2785
2795
|
value: "center",
|
|
2786
2796
|
label: (0, import_i18n16.__)("Center", "elementor"),
|
|
2787
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2797
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifyCenterIcon, size, ...iconProps }),
|
|
2788
2798
|
showTooltip: true
|
|
2789
2799
|
},
|
|
2790
2800
|
{
|
|
2791
2801
|
value: "end",
|
|
2792
2802
|
label: (0, import_i18n16.__)("End", "elementor"),
|
|
2793
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2803
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2794
2804
|
showTooltip: true
|
|
2795
2805
|
},
|
|
2796
2806
|
{
|
|
2797
2807
|
value: "space-between",
|
|
2798
2808
|
label: (0, import_i18n16.__)("Space between", "elementor"),
|
|
2799
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2809
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
2800
2810
|
showTooltip: true
|
|
2801
2811
|
},
|
|
2802
2812
|
{
|
|
2803
2813
|
value: "space-around",
|
|
2804
2814
|
label: (0, import_i18n16.__)("Space around", "elementor"),
|
|
2805
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2815
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
2806
2816
|
showTooltip: true
|
|
2807
2817
|
},
|
|
2808
2818
|
{
|
|
2809
2819
|
value: "space-evenly",
|
|
2810
2820
|
label: (0, import_i18n16.__)("Space evenly", "elementor"),
|
|
2811
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2821
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(RotatedIcon, { icon: import_icons9.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
2812
2822
|
showTooltip: true
|
|
2813
2823
|
}
|
|
2814
2824
|
];
|
|
2815
2825
|
var AlignContentField = () => {
|
|
2816
|
-
|
|
2817
|
-
return /* @__PURE__ */ React41.createElement(import_ui33.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(import_ui33.ThemeProvider, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React41.createElement(import_ui33.Stack, { gap: 1 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, (0, import_i18n16.__)("Align content", "elementor")), /* @__PURE__ */ React41.createElement(import_editor_controls15.ToggleControl, { options, fullWidth: true })))));
|
|
2826
|
+
return /* @__PURE__ */ React42.createElement(UiProviders, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React42.createElement(import_ui34.Stack, { gap: 1 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n16.__)("Align content", "elementor")), /* @__PURE__ */ React42.createElement(import_editor_controls15.ToggleControl, { options, fullWidth: true }))));
|
|
2818
2827
|
};
|
|
2819
2828
|
|
|
2820
2829
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2821
|
-
var
|
|
2830
|
+
var React43 = __toESM(require("react"));
|
|
2822
2831
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2823
2832
|
var import_icons10 = require("@elementor/icons");
|
|
2824
|
-
var
|
|
2833
|
+
var import_ui35 = require("@elementor/ui");
|
|
2825
2834
|
var import_i18n17 = require("@wordpress/i18n");
|
|
2826
|
-
var StartIcon2 = (0,
|
|
2827
|
-
var EndIcon2 = (0,
|
|
2835
|
+
var StartIcon2 = (0, import_ui35.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
2836
|
+
var EndIcon2 = (0, import_ui35.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
2828
2837
|
var iconProps2 = {
|
|
2829
2838
|
isClockwise: false,
|
|
2830
2839
|
offset: 90
|
|
@@ -2833,38 +2842,37 @@ var options2 = [
|
|
|
2833
2842
|
{
|
|
2834
2843
|
value: "start",
|
|
2835
2844
|
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
2836
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2845
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2837
2846
|
showTooltip: true
|
|
2838
2847
|
},
|
|
2839
2848
|
{
|
|
2840
2849
|
value: "center",
|
|
2841
2850
|
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
2842
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2851
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons10.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
2843
2852
|
showTooltip: true
|
|
2844
2853
|
},
|
|
2845
2854
|
{
|
|
2846
2855
|
value: "end",
|
|
2847
2856
|
label: (0, import_i18n17.__)("End", "elementor"),
|
|
2848
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2857
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2849
2858
|
showTooltip: true
|
|
2850
2859
|
},
|
|
2851
2860
|
{
|
|
2852
2861
|
value: "stretch",
|
|
2853
2862
|
label: (0, import_i18n17.__)("Stretch", "elementor"),
|
|
2854
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2863
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons10.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
2855
2864
|
showTooltip: true
|
|
2856
2865
|
}
|
|
2857
2866
|
];
|
|
2858
2867
|
var AlignItemsField = () => {
|
|
2859
|
-
|
|
2860
|
-
return /* @__PURE__ */ React42.createElement(import_ui34.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(import_ui34.ThemeProvider, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React42.createElement(import_ui34.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n17.__)("Align items", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui34.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React42.createElement(import_editor_controls16.ToggleControl, { options: options2 }))))));
|
|
2868
|
+
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n17.__)("Align items", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React43.createElement(import_editor_controls16.ToggleControl, { options: options2 })))));
|
|
2861
2869
|
};
|
|
2862
2870
|
|
|
2863
2871
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2864
|
-
var
|
|
2872
|
+
var React44 = __toESM(require("react"));
|
|
2865
2873
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2866
2874
|
var import_icons11 = require("@elementor/icons");
|
|
2867
|
-
var
|
|
2875
|
+
var import_ui36 = require("@elementor/ui");
|
|
2868
2876
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2869
2877
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2870
2878
|
row: 90,
|
|
@@ -2872,8 +2880,8 @@ var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
|
2872
2880
|
column: 0,
|
|
2873
2881
|
"column-reverse": 0
|
|
2874
2882
|
};
|
|
2875
|
-
var StartIcon3 = (0,
|
|
2876
|
-
var EndIcon3 = (0,
|
|
2883
|
+
var StartIcon3 = (0, import_ui36.withDirection)(import_icons11.LayoutAlignLeftIcon);
|
|
2884
|
+
var EndIcon3 = (0, import_ui36.withDirection)(import_icons11.LayoutAlignRightIcon);
|
|
2877
2885
|
var iconProps3 = {
|
|
2878
2886
|
isClockwise: false
|
|
2879
2887
|
};
|
|
@@ -2881,7 +2889,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2881
2889
|
{
|
|
2882
2890
|
value: "start",
|
|
2883
2891
|
label: (0, import_i18n18.__)("Start", "elementor"),
|
|
2884
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2892
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2885
2893
|
RotatedIcon,
|
|
2886
2894
|
{
|
|
2887
2895
|
icon: StartIcon3,
|
|
@@ -2895,7 +2903,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2895
2903
|
{
|
|
2896
2904
|
value: "center",
|
|
2897
2905
|
label: (0, import_i18n18.__)("Center", "elementor"),
|
|
2898
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2906
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2899
2907
|
RotatedIcon,
|
|
2900
2908
|
{
|
|
2901
2909
|
icon: import_icons11.LayoutAlignCenterIcon,
|
|
@@ -2909,7 +2917,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2909
2917
|
{
|
|
2910
2918
|
value: "end",
|
|
2911
2919
|
label: (0, import_i18n18.__)("End", "elementor"),
|
|
2912
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2920
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2913
2921
|
RotatedIcon,
|
|
2914
2922
|
{
|
|
2915
2923
|
icon: EndIcon3,
|
|
@@ -2923,7 +2931,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2923
2931
|
{
|
|
2924
2932
|
value: "stretch",
|
|
2925
2933
|
label: (0, import_i18n18.__)("Stretch", "elementor"),
|
|
2926
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2934
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2927
2935
|
RotatedIcon,
|
|
2928
2936
|
{
|
|
2929
2937
|
icon: import_icons11.LayoutDistributeVerticalIcon,
|
|
@@ -2936,15 +2944,14 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2936
2944
|
}
|
|
2937
2945
|
];
|
|
2938
2946
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2939
|
-
|
|
2940
|
-
return /* @__PURE__ */ React43.createElement(import_ui35.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React43.createElement(import_ui35.ThemeProvider, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n18.__)("Align self", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React43.createElement(import_editor_controls17.ToggleControl, { options: getOptions(parentStyleDirection) }))))));
|
|
2947
|
+
return /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-self" }, /* @__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(ControlLabel, null, (0, import_i18n18.__)("Align self", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React44.createElement(import_editor_controls17.ToggleControl, { options: getOptions(parentStyleDirection) })))));
|
|
2941
2948
|
};
|
|
2942
2949
|
|
|
2943
2950
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2944
|
-
var
|
|
2951
|
+
var React45 = __toESM(require("react"));
|
|
2945
2952
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
2946
2953
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
2947
|
-
var
|
|
2954
|
+
var import_ui37 = require("@elementor/ui");
|
|
2948
2955
|
var import_i18n19 = require("@wordpress/i18n");
|
|
2949
2956
|
var displayFieldItems = [
|
|
2950
2957
|
{
|
|
@@ -2984,59 +2991,58 @@ var DisplayField = () => {
|
|
|
2984
2991
|
showTooltip: true
|
|
2985
2992
|
});
|
|
2986
2993
|
const placeholder = useDisplayPlaceholderValue();
|
|
2987
|
-
return /* @__PURE__ */
|
|
2994
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React45.createElement(import_ui37.Stack, { gap: 0.75 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n19.__)("Display", "elementor")), /* @__PURE__ */ React45.createElement(import_editor_controls18.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2988
2995
|
};
|
|
2989
2996
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2990
2997
|
|
|
2991
2998
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2992
|
-
var
|
|
2999
|
+
var React46 = __toESM(require("react"));
|
|
2993
3000
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2994
3001
|
var import_icons12 = require("@elementor/icons");
|
|
2995
|
-
var
|
|
3002
|
+
var import_ui38 = require("@elementor/ui");
|
|
2996
3003
|
var import_i18n20 = require("@wordpress/i18n");
|
|
2997
3004
|
var options3 = [
|
|
2998
3005
|
{
|
|
2999
3006
|
value: "row",
|
|
3000
3007
|
label: (0, import_i18n20.__)("Row", "elementor"),
|
|
3001
3008
|
renderContent: ({ size }) => {
|
|
3002
|
-
const StartIcon5 = (0,
|
|
3003
|
-
return /* @__PURE__ */
|
|
3009
|
+
const StartIcon5 = (0, import_ui38.withDirection)(import_icons12.ArrowRightIcon);
|
|
3010
|
+
return /* @__PURE__ */ React46.createElement(StartIcon5, { fontSize: size });
|
|
3004
3011
|
},
|
|
3005
3012
|
showTooltip: true
|
|
3006
3013
|
},
|
|
3007
3014
|
{
|
|
3008
3015
|
value: "column",
|
|
3009
3016
|
label: (0, import_i18n20.__)("Column", "elementor"),
|
|
3010
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3017
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
3011
3018
|
showTooltip: true
|
|
3012
3019
|
},
|
|
3013
3020
|
{
|
|
3014
3021
|
value: "row-reverse",
|
|
3015
3022
|
label: (0, import_i18n20.__)("Reversed row", "elementor"),
|
|
3016
3023
|
renderContent: ({ size }) => {
|
|
3017
|
-
const EndIcon5 = (0,
|
|
3018
|
-
return /* @__PURE__ */
|
|
3024
|
+
const EndIcon5 = (0, import_ui38.withDirection)(import_icons12.ArrowLeftIcon);
|
|
3025
|
+
return /* @__PURE__ */ React46.createElement(EndIcon5, { fontSize: size });
|
|
3019
3026
|
},
|
|
3020
3027
|
showTooltip: true
|
|
3021
3028
|
},
|
|
3022
3029
|
{
|
|
3023
3030
|
value: "column-reverse",
|
|
3024
3031
|
label: (0, import_i18n20.__)("Reversed column", "elementor"),
|
|
3025
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3032
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
3026
3033
|
showTooltip: true
|
|
3027
3034
|
}
|
|
3028
3035
|
];
|
|
3029
3036
|
var FlexDirectionField = () => {
|
|
3030
|
-
|
|
3031
|
-
return /* @__PURE__ */ React45.createElement(import_ui37.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React45.createElement(import_ui37.ThemeProvider, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "flex-direction" }, /* @__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(ControlLabel, null, (0, import_i18n20.__)("Direction", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React45.createElement(import_editor_controls19.ToggleControl, { options: options3 }))))));
|
|
3037
|
+
return /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n20.__)("Direction", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(import_editor_controls19.ToggleControl, { options: options3 })))));
|
|
3032
3038
|
};
|
|
3033
3039
|
|
|
3034
3040
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3035
|
-
var
|
|
3041
|
+
var React47 = __toESM(require("react"));
|
|
3036
3042
|
var import_react24 = require("react");
|
|
3037
3043
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3038
3044
|
var import_icons13 = require("@elementor/icons");
|
|
3039
|
-
var
|
|
3045
|
+
var import_ui39 = require("@elementor/ui");
|
|
3040
3046
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3041
3047
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3042
3048
|
var LAST_DEFAULT_VALUE = 99999;
|
|
@@ -3051,24 +3057,23 @@ var items = [
|
|
|
3051
3057
|
{
|
|
3052
3058
|
value: FIRST,
|
|
3053
3059
|
label: (0, import_i18n21.__)("First", "elementor"),
|
|
3054
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3060
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons13.ArrowUpSmallIcon, { fontSize: size }),
|
|
3055
3061
|
showTooltip: true
|
|
3056
3062
|
},
|
|
3057
3063
|
{
|
|
3058
3064
|
value: LAST,
|
|
3059
3065
|
label: (0, import_i18n21.__)("Last", "elementor"),
|
|
3060
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3066
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons13.ArrowDownSmallIcon, { fontSize: size }),
|
|
3061
3067
|
showTooltip: true
|
|
3062
3068
|
},
|
|
3063
3069
|
{
|
|
3064
3070
|
value: CUSTOM,
|
|
3065
3071
|
label: (0, import_i18n21.__)("Custom", "elementor"),
|
|
3066
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3072
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
3067
3073
|
showTooltip: true
|
|
3068
3074
|
}
|
|
3069
3075
|
];
|
|
3070
3076
|
var FlexOrderField = () => {
|
|
3071
|
-
const { isSiteRtl } = useDirection();
|
|
3072
3077
|
const [order, setOrder] = useStylesField("order");
|
|
3073
3078
|
const { canEdit } = useStyle();
|
|
3074
3079
|
const [groupControlValue, setGroupControlValue] = (0, import_react24.useState)(getGroupControlValue(order?.value || null));
|
|
@@ -3080,7 +3085,7 @@ var FlexOrderField = () => {
|
|
|
3080
3085
|
}
|
|
3081
3086
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3082
3087
|
};
|
|
3083
|
-
return /* @__PURE__ */
|
|
3088
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n21.__)("Order", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(
|
|
3084
3089
|
import_editor_controls20.ControlToggleButtonGroup,
|
|
3085
3090
|
{
|
|
3086
3091
|
items,
|
|
@@ -3089,14 +3094,14 @@ var FlexOrderField = () => {
|
|
|
3089
3094
|
exclusive: true,
|
|
3090
3095
|
disabled: !canEdit
|
|
3091
3096
|
}
|
|
3092
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
3097
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n21.__)("Custom order", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(
|
|
3093
3098
|
import_editor_controls20.NumberControl,
|
|
3094
3099
|
{
|
|
3095
3100
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3096
3101
|
max: LAST_DEFAULT_VALUE - 1,
|
|
3097
3102
|
shouldForceInt: true
|
|
3098
3103
|
}
|
|
3099
|
-
))))))
|
|
3104
|
+
))))));
|
|
3100
3105
|
};
|
|
3101
3106
|
var getGroupControlValue = (order) => {
|
|
3102
3107
|
if (LAST_DEFAULT_VALUE === order) {
|
|
@@ -3109,36 +3114,35 @@ var getGroupControlValue = (order) => {
|
|
|
3109
3114
|
};
|
|
3110
3115
|
|
|
3111
3116
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3112
|
-
var
|
|
3117
|
+
var React48 = __toESM(require("react"));
|
|
3113
3118
|
var import_react25 = require("react");
|
|
3114
3119
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3115
3120
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
3116
3121
|
var import_icons14 = require("@elementor/icons");
|
|
3117
|
-
var
|
|
3122
|
+
var import_ui40 = require("@elementor/ui");
|
|
3118
3123
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3119
3124
|
var DEFAULT = 1;
|
|
3120
3125
|
var items2 = [
|
|
3121
3126
|
{
|
|
3122
3127
|
value: "flex-grow",
|
|
3123
3128
|
label: (0, import_i18n22.__)("Grow", "elementor"),
|
|
3124
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3129
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons14.ExpandIcon, { fontSize: size }),
|
|
3125
3130
|
showTooltip: true
|
|
3126
3131
|
},
|
|
3127
3132
|
{
|
|
3128
3133
|
value: "flex-shrink",
|
|
3129
3134
|
label: (0, import_i18n22.__)("Shrink", "elementor"),
|
|
3130
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3135
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons14.ShrinkIcon, { fontSize: size }),
|
|
3131
3136
|
showTooltip: true
|
|
3132
3137
|
},
|
|
3133
3138
|
{
|
|
3134
3139
|
value: "custom",
|
|
3135
3140
|
label: (0, import_i18n22.__)("Custom", "elementor"),
|
|
3136
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3141
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons14.PencilIcon, { fontSize: size }),
|
|
3137
3142
|
showTooltip: true
|
|
3138
3143
|
}
|
|
3139
3144
|
];
|
|
3140
3145
|
var FlexSizeField = () => {
|
|
3141
|
-
const { isSiteRtl } = useDirection();
|
|
3142
3146
|
const { canEdit } = useStyle();
|
|
3143
3147
|
const [fields, setFields] = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
3144
3148
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
@@ -3169,7 +3173,7 @@ var FlexSizeField = () => {
|
|
|
3169
3173
|
"flex-shrink": import_editor_props8.numberPropTypeUtil.create(DEFAULT)
|
|
3170
3174
|
});
|
|
3171
3175
|
};
|
|
3172
|
-
return /* @__PURE__ */
|
|
3176
|
+
return /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Size", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3173
3177
|
import_editor_controls21.ControlToggleButtonGroup,
|
|
3174
3178
|
{
|
|
3175
3179
|
value: activeGroup,
|
|
@@ -3178,9 +3182,12 @@ var FlexSizeField = () => {
|
|
|
3178
3182
|
items: items2,
|
|
3179
3183
|
exclusive: true
|
|
3180
3184
|
}
|
|
3181
|
-
)))), "custom" === activeGroup && /* @__PURE__ */
|
|
3185
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React48.createElement(FlexCustomField, null)));
|
|
3186
|
+
};
|
|
3187
|
+
var FlexCustomField = () => {
|
|
3188
|
+
const flexBasisRowRef = (0, import_react25.useRef)();
|
|
3189
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Grow", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Shrink", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: flexBasisRowRef }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Basis", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(import_editor_controls21.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3182
3190
|
};
|
|
3183
|
-
var FlexCustomField = () => /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n22.__)("Grow", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n22.__)("Shrink", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n22.__)("Basis", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls21.SizeControl, { extendedValues: ["auto"] })))));
|
|
3184
3191
|
var getActiveGroup = ({
|
|
3185
3192
|
grow,
|
|
3186
3193
|
shrink,
|
|
@@ -3202,22 +3209,22 @@ var getActiveGroup = ({
|
|
|
3202
3209
|
};
|
|
3203
3210
|
|
|
3204
3211
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3205
|
-
var
|
|
3212
|
+
var React49 = __toESM(require("react"));
|
|
3206
3213
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3207
|
-
var
|
|
3214
|
+
var import_ui41 = require("@elementor/ui");
|
|
3208
3215
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3209
3216
|
var GapControlField = () => {
|
|
3210
|
-
return /* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ React49.createElement(import_ui41.Stack, { gap: 1 }, /* @__PURE__ */ React49.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React49.createElement(import_editor_controls22.GapControl, { label: (0, import_i18n23.__)("Gaps", "elementor") })));
|
|
3211
3218
|
};
|
|
3212
3219
|
|
|
3213
3220
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3214
|
-
var
|
|
3221
|
+
var React50 = __toESM(require("react"));
|
|
3215
3222
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3216
3223
|
var import_icons15 = require("@elementor/icons");
|
|
3217
|
-
var
|
|
3224
|
+
var import_ui42 = require("@elementor/ui");
|
|
3218
3225
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3219
|
-
var StartIcon4 = (0,
|
|
3220
|
-
var EndIcon4 = (0,
|
|
3226
|
+
var StartIcon4 = (0, import_ui42.withDirection)(import_icons15.JustifyTopIcon);
|
|
3227
|
+
var EndIcon4 = (0, import_ui42.withDirection)(import_icons15.JustifyBottomIcon);
|
|
3221
3228
|
var iconProps4 = {
|
|
3222
3229
|
isClockwise: true,
|
|
3223
3230
|
offset: -90
|
|
@@ -3226,74 +3233,72 @@ var options4 = [
|
|
|
3226
3233
|
{
|
|
3227
3234
|
value: "flex-start",
|
|
3228
3235
|
label: (0, import_i18n24.__)("Start", "elementor"),
|
|
3229
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3236
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3230
3237
|
showTooltip: true
|
|
3231
3238
|
},
|
|
3232
3239
|
{
|
|
3233
3240
|
value: "center",
|
|
3234
3241
|
label: (0, import_i18n24.__)("Center", "elementor"),
|
|
3235
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3242
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifyCenterIcon, size, ...iconProps4 }),
|
|
3236
3243
|
showTooltip: true
|
|
3237
3244
|
},
|
|
3238
3245
|
{
|
|
3239
3246
|
value: "flex-end",
|
|
3240
3247
|
label: (0, import_i18n24.__)("End", "elementor"),
|
|
3241
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3248
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3242
3249
|
showTooltip: true
|
|
3243
3250
|
},
|
|
3244
3251
|
{
|
|
3245
3252
|
value: "space-between",
|
|
3246
3253
|
label: (0, import_i18n24.__)("Space between", "elementor"),
|
|
3247
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3254
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
3248
3255
|
showTooltip: true
|
|
3249
3256
|
},
|
|
3250
3257
|
{
|
|
3251
3258
|
value: "space-around",
|
|
3252
3259
|
label: (0, import_i18n24.__)("Space around", "elementor"),
|
|
3253
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3260
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
3254
3261
|
showTooltip: true
|
|
3255
3262
|
},
|
|
3256
3263
|
{
|
|
3257
3264
|
value: "space-evenly",
|
|
3258
3265
|
label: (0, import_i18n24.__)("Space evenly", "elementor"),
|
|
3259
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3266
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: import_icons15.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
3260
3267
|
showTooltip: true
|
|
3261
3268
|
}
|
|
3262
3269
|
];
|
|
3263
3270
|
var JustifyContentField = () => {
|
|
3264
|
-
|
|
3265
|
-
return /* @__PURE__ */ React49.createElement(import_ui41.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React49.createElement(import_ui41.ThemeProvider, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React49.createElement(import_ui41.Stack, { gap: 0.75 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n24.__)("Justify content", "elementor")), /* @__PURE__ */ React49.createElement(import_editor_controls23.ToggleControl, { options: options4, fullWidth: true })))));
|
|
3271
|
+
return /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React50.createElement(import_ui42.Stack, { gap: 0.75 }, /* @__PURE__ */ React50.createElement(ControlLabel, null, (0, import_i18n24.__)("Justify content", "elementor")), /* @__PURE__ */ React50.createElement(import_editor_controls23.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3266
3272
|
};
|
|
3267
3273
|
|
|
3268
3274
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3269
|
-
var
|
|
3275
|
+
var React51 = __toESM(require("react"));
|
|
3270
3276
|
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3271
3277
|
var import_icons16 = require("@elementor/icons");
|
|
3272
|
-
var
|
|
3278
|
+
var import_ui43 = require("@elementor/ui");
|
|
3273
3279
|
var import_i18n25 = require("@wordpress/i18n");
|
|
3274
3280
|
var options5 = [
|
|
3275
3281
|
{
|
|
3276
3282
|
value: "nowrap",
|
|
3277
3283
|
label: (0, import_i18n25.__)("No wrap", "elementor"),
|
|
3278
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3284
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.ArrowRightIcon, { fontSize: size }),
|
|
3279
3285
|
showTooltip: true
|
|
3280
3286
|
},
|
|
3281
3287
|
{
|
|
3282
3288
|
value: "wrap",
|
|
3283
3289
|
label: (0, import_i18n25.__)("Wrap", "elementor"),
|
|
3284
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3290
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.ArrowBackIcon, { fontSize: size }),
|
|
3285
3291
|
showTooltip: true
|
|
3286
3292
|
},
|
|
3287
3293
|
{
|
|
3288
3294
|
value: "wrap-reverse",
|
|
3289
3295
|
label: (0, import_i18n25.__)("Reversed wrap", "elementor"),
|
|
3290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3296
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(import_icons16.ArrowForwardIcon, { fontSize: size }),
|
|
3291
3297
|
showTooltip: true
|
|
3292
3298
|
}
|
|
3293
3299
|
];
|
|
3294
3300
|
var WrapField = () => {
|
|
3295
|
-
|
|
3296
|
-
return /* @__PURE__ */ React50.createElement(import_ui42.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React50.createElement(import_ui42.ThemeProvider, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-wrap" }, /* @__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(ControlLabel, null, (0, import_i18n25.__)("Wrap", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui42.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React50.createElement(import_editor_controls24.ToggleControl, { options: options5 }))))));
|
|
3301
|
+
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "flex-wrap" }, /* @__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(ControlLabel, null, (0, import_i18n25.__)("Wrap", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React51.createElement(import_editor_controls24.ToggleControl, { options: options5 })))));
|
|
3297
3302
|
};
|
|
3298
3303
|
|
|
3299
3304
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -3305,13 +3310,13 @@ var LayoutSection = () => {
|
|
|
3305
3310
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
3306
3311
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3307
3312
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3308
|
-
return /* @__PURE__ */
|
|
3313
|
+
return /* @__PURE__ */ React52.createElement(SectionContent, null, /* @__PURE__ */ React52.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React52.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React52.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3309
3314
|
};
|
|
3310
3315
|
var FlexFields = () => {
|
|
3311
3316
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
3312
|
-
return /* @__PURE__ */
|
|
3317
|
+
return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(FlexDirectionField, null), /* @__PURE__ */ React52.createElement(JustifyContentField, null), /* @__PURE__ */ React52.createElement(AlignItemsField, null), /* @__PURE__ */ React52.createElement(PanelDivider, null), /* @__PURE__ */ React52.createElement(GapControlField, null), /* @__PURE__ */ React52.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React52.createElement(AlignContentField, null));
|
|
3313
3318
|
};
|
|
3314
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3319
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(PanelDivider, null), /* @__PURE__ */ React52.createElement(import_editor_controls25.ControlFormLabel, null, (0, import_i18n26.__)("Flex child", "elementor")), /* @__PURE__ */ React52.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React52.createElement(FlexOrderField, null), /* @__PURE__ */ React52.createElement(FlexSizeField, null));
|
|
3315
3320
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3316
3321
|
const value = display?.value ?? local?.value;
|
|
3317
3322
|
if (!value) {
|
|
@@ -3321,47 +3326,67 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3321
3326
|
};
|
|
3322
3327
|
|
|
3323
3328
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3324
|
-
var
|
|
3329
|
+
var React57 = __toESM(require("react"));
|
|
3325
3330
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
3326
3331
|
var import_session3 = require("@elementor/session");
|
|
3327
3332
|
|
|
3328
3333
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3329
|
-
var
|
|
3334
|
+
var React53 = __toESM(require("react"));
|
|
3335
|
+
var import_react26 = require("react");
|
|
3330
3336
|
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
3331
3337
|
var import_icons17 = require("@elementor/icons");
|
|
3332
|
-
var
|
|
3338
|
+
var import_ui44 = require("@elementor/ui");
|
|
3333
3339
|
var import_i18n27 = require("@wordpress/i18n");
|
|
3334
|
-
var InlineStartIcon2 = (0,
|
|
3335
|
-
var InlineEndIcon2 = (0,
|
|
3340
|
+
var InlineStartIcon2 = (0, import_ui44.withDirection)(import_icons17.SideLeftIcon);
|
|
3341
|
+
var InlineEndIcon2 = (0, import_ui44.withDirection)(import_icons17.SideRightIcon);
|
|
3336
3342
|
var sideIcons = {
|
|
3337
|
-
"inset-block-start": /* @__PURE__ */
|
|
3338
|
-
"inset-block-end": /* @__PURE__ */
|
|
3339
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3340
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3343
|
+
"inset-block-start": /* @__PURE__ */ React53.createElement(import_icons17.SideTopIcon, { fontSize: "tiny" }),
|
|
3344
|
+
"inset-block-end": /* @__PURE__ */ React53.createElement(import_icons17.SideBottomIcon, { fontSize: "tiny" }),
|
|
3345
|
+
"inset-inline-start": /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3346
|
+
"inset-inline-end": /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3341
3347
|
};
|
|
3342
3348
|
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n27.__)("Right", "elementor") : (0, import_i18n27.__)("Left", "elementor");
|
|
3343
3349
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n27.__)("Left", "elementor") : (0, import_i18n27.__)("Right", "elementor");
|
|
3344
3350
|
var DimensionsField = () => {
|
|
3345
3351
|
const { isSiteRtl } = useDirection();
|
|
3346
|
-
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3352
|
+
const rowRefs = [(0, import_react26.useRef)(), (0, import_react26.useRef)()];
|
|
3353
|
+
return /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(import_ui44.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React53.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n27.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React53.createElement(
|
|
3354
|
+
DimensionField,
|
|
3355
|
+
{
|
|
3356
|
+
side: "inset-inline-end",
|
|
3357
|
+
label: getInlineEndLabel(isSiteRtl),
|
|
3358
|
+
rowRef: rowRefs[0]
|
|
3359
|
+
}
|
|
3360
|
+
)), /* @__PURE__ */ React53.createElement(import_ui44.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React53.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n27.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React53.createElement(
|
|
3361
|
+
DimensionField,
|
|
3362
|
+
{
|
|
3363
|
+
side: "inset-inline-start",
|
|
3364
|
+
label: getInlineStartLabel(isSiteRtl),
|
|
3365
|
+
rowRef: rowRefs[1]
|
|
3366
|
+
}
|
|
3367
|
+
)));
|
|
3350
3368
|
};
|
|
3369
|
+
var DimensionField = ({
|
|
3370
|
+
side,
|
|
3371
|
+
label,
|
|
3372
|
+
rowRef
|
|
3373
|
+
}) => /* @__PURE__ */ React53.createElement(StylesField, { bind: side }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, label)), /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(import_editor_controls26.SizeControl, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3351
3374
|
|
|
3352
3375
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3353
|
-
var
|
|
3376
|
+
var React54 = __toESM(require("react"));
|
|
3377
|
+
var import_react27 = require("react");
|
|
3354
3378
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3355
|
-
var
|
|
3379
|
+
var import_ui45 = require("@elementor/ui");
|
|
3356
3380
|
var import_i18n28 = require("@wordpress/i18n");
|
|
3357
3381
|
var OffsetField = () => {
|
|
3358
|
-
|
|
3382
|
+
const rowRef = (0, import_react27.useRef)();
|
|
3383
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n28.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls27.SizeControl, { units: ["px", "em", "rem", "vw", "vh"], anchorRef: rowRef }))));
|
|
3359
3384
|
};
|
|
3360
3385
|
|
|
3361
3386
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3362
|
-
var
|
|
3387
|
+
var React55 = __toESM(require("react"));
|
|
3363
3388
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3364
|
-
var
|
|
3389
|
+
var import_ui46 = require("@elementor/ui");
|
|
3365
3390
|
var import_i18n29 = require("@wordpress/i18n");
|
|
3366
3391
|
var positionOptions = [
|
|
3367
3392
|
{ label: (0, import_i18n29.__)("Static", "elementor"), value: "static" },
|
|
@@ -3371,16 +3396,16 @@ var positionOptions = [
|
|
|
3371
3396
|
{ label: (0, import_i18n29.__)("Sticky", "elementor"), value: "sticky" }
|
|
3372
3397
|
];
|
|
3373
3398
|
var PositionField = ({ onChange }) => {
|
|
3374
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "position" }, /* @__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(ControlLabel, null, (0, import_i18n29.__)("Position", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React55.createElement(import_editor_controls28.SelectControl, { options: positionOptions, onChange }))));
|
|
3375
3400
|
};
|
|
3376
3401
|
|
|
3377
3402
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3378
|
-
var
|
|
3403
|
+
var React56 = __toESM(require("react"));
|
|
3379
3404
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3380
|
-
var
|
|
3405
|
+
var import_ui47 = require("@elementor/ui");
|
|
3381
3406
|
var import_i18n30 = require("@wordpress/i18n");
|
|
3382
3407
|
var ZIndexField = () => {
|
|
3383
|
-
return /* @__PURE__ */
|
|
3408
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, (0, import_i18n30.__)("Z-index", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls29.NumberControl, null))));
|
|
3384
3409
|
};
|
|
3385
3410
|
|
|
3386
3411
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -3413,7 +3438,7 @@ var PositionSection = () => {
|
|
|
3413
3438
|
}
|
|
3414
3439
|
};
|
|
3415
3440
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3416
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ React57.createElement(SectionContent, null, /* @__PURE__ */ React57.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(DimensionsField, null), /* @__PURE__ */ React57.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(PanelDivider, null), /* @__PURE__ */ React57.createElement(OffsetField, null)));
|
|
3417
3442
|
};
|
|
3418
3443
|
var usePersistDimensions = () => {
|
|
3419
3444
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3423,20 +3448,21 @@ var usePersistDimensions = () => {
|
|
|
3423
3448
|
};
|
|
3424
3449
|
|
|
3425
3450
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3426
|
-
var
|
|
3451
|
+
var React63 = __toESM(require("react"));
|
|
3452
|
+
var import_react28 = require("react");
|
|
3427
3453
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
3428
3454
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
3429
|
-
var
|
|
3455
|
+
var import_ui52 = require("@elementor/ui");
|
|
3430
3456
|
var import_i18n35 = require("@wordpress/i18n");
|
|
3431
3457
|
|
|
3432
3458
|
// src/components/style-tab-collapsible-content.tsx
|
|
3433
|
-
var
|
|
3459
|
+
var React59 = __toESM(require("react"));
|
|
3434
3460
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
3435
3461
|
|
|
3436
3462
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3437
|
-
var
|
|
3463
|
+
var React58 = __toESM(require("react"));
|
|
3438
3464
|
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
3439
|
-
var
|
|
3465
|
+
var import_ui48 = require("@elementor/ui");
|
|
3440
3466
|
var import_i18n31 = require("@wordpress/i18n");
|
|
3441
3467
|
var orderedVariants = ["global", "local", "overridden"];
|
|
3442
3468
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
@@ -3451,8 +3477,8 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
3451
3477
|
}
|
|
3452
3478
|
const hasActualValues = (0, import_i18n31.__)("Has effective styles", "elementor");
|
|
3453
3479
|
const hasOverriddenValues = (0, import_i18n31.__)("Has overridden styles", "elementor");
|
|
3454
|
-
return /* @__PURE__ */
|
|
3455
|
-
(variant) => indicators[variant] && /* @__PURE__ */
|
|
3480
|
+
return /* @__PURE__ */ React58.createElement(import_ui48.Tooltip, { title: (0, import_i18n31.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React58.createElement(import_ui48.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, orderedVariants.map(
|
|
3481
|
+
(variant) => indicators[variant] && /* @__PURE__ */ React58.createElement(
|
|
3456
3482
|
StyleIndicator,
|
|
3457
3483
|
{
|
|
3458
3484
|
key: variant,
|
|
@@ -3500,20 +3526,20 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3500
3526
|
|
|
3501
3527
|
// src/components/style-tab-collapsible-content.tsx
|
|
3502
3528
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3503
|
-
return /* @__PURE__ */
|
|
3529
|
+
return /* @__PURE__ */ React59.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3504
3530
|
};
|
|
3505
3531
|
function getStylesInheritanceIndicators(fields) {
|
|
3506
3532
|
const isUsingFieldsIndicators = (0, import_editor_v1_adapters11.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3507
3533
|
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3508
3534
|
return null;
|
|
3509
3535
|
}
|
|
3510
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3536
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React59.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3511
3537
|
}
|
|
3512
3538
|
|
|
3513
3539
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3514
|
-
var
|
|
3540
|
+
var React60 = __toESM(require("react"));
|
|
3515
3541
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3516
|
-
var
|
|
3542
|
+
var import_ui49 = require("@elementor/ui");
|
|
3517
3543
|
var import_i18n32 = require("@wordpress/i18n");
|
|
3518
3544
|
var positionOptions2 = [
|
|
3519
3545
|
{ label: (0, import_i18n32.__)("Fill", "elementor"), value: "fill" },
|
|
@@ -3523,13 +3549,13 @@ var positionOptions2 = [
|
|
|
3523
3549
|
{ label: (0, import_i18n32.__)("Scale down", "elementor"), value: "scale-down" }
|
|
3524
3550
|
];
|
|
3525
3551
|
var ObjectFitField = () => {
|
|
3526
|
-
return /* @__PURE__ */
|
|
3552
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React60.createElement(import_ui49.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n32.__)("Object fit", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui49.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React60.createElement(import_editor_controls30.SelectControl, { options: positionOptions2 }))));
|
|
3527
3553
|
};
|
|
3528
3554
|
|
|
3529
3555
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3530
|
-
var
|
|
3556
|
+
var React61 = __toESM(require("react"));
|
|
3531
3557
|
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3532
|
-
var
|
|
3558
|
+
var import_ui50 = require("@elementor/ui");
|
|
3533
3559
|
var import_i18n33 = require("@wordpress/i18n");
|
|
3534
3560
|
var positionOptions3 = [
|
|
3535
3561
|
{ label: (0, import_i18n33.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -3543,110 +3569,132 @@ var positionOptions3 = [
|
|
|
3543
3569
|
{ label: (0, import_i18n33.__)("Bottom right", "elementor"), value: "bottom right" }
|
|
3544
3570
|
];
|
|
3545
3571
|
var ObjectPositionField = () => {
|
|
3546
|
-
return /* @__PURE__ */
|
|
3572
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n33.__)("Object position", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React61.createElement(import_editor_controls31.SelectControl, { options: positionOptions3 }))));
|
|
3547
3573
|
};
|
|
3548
3574
|
|
|
3549
3575
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3550
|
-
var
|
|
3576
|
+
var React62 = __toESM(require("react"));
|
|
3551
3577
|
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3552
3578
|
var import_icons18 = require("@elementor/icons");
|
|
3553
|
-
var
|
|
3579
|
+
var import_ui51 = require("@elementor/ui");
|
|
3554
3580
|
var import_i18n34 = require("@wordpress/i18n");
|
|
3555
3581
|
var options6 = [
|
|
3556
3582
|
{
|
|
3557
3583
|
value: "visible",
|
|
3558
3584
|
label: (0, import_i18n34.__)("Visible", "elementor"),
|
|
3559
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3585
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons18.EyeIcon, { fontSize: size }),
|
|
3560
3586
|
showTooltip: true
|
|
3561
3587
|
},
|
|
3562
3588
|
{
|
|
3563
3589
|
value: "hidden",
|
|
3564
3590
|
label: (0, import_i18n34.__)("Hidden", "elementor"),
|
|
3565
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3591
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons18.EyeOffIcon, { fontSize: size }),
|
|
3566
3592
|
showTooltip: true
|
|
3567
3593
|
},
|
|
3568
3594
|
{
|
|
3569
3595
|
value: "auto",
|
|
3570
3596
|
label: (0, import_i18n34.__)("Auto", "elementor"),
|
|
3571
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3597
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons18.LetterAIcon, { fontSize: size }),
|
|
3572
3598
|
showTooltip: true
|
|
3573
3599
|
}
|
|
3574
3600
|
];
|
|
3575
3601
|
var OverflowField = () => {
|
|
3576
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n34.__)("Overflow", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React62.createElement(import_editor_controls32.ToggleControl, { options: options6 }))));
|
|
3577
3603
|
};
|
|
3578
3604
|
|
|
3579
3605
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3580
|
-
var
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
const isVersion330Active = (0, import_editor_v1_adapters12.isExperimentActive)("e_v_3_30");
|
|
3584
|
-
return /* @__PURE__ */ React62.createElement(SectionContent, null, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(SizeField, { bind: "width", label: (0, import_i18n35.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(SizeField, { bind: "height", label: (0, import_i18n35.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React62.createElement(import_ui51.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(
|
|
3585
|
-
SizeField,
|
|
3606
|
+
var EXPERIMENT_ID = "e_v_3_30";
|
|
3607
|
+
var CssSizeProps = [
|
|
3608
|
+
[
|
|
3586
3609
|
{
|
|
3587
|
-
bind: "
|
|
3588
|
-
label: (0, import_i18n35.__)("
|
|
3589
|
-
|
|
3610
|
+
bind: "width",
|
|
3611
|
+
label: (0, import_i18n35.__)("Width", "elementor")
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
bind: "height",
|
|
3615
|
+
label: (0, import_i18n35.__)("Height", "elementor")
|
|
3590
3616
|
}
|
|
3591
|
-
|
|
3592
|
-
|
|
3617
|
+
],
|
|
3618
|
+
[
|
|
3619
|
+
{
|
|
3620
|
+
bind: "min-width",
|
|
3621
|
+
label: (0, import_i18n35.__)("Min width", "elementor")
|
|
3622
|
+
},
|
|
3593
3623
|
{
|
|
3594
3624
|
bind: "min-height",
|
|
3595
|
-
label: (0, import_i18n35.__)("Min height", "elementor")
|
|
3596
|
-
extendedValues: ["auto"]
|
|
3625
|
+
label: (0, import_i18n35.__)("Min height", "elementor")
|
|
3597
3626
|
}
|
|
3598
|
-
|
|
3627
|
+
],
|
|
3628
|
+
[
|
|
3629
|
+
{
|
|
3630
|
+
bind: "max-width",
|
|
3631
|
+
label: (0, import_i18n35.__)("Max width", "elementor")
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
bind: "max-height",
|
|
3635
|
+
label: (0, import_i18n35.__)("Max height", "elementor")
|
|
3636
|
+
}
|
|
3637
|
+
]
|
|
3638
|
+
];
|
|
3639
|
+
var SizeSection = () => {
|
|
3640
|
+
const [fitValue] = useStylesField("object-fit");
|
|
3641
|
+
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3642
|
+
const gridRowRefs = [(0, import_react28.useRef)(), (0, import_react28.useRef)(), (0, import_react28.useRef)()];
|
|
3643
|
+
const isVersion330Active = (0, import_editor_v1_adapters12.isExperimentActive)(EXPERIMENT_ID);
|
|
3644
|
+
return /* @__PURE__ */ React63.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React63.createElement(import_ui52.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React63.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(import_ui52.Stack, null, /* @__PURE__ */ React63.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React63.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React63.createElement(import_ui52.Stack, { gap: 2 }, /* @__PURE__ */ React63.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React63.createElement(import_editor_controls33.AspectRatioControl, { label: (0, import_i18n35.__)("Aspect Ratio", "elementor") })), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ObjectPositionField, null)))));
|
|
3599
3645
|
};
|
|
3600
|
-
var SizeField = ({ label, bind,
|
|
3601
|
-
return /* @__PURE__ */
|
|
3646
|
+
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3647
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind }, /* @__PURE__ */ React63.createElement(import_ui52.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, label)), /* @__PURE__ */ React63.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React63.createElement(import_editor_controls33.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
3602
3648
|
};
|
|
3603
3649
|
|
|
3604
3650
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3605
|
-
var
|
|
3651
|
+
var React64 = __toESM(require("react"));
|
|
3606
3652
|
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
3607
3653
|
var import_i18n36 = require("@wordpress/i18n");
|
|
3608
3654
|
var SpacingSection = () => {
|
|
3609
3655
|
const { isSiteRtl } = useDirection();
|
|
3610
|
-
return /* @__PURE__ */
|
|
3656
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, /* @__PURE__ */ React64.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React64.createElement(
|
|
3611
3657
|
import_editor_controls34.LinkedDimensionsControl,
|
|
3612
3658
|
{
|
|
3613
3659
|
label: (0, import_i18n36.__)("Margin", "elementor"),
|
|
3614
3660
|
isSiteRtl,
|
|
3615
|
-
|
|
3661
|
+
extendedOptions: ["auto"]
|
|
3616
3662
|
}
|
|
3617
|
-
)), /* @__PURE__ */
|
|
3663
|
+
)), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React64.createElement(import_editor_controls34.LinkedDimensionsControl, { label: (0, import_i18n36.__)("Padding", "elementor"), isSiteRtl })));
|
|
3618
3664
|
};
|
|
3619
3665
|
|
|
3620
3666
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3621
|
-
var
|
|
3667
|
+
var React80 = __toESM(require("react"));
|
|
3622
3668
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
3623
3669
|
|
|
3624
3670
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3625
|
-
var
|
|
3671
|
+
var React65 = __toESM(require("react"));
|
|
3626
3672
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
3627
|
-
var
|
|
3673
|
+
var import_ui53 = require("@elementor/ui");
|
|
3628
3674
|
var import_i18n37 = require("@wordpress/i18n");
|
|
3629
3675
|
var ColumnCountField = () => {
|
|
3630
|
-
return /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React65.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, (0, import_i18n37.__)("Columns", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(import_editor_controls35.NumberControl, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
3631
3677
|
};
|
|
3632
3678
|
|
|
3633
3679
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3634
|
-
var
|
|
3680
|
+
var React66 = __toESM(require("react"));
|
|
3681
|
+
var import_react29 = require("react");
|
|
3635
3682
|
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
3636
|
-
var
|
|
3683
|
+
var import_ui54 = require("@elementor/ui");
|
|
3637
3684
|
var import_i18n38 = require("@wordpress/i18n");
|
|
3638
3685
|
var ColumnGapField = () => {
|
|
3639
|
-
|
|
3686
|
+
const rowRef = (0, import_react29.useRef)();
|
|
3687
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React66.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React66.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, (0, import_i18n38.__)("Column gap", "elementor"))), /* @__PURE__ */ React66.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(import_editor_controls36.SizeControl, { anchorRef: rowRef }))));
|
|
3640
3688
|
};
|
|
3641
3689
|
|
|
3642
3690
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3643
|
-
var
|
|
3691
|
+
var React67 = __toESM(require("react"));
|
|
3644
3692
|
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3645
|
-
var
|
|
3693
|
+
var import_ui55 = require("@elementor/ui");
|
|
3646
3694
|
var import_i18n40 = require("@wordpress/i18n");
|
|
3647
3695
|
|
|
3648
3696
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3649
|
-
var
|
|
3697
|
+
var import_react30 = require("react");
|
|
3650
3698
|
var import_i18n39 = require("@wordpress/i18n");
|
|
3651
3699
|
var supportedCategories = {
|
|
3652
3700
|
system: (0, import_i18n39.__)("System", "elementor"),
|
|
@@ -3663,7 +3711,7 @@ var getFontFamilies = () => {
|
|
|
3663
3711
|
};
|
|
3664
3712
|
var useFontFamilies = () => {
|
|
3665
3713
|
const fontFamilies = getFontFamilies();
|
|
3666
|
-
return (0,
|
|
3714
|
+
return (0, import_react30.useMemo)(() => {
|
|
3667
3715
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
3668
3716
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
3669
3717
|
if (!supportedCategories[category]) {
|
|
@@ -3688,44 +3736,46 @@ var FontFamilyField = () => {
|
|
|
3688
3736
|
if (fontFamilies.length === 0) {
|
|
3689
3737
|
return null;
|
|
3690
3738
|
}
|
|
3691
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React67.createElement(import_ui55.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, (0, import_i18n40.__)("Font family", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui55.Grid, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React67.createElement(import_editor_controls37.FontFamilyControl, { fontFamilies }))));
|
|
3692
3740
|
};
|
|
3693
3741
|
|
|
3694
3742
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3695
|
-
var
|
|
3743
|
+
var React68 = __toESM(require("react"));
|
|
3744
|
+
var import_react31 = require("react");
|
|
3696
3745
|
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3697
|
-
var
|
|
3746
|
+
var import_ui56 = require("@elementor/ui");
|
|
3698
3747
|
var import_i18n41 = require("@wordpress/i18n");
|
|
3699
3748
|
var FontSizeField = () => {
|
|
3700
|
-
|
|
3749
|
+
const rowRef = (0, import_react31.useRef)();
|
|
3750
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React68.createElement(import_ui56.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React68.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, (0, import_i18n41.__)("Font size", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(import_editor_controls38.SizeControl, { anchorRef: rowRef }))));
|
|
3701
3751
|
};
|
|
3702
3752
|
|
|
3703
3753
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3704
|
-
var
|
|
3754
|
+
var React69 = __toESM(require("react"));
|
|
3705
3755
|
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3706
3756
|
var import_icons19 = require("@elementor/icons");
|
|
3707
|
-
var
|
|
3757
|
+
var import_ui57 = require("@elementor/ui");
|
|
3708
3758
|
var import_i18n42 = require("@wordpress/i18n");
|
|
3709
3759
|
var options7 = [
|
|
3710
3760
|
{
|
|
3711
3761
|
value: "normal",
|
|
3712
3762
|
label: (0, import_i18n42.__)("Normal", "elementor"),
|
|
3713
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3763
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
3714
3764
|
showTooltip: true
|
|
3715
3765
|
},
|
|
3716
3766
|
{
|
|
3717
3767
|
value: "italic",
|
|
3718
3768
|
label: (0, import_i18n42.__)("Italic", "elementor"),
|
|
3719
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3769
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons19.ItalicIcon, { fontSize: size }),
|
|
3720
3770
|
showTooltip: true
|
|
3721
3771
|
}
|
|
3722
3772
|
];
|
|
3723
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3773
|
+
var FontStyleField = () => /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React69.createElement(import_ui57.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(import_editor_controls39.ControlFormLabel, null, (0, import_i18n42.__)("Font style", "elementor"))), /* @__PURE__ */ React69.createElement(import_ui57.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React69.createElement(import_editor_controls39.ToggleControl, { options: options7 }))));
|
|
3724
3774
|
|
|
3725
3775
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3726
|
-
var
|
|
3776
|
+
var React70 = __toESM(require("react"));
|
|
3727
3777
|
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
3728
|
-
var
|
|
3778
|
+
var import_ui58 = require("@elementor/ui");
|
|
3729
3779
|
var import_i18n43 = require("@wordpress/i18n");
|
|
3730
3780
|
var fontWeightOptions = [
|
|
3731
3781
|
{ value: "100", label: (0, import_i18n43.__)("100 - Thin", "elementor") },
|
|
@@ -3739,135 +3789,139 @@ var fontWeightOptions = [
|
|
|
3739
3789
|
{ value: "900", label: (0, import_i18n43.__)("900 - Black", "elementor") }
|
|
3740
3790
|
];
|
|
3741
3791
|
var FontWeightField = () => {
|
|
3742
|
-
return /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React70.createElement(import_ui58.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(ControlLabel, null, (0, import_i18n43.__)("Font weight", "elementor"))), /* @__PURE__ */ React70.createElement(import_ui58.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React70.createElement(import_editor_controls40.SelectControl, { options: fontWeightOptions }))));
|
|
3743
3793
|
};
|
|
3744
3794
|
|
|
3745
3795
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3746
|
-
var
|
|
3796
|
+
var React71 = __toESM(require("react"));
|
|
3797
|
+
var import_react32 = require("react");
|
|
3747
3798
|
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3748
|
-
var
|
|
3799
|
+
var import_ui59 = require("@elementor/ui");
|
|
3749
3800
|
var import_i18n44 = require("@wordpress/i18n");
|
|
3750
3801
|
var LetterSpacingField = () => {
|
|
3751
|
-
|
|
3802
|
+
const rowRef = (0, import_react32.useRef)();
|
|
3803
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React71.createElement(import_ui59.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React71.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, (0, import_i18n44.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React71.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(import_editor_controls41.SizeControl, { anchorRef: rowRef }))));
|
|
3752
3804
|
};
|
|
3753
3805
|
|
|
3754
3806
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3755
|
-
var
|
|
3807
|
+
var React72 = __toESM(require("react"));
|
|
3808
|
+
var import_react33 = require("react");
|
|
3756
3809
|
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3757
|
-
var
|
|
3810
|
+
var import_ui60 = require("@elementor/ui");
|
|
3758
3811
|
var import_i18n45 = require("@wordpress/i18n");
|
|
3759
3812
|
var LineHeightField = () => {
|
|
3760
|
-
|
|
3813
|
+
const rowRef = (0, import_react33.useRef)();
|
|
3814
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React72.createElement(import_ui60.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React72.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, (0, import_i18n45.__)("Line height", "elementor"))), /* @__PURE__ */ React72.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef }))));
|
|
3761
3815
|
};
|
|
3762
3816
|
|
|
3763
3817
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3764
|
-
var
|
|
3818
|
+
var React73 = __toESM(require("react"));
|
|
3765
3819
|
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3766
3820
|
var import_icons20 = require("@elementor/icons");
|
|
3767
|
-
var
|
|
3821
|
+
var import_ui61 = require("@elementor/ui");
|
|
3768
3822
|
var import_i18n46 = require("@wordpress/i18n");
|
|
3769
|
-
var AlignStartIcon = (0,
|
|
3770
|
-
var AlignEndIcon = (0,
|
|
3823
|
+
var AlignStartIcon = (0, import_ui61.withDirection)(import_icons20.AlignLeftIcon);
|
|
3824
|
+
var AlignEndIcon = (0, import_ui61.withDirection)(import_icons20.AlignRightIcon);
|
|
3771
3825
|
var options8 = [
|
|
3772
3826
|
{
|
|
3773
3827
|
value: "start",
|
|
3774
3828
|
label: (0, import_i18n46.__)("Start", "elementor"),
|
|
3775
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3829
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignStartIcon, { fontSize: size }),
|
|
3776
3830
|
showTooltip: true
|
|
3777
3831
|
},
|
|
3778
3832
|
{
|
|
3779
3833
|
value: "center",
|
|
3780
3834
|
label: (0, import_i18n46.__)("Center", "elementor"),
|
|
3781
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3835
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(import_icons20.AlignCenterIcon, { fontSize: size }),
|
|
3782
3836
|
showTooltip: true
|
|
3783
3837
|
},
|
|
3784
3838
|
{
|
|
3785
3839
|
value: "end",
|
|
3786
3840
|
label: (0, import_i18n46.__)("End", "elementor"),
|
|
3787
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3841
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignEndIcon, { fontSize: size }),
|
|
3788
3842
|
showTooltip: true
|
|
3789
3843
|
},
|
|
3790
3844
|
{
|
|
3791
3845
|
value: "justify",
|
|
3792
3846
|
label: (0, import_i18n46.__)("Justify", "elementor"),
|
|
3793
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3847
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(import_icons20.AlignJustifiedIcon, { fontSize: size }),
|
|
3794
3848
|
showTooltip: true
|
|
3795
3849
|
}
|
|
3796
3850
|
];
|
|
3797
3851
|
var TextAlignmentField = () => {
|
|
3798
|
-
return /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ React73.createElement(UiProviders, null, /* @__PURE__ */ React73.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React73.createElement(import_ui61.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React73.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, (0, import_i18n46.__)("Text align", "elementor"))), /* @__PURE__ */ React73.createElement(import_ui61.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React73.createElement(import_editor_controls43.ToggleControl, { options: options8 })))));
|
|
3799
3853
|
};
|
|
3800
3854
|
|
|
3801
3855
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3802
|
-
var
|
|
3856
|
+
var React74 = __toESM(require("react"));
|
|
3803
3857
|
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3804
|
-
var
|
|
3858
|
+
var import_ui62 = require("@elementor/ui");
|
|
3805
3859
|
var import_i18n47 = require("@wordpress/i18n");
|
|
3806
3860
|
var TextColorField = () => {
|
|
3807
|
-
return /* @__PURE__ */
|
|
3861
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React74.createElement(import_ui62.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React74.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlLabel, null, (0, import_i18n47.__)("Text color", "elementor"))), /* @__PURE__ */ React74.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(import_editor_controls44.ColorControl, null))));
|
|
3808
3862
|
};
|
|
3809
3863
|
|
|
3810
3864
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3811
|
-
var
|
|
3865
|
+
var React75 = __toESM(require("react"));
|
|
3812
3866
|
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3813
3867
|
var import_icons21 = require("@elementor/icons");
|
|
3814
|
-
var
|
|
3868
|
+
var import_ui63 = require("@elementor/ui");
|
|
3815
3869
|
var import_i18n48 = require("@wordpress/i18n");
|
|
3816
3870
|
var options9 = [
|
|
3817
3871
|
{
|
|
3818
3872
|
value: "none",
|
|
3819
3873
|
label: (0, import_i18n48.__)("None", "elementor"),
|
|
3820
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3874
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
3821
3875
|
showTooltip: true,
|
|
3822
3876
|
exclusive: true
|
|
3823
3877
|
},
|
|
3824
3878
|
{
|
|
3825
3879
|
value: "underline",
|
|
3826
3880
|
label: (0, import_i18n48.__)("Underline", "elementor"),
|
|
3827
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3881
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.UnderlineIcon, { fontSize: size }),
|
|
3828
3882
|
showTooltip: true
|
|
3829
3883
|
},
|
|
3830
3884
|
{
|
|
3831
3885
|
value: "line-through",
|
|
3832
3886
|
label: (0, import_i18n48.__)("Line-through", "elementor"),
|
|
3833
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3887
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.StrikethroughIcon, { fontSize: size }),
|
|
3834
3888
|
showTooltip: true
|
|
3835
3889
|
},
|
|
3836
3890
|
{
|
|
3837
3891
|
value: "overline",
|
|
3838
3892
|
label: (0, import_i18n48.__)("Overline", "elementor"),
|
|
3839
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3893
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.OverlineIcon, { fontSize: size }),
|
|
3840
3894
|
showTooltip: true
|
|
3841
3895
|
}
|
|
3842
3896
|
];
|
|
3843
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3897
|
+
var TextDecorationField = () => /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React75.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React75.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, (0, import_i18n48.__)("Line decoration", "elementor"))), /* @__PURE__ */ React75.createElement(import_ui63.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React75.createElement(import_editor_controls45.ToggleControl, { options: options9, exclusive: false }))));
|
|
3844
3898
|
|
|
3845
3899
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3846
|
-
var
|
|
3900
|
+
var React76 = __toESM(require("react"));
|
|
3847
3901
|
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3848
3902
|
var import_icons22 = require("@elementor/icons");
|
|
3849
|
-
var
|
|
3903
|
+
var import_ui64 = require("@elementor/ui");
|
|
3850
3904
|
var import_i18n49 = require("@wordpress/i18n");
|
|
3851
3905
|
var options10 = [
|
|
3852
3906
|
{
|
|
3853
3907
|
value: "ltr",
|
|
3854
3908
|
label: (0, import_i18n49.__)("Left to right", "elementor"),
|
|
3855
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3909
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.TextDirectionLtrIcon, { fontSize: size }),
|
|
3856
3910
|
showTooltip: true
|
|
3857
3911
|
},
|
|
3858
3912
|
{
|
|
3859
3913
|
value: "rtl",
|
|
3860
3914
|
label: (0, import_i18n49.__)("Right to left", "elementor"),
|
|
3861
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3915
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.TextDirectionRtlIcon, { fontSize: size }),
|
|
3862
3916
|
showTooltip: true
|
|
3863
3917
|
}
|
|
3864
3918
|
];
|
|
3865
3919
|
var TextDirectionField = () => {
|
|
3866
|
-
return /* @__PURE__ */
|
|
3920
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React76.createElement(import_ui64.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React76.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, (0, import_i18n49.__)("Direction", "elementor"))), /* @__PURE__ */ React76.createElement(import_ui64.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React76.createElement(import_editor_controls46.ToggleControl, { options: options10 }))));
|
|
3867
3921
|
};
|
|
3868
3922
|
|
|
3869
3923
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3870
|
-
var
|
|
3924
|
+
var React77 = __toESM(require("react"));
|
|
3871
3925
|
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
3872
3926
|
var import_i18n50 = require("@wordpress/i18n");
|
|
3873
3927
|
var initTextStroke = {
|
|
@@ -3896,60 +3950,62 @@ var TextStrokeField = () => {
|
|
|
3896
3950
|
setTextStroke(null);
|
|
3897
3951
|
};
|
|
3898
3952
|
const hasTextStroke = Boolean(textStroke);
|
|
3899
|
-
return /* @__PURE__ */
|
|
3953
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React77.createElement(
|
|
3900
3954
|
AddOrRemoveContent,
|
|
3901
3955
|
{
|
|
3902
3956
|
isAdded: hasTextStroke,
|
|
3903
3957
|
onAdd: addTextStroke,
|
|
3904
3958
|
onRemove: removeTextStroke,
|
|
3905
3959
|
disabled: !canEdit,
|
|
3906
|
-
renderLabel: () => /* @__PURE__ */
|
|
3960
|
+
renderLabel: () => /* @__PURE__ */ React77.createElement(ControlLabel, null, (0, import_i18n50.__)("Text stroke", "elementor"))
|
|
3907
3961
|
},
|
|
3908
|
-
/* @__PURE__ */
|
|
3962
|
+
/* @__PURE__ */ React77.createElement(import_editor_controls47.StrokeControl, null)
|
|
3909
3963
|
));
|
|
3910
3964
|
};
|
|
3911
3965
|
|
|
3912
3966
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3913
|
-
var
|
|
3967
|
+
var React78 = __toESM(require("react"));
|
|
3914
3968
|
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3915
3969
|
var import_icons23 = require("@elementor/icons");
|
|
3916
|
-
var
|
|
3970
|
+
var import_ui65 = require("@elementor/ui");
|
|
3917
3971
|
var import_i18n51 = require("@wordpress/i18n");
|
|
3918
3972
|
var options11 = [
|
|
3919
3973
|
{
|
|
3920
3974
|
value: "none",
|
|
3921
3975
|
label: (0, import_i18n51.__)("None", "elementor"),
|
|
3922
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3976
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.MinusIcon, { fontSize: size }),
|
|
3923
3977
|
showTooltip: true
|
|
3924
3978
|
},
|
|
3925
3979
|
{
|
|
3926
3980
|
value: "capitalize",
|
|
3927
3981
|
label: (0, import_i18n51.__)("Capitalize", "elementor"),
|
|
3928
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3982
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.LetterCaseIcon, { fontSize: size }),
|
|
3929
3983
|
showTooltip: true
|
|
3930
3984
|
},
|
|
3931
3985
|
{
|
|
3932
3986
|
value: "uppercase",
|
|
3933
3987
|
label: (0, import_i18n51.__)("Uppercase", "elementor"),
|
|
3934
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3988
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.LetterCaseUpperIcon, { fontSize: size }),
|
|
3935
3989
|
showTooltip: true
|
|
3936
3990
|
},
|
|
3937
3991
|
{
|
|
3938
3992
|
value: "lowercase",
|
|
3939
3993
|
label: (0, import_i18n51.__)("Lowercase", "elementor"),
|
|
3940
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3994
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons23.LetterCaseLowerIcon, { fontSize: size }),
|
|
3941
3995
|
showTooltip: true
|
|
3942
3996
|
}
|
|
3943
3997
|
];
|
|
3944
|
-
var TransformField = () => /* @__PURE__ */
|
|
3998
|
+
var TransformField = () => /* @__PURE__ */ React78.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React78.createElement(import_ui65.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React78.createElement(import_ui65.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React78.createElement(ControlLabel, null, (0, import_i18n51.__)("Text transform", "elementor"))), /* @__PURE__ */ React78.createElement(import_ui65.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React78.createElement(import_editor_controls48.ToggleControl, { options: options11 }))));
|
|
3945
3999
|
|
|
3946
4000
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3947
|
-
var
|
|
4001
|
+
var React79 = __toESM(require("react"));
|
|
4002
|
+
var import_react34 = require("react");
|
|
3948
4003
|
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
3949
|
-
var
|
|
4004
|
+
var import_ui66 = require("@elementor/ui");
|
|
3950
4005
|
var import_i18n52 = require("@wordpress/i18n");
|
|
3951
4006
|
var WordSpacingField = () => {
|
|
3952
|
-
|
|
4007
|
+
const rowRef = (0, import_react34.useRef)();
|
|
4008
|
+
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React79.createElement(import_ui66.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React79.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(ControlLabel, null, (0, import_i18n52.__)("Word spacing", "elementor"))), /* @__PURE__ */ React79.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(import_editor_controls49.SizeControl, { anchorRef: rowRef }))));
|
|
3953
4009
|
};
|
|
3954
4010
|
|
|
3955
4011
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
@@ -3957,7 +4013,7 @@ var TypographySection = () => {
|
|
|
3957
4013
|
const [columnCount] = useStylesField("column-count");
|
|
3958
4014
|
const isVersion330Active = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
3959
4015
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
3960
|
-
return /* @__PURE__ */
|
|
4016
|
+
return /* @__PURE__ */ React80.createElement(SectionContent, null, /* @__PURE__ */ React80.createElement(FontFamilyField, null), /* @__PURE__ */ React80.createElement(FontWeightField, null), /* @__PURE__ */ React80.createElement(FontSizeField, null), /* @__PURE__ */ React80.createElement(PanelDivider, null), /* @__PURE__ */ React80.createElement(TextAlignmentField, null), /* @__PURE__ */ React80.createElement(TextColorField, null), /* @__PURE__ */ React80.createElement(
|
|
3961
4017
|
StyleTabCollapsibleContent,
|
|
3962
4018
|
{
|
|
3963
4019
|
fields: [
|
|
@@ -3972,19 +4028,19 @@ var TypographySection = () => {
|
|
|
3972
4028
|
"stroke"
|
|
3973
4029
|
]
|
|
3974
4030
|
},
|
|
3975
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ React80.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React80.createElement(LineHeightField, null), /* @__PURE__ */ React80.createElement(LetterSpacingField, null), /* @__PURE__ */ React80.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React80.createElement(React80.Fragment, null, /* @__PURE__ */ React80.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React80.createElement(ColumnGapField, null)), /* @__PURE__ */ React80.createElement(PanelDivider, null), /* @__PURE__ */ React80.createElement(TextDecorationField, null), /* @__PURE__ */ React80.createElement(TransformField, null), /* @__PURE__ */ React80.createElement(TextDirectionField, null), /* @__PURE__ */ React80.createElement(FontStyleField, null), /* @__PURE__ */ React80.createElement(TextStrokeField, null))
|
|
3976
4032
|
));
|
|
3977
4033
|
};
|
|
3978
4034
|
|
|
3979
4035
|
// src/components/style-tab-section.tsx
|
|
3980
|
-
var
|
|
4036
|
+
var React81 = __toESM(require("react"));
|
|
3981
4037
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
3982
4038
|
var StyleTabSection = ({ section, fields = [] }) => {
|
|
3983
4039
|
const { component, name, title } = section;
|
|
3984
4040
|
const tabDefaults = useDefaultPanelSettings();
|
|
3985
4041
|
const SectionComponent = component;
|
|
3986
4042
|
const isExpanded = (0, import_editor_v1_adapters14.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
3987
|
-
return /* @__PURE__ */
|
|
4043
|
+
return /* @__PURE__ */ React81.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React81.createElement(SectionComponent, null));
|
|
3988
4044
|
};
|
|
3989
4045
|
|
|
3990
4046
|
// src/components/style-tab.tsx
|
|
@@ -3999,9 +4055,9 @@ var stickyHeaderStyles = {
|
|
|
3999
4055
|
var StyleTab = () => {
|
|
4000
4056
|
const currentClassesProp = useCurrentClassesProp();
|
|
4001
4057
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
4002
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4058
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react35.useState)(null);
|
|
4003
4059
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4004
|
-
return /* @__PURE__ */
|
|
4060
|
+
return /* @__PURE__ */ React82.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React82.createElement(
|
|
4005
4061
|
StyleProvider,
|
|
4006
4062
|
{
|
|
4007
4063
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4012,7 +4068,7 @@ var StyleTab = () => {
|
|
|
4012
4068
|
},
|
|
4013
4069
|
setMetaState: setActiveStyleState
|
|
4014
4070
|
},
|
|
4015
|
-
/* @__PURE__ */
|
|
4071
|
+
/* @__PURE__ */ React82.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React82.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React82.createElement(ClassesHeader, null, /* @__PURE__ */ React82.createElement(CssClassSelector, null), /* @__PURE__ */ React82.createElement(import_ui67.Divider, null)), /* @__PURE__ */ React82.createElement(SectionsList, null, /* @__PURE__ */ React82.createElement(
|
|
4016
4072
|
StyleTabSection,
|
|
4017
4073
|
{
|
|
4018
4074
|
section: {
|
|
@@ -4031,7 +4087,7 @@ var StyleTab = () => {
|
|
|
4031
4087
|
"gap"
|
|
4032
4088
|
]
|
|
4033
4089
|
}
|
|
4034
|
-
), /* @__PURE__ */
|
|
4090
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4035
4091
|
StyleTabSection,
|
|
4036
4092
|
{
|
|
4037
4093
|
section: {
|
|
@@ -4041,7 +4097,7 @@ var StyleTab = () => {
|
|
|
4041
4097
|
},
|
|
4042
4098
|
fields: ["margin", "padding"]
|
|
4043
4099
|
}
|
|
4044
|
-
), /* @__PURE__ */
|
|
4100
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4045
4101
|
StyleTabSection,
|
|
4046
4102
|
{
|
|
4047
4103
|
section: {
|
|
@@ -4061,7 +4117,7 @@ var StyleTab = () => {
|
|
|
4061
4117
|
"object-fit"
|
|
4062
4118
|
]
|
|
4063
4119
|
}
|
|
4064
|
-
), /* @__PURE__ */
|
|
4120
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4065
4121
|
StyleTabSection,
|
|
4066
4122
|
{
|
|
4067
4123
|
section: {
|
|
@@ -4071,7 +4127,7 @@ var StyleTab = () => {
|
|
|
4071
4127
|
},
|
|
4072
4128
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4073
4129
|
}
|
|
4074
|
-
), /* @__PURE__ */
|
|
4130
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4075
4131
|
StyleTabSection,
|
|
4076
4132
|
{
|
|
4077
4133
|
section: {
|
|
@@ -4096,7 +4152,7 @@ var StyleTab = () => {
|
|
|
4096
4152
|
"stroke"
|
|
4097
4153
|
]
|
|
4098
4154
|
}
|
|
4099
|
-
), /* @__PURE__ */
|
|
4155
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4100
4156
|
StyleTabSection,
|
|
4101
4157
|
{
|
|
4102
4158
|
section: {
|
|
@@ -4106,7 +4162,7 @@ var StyleTab = () => {
|
|
|
4106
4162
|
},
|
|
4107
4163
|
fields: ["background"]
|
|
4108
4164
|
}
|
|
4109
|
-
), /* @__PURE__ */
|
|
4165
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4110
4166
|
StyleTabSection,
|
|
4111
4167
|
{
|
|
4112
4168
|
section: {
|
|
@@ -4116,7 +4172,7 @@ var StyleTab = () => {
|
|
|
4116
4172
|
},
|
|
4117
4173
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4118
4174
|
}
|
|
4119
|
-
), /* @__PURE__ */
|
|
4175
|
+
), /* @__PURE__ */ React82.createElement(
|
|
4120
4176
|
StyleTabSection,
|
|
4121
4177
|
{
|
|
4122
4178
|
section: {
|
|
@@ -4131,7 +4187,7 @@ var StyleTab = () => {
|
|
|
4131
4187
|
};
|
|
4132
4188
|
function ClassesHeader({ children }) {
|
|
4133
4189
|
const scrollDirection = useScrollDirection();
|
|
4134
|
-
return /* @__PURE__ */
|
|
4190
|
+
return /* @__PURE__ */ React82.createElement(import_ui67.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4135
4191
|
}
|
|
4136
4192
|
function useCurrentClassesProp() {
|
|
4137
4193
|
const { elementType } = useElement();
|
|
@@ -4150,16 +4206,16 @@ var EditingPanelTabs = () => {
|
|
|
4150
4206
|
return (
|
|
4151
4207
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4152
4208
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4153
|
-
/* @__PURE__ */
|
|
4209
|
+
/* @__PURE__ */ React83.createElement(import_react36.Fragment, { key: element.id }, /* @__PURE__ */ React83.createElement(PanelTabContent, null))
|
|
4154
4210
|
);
|
|
4155
4211
|
};
|
|
4156
4212
|
var PanelTabContent = () => {
|
|
4157
4213
|
const editorDefaults = useDefaultPanelSettings();
|
|
4158
4214
|
const defaultComponentTab = (0, import_editor_v1_adapters15.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
4159
4215
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4160
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
4161
|
-
return /* @__PURE__ */
|
|
4162
|
-
|
|
4216
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui68.useTabs)(currentTab);
|
|
4217
|
+
return /* @__PURE__ */ React83.createElement(ScrollProvider, null, /* @__PURE__ */ React83.createElement(import_ui68.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React83.createElement(import_ui68.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React83.createElement(
|
|
4218
|
+
import_ui68.Tabs,
|
|
4163
4219
|
{
|
|
4164
4220
|
variant: "fullWidth",
|
|
4165
4221
|
size: "small",
|
|
@@ -4170,9 +4226,9 @@ var PanelTabContent = () => {
|
|
|
4170
4226
|
setCurrentTab(newValue);
|
|
4171
4227
|
}
|
|
4172
4228
|
},
|
|
4173
|
-
/* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4175
|
-
), /* @__PURE__ */
|
|
4229
|
+
/* @__PURE__ */ React83.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4230
|
+
/* @__PURE__ */ React83.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("Style", "elementor"), ...getTabProps("style") })
|
|
4231
|
+
), /* @__PURE__ */ React83.createElement(import_ui68.Divider, null)), /* @__PURE__ */ React83.createElement(import_ui68.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React83.createElement(SettingsTab, null)), /* @__PURE__ */ React83.createElement(import_ui68.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React83.createElement(StyleTab, null))));
|
|
4176
4232
|
};
|
|
4177
4233
|
|
|
4178
4234
|
// src/components/editing-panel.tsx
|
|
@@ -4185,7 +4241,7 @@ var EditingPanel = () => {
|
|
|
4185
4241
|
return null;
|
|
4186
4242
|
}
|
|
4187
4243
|
const panelTitle = (0, import_i18n55.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4188
|
-
return /* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ React84.createElement(import_ui69.ErrorBoundary, { fallback: /* @__PURE__ */ React84.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React84.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React84.createElement(import_editor_ui5.ThemeProvider, null, /* @__PURE__ */ React84.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React84.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React84.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React84.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React84.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React84.createElement(import_editor_controls50.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React84.createElement(import_editor_controls50.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React84.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React84.createElement(EditingPanelTabs, null)))))))));
|
|
4189
4245
|
};
|
|
4190
4246
|
|
|
4191
4247
|
// src/panel.ts
|
|
@@ -4201,7 +4257,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4201
4257
|
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
4202
4258
|
|
|
4203
4259
|
// src/hooks/use-open-editor-panel.ts
|
|
4204
|
-
var
|
|
4260
|
+
var import_react37 = require("react");
|
|
4205
4261
|
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
4206
4262
|
|
|
4207
4263
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -4218,7 +4274,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
4218
4274
|
// src/hooks/use-open-editor-panel.ts
|
|
4219
4275
|
var useOpenEditorPanel = () => {
|
|
4220
4276
|
const { open } = usePanelActions();
|
|
4221
|
-
(0,
|
|
4277
|
+
(0, import_react37.useEffect)(() => {
|
|
4222
4278
|
return (0, import_editor_v1_adapters16.__privateListenTo)((0, import_editor_v1_adapters16.commandStartEvent)("panel/editor/open"), () => {
|
|
4223
4279
|
if (isAtomicWidgetSelected()) {
|
|
4224
4280
|
open();
|
|
@@ -4235,37 +4291,19 @@ var EditingPanelHooks = () => {
|
|
|
4235
4291
|
|
|
4236
4292
|
// src/dynamics/init.ts
|
|
4237
4293
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
4294
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
4238
4295
|
|
|
4239
|
-
// src/dynamics/components/dynamic-
|
|
4240
|
-
var React87 = __toESM(require("react"));
|
|
4241
|
-
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4242
|
-
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4243
|
-
var import_icons26 = require("@elementor/icons");
|
|
4244
|
-
var import_ui71 = require("@elementor/ui");
|
|
4245
|
-
var import_i18n57 = require("@wordpress/i18n");
|
|
4246
|
-
|
|
4247
|
-
// src/components/popover-content.tsx
|
|
4248
|
-
var React84 = __toESM(require("react"));
|
|
4249
|
-
var import_ui69 = require("@elementor/ui");
|
|
4250
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React84.createElement(import_ui69.Stack, { alignItems, gap, p }, children);
|
|
4251
|
-
|
|
4252
|
-
// src/hooks/use-persist-dynamic-value.ts
|
|
4253
|
-
var import_session6 = require("@elementor/session");
|
|
4254
|
-
var usePersistDynamicValue = (propKey) => {
|
|
4255
|
-
const { element } = useElement();
|
|
4256
|
-
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
4257
|
-
return (0, import_session6.useSessionStorage)(prefixedKey);
|
|
4258
|
-
};
|
|
4259
|
-
|
|
4260
|
-
// src/dynamics/dynamic-control.tsx
|
|
4296
|
+
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4261
4297
|
var React85 = __toESM(require("react"));
|
|
4262
4298
|
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4299
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
4300
|
+
var import_icons25 = require("@elementor/icons");
|
|
4263
4301
|
|
|
4264
4302
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4265
|
-
var
|
|
4303
|
+
var import_react39 = require("react");
|
|
4266
4304
|
|
|
4267
4305
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4268
|
-
var
|
|
4306
|
+
var import_react38 = require("react");
|
|
4269
4307
|
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4270
4308
|
|
|
4271
4309
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -4317,7 +4355,7 @@ var usePropDynamicTags = () => {
|
|
|
4317
4355
|
const propDynamicType = getDynamicPropType(propType);
|
|
4318
4356
|
categories = propDynamicType?.settings.categories || [];
|
|
4319
4357
|
}
|
|
4320
|
-
return (0,
|
|
4358
|
+
return (0, import_react38.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
4321
4359
|
};
|
|
4322
4360
|
var getDynamicTagsByCategories = (categories) => {
|
|
4323
4361
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -4333,12 +4371,52 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
4333
4371
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4334
4372
|
var useDynamicTag = (tagName) => {
|
|
4335
4373
|
const dynamicTags = usePropDynamicTags();
|
|
4336
|
-
return (0,
|
|
4374
|
+
return (0, import_react39.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
4375
|
+
};
|
|
4376
|
+
|
|
4377
|
+
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4378
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React85.createElement(import_icons25.DatabaseIcon, { fontSize: "tiny" });
|
|
4379
|
+
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4380
|
+
const context = (0, import_editor_controls52.useBoundProp)(import_editor_props11.backgroundImageOverlayPropTypeUtil);
|
|
4381
|
+
return /* @__PURE__ */ React85.createElement(import_editor_controls52.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React85.createElement(import_editor_controls52.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React85.createElement(Wrapper, { rawValue: value.value })));
|
|
4382
|
+
};
|
|
4383
|
+
var Wrapper = ({ rawValue }) => {
|
|
4384
|
+
const { propType } = (0, import_editor_controls52.useBoundProp)();
|
|
4385
|
+
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4386
|
+
return /* @__PURE__ */ React85.createElement(import_editor_controls52.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React85.createElement(import_editor_controls52.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React85.createElement(Content, { rawValue: rawValue.image })));
|
|
4387
|
+
};
|
|
4388
|
+
var Content = ({ rawValue }) => {
|
|
4389
|
+
const src = rawValue.value.src;
|
|
4390
|
+
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4391
|
+
return /* @__PURE__ */ React85.createElement(React85.Fragment, null, dynamicTag?.label);
|
|
4392
|
+
};
|
|
4393
|
+
|
|
4394
|
+
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4395
|
+
var React89 = __toESM(require("react"));
|
|
4396
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
4397
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4398
|
+
var import_icons27 = require("@elementor/icons");
|
|
4399
|
+
var import_ui72 = require("@elementor/ui");
|
|
4400
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
4401
|
+
|
|
4402
|
+
// src/components/popover-content.tsx
|
|
4403
|
+
var React86 = __toESM(require("react"));
|
|
4404
|
+
var import_ui70 = require("@elementor/ui");
|
|
4405
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React86.createElement(import_ui70.Stack, { alignItems, gap, p }, children);
|
|
4406
|
+
|
|
4407
|
+
// src/hooks/use-persist-dynamic-value.ts
|
|
4408
|
+
var import_session6 = require("@elementor/session");
|
|
4409
|
+
var usePersistDynamicValue = (propKey) => {
|
|
4410
|
+
const { element } = useElement();
|
|
4411
|
+
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
4412
|
+
return (0, import_session6.useSessionStorage)(prefixedKey);
|
|
4337
4413
|
};
|
|
4338
4414
|
|
|
4339
4415
|
// src/dynamics/dynamic-control.tsx
|
|
4416
|
+
var React87 = __toESM(require("react"));
|
|
4417
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4340
4418
|
var DynamicControl = ({ bind, children }) => {
|
|
4341
|
-
const { value, setValue } = (0,
|
|
4419
|
+
const { value, setValue } = (0, import_editor_controls53.useBoundProp)(dynamicPropTypeUtil);
|
|
4342
4420
|
const { name = "", settings } = value ?? {};
|
|
4343
4421
|
const dynamicTag = useDynamicTag(name);
|
|
4344
4422
|
if (!dynamicTag) {
|
|
@@ -4357,22 +4435,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4357
4435
|
});
|
|
4358
4436
|
};
|
|
4359
4437
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4360
|
-
return /* @__PURE__ */
|
|
4438
|
+
return /* @__PURE__ */ React87.createElement(import_editor_controls53.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React87.createElement(import_editor_controls53.PropKeyProvider, { bind }, children));
|
|
4361
4439
|
};
|
|
4362
4440
|
|
|
4363
4441
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4364
|
-
var
|
|
4365
|
-
var
|
|
4366
|
-
var
|
|
4367
|
-
var
|
|
4368
|
-
var
|
|
4442
|
+
var React88 = __toESM(require("react"));
|
|
4443
|
+
var import_react40 = require("react");
|
|
4444
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4445
|
+
var import_icons26 = require("@elementor/icons");
|
|
4446
|
+
var import_ui71 = require("@elementor/ui");
|
|
4369
4447
|
var import_i18n56 = require("@wordpress/i18n");
|
|
4370
4448
|
var SIZE7 = "tiny";
|
|
4371
4449
|
var DynamicSelection = ({ onSelect }) => {
|
|
4372
|
-
const [searchValue, setSearchValue] = (0,
|
|
4450
|
+
const [searchValue, setSearchValue] = (0, import_react40.useState)("");
|
|
4373
4451
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
4374
|
-
const { value: anyValue } = (0,
|
|
4375
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
4452
|
+
const { value: anyValue } = (0, import_editor_controls54.useBoundProp)();
|
|
4453
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls54.useBoundProp)(dynamicPropTypeUtil);
|
|
4376
4454
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
4377
4455
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
4378
4456
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -4387,8 +4465,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
4387
4465
|
setValue({ name: value, settings: { label } });
|
|
4388
4466
|
onSelect?.();
|
|
4389
4467
|
};
|
|
4390
|
-
return /* @__PURE__ */
|
|
4391
|
-
|
|
4468
|
+
return /* @__PURE__ */ React88.createElement(import_ui71.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React88.createElement(NoDynamicTags, null) : /* @__PURE__ */ React88.createElement(import_react40.Fragment, null, /* @__PURE__ */ React88.createElement(import_ui71.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React88.createElement(
|
|
4469
|
+
import_ui71.TextField,
|
|
4392
4470
|
{
|
|
4393
4471
|
fullWidth: true,
|
|
4394
4472
|
size: SIZE7,
|
|
@@ -4396,19 +4474,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
4396
4474
|
onChange: handleSearch,
|
|
4397
4475
|
placeholder: (0, import_i18n56.__)("Search dynamic tags\u2026", "elementor"),
|
|
4398
4476
|
InputProps: {
|
|
4399
|
-
startAdornment: /* @__PURE__ */
|
|
4477
|
+
startAdornment: /* @__PURE__ */ React88.createElement(import_ui71.InputAdornment, { position: "start" }, /* @__PURE__ */ React88.createElement(import_icons26.SearchIcon, { fontSize: SIZE7 }))
|
|
4400
4478
|
}
|
|
4401
4479
|
}
|
|
4402
|
-
)), /* @__PURE__ */
|
|
4403
|
-
|
|
4480
|
+
)), /* @__PURE__ */ React88.createElement(import_ui71.Divider, null), /* @__PURE__ */ React88.createElement(import_ui71.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React88.createElement(import_ui71.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React88.createElement(import_react40.Fragment, { key: index }, /* @__PURE__ */ React88.createElement(
|
|
4481
|
+
import_ui71.MenuSubheader,
|
|
4404
4482
|
{
|
|
4405
4483
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
4406
4484
|
},
|
|
4407
4485
|
dynamicGroups?.[category]?.title || category
|
|
4408
4486
|
), items3.map(({ value, label: tagLabel }) => {
|
|
4409
4487
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
4410
|
-
return /* @__PURE__ */
|
|
4411
|
-
|
|
4488
|
+
return /* @__PURE__ */ React88.createElement(
|
|
4489
|
+
import_ui71.MenuItem,
|
|
4412
4490
|
{
|
|
4413
4491
|
key: value,
|
|
4414
4492
|
selected: isSelected,
|
|
@@ -4418,10 +4496,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
4418
4496
|
},
|
|
4419
4497
|
tagLabel
|
|
4420
4498
|
);
|
|
4421
|
-
})))) : /* @__PURE__ */
|
|
4499
|
+
})))) : /* @__PURE__ */ React88.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
4422
4500
|
};
|
|
4423
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4424
|
-
|
|
4501
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElement(
|
|
4502
|
+
import_ui71.Stack,
|
|
4425
4503
|
{
|
|
4426
4504
|
gap: 1,
|
|
4427
4505
|
alignItems: "center",
|
|
@@ -4431,12 +4509,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React86.createElem
|
|
|
4431
4509
|
color: "text.secondary",
|
|
4432
4510
|
sx: { pb: 3.5 }
|
|
4433
4511
|
},
|
|
4434
|
-
/* @__PURE__ */
|
|
4435
|
-
/* @__PURE__ */
|
|
4436
|
-
/* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ React88.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4513
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React88.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4514
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React88.createElement(import_ui71.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n56.__)("Clear & try again", "elementor")))
|
|
4437
4515
|
);
|
|
4438
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4439
|
-
|
|
4516
|
+
var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(import_ui71.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React88.createElement(import_ui71.Divider, null), /* @__PURE__ */ React88.createElement(
|
|
4517
|
+
import_ui71.Stack,
|
|
4440
4518
|
{
|
|
4441
4519
|
gap: 1,
|
|
4442
4520
|
alignItems: "center",
|
|
@@ -4446,9 +4524,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React86.createElement(import_ui70.Box,
|
|
|
4446
4524
|
color: "text.secondary",
|
|
4447
4525
|
sx: { pb: 3.5 }
|
|
4448
4526
|
},
|
|
4449
|
-
/* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4527
|
+
/* @__PURE__ */ React88.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4528
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
4529
|
+
/* @__PURE__ */ React88.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
4452
4530
|
));
|
|
4453
4531
|
var useFilteredOptions = (searchValue) => {
|
|
4454
4532
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4469,10 +4547,10 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4469
4547
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4470
4548
|
var SIZE8 = "tiny";
|
|
4471
4549
|
var DynamicSelectionControl = () => {
|
|
4472
|
-
const { setValue: setAnyValue } = (0,
|
|
4473
|
-
const { bind, value } = (0,
|
|
4550
|
+
const { setValue: setAnyValue } = (0, import_editor_controls55.useBoundProp)();
|
|
4551
|
+
const { bind, value } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
|
|
4474
4552
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
4475
|
-
const selectionPopoverState = (0,
|
|
4553
|
+
const selectionPopoverState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4476
4554
|
const { name: tagName = "" } = value;
|
|
4477
4555
|
const dynamicTag = useDynamicTag(tagName);
|
|
4478
4556
|
const removeDynamicTag = () => {
|
|
@@ -4481,76 +4559,76 @@ var DynamicSelectionControl = () => {
|
|
|
4481
4559
|
if (!dynamicTag) {
|
|
4482
4560
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4483
4561
|
}
|
|
4484
|
-
return /* @__PURE__ */
|
|
4485
|
-
|
|
4562
|
+
return /* @__PURE__ */ React89.createElement(import_ui72.Box, null, /* @__PURE__ */ React89.createElement(
|
|
4563
|
+
import_ui72.UnstableTag,
|
|
4486
4564
|
{
|
|
4487
4565
|
fullWidth: true,
|
|
4488
4566
|
showActionsOnHover: true,
|
|
4489
4567
|
label: dynamicTag.label,
|
|
4490
|
-
startIcon: /* @__PURE__ */
|
|
4491
|
-
...(0,
|
|
4492
|
-
actions: /* @__PURE__ */
|
|
4493
|
-
|
|
4568
|
+
startIcon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 }),
|
|
4569
|
+
...(0, import_ui72.bindTrigger)(selectionPopoverState),
|
|
4570
|
+
actions: /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React89.createElement(
|
|
4571
|
+
import_ui72.IconButton,
|
|
4494
4572
|
{
|
|
4495
4573
|
size: SIZE8,
|
|
4496
4574
|
onClick: removeDynamicTag,
|
|
4497
4575
|
"aria-label": (0, import_i18n57.__)("Remove dynamic value", "elementor")
|
|
4498
4576
|
},
|
|
4499
|
-
/* @__PURE__ */
|
|
4577
|
+
/* @__PURE__ */ React89.createElement(import_icons27.XIcon, { fontSize: SIZE8 })
|
|
4500
4578
|
))
|
|
4501
4579
|
}
|
|
4502
|
-
), /* @__PURE__ */
|
|
4503
|
-
|
|
4580
|
+
), /* @__PURE__ */ React89.createElement(
|
|
4581
|
+
import_ui72.Popover,
|
|
4504
4582
|
{
|
|
4505
4583
|
disablePortal: true,
|
|
4506
4584
|
disableScrollLock: true,
|
|
4507
4585
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4508
|
-
...(0,
|
|
4586
|
+
...(0, import_ui72.bindPopover)(selectionPopoverState)
|
|
4509
4587
|
},
|
|
4510
|
-
/* @__PURE__ */
|
|
4588
|
+
/* @__PURE__ */ React89.createElement(import_ui72.Stack, null, /* @__PURE__ */ React89.createElement(
|
|
4511
4589
|
import_editor_ui6.PopoverHeader,
|
|
4512
4590
|
{
|
|
4513
4591
|
title: (0, import_i18n57.__)("Dynamic tags", "elementor"),
|
|
4514
4592
|
onClose: selectionPopoverState.close,
|
|
4515
|
-
icon: /* @__PURE__ */
|
|
4593
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4516
4594
|
}
|
|
4517
|
-
), /* @__PURE__ */
|
|
4595
|
+
), /* @__PURE__ */ React89.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
4518
4596
|
));
|
|
4519
4597
|
};
|
|
4520
4598
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
4521
|
-
const popupState = (0,
|
|
4599
|
+
const popupState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4522
4600
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
4523
4601
|
if (!hasDynamicSettings) {
|
|
4524
4602
|
return null;
|
|
4525
4603
|
}
|
|
4526
|
-
return /* @__PURE__ */
|
|
4527
|
-
|
|
4604
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(import_ui72.IconButton, { size: SIZE8, ...(0, import_ui72.bindTrigger)(popupState), "aria-label": (0, import_i18n57.__)("Settings", "elementor") }, /* @__PURE__ */ React89.createElement(import_icons27.SettingsIcon, { fontSize: SIZE8 })), /* @__PURE__ */ React89.createElement(
|
|
4605
|
+
import_ui72.Popover,
|
|
4528
4606
|
{
|
|
4529
4607
|
disablePortal: true,
|
|
4530
4608
|
disableScrollLock: true,
|
|
4531
4609
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4532
|
-
...(0,
|
|
4610
|
+
...(0, import_ui72.bindPopover)(popupState)
|
|
4533
4611
|
},
|
|
4534
|
-
/* @__PURE__ */
|
|
4612
|
+
/* @__PURE__ */ React89.createElement(import_ui72.Paper, { component: import_ui72.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React89.createElement(
|
|
4535
4613
|
import_editor_ui6.PopoverHeader,
|
|
4536
4614
|
{
|
|
4537
4615
|
title: dynamicTag.label,
|
|
4538
4616
|
onClose: popupState.close,
|
|
4539
|
-
icon: /* @__PURE__ */
|
|
4617
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4540
4618
|
}
|
|
4541
|
-
), /* @__PURE__ */
|
|
4619
|
+
), /* @__PURE__ */ React89.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
4542
4620
|
));
|
|
4543
4621
|
};
|
|
4544
4622
|
var DynamicSettings = ({ controls }) => {
|
|
4545
4623
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
4546
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4624
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui72.useTabs)(0);
|
|
4547
4625
|
if (!tabs.length) {
|
|
4548
4626
|
return null;
|
|
4549
4627
|
}
|
|
4550
|
-
return /* @__PURE__ */
|
|
4551
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(import_ui72.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React89.createElement(import_ui72.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React89.createElement(import_ui72.Divider, null), tabs.map(({ value }, index) => {
|
|
4629
|
+
return /* @__PURE__ */ React89.createElement(import_ui72.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React89.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4552
4630
|
if (item.type === "control") {
|
|
4553
|
-
return /* @__PURE__ */
|
|
4631
|
+
return /* @__PURE__ */ React89.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4554
4632
|
}
|
|
4555
4633
|
return null;
|
|
4556
4634
|
})));
|
|
@@ -4560,12 +4638,12 @@ var Control3 = ({ control }) => {
|
|
|
4560
4638
|
if (!getControl(control.type)) {
|
|
4561
4639
|
return null;
|
|
4562
4640
|
}
|
|
4563
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(import_ui72.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React89.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(import_editor_controls55.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React89.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Control, { type: control.type, props: control.props }))));
|
|
4564
4642
|
};
|
|
4565
4643
|
|
|
4566
4644
|
// src/dynamics/dynamic-transformer.ts
|
|
4567
4645
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
4568
|
-
var
|
|
4646
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
4569
4647
|
|
|
4570
4648
|
// src/dynamics/errors.ts
|
|
4571
4649
|
var import_utils8 = require("@elementor/utils");
|
|
@@ -4583,7 +4661,7 @@ var dynamicTransformer = (0, import_editor_canvas3.createTransformer)((value) =>
|
|
|
4583
4661
|
});
|
|
4584
4662
|
function simpleTransform(props) {
|
|
4585
4663
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
4586
|
-
const value = (0,
|
|
4664
|
+
const value = (0, import_editor_props12.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
4587
4665
|
return [settingKey, value];
|
|
4588
4666
|
});
|
|
4589
4667
|
return Object.fromEntries(transformed);
|
|
@@ -4613,18 +4691,18 @@ function getDynamicValue(name, settings) {
|
|
|
4613
4691
|
}
|
|
4614
4692
|
|
|
4615
4693
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4616
|
-
var
|
|
4617
|
-
var
|
|
4618
|
-
var
|
|
4694
|
+
var React90 = __toESM(require("react"));
|
|
4695
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4696
|
+
var import_icons28 = require("@elementor/icons");
|
|
4619
4697
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4620
4698
|
var usePropDynamicAction = () => {
|
|
4621
|
-
const { propType } = (0,
|
|
4699
|
+
const { propType } = (0, import_editor_controls56.useBoundProp)();
|
|
4622
4700
|
const visible = !!propType && supportsDynamic(propType);
|
|
4623
4701
|
return {
|
|
4624
4702
|
visible,
|
|
4625
|
-
icon:
|
|
4703
|
+
icon: import_icons28.DatabaseIcon,
|
|
4626
4704
|
title: (0, import_i18n58.__)("Dynamic tags", "elementor"),
|
|
4627
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
4705
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React90.createElement(DynamicSelection, { onSelect: closePopover })
|
|
4628
4706
|
};
|
|
4629
4707
|
};
|
|
4630
4708
|
|
|
@@ -4635,6 +4713,16 @@ var init = () => {
|
|
|
4635
4713
|
component: DynamicSelectionControl,
|
|
4636
4714
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
4637
4715
|
});
|
|
4716
|
+
(0, import_editor_controls57.injectIntoRepeaterItemLabel)({
|
|
4717
|
+
id: "dynamic-background-image",
|
|
4718
|
+
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4719
|
+
component: BackgroundControlDynamicTagLabel
|
|
4720
|
+
});
|
|
4721
|
+
(0, import_editor_controls57.injectIntoRepeaterItemIcon)({
|
|
4722
|
+
id: "dynamic-background-image",
|
|
4723
|
+
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4724
|
+
component: BackgroundControlDynamicTagIcon
|
|
4725
|
+
});
|
|
4638
4726
|
registerPopoverAction({
|
|
4639
4727
|
id: "dynamic-tags",
|
|
4640
4728
|
useProps: usePropDynamicAction
|
|
@@ -4644,8 +4732,8 @@ var init = () => {
|
|
|
4644
4732
|
};
|
|
4645
4733
|
|
|
4646
4734
|
// src/reset-style-props.tsx
|
|
4647
|
-
var
|
|
4648
|
-
var
|
|
4735
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4736
|
+
var import_icons29 = require("@elementor/icons");
|
|
4649
4737
|
var import_i18n59 = require("@wordpress/i18n");
|
|
4650
4738
|
var { registerAction } = controlActionsMenu;
|
|
4651
4739
|
function initResetStyleProps() {
|
|
@@ -4657,11 +4745,11 @@ function initResetStyleProps() {
|
|
|
4657
4745
|
var EXCLUDED_BINDS = ["order", "flex-grow", "flex-shrink", "flex-basis"];
|
|
4658
4746
|
function useResetStyleValueProps() {
|
|
4659
4747
|
const isStyle = useIsStyle();
|
|
4660
|
-
const { value, setValue, path, bind } = (0,
|
|
4748
|
+
const { value, setValue, path, bind } = (0, import_editor_controls58.useBoundProp)();
|
|
4661
4749
|
return {
|
|
4662
4750
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4663
4751
|
title: (0, import_i18n59.__)("Clear", "elementor"),
|
|
4664
|
-
icon:
|
|
4752
|
+
icon: import_icons29.BrushBigIcon,
|
|
4665
4753
|
onClick: () => setValue(null)
|
|
4666
4754
|
};
|
|
4667
4755
|
}
|
|
@@ -4670,36 +4758,36 @@ function useResetStyleValueProps() {
|
|
|
4670
4758
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
4671
4759
|
|
|
4672
4760
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4673
|
-
var
|
|
4761
|
+
var React91 = __toESM(require("react"));
|
|
4674
4762
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
4675
|
-
var
|
|
4676
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */
|
|
4763
|
+
var import_ui73 = require("@elementor/ui");
|
|
4764
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React91.createElement(import_ui73.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React91.createElement(ItemIconColor, { value }), /* @__PURE__ */ React91.createElement(ItemLabelColor, { value })));
|
|
4677
4765
|
var ItemIconColor = ({ value }) => {
|
|
4678
4766
|
const { color } = value;
|
|
4679
|
-
return /* @__PURE__ */
|
|
4767
|
+
return /* @__PURE__ */ React91.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4680
4768
|
};
|
|
4681
4769
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4682
|
-
return /* @__PURE__ */
|
|
4770
|
+
return /* @__PURE__ */ React91.createElement("span", null, color);
|
|
4683
4771
|
};
|
|
4684
|
-
var StyledUnstableColorIndicator = (0,
|
|
4772
|
+
var StyledUnstableColorIndicator = (0, import_ui73.styled)(import_ui73.UnstableColorIndicator)(({ theme }) => ({
|
|
4685
4773
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4686
4774
|
}));
|
|
4687
4775
|
|
|
4688
4776
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4689
|
-
var
|
|
4777
|
+
var React92 = __toESM(require("react"));
|
|
4690
4778
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
4691
|
-
var
|
|
4779
|
+
var import_ui74 = require("@elementor/ui");
|
|
4692
4780
|
var import_i18n60 = require("@wordpress/i18n");
|
|
4693
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */
|
|
4781
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React92.createElement(import_ui74.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React92.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React92.createElement(ItemLabelGradient, { value })));
|
|
4694
4782
|
var ItemIconGradient = ({ value }) => {
|
|
4695
4783
|
const gradient = getGradientValue(value);
|
|
4696
|
-
return /* @__PURE__ */
|
|
4784
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4697
4785
|
};
|
|
4698
4786
|
var ItemLabelGradient = ({ value }) => {
|
|
4699
4787
|
if (value.type === "linear") {
|
|
4700
|
-
return /* @__PURE__ */
|
|
4788
|
+
return /* @__PURE__ */ React92.createElement("span", null, (0, import_i18n60.__)("Linear Gradient", "elementor"));
|
|
4701
4789
|
}
|
|
4702
|
-
return /* @__PURE__ */
|
|
4790
|
+
return /* @__PURE__ */ React92.createElement("span", null, (0, import_i18n60.__)("Radial Gradient", "elementor"));
|
|
4703
4791
|
};
|
|
4704
4792
|
var getGradientValue = (gradient) => {
|
|
4705
4793
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4710,16 +4798,16 @@ var getGradientValue = (gradient) => {
|
|
|
4710
4798
|
};
|
|
4711
4799
|
|
|
4712
4800
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4713
|
-
var
|
|
4801
|
+
var React93 = __toESM(require("react"));
|
|
4714
4802
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
4715
4803
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4716
|
-
var
|
|
4804
|
+
var import_ui75 = require("@elementor/ui");
|
|
4717
4805
|
var import_wp_media = require("@elementor/wp-media");
|
|
4718
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
4806
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React93.createElement(import_ui75.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconImage, { value }), /* @__PURE__ */ React93.createElement(ItemLabelImage, { value })));
|
|
4719
4807
|
var ItemIconImage = ({ value }) => {
|
|
4720
4808
|
const { imageUrl } = useImage(value);
|
|
4721
|
-
return /* @__PURE__ */
|
|
4722
|
-
|
|
4809
|
+
return /* @__PURE__ */ React93.createElement(
|
|
4810
|
+
import_ui75.CardMedia,
|
|
4723
4811
|
{
|
|
4724
4812
|
image: imageUrl,
|
|
4725
4813
|
sx: (theme) => ({
|
|
@@ -4733,7 +4821,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4733
4821
|
};
|
|
4734
4822
|
var ItemLabelImage = ({ value }) => {
|
|
4735
4823
|
const { imageTitle } = useImage(value);
|
|
4736
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ React93.createElement(import_editor_ui7.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React93.createElement("span", null, imageTitle));
|
|
4737
4825
|
};
|
|
4738
4826
|
var useImage = (image) => {
|
|
4739
4827
|
let imageTitle, imageUrl = null;
|
|
@@ -4758,14 +4846,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4758
4846
|
};
|
|
4759
4847
|
|
|
4760
4848
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4761
|
-
var
|
|
4849
|
+
var React94 = __toESM(require("react"));
|
|
4762
4850
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
4763
|
-
var
|
|
4851
|
+
var import_ui76 = require("@elementor/ui");
|
|
4764
4852
|
var backgroundOverlayTransformer = (0, import_editor_canvas8.createTransformer)((values) => {
|
|
4765
4853
|
if (!values || values.length === 0) {
|
|
4766
4854
|
return null;
|
|
4767
4855
|
}
|
|
4768
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ React94.createElement(import_ui76.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React94.createElement(import_ui76.Stack, { key: index }, item)));
|
|
4769
4857
|
});
|
|
4770
4858
|
|
|
4771
4859
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|