@elementor/editor-editing-panel 4.1.0-749 → 4.1.0-751
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/dist/index.js +895 -832
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +843 -780
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/css-classes/consts.ts +1 -0
- package/src/components/css-classes/css-class-convert-local.tsx +2 -1
- package/src/components/css-classes/css-class-item.tsx +2 -1
- package/src/components/css-classes/css-class-menu.tsx +4 -1
- package/src/components/css-classes/duplicate-class-menu-item.tsx +68 -0
package/dist/index.mjs
CHANGED
|
@@ -102,6 +102,9 @@ function useIsStyle() {
|
|
|
102
102
|
return !!useContext3(Context3);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
// src/components/css-classes/consts.ts
|
|
106
|
+
var PENDING_CLASS_RENAME_SESSION_KEY = "pending-class-rename-id";
|
|
107
|
+
|
|
105
108
|
// src/components/css-classes/css-class-convert-local.tsx
|
|
106
109
|
var { Slot: CssClassConvertSlot, inject: injectIntoCssClassConvert } = createLocation();
|
|
107
110
|
var CssClassConvert = (props) => {
|
|
@@ -109,7 +112,7 @@ var CssClassConvert = (props) => {
|
|
|
109
112
|
const elementId = element.id;
|
|
110
113
|
const currentClassesProp = useClassesProp();
|
|
111
114
|
const { setId: setActiveId } = useStyle();
|
|
112
|
-
const [, saveValue] = useSessionStorage(
|
|
115
|
+
const [, saveValue] = useSessionStorage(PENDING_CLASS_RENAME_SESSION_KEY, "app");
|
|
113
116
|
const successCallback = (newId) => {
|
|
114
117
|
if (!props.styleDef) {
|
|
115
118
|
throw new Error("Style definition is required for converting local class to global class.");
|
|
@@ -145,13 +148,13 @@ var onConvert = (opts) => {
|
|
|
145
148
|
};
|
|
146
149
|
|
|
147
150
|
// src/components/css-classes/css-class-selector.tsx
|
|
148
|
-
import * as
|
|
151
|
+
import * as React11 from "react";
|
|
149
152
|
import { useRef, useState as useState4 } from "react";
|
|
150
153
|
import {
|
|
151
154
|
isElementsStylesProvider as isElementsStylesProvider4,
|
|
152
|
-
stylesRepository as
|
|
155
|
+
stylesRepository as stylesRepository6,
|
|
153
156
|
useProviders,
|
|
154
|
-
useUserStylesCapability as
|
|
157
|
+
useUserStylesCapability as useUserStylesCapability5,
|
|
155
158
|
validateStyleLabel as validateStyleLabel2
|
|
156
159
|
} from "@elementor/editor-styles-repository";
|
|
157
160
|
import { InfoAlert, WarningInfotip } from "@elementor/editor-ui";
|
|
@@ -165,7 +168,7 @@ import {
|
|
|
165
168
|
Stack as Stack3,
|
|
166
169
|
Typography as Typography3
|
|
167
170
|
} from "@elementor/ui";
|
|
168
|
-
import { __ as
|
|
171
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
169
172
|
|
|
170
173
|
// src/utils/get-styles-provider-color.ts
|
|
171
174
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, isElementsStylesProvider } from "@elementor/editor-styles-repository";
|
|
@@ -548,13 +551,13 @@ var StyledGroupItems = styled("ul")`
|
|
|
548
551
|
`;
|
|
549
552
|
|
|
550
553
|
// src/components/css-classes/css-class-item.tsx
|
|
551
|
-
import * as
|
|
554
|
+
import * as React10 from "react";
|
|
552
555
|
import { useEffect, useMemo as useMemo3, useState as useState3 } from "react";
|
|
553
556
|
import { isClassState } from "@elementor/editor-styles";
|
|
554
|
-
import { stylesRepository as
|
|
557
|
+
import { stylesRepository as stylesRepository5, useUserStylesCapability as useUserStylesCapability4, validateStyleLabel } from "@elementor/editor-styles-repository";
|
|
555
558
|
import { EditableField, EllipsisWithTooltip, useEditable } from "@elementor/editor-ui";
|
|
556
559
|
import { DotsVerticalIcon } from "@elementor/icons";
|
|
557
|
-
import { useSessionStorage as
|
|
560
|
+
import { useSessionStorage as useSessionStorage3 } from "@elementor/session";
|
|
558
561
|
import {
|
|
559
562
|
bindTrigger,
|
|
560
563
|
Chip as Chip2,
|
|
@@ -564,7 +567,7 @@ import {
|
|
|
564
567
|
UnstableChipGroup,
|
|
565
568
|
usePopupState
|
|
566
569
|
} from "@elementor/ui";
|
|
567
|
-
import { __ as
|
|
570
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
568
571
|
|
|
569
572
|
// src/components/css-classes/css-class-context.tsx
|
|
570
573
|
import * as React6 from "react";
|
|
@@ -582,15 +585,15 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
582
585
|
}
|
|
583
586
|
|
|
584
587
|
// src/components/css-classes/css-class-menu.tsx
|
|
585
|
-
import * as
|
|
588
|
+
import * as React9 from "react";
|
|
586
589
|
import {
|
|
587
590
|
isElementsStylesProvider as isElementsStylesProvider3,
|
|
588
|
-
stylesRepository as
|
|
589
|
-
useUserStylesCapability as
|
|
591
|
+
stylesRepository as stylesRepository4,
|
|
592
|
+
useUserStylesCapability as useUserStylesCapability3
|
|
590
593
|
} from "@elementor/editor-styles-repository";
|
|
591
|
-
import { MenuItemInfotip, MenuListItem } from "@elementor/editor-ui";
|
|
594
|
+
import { MenuItemInfotip, MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
592
595
|
import { bindMenu, Divider, Menu, MenuSubheader as MenuSubheader2, Stack } from "@elementor/ui";
|
|
593
|
-
import { __ as
|
|
596
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
594
597
|
|
|
595
598
|
// src/components/style-indicator.tsx
|
|
596
599
|
import { styled as styled2 } from "@elementor/ui";
|
|
@@ -609,40 +612,19 @@ var StyleIndicator = styled2("div", {
|
|
|
609
612
|
}};
|
|
610
613
|
`;
|
|
611
614
|
|
|
612
|
-
// src/components/css-classes/
|
|
615
|
+
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
613
616
|
import * as React7 from "react";
|
|
614
|
-
import {
|
|
615
|
-
import {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
import { isElementsStylesProvider as isElementsStylesProvider2 } from "@elementor/editor-styles-repository";
|
|
619
|
-
var useCanConvertLocalClassToGlobal = () => {
|
|
620
|
-
const { element } = useElement();
|
|
621
|
-
const { provider, id, meta } = useStyle();
|
|
622
|
-
const styleDef = provider?.actions.get(id, { elementId: element.id, ...meta });
|
|
623
|
-
const isLocalStylesProvider = provider && isElementsStylesProvider2(provider?.getKey());
|
|
624
|
-
const variants = styleDef?.variants || [];
|
|
625
|
-
const canConvert = !!(isLocalStylesProvider && variants.length);
|
|
626
|
-
return {
|
|
627
|
-
canConvert,
|
|
628
|
-
isLocalStylesProvider,
|
|
629
|
-
id,
|
|
630
|
-
styleDef: styleDef || null
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
|
|
634
|
-
// src/components/css-classes/local-class-sub-menu.tsx
|
|
635
|
-
var LocalClassSubMenu = (props) => {
|
|
636
|
-
const { canConvert, styleDef } = useCanConvertLocalClassToGlobal();
|
|
637
|
-
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("Local Class", "elementor")), /* @__PURE__ */ React7.createElement(CssClassConvert, { canConvert, styleDef, closeMenu: props.popupState.close }));
|
|
638
|
-
};
|
|
617
|
+
import { stylesRepository as stylesRepository3, useUserStylesCapability as useUserStylesCapability2 } from "@elementor/editor-styles-repository";
|
|
618
|
+
import { MenuListItem } from "@elementor/editor-ui";
|
|
619
|
+
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
620
|
+
import { __ as __2 } from "@wordpress/i18n";
|
|
639
621
|
|
|
640
622
|
// src/components/css-classes/use-apply-and-unapply-class.ts
|
|
641
623
|
import { useCallback, useMemo as useMemo2 } from "react";
|
|
642
624
|
import { getElementLabel } from "@elementor/editor-elements";
|
|
643
625
|
import { useGetStylesRepositoryCreateAction } from "@elementor/editor-styles-repository";
|
|
644
626
|
import { undoable } from "@elementor/editor-v1-adapters";
|
|
645
|
-
import { __
|
|
627
|
+
import { __ } from "@wordpress/i18n";
|
|
646
628
|
|
|
647
629
|
// src/apply-unapply-actions.ts
|
|
648
630
|
import { setDocumentModifiedStatus } from "@elementor/editor-documents";
|
|
@@ -691,7 +673,7 @@ function useApplyClass() {
|
|
|
691
673
|
{
|
|
692
674
|
title: getElementLabel(element.id),
|
|
693
675
|
subtitle: ({ classLabel }) => {
|
|
694
|
-
return
|
|
676
|
+
return __(`class %s applied`, "elementor").replace("%s", classLabel);
|
|
695
677
|
}
|
|
696
678
|
}
|
|
697
679
|
);
|
|
@@ -718,7 +700,7 @@ function useUnapplyClass() {
|
|
|
718
700
|
{
|
|
719
701
|
title: getElementLabel(element.id),
|
|
720
702
|
subtitle: ({ classLabel }) => {
|
|
721
|
-
return
|
|
703
|
+
return __(`class %s removed`, "elementor").replace("%s", classLabel);
|
|
722
704
|
}
|
|
723
705
|
}
|
|
724
706
|
);
|
|
@@ -749,9 +731,9 @@ function useCreateAndApplyClass() {
|
|
|
749
731
|
}
|
|
750
732
|
},
|
|
751
733
|
{
|
|
752
|
-
title:
|
|
734
|
+
title: __("Class", "elementor"),
|
|
753
735
|
subtitle: ({ classLabel }) => {
|
|
754
|
-
return
|
|
736
|
+
return __(`%s created`, "elementor").replace("%s", classLabel);
|
|
755
737
|
}
|
|
756
738
|
}
|
|
757
739
|
);
|
|
@@ -813,12 +795,91 @@ function useClasses() {
|
|
|
813
795
|
}, [currentClassesProp, element.id]);
|
|
814
796
|
}
|
|
815
797
|
|
|
798
|
+
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
799
|
+
var DUPLICATE_LABEL_PREFIX = "copy-of";
|
|
800
|
+
function getUniqueDuplicateLabel(originalLabel, existingLabels) {
|
|
801
|
+
let newLabel = `${DUPLICATE_LABEL_PREFIX}-${originalLabel}`;
|
|
802
|
+
let counter = 2;
|
|
803
|
+
while (existingLabels.includes(newLabel)) {
|
|
804
|
+
newLabel = `${DUPLICATE_LABEL_PREFIX}-${originalLabel}-${counter}`;
|
|
805
|
+
counter++;
|
|
806
|
+
}
|
|
807
|
+
return newLabel;
|
|
808
|
+
}
|
|
809
|
+
function DuplicateClassMenuItem({ closeMenu }) {
|
|
810
|
+
const { id: classId, provider } = useCssClass();
|
|
811
|
+
const { userCan } = useUserStylesCapability2();
|
|
812
|
+
const applyClass = useApplyClass();
|
|
813
|
+
const [, setPendingEditId] = useSessionStorage2(PENDING_CLASS_RENAME_SESSION_KEY, "app");
|
|
814
|
+
if (!provider || !classId) {
|
|
815
|
+
return null;
|
|
816
|
+
}
|
|
817
|
+
const providerInstance = stylesRepository3.getProviderByKey(provider);
|
|
818
|
+
const createAction = providerInstance?.actions.create;
|
|
819
|
+
const getAction = providerInstance?.actions.get;
|
|
820
|
+
if (!createAction || !getAction) {
|
|
821
|
+
return null;
|
|
822
|
+
}
|
|
823
|
+
if (!userCan(provider).create) {
|
|
824
|
+
return null;
|
|
825
|
+
}
|
|
826
|
+
const handleDuplicate = () => {
|
|
827
|
+
const styleDef = getAction(classId);
|
|
828
|
+
if (!styleDef) {
|
|
829
|
+
closeMenu();
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
const existingLabels = providerInstance.actions.all().map((style) => style.label);
|
|
833
|
+
const newLabel = getUniqueDuplicateLabel(styleDef.label, existingLabels);
|
|
834
|
+
const newId = createAction(newLabel, styleDef.variants);
|
|
835
|
+
if (newId) {
|
|
836
|
+
applyClass({ classId: newId, classLabel: newLabel });
|
|
837
|
+
setPendingEditId(newId);
|
|
838
|
+
trackStyles(provider, "classCreated", {
|
|
839
|
+
classId: newId,
|
|
840
|
+
source: "duplicated",
|
|
841
|
+
classTitle: newLabel
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
closeMenu();
|
|
845
|
+
};
|
|
846
|
+
return /* @__PURE__ */ React7.createElement(MenuListItem, { onClick: handleDuplicate }, __2("Duplicate", "elementor"));
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
// src/components/css-classes/local-class-sub-menu.tsx
|
|
850
|
+
import * as React8 from "react";
|
|
851
|
+
import { MenuSubheader } from "@elementor/ui";
|
|
852
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
853
|
+
|
|
854
|
+
// src/components/css-classes/use-can-convert-local-class-to-global.ts
|
|
855
|
+
import { isElementsStylesProvider as isElementsStylesProvider2 } from "@elementor/editor-styles-repository";
|
|
856
|
+
var useCanConvertLocalClassToGlobal = () => {
|
|
857
|
+
const { element } = useElement();
|
|
858
|
+
const { provider, id, meta } = useStyle();
|
|
859
|
+
const styleDef = provider?.actions.get(id, { elementId: element.id, ...meta });
|
|
860
|
+
const isLocalStylesProvider = provider && isElementsStylesProvider2(provider?.getKey());
|
|
861
|
+
const variants = styleDef?.variants || [];
|
|
862
|
+
const canConvert = !!(isLocalStylesProvider && variants.length);
|
|
863
|
+
return {
|
|
864
|
+
canConvert,
|
|
865
|
+
isLocalStylesProvider,
|
|
866
|
+
id,
|
|
867
|
+
styleDef: styleDef || null
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
// src/components/css-classes/local-class-sub-menu.tsx
|
|
872
|
+
var LocalClassSubMenu = (props) => {
|
|
873
|
+
const { canConvert, styleDef } = useCanConvertLocalClassToGlobal();
|
|
874
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __3("Local Class", "elementor")), /* @__PURE__ */ React8.createElement(CssClassConvert, { canConvert, styleDef, closeMenu: props.popupState.close }));
|
|
875
|
+
};
|
|
876
|
+
|
|
816
877
|
// src/components/css-classes/css-class-menu.tsx
|
|
817
878
|
var DEFAULT_PSEUDO_STATES = [
|
|
818
|
-
{ key: "normal", value: null, label:
|
|
819
|
-
{ key: "hover", value: "hover", label:
|
|
820
|
-
{ key: "focus", value: "focus", label:
|
|
821
|
-
{ key: "active", value: "active", label:
|
|
879
|
+
{ key: "normal", value: null, label: __4("normal", "elementor") },
|
|
880
|
+
{ key: "hover", value: "hover", label: __4("hover", "elementor") },
|
|
881
|
+
{ key: "focus", value: "focus", label: __4("focus", "elementor") },
|
|
882
|
+
{ key: "active", value: "active", label: __4("active", "elementor") }
|
|
822
883
|
];
|
|
823
884
|
function usePseudoStates() {
|
|
824
885
|
const { elementType } = useElement();
|
|
@@ -837,7 +898,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
837
898
|
const handleKeyDown = (e) => {
|
|
838
899
|
e.stopPropagation();
|
|
839
900
|
};
|
|
840
|
-
return /* @__PURE__ */
|
|
901
|
+
return /* @__PURE__ */ React9.createElement(
|
|
841
902
|
Menu,
|
|
842
903
|
{
|
|
843
904
|
MenuListProps: { dense: true, sx: { minWidth: "160px" } },
|
|
@@ -854,11 +915,11 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
854
915
|
onKeyDown: handleKeyDown,
|
|
855
916
|
disableAutoFocusItem: true
|
|
856
917
|
},
|
|
857
|
-
isLocalStyle2 && /* @__PURE__ */
|
|
918
|
+
isLocalStyle2 && /* @__PURE__ */ React9.createElement(LocalClassSubMenu, { popupState }),
|
|
858
919
|
getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
|
|
859
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ React9.createElement(MenuSubheader2, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __4("States", "elementor")),
|
|
860
921
|
pseudoStates.map((state) => {
|
|
861
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ React9.createElement(
|
|
862
923
|
StateMenuItem,
|
|
863
924
|
{
|
|
864
925
|
key: state.key,
|
|
@@ -868,7 +929,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
868
929
|
}
|
|
869
930
|
);
|
|
870
931
|
}),
|
|
871
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ React9.createElement(ClassStatesMenu, { closeMenu: popupState.close })
|
|
872
933
|
);
|
|
873
934
|
}
|
|
874
935
|
function ClassStatesMenu({ closeMenu }) {
|
|
@@ -876,9 +937,9 @@ function ClassStatesMenu({ closeMenu }) {
|
|
|
876
937
|
if (!elementStates.length) {
|
|
877
938
|
return null;
|
|
878
939
|
}
|
|
879
|
-
const customTitle =
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
return /* @__PURE__ */
|
|
940
|
+
const customTitle = __4("%s States", "elementor").replace("%s", elementTitle);
|
|
941
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Divider, null), /* @__PURE__ */ React9.createElement(MenuSubheader2, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, customTitle), elementStates.map((state) => {
|
|
942
|
+
return /* @__PURE__ */ React9.createElement(
|
|
882
943
|
StateMenuItem,
|
|
883
944
|
{
|
|
884
945
|
key: state.key,
|
|
@@ -891,7 +952,7 @@ function ClassStatesMenu({ closeMenu }) {
|
|
|
891
952
|
}
|
|
892
953
|
var CLASS_STATES_MAP = {
|
|
893
954
|
selected: {
|
|
894
|
-
label:
|
|
955
|
+
label: __4("selected", "elementor")
|
|
895
956
|
}
|
|
896
957
|
};
|
|
897
958
|
function useElementStates() {
|
|
@@ -909,7 +970,7 @@ function useElementStates() {
|
|
|
909
970
|
}
|
|
910
971
|
function useModifiedStates(styleId) {
|
|
911
972
|
const { meta } = useStyle();
|
|
912
|
-
const styleDef =
|
|
973
|
+
const styleDef = stylesRepository4.all().find((style) => style.id === styleId);
|
|
913
974
|
return Object.fromEntries(
|
|
914
975
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
915
976
|
);
|
|
@@ -922,17 +983,19 @@ function getMenuItemsByProvider({
|
|
|
922
983
|
if (!provider) {
|
|
923
984
|
return [];
|
|
924
985
|
}
|
|
925
|
-
const providerInstance =
|
|
986
|
+
const providerInstance = stylesRepository4.getProviderByKey(provider);
|
|
926
987
|
const providerActions = providerInstance?.actions;
|
|
927
988
|
const canUpdate = providerActions?.update;
|
|
989
|
+
const canDuplicate = providerActions?.create && providerActions?.get;
|
|
928
990
|
const canUnapply = !fixed;
|
|
929
991
|
const actions = [
|
|
930
|
-
canUpdate && /* @__PURE__ */
|
|
931
|
-
|
|
992
|
+
canUpdate && /* @__PURE__ */ React9.createElement(RenameClassMenuItem, { key: "rename-class", closeMenu }),
|
|
993
|
+
canDuplicate && /* @__PURE__ */ React9.createElement(DuplicateClassMenuItem, { key: "duplicate-class", closeMenu }),
|
|
994
|
+
canUnapply && /* @__PURE__ */ React9.createElement(UnapplyClassMenuItem, { key: "unapply-class", closeMenu })
|
|
932
995
|
].filter(Boolean);
|
|
933
996
|
if (actions.length) {
|
|
934
997
|
actions.unshift(
|
|
935
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ React9.createElement(
|
|
936
999
|
MenuSubheader2,
|
|
937
1000
|
{
|
|
938
1001
|
key: "provider-label",
|
|
@@ -941,7 +1004,7 @@ function getMenuItemsByProvider({
|
|
|
941
1004
|
providerInstance?.labels?.singular
|
|
942
1005
|
)
|
|
943
1006
|
);
|
|
944
|
-
actions.push(/* @__PURE__ */
|
|
1007
|
+
actions.push(/* @__PURE__ */ React9.createElement(Divider, { key: "provider-actions-divider" }));
|
|
945
1008
|
}
|
|
946
1009
|
return actions;
|
|
947
1010
|
}
|
|
@@ -949,15 +1012,15 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
949
1012
|
const { id: styleId, provider } = useCssClass();
|
|
950
1013
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
951
1014
|
const { state: activeState } = meta;
|
|
952
|
-
const { userCan } =
|
|
1015
|
+
const { userCan } = useUserStylesCapability3();
|
|
953
1016
|
const modifiedStates = useModifiedStates(styleId);
|
|
954
1017
|
const isUpdateAllowed = !state || userCan(provider ?? "").updateProps;
|
|
955
1018
|
const isStyled = modifiedStates[state ?? "normal"] ?? false;
|
|
956
1019
|
const disabled = !isUpdateAllowed && !isStyled;
|
|
957
1020
|
const isActive = styleId === activeId;
|
|
958
1021
|
const isSelected = state === activeState && isActive;
|
|
959
|
-
return /* @__PURE__ */
|
|
960
|
-
|
|
1022
|
+
return /* @__PURE__ */ React9.createElement(
|
|
1023
|
+
MenuListItem2,
|
|
961
1024
|
{
|
|
962
1025
|
...props,
|
|
963
1026
|
selected: isSelected,
|
|
@@ -976,16 +1039,16 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
976
1039
|
closeMenu();
|
|
977
1040
|
}
|
|
978
1041
|
},
|
|
979
|
-
/* @__PURE__ */
|
|
1042
|
+
/* @__PURE__ */ React9.createElement(
|
|
980
1043
|
MenuItemInfotip,
|
|
981
1044
|
{
|
|
982
1045
|
showInfoTip: disabled,
|
|
983
|
-
content:
|
|
1046
|
+
content: __4("With your current role, you can only use existing states.", "elementor")
|
|
984
1047
|
},
|
|
985
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ React9.createElement(Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React9.createElement(
|
|
986
1049
|
StyleIndicator,
|
|
987
1050
|
{
|
|
988
|
-
"aria-label":
|
|
1051
|
+
"aria-label": __4("Has style", "elementor"),
|
|
989
1052
|
getColor: getTempStylesProviderThemeColor(provider ?? "")
|
|
990
1053
|
}
|
|
991
1054
|
), label)
|
|
@@ -995,8 +1058,8 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
995
1058
|
function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
996
1059
|
const { id: classId, label: classLabel, provider } = useCssClass();
|
|
997
1060
|
const unapplyClass = useUnapplyClass();
|
|
998
|
-
return classId ? /* @__PURE__ */
|
|
999
|
-
|
|
1061
|
+
return classId ? /* @__PURE__ */ React9.createElement(
|
|
1062
|
+
MenuListItem2,
|
|
1000
1063
|
{
|
|
1001
1064
|
...props,
|
|
1002
1065
|
onClick: () => {
|
|
@@ -1009,18 +1072,18 @@ function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
|
1009
1072
|
closeMenu();
|
|
1010
1073
|
}
|
|
1011
1074
|
},
|
|
1012
|
-
|
|
1075
|
+
__4("Remove", "elementor")
|
|
1013
1076
|
) : null;
|
|
1014
1077
|
}
|
|
1015
1078
|
function RenameClassMenuItem({ closeMenu }) {
|
|
1016
1079
|
const { handleRename, provider } = useCssClass();
|
|
1017
|
-
const { userCan } =
|
|
1080
|
+
const { userCan } = useUserStylesCapability3();
|
|
1018
1081
|
if (!provider) {
|
|
1019
1082
|
return null;
|
|
1020
1083
|
}
|
|
1021
1084
|
const isAllowed = userCan(provider).update;
|
|
1022
|
-
return /* @__PURE__ */
|
|
1023
|
-
|
|
1085
|
+
return /* @__PURE__ */ React9.createElement(
|
|
1086
|
+
MenuListItem2,
|
|
1024
1087
|
{
|
|
1025
1088
|
disabled: !isAllowed,
|
|
1026
1089
|
onClick: () => {
|
|
@@ -1028,16 +1091,16 @@ function RenameClassMenuItem({ closeMenu }) {
|
|
|
1028
1091
|
handleRename();
|
|
1029
1092
|
}
|
|
1030
1093
|
},
|
|
1031
|
-
/* @__PURE__ */
|
|
1094
|
+
/* @__PURE__ */ React9.createElement(
|
|
1032
1095
|
MenuItemInfotip,
|
|
1033
1096
|
{
|
|
1034
1097
|
showInfoTip: !isAllowed,
|
|
1035
|
-
content:
|
|
1036
|
-
"With your current role, you can use existing classes but can
|
|
1098
|
+
content: __4(
|
|
1099
|
+
"With your current role, you can use existing classes but can't modify them.",
|
|
1037
1100
|
"elementor"
|
|
1038
1101
|
)
|
|
1039
1102
|
},
|
|
1040
|
-
|
|
1103
|
+
__4("Rename", "elementor")
|
|
1041
1104
|
)
|
|
1042
1105
|
);
|
|
1043
1106
|
}
|
|
@@ -1052,9 +1115,9 @@ function CssClassItem(props) {
|
|
|
1052
1115
|
const popupState = usePopupState({ variant: "popover" });
|
|
1053
1116
|
const [chipRef, setChipRef] = useState3(null);
|
|
1054
1117
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
1055
|
-
const { userCan } =
|
|
1056
|
-
const [convertedFromLocalId, , clearConvertedFromLocalId] =
|
|
1057
|
-
|
|
1118
|
+
const { userCan } = useUserStylesCapability4();
|
|
1119
|
+
const [convertedFromLocalId, , clearConvertedFromLocalId] = useSessionStorage3(
|
|
1120
|
+
PENDING_CLASS_RENAME_SESSION_KEY,
|
|
1058
1121
|
"app"
|
|
1059
1122
|
);
|
|
1060
1123
|
const {
|
|
@@ -1070,7 +1133,7 @@ function CssClassItem(props) {
|
|
|
1070
1133
|
onError: setError
|
|
1071
1134
|
});
|
|
1072
1135
|
const color = error ? "error" : colorProp;
|
|
1073
|
-
const providerActions = provider ?
|
|
1136
|
+
const providerActions = provider ? stylesRepository5.getProviderByKey(provider)?.actions : null;
|
|
1074
1137
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
1075
1138
|
const isShowingState = isActive && meta.state;
|
|
1076
1139
|
const stateLabel = useMemo3(() => {
|
|
@@ -1085,7 +1148,7 @@ function CssClassItem(props) {
|
|
|
1085
1148
|
openEditMode();
|
|
1086
1149
|
}
|
|
1087
1150
|
}, [id, convertedFromLocalId]);
|
|
1088
|
-
return /* @__PURE__ */
|
|
1151
|
+
return /* @__PURE__ */ React10.createElement(ThemeProvider, { palette: "default" }, /* @__PURE__ */ React10.createElement(
|
|
1089
1152
|
UnstableChipGroup,
|
|
1090
1153
|
{
|
|
1091
1154
|
ref: setChipRef,
|
|
@@ -1096,11 +1159,11 @@ function CssClassItem(props) {
|
|
|
1096
1159
|
"&.MuiChipGroup-root.MuiAutocomplete-tag": { margin: theme.spacing(0.125) }
|
|
1097
1160
|
})
|
|
1098
1161
|
},
|
|
1099
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ React10.createElement(
|
|
1100
1163
|
Chip2,
|
|
1101
1164
|
{
|
|
1102
1165
|
size: CHIP_SIZE,
|
|
1103
|
-
label: isEditing ? /* @__PURE__ */
|
|
1166
|
+
label: isEditing ? /* @__PURE__ */ React10.createElement(EditableField, { ref, ...getEditableProps() }) : /* @__PURE__ */ React10.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
1104
1167
|
variant: isActive && !meta.state && !isEditing ? "filled" : "standard",
|
|
1105
1168
|
shape: "rounded",
|
|
1106
1169
|
icon,
|
|
@@ -1127,17 +1190,17 @@ function CssClassItem(props) {
|
|
|
1127
1190
|
})
|
|
1128
1191
|
}
|
|
1129
1192
|
),
|
|
1130
|
-
!isEditing && /* @__PURE__ */
|
|
1193
|
+
!isEditing && /* @__PURE__ */ React10.createElement(
|
|
1131
1194
|
Chip2,
|
|
1132
1195
|
{
|
|
1133
|
-
icon: isShowingState ? void 0 : /* @__PURE__ */
|
|
1196
|
+
icon: isShowingState ? void 0 : /* @__PURE__ */ React10.createElement(DotsVerticalIcon, { fontSize: "tiny" }),
|
|
1134
1197
|
size: CHIP_SIZE,
|
|
1135
|
-
label: isShowingState ? /* @__PURE__ */
|
|
1198
|
+
label: isShowingState ? /* @__PURE__ */ React10.createElement(Stack2, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React10.createElement(Typography2, { variant: "inherit" }, stateLabel), /* @__PURE__ */ React10.createElement(DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
1136
1199
|
variant: "filled",
|
|
1137
1200
|
shape: "rounded",
|
|
1138
1201
|
color,
|
|
1139
1202
|
...bindTrigger(popupState),
|
|
1140
|
-
"aria-label":
|
|
1203
|
+
"aria-label": __5("Open CSS Class Menu", "elementor"),
|
|
1141
1204
|
sx: (theme) => ({
|
|
1142
1205
|
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
1143
1206
|
paddingRight: 0,
|
|
@@ -1146,7 +1209,7 @@ function CssClassItem(props) {
|
|
|
1146
1209
|
})
|
|
1147
1210
|
}
|
|
1148
1211
|
)
|
|
1149
|
-
), /* @__PURE__ */
|
|
1212
|
+
), /* @__PURE__ */ React10.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React10.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
1150
1213
|
}
|
|
1151
1214
|
var validateLabel = (newLabel) => {
|
|
1152
1215
|
const result = validateStyleLabel(newLabel, "rename");
|
|
@@ -1160,11 +1223,11 @@ var validateLabel = (newLabel) => {
|
|
|
1160
1223
|
var ID = "elementor-css-class-selector";
|
|
1161
1224
|
var TAGS_LIMIT = 50;
|
|
1162
1225
|
var EMPTY_OPTION = {
|
|
1163
|
-
label:
|
|
1226
|
+
label: __6("local", "elementor"),
|
|
1164
1227
|
value: null,
|
|
1165
1228
|
fixed: true,
|
|
1166
1229
|
color: getTempStylesProviderColorName("accent"),
|
|
1167
|
-
icon: /* @__PURE__ */
|
|
1230
|
+
icon: /* @__PURE__ */ React11.createElement(MapPinIcon, null),
|
|
1168
1231
|
provider: null
|
|
1169
1232
|
};
|
|
1170
1233
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation2();
|
|
@@ -1178,9 +1241,9 @@ function CssClassSelector() {
|
|
|
1178
1241
|
const appliedOptions = useAppliedOptions(options12);
|
|
1179
1242
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1180
1243
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
1181
|
-
const { userCan } =
|
|
1244
|
+
const { userCan } = useUserStylesCapability5();
|
|
1182
1245
|
const canEdit = active.provider ? userCan(active.provider).updateProps : true;
|
|
1183
|
-
return /* @__PURE__ */
|
|
1246
|
+
return /* @__PURE__ */ React11.createElement(Stack3, { p: 2 }, /* @__PURE__ */ React11.createElement(Stack3, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React11.createElement(FormLabel, { htmlFor: ID, size: "small" }, __6("Classes", "elementor")), /* @__PURE__ */ React11.createElement(Stack3, { direction: "row", gap: 1 }, /* @__PURE__ */ React11.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React11.createElement(
|
|
1184
1247
|
WarningInfotip,
|
|
1185
1248
|
{
|
|
1186
1249
|
open: Boolean(renameError),
|
|
@@ -1189,13 +1252,13 @@ function CssClassSelector() {
|
|
|
1189
1252
|
width: autocompleteRef.current?.getBoundingClientRect().width,
|
|
1190
1253
|
offset: [0, -15]
|
|
1191
1254
|
},
|
|
1192
|
-
/* @__PURE__ */
|
|
1255
|
+
/* @__PURE__ */ React11.createElement(
|
|
1193
1256
|
CreatableAutocomplete,
|
|
1194
1257
|
{
|
|
1195
1258
|
id: ID,
|
|
1196
1259
|
ref: autocompleteRef,
|
|
1197
1260
|
size: "tiny",
|
|
1198
|
-
placeholder: showPlaceholder ?
|
|
1261
|
+
placeholder: showPlaceholder ? __6("Type class name", "elementor") : void 0,
|
|
1199
1262
|
options: options12,
|
|
1200
1263
|
selected: appliedOptions,
|
|
1201
1264
|
entityName,
|
|
@@ -1204,7 +1267,7 @@ function CssClassSelector() {
|
|
|
1204
1267
|
validate: validate ?? void 0,
|
|
1205
1268
|
limitTags: TAGS_LIMIT,
|
|
1206
1269
|
renderEmptyState: EmptyState,
|
|
1207
|
-
getLimitTagsText: (more) => /* @__PURE__ */
|
|
1270
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React11.createElement(Chip3, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
1208
1271
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
1209
1272
|
const chipProps = getTagProps({ index });
|
|
1210
1273
|
const isActive = value.value === active?.value;
|
|
@@ -1220,7 +1283,7 @@ function CssClassSelector() {
|
|
|
1220
1283
|
});
|
|
1221
1284
|
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
1222
1285
|
};
|
|
1223
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1224
1287
|
CssClassItem,
|
|
1225
1288
|
{
|
|
1226
1289
|
key: chipProps.key,
|
|
@@ -1240,9 +1303,9 @@ function CssClassSelector() {
|
|
|
1240
1303
|
})
|
|
1241
1304
|
}
|
|
1242
1305
|
)
|
|
1243
|
-
), !canEdit && /* @__PURE__ */
|
|
1306
|
+
), !canEdit && /* @__PURE__ */ React11.createElement(InfoAlert, { sx: { mt: 1 } }, __6("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1244
1307
|
}
|
|
1245
|
-
var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
1308
|
+
var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React11.createElement(Box2, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1246
1309
|
Stack3,
|
|
1247
1310
|
{
|
|
1248
1311
|
gap: 1,
|
|
@@ -1251,16 +1314,16 @@ var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React10.createEle
|
|
|
1251
1314
|
justifyContent: "center",
|
|
1252
1315
|
sx: { px: 2, m: "auto", maxWidth: "236px" }
|
|
1253
1316
|
},
|
|
1254
|
-
/* @__PURE__ */
|
|
1255
|
-
/* @__PURE__ */
|
|
1256
|
-
/* @__PURE__ */
|
|
1257
|
-
/* @__PURE__ */
|
|
1317
|
+
/* @__PURE__ */ React11.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1318
|
+
/* @__PURE__ */ React11.createElement(Typography3, { align: "center", variant: "subtitle2" }, __6("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React11.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
1319
|
+
/* @__PURE__ */ React11.createElement(Typography3, { align: "center", variant: "caption", sx: { mb: 2 } }, __6("With your current role,", "elementor"), /* @__PURE__ */ React11.createElement("br", null), __6("you can only use existing classes.", "elementor")),
|
|
1320
|
+
/* @__PURE__ */ React11.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __6("Clear & try again", "elementor"))
|
|
1258
1321
|
));
|
|
1259
1322
|
var updateClassByProvider = (provider, data) => {
|
|
1260
1323
|
if (!provider) {
|
|
1261
1324
|
return;
|
|
1262
1325
|
}
|
|
1263
|
-
const providerInstance =
|
|
1326
|
+
const providerInstance = stylesRepository6.getProviderByKey(provider);
|
|
1264
1327
|
if (!providerInstance) {
|
|
1265
1328
|
return;
|
|
1266
1329
|
}
|
|
@@ -1281,7 +1344,7 @@ function useOptions() {
|
|
|
1281
1344
|
value: styleDef.id,
|
|
1282
1345
|
fixed: isElements,
|
|
1283
1346
|
color: getTempStylesProviderColorName(getStylesProviderColorName(provider.getKey())),
|
|
1284
|
-
icon: isElements ? /* @__PURE__ */
|
|
1347
|
+
icon: isElements ? /* @__PURE__ */ React11.createElement(MapPinIcon, null) : null,
|
|
1285
1348
|
provider: provider.getKey()
|
|
1286
1349
|
};
|
|
1287
1350
|
});
|
|
@@ -1311,7 +1374,7 @@ function useCreateAction() {
|
|
|
1311
1374
|
return {
|
|
1312
1375
|
isValid: false,
|
|
1313
1376
|
/* translators: %s is the maximum number of classes */
|
|
1314
|
-
errorMessage:
|
|
1377
|
+
errorMessage: __6(
|
|
1315
1378
|
"You\u2019ve reached the limit of %s classes. Please remove an existing one to create a new class.",
|
|
1316
1379
|
"elementor"
|
|
1317
1380
|
).replace("%s", provider.limit.toString())
|
|
@@ -1364,7 +1427,7 @@ function useHandleSelect() {
|
|
|
1364
1427
|
}
|
|
1365
1428
|
|
|
1366
1429
|
// src/components/custom-css-indicator.tsx
|
|
1367
|
-
import * as
|
|
1430
|
+
import * as React12 from "react";
|
|
1368
1431
|
import { useMemo as useMemo6 } from "react";
|
|
1369
1432
|
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
1370
1433
|
import { getVariantByMeta as getVariantByMeta3 } from "@elementor/editor-styles";
|
|
@@ -1396,7 +1459,7 @@ import { getVariantByMeta } from "@elementor/editor-styles";
|
|
|
1396
1459
|
import { isElementsStylesProvider as isElementsStylesProvider5 } from "@elementor/editor-styles-repository";
|
|
1397
1460
|
import { ELEMENTS_STYLES_RESERVED_LABEL } from "@elementor/editor-styles-repository";
|
|
1398
1461
|
import { undoable as undoable2 } from "@elementor/editor-v1-adapters";
|
|
1399
|
-
import { __ as
|
|
1462
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1400
1463
|
|
|
1401
1464
|
// src/hooks/use-styles-rerender.ts
|
|
1402
1465
|
import { useEffect as useEffect2, useReducer } from "react";
|
|
@@ -1509,21 +1572,21 @@ function getCurrentProps(style, meta) {
|
|
|
1509
1572
|
var defaultHistoryTitles = {
|
|
1510
1573
|
title: ({ provider }) => {
|
|
1511
1574
|
const providerLabel = provider.labels?.singular;
|
|
1512
|
-
return providerLabel ? capitalize(providerLabel) :
|
|
1575
|
+
return providerLabel ? capitalize(providerLabel) : __7("Style", "elementor");
|
|
1513
1576
|
},
|
|
1514
1577
|
subtitle: ({ provider, styleId, elementId, propDisplayName }) => {
|
|
1515
1578
|
const styleLabel = provider.actions.get(styleId, { elementId })?.label;
|
|
1516
1579
|
if (!styleLabel) {
|
|
1517
1580
|
throw new Error(`Style ${styleId} not found`);
|
|
1518
1581
|
}
|
|
1519
|
-
return
|
|
1582
|
+
return __7(`%s$1 %s$2 edited`, "elementor").replace("%s$1", styleLabel).replace("%s$2", propDisplayName);
|
|
1520
1583
|
}
|
|
1521
1584
|
};
|
|
1522
1585
|
var localStyleHistoryTitles = {
|
|
1523
1586
|
title: ({ elementId }) => getElementLabel2(elementId),
|
|
1524
1587
|
subtitle: ({ propDisplayName }) => (
|
|
1525
1588
|
// translators: %s is the name of the style property being edited
|
|
1526
|
-
|
|
1589
|
+
__7(`%s edited`, "elementor").replace("%s", propDisplayName)
|
|
1527
1590
|
)
|
|
1528
1591
|
};
|
|
1529
1592
|
function capitalize(str) {
|
|
@@ -1674,11 +1737,11 @@ var CustomCssIndicator = () => {
|
|
|
1674
1737
|
}, [hasContent, style, meta]);
|
|
1675
1738
|
if (!hasContent) {
|
|
1676
1739
|
if (hasInheritedContent) {
|
|
1677
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ React12.createElement(StyleIndicator, null);
|
|
1678
1741
|
}
|
|
1679
1742
|
return null;
|
|
1680
1743
|
}
|
|
1681
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ React12.createElement(StyleIndicator, { getColor: provider ? getStylesProviderThemeColor(provider.getKey()) : void 0 });
|
|
1682
1745
|
};
|
|
1683
1746
|
var hasInheritedCustomCss = (style, meta) => {
|
|
1684
1747
|
if (!style || !meta) {
|
|
@@ -1712,7 +1775,7 @@ var hasInheritedCustomCss = (style, meta) => {
|
|
|
1712
1775
|
};
|
|
1713
1776
|
|
|
1714
1777
|
// src/components/editing-panel.tsx
|
|
1715
|
-
import * as
|
|
1778
|
+
import * as React82 from "react";
|
|
1716
1779
|
import {
|
|
1717
1780
|
ControlActionsProvider,
|
|
1718
1781
|
ControlReplacementsProvider,
|
|
@@ -1726,7 +1789,7 @@ import { createLocation as createLocation4 } from "@elementor/locations";
|
|
|
1726
1789
|
import { controlActionsMenu } from "@elementor/menus";
|
|
1727
1790
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
1728
1791
|
import { ErrorBoundary } from "@elementor/ui";
|
|
1729
|
-
import { __ as
|
|
1792
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
1730
1793
|
|
|
1731
1794
|
// src/editing-panel-replacement-registry.tsx
|
|
1732
1795
|
var registry = /* @__PURE__ */ new Map();
|
|
@@ -1741,22 +1804,22 @@ var registerEditingPanelReplacement = ({
|
|
|
1741
1804
|
var getEditingPanelReplacement = (element, elementType) => Array.from(registry.values()).filter(({ condition }) => condition(element, elementType)).sort((a, b) => a.priority - b.priority)?.[0] ?? null;
|
|
1742
1805
|
|
|
1743
1806
|
// src/components/editing-panel-error-fallback.tsx
|
|
1744
|
-
import * as
|
|
1807
|
+
import * as React13 from "react";
|
|
1745
1808
|
import { Alert, Box as Box3 } from "@elementor/ui";
|
|
1746
1809
|
function EditorPanelErrorFallback() {
|
|
1747
|
-
return /* @__PURE__ */
|
|
1810
|
+
return /* @__PURE__ */ React13.createElement(Box3, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React13.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React13.createElement("strong", null, "Something went wrong")));
|
|
1748
1811
|
}
|
|
1749
1812
|
|
|
1750
1813
|
// src/components/editing-panel-tabs.tsx
|
|
1751
1814
|
import { Fragment as Fragment9 } from "react";
|
|
1752
|
-
import * as
|
|
1815
|
+
import * as React81 from "react";
|
|
1753
1816
|
import { getWidgetsCache as getWidgetsCache2 } from "@elementor/editor-elements";
|
|
1754
1817
|
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
1755
1818
|
import { Divider as Divider6, Stack as Stack13, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
1756
|
-
import { __ as
|
|
1819
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
1757
1820
|
|
|
1758
1821
|
// src/contexts/scroll-context.tsx
|
|
1759
|
-
import * as
|
|
1822
|
+
import * as React14 from "react";
|
|
1760
1823
|
import { createContext as createContext5, useContext as useContext5, useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
|
|
1761
1824
|
import { styled as styled3 } from "@elementor/ui";
|
|
1762
1825
|
var ScrollContext = createContext5(void 0);
|
|
@@ -1788,7 +1851,7 @@ function ScrollProvider({ children }) {
|
|
|
1788
1851
|
scrollElement.removeEventListener("scroll", handleScroll);
|
|
1789
1852
|
};
|
|
1790
1853
|
});
|
|
1791
|
-
return /* @__PURE__ */
|
|
1854
|
+
return /* @__PURE__ */ React14.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React14.createElement(ScrollPanel, { ref }, children));
|
|
1792
1855
|
}
|
|
1793
1856
|
function useScrollDirection() {
|
|
1794
1857
|
return useContext5(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
@@ -1839,28 +1902,28 @@ var useStateByElement = (key, initialValue) => {
|
|
|
1839
1902
|
};
|
|
1840
1903
|
|
|
1841
1904
|
// src/components/interactions-tab.tsx
|
|
1842
|
-
import * as
|
|
1905
|
+
import * as React16 from "react";
|
|
1843
1906
|
import { InteractionsTab as InteractionsTabContent } from "@elementor/editor-interactions";
|
|
1844
1907
|
|
|
1845
1908
|
// src/components/sections-list.tsx
|
|
1846
|
-
import * as
|
|
1909
|
+
import * as React15 from "react";
|
|
1847
1910
|
import { List } from "@elementor/ui";
|
|
1848
1911
|
function SectionsList(props) {
|
|
1849
|
-
return /* @__PURE__ */
|
|
1912
|
+
return /* @__PURE__ */ React15.createElement(List, { disablePadding: true, component: "div", ...props });
|
|
1850
1913
|
}
|
|
1851
1914
|
|
|
1852
1915
|
// src/components/interactions-tab.tsx
|
|
1853
1916
|
var InteractionsTab = () => {
|
|
1854
1917
|
const { element } = useElement();
|
|
1855
|
-
return /* @__PURE__ */
|
|
1918
|
+
return /* @__PURE__ */ React16.createElement(SectionsList, null, /* @__PURE__ */ React16.createElement(InteractionsTabContent, { elementId: element.id }));
|
|
1856
1919
|
};
|
|
1857
1920
|
|
|
1858
1921
|
// src/components/settings-tab.tsx
|
|
1859
|
-
import * as
|
|
1922
|
+
import * as React23 from "react";
|
|
1860
1923
|
import { SessionStorageProvider } from "@elementor/session";
|
|
1861
1924
|
|
|
1862
1925
|
// src/components/section.tsx
|
|
1863
|
-
import * as
|
|
1926
|
+
import * as React17 from "react";
|
|
1864
1927
|
import { useId as useId2, useRef as useRef3 } from "react";
|
|
1865
1928
|
import { CollapseIcon, getCollapsibleValue, SectionRefContext } from "@elementor/editor-ui";
|
|
1866
1929
|
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack4 } from "@elementor/ui";
|
|
@@ -1878,7 +1941,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
1878
1941
|
const id = useId2();
|
|
1879
1942
|
const labelId = `label-${id}`;
|
|
1880
1943
|
const contentId = `content-${id}`;
|
|
1881
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
1882
1945
|
ListItemButton,
|
|
1883
1946
|
{
|
|
1884
1947
|
id: labelId,
|
|
@@ -1887,7 +1950,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
1887
1950
|
onClick: handleClick,
|
|
1888
1951
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
1889
1952
|
},
|
|
1890
|
-
/* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ React17.createElement(Stack4, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React17.createElement(
|
|
1891
1954
|
ListItemText,
|
|
1892
1955
|
{
|
|
1893
1956
|
secondary: title,
|
|
@@ -1896,7 +1959,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
1896
1959
|
}
|
|
1897
1960
|
), getCollapsibleValue(titleEnd, isOpen)),
|
|
1898
1961
|
action?.component,
|
|
1899
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ React17.createElement(
|
|
1900
1963
|
CollapseIcon,
|
|
1901
1964
|
{
|
|
1902
1965
|
open: isOpen,
|
|
@@ -1906,7 +1969,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
1906
1969
|
sx: { ml: 1 }
|
|
1907
1970
|
}
|
|
1908
1971
|
)
|
|
1909
|
-
), /* @__PURE__ */
|
|
1972
|
+
), /* @__PURE__ */ React17.createElement(
|
|
1910
1973
|
Collapse,
|
|
1911
1974
|
{
|
|
1912
1975
|
id: contentId,
|
|
@@ -1915,17 +1978,17 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
1915
1978
|
timeout: "auto",
|
|
1916
1979
|
unmountOnExit
|
|
1917
1980
|
},
|
|
1918
|
-
/* @__PURE__ */
|
|
1919
|
-
), /* @__PURE__ */
|
|
1981
|
+
/* @__PURE__ */ React17.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React17.createElement(Stack4, { ref, gap: 2.5, p: 2, "aria-label": `${title} section content` }, children))
|
|
1982
|
+
), /* @__PURE__ */ React17.createElement(Divider2, null));
|
|
1920
1983
|
}
|
|
1921
1984
|
|
|
1922
1985
|
// src/components/settings-control.tsx
|
|
1923
|
-
import * as
|
|
1986
|
+
import * as React22 from "react";
|
|
1924
1987
|
import { ControlAdornmentsProvider } from "@elementor/editor-controls";
|
|
1925
1988
|
import { Divider as Divider3, styled as styled5 } from "@elementor/ui";
|
|
1926
1989
|
|
|
1927
1990
|
// src/controls-registry/control.tsx
|
|
1928
|
-
import * as
|
|
1991
|
+
import * as React18 from "react";
|
|
1929
1992
|
|
|
1930
1993
|
// src/controls-registry/controls-registry.tsx
|
|
1931
1994
|
import {
|
|
@@ -2029,17 +2092,17 @@ var Control = ({ props, type }) => {
|
|
|
2029
2092
|
context: { controlType: type }
|
|
2030
2093
|
});
|
|
2031
2094
|
}
|
|
2032
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ React18.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
2033
2096
|
};
|
|
2034
2097
|
|
|
2035
2098
|
// src/controls-registry/control-type-container.tsx
|
|
2036
|
-
import * as
|
|
2099
|
+
import * as React19 from "react";
|
|
2037
2100
|
import { Box as Box4, styled as styled4 } from "@elementor/ui";
|
|
2038
2101
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
2039
2102
|
if (layout === "custom") {
|
|
2040
2103
|
return children;
|
|
2041
2104
|
}
|
|
2042
|
-
return /* @__PURE__ */
|
|
2105
|
+
return /* @__PURE__ */ React19.createElement(StyledContainer, { layout }, children);
|
|
2043
2106
|
};
|
|
2044
2107
|
var StyledContainer = styled4(Box4, {
|
|
2045
2108
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
@@ -2067,13 +2130,13 @@ var getStyleByLayout = (layout) => {
|
|
|
2067
2130
|
};
|
|
2068
2131
|
|
|
2069
2132
|
// src/controls-registry/settings-field.tsx
|
|
2070
|
-
import * as
|
|
2133
|
+
import * as React20 from "react";
|
|
2071
2134
|
import { useMemo as useMemo7 } from "react";
|
|
2072
2135
|
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
2073
2136
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
2074
2137
|
import { getElementLabel as getElementLabel3, getElementSettings, updateElementSettings as updateElementSettings3 } from "@elementor/editor-elements";
|
|
2075
2138
|
import { undoable as undoable4 } from "@elementor/editor-v1-adapters";
|
|
2076
|
-
import { __ as
|
|
2139
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
2077
2140
|
|
|
2078
2141
|
// src/utils/prop-dependency-utils.ts
|
|
2079
2142
|
import {
|
|
@@ -2274,7 +2337,7 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2274
2337
|
updateElementSettings3({ id: elementId, props: settings, withHistory: false });
|
|
2275
2338
|
}
|
|
2276
2339
|
};
|
|
2277
|
-
return /* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ React20.createElement(PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React20.createElement(PropKeyProvider, { bind }, children));
|
|
2278
2341
|
};
|
|
2279
2342
|
function useUndoableUpdateElementProp({
|
|
2280
2343
|
elementId,
|
|
@@ -2296,7 +2359,7 @@ function useUndoableUpdateElementProp({
|
|
|
2296
2359
|
{
|
|
2297
2360
|
title: getElementLabel3(elementId),
|
|
2298
2361
|
// translators: %s is the name of the property that was edited.
|
|
2299
|
-
subtitle:
|
|
2362
|
+
subtitle: __8("%s edited", "elementor").replace("%s", propDisplayName),
|
|
2300
2363
|
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
2301
2364
|
}
|
|
2302
2365
|
);
|
|
@@ -2324,11 +2387,11 @@ var registerFieldIndicator = ({
|
|
|
2324
2387
|
var getFieldIndicators = (fieldType) => Array.from(indicatorsRegistry[fieldType].values()).sort((a, b) => a.priority - b.priority).map(({ id, indicator: Adornment }) => ({ id, Adornment }));
|
|
2325
2388
|
|
|
2326
2389
|
// src/components/control-label.tsx
|
|
2327
|
-
import * as
|
|
2390
|
+
import * as React21 from "react";
|
|
2328
2391
|
import { ControlAdornments, ControlFormLabel } from "@elementor/editor-controls";
|
|
2329
2392
|
import { Stack as Stack5 } from "@elementor/ui";
|
|
2330
2393
|
var ControlLabel = ({ children }) => {
|
|
2331
|
-
return /* @__PURE__ */
|
|
2394
|
+
return /* @__PURE__ */ React21.createElement(Stack5, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React21.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React21.createElement(ControlAdornments, null));
|
|
2332
2395
|
};
|
|
2333
2396
|
|
|
2334
2397
|
// src/components/settings-control.tsx
|
|
@@ -2345,9 +2408,9 @@ var SettingsControl = ({ control: { value, type } }) => {
|
|
|
2345
2408
|
controlProps.label = value.label;
|
|
2346
2409
|
}
|
|
2347
2410
|
if (type === "element-control") {
|
|
2348
|
-
return /* @__PURE__ */
|
|
2411
|
+
return /* @__PURE__ */ React22.createElement(ControlLayout, { control: value, layout, controlProps });
|
|
2349
2412
|
}
|
|
2350
|
-
return /* @__PURE__ */
|
|
2413
|
+
return /* @__PURE__ */ React22.createElement(SettingsField, { bind: value.bind, propDisplayName: value.label || value.bind }, /* @__PURE__ */ React22.createElement(ControlLayout, { control: value, layout, controlProps }));
|
|
2351
2414
|
};
|
|
2352
2415
|
var ControlLayout = ({
|
|
2353
2416
|
control,
|
|
@@ -2355,7 +2418,7 @@ var ControlLayout = ({
|
|
|
2355
2418
|
controlProps
|
|
2356
2419
|
}) => {
|
|
2357
2420
|
const controlType = control.type;
|
|
2358
|
-
return /* @__PURE__ */
|
|
2421
|
+
return /* @__PURE__ */ React22.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, control.meta?.topDivider && /* @__PURE__ */ React22.createElement(Divider3, null), /* @__PURE__ */ React22.createElement(Wrapper, { "data-type": "settings-field" }, /* @__PURE__ */ React22.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React22.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React22.createElement(Control, { type: controlType, props: controlProps }))));
|
|
2359
2422
|
};
|
|
2360
2423
|
function populateChildControlProps(props) {
|
|
2361
2424
|
if (props.childControlType) {
|
|
@@ -2378,13 +2441,13 @@ var SettingsTab = () => {
|
|
|
2378
2441
|
const { elementType, element } = useElement();
|
|
2379
2442
|
const settingsDefault = useDefaultPanelSettings();
|
|
2380
2443
|
const isDefaultExpanded = (sectionId) => settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId);
|
|
2381
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ React23.createElement(SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React23.createElement(SectionsList, null, elementType.controls.map((control, index) => {
|
|
2382
2445
|
if (isControl(control)) {
|
|
2383
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ React23.createElement(SettingsControl, { key: getKey(control, element), control });
|
|
2384
2447
|
}
|
|
2385
2448
|
const { type, value } = control;
|
|
2386
2449
|
if (type === "section") {
|
|
2387
|
-
return /* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2388
2451
|
Section,
|
|
2389
2452
|
{
|
|
2390
2453
|
title: value.label,
|
|
@@ -2393,7 +2456,7 @@ var SettingsTab = () => {
|
|
|
2393
2456
|
},
|
|
2394
2457
|
value.items?.map((item) => {
|
|
2395
2458
|
if (isControl(item)) {
|
|
2396
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ React23.createElement(SettingsControl, { key: getKey(item, element), control: item });
|
|
2397
2460
|
}
|
|
2398
2461
|
return null;
|
|
2399
2462
|
})
|
|
@@ -2413,23 +2476,23 @@ function isControl(control) {
|
|
|
2413
2476
|
}
|
|
2414
2477
|
|
|
2415
2478
|
// src/components/style-tab.tsx
|
|
2416
|
-
import * as
|
|
2479
|
+
import * as React80 from "react";
|
|
2417
2480
|
import { useState as useState9 } from "react";
|
|
2418
2481
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
2419
2482
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
2420
2483
|
import { createLocation as createLocation3 } from "@elementor/locations";
|
|
2421
2484
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2422
2485
|
import { Box as Box5, Divider as Divider5, Stack as Stack12 } from "@elementor/ui";
|
|
2423
|
-
import { __ as
|
|
2486
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
2424
2487
|
|
|
2425
2488
|
// src/contexts/styles-inheritance-context.tsx
|
|
2426
|
-
import * as
|
|
2489
|
+
import * as React24 from "react";
|
|
2427
2490
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
2428
2491
|
import { getWidgetsCache } from "@elementor/editor-elements";
|
|
2429
2492
|
import { classesPropTypeUtil as classesPropTypeUtil3 } from "@elementor/editor-props";
|
|
2430
2493
|
import { getBreakpointsTree as getBreakpointsTree2 } from "@elementor/editor-responsive";
|
|
2431
2494
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
2432
|
-
import { stylesRepository as
|
|
2495
|
+
import { stylesRepository as stylesRepository7 } from "@elementor/editor-styles-repository";
|
|
2433
2496
|
|
|
2434
2497
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
2435
2498
|
import {
|
|
@@ -2664,7 +2727,7 @@ function StyleInheritanceProvider({ children }) {
|
|
|
2664
2727
|
const styleDefs = useAppliedStyles();
|
|
2665
2728
|
const breakpointsTree = getBreakpointsTree2();
|
|
2666
2729
|
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
2667
|
-
return /* @__PURE__ */
|
|
2730
|
+
return /* @__PURE__ */ React24.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
2668
2731
|
}
|
|
2669
2732
|
function useStylesInheritanceSnapshot() {
|
|
2670
2733
|
const context = useContext7(Context4);
|
|
@@ -2696,7 +2759,7 @@ var useAppliedStyles = () => {
|
|
|
2696
2759
|
useStylesRerender();
|
|
2697
2760
|
const classesProp = usePanelElementSetting(currentClassesProp);
|
|
2698
2761
|
const appliedStyles = classesPropTypeUtil3.extract(classesProp) ?? [];
|
|
2699
|
-
return
|
|
2762
|
+
return stylesRepository7.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2700
2763
|
};
|
|
2701
2764
|
var useBaseStyles = () => {
|
|
2702
2765
|
const { elementType } = useElement();
|
|
@@ -2728,12 +2791,12 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
2728
2791
|
}
|
|
2729
2792
|
|
|
2730
2793
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2731
|
-
import * as
|
|
2794
|
+
import * as React27 from "react";
|
|
2732
2795
|
import { BackgroundControl } from "@elementor/editor-controls";
|
|
2733
|
-
import { __ as
|
|
2796
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
2734
2797
|
|
|
2735
2798
|
// src/controls-registry/styles-field.tsx
|
|
2736
|
-
import * as
|
|
2799
|
+
import * as React25 from "react";
|
|
2737
2800
|
import { ControlAdornmentsProvider as ControlAdornmentsProvider2, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
2738
2801
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
2739
2802
|
import { getStylesSchema as getStylesSchema2 } from "@elementor/editor-styles";
|
|
@@ -2826,7 +2889,7 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2826
2889
|
const setValue = (newValue) => {
|
|
2827
2890
|
fields.setValue(newValue[bind]);
|
|
2828
2891
|
};
|
|
2829
|
-
return /* @__PURE__ */
|
|
2892
|
+
return /* @__PURE__ */ React25.createElement(ControlAdornmentsProvider2, { items: getFieldIndicators("styles") }, /* @__PURE__ */ React25.createElement(
|
|
2830
2893
|
PropProvider2,
|
|
2831
2894
|
{
|
|
2832
2895
|
propType,
|
|
@@ -2835,40 +2898,40 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2835
2898
|
placeholder: placeholderValues,
|
|
2836
2899
|
isDisabled: () => !canEdit
|
|
2837
2900
|
},
|
|
2838
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ React25.createElement(PropKeyProvider2, { bind }, /* @__PURE__ */ React25.createElement(ConditionalField, null, children))
|
|
2839
2902
|
));
|
|
2840
2903
|
};
|
|
2841
2904
|
|
|
2842
2905
|
// src/components/section-content.tsx
|
|
2843
|
-
import * as
|
|
2906
|
+
import * as React26 from "react";
|
|
2844
2907
|
import { Stack as Stack6 } from "@elementor/ui";
|
|
2845
|
-
var SectionContent = ({ gap = 2, sx, children, "aria-label": ariaLabel }) => /* @__PURE__ */
|
|
2908
|
+
var SectionContent = ({ gap = 2, sx, children, "aria-label": ariaLabel }) => /* @__PURE__ */ React26.createElement(Stack6, { gap, sx: { ...sx }, "aria-label": ariaLabel }, children);
|
|
2846
2909
|
|
|
2847
2910
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2848
|
-
var BACKGROUND_LABEL =
|
|
2911
|
+
var BACKGROUND_LABEL = __9("Background", "elementor");
|
|
2849
2912
|
var BackgroundSection = () => {
|
|
2850
|
-
return /* @__PURE__ */
|
|
2913
|
+
return /* @__PURE__ */ React27.createElement(SectionContent, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React27.createElement(BackgroundControl, null)));
|
|
2851
2914
|
};
|
|
2852
2915
|
|
|
2853
2916
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2854
|
-
import * as
|
|
2917
|
+
import * as React34 from "react";
|
|
2855
2918
|
|
|
2856
2919
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2857
|
-
import * as
|
|
2920
|
+
import * as React29 from "react";
|
|
2858
2921
|
import { ColorControl } from "@elementor/editor-controls";
|
|
2859
|
-
import { __ as
|
|
2922
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
2860
2923
|
|
|
2861
2924
|
// src/components/styles-field-layout.tsx
|
|
2862
|
-
import * as
|
|
2925
|
+
import * as React28 from "react";
|
|
2863
2926
|
import { Grid, Stack as Stack7 } from "@elementor/ui";
|
|
2864
|
-
var StylesFieldLayout =
|
|
2927
|
+
var StylesFieldLayout = React28.forwardRef((props, ref) => {
|
|
2865
2928
|
const { direction = "row", children, label } = props;
|
|
2866
2929
|
const LayoutComponent = direction === "row" ? Row : Column;
|
|
2867
|
-
return /* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ React28.createElement(LayoutComponent, { label, ref, children });
|
|
2868
2931
|
});
|
|
2869
|
-
var Row =
|
|
2932
|
+
var Row = React28.forwardRef(
|
|
2870
2933
|
({ label, children }, ref) => {
|
|
2871
|
-
return /* @__PURE__ */
|
|
2934
|
+
return /* @__PURE__ */ React28.createElement(
|
|
2872
2935
|
Grid,
|
|
2873
2936
|
{
|
|
2874
2937
|
container: true,
|
|
@@ -2878,8 +2941,8 @@ var Row = React27.forwardRef(
|
|
|
2878
2941
|
ref,
|
|
2879
2942
|
"aria-label": `${label} control`
|
|
2880
2943
|
},
|
|
2881
|
-
/* @__PURE__ */
|
|
2882
|
-
/* @__PURE__ */
|
|
2944
|
+
/* @__PURE__ */ React28.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, label)),
|
|
2945
|
+
/* @__PURE__ */ React28.createElement(
|
|
2883
2946
|
Grid,
|
|
2884
2947
|
{
|
|
2885
2948
|
item: true,
|
|
@@ -2893,18 +2956,18 @@ var Row = React27.forwardRef(
|
|
|
2893
2956
|
);
|
|
2894
2957
|
}
|
|
2895
2958
|
);
|
|
2896
|
-
var Column =
|
|
2959
|
+
var Column = React28.forwardRef(
|
|
2897
2960
|
({ label, children }, ref) => {
|
|
2898
|
-
return /* @__PURE__ */
|
|
2961
|
+
return /* @__PURE__ */ React28.createElement(Stack7, { gap: 0.75, ref }, /* @__PURE__ */ React28.createElement(ControlLabel, null, label), children);
|
|
2899
2962
|
}
|
|
2900
2963
|
);
|
|
2901
2964
|
|
|
2902
2965
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2903
|
-
var BORDER_COLOR_LABEL =
|
|
2904
|
-
var BorderColorField = () => /* @__PURE__ */
|
|
2966
|
+
var BORDER_COLOR_LABEL = __10("Border color", "elementor");
|
|
2967
|
+
var BorderColorField = () => /* @__PURE__ */ React29.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React29.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React29.createElement(ColorControl, null)));
|
|
2905
2968
|
|
|
2906
2969
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2907
|
-
import * as
|
|
2970
|
+
import * as React31 from "react";
|
|
2908
2971
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
2909
2972
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
2910
2973
|
import {
|
|
@@ -2915,7 +2978,7 @@ import {
|
|
|
2915
2978
|
RadiusTopRightIcon
|
|
2916
2979
|
} from "@elementor/icons";
|
|
2917
2980
|
import { withDirection } from "@elementor/ui";
|
|
2918
|
-
import { __ as
|
|
2981
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
2919
2982
|
|
|
2920
2983
|
// src/hooks/use-direction.ts
|
|
2921
2984
|
import { getElementorFrontendConfig } from "@elementor/editor-v1-adapters";
|
|
@@ -2927,147 +2990,147 @@ function useDirection() {
|
|
|
2927
2990
|
}
|
|
2928
2991
|
|
|
2929
2992
|
// src/styles-inheritance/components/ui-providers.tsx
|
|
2930
|
-
import * as
|
|
2993
|
+
import * as React30 from "react";
|
|
2931
2994
|
import { DirectionProvider, ThemeProvider as ThemeProvider2 } from "@elementor/ui";
|
|
2932
2995
|
var UiProviders = ({ children }) => {
|
|
2933
2996
|
const { isSiteRtl } = useDirection();
|
|
2934
|
-
return /* @__PURE__ */
|
|
2997
|
+
return /* @__PURE__ */ React30.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(ThemeProvider2, null, children));
|
|
2935
2998
|
};
|
|
2936
2999
|
|
|
2937
3000
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2938
|
-
var BORDER_RADIUS_LABEL =
|
|
3001
|
+
var BORDER_RADIUS_LABEL = __11("Border radius", "elementor");
|
|
2939
3002
|
var StartStartIcon = withDirection(RadiusTopLeftIcon);
|
|
2940
3003
|
var StartEndIcon = withDirection(RadiusTopRightIcon);
|
|
2941
3004
|
var EndStartIcon = withDirection(RadiusBottomLeftIcon);
|
|
2942
3005
|
var EndEndIcon = withDirection(RadiusBottomRightIcon);
|
|
2943
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2944
|
-
var getStartStartAriaLabel = (isSiteRtl) => isSiteRtl ?
|
|
2945
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2946
|
-
var getStartEndAriaLabel = (isSiteRtl) => isSiteRtl ?
|
|
2947
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2948
|
-
var getEndStartAriaLabel = (isSiteRtl) => isSiteRtl ?
|
|
2949
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2950
|
-
var getEndEndAriaLabel = (isSiteRtl) => isSiteRtl ?
|
|
3006
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __11("Top right", "elementor") : __11("Top left", "elementor");
|
|
3007
|
+
var getStartStartAriaLabel = (isSiteRtl) => isSiteRtl ? __11("Border top right radius", "elementor") : __11("Border top left radius", "elementor");
|
|
3008
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __11("Top left", "elementor") : __11("Top right", "elementor");
|
|
3009
|
+
var getStartEndAriaLabel = (isSiteRtl) => isSiteRtl ? __11("Border top left radius", "elementor") : __11("Border top right radius", "elementor");
|
|
3010
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __11("Bottom right", "elementor") : __11("Bottom left", "elementor");
|
|
3011
|
+
var getEndStartAriaLabel = (isSiteRtl) => isSiteRtl ? __11("Border bottom right radius", "elementor") : __11("Border bottom left radius", "elementor");
|
|
3012
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __11("Bottom left", "elementor") : __11("Bottom right", "elementor");
|
|
3013
|
+
var getEndEndAriaLabel = (isSiteRtl) => isSiteRtl ? __11("Border bottom left radius", "elementor") : __11("Border bottom right radius", "elementor");
|
|
2951
3014
|
var getCorners = (isSiteRtl) => [
|
|
2952
3015
|
{
|
|
2953
3016
|
label: getStartStartLabel(isSiteRtl),
|
|
2954
3017
|
ariaLabel: getStartStartAriaLabel(isSiteRtl),
|
|
2955
|
-
icon: /* @__PURE__ */
|
|
3018
|
+
icon: /* @__PURE__ */ React31.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2956
3019
|
bind: "start-start"
|
|
2957
3020
|
},
|
|
2958
3021
|
{
|
|
2959
3022
|
label: getStartEndLabel(isSiteRtl),
|
|
2960
3023
|
ariaLabel: getStartEndAriaLabel(isSiteRtl),
|
|
2961
|
-
icon: /* @__PURE__ */
|
|
3024
|
+
icon: /* @__PURE__ */ React31.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2962
3025
|
bind: "start-end"
|
|
2963
3026
|
},
|
|
2964
3027
|
{
|
|
2965
3028
|
label: getEndStartLabel(isSiteRtl),
|
|
2966
3029
|
ariaLabel: getEndStartAriaLabel(isSiteRtl),
|
|
2967
|
-
icon: /* @__PURE__ */
|
|
3030
|
+
icon: /* @__PURE__ */ React31.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2968
3031
|
bind: "end-start"
|
|
2969
3032
|
},
|
|
2970
3033
|
{
|
|
2971
3034
|
label: getEndEndLabel(isSiteRtl),
|
|
2972
3035
|
ariaLabel: getEndEndAriaLabel(isSiteRtl),
|
|
2973
|
-
icon: /* @__PURE__ */
|
|
3036
|
+
icon: /* @__PURE__ */ React31.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2974
3037
|
bind: "end-end"
|
|
2975
3038
|
}
|
|
2976
3039
|
];
|
|
2977
3040
|
var BorderRadiusField = () => {
|
|
2978
3041
|
const { isSiteRtl } = useDirection();
|
|
2979
|
-
return /* @__PURE__ */
|
|
3042
|
+
return /* @__PURE__ */ React31.createElement(UiProviders, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "border-radius", propDisplayName: BORDER_RADIUS_LABEL }, /* @__PURE__ */ React31.createElement(
|
|
2980
3043
|
EqualUnequalSizesControl,
|
|
2981
3044
|
{
|
|
2982
3045
|
items: getCorners(isSiteRtl),
|
|
2983
3046
|
label: BORDER_RADIUS_LABEL,
|
|
2984
|
-
icon: /* @__PURE__ */
|
|
2985
|
-
tooltipLabel:
|
|
3047
|
+
icon: /* @__PURE__ */ React31.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
3048
|
+
tooltipLabel: __11("Adjust corners", "elementor"),
|
|
2986
3049
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
2987
3050
|
}
|
|
2988
3051
|
)));
|
|
2989
3052
|
};
|
|
2990
3053
|
|
|
2991
3054
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2992
|
-
import * as
|
|
3055
|
+
import * as React32 from "react";
|
|
2993
3056
|
import { SelectControl } from "@elementor/editor-controls";
|
|
2994
|
-
import { __ as
|
|
2995
|
-
var BORDER_TYPE_LABEL =
|
|
3057
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
3058
|
+
var BORDER_TYPE_LABEL = __12("Border type", "elementor");
|
|
2996
3059
|
var borderStyles = [
|
|
2997
|
-
{ value: "none", label:
|
|
2998
|
-
{ value: "solid", label:
|
|
2999
|
-
{ value: "dashed", label:
|
|
3000
|
-
{ value: "dotted", label:
|
|
3001
|
-
{ value: "double", label:
|
|
3002
|
-
{ value: "groove", label:
|
|
3003
|
-
{ value: "ridge", label:
|
|
3004
|
-
{ value: "inset", label:
|
|
3005
|
-
{ value: "outset", label:
|
|
3060
|
+
{ value: "none", label: __12("None", "elementor") },
|
|
3061
|
+
{ value: "solid", label: __12("Solid", "elementor") },
|
|
3062
|
+
{ value: "dashed", label: __12("Dashed", "elementor") },
|
|
3063
|
+
{ value: "dotted", label: __12("Dotted", "elementor") },
|
|
3064
|
+
{ value: "double", label: __12("Double", "elementor") },
|
|
3065
|
+
{ value: "groove", label: __12("Groove", "elementor") },
|
|
3066
|
+
{ value: "ridge", label: __12("Ridge", "elementor") },
|
|
3067
|
+
{ value: "inset", label: __12("Inset", "elementor") },
|
|
3068
|
+
{ value: "outset", label: __12("Outset", "elementor") }
|
|
3006
3069
|
];
|
|
3007
|
-
var BorderStyleField = () => /* @__PURE__ */
|
|
3070
|
+
var BorderStyleField = () => /* @__PURE__ */ React32.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React32.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React32.createElement(SelectControl, { options: borderStyles })));
|
|
3008
3071
|
|
|
3009
3072
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
3010
|
-
import * as
|
|
3073
|
+
import * as React33 from "react";
|
|
3011
3074
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
3012
3075
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
3013
3076
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
3014
3077
|
import { withDirection as withDirection2 } from "@elementor/ui";
|
|
3015
|
-
import { __ as
|
|
3016
|
-
var BORDER_WIDTH_LABEL =
|
|
3078
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
3079
|
+
var BORDER_WIDTH_LABEL = __13("Border width", "elementor");
|
|
3017
3080
|
var InlineStartIcon = withDirection2(SideRightIcon);
|
|
3018
3081
|
var InlineEndIcon = withDirection2(SideLeftIcon);
|
|
3019
3082
|
var getEdges = (isSiteRtl) => [
|
|
3020
3083
|
{
|
|
3021
|
-
label:
|
|
3022
|
-
ariaLabel:
|
|
3023
|
-
icon: /* @__PURE__ */
|
|
3084
|
+
label: __13("Top", "elementor"),
|
|
3085
|
+
ariaLabel: __13("Border top width", "elementor"),
|
|
3086
|
+
icon: /* @__PURE__ */ React33.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
3024
3087
|
bind: "block-start"
|
|
3025
3088
|
},
|
|
3026
3089
|
{
|
|
3027
|
-
label: isSiteRtl ?
|
|
3028
|
-
ariaLabel: isSiteRtl ?
|
|
3029
|
-
icon: /* @__PURE__ */
|
|
3090
|
+
label: isSiteRtl ? __13("Left", "elementor") : __13("Right", "elementor"),
|
|
3091
|
+
ariaLabel: isSiteRtl ? __13("Border left width", "elementor") : __13("Border right width", "elementor"),
|
|
3092
|
+
icon: /* @__PURE__ */ React33.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
3030
3093
|
bind: "inline-end"
|
|
3031
3094
|
},
|
|
3032
3095
|
{
|
|
3033
|
-
label:
|
|
3034
|
-
ariaLabel:
|
|
3035
|
-
icon: /* @__PURE__ */
|
|
3096
|
+
label: __13("Bottom", "elementor"),
|
|
3097
|
+
ariaLabel: __13("Border bottom width", "elementor"),
|
|
3098
|
+
icon: /* @__PURE__ */ React33.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
3036
3099
|
bind: "block-end"
|
|
3037
3100
|
},
|
|
3038
3101
|
{
|
|
3039
|
-
label: isSiteRtl ?
|
|
3040
|
-
ariaLabel: isSiteRtl ?
|
|
3041
|
-
icon: /* @__PURE__ */
|
|
3102
|
+
label: isSiteRtl ? __13("Right", "elementor") : __13("Left", "elementor"),
|
|
3103
|
+
ariaLabel: isSiteRtl ? __13("Border right width", "elementor") : __13("Border left width", "elementor"),
|
|
3104
|
+
icon: /* @__PURE__ */ React33.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
3042
3105
|
bind: "inline-start"
|
|
3043
3106
|
}
|
|
3044
3107
|
];
|
|
3045
3108
|
var BorderWidthField = () => {
|
|
3046
3109
|
const { isSiteRtl } = useDirection();
|
|
3047
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ React33.createElement(StylesField, { bind: "border-width", propDisplayName: BORDER_WIDTH_LABEL }, /* @__PURE__ */ React33.createElement(
|
|
3048
3111
|
EqualUnequalSizesControl2,
|
|
3049
3112
|
{
|
|
3050
3113
|
items: getEdges(isSiteRtl),
|
|
3051
3114
|
label: BORDER_WIDTH_LABEL,
|
|
3052
|
-
icon: /* @__PURE__ */
|
|
3053
|
-
tooltipLabel:
|
|
3115
|
+
icon: /* @__PURE__ */ React33.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
3116
|
+
tooltipLabel: __13("Adjust borders", "elementor"),
|
|
3054
3117
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
3055
3118
|
}
|
|
3056
3119
|
));
|
|
3057
3120
|
};
|
|
3058
3121
|
|
|
3059
3122
|
// src/components/style-sections/border-section/border-section.tsx
|
|
3060
|
-
var BorderSection = () => /* @__PURE__ */
|
|
3123
|
+
var BorderSection = () => /* @__PURE__ */ React34.createElement(SectionContent, null, /* @__PURE__ */ React34.createElement(BorderWidthField, null), /* @__PURE__ */ React34.createElement(BorderColorField, null), /* @__PURE__ */ React34.createElement(BorderStyleField, null), /* @__PURE__ */ React34.createElement(BorderRadiusField, null));
|
|
3061
3124
|
|
|
3062
3125
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
3063
|
-
import * as
|
|
3126
|
+
import * as React38 from "react";
|
|
3064
3127
|
import {
|
|
3065
3128
|
BoxShadowRepeaterControl,
|
|
3066
3129
|
FilterRepeaterControl,
|
|
3067
3130
|
TransformRepeaterControl,
|
|
3068
3131
|
TransitionRepeaterControl
|
|
3069
3132
|
} from "@elementor/editor-controls";
|
|
3070
|
-
import { __ as
|
|
3133
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
3071
3134
|
|
|
3072
3135
|
// src/utils/can-element-have-children.ts
|
|
3073
3136
|
import { getContainer } from "@elementor/editor-elements";
|
|
@@ -3108,72 +3171,72 @@ var getRecentlyUsedList = async (elementId) => {
|
|
|
3108
3171
|
};
|
|
3109
3172
|
|
|
3110
3173
|
// src/components/panel-divider.tsx
|
|
3111
|
-
import * as
|
|
3174
|
+
import * as React35 from "react";
|
|
3112
3175
|
import { Divider as Divider4 } from "@elementor/ui";
|
|
3113
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
3176
|
+
var PanelDivider = () => /* @__PURE__ */ React35.createElement(Divider4, { sx: { my: 0.5 } });
|
|
3114
3177
|
|
|
3115
3178
|
// src/components/style-sections/effects-section/blend-mode-field.tsx
|
|
3116
|
-
import * as
|
|
3179
|
+
import * as React36 from "react";
|
|
3117
3180
|
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
3118
|
-
import { __ as
|
|
3119
|
-
var BLEND_MODE_LABEL =
|
|
3181
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
3182
|
+
var BLEND_MODE_LABEL = __14("Blend mode", "elementor");
|
|
3120
3183
|
var blendModeOptions = [
|
|
3121
|
-
{ label:
|
|
3122
|
-
{ label:
|
|
3123
|
-
{ label:
|
|
3124
|
-
{ label:
|
|
3125
|
-
{ label:
|
|
3126
|
-
{ label:
|
|
3127
|
-
{ label:
|
|
3128
|
-
{ label:
|
|
3129
|
-
{ label:
|
|
3130
|
-
{ label:
|
|
3131
|
-
{ label:
|
|
3132
|
-
{ label:
|
|
3133
|
-
{ label:
|
|
3134
|
-
{ label:
|
|
3135
|
-
{ label:
|
|
3136
|
-
{ label:
|
|
3184
|
+
{ label: __14("Normal", "elementor"), value: "normal" },
|
|
3185
|
+
{ label: __14("Multiply", "elementor"), value: "multiply" },
|
|
3186
|
+
{ label: __14("Screen", "elementor"), value: "screen" },
|
|
3187
|
+
{ label: __14("Overlay", "elementor"), value: "overlay" },
|
|
3188
|
+
{ label: __14("Darken", "elementor"), value: "darken" },
|
|
3189
|
+
{ label: __14("Lighten", "elementor"), value: "lighten" },
|
|
3190
|
+
{ label: __14("Color dodge", "elementor"), value: "color-dodge" },
|
|
3191
|
+
{ label: __14("Color burn", "elementor"), value: "color-burn" },
|
|
3192
|
+
{ label: __14("Saturation", "elementor"), value: "saturation" },
|
|
3193
|
+
{ label: __14("Color", "elementor"), value: "color" },
|
|
3194
|
+
{ label: __14("Difference", "elementor"), value: "difference" },
|
|
3195
|
+
{ label: __14("Exclusion", "elementor"), value: "exclusion" },
|
|
3196
|
+
{ label: __14("Hue", "elementor"), value: "hue" },
|
|
3197
|
+
{ label: __14("Luminosity", "elementor"), value: "luminosity" },
|
|
3198
|
+
{ label: __14("Soft light", "elementor"), value: "soft-light" },
|
|
3199
|
+
{ label: __14("Hard light", "elementor"), value: "hard-light" }
|
|
3137
3200
|
];
|
|
3138
3201
|
var BlendModeField = () => {
|
|
3139
|
-
return /* @__PURE__ */
|
|
3202
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "mix-blend-mode", propDisplayName: BLEND_MODE_LABEL }, /* @__PURE__ */ React36.createElement(StylesFieldLayout, { label: BLEND_MODE_LABEL }, /* @__PURE__ */ React36.createElement(SelectControl2, { options: blendModeOptions })));
|
|
3140
3203
|
};
|
|
3141
3204
|
|
|
3142
3205
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3143
|
-
import * as
|
|
3206
|
+
import * as React37 from "react";
|
|
3144
3207
|
import { useRef as useRef4 } from "react";
|
|
3145
3208
|
import { SizeControl as SizeControl2 } from "@elementor/editor-controls";
|
|
3146
|
-
import { __ as
|
|
3147
|
-
var OPACITY_LABEL =
|
|
3209
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
3210
|
+
var OPACITY_LABEL = __15("Opacity", "elementor");
|
|
3148
3211
|
var OpacityControlField = () => {
|
|
3149
3212
|
const rowRef = useRef4(null);
|
|
3150
|
-
return /* @__PURE__ */
|
|
3213
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(SizeControl2, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3151
3214
|
};
|
|
3152
3215
|
|
|
3153
3216
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
3154
|
-
var BOX_SHADOW_LABEL =
|
|
3155
|
-
var FILTER_LABEL =
|
|
3156
|
-
var TRANSFORM_LABEL =
|
|
3157
|
-
var BACKDROP_FILTER_LABEL =
|
|
3158
|
-
var TRANSITIONS_LABEL =
|
|
3217
|
+
var BOX_SHADOW_LABEL = __16("Box shadow", "elementor");
|
|
3218
|
+
var FILTER_LABEL = __16("Filters", "elementor");
|
|
3219
|
+
var TRANSFORM_LABEL = __16("Transform", "elementor");
|
|
3220
|
+
var BACKDROP_FILTER_LABEL = __16("Backdrop filters", "elementor");
|
|
3221
|
+
var TRANSITIONS_LABEL = __16("Transitions", "elementor");
|
|
3159
3222
|
var EffectsSection = () => {
|
|
3160
3223
|
const { element } = useElement();
|
|
3161
3224
|
const { meta } = useStyle();
|
|
3162
3225
|
const canHaveChildren = canElementHaveChildren(element?.id ?? "");
|
|
3163
|
-
return /* @__PURE__ */
|
|
3226
|
+
return /* @__PURE__ */ React38.createElement(SectionContent, { gap: 1 }, /* @__PURE__ */ React38.createElement(BlendModeField, null), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(OpacityControlField, null), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(StylesField, { bind: "box-shadow", propDisplayName: BOX_SHADOW_LABEL }, /* @__PURE__ */ React38.createElement(BoxShadowRepeaterControl, null)), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(StylesField, { bind: "transform", propDisplayName: TRANSFORM_LABEL }, /* @__PURE__ */ React38.createElement(TransformRepeaterControl, { showChildrenPerspective: canHaveChildren })), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(StylesField, { bind: "transition", propDisplayName: TRANSITIONS_LABEL }, /* @__PURE__ */ React38.createElement(
|
|
3164
3227
|
TransitionRepeaterControl,
|
|
3165
3228
|
{
|
|
3166
3229
|
currentStyleState: meta.state,
|
|
3167
3230
|
recentlyUsedListGetter: () => getRecentlyUsedList(element?.id ?? "")
|
|
3168
3231
|
}
|
|
3169
|
-
)), /* @__PURE__ */
|
|
3232
|
+
)), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(StylesField, { bind: "filter", propDisplayName: FILTER_LABEL }, /* @__PURE__ */ React38.createElement(FilterRepeaterControl, null)), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(StylesField, { bind: "backdrop-filter", propDisplayName: BACKDROP_FILTER_LABEL }, /* @__PURE__ */ React38.createElement(FilterRepeaterControl, { filterPropName: "backdrop-filter" })));
|
|
3170
3233
|
};
|
|
3171
3234
|
|
|
3172
3235
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3173
|
-
import * as
|
|
3236
|
+
import * as React50 from "react";
|
|
3174
3237
|
import { ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
3175
3238
|
import { useParentElement } from "@elementor/editor-elements";
|
|
3176
|
-
import { __ as
|
|
3239
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
3177
3240
|
|
|
3178
3241
|
// src/hooks/use-computed-style.ts
|
|
3179
3242
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -3200,7 +3263,7 @@ function useComputedStyle(elementId) {
|
|
|
3200
3263
|
}
|
|
3201
3264
|
|
|
3202
3265
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3203
|
-
import * as
|
|
3266
|
+
import * as React40 from "react";
|
|
3204
3267
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
3205
3268
|
import {
|
|
3206
3269
|
JustifyBottomIcon,
|
|
@@ -3211,14 +3274,14 @@ import {
|
|
|
3211
3274
|
JustifyTopIcon
|
|
3212
3275
|
} from "@elementor/icons";
|
|
3213
3276
|
import { withDirection as withDirection3 } from "@elementor/ui";
|
|
3214
|
-
import { __ as
|
|
3277
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
3215
3278
|
|
|
3216
3279
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3217
|
-
import * as
|
|
3280
|
+
import * as React39 from "react";
|
|
3218
3281
|
import { useRef as useRef5 } from "react";
|
|
3219
3282
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
3220
|
-
import { __ as
|
|
3221
|
-
var FLEX_DIRECTION_LABEL =
|
|
3283
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
3284
|
+
var FLEX_DIRECTION_LABEL = __17("Flex direction", "elementor");
|
|
3222
3285
|
var CLOCKWISE_ANGLES = {
|
|
3223
3286
|
row: 0,
|
|
3224
3287
|
column: 90,
|
|
@@ -3240,7 +3303,7 @@ var RotatedIcon = ({
|
|
|
3240
3303
|
}) => {
|
|
3241
3304
|
const rotate = useRef5(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
3242
3305
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
3243
|
-
return /* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ React39.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
3244
3307
|
};
|
|
3245
3308
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
3246
3309
|
const { value: direction } = useStylesField("flex-direction", {
|
|
@@ -3261,7 +3324,7 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
3261
3324
|
};
|
|
3262
3325
|
|
|
3263
3326
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3264
|
-
var ALIGN_CONTENT_LABEL =
|
|
3327
|
+
var ALIGN_CONTENT_LABEL = __18("Align content", "elementor");
|
|
3265
3328
|
var StartIcon = withDirection3(JustifyTopIcon);
|
|
3266
3329
|
var EndIcon = withDirection3(JustifyBottomIcon);
|
|
3267
3330
|
var iconProps = {
|
|
@@ -3272,45 +3335,45 @@ var iconProps = {
|
|
|
3272
3335
|
var options = [
|
|
3273
3336
|
{
|
|
3274
3337
|
value: "start",
|
|
3275
|
-
label:
|
|
3276
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3338
|
+
label: __18("Start", "elementor"),
|
|
3339
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
3277
3340
|
showTooltip: true
|
|
3278
3341
|
},
|
|
3279
3342
|
{
|
|
3280
3343
|
value: "center",
|
|
3281
|
-
label:
|
|
3282
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3344
|
+
label: __18("Center", "elementor"),
|
|
3345
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
3283
3346
|
showTooltip: true
|
|
3284
3347
|
},
|
|
3285
3348
|
{
|
|
3286
3349
|
value: "end",
|
|
3287
|
-
label:
|
|
3288
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3350
|
+
label: __18("End", "elementor"),
|
|
3351
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
3289
3352
|
showTooltip: true
|
|
3290
3353
|
},
|
|
3291
3354
|
{
|
|
3292
3355
|
value: "space-between",
|
|
3293
|
-
label:
|
|
3294
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3356
|
+
label: __18("Space between", "elementor"),
|
|
3357
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
3295
3358
|
showTooltip: true
|
|
3296
3359
|
},
|
|
3297
3360
|
{
|
|
3298
3361
|
value: "space-around",
|
|
3299
|
-
label:
|
|
3300
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3362
|
+
label: __18("Space around", "elementor"),
|
|
3363
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
3301
3364
|
showTooltip: true
|
|
3302
3365
|
},
|
|
3303
3366
|
{
|
|
3304
3367
|
value: "space-evenly",
|
|
3305
|
-
label:
|
|
3306
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3368
|
+
label: __18("Space evenly", "elementor"),
|
|
3369
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
3307
3370
|
showTooltip: true
|
|
3308
3371
|
}
|
|
3309
3372
|
];
|
|
3310
|
-
var AlignContentField = () => /* @__PURE__ */
|
|
3373
|
+
var AlignContentField = () => /* @__PURE__ */ React40.createElement(StylesField, { bind: "align-content", propDisplayName: ALIGN_CONTENT_LABEL }, /* @__PURE__ */ React40.createElement(UiProviders, null, /* @__PURE__ */ React40.createElement(StylesFieldLayout, { label: ALIGN_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React40.createElement(ToggleControl2, { options, fullWidth: true }))));
|
|
3311
3374
|
|
|
3312
3375
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
3313
|
-
import * as
|
|
3376
|
+
import * as React41 from "react";
|
|
3314
3377
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
3315
3378
|
import {
|
|
3316
3379
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -3319,8 +3382,8 @@ import {
|
|
|
3319
3382
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
3320
3383
|
} from "@elementor/icons";
|
|
3321
3384
|
import { withDirection as withDirection4 } from "@elementor/ui";
|
|
3322
|
-
import { __ as
|
|
3323
|
-
var ALIGN_ITEMS_LABEL =
|
|
3385
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
3386
|
+
var ALIGN_ITEMS_LABEL = __19("Align items", "elementor");
|
|
3324
3387
|
var StartIcon2 = withDirection4(LayoutAlignLeftIcon);
|
|
3325
3388
|
var EndIcon2 = withDirection4(LayoutAlignRightIcon);
|
|
3326
3389
|
var iconProps2 = {
|
|
@@ -3330,35 +3393,35 @@ var iconProps2 = {
|
|
|
3330
3393
|
var options2 = [
|
|
3331
3394
|
{
|
|
3332
3395
|
value: "start",
|
|
3333
|
-
label:
|
|
3334
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3396
|
+
label: __19("Start", "elementor"),
|
|
3397
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
3335
3398
|
showTooltip: true
|
|
3336
3399
|
},
|
|
3337
3400
|
{
|
|
3338
3401
|
value: "center",
|
|
3339
|
-
label:
|
|
3340
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3402
|
+
label: __19("Center", "elementor"),
|
|
3403
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
3341
3404
|
showTooltip: true
|
|
3342
3405
|
},
|
|
3343
3406
|
{
|
|
3344
3407
|
value: "end",
|
|
3345
|
-
label:
|
|
3346
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3408
|
+
label: __19("End", "elementor"),
|
|
3409
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
3347
3410
|
showTooltip: true
|
|
3348
3411
|
},
|
|
3349
3412
|
{
|
|
3350
3413
|
value: "stretch",
|
|
3351
|
-
label:
|
|
3352
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3414
|
+
label: __19("Stretch", "elementor"),
|
|
3415
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
3353
3416
|
showTooltip: true
|
|
3354
3417
|
}
|
|
3355
3418
|
];
|
|
3356
3419
|
var AlignItemsField = () => {
|
|
3357
|
-
return /* @__PURE__ */
|
|
3420
|
+
return /* @__PURE__ */ React41.createElement(UiProviders, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "align-items", propDisplayName: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React41.createElement(StylesFieldLayout, { label: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React41.createElement(ToggleControl3, { options: options2 }))));
|
|
3358
3421
|
};
|
|
3359
3422
|
|
|
3360
3423
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
3361
|
-
import * as
|
|
3424
|
+
import * as React42 from "react";
|
|
3362
3425
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
3363
3426
|
import {
|
|
3364
3427
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -3367,8 +3430,8 @@ import {
|
|
|
3367
3430
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
3368
3431
|
} from "@elementor/icons";
|
|
3369
3432
|
import { withDirection as withDirection5 } from "@elementor/ui";
|
|
3370
|
-
import { __ as
|
|
3371
|
-
var ALIGN_SELF_LABEL =
|
|
3433
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
3434
|
+
var ALIGN_SELF_LABEL = __20("Align self", "elementor");
|
|
3372
3435
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
3373
3436
|
row: 90,
|
|
3374
3437
|
"row-reverse": 90,
|
|
@@ -3383,8 +3446,8 @@ var iconProps3 = {
|
|
|
3383
3446
|
var getOptions = (parentStyleDirection) => [
|
|
3384
3447
|
{
|
|
3385
3448
|
value: "start",
|
|
3386
|
-
label:
|
|
3387
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3449
|
+
label: __20("Start", "elementor"),
|
|
3450
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
3388
3451
|
RotatedIcon,
|
|
3389
3452
|
{
|
|
3390
3453
|
icon: StartIcon3,
|
|
@@ -3397,8 +3460,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3397
3460
|
},
|
|
3398
3461
|
{
|
|
3399
3462
|
value: "center",
|
|
3400
|
-
label:
|
|
3401
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3463
|
+
label: __20("Center", "elementor"),
|
|
3464
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
3402
3465
|
RotatedIcon,
|
|
3403
3466
|
{
|
|
3404
3467
|
icon: CenterIcon3,
|
|
@@ -3411,8 +3474,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3411
3474
|
},
|
|
3412
3475
|
{
|
|
3413
3476
|
value: "end",
|
|
3414
|
-
label:
|
|
3415
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3477
|
+
label: __20("End", "elementor"),
|
|
3478
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
3416
3479
|
RotatedIcon,
|
|
3417
3480
|
{
|
|
3418
3481
|
icon: EndIcon3,
|
|
@@ -3425,8 +3488,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3425
3488
|
},
|
|
3426
3489
|
{
|
|
3427
3490
|
value: "stretch",
|
|
3428
|
-
label:
|
|
3429
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3491
|
+
label: __20("Stretch", "elementor"),
|
|
3492
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
3430
3493
|
RotatedIcon,
|
|
3431
3494
|
{
|
|
3432
3495
|
icon: JustifyIcon2,
|
|
@@ -3438,96 +3501,96 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3438
3501
|
showTooltip: true
|
|
3439
3502
|
}
|
|
3440
3503
|
];
|
|
3441
|
-
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3504
|
+
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React42.createElement(UiProviders, null, /* @__PURE__ */ React42.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React42.createElement(ToggleControl4, { options: getOptions(parentStyleDirection) }))));
|
|
3442
3505
|
|
|
3443
3506
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3444
|
-
import * as
|
|
3507
|
+
import * as React43 from "react";
|
|
3445
3508
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
3446
|
-
import { __ as
|
|
3447
|
-
var DISPLAY_LABEL =
|
|
3509
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
3510
|
+
var DISPLAY_LABEL = __21("Display", "elementor");
|
|
3448
3511
|
var displayFieldItems = [
|
|
3449
3512
|
{
|
|
3450
3513
|
value: "block",
|
|
3451
|
-
renderContent: () =>
|
|
3452
|
-
label:
|
|
3514
|
+
renderContent: () => __21("Block", "elementor"),
|
|
3515
|
+
label: __21("Block", "elementor"),
|
|
3453
3516
|
showTooltip: true
|
|
3454
3517
|
},
|
|
3455
3518
|
{
|
|
3456
3519
|
value: "flex",
|
|
3457
|
-
renderContent: () =>
|
|
3458
|
-
label:
|
|
3520
|
+
renderContent: () => __21("Flex", "elementor"),
|
|
3521
|
+
label: __21("Flex", "elementor"),
|
|
3459
3522
|
showTooltip: true
|
|
3460
3523
|
},
|
|
3461
3524
|
{
|
|
3462
3525
|
value: "inline-block",
|
|
3463
|
-
renderContent: () =>
|
|
3464
|
-
label:
|
|
3526
|
+
renderContent: () => __21("In-blk", "elementor"),
|
|
3527
|
+
label: __21("Inline-block", "elementor"),
|
|
3465
3528
|
showTooltip: true
|
|
3466
3529
|
},
|
|
3467
3530
|
{
|
|
3468
3531
|
value: "none",
|
|
3469
|
-
renderContent: () =>
|
|
3470
|
-
label:
|
|
3532
|
+
renderContent: () => __21("None", "elementor"),
|
|
3533
|
+
label: __21("None", "elementor"),
|
|
3471
3534
|
showTooltip: true
|
|
3472
3535
|
},
|
|
3473
3536
|
{
|
|
3474
3537
|
value: "inline-flex",
|
|
3475
|
-
renderContent: () =>
|
|
3476
|
-
label:
|
|
3538
|
+
renderContent: () => __21("In-flx", "elementor"),
|
|
3539
|
+
label: __21("Inline-flex", "elementor"),
|
|
3477
3540
|
showTooltip: true
|
|
3478
3541
|
}
|
|
3479
3542
|
];
|
|
3480
3543
|
var DisplayField = () => {
|
|
3481
3544
|
const placeholder = useDisplayPlaceholderValue();
|
|
3482
|
-
return /* @__PURE__ */
|
|
3545
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React43.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React43.createElement(ToggleControl5, { options: displayFieldItems, maxItems: 4, fullWidth: true })));
|
|
3483
3546
|
};
|
|
3484
3547
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3485
3548
|
|
|
3486
3549
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3487
|
-
import * as
|
|
3550
|
+
import * as React44 from "react";
|
|
3488
3551
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
3489
3552
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
3490
3553
|
import { withDirection as withDirection6 } from "@elementor/ui";
|
|
3491
|
-
import { __ as
|
|
3492
|
-
var FLEX_DIRECTION_LABEL2 =
|
|
3554
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
3555
|
+
var FLEX_DIRECTION_LABEL2 = __22("Direction", "elementor");
|
|
3493
3556
|
var options3 = [
|
|
3494
3557
|
{
|
|
3495
3558
|
value: "row",
|
|
3496
|
-
label:
|
|
3559
|
+
label: __22("Row", "elementor"),
|
|
3497
3560
|
renderContent: ({ size }) => {
|
|
3498
3561
|
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
3499
|
-
return /* @__PURE__ */
|
|
3562
|
+
return /* @__PURE__ */ React44.createElement(StartIcon5, { fontSize: size });
|
|
3500
3563
|
},
|
|
3501
3564
|
showTooltip: true
|
|
3502
3565
|
},
|
|
3503
3566
|
{
|
|
3504
3567
|
value: "column",
|
|
3505
|
-
label:
|
|
3506
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3568
|
+
label: __22("Column", "elementor"),
|
|
3569
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
3507
3570
|
showTooltip: true
|
|
3508
3571
|
},
|
|
3509
3572
|
{
|
|
3510
3573
|
value: "row-reverse",
|
|
3511
|
-
label:
|
|
3574
|
+
label: __22("Reversed row", "elementor"),
|
|
3512
3575
|
renderContent: ({ size }) => {
|
|
3513
3576
|
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
3514
|
-
return /* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ React44.createElement(EndIcon5, { fontSize: size });
|
|
3515
3578
|
},
|
|
3516
3579
|
showTooltip: true
|
|
3517
3580
|
},
|
|
3518
3581
|
{
|
|
3519
3582
|
value: "column-reverse",
|
|
3520
|
-
label:
|
|
3521
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3583
|
+
label: __22("Reversed column", "elementor"),
|
|
3584
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
3522
3585
|
showTooltip: true
|
|
3523
3586
|
}
|
|
3524
3587
|
];
|
|
3525
3588
|
var FlexDirectionField = () => {
|
|
3526
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React44.createElement(ToggleControl6, { options: options3 }))));
|
|
3527
3590
|
};
|
|
3528
3591
|
|
|
3529
3592
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3530
|
-
import * as
|
|
3593
|
+
import * as React45 from "react";
|
|
3531
3594
|
import { useEffect as useEffect4, useMemo as useMemo8, useState as useState7 } from "react";
|
|
3532
3595
|
import {
|
|
3533
3596
|
ControlToggleButtonGroup,
|
|
@@ -3536,8 +3599,8 @@ import {
|
|
|
3536
3599
|
} from "@elementor/editor-controls";
|
|
3537
3600
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
3538
3601
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
3539
|
-
import { __ as
|
|
3540
|
-
var ORDER_LABEL =
|
|
3602
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
3603
|
+
var ORDER_LABEL = __23("Order", "elementor");
|
|
3541
3604
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3542
3605
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3543
3606
|
var FIRST = "first";
|
|
@@ -3550,25 +3613,25 @@ var orderValueMap = {
|
|
|
3550
3613
|
var items = [
|
|
3551
3614
|
{
|
|
3552
3615
|
value: FIRST,
|
|
3553
|
-
label:
|
|
3554
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3616
|
+
label: __23("First", "elementor"),
|
|
3617
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
3555
3618
|
showTooltip: true
|
|
3556
3619
|
},
|
|
3557
3620
|
{
|
|
3558
3621
|
value: LAST,
|
|
3559
|
-
label:
|
|
3560
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3622
|
+
label: __23("Last", "elementor"),
|
|
3623
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
3561
3624
|
showTooltip: true
|
|
3562
3625
|
},
|
|
3563
3626
|
{
|
|
3564
3627
|
value: CUSTOM,
|
|
3565
|
-
label:
|
|
3566
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3628
|
+
label: __23("Custom", "elementor"),
|
|
3629
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PencilIcon, { fontSize: size }),
|
|
3567
3630
|
showTooltip: true
|
|
3568
3631
|
}
|
|
3569
3632
|
];
|
|
3570
3633
|
var FlexOrderField = () => {
|
|
3571
|
-
return /* @__PURE__ */
|
|
3634
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(SectionContent, null, /* @__PURE__ */ React45.createElement(FlexOrderFieldContent, null))));
|
|
3572
3635
|
};
|
|
3573
3636
|
function FlexOrderFieldContent() {
|
|
3574
3637
|
const {
|
|
@@ -3613,7 +3676,7 @@ function FlexOrderFieldContent() {
|
|
|
3613
3676
|
};
|
|
3614
3677
|
const isCustomVisible = CUSTOM === activeGroup || CUSTOM === groupPlaceholder;
|
|
3615
3678
|
const orderPlaceholder = CUSTOM === groupPlaceholder ? String(placeholderValue?.value ?? null) : "";
|
|
3616
|
-
return /* @__PURE__ */
|
|
3679
|
+
return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React45.createElement(
|
|
3617
3680
|
ControlToggleButtonGroup,
|
|
3618
3681
|
{
|
|
3619
3682
|
items,
|
|
@@ -3623,7 +3686,7 @@ function FlexOrderFieldContent() {
|
|
|
3623
3686
|
placeholder: groupPlaceholder,
|
|
3624
3687
|
disabled: !canEdit
|
|
3625
3688
|
}
|
|
3626
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
3689
|
+
)), isCustomVisible && /* @__PURE__ */ React45.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __23("Custom order", "elementor"))), /* @__PURE__ */ React45.createElement(Grid2, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React45.createElement(
|
|
3627
3690
|
NumberControl2,
|
|
3628
3691
|
{
|
|
3629
3692
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -3647,7 +3710,7 @@ var getGroupControlValue = (order) => {
|
|
|
3647
3710
|
};
|
|
3648
3711
|
|
|
3649
3712
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3650
|
-
import * as
|
|
3713
|
+
import * as React46 from "react";
|
|
3651
3714
|
import { useEffect as useEffect5, useMemo as useMemo9, useRef as useRef6, useState as useState8 } from "react";
|
|
3652
3715
|
import {
|
|
3653
3716
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
@@ -3659,31 +3722,31 @@ import {
|
|
|
3659
3722
|
} from "@elementor/editor-controls";
|
|
3660
3723
|
import { flexPropTypeUtil, numberPropTypeUtil as numberPropTypeUtil2, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
3661
3724
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
3662
|
-
import { __ as
|
|
3663
|
-
var FLEX_SIZE_LABEL =
|
|
3725
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
3726
|
+
var FLEX_SIZE_LABEL = __24("Flex Size", "elementor");
|
|
3664
3727
|
var DEFAULT = 1;
|
|
3665
3728
|
var items2 = [
|
|
3666
3729
|
{
|
|
3667
3730
|
value: "flex-grow",
|
|
3668
|
-
label:
|
|
3669
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3731
|
+
label: __24("Grow", "elementor"),
|
|
3732
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(ExpandIcon, { fontSize: size }),
|
|
3670
3733
|
showTooltip: true
|
|
3671
3734
|
},
|
|
3672
3735
|
{
|
|
3673
3736
|
value: "flex-shrink",
|
|
3674
|
-
label:
|
|
3675
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3737
|
+
label: __24("Shrink", "elementor"),
|
|
3738
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(ShrinkIcon, { fontSize: size }),
|
|
3676
3739
|
showTooltip: true
|
|
3677
3740
|
},
|
|
3678
3741
|
{
|
|
3679
3742
|
value: "custom",
|
|
3680
|
-
label:
|
|
3681
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3743
|
+
label: __24("Custom", "elementor"),
|
|
3744
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(PencilIcon2, { fontSize: size }),
|
|
3682
3745
|
showTooltip: true
|
|
3683
3746
|
}
|
|
3684
3747
|
];
|
|
3685
3748
|
var FlexSizeField = () => {
|
|
3686
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React46.createElement(FlexSizeFieldContent, null))));
|
|
3687
3750
|
};
|
|
3688
3751
|
var FlexSizeFieldContent = () => {
|
|
3689
3752
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
@@ -3712,7 +3775,7 @@ var FlexSizeFieldContent = () => {
|
|
|
3712
3775
|
};
|
|
3713
3776
|
const groupPlaceholder = getActiveGroup(extractFlexValues(placeholder));
|
|
3714
3777
|
const isCustomVisible = "custom" === activeGroup || "custom" === groupPlaceholder;
|
|
3715
|
-
return /* @__PURE__ */
|
|
3778
|
+
return /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React46.createElement(
|
|
3716
3779
|
ControlToggleButtonGroup2,
|
|
3717
3780
|
{
|
|
3718
3781
|
value: activeGroup ?? null,
|
|
@@ -3722,7 +3785,7 @@ var FlexSizeFieldContent = () => {
|
|
|
3722
3785
|
items: items2,
|
|
3723
3786
|
exclusive: true
|
|
3724
3787
|
}
|
|
3725
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
3788
|
+
)), isCustomVisible && /* @__PURE__ */ React46.createElement(FlexCustomField, null));
|
|
3726
3789
|
};
|
|
3727
3790
|
function extractFlexValues(source) {
|
|
3728
3791
|
return {
|
|
@@ -3764,7 +3827,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3764
3827
|
var FlexCustomField = () => {
|
|
3765
3828
|
const flexBasisRowRef = useRef6(null);
|
|
3766
3829
|
const context = useBoundProp3(flexPropTypeUtil);
|
|
3767
|
-
return /* @__PURE__ */
|
|
3830
|
+
return /* @__PURE__ */ React46.createElement(PropProvider3, { ...context }, /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: __24("Grow", "elementor") }, /* @__PURE__ */ React46.createElement(PropKeyProvider3, { bind: "flexGrow" }, /* @__PURE__ */ React46.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: __24("Shrink", "elementor") }, /* @__PURE__ */ React46.createElement(PropKeyProvider3, { bind: "flexShrink" }, /* @__PURE__ */ React46.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: __24("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React46.createElement(PropKeyProvider3, { bind: "flexBasis" }, /* @__PURE__ */ React46.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3768
3831
|
};
|
|
3769
3832
|
var getActiveGroup = ({
|
|
3770
3833
|
grow,
|
|
@@ -3788,16 +3851,16 @@ var getActiveGroup = ({
|
|
|
3788
3851
|
};
|
|
3789
3852
|
|
|
3790
3853
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3791
|
-
import * as
|
|
3854
|
+
import * as React47 from "react";
|
|
3792
3855
|
import { GapControl } from "@elementor/editor-controls";
|
|
3793
|
-
import { __ as
|
|
3794
|
-
var GAPS_LABEL =
|
|
3856
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
3857
|
+
var GAPS_LABEL = __25("Gaps", "elementor");
|
|
3795
3858
|
var GapControlField = () => {
|
|
3796
|
-
return /* @__PURE__ */
|
|
3859
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React47.createElement(GapControl, { label: GAPS_LABEL }));
|
|
3797
3860
|
};
|
|
3798
3861
|
|
|
3799
3862
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3800
|
-
import * as
|
|
3863
|
+
import * as React48 from "react";
|
|
3801
3864
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
3802
3865
|
import {
|
|
3803
3866
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -3808,8 +3871,8 @@ import {
|
|
|
3808
3871
|
JustifyTopIcon as JustifyTopIcon2
|
|
3809
3872
|
} from "@elementor/icons";
|
|
3810
3873
|
import { withDirection as withDirection7 } from "@elementor/ui";
|
|
3811
|
-
import { __ as
|
|
3812
|
-
var JUSTIFY_CONTENT_LABEL =
|
|
3874
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
3875
|
+
var JUSTIFY_CONTENT_LABEL = __26("Justify content", "elementor");
|
|
3813
3876
|
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
3814
3877
|
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
3815
3878
|
var iconProps4 = {
|
|
@@ -3819,76 +3882,76 @@ var iconProps4 = {
|
|
|
3819
3882
|
var options4 = [
|
|
3820
3883
|
{
|
|
3821
3884
|
value: "flex-start",
|
|
3822
|
-
label:
|
|
3823
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3885
|
+
label: __26("Start", "elementor"),
|
|
3886
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3824
3887
|
showTooltip: true
|
|
3825
3888
|
},
|
|
3826
3889
|
{
|
|
3827
3890
|
value: "center",
|
|
3828
|
-
label:
|
|
3829
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3891
|
+
label: __26("Center", "elementor"),
|
|
3892
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
3830
3893
|
showTooltip: true
|
|
3831
3894
|
},
|
|
3832
3895
|
{
|
|
3833
3896
|
value: "flex-end",
|
|
3834
|
-
label:
|
|
3835
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3897
|
+
label: __26("End", "elementor"),
|
|
3898
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3836
3899
|
showTooltip: true
|
|
3837
3900
|
},
|
|
3838
3901
|
{
|
|
3839
3902
|
value: "space-between",
|
|
3840
|
-
label:
|
|
3841
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3903
|
+
label: __26("Space between", "elementor"),
|
|
3904
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
3842
3905
|
showTooltip: true
|
|
3843
3906
|
},
|
|
3844
3907
|
{
|
|
3845
3908
|
value: "space-around",
|
|
3846
|
-
label:
|
|
3847
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3909
|
+
label: __26("Space around", "elementor"),
|
|
3910
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
3848
3911
|
showTooltip: true
|
|
3849
3912
|
},
|
|
3850
3913
|
{
|
|
3851
3914
|
value: "space-evenly",
|
|
3852
|
-
label:
|
|
3853
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3915
|
+
label: __26("Space evenly", "elementor"),
|
|
3916
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
3854
3917
|
showTooltip: true
|
|
3855
3918
|
}
|
|
3856
3919
|
];
|
|
3857
|
-
var JustifyContentField = () => /* @__PURE__ */
|
|
3920
|
+
var JustifyContentField = () => /* @__PURE__ */ React48.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React48.createElement(ToggleControl7, { options: options4, fullWidth: true }))));
|
|
3858
3921
|
|
|
3859
3922
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3860
|
-
import * as
|
|
3923
|
+
import * as React49 from "react";
|
|
3861
3924
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
3862
3925
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
3863
|
-
import { __ as
|
|
3864
|
-
var FLEX_WRAP_LABEL =
|
|
3926
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
3927
|
+
var FLEX_WRAP_LABEL = __27("Wrap", "elementor");
|
|
3865
3928
|
var options5 = [
|
|
3866
3929
|
{
|
|
3867
3930
|
value: "nowrap",
|
|
3868
|
-
label:
|
|
3869
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3931
|
+
label: __27("No wrap", "elementor"),
|
|
3932
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
3870
3933
|
showTooltip: true
|
|
3871
3934
|
},
|
|
3872
3935
|
{
|
|
3873
3936
|
value: "wrap",
|
|
3874
|
-
label:
|
|
3875
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3937
|
+
label: __27("Wrap", "elementor"),
|
|
3938
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowBackIcon, { fontSize: size }),
|
|
3876
3939
|
showTooltip: true
|
|
3877
3940
|
},
|
|
3878
3941
|
{
|
|
3879
3942
|
value: "wrap-reverse",
|
|
3880
|
-
label:
|
|
3881
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3943
|
+
label: __27("Reversed wrap", "elementor"),
|
|
3944
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
3882
3945
|
showTooltip: true
|
|
3883
3946
|
}
|
|
3884
3947
|
];
|
|
3885
3948
|
var WrapField = () => {
|
|
3886
|
-
return /* @__PURE__ */
|
|
3949
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React49.createElement(ToggleControl8, { options: options5 }))));
|
|
3887
3950
|
};
|
|
3888
3951
|
|
|
3889
3952
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3890
|
-
var DISPLAY_LABEL2 =
|
|
3891
|
-
var FLEX_WRAP_LABEL2 =
|
|
3953
|
+
var DISPLAY_LABEL2 = __28("Display", "elementor");
|
|
3954
|
+
var FLEX_WRAP_LABEL2 = __28("Flex wrap", "elementor");
|
|
3892
3955
|
var LayoutSection = () => {
|
|
3893
3956
|
const { value: display } = useStylesField("display", {
|
|
3894
3957
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
@@ -3899,15 +3962,15 @@ var LayoutSection = () => {
|
|
|
3899
3962
|
const parent = useParentElement(element.id);
|
|
3900
3963
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3901
3964
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3902
|
-
return /* @__PURE__ */
|
|
3965
|
+
return /* @__PURE__ */ React50.createElement(SectionContent, null, /* @__PURE__ */ React50.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React50.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React50.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3903
3966
|
};
|
|
3904
3967
|
var FlexFields = () => {
|
|
3905
3968
|
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
3906
3969
|
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
3907
3970
|
});
|
|
3908
|
-
return /* @__PURE__ */
|
|
3971
|
+
return /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(FlexDirectionField, null), /* @__PURE__ */ React50.createElement(JustifyContentField, null), /* @__PURE__ */ React50.createElement(AlignItemsField, null), /* @__PURE__ */ React50.createElement(PanelDivider, null), /* @__PURE__ */ React50.createElement(GapControlField, null), /* @__PURE__ */ React50.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React50.createElement(AlignContentField, null));
|
|
3909
3972
|
};
|
|
3910
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3973
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(PanelDivider, null), /* @__PURE__ */ React50.createElement(ControlFormLabel2, null, __28("Flex child", "elementor")), /* @__PURE__ */ React50.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React50.createElement(FlexOrderField, null), /* @__PURE__ */ React50.createElement(FlexSizeField, null));
|
|
3911
3974
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3912
3975
|
const value = display?.value ?? local?.value;
|
|
3913
3976
|
if (!value) {
|
|
@@ -3917,39 +3980,39 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3917
3980
|
};
|
|
3918
3981
|
|
|
3919
3982
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3920
|
-
import * as
|
|
3983
|
+
import * as React55 from "react";
|
|
3921
3984
|
import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef9 } from "react";
|
|
3922
|
-
import { useSessionStorage as
|
|
3923
|
-
import { __ as
|
|
3985
|
+
import { useSessionStorage as useSessionStorage4 } from "@elementor/session";
|
|
3986
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
3924
3987
|
|
|
3925
3988
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3926
|
-
import * as
|
|
3989
|
+
import * as React51 from "react";
|
|
3927
3990
|
import { useRef as useRef7 } from "react";
|
|
3928
3991
|
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
3929
3992
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
3930
3993
|
import { Grid as Grid3, Stack as Stack8, withDirection as withDirection8 } from "@elementor/ui";
|
|
3931
|
-
import { __ as
|
|
3994
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
3932
3995
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
3933
3996
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
3934
3997
|
var sideIcons = {
|
|
3935
|
-
"inset-block-start": /* @__PURE__ */
|
|
3936
|
-
"inset-block-end": /* @__PURE__ */
|
|
3937
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3938
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3998
|
+
"inset-block-start": /* @__PURE__ */ React51.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
3999
|
+
"inset-block-end": /* @__PURE__ */ React51.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
4000
|
+
"inset-inline-start": /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
4001
|
+
"inset-inline-end": /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3939
4002
|
};
|
|
3940
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
3941
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
4003
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __29("Right", "elementor") : __29("Left", "elementor");
|
|
4004
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __29("Left", "elementor") : __29("Right", "elementor");
|
|
3942
4005
|
var DimensionsField = () => {
|
|
3943
4006
|
const { isSiteRtl } = useDirection();
|
|
3944
4007
|
const rowRefs = [useRef7(null), useRef7(null)];
|
|
3945
|
-
return /* @__PURE__ */
|
|
4008
|
+
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React51.createElement(DimensionField, { side: "inset-block-start", label: __29("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React51.createElement(
|
|
3946
4009
|
DimensionField,
|
|
3947
4010
|
{
|
|
3948
4011
|
side: "inset-inline-end",
|
|
3949
4012
|
label: getInlineEndLabel(isSiteRtl),
|
|
3950
4013
|
rowRef: rowRefs[0]
|
|
3951
4014
|
}
|
|
3952
|
-
)), /* @__PURE__ */
|
|
4015
|
+
)), /* @__PURE__ */ React51.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React51.createElement(DimensionField, { side: "inset-block-end", label: __29("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React51.createElement(
|
|
3953
4016
|
DimensionField,
|
|
3954
4017
|
{
|
|
3955
4018
|
side: "inset-inline-start",
|
|
@@ -3962,7 +4025,7 @@ var DimensionField = ({
|
|
|
3962
4025
|
side,
|
|
3963
4026
|
label,
|
|
3964
4027
|
rowRef
|
|
3965
|
-
}) => /* @__PURE__ */
|
|
4028
|
+
}) => /* @__PURE__ */ React51.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React51.createElement(Grid3, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React51.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, label)), /* @__PURE__ */ React51.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React51.createElement(
|
|
3966
4029
|
SizeControl4,
|
|
3967
4030
|
{
|
|
3968
4031
|
startIcon: sideIcons[side],
|
|
@@ -3973,46 +4036,46 @@ var DimensionField = ({
|
|
|
3973
4036
|
))));
|
|
3974
4037
|
|
|
3975
4038
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3976
|
-
import * as
|
|
4039
|
+
import * as React52 from "react";
|
|
3977
4040
|
import { useRef as useRef8 } from "react";
|
|
3978
4041
|
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
3979
|
-
import { __ as
|
|
3980
|
-
var OFFSET_LABEL =
|
|
4042
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
4043
|
+
var OFFSET_LABEL = __30("Anchor offset", "elementor");
|
|
3981
4044
|
var UNITS = ["px", "em", "rem", "vw", "vh"];
|
|
3982
4045
|
var OffsetField = () => {
|
|
3983
4046
|
const rowRef = useRef8(null);
|
|
3984
|
-
return /* @__PURE__ */
|
|
4047
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React52.createElement(SizeControl5, { units: UNITS, anchorRef: rowRef })));
|
|
3985
4048
|
};
|
|
3986
4049
|
|
|
3987
4050
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3988
|
-
import * as
|
|
4051
|
+
import * as React53 from "react";
|
|
3989
4052
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
3990
|
-
import { __ as
|
|
3991
|
-
var POSITION_LABEL =
|
|
4053
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
4054
|
+
var POSITION_LABEL = __31("Position", "elementor");
|
|
3992
4055
|
var positionOptions = [
|
|
3993
|
-
{ label:
|
|
3994
|
-
{ label:
|
|
3995
|
-
{ label:
|
|
3996
|
-
{ label:
|
|
3997
|
-
{ label:
|
|
4056
|
+
{ label: __31("Static", "elementor"), value: "static" },
|
|
4057
|
+
{ label: __31("Relative", "elementor"), value: "relative" },
|
|
4058
|
+
{ label: __31("Absolute", "elementor"), value: "absolute" },
|
|
4059
|
+
{ label: __31("Fixed", "elementor"), value: "fixed" },
|
|
4060
|
+
{ label: __31("Sticky", "elementor"), value: "sticky" }
|
|
3998
4061
|
];
|
|
3999
4062
|
var PositionField = ({ onChange }) => {
|
|
4000
|
-
return /* @__PURE__ */
|
|
4063
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React53.createElement(SelectControl3, { options: positionOptions, onChange })));
|
|
4001
4064
|
};
|
|
4002
4065
|
|
|
4003
4066
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
4004
|
-
import * as
|
|
4067
|
+
import * as React54 from "react";
|
|
4005
4068
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
4006
|
-
import { __ as
|
|
4007
|
-
var Z_INDEX_LABEL =
|
|
4069
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
4070
|
+
var Z_INDEX_LABEL = __32("Z-index", "elementor");
|
|
4008
4071
|
var ZIndexField = () => {
|
|
4009
|
-
return /* @__PURE__ */
|
|
4072
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React54.createElement(NumberControl4, null)));
|
|
4010
4073
|
};
|
|
4011
4074
|
|
|
4012
4075
|
// src/components/style-sections/position-section/position-section.tsx
|
|
4013
4076
|
var POSITION_STATIC = "static";
|
|
4014
|
-
var POSITION_LABEL2 =
|
|
4015
|
-
var DIMENSIONS_LABEL =
|
|
4077
|
+
var POSITION_LABEL2 = __33("Position", "elementor");
|
|
4078
|
+
var DIMENSIONS_LABEL = __33("Dimensions", "elementor");
|
|
4016
4079
|
var POSITION_DEPENDENT_PROP_NAMES = [
|
|
4017
4080
|
"inset-block-start",
|
|
4018
4081
|
"inset-block-end",
|
|
@@ -4069,36 +4132,36 @@ var PositionSection = () => {
|
|
|
4069
4132
|
}
|
|
4070
4133
|
};
|
|
4071
4134
|
const isNotStatic = positionValue && positionValue?.value !== POSITION_STATIC;
|
|
4072
|
-
return /* @__PURE__ */
|
|
4135
|
+
return /* @__PURE__ */ React55.createElement(SectionContent, null, /* @__PURE__ */ React55.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(DimensionsField, null), /* @__PURE__ */ React55.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(OffsetField, null));
|
|
4073
4136
|
};
|
|
4074
4137
|
var usePersistDimensions = () => {
|
|
4075
4138
|
const { id: styleDefID, meta } = useStyle();
|
|
4076
4139
|
const styleVariantPath = `styles/${styleDefID}/${meta.breakpoint || "desktop"}/${meta.state || "null"}`;
|
|
4077
4140
|
const dimensionsPath = `${styleVariantPath}/dimensions`;
|
|
4078
|
-
return
|
|
4141
|
+
return useSessionStorage4(dimensionsPath);
|
|
4079
4142
|
};
|
|
4080
4143
|
|
|
4081
4144
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4082
|
-
import * as
|
|
4145
|
+
import * as React60 from "react";
|
|
4083
4146
|
import { useRef as useRef10 } from "react";
|
|
4084
4147
|
import { AspectRatioControl, PositionControl, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
4085
4148
|
import { Grid as Grid4, Stack as Stack10 } from "@elementor/ui";
|
|
4086
|
-
import { __ as
|
|
4149
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
4087
4150
|
|
|
4088
4151
|
// src/components/style-tab-collapsible-content.tsx
|
|
4089
|
-
import * as
|
|
4152
|
+
import * as React57 from "react";
|
|
4090
4153
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
4091
4154
|
|
|
4092
4155
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
4093
|
-
import * as
|
|
4156
|
+
import * as React56 from "react";
|
|
4094
4157
|
import { isElementsStylesProvider as isElementsStylesProvider6 } from "@elementor/editor-styles-repository";
|
|
4095
4158
|
import { Stack as Stack9, Tooltip } from "@elementor/ui";
|
|
4096
|
-
import { __ as
|
|
4159
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
4097
4160
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
4098
4161
|
const { id, meta, provider } = useStyle();
|
|
4099
4162
|
const snapshot = useStylesInheritanceSnapshot();
|
|
4100
4163
|
if (fields.includes("custom_css")) {
|
|
4101
|
-
return /* @__PURE__ */
|
|
4164
|
+
return /* @__PURE__ */ React56.createElement(CustomCssIndicator, null);
|
|
4102
4165
|
}
|
|
4103
4166
|
const snapshotFields = Object.fromEntries(
|
|
4104
4167
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
@@ -4107,9 +4170,9 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4107
4170
|
if (!hasValues && !hasOverrides) {
|
|
4108
4171
|
return null;
|
|
4109
4172
|
}
|
|
4110
|
-
const hasValueLabel =
|
|
4111
|
-
const hasOverridesLabel =
|
|
4112
|
-
return /* @__PURE__ */
|
|
4173
|
+
const hasValueLabel = __34("Has effective styles", "elementor");
|
|
4174
|
+
const hasOverridesLabel = __34("Has overridden styles", "elementor");
|
|
4175
|
+
return /* @__PURE__ */ React56.createElement(Tooltip, { title: __34("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React56.createElement(Stack9, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React56.createElement(
|
|
4113
4176
|
StyleIndicator,
|
|
4114
4177
|
{
|
|
4115
4178
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
@@ -4117,7 +4180,7 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4117
4180
|
role: "listitem",
|
|
4118
4181
|
"aria-label": hasValueLabel
|
|
4119
4182
|
}
|
|
4120
|
-
), hasOverrides && /* @__PURE__ */
|
|
4183
|
+
), hasOverrides && /* @__PURE__ */ React56.createElement(
|
|
4121
4184
|
StyleIndicator,
|
|
4122
4185
|
{
|
|
4123
4186
|
isOverridden: true,
|
|
@@ -4157,59 +4220,59 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
4157
4220
|
|
|
4158
4221
|
// src/components/style-tab-collapsible-content.tsx
|
|
4159
4222
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
4160
|
-
return /* @__PURE__ */
|
|
4223
|
+
return /* @__PURE__ */ React57.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
4161
4224
|
};
|
|
4162
4225
|
function getStylesInheritanceIndicators(fields) {
|
|
4163
4226
|
if (fields.length === 0) {
|
|
4164
4227
|
return null;
|
|
4165
4228
|
}
|
|
4166
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
4229
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React57.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
4167
4230
|
}
|
|
4168
4231
|
|
|
4169
4232
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
4170
|
-
import * as
|
|
4233
|
+
import * as React58 from "react";
|
|
4171
4234
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
4172
|
-
import { __ as
|
|
4173
|
-
var OBJECT_FIT_LABEL =
|
|
4235
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
4236
|
+
var OBJECT_FIT_LABEL = __35("Object fit", "elementor");
|
|
4174
4237
|
var positionOptions2 = [
|
|
4175
|
-
{ label:
|
|
4176
|
-
{ label:
|
|
4177
|
-
{ label:
|
|
4178
|
-
{ label:
|
|
4179
|
-
{ label:
|
|
4238
|
+
{ label: __35("Fill", "elementor"), value: "fill" },
|
|
4239
|
+
{ label: __35("Cover", "elementor"), value: "cover" },
|
|
4240
|
+
{ label: __35("Contain", "elementor"), value: "contain" },
|
|
4241
|
+
{ label: __35("None", "elementor"), value: "none" },
|
|
4242
|
+
{ label: __35("Scale down", "elementor"), value: "scale-down" }
|
|
4180
4243
|
];
|
|
4181
4244
|
var ObjectFitField = () => {
|
|
4182
|
-
return /* @__PURE__ */
|
|
4245
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React58.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React58.createElement(SelectControl4, { options: positionOptions2 })));
|
|
4183
4246
|
};
|
|
4184
4247
|
|
|
4185
4248
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
4186
|
-
import * as
|
|
4249
|
+
import * as React59 from "react";
|
|
4187
4250
|
import { ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
4188
4251
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
4189
|
-
import { __ as
|
|
4190
|
-
var OVERFLOW_LABEL =
|
|
4252
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
4253
|
+
var OVERFLOW_LABEL = __36("Overflow", "elementor");
|
|
4191
4254
|
var options6 = [
|
|
4192
4255
|
{
|
|
4193
4256
|
value: "visible",
|
|
4194
|
-
label:
|
|
4195
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4257
|
+
label: __36("Visible", "elementor"),
|
|
4258
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(EyeIcon, { fontSize: size }),
|
|
4196
4259
|
showTooltip: true
|
|
4197
4260
|
},
|
|
4198
4261
|
{
|
|
4199
4262
|
value: "hidden",
|
|
4200
|
-
label:
|
|
4201
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4263
|
+
label: __36("Hidden", "elementor"),
|
|
4264
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(EyeOffIcon, { fontSize: size }),
|
|
4202
4265
|
showTooltip: true
|
|
4203
4266
|
},
|
|
4204
4267
|
{
|
|
4205
4268
|
value: "auto",
|
|
4206
|
-
label:
|
|
4207
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4269
|
+
label: __36("Auto", "elementor"),
|
|
4270
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(LetterAIcon, { fontSize: size }),
|
|
4208
4271
|
showTooltip: true
|
|
4209
4272
|
}
|
|
4210
4273
|
];
|
|
4211
4274
|
var OverflowField = () => {
|
|
4212
|
-
return /* @__PURE__ */
|
|
4275
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React59.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React59.createElement(ToggleControl9, { options: options6 })));
|
|
4213
4276
|
};
|
|
4214
4277
|
|
|
4215
4278
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -4217,52 +4280,52 @@ var CssSizeProps = [
|
|
|
4217
4280
|
[
|
|
4218
4281
|
{
|
|
4219
4282
|
bind: "width",
|
|
4220
|
-
label:
|
|
4283
|
+
label: __37("Width", "elementor")
|
|
4221
4284
|
},
|
|
4222
4285
|
{
|
|
4223
4286
|
bind: "height",
|
|
4224
|
-
label:
|
|
4287
|
+
label: __37("Height", "elementor")
|
|
4225
4288
|
}
|
|
4226
4289
|
],
|
|
4227
4290
|
[
|
|
4228
4291
|
{
|
|
4229
4292
|
bind: "min-width",
|
|
4230
|
-
label:
|
|
4293
|
+
label: __37("Min width", "elementor")
|
|
4231
4294
|
},
|
|
4232
4295
|
{
|
|
4233
4296
|
bind: "min-height",
|
|
4234
|
-
label:
|
|
4297
|
+
label: __37("Min height", "elementor")
|
|
4235
4298
|
}
|
|
4236
4299
|
],
|
|
4237
4300
|
[
|
|
4238
4301
|
{
|
|
4239
4302
|
bind: "max-width",
|
|
4240
|
-
label:
|
|
4303
|
+
label: __37("Max width", "elementor")
|
|
4241
4304
|
},
|
|
4242
4305
|
{
|
|
4243
4306
|
bind: "max-height",
|
|
4244
|
-
label:
|
|
4307
|
+
label: __37("Max height", "elementor")
|
|
4245
4308
|
}
|
|
4246
4309
|
]
|
|
4247
4310
|
];
|
|
4248
|
-
var ASPECT_RATIO_LABEL =
|
|
4311
|
+
var ASPECT_RATIO_LABEL = __37("Aspect Ratio", "elementor");
|
|
4249
4312
|
var SizeSection = () => {
|
|
4250
4313
|
const gridRowRefs = [useRef10(null), useRef10(null), useRef10(null)];
|
|
4251
|
-
return /* @__PURE__ */
|
|
4314
|
+
return /* @__PURE__ */ React60.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React60.createElement(Grid4, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React60.createElement(Grid4, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React60.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(Stack10, null, /* @__PURE__ */ React60.createElement(OverflowField, null)), /* @__PURE__ */ React60.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React60.createElement(Stack10, { gap: 2, pt: 2 }, /* @__PURE__ */ React60.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React60.createElement(AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(ObjectFitField, null), /* @__PURE__ */ React60.createElement(StylesField, { bind: "object-position", propDisplayName: __37("Object position", "elementor") }, /* @__PURE__ */ React60.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(PositionControl, null))))));
|
|
4252
4315
|
};
|
|
4253
4316
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
4254
|
-
return /* @__PURE__ */
|
|
4317
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React60.createElement(Grid4, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React60.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, label)), /* @__PURE__ */ React60.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React60.createElement(SizeControl6, { extendedOptions, anchorRef: rowRef }))));
|
|
4255
4318
|
};
|
|
4256
4319
|
|
|
4257
4320
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
4258
|
-
import * as
|
|
4321
|
+
import * as React61 from "react";
|
|
4259
4322
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
4260
|
-
import { __ as
|
|
4261
|
-
var MARGIN_LABEL =
|
|
4262
|
-
var PADDING_LABEL =
|
|
4323
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
4324
|
+
var MARGIN_LABEL = __38("Margin", "elementor");
|
|
4325
|
+
var PADDING_LABEL = __38("Padding", "elementor");
|
|
4263
4326
|
var SpacingSection = () => {
|
|
4264
4327
|
const { isSiteRtl } = useDirection();
|
|
4265
|
-
return /* @__PURE__ */
|
|
4328
|
+
return /* @__PURE__ */ React61.createElement(SectionContent, null, /* @__PURE__ */ React61.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React61.createElement(
|
|
4266
4329
|
LinkedDimensionsControl,
|
|
4267
4330
|
{
|
|
4268
4331
|
label: MARGIN_LABEL,
|
|
@@ -4270,45 +4333,45 @@ var SpacingSection = () => {
|
|
|
4270
4333
|
extendedOptions: ["auto"],
|
|
4271
4334
|
min: -Number.MAX_SAFE_INTEGER
|
|
4272
4335
|
}
|
|
4273
|
-
)), /* @__PURE__ */
|
|
4336
|
+
)), /* @__PURE__ */ React61.createElement(PanelDivider, null), /* @__PURE__ */ React61.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React61.createElement(LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
4274
4337
|
};
|
|
4275
4338
|
|
|
4276
4339
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4277
|
-
import * as
|
|
4340
|
+
import * as React78 from "react";
|
|
4278
4341
|
|
|
4279
4342
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
4280
|
-
import * as
|
|
4343
|
+
import * as React62 from "react";
|
|
4281
4344
|
import { NumberControl as NumberControl5 } from "@elementor/editor-controls";
|
|
4282
|
-
import { __ as
|
|
4283
|
-
var COLUMN_COUNT_LABEL =
|
|
4345
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
4346
|
+
var COLUMN_COUNT_LABEL = __39("Columns", "elementor");
|
|
4284
4347
|
var ColumnCountField = () => {
|
|
4285
|
-
return /* @__PURE__ */
|
|
4348
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React62.createElement(NumberControl5, { shouldForceInt: true, min: 0, step: 1 })));
|
|
4286
4349
|
};
|
|
4287
4350
|
|
|
4288
4351
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4289
|
-
import * as
|
|
4352
|
+
import * as React63 from "react";
|
|
4290
4353
|
import { useRef as useRef11 } from "react";
|
|
4291
4354
|
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
4292
|
-
import { __ as
|
|
4293
|
-
var COLUMN_GAP_LABEL =
|
|
4355
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
4356
|
+
var COLUMN_GAP_LABEL = __40("Column gap", "elementor");
|
|
4294
4357
|
var ColumnGapField = () => {
|
|
4295
4358
|
const rowRef = useRef11(null);
|
|
4296
|
-
return /* @__PURE__ */
|
|
4359
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React63.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React63.createElement(SizeControl7, { anchorRef: rowRef })));
|
|
4297
4360
|
};
|
|
4298
4361
|
|
|
4299
4362
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
4300
|
-
import * as
|
|
4363
|
+
import * as React64 from "react";
|
|
4301
4364
|
import { FontFamilyControl, useFontFamilies } from "@elementor/editor-controls";
|
|
4302
4365
|
import { useSectionWidth } from "@elementor/editor-ui";
|
|
4303
|
-
import { __ as
|
|
4304
|
-
var FONT_FAMILY_LABEL =
|
|
4366
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
4367
|
+
var FONT_FAMILY_LABEL = __41("Font family", "elementor");
|
|
4305
4368
|
var FontFamilyField = () => {
|
|
4306
4369
|
const fontFamilies = useFontFamilies();
|
|
4307
4370
|
const sectionWidth = useSectionWidth();
|
|
4308
4371
|
if (fontFamilies.length === 0) {
|
|
4309
4372
|
return null;
|
|
4310
4373
|
}
|
|
4311
|
-
return /* @__PURE__ */
|
|
4374
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React64.createElement(
|
|
4312
4375
|
FontFamilyControl,
|
|
4313
4376
|
{
|
|
4314
4377
|
fontFamilies,
|
|
@@ -4319,196 +4382,196 @@ var FontFamilyField = () => {
|
|
|
4319
4382
|
};
|
|
4320
4383
|
|
|
4321
4384
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4322
|
-
import * as
|
|
4385
|
+
import * as React65 from "react";
|
|
4323
4386
|
import { useRef as useRef12 } from "react";
|
|
4324
4387
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
4325
|
-
import { __ as
|
|
4326
|
-
var FONT_SIZE_LABEL =
|
|
4388
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
4389
|
+
var FONT_SIZE_LABEL = __42("Font size", "elementor");
|
|
4327
4390
|
var FontSizeField = () => {
|
|
4328
4391
|
const rowRef = useRef12(null);
|
|
4329
|
-
return /* @__PURE__ */
|
|
4392
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React65.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React65.createElement(SizeControl8, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4330
4393
|
};
|
|
4331
4394
|
|
|
4332
4395
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
4333
|
-
import * as
|
|
4396
|
+
import * as React66 from "react";
|
|
4334
4397
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
4335
4398
|
import { ItalicIcon, MinusIcon } from "@elementor/icons";
|
|
4336
|
-
import { __ as
|
|
4337
|
-
var FONT_STYLE_LABEL =
|
|
4399
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
4400
|
+
var FONT_STYLE_LABEL = __43("Font style", "elementor");
|
|
4338
4401
|
var options7 = [
|
|
4339
4402
|
{
|
|
4340
4403
|
value: "normal",
|
|
4341
|
-
label:
|
|
4342
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4404
|
+
label: __43("Normal", "elementor"),
|
|
4405
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(MinusIcon, { fontSize: size }),
|
|
4343
4406
|
showTooltip: true
|
|
4344
4407
|
},
|
|
4345
4408
|
{
|
|
4346
4409
|
value: "italic",
|
|
4347
|
-
label:
|
|
4348
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4410
|
+
label: __43("Italic", "elementor"),
|
|
4411
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(ItalicIcon, { fontSize: size }),
|
|
4349
4412
|
showTooltip: true
|
|
4350
4413
|
}
|
|
4351
4414
|
];
|
|
4352
4415
|
var FontStyleField = () => {
|
|
4353
|
-
return /* @__PURE__ */
|
|
4416
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React66.createElement(ToggleControl10, { options: options7 })));
|
|
4354
4417
|
};
|
|
4355
4418
|
|
|
4356
4419
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
4357
|
-
import * as
|
|
4420
|
+
import * as React67 from "react";
|
|
4358
4421
|
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
4359
|
-
import { __ as
|
|
4360
|
-
var FONT_WEIGHT_LABEL =
|
|
4422
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
4423
|
+
var FONT_WEIGHT_LABEL = __44("Font weight", "elementor");
|
|
4361
4424
|
var fontWeightOptions = [
|
|
4362
|
-
{ value: "100", label:
|
|
4363
|
-
{ value: "200", label:
|
|
4364
|
-
{ value: "300", label:
|
|
4365
|
-
{ value: "400", label:
|
|
4366
|
-
{ value: "500", label:
|
|
4367
|
-
{ value: "600", label:
|
|
4368
|
-
{ value: "700", label:
|
|
4369
|
-
{ value: "800", label:
|
|
4370
|
-
{ value: "900", label:
|
|
4425
|
+
{ value: "100", label: __44("100 - Thin", "elementor") },
|
|
4426
|
+
{ value: "200", label: __44("200 - Extra light", "elementor") },
|
|
4427
|
+
{ value: "300", label: __44("300 - Light", "elementor") },
|
|
4428
|
+
{ value: "400", label: __44("400 - Normal", "elementor") },
|
|
4429
|
+
{ value: "500", label: __44("500 - Medium", "elementor") },
|
|
4430
|
+
{ value: "600", label: __44("600 - Semi bold", "elementor") },
|
|
4431
|
+
{ value: "700", label: __44("700 - Bold", "elementor") },
|
|
4432
|
+
{ value: "800", label: __44("800 - Extra bold", "elementor") },
|
|
4433
|
+
{ value: "900", label: __44("900 - Black", "elementor") }
|
|
4371
4434
|
];
|
|
4372
4435
|
var FontWeightField = () => {
|
|
4373
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React67.createElement(SelectControl5, { options: fontWeightOptions })));
|
|
4374
4437
|
};
|
|
4375
4438
|
|
|
4376
4439
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4377
|
-
import * as
|
|
4440
|
+
import * as React68 from "react";
|
|
4378
4441
|
import { useRef as useRef13 } from "react";
|
|
4379
4442
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
4380
|
-
import { __ as
|
|
4381
|
-
var LETTER_SPACING_LABEL =
|
|
4443
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
4444
|
+
var LETTER_SPACING_LABEL = __45("Letter spacing", "elementor");
|
|
4382
4445
|
var LetterSpacingField = () => {
|
|
4383
4446
|
const rowRef = useRef13(null);
|
|
4384
|
-
return /* @__PURE__ */
|
|
4447
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(SizeControl9, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4385
4448
|
};
|
|
4386
4449
|
|
|
4387
4450
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4388
|
-
import * as
|
|
4451
|
+
import * as React69 from "react";
|
|
4389
4452
|
import { useRef as useRef14 } from "react";
|
|
4390
4453
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
4391
|
-
import { __ as
|
|
4392
|
-
var LINE_HEIGHT_LABEL =
|
|
4454
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
4455
|
+
var LINE_HEIGHT_LABEL = __46("Line height", "elementor");
|
|
4393
4456
|
var LineHeightField = () => {
|
|
4394
4457
|
const rowRef = useRef14(null);
|
|
4395
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React69.createElement(SizeControl10, { anchorRef: rowRef })));
|
|
4396
4459
|
};
|
|
4397
4460
|
|
|
4398
4461
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
4399
|
-
import * as
|
|
4462
|
+
import * as React70 from "react";
|
|
4400
4463
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
4401
4464
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
4402
4465
|
import { withDirection as withDirection9 } from "@elementor/ui";
|
|
4403
|
-
import { __ as
|
|
4404
|
-
var TEXT_ALIGNMENT_LABEL =
|
|
4466
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
4467
|
+
var TEXT_ALIGNMENT_LABEL = __47("Text align", "elementor");
|
|
4405
4468
|
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
4406
4469
|
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
4407
4470
|
var options8 = [
|
|
4408
4471
|
{
|
|
4409
4472
|
value: "start",
|
|
4410
|
-
label:
|
|
4411
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4473
|
+
label: __47("Start", "elementor"),
|
|
4474
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignStartIcon, { fontSize: size }),
|
|
4412
4475
|
showTooltip: true
|
|
4413
4476
|
},
|
|
4414
4477
|
{
|
|
4415
4478
|
value: "center",
|
|
4416
|
-
label:
|
|
4417
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4479
|
+
label: __47("Center", "elementor"),
|
|
4480
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignCenterIcon, { fontSize: size }),
|
|
4418
4481
|
showTooltip: true
|
|
4419
4482
|
},
|
|
4420
4483
|
{
|
|
4421
4484
|
value: "end",
|
|
4422
|
-
label:
|
|
4423
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4485
|
+
label: __47("End", "elementor"),
|
|
4486
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignEndIcon, { fontSize: size }),
|
|
4424
4487
|
showTooltip: true
|
|
4425
4488
|
},
|
|
4426
4489
|
{
|
|
4427
4490
|
value: "justify",
|
|
4428
|
-
label:
|
|
4429
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4491
|
+
label: __47("Justify", "elementor"),
|
|
4492
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
4430
4493
|
showTooltip: true
|
|
4431
4494
|
}
|
|
4432
4495
|
];
|
|
4433
4496
|
var TextAlignmentField = () => {
|
|
4434
|
-
return /* @__PURE__ */
|
|
4497
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React70.createElement(UiProviders, null, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React70.createElement(ToggleControl11, { options: options8 }))));
|
|
4435
4498
|
};
|
|
4436
4499
|
|
|
4437
4500
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
4438
|
-
import * as
|
|
4501
|
+
import * as React71 from "react";
|
|
4439
4502
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
4440
|
-
import { __ as
|
|
4441
|
-
var TEXT_COLOR_LABEL =
|
|
4503
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
4504
|
+
var TEXT_COLOR_LABEL = __48("Text color", "elementor");
|
|
4442
4505
|
var TextColorField = () => {
|
|
4443
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React71.createElement(ColorControl2, { id: "text-color-control" })));
|
|
4444
4507
|
};
|
|
4445
4508
|
|
|
4446
4509
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
4447
|
-
import * as
|
|
4510
|
+
import * as React72 from "react";
|
|
4448
4511
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
4449
4512
|
import { MinusIcon as MinusIcon2, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
4450
|
-
import { __ as
|
|
4451
|
-
var TEXT_DECORATION_LABEL =
|
|
4513
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
4514
|
+
var TEXT_DECORATION_LABEL = __49("Line decoration", "elementor");
|
|
4452
4515
|
var options9 = [
|
|
4453
4516
|
{
|
|
4454
4517
|
value: "none",
|
|
4455
|
-
label:
|
|
4456
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4518
|
+
label: __49("None", "elementor"),
|
|
4519
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(MinusIcon2, { fontSize: size }),
|
|
4457
4520
|
showTooltip: true,
|
|
4458
4521
|
exclusive: true
|
|
4459
4522
|
},
|
|
4460
4523
|
{
|
|
4461
4524
|
value: "underline",
|
|
4462
|
-
label:
|
|
4463
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4525
|
+
label: __49("Underline", "elementor"),
|
|
4526
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(UnderlineIcon, { fontSize: size }),
|
|
4464
4527
|
showTooltip: true
|
|
4465
4528
|
},
|
|
4466
4529
|
{
|
|
4467
4530
|
value: "line-through",
|
|
4468
|
-
label:
|
|
4469
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4531
|
+
label: __49("Line-through", "elementor"),
|
|
4532
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(StrikethroughIcon, { fontSize: size }),
|
|
4470
4533
|
showTooltip: true
|
|
4471
4534
|
},
|
|
4472
4535
|
{
|
|
4473
4536
|
value: "overline",
|
|
4474
|
-
label:
|
|
4475
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4537
|
+
label: __49("Overline", "elementor"),
|
|
4538
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(OverlineIcon, { fontSize: size }),
|
|
4476
4539
|
showTooltip: true
|
|
4477
4540
|
}
|
|
4478
4541
|
];
|
|
4479
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
4542
|
+
var TextDecorationField = () => /* @__PURE__ */ React72.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React72.createElement(ToggleControl12, { options: options9, exclusive: false })));
|
|
4480
4543
|
|
|
4481
4544
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
4482
|
-
import * as
|
|
4545
|
+
import * as React73 from "react";
|
|
4483
4546
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
4484
4547
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
4485
|
-
import { __ as
|
|
4486
|
-
var TEXT_DIRECTION_LABEL =
|
|
4548
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
4549
|
+
var TEXT_DIRECTION_LABEL = __50("Direction", "elementor");
|
|
4487
4550
|
var options10 = [
|
|
4488
4551
|
{
|
|
4489
4552
|
value: "ltr",
|
|
4490
|
-
label:
|
|
4491
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4553
|
+
label: __50("Left to right", "elementor"),
|
|
4554
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
4492
4555
|
showTooltip: true
|
|
4493
4556
|
},
|
|
4494
4557
|
{
|
|
4495
4558
|
value: "rtl",
|
|
4496
|
-
label:
|
|
4497
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4559
|
+
label: __50("Right to left", "elementor"),
|
|
4560
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
4498
4561
|
showTooltip: true
|
|
4499
4562
|
}
|
|
4500
4563
|
];
|
|
4501
4564
|
var TextDirectionField = () => {
|
|
4502
|
-
return /* @__PURE__ */
|
|
4565
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React73.createElement(ToggleControl13, { options: options10 })));
|
|
4503
4566
|
};
|
|
4504
4567
|
|
|
4505
4568
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
4506
|
-
import * as
|
|
4569
|
+
import * as React75 from "react";
|
|
4507
4570
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
4508
|
-
import { __ as
|
|
4571
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
4509
4572
|
|
|
4510
4573
|
// src/components/add-or-remove-content.tsx
|
|
4511
|
-
import * as
|
|
4574
|
+
import * as React74 from "react";
|
|
4512
4575
|
import { MinusIcon as MinusIcon3, PlusIcon } from "@elementor/icons";
|
|
4513
4576
|
import { Collapse as Collapse2, IconButton, Stack as Stack11 } from "@elementor/ui";
|
|
4514
4577
|
var SIZE = "tiny";
|
|
@@ -4520,7 +4583,7 @@ var AddOrRemoveContent = ({
|
|
|
4520
4583
|
disabled,
|
|
4521
4584
|
renderLabel
|
|
4522
4585
|
}) => {
|
|
4523
|
-
return /* @__PURE__ */
|
|
4586
|
+
return /* @__PURE__ */ React74.createElement(SectionContent, null, /* @__PURE__ */ React74.createElement(
|
|
4524
4587
|
Stack11,
|
|
4525
4588
|
{
|
|
4526
4589
|
direction: "row",
|
|
@@ -4531,8 +4594,8 @@ var AddOrRemoveContent = ({
|
|
|
4531
4594
|
}
|
|
4532
4595
|
},
|
|
4533
4596
|
renderLabel(),
|
|
4534
|
-
isAdded ? /* @__PURE__ */
|
|
4535
|
-
), /* @__PURE__ */
|
|
4597
|
+
isAdded ? /* @__PURE__ */ React74.createElement(IconButton, { size: SIZE, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React74.createElement(MinusIcon3, { fontSize: SIZE })) : /* @__PURE__ */ React74.createElement(IconButton, { size: SIZE, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React74.createElement(PlusIcon, { fontSize: SIZE }))
|
|
4598
|
+
), /* @__PURE__ */ React74.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React74.createElement(SectionContent, null, children)));
|
|
4536
4599
|
};
|
|
4537
4600
|
|
|
4538
4601
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
@@ -4552,7 +4615,7 @@ var initTextStroke = {
|
|
|
4552
4615
|
}
|
|
4553
4616
|
}
|
|
4554
4617
|
};
|
|
4555
|
-
var TEXT_STROKE_LABEL =
|
|
4618
|
+
var TEXT_STROKE_LABEL = __51("Text stroke", "elementor");
|
|
4556
4619
|
var TextStrokeField = () => {
|
|
4557
4620
|
const { value, setValue, canEdit } = useStylesField("stroke", {
|
|
4558
4621
|
history: { propDisplayName: TEXT_STROKE_LABEL }
|
|
@@ -4564,67 +4627,67 @@ var TextStrokeField = () => {
|
|
|
4564
4627
|
setValue(null);
|
|
4565
4628
|
};
|
|
4566
4629
|
const hasTextStroke = Boolean(value);
|
|
4567
|
-
return /* @__PURE__ */
|
|
4630
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React75.createElement(
|
|
4568
4631
|
AddOrRemoveContent,
|
|
4569
4632
|
{
|
|
4570
4633
|
isAdded: hasTextStroke,
|
|
4571
4634
|
onAdd: addTextStroke,
|
|
4572
4635
|
onRemove: removeTextStroke,
|
|
4573
4636
|
disabled: !canEdit,
|
|
4574
|
-
renderLabel: () => /* @__PURE__ */
|
|
4637
|
+
renderLabel: () => /* @__PURE__ */ React75.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
4575
4638
|
},
|
|
4576
|
-
/* @__PURE__ */
|
|
4639
|
+
/* @__PURE__ */ React75.createElement(StrokeControl, null)
|
|
4577
4640
|
));
|
|
4578
4641
|
};
|
|
4579
4642
|
|
|
4580
4643
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4581
|
-
import * as
|
|
4644
|
+
import * as React76 from "react";
|
|
4582
4645
|
import { ToggleControl as ToggleControl14 } from "@elementor/editor-controls";
|
|
4583
4646
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
4584
|
-
import { __ as
|
|
4585
|
-
var TEXT_TRANSFORM_LABEL =
|
|
4647
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
4648
|
+
var TEXT_TRANSFORM_LABEL = __52("Text transform", "elementor");
|
|
4586
4649
|
var options11 = [
|
|
4587
4650
|
{
|
|
4588
4651
|
value: "none",
|
|
4589
|
-
label:
|
|
4590
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4652
|
+
label: __52("None", "elementor"),
|
|
4653
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(MinusIcon4, { fontSize: size }),
|
|
4591
4654
|
showTooltip: true
|
|
4592
4655
|
},
|
|
4593
4656
|
{
|
|
4594
4657
|
value: "capitalize",
|
|
4595
|
-
label:
|
|
4596
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4658
|
+
label: __52("Capitalize", "elementor"),
|
|
4659
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(LetterCaseIcon, { fontSize: size }),
|
|
4597
4660
|
showTooltip: true
|
|
4598
4661
|
},
|
|
4599
4662
|
{
|
|
4600
4663
|
value: "uppercase",
|
|
4601
|
-
label:
|
|
4602
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4664
|
+
label: __52("Uppercase", "elementor"),
|
|
4665
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
4603
4666
|
showTooltip: true
|
|
4604
4667
|
},
|
|
4605
4668
|
{
|
|
4606
4669
|
value: "lowercase",
|
|
4607
|
-
label:
|
|
4608
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4670
|
+
label: __52("Lowercase", "elementor"),
|
|
4671
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
4609
4672
|
showTooltip: true
|
|
4610
4673
|
}
|
|
4611
4674
|
];
|
|
4612
|
-
var TransformField = () => /* @__PURE__ */
|
|
4675
|
+
var TransformField = () => /* @__PURE__ */ React76.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React76.createElement(ToggleControl14, { options: options11 })));
|
|
4613
4676
|
|
|
4614
4677
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4615
|
-
import * as
|
|
4678
|
+
import * as React77 from "react";
|
|
4616
4679
|
import { useRef as useRef15 } from "react";
|
|
4617
4680
|
import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
|
|
4618
|
-
import { __ as
|
|
4619
|
-
var WORD_SPACING_LABEL =
|
|
4681
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
4682
|
+
var WORD_SPACING_LABEL = __53("Word spacing", "elementor");
|
|
4620
4683
|
var WordSpacingField = () => {
|
|
4621
4684
|
const rowRef = useRef15(null);
|
|
4622
|
-
return /* @__PURE__ */
|
|
4685
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React77.createElement(SizeControl11, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4623
4686
|
};
|
|
4624
4687
|
|
|
4625
4688
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4626
4689
|
var TypographySection = () => {
|
|
4627
|
-
return /* @__PURE__ */
|
|
4690
|
+
return /* @__PURE__ */ React78.createElement(SectionContent, null, /* @__PURE__ */ React78.createElement(FontFamilyField, null), /* @__PURE__ */ React78.createElement(FontWeightField, null), /* @__PURE__ */ React78.createElement(FontSizeField, null), /* @__PURE__ */ React78.createElement(PanelDivider, null), /* @__PURE__ */ React78.createElement(TextAlignmentField, null), /* @__PURE__ */ React78.createElement(TextColorField, null), /* @__PURE__ */ React78.createElement(
|
|
4628
4691
|
StyleTabCollapsibleContent,
|
|
4629
4692
|
{
|
|
4630
4693
|
fields: [
|
|
@@ -4639,18 +4702,18 @@ var TypographySection = () => {
|
|
|
4639
4702
|
"stroke"
|
|
4640
4703
|
]
|
|
4641
4704
|
},
|
|
4642
|
-
/* @__PURE__ */
|
|
4705
|
+
/* @__PURE__ */ React78.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React78.createElement(LineHeightField, null), /* @__PURE__ */ React78.createElement(LetterSpacingField, null), /* @__PURE__ */ React78.createElement(WordSpacingField, null), /* @__PURE__ */ React78.createElement(ColumnCountField, null), /* @__PURE__ */ React78.createElement(ColumnGapField, null), /* @__PURE__ */ React78.createElement(PanelDivider, null), /* @__PURE__ */ React78.createElement(TextDecorationField, null), /* @__PURE__ */ React78.createElement(TransformField, null), /* @__PURE__ */ React78.createElement(TextDirectionField, null), /* @__PURE__ */ React78.createElement(FontStyleField, null), /* @__PURE__ */ React78.createElement(TextStrokeField, null))
|
|
4643
4706
|
));
|
|
4644
4707
|
};
|
|
4645
4708
|
|
|
4646
4709
|
// src/components/style-tab-section.tsx
|
|
4647
|
-
import * as
|
|
4710
|
+
import * as React79 from "react";
|
|
4648
4711
|
var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
4649
4712
|
const { component, name, title, action } = section;
|
|
4650
4713
|
const tabDefaults = useDefaultPanelSettings();
|
|
4651
|
-
const SectionComponent = component || (() => /* @__PURE__ */
|
|
4714
|
+
const SectionComponent = component || (() => /* @__PURE__ */ React79.createElement(React79.Fragment, null));
|
|
4652
4715
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
4653
|
-
return /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ React79.createElement(
|
|
4654
4717
|
Section,
|
|
4655
4718
|
{
|
|
4656
4719
|
title,
|
|
@@ -4659,7 +4722,7 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
4659
4722
|
unmountOnExit,
|
|
4660
4723
|
action
|
|
4661
4724
|
},
|
|
4662
|
-
/* @__PURE__ */
|
|
4725
|
+
/* @__PURE__ */ React79.createElement(SectionComponent, null)
|
|
4663
4726
|
);
|
|
4664
4727
|
};
|
|
4665
4728
|
|
|
@@ -4681,7 +4744,7 @@ var StyleTab = () => {
|
|
|
4681
4744
|
if (!currentClassesProp) {
|
|
4682
4745
|
return null;
|
|
4683
4746
|
}
|
|
4684
|
-
return /* @__PURE__ */
|
|
4747
|
+
return /* @__PURE__ */ React80.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React80.createElement(
|
|
4685
4748
|
StyleProvider,
|
|
4686
4749
|
{
|
|
4687
4750
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4692,13 +4755,13 @@ var StyleTab = () => {
|
|
|
4692
4755
|
},
|
|
4693
4756
|
setMetaState: setActiveStyleState
|
|
4694
4757
|
},
|
|
4695
|
-
/* @__PURE__ */
|
|
4758
|
+
/* @__PURE__ */ React80.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React80.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React80.createElement(ClassesHeader, null, /* @__PURE__ */ React80.createElement(CssClassSelector, null), /* @__PURE__ */ React80.createElement(Divider5, null)), /* @__PURE__ */ React80.createElement(SectionsList, null, /* @__PURE__ */ React80.createElement(
|
|
4696
4759
|
StyleTabSection,
|
|
4697
4760
|
{
|
|
4698
4761
|
section: {
|
|
4699
4762
|
component: LayoutSection,
|
|
4700
4763
|
name: "Layout",
|
|
4701
|
-
title:
|
|
4764
|
+
title: __54("Layout", "elementor")
|
|
4702
4765
|
},
|
|
4703
4766
|
fields: [
|
|
4704
4767
|
"display",
|
|
@@ -4711,23 +4774,23 @@ var StyleTab = () => {
|
|
|
4711
4774
|
"gap"
|
|
4712
4775
|
]
|
|
4713
4776
|
}
|
|
4714
|
-
), /* @__PURE__ */
|
|
4777
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4715
4778
|
StyleTabSection,
|
|
4716
4779
|
{
|
|
4717
4780
|
section: {
|
|
4718
4781
|
component: SpacingSection,
|
|
4719
4782
|
name: "Spacing",
|
|
4720
|
-
title:
|
|
4783
|
+
title: __54("Spacing", "elementor")
|
|
4721
4784
|
},
|
|
4722
4785
|
fields: ["margin", "padding"]
|
|
4723
4786
|
}
|
|
4724
|
-
), /* @__PURE__ */
|
|
4787
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4725
4788
|
StyleTabSection,
|
|
4726
4789
|
{
|
|
4727
4790
|
section: {
|
|
4728
4791
|
component: SizeSection,
|
|
4729
4792
|
name: "Size",
|
|
4730
|
-
title:
|
|
4793
|
+
title: __54("Size", "elementor")
|
|
4731
4794
|
},
|
|
4732
4795
|
fields: [
|
|
4733
4796
|
"width",
|
|
@@ -4741,23 +4804,23 @@ var StyleTab = () => {
|
|
|
4741
4804
|
"object-fit"
|
|
4742
4805
|
]
|
|
4743
4806
|
}
|
|
4744
|
-
), /* @__PURE__ */
|
|
4807
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4745
4808
|
StyleTabSection,
|
|
4746
4809
|
{
|
|
4747
4810
|
section: {
|
|
4748
4811
|
component: PositionSection,
|
|
4749
4812
|
name: "Position",
|
|
4750
|
-
title:
|
|
4813
|
+
title: __54("Position", "elementor")
|
|
4751
4814
|
},
|
|
4752
4815
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4753
4816
|
}
|
|
4754
|
-
), /* @__PURE__ */
|
|
4817
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4755
4818
|
StyleTabSection,
|
|
4756
4819
|
{
|
|
4757
4820
|
section: {
|
|
4758
4821
|
component: TypographySection,
|
|
4759
4822
|
name: "Typography",
|
|
4760
|
-
title:
|
|
4823
|
+
title: __54("Typography", "elementor")
|
|
4761
4824
|
},
|
|
4762
4825
|
fields: [
|
|
4763
4826
|
"font-family",
|
|
@@ -4776,33 +4839,33 @@ var StyleTab = () => {
|
|
|
4776
4839
|
"stroke"
|
|
4777
4840
|
]
|
|
4778
4841
|
}
|
|
4779
|
-
), /* @__PURE__ */
|
|
4842
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4780
4843
|
StyleTabSection,
|
|
4781
4844
|
{
|
|
4782
4845
|
section: {
|
|
4783
4846
|
component: BackgroundSection,
|
|
4784
4847
|
name: "Background",
|
|
4785
|
-
title:
|
|
4848
|
+
title: __54("Background", "elementor")
|
|
4786
4849
|
},
|
|
4787
4850
|
fields: ["background"]
|
|
4788
4851
|
}
|
|
4789
|
-
), /* @__PURE__ */
|
|
4852
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4790
4853
|
StyleTabSection,
|
|
4791
4854
|
{
|
|
4792
4855
|
section: {
|
|
4793
4856
|
component: BorderSection,
|
|
4794
4857
|
name: "Border",
|
|
4795
|
-
title:
|
|
4858
|
+
title: __54("Border", "elementor")
|
|
4796
4859
|
},
|
|
4797
4860
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4798
4861
|
}
|
|
4799
|
-
), /* @__PURE__ */
|
|
4862
|
+
), /* @__PURE__ */ React80.createElement(
|
|
4800
4863
|
StyleTabSection,
|
|
4801
4864
|
{
|
|
4802
4865
|
section: {
|
|
4803
4866
|
component: EffectsSection,
|
|
4804
4867
|
name: "Effects",
|
|
4805
|
-
title:
|
|
4868
|
+
title: __54("Effects", "elementor")
|
|
4806
4869
|
},
|
|
4807
4870
|
fields: [
|
|
4808
4871
|
"mix-blend-mode",
|
|
@@ -4815,12 +4878,12 @@ var StyleTab = () => {
|
|
|
4815
4878
|
"transition"
|
|
4816
4879
|
]
|
|
4817
4880
|
}
|
|
4818
|
-
), /* @__PURE__ */
|
|
4881
|
+
), /* @__PURE__ */ React80.createElement(StyleTabSlot, null)), /* @__PURE__ */ React80.createElement(Box5, { sx: { height: "150px" } })))
|
|
4819
4882
|
));
|
|
4820
4883
|
};
|
|
4821
4884
|
function ClassesHeader({ children }) {
|
|
4822
4885
|
const scrollDirection = useScrollDirection();
|
|
4823
|
-
return /* @__PURE__ */
|
|
4886
|
+
return /* @__PURE__ */ React80.createElement(Stack12, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4824
4887
|
}
|
|
4825
4888
|
function useCurrentClassesProp() {
|
|
4826
4889
|
const { elementType } = useElement();
|
|
@@ -4839,7 +4902,7 @@ var EditingPanelTabs = () => {
|
|
|
4839
4902
|
return (
|
|
4840
4903
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4841
4904
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4842
|
-
/* @__PURE__ */
|
|
4905
|
+
/* @__PURE__ */ React81.createElement(Fragment9, { key: element.id }, /* @__PURE__ */ React81.createElement(PanelTabContent, null))
|
|
4843
4906
|
);
|
|
4844
4907
|
};
|
|
4845
4908
|
var PanelTabContent = () => {
|
|
@@ -4851,7 +4914,7 @@ var PanelTabContent = () => {
|
|
|
4851
4914
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4852
4915
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|
|
4853
4916
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
4854
|
-
return /* @__PURE__ */
|
|
4917
|
+
return /* @__PURE__ */ React81.createElement(ScrollProvider, null, /* @__PURE__ */ React81.createElement(Stack13, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React81.createElement(Stack13, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React81.createElement(
|
|
4855
4918
|
Tabs,
|
|
4856
4919
|
{
|
|
4857
4920
|
variant: "fullWidth",
|
|
@@ -4863,10 +4926,10 @@ var PanelTabContent = () => {
|
|
|
4863
4926
|
setCurrentTab(newValue);
|
|
4864
4927
|
}
|
|
4865
4928
|
},
|
|
4866
|
-
!isPromotedElement && /* @__PURE__ */
|
|
4867
|
-
/* @__PURE__ */
|
|
4868
|
-
isInteractionsActive && /* @__PURE__ */
|
|
4869
|
-
), /* @__PURE__ */
|
|
4929
|
+
!isPromotedElement && /* @__PURE__ */ React81.createElement(Tab, { label: __55("General", "elementor"), ...getTabProps("settings") }),
|
|
4930
|
+
/* @__PURE__ */ React81.createElement(Tab, { label: __55("Style", "elementor"), ...getTabProps("style") }),
|
|
4931
|
+
isInteractionsActive && /* @__PURE__ */ React81.createElement(Tab, { label: __55("Interactions", "elementor"), ...getTabProps("interactions") })
|
|
4932
|
+
), /* @__PURE__ */ React81.createElement(Divider6, null)), !isPromotedElement && /* @__PURE__ */ React81.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React81.createElement(SettingsTab, null)), /* @__PURE__ */ React81.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React81.createElement(StyleTab, null)), isInteractionsActive && /* @__PURE__ */ React81.createElement(TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React81.createElement(InteractionsTab, null))));
|
|
4870
4933
|
};
|
|
4871
4934
|
|
|
4872
4935
|
// src/components/editing-panel.tsx
|
|
@@ -4879,13 +4942,13 @@ var EditingPanel = () => {
|
|
|
4879
4942
|
if (!element || !elementType) {
|
|
4880
4943
|
return null;
|
|
4881
4944
|
}
|
|
4882
|
-
const panelTitle =
|
|
4945
|
+
const panelTitle = __56("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4883
4946
|
const { component: ReplacementComponent } = getEditingPanelReplacement(element, elementType) ?? {};
|
|
4884
|
-
let panelContent = /* @__PURE__ */
|
|
4947
|
+
let panelContent = /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(PanelHeader, null, /* @__PURE__ */ React82.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React82.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React82.createElement(PanelBody, null, /* @__PURE__ */ React82.createElement(EditingPanelTabs, null)));
|
|
4885
4948
|
if (ReplacementComponent) {
|
|
4886
|
-
panelContent = /* @__PURE__ */
|
|
4949
|
+
panelContent = /* @__PURE__ */ React82.createElement(ReplacementComponent, null);
|
|
4887
4950
|
}
|
|
4888
|
-
return /* @__PURE__ */
|
|
4951
|
+
return /* @__PURE__ */ React82.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React82.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React82.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React82.createElement(ThemeProvider3, null, /* @__PURE__ */ React82.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React82.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React82.createElement(ElementProvider, { element, elementType, settings }, /* @__PURE__ */ React82.createElement(Panel, null, /* @__PURE__ */ React82.createElement(PanelHeaderTopSlot, null), panelContent)))))));
|
|
4889
4952
|
};
|
|
4890
4953
|
|
|
4891
4954
|
// src/init.ts
|
|
@@ -4937,21 +5000,21 @@ var EditingPanelHooks = () => {
|
|
|
4937
5000
|
import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-controls";
|
|
4938
5001
|
|
|
4939
5002
|
// src/components/promotions/custom-css.tsx
|
|
4940
|
-
import * as
|
|
5003
|
+
import * as React83 from "react";
|
|
4941
5004
|
import { useRef as useRef16 } from "react";
|
|
4942
5005
|
import { PromotionTrigger } from "@elementor/editor-controls";
|
|
4943
|
-
import { __ as
|
|
5006
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
4944
5007
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
4945
5008
|
var CustomCssSection = () => {
|
|
4946
5009
|
const triggerRef = useRef16(null);
|
|
4947
|
-
return /* @__PURE__ */
|
|
5010
|
+
return /* @__PURE__ */ React83.createElement(
|
|
4948
5011
|
StyleTabSection,
|
|
4949
5012
|
{
|
|
4950
5013
|
section: {
|
|
4951
5014
|
name: "Custom CSS",
|
|
4952
|
-
title:
|
|
5015
|
+
title: __57("Custom CSS", "elementor"),
|
|
4953
5016
|
action: {
|
|
4954
|
-
component: /* @__PURE__ */
|
|
5017
|
+
component: /* @__PURE__ */ React83.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "customCss", trackingData: TRACKING_DATA }),
|
|
4955
5018
|
onClick: () => triggerRef.current?.toggle()
|
|
4956
5019
|
}
|
|
4957
5020
|
}
|
|
@@ -4973,7 +5036,7 @@ var init = () => {
|
|
|
4973
5036
|
};
|
|
4974
5037
|
|
|
4975
5038
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
4976
|
-
import * as
|
|
5039
|
+
import * as React84 from "react";
|
|
4977
5040
|
import {
|
|
4978
5041
|
ControlFormLabel as ControlFormLabel3,
|
|
4979
5042
|
Repeater,
|
|
@@ -4987,7 +5050,7 @@ import {
|
|
|
4987
5050
|
import { numberPropTypeUtil as numberPropTypeUtil4 } from "@elementor/editor-props";
|
|
4988
5051
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
4989
5052
|
import { Alert as Alert2, Chip as Chip4, Infotip, Stack as Stack14, Switch, TextField as TextField2, Typography as Typography4 } from "@elementor/ui";
|
|
4990
|
-
import { __ as
|
|
5053
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
4991
5054
|
|
|
4992
5055
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
4993
5056
|
import { getContainer as getContainer2 } from "@elementor/editor-elements";
|
|
@@ -5012,7 +5075,7 @@ import {
|
|
|
5012
5075
|
removeElements
|
|
5013
5076
|
} from "@elementor/editor-elements";
|
|
5014
5077
|
import { numberPropTypeUtil as numberPropTypeUtil3 } from "@elementor/editor-props";
|
|
5015
|
-
import { __ as
|
|
5078
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
5016
5079
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5017
5080
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5018
5081
|
var useActions = () => {
|
|
@@ -5035,7 +5098,7 @@ var useActions = () => {
|
|
|
5035
5098
|
}
|
|
5036
5099
|
duplicateElements({
|
|
5037
5100
|
elementIds: [tabId, tabContentId],
|
|
5038
|
-
title:
|
|
5101
|
+
title: __58("Duplicate Tab", "elementor"),
|
|
5039
5102
|
onDuplicateElements: () => {
|
|
5040
5103
|
if (newDefault !== defaultActiveTab) {
|
|
5041
5104
|
setDefaultActiveTab(newDefault, {}, { withHistory: false });
|
|
@@ -5072,7 +5135,7 @@ var useActions = () => {
|
|
|
5072
5135
|
defaultActiveTab
|
|
5073
5136
|
});
|
|
5074
5137
|
moveElements({
|
|
5075
|
-
title:
|
|
5138
|
+
title: __58("Reorder Tabs", "elementor"),
|
|
5076
5139
|
moves: [
|
|
5077
5140
|
{
|
|
5078
5141
|
element: movedElement,
|
|
@@ -5106,7 +5169,7 @@ var useActions = () => {
|
|
|
5106
5169
|
defaultActiveTab
|
|
5107
5170
|
});
|
|
5108
5171
|
removeElements({
|
|
5109
|
-
title:
|
|
5172
|
+
title: __58("Tabs", "elementor"),
|
|
5110
5173
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
5111
5174
|
const tabId = item.id;
|
|
5112
5175
|
const tabContentContainer = getContainer3(tabContentAreaId);
|
|
@@ -5141,7 +5204,7 @@ var useActions = () => {
|
|
|
5141
5204
|
items3.forEach(({ index }) => {
|
|
5142
5205
|
const position = index + 1;
|
|
5143
5206
|
createElements({
|
|
5144
|
-
title:
|
|
5207
|
+
title: __58("Tabs", "elementor"),
|
|
5145
5208
|
elements: [
|
|
5146
5209
|
{
|
|
5147
5210
|
container: tabContentArea,
|
|
@@ -5210,7 +5273,7 @@ var calculateDefaultOnDuplicate = ({
|
|
|
5210
5273
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
5211
5274
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5212
5275
|
var TabsControl = ({ label }) => {
|
|
5213
|
-
return /* @__PURE__ */
|
|
5276
|
+
return /* @__PURE__ */ React84.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __59("Tabs", "elementor") }, /* @__PURE__ */ React84.createElement(TabsControlContent, { label }));
|
|
5214
5277
|
};
|
|
5215
5278
|
var TabsControlContent = ({ label }) => {
|
|
5216
5279
|
const { element } = useElement();
|
|
@@ -5254,7 +5317,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5254
5317
|
});
|
|
5255
5318
|
}
|
|
5256
5319
|
};
|
|
5257
|
-
return /* @__PURE__ */
|
|
5320
|
+
return /* @__PURE__ */ React84.createElement(
|
|
5258
5321
|
Repeater,
|
|
5259
5322
|
{
|
|
5260
5323
|
showToggle: false,
|
|
@@ -5274,7 +5337,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5274
5337
|
};
|
|
5275
5338
|
var ItemLabel = ({ value, index }) => {
|
|
5276
5339
|
const elementTitle = value?.title;
|
|
5277
|
-
return /* @__PURE__ */
|
|
5340
|
+
return /* @__PURE__ */ React84.createElement(Stack14, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React84.createElement("span", null, elementTitle), /* @__PURE__ */ React84.createElement(ItemDefaultTab, { index }));
|
|
5278
5341
|
};
|
|
5279
5342
|
var ItemDefaultTab = ({ index }) => {
|
|
5280
5343
|
const { value: defaultItem } = useBoundProp5(numberPropTypeUtil4);
|
|
@@ -5282,18 +5345,18 @@ var ItemDefaultTab = ({ index }) => {
|
|
|
5282
5345
|
if (!isDefault) {
|
|
5283
5346
|
return null;
|
|
5284
5347
|
}
|
|
5285
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ React84.createElement(Chip4, { size: "tiny", shape: "rounded", label: __59("Default", "elementor") });
|
|
5286
5349
|
};
|
|
5287
5350
|
var ItemContent = ({ value, index }) => {
|
|
5288
5351
|
if (!value.id) {
|
|
5289
5352
|
return null;
|
|
5290
5353
|
}
|
|
5291
|
-
return /* @__PURE__ */
|
|
5354
|
+
return /* @__PURE__ */ React84.createElement(Stack14, { p: 2, gap: 1.5 }, /* @__PURE__ */ React84.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React84.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __59("Tabs", "elementor") }, /* @__PURE__ */ React84.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5292
5355
|
};
|
|
5293
5356
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5294
5357
|
const { value, setValue } = useBoundProp5(numberPropTypeUtil4);
|
|
5295
5358
|
const isDefault = value === tabIndex;
|
|
5296
|
-
return /* @__PURE__ */
|
|
5359
|
+
return /* @__PURE__ */ React84.createElement(Stack14, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React84.createElement(ControlFormLabel3, null, __59("Set as default tab", "elementor")), /* @__PURE__ */ React84.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React84.createElement(
|
|
5297
5360
|
Switch,
|
|
5298
5361
|
{
|
|
5299
5362
|
size: "small",
|
|
@@ -5311,7 +5374,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5311
5374
|
var TabLabelControl = ({ elementId }) => {
|
|
5312
5375
|
const editorSettings = useElementEditorSettings(elementId);
|
|
5313
5376
|
const label = editorSettings?.title ?? "";
|
|
5314
|
-
return /* @__PURE__ */
|
|
5377
|
+
return /* @__PURE__ */ React84.createElement(Stack14, { gap: 1 }, /* @__PURE__ */ React84.createElement(ControlFormLabel3, null, __59("Tab name", "elementor")), /* @__PURE__ */ React84.createElement(
|
|
5315
5378
|
TextField2,
|
|
5316
5379
|
{
|
|
5317
5380
|
size: "tiny",
|
|
@@ -5332,22 +5395,22 @@ var ConditionalTooltip = ({
|
|
|
5332
5395
|
if (!showTooltip) {
|
|
5333
5396
|
return children;
|
|
5334
5397
|
}
|
|
5335
|
-
return /* @__PURE__ */
|
|
5398
|
+
return /* @__PURE__ */ React84.createElement(
|
|
5336
5399
|
Infotip,
|
|
5337
5400
|
{
|
|
5338
5401
|
arrow: false,
|
|
5339
|
-
content: /* @__PURE__ */
|
|
5402
|
+
content: /* @__PURE__ */ React84.createElement(
|
|
5340
5403
|
Alert2,
|
|
5341
5404
|
{
|
|
5342
5405
|
color: "secondary",
|
|
5343
|
-
icon: /* @__PURE__ */
|
|
5406
|
+
icon: /* @__PURE__ */ React84.createElement(InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5344
5407
|
size: "small",
|
|
5345
5408
|
sx: { width: 288 }
|
|
5346
5409
|
},
|
|
5347
|
-
/* @__PURE__ */
|
|
5410
|
+
/* @__PURE__ */ React84.createElement(Typography4, { variant: "body2" }, __59("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5348
5411
|
)
|
|
5349
5412
|
},
|
|
5350
|
-
/* @__PURE__ */
|
|
5413
|
+
/* @__PURE__ */ React84.createElement("span", null, children)
|
|
5351
5414
|
);
|
|
5352
5415
|
};
|
|
5353
5416
|
|
|
@@ -5373,7 +5436,7 @@ import {
|
|
|
5373
5436
|
import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
5374
5437
|
|
|
5375
5438
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5376
|
-
import * as
|
|
5439
|
+
import * as React85 from "react";
|
|
5377
5440
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
5378
5441
|
import {
|
|
5379
5442
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -5516,24 +5579,24 @@ var useDynamicTag = (tagName) => {
|
|
|
5516
5579
|
};
|
|
5517
5580
|
|
|
5518
5581
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5519
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5582
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React85.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
5520
5583
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5521
5584
|
const context = useBoundProp7(backgroundImageOverlayPropTypeUtil);
|
|
5522
|
-
return /* @__PURE__ */
|
|
5585
|
+
return /* @__PURE__ */ React85.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React85.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React85.createElement(Wrapper2, { rawValue: value.value })));
|
|
5523
5586
|
};
|
|
5524
5587
|
var Wrapper2 = ({ rawValue }) => {
|
|
5525
5588
|
const { propType } = useBoundProp7();
|
|
5526
5589
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5527
|
-
return /* @__PURE__ */
|
|
5590
|
+
return /* @__PURE__ */ React85.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React85.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React85.createElement(Content, { rawValue: rawValue.image })));
|
|
5528
5591
|
};
|
|
5529
5592
|
var Content = ({ rawValue }) => {
|
|
5530
5593
|
const src = rawValue.value.src;
|
|
5531
5594
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5532
|
-
return /* @__PURE__ */
|
|
5595
|
+
return /* @__PURE__ */ React85.createElement(React85.Fragment, null, dynamicTag?.label);
|
|
5533
5596
|
};
|
|
5534
5597
|
|
|
5535
5598
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5536
|
-
import * as
|
|
5599
|
+
import * as React89 from "react";
|
|
5537
5600
|
import {
|
|
5538
5601
|
ControlFormLabel as ControlFormLabel4,
|
|
5539
5602
|
PropKeyProvider as PropKeyProvider6,
|
|
@@ -5558,22 +5621,22 @@ import {
|
|
|
5558
5621
|
usePopupState as usePopupState2,
|
|
5559
5622
|
useTabs as useTabs2
|
|
5560
5623
|
} from "@elementor/ui";
|
|
5561
|
-
import { __ as
|
|
5624
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
5562
5625
|
|
|
5563
5626
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5564
|
-
import { useSessionStorage as
|
|
5627
|
+
import { useSessionStorage as useSessionStorage5 } from "@elementor/session";
|
|
5565
5628
|
var usePersistDynamicValue = (propKey) => {
|
|
5566
5629
|
const { element } = useElement();
|
|
5567
5630
|
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
5568
|
-
return
|
|
5631
|
+
return useSessionStorage5(prefixedKey);
|
|
5569
5632
|
};
|
|
5570
5633
|
|
|
5571
5634
|
// src/dynamics/dynamic-control.tsx
|
|
5572
|
-
import * as
|
|
5635
|
+
import * as React87 from "react";
|
|
5573
5636
|
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
5574
5637
|
|
|
5575
5638
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5576
|
-
import * as
|
|
5639
|
+
import * as React86 from "react";
|
|
5577
5640
|
import { useMemo as useMemo12 } from "react";
|
|
5578
5641
|
import { isDependencyMet as isDependencyMet3 } from "@elementor/editor-props";
|
|
5579
5642
|
var DynamicConditionalControl = ({
|
|
@@ -5615,10 +5678,10 @@ var DynamicConditionalControl = ({
|
|
|
5615
5678
|
return { ...defaults, ...convertedSettings };
|
|
5616
5679
|
}, [defaults, convertedSettings]);
|
|
5617
5680
|
if (!propType?.dependencies?.terms.length) {
|
|
5618
|
-
return /* @__PURE__ */
|
|
5681
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, children);
|
|
5619
5682
|
}
|
|
5620
5683
|
const isHidden = !isDependencyMet3(propType?.dependencies, effectiveSettings).isMet;
|
|
5621
|
-
return isHidden ? null : /* @__PURE__ */
|
|
5684
|
+
return isHidden ? null : /* @__PURE__ */ React86.createElement(React86.Fragment, null, children);
|
|
5622
5685
|
};
|
|
5623
5686
|
|
|
5624
5687
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -5643,7 +5706,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5643
5706
|
});
|
|
5644
5707
|
};
|
|
5645
5708
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5646
|
-
return /* @__PURE__ */
|
|
5709
|
+
return /* @__PURE__ */ React87.createElement(PropProvider5, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React87.createElement(PropKeyProvider5, { bind }, /* @__PURE__ */ React87.createElement(
|
|
5647
5710
|
DynamicConditionalControl,
|
|
5648
5711
|
{
|
|
5649
5712
|
propType: dynamicPropType,
|
|
@@ -5655,13 +5718,13 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5655
5718
|
};
|
|
5656
5719
|
|
|
5657
5720
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5658
|
-
import * as
|
|
5721
|
+
import * as React88 from "react";
|
|
5659
5722
|
import { Fragment as Fragment14, useEffect as useEffect8, useState as useState10 } from "react";
|
|
5660
5723
|
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5661
5724
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
5662
5725
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
5663
5726
|
import { Divider as Divider7, Link as Link2, Stack as Stack15, Typography as Typography5, useTheme as useTheme3 } from "@elementor/ui";
|
|
5664
|
-
import { __ as
|
|
5727
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
5665
5728
|
var SIZE2 = "tiny";
|
|
5666
5729
|
var PROMO_TEXT_WIDTH = 170;
|
|
5667
5730
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
@@ -5708,19 +5771,19 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5708
5771
|
]);
|
|
5709
5772
|
const getPopOverContent = () => {
|
|
5710
5773
|
if (hasNoDynamicTags) {
|
|
5711
|
-
return /* @__PURE__ */
|
|
5774
|
+
return /* @__PURE__ */ React88.createElement(NoDynamicTags, null);
|
|
5712
5775
|
}
|
|
5713
5776
|
if (expired) {
|
|
5714
|
-
return /* @__PURE__ */
|
|
5777
|
+
return /* @__PURE__ */ React88.createElement(ExpiredDynamicTags, null);
|
|
5715
5778
|
}
|
|
5716
|
-
return /* @__PURE__ */
|
|
5779
|
+
return /* @__PURE__ */ React88.createElement(Fragment14, null, /* @__PURE__ */ React88.createElement(
|
|
5717
5780
|
SearchField,
|
|
5718
5781
|
{
|
|
5719
5782
|
value: searchValue,
|
|
5720
5783
|
onSearch: handleSearch,
|
|
5721
|
-
placeholder:
|
|
5784
|
+
placeholder: __60("Search dynamic tags\u2026", "elementor")
|
|
5722
5785
|
}
|
|
5723
|
-
), /* @__PURE__ */
|
|
5786
|
+
), /* @__PURE__ */ React88.createElement(Divider7, null), /* @__PURE__ */ React88.createElement(
|
|
5724
5787
|
PopoverMenuList,
|
|
5725
5788
|
{
|
|
5726
5789
|
items: virtualizedItems,
|
|
@@ -5728,20 +5791,20 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5728
5791
|
onClose: closePopover,
|
|
5729
5792
|
selectedValue: dynamicValue?.name,
|
|
5730
5793
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5731
|
-
noResultsComponent: /* @__PURE__ */
|
|
5794
|
+
noResultsComponent: /* @__PURE__ */ React88.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5732
5795
|
}
|
|
5733
5796
|
));
|
|
5734
5797
|
};
|
|
5735
|
-
return /* @__PURE__ */
|
|
5798
|
+
return /* @__PURE__ */ React88.createElement(SectionPopoverBody, { "aria-label": __60("Dynamic tags", "elementor") }, /* @__PURE__ */ React88.createElement(
|
|
5736
5799
|
PopoverHeader,
|
|
5737
5800
|
{
|
|
5738
|
-
title:
|
|
5801
|
+
title: __60("Dynamic tags", "elementor"),
|
|
5739
5802
|
onClose: closePopover,
|
|
5740
|
-
icon: /* @__PURE__ */
|
|
5803
|
+
icon: /* @__PURE__ */ React88.createElement(DatabaseIcon2, { fontSize: SIZE2 })
|
|
5741
5804
|
}
|
|
5742
5805
|
), getPopOverContent());
|
|
5743
5806
|
};
|
|
5744
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5807
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElement(
|
|
5745
5808
|
Stack15,
|
|
5746
5809
|
{
|
|
5747
5810
|
gap: 1,
|
|
@@ -5752,11 +5815,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React87.createElem
|
|
|
5752
5815
|
color: "text.secondary",
|
|
5753
5816
|
sx: { pb: 3.5 }
|
|
5754
5817
|
},
|
|
5755
|
-
/* @__PURE__ */
|
|
5756
|
-
/* @__PURE__ */
|
|
5757
|
-
/* @__PURE__ */
|
|
5818
|
+
/* @__PURE__ */ React88.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
5819
|
+
/* @__PURE__ */ React88.createElement(Typography5, { align: "center", variant: "subtitle2" }, __60("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React88.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
5820
|
+
/* @__PURE__ */ React88.createElement(Typography5, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, __60("Try something else.", "elementor"), /* @__PURE__ */ React88.createElement(Link2, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __60("Clear & try again", "elementor")))
|
|
5758
5821
|
);
|
|
5759
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
5822
|
+
var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment, null, /* @__PURE__ */ React88.createElement(Divider7, null), /* @__PURE__ */ React88.createElement(
|
|
5760
5823
|
Stack15,
|
|
5761
5824
|
{
|
|
5762
5825
|
gap: 1,
|
|
@@ -5767,10 +5830,10 @@ var NoDynamicTags = () => /* @__PURE__ */ React87.createElement(React87.Fragment
|
|
|
5767
5830
|
color: "text.secondary",
|
|
5768
5831
|
sx: { pb: 3.5 }
|
|
5769
5832
|
},
|
|
5770
|
-
/* @__PURE__ */
|
|
5771
|
-
/* @__PURE__ */
|
|
5772
|
-
/* @__PURE__ */
|
|
5773
|
-
/* @__PURE__ */
|
|
5833
|
+
/* @__PURE__ */ React88.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
5834
|
+
/* @__PURE__ */ React88.createElement(Typography5, { align: "center", variant: "subtitle2" }, __60("Streamline your workflow with dynamic tags", "elementor")),
|
|
5835
|
+
/* @__PURE__ */ React88.createElement(Typography5, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __60("Upgrade now to display your content dynamically.", "elementor")),
|
|
5836
|
+
/* @__PURE__ */ React88.createElement(
|
|
5774
5837
|
CtaButton,
|
|
5775
5838
|
{
|
|
5776
5839
|
size: "small",
|
|
@@ -5779,7 +5842,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React87.createElement(React87.Fragment
|
|
|
5779
5842
|
}
|
|
5780
5843
|
)
|
|
5781
5844
|
));
|
|
5782
|
-
var ExpiredDynamicTags = () => /* @__PURE__ */
|
|
5845
|
+
var ExpiredDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment, null, /* @__PURE__ */ React88.createElement(Divider7, null), /* @__PURE__ */ React88.createElement(
|
|
5783
5846
|
Stack15,
|
|
5784
5847
|
{
|
|
5785
5848
|
gap: 1,
|
|
@@ -5790,16 +5853,16 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React87.createElement(React87.Fra
|
|
|
5790
5853
|
color: "text.secondary",
|
|
5791
5854
|
sx: { pb: 3.5 }
|
|
5792
5855
|
},
|
|
5793
|
-
/* @__PURE__ */
|
|
5794
|
-
/* @__PURE__ */
|
|
5795
|
-
/* @__PURE__ */
|
|
5796
|
-
/* @__PURE__ */
|
|
5856
|
+
/* @__PURE__ */ React88.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
5857
|
+
/* @__PURE__ */ React88.createElement(Typography5, { align: "center", variant: "subtitle2" }, __60("Unlock your Dynamic tags again", "elementor")),
|
|
5858
|
+
/* @__PURE__ */ React88.createElement(Typography5, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __60("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
5859
|
+
/* @__PURE__ */ React88.createElement(
|
|
5797
5860
|
CtaButton,
|
|
5798
5861
|
{
|
|
5799
5862
|
size: "small",
|
|
5800
5863
|
href: RENEW_DYNAMIC_TAGS_URL,
|
|
5801
5864
|
onClick: () => trackUpgradePromotionClick({ target_name: "dynamic_tags" }),
|
|
5802
|
-
children:
|
|
5865
|
+
children: __60("Renew Now", "elementor")
|
|
5803
5866
|
}
|
|
5804
5867
|
)
|
|
5805
5868
|
));
|
|
@@ -5836,7 +5899,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5836
5899
|
const { name: tagName = "" } = value;
|
|
5837
5900
|
const dynamicTag = useDynamicTag(tagName);
|
|
5838
5901
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
5839
|
-
return /* @__PURE__ */
|
|
5902
|
+
return /* @__PURE__ */ React89.createElement(PropProvider6, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React89.createElement(PropKeyProvider6, { bind }, /* @__PURE__ */ React89.createElement(OriginalControl, { ...props })));
|
|
5840
5903
|
}
|
|
5841
5904
|
const removeDynamicTag = () => {
|
|
5842
5905
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -5844,25 +5907,25 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5844
5907
|
if (!dynamicTag) {
|
|
5845
5908
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5846
5909
|
}
|
|
5847
|
-
return /* @__PURE__ */
|
|
5910
|
+
return /* @__PURE__ */ React89.createElement(Box6, null, /* @__PURE__ */ React89.createElement(
|
|
5848
5911
|
Tag,
|
|
5849
5912
|
{
|
|
5850
5913
|
fullWidth: true,
|
|
5851
5914
|
showActionsOnHover: true,
|
|
5852
5915
|
label: dynamicTag.label,
|
|
5853
|
-
startIcon: /* @__PURE__ */
|
|
5916
|
+
startIcon: /* @__PURE__ */ React89.createElement(DatabaseIcon3, { fontSize: SIZE3 }),
|
|
5854
5917
|
...bindTrigger2(selectionPopoverState),
|
|
5855
|
-
actions: /* @__PURE__ */
|
|
5918
|
+
actions: /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(DynamicSettingsPopover, { dynamicTag, disabled: readonly }), /* @__PURE__ */ React89.createElement(
|
|
5856
5919
|
IconButton2,
|
|
5857
5920
|
{
|
|
5858
5921
|
size: SIZE3,
|
|
5859
5922
|
onClick: removeDynamicTag,
|
|
5860
|
-
"aria-label":
|
|
5923
|
+
"aria-label": __61("Remove dynamic value", "elementor")
|
|
5861
5924
|
},
|
|
5862
|
-
/* @__PURE__ */
|
|
5925
|
+
/* @__PURE__ */ React89.createElement(XIcon, { fontSize: SIZE3 })
|
|
5863
5926
|
))
|
|
5864
5927
|
}
|
|
5865
|
-
), /* @__PURE__ */
|
|
5928
|
+
), /* @__PURE__ */ React89.createElement(
|
|
5866
5929
|
Popover,
|
|
5867
5930
|
{
|
|
5868
5931
|
disablePortal: true,
|
|
@@ -5874,7 +5937,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5874
5937
|
},
|
|
5875
5938
|
...bindPopover(selectionPopoverState)
|
|
5876
5939
|
},
|
|
5877
|
-
/* @__PURE__ */
|
|
5940
|
+
/* @__PURE__ */ React89.createElement(SectionPopoverBody2, { "aria-label": __61("Dynamic tags", "elementor") }, /* @__PURE__ */ React89.createElement(DynamicSelection, { close: selectionPopoverState.close, expired: readonly }))
|
|
5878
5941
|
));
|
|
5879
5942
|
};
|
|
5880
5943
|
var DynamicSettingsPopover = ({
|
|
@@ -5886,16 +5949,16 @@ var DynamicSettingsPopover = ({
|
|
|
5886
5949
|
if (!hasDynamicSettings) {
|
|
5887
5950
|
return null;
|
|
5888
5951
|
}
|
|
5889
|
-
return /* @__PURE__ */
|
|
5952
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
5890
5953
|
IconButton2,
|
|
5891
5954
|
{
|
|
5892
5955
|
size: SIZE3,
|
|
5893
5956
|
disabled,
|
|
5894
5957
|
...!disabled && bindTrigger2(popupState),
|
|
5895
|
-
"aria-label":
|
|
5958
|
+
"aria-label": __61("Dynamic settings", "elementor")
|
|
5896
5959
|
},
|
|
5897
|
-
/* @__PURE__ */
|
|
5898
|
-
), /* @__PURE__ */
|
|
5960
|
+
/* @__PURE__ */ React89.createElement(SettingsIcon, { fontSize: SIZE3 })
|
|
5961
|
+
), /* @__PURE__ */ React89.createElement(
|
|
5899
5962
|
Popover,
|
|
5900
5963
|
{
|
|
5901
5964
|
disablePortal: true,
|
|
@@ -5907,14 +5970,14 @@ var DynamicSettingsPopover = ({
|
|
|
5907
5970
|
},
|
|
5908
5971
|
...bindPopover(popupState)
|
|
5909
5972
|
},
|
|
5910
|
-
/* @__PURE__ */
|
|
5973
|
+
/* @__PURE__ */ React89.createElement(SectionPopoverBody2, { "aria-label": __61("Dynamic settings", "elementor") }, /* @__PURE__ */ React89.createElement(
|
|
5911
5974
|
PopoverHeader2,
|
|
5912
5975
|
{
|
|
5913
5976
|
title: dynamicTag.label,
|
|
5914
5977
|
onClose: popupState.close,
|
|
5915
|
-
icon: /* @__PURE__ */
|
|
5978
|
+
icon: /* @__PURE__ */ React89.createElement(DatabaseIcon3, { fontSize: SIZE3 })
|
|
5916
5979
|
}
|
|
5917
|
-
), /* @__PURE__ */
|
|
5980
|
+
), /* @__PURE__ */ React89.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
5918
5981
|
));
|
|
5919
5982
|
};
|
|
5920
5983
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
@@ -5925,9 +5988,9 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
5925
5988
|
}
|
|
5926
5989
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
5927
5990
|
const singleTab = tabs[0];
|
|
5928
|
-
return /* @__PURE__ */
|
|
5991
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(Divider8, null), /* @__PURE__ */ React89.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
5929
5992
|
}
|
|
5930
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React89.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React89.createElement(
|
|
5931
5994
|
Tab2,
|
|
5932
5995
|
{
|
|
5933
5996
|
key: index,
|
|
@@ -5935,15 +5998,15 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
5935
5998
|
sx: { px: 1, py: 0.5 },
|
|
5936
5999
|
...getTabProps(index)
|
|
5937
6000
|
}
|
|
5938
|
-
))), /* @__PURE__ */
|
|
5939
|
-
return /* @__PURE__ */
|
|
6001
|
+
))), /* @__PURE__ */ React89.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
6002
|
+
return /* @__PURE__ */ React89.createElement(
|
|
5940
6003
|
TabPanel2,
|
|
5941
6004
|
{
|
|
5942
6005
|
key: index,
|
|
5943
6006
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
5944
6007
|
...getTabPanelProps(index)
|
|
5945
6008
|
},
|
|
5946
|
-
/* @__PURE__ */
|
|
6009
|
+
/* @__PURE__ */ React89.createElement(ControlsItemsStack, { items: value.items })
|
|
5947
6010
|
);
|
|
5948
6011
|
}));
|
|
5949
6012
|
};
|
|
@@ -5985,11 +6048,11 @@ var Control2 = ({ control }) => {
|
|
|
5985
6048
|
display: "grid",
|
|
5986
6049
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
5987
6050
|
} : {};
|
|
5988
|
-
return /* @__PURE__ */
|
|
6051
|
+
return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(Grid5, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React89.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(ControlFormLabel4, null, control.label)) : null, /* @__PURE__ */ React89.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Control, { type: control.type, props: controlProps }))));
|
|
5989
6052
|
};
|
|
5990
6053
|
function ControlsItemsStack({ items: items3 }) {
|
|
5991
|
-
return /* @__PURE__ */
|
|
5992
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
6054
|
+
return /* @__PURE__ */ React89.createElement(Stack16, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
6055
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React89.createElement(Control2, { key: item.value.bind, control: item.value }) : null
|
|
5993
6056
|
));
|
|
5994
6057
|
}
|
|
5995
6058
|
|
|
@@ -6042,18 +6105,18 @@ function getDynamicValue(name, settings) {
|
|
|
6042
6105
|
}
|
|
6043
6106
|
|
|
6044
6107
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6045
|
-
import * as
|
|
6108
|
+
import * as React90 from "react";
|
|
6046
6109
|
import { useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
6047
6110
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
6048
|
-
import { __ as
|
|
6111
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
6049
6112
|
var usePropDynamicAction = () => {
|
|
6050
6113
|
const { propType } = useBoundProp11();
|
|
6051
6114
|
const visible = !!propType && supportsDynamic(propType);
|
|
6052
6115
|
return {
|
|
6053
6116
|
visible,
|
|
6054
6117
|
icon: DatabaseIcon4,
|
|
6055
|
-
title:
|
|
6056
|
-
content: ({ close }) => /* @__PURE__ */
|
|
6118
|
+
title: __62("Dynamic tags", "elementor"),
|
|
6119
|
+
content: ({ close }) => /* @__PURE__ */ React90.createElement(DynamicSelection, { close })
|
|
6057
6120
|
};
|
|
6058
6121
|
};
|
|
6059
6122
|
|
|
@@ -6088,7 +6151,7 @@ import { useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
|
6088
6151
|
import { hasVariable as hasVariable2 } from "@elementor/editor-variables";
|
|
6089
6152
|
import { BrushBigIcon } from "@elementor/icons";
|
|
6090
6153
|
import { controlActionsMenu as controlActionsMenu3 } from "@elementor/menus";
|
|
6091
|
-
import { __ as
|
|
6154
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
6092
6155
|
|
|
6093
6156
|
// src/utils/is-equal.ts
|
|
6094
6157
|
function isEqual(a, b) {
|
|
@@ -6164,21 +6227,21 @@ function useResetStyleValueProps() {
|
|
|
6164
6227
|
const visible = calculateVisibility();
|
|
6165
6228
|
return {
|
|
6166
6229
|
visible,
|
|
6167
|
-
title:
|
|
6230
|
+
title: __63("Clear", "elementor"),
|
|
6168
6231
|
icon: BrushBigIcon,
|
|
6169
6232
|
onClick: () => resetValue()
|
|
6170
6233
|
};
|
|
6171
6234
|
}
|
|
6172
6235
|
|
|
6173
6236
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6174
|
-
import * as
|
|
6237
|
+
import * as React96 from "react";
|
|
6175
6238
|
import { useBoundProp as useBoundProp13 } from "@elementor/editor-controls";
|
|
6176
6239
|
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
6177
6240
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
6178
|
-
import { __ as
|
|
6241
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
6179
6242
|
|
|
6180
6243
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6181
|
-
import * as
|
|
6244
|
+
import * as React95 from "react";
|
|
6182
6245
|
import { useMemo as useMemo13, useRef as useRef17, useState as useState12 } from "react";
|
|
6183
6246
|
import {
|
|
6184
6247
|
createPropsResolver as createPropsResolver2,
|
|
@@ -6196,7 +6259,7 @@ import {
|
|
|
6196
6259
|
Stack as Stack17,
|
|
6197
6260
|
Tooltip as Tooltip5
|
|
6198
6261
|
} from "@elementor/ui";
|
|
6199
|
-
import { __ as
|
|
6262
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
6200
6263
|
|
|
6201
6264
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6202
6265
|
import { isValidElement, useEffect as useEffect9, useState as useState11 } from "react";
|
|
@@ -6206,7 +6269,7 @@ import {
|
|
|
6206
6269
|
isPseudoState
|
|
6207
6270
|
} from "@elementor/editor-styles";
|
|
6208
6271
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
6209
|
-
import { __ as
|
|
6272
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
6210
6273
|
var MAXIMUM_ITEMS = 2;
|
|
6211
6274
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6212
6275
|
const [items3, setItems] = useState11([]);
|
|
@@ -6217,7 +6280,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
6217
6280
|
);
|
|
6218
6281
|
const validItems = normalizedItems.map((item) => ({
|
|
6219
6282
|
...item,
|
|
6220
|
-
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel :
|
|
6283
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __64("Base", "elementor")
|
|
6221
6284
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
6222
6285
|
setItems(validItems);
|
|
6223
6286
|
})();
|
|
@@ -6274,7 +6337,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6274
6337
|
};
|
|
6275
6338
|
|
|
6276
6339
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
6277
|
-
import * as
|
|
6340
|
+
import * as React91 from "react";
|
|
6278
6341
|
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
6279
6342
|
import {
|
|
6280
6343
|
DesktopIcon,
|
|
@@ -6305,20 +6368,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
6305
6368
|
return null;
|
|
6306
6369
|
}
|
|
6307
6370
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
6308
|
-
return /* @__PURE__ */
|
|
6371
|
+
return /* @__PURE__ */ React91.createElement(Tooltip2, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React91.createElement(IconComponent, { fontSize: SIZE4, sx: { mt: "2px" } }));
|
|
6309
6372
|
};
|
|
6310
6373
|
|
|
6311
6374
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6312
|
-
import * as
|
|
6375
|
+
import * as React92 from "react";
|
|
6313
6376
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
6314
6377
|
import { InfoCircleIcon } from "@elementor/icons";
|
|
6315
6378
|
import { Chip as Chip5, Tooltip as Tooltip3 } from "@elementor/ui";
|
|
6316
|
-
import { __ as
|
|
6379
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
6317
6380
|
var SIZE5 = "tiny";
|
|
6318
6381
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
6319
6382
|
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
6320
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
6321
|
-
return /* @__PURE__ */
|
|
6383
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React92.createElement(Tooltip3, { title: __65("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React92.createElement(InfoCircleIcon, { fontSize: SIZE5 })) : void 0;
|
|
6384
|
+
return /* @__PURE__ */ React92.createElement(
|
|
6322
6385
|
Chip5,
|
|
6323
6386
|
{
|
|
6324
6387
|
label: displayLabel,
|
|
@@ -6344,10 +6407,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
6344
6407
|
};
|
|
6345
6408
|
|
|
6346
6409
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
6347
|
-
import * as
|
|
6410
|
+
import * as React93 from "react";
|
|
6348
6411
|
import { Tooltip as Tooltip4, Typography as Typography6 } from "@elementor/ui";
|
|
6349
6412
|
var ValueComponent = ({ index, value }) => {
|
|
6350
|
-
return /* @__PURE__ */
|
|
6413
|
+
return /* @__PURE__ */ React93.createElement(Tooltip4, { title: value, placement: "top" }, /* @__PURE__ */ React93.createElement(
|
|
6351
6414
|
Typography6,
|
|
6352
6415
|
{
|
|
6353
6416
|
variant: "caption",
|
|
@@ -6369,9 +6432,9 @@ var ValueComponent = ({ index, value }) => {
|
|
|
6369
6432
|
};
|
|
6370
6433
|
|
|
6371
6434
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
6372
|
-
import * as
|
|
6435
|
+
import * as React94 from "react";
|
|
6373
6436
|
import { Box as Box7 } from "@elementor/ui";
|
|
6374
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
6437
|
+
var ActionIcons = () => /* @__PURE__ */ React94.createElement(Box7, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
6375
6438
|
|
|
6376
6439
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6377
6440
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -6407,7 +6470,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6407
6470
|
});
|
|
6408
6471
|
}, [key, propType]);
|
|
6409
6472
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
6410
|
-
const infotipContent = /* @__PURE__ */
|
|
6473
|
+
const infotipContent = /* @__PURE__ */ React95.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React95.createElement(
|
|
6411
6474
|
Card,
|
|
6412
6475
|
{
|
|
6413
6476
|
elevation: 0,
|
|
@@ -6420,7 +6483,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6420
6483
|
flexDirection: "column"
|
|
6421
6484
|
}
|
|
6422
6485
|
},
|
|
6423
|
-
/* @__PURE__ */
|
|
6486
|
+
/* @__PURE__ */ React95.createElement(
|
|
6424
6487
|
Box8,
|
|
6425
6488
|
{
|
|
6426
6489
|
sx: {
|
|
@@ -6430,9 +6493,9 @@ var StylesInheritanceInfotip = ({
|
|
|
6430
6493
|
backgroundColor: "background.paper"
|
|
6431
6494
|
}
|
|
6432
6495
|
},
|
|
6433
|
-
/* @__PURE__ */
|
|
6496
|
+
/* @__PURE__ */ React95.createElement(PopoverHeader3, { title: __66("Style origin", "elementor"), onClose: closeInfotip })
|
|
6434
6497
|
),
|
|
6435
|
-
/* @__PURE__ */
|
|
6498
|
+
/* @__PURE__ */ React95.createElement(
|
|
6436
6499
|
CardContent,
|
|
6437
6500
|
{
|
|
6438
6501
|
sx: {
|
|
@@ -6446,39 +6509,39 @@ var StylesInheritanceInfotip = ({
|
|
|
6446
6509
|
}
|
|
6447
6510
|
}
|
|
6448
6511
|
},
|
|
6449
|
-
/* @__PURE__ */
|
|
6450
|
-
return /* @__PURE__ */
|
|
6512
|
+
/* @__PURE__ */ React95.createElement(Stack17, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
6513
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6451
6514
|
Box8,
|
|
6452
6515
|
{
|
|
6453
6516
|
key: item.id,
|
|
6454
6517
|
display: "flex",
|
|
6455
6518
|
gap: 0.5,
|
|
6456
6519
|
role: "listitem",
|
|
6457
|
-
"aria-label":
|
|
6520
|
+
"aria-label": __66("Inheritance item: %s", "elementor").replace(
|
|
6458
6521
|
"%s",
|
|
6459
6522
|
item.displayLabel
|
|
6460
6523
|
)
|
|
6461
6524
|
},
|
|
6462
|
-
/* @__PURE__ */
|
|
6525
|
+
/* @__PURE__ */ React95.createElement(
|
|
6463
6526
|
Box8,
|
|
6464
6527
|
{
|
|
6465
6528
|
display: "flex",
|
|
6466
6529
|
gap: 0.5,
|
|
6467
6530
|
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
6468
6531
|
},
|
|
6469
|
-
/* @__PURE__ */
|
|
6470
|
-
/* @__PURE__ */
|
|
6471
|
-
/* @__PURE__ */
|
|
6532
|
+
/* @__PURE__ */ React95.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
6533
|
+
/* @__PURE__ */ React95.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
6534
|
+
/* @__PURE__ */ React95.createElement(ValueComponent, { index, value: item.value })
|
|
6472
6535
|
),
|
|
6473
|
-
/* @__PURE__ */
|
|
6536
|
+
/* @__PURE__ */ React95.createElement(ActionIcons, null)
|
|
6474
6537
|
);
|
|
6475
6538
|
}))
|
|
6476
6539
|
)
|
|
6477
6540
|
));
|
|
6478
6541
|
if (isDisabled) {
|
|
6479
|
-
return /* @__PURE__ */
|
|
6542
|
+
return /* @__PURE__ */ React95.createElement(Box8, { sx: { display: "inline-flex" } }, children);
|
|
6480
6543
|
}
|
|
6481
|
-
return /* @__PURE__ */
|
|
6544
|
+
return /* @__PURE__ */ React95.createElement(Box8, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React95.createElement(
|
|
6482
6545
|
TooltipOrInfotip,
|
|
6483
6546
|
{
|
|
6484
6547
|
showInfotip,
|
|
@@ -6486,7 +6549,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6486
6549
|
infotipContent,
|
|
6487
6550
|
isDisabled
|
|
6488
6551
|
},
|
|
6489
|
-
/* @__PURE__ */
|
|
6552
|
+
/* @__PURE__ */ React95.createElement(
|
|
6490
6553
|
IconButton3,
|
|
6491
6554
|
{
|
|
6492
6555
|
onClick: toggleInfotip,
|
|
@@ -6506,10 +6569,10 @@ function TooltipOrInfotip({
|
|
|
6506
6569
|
isDisabled
|
|
6507
6570
|
}) {
|
|
6508
6571
|
if (isDisabled) {
|
|
6509
|
-
return /* @__PURE__ */
|
|
6572
|
+
return /* @__PURE__ */ React95.createElement(Box8, { sx: { display: "inline-flex" } }, children);
|
|
6510
6573
|
}
|
|
6511
6574
|
if (showInfotip) {
|
|
6512
|
-
return /* @__PURE__ */
|
|
6575
|
+
return /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(
|
|
6513
6576
|
Backdrop,
|
|
6514
6577
|
{
|
|
6515
6578
|
open: showInfotip,
|
|
@@ -6519,7 +6582,7 @@ function TooltipOrInfotip({
|
|
|
6519
6582
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
6520
6583
|
}
|
|
6521
6584
|
}
|
|
6522
|
-
), /* @__PURE__ */
|
|
6585
|
+
), /* @__PURE__ */ React95.createElement(
|
|
6523
6586
|
Infotip2,
|
|
6524
6587
|
{
|
|
6525
6588
|
placement: "top-end",
|
|
@@ -6531,7 +6594,7 @@ function TooltipOrInfotip({
|
|
|
6531
6594
|
children
|
|
6532
6595
|
));
|
|
6533
6596
|
}
|
|
6534
|
-
return /* @__PURE__ */
|
|
6597
|
+
return /* @__PURE__ */ React95.createElement(Tooltip5, { title: __66("Style origin", "elementor"), placement: "top" }, children);
|
|
6535
6598
|
}
|
|
6536
6599
|
|
|
6537
6600
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
@@ -6544,7 +6607,7 @@ var StylesInheritanceIndicator = ({
|
|
|
6544
6607
|
if (!path || !inheritanceChain.length) {
|
|
6545
6608
|
return null;
|
|
6546
6609
|
}
|
|
6547
|
-
return /* @__PURE__ */
|
|
6610
|
+
return /* @__PURE__ */ React96.createElement(Indicator, { inheritanceChain, path, propType });
|
|
6548
6611
|
};
|
|
6549
6612
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
6550
6613
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
@@ -6560,7 +6623,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6560
6623
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
6561
6624
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
6562
6625
|
};
|
|
6563
|
-
return /* @__PURE__ */
|
|
6626
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6564
6627
|
StylesInheritanceInfotip,
|
|
6565
6628
|
{
|
|
6566
6629
|
inheritanceChain,
|
|
@@ -6569,17 +6632,17 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6569
6632
|
label,
|
|
6570
6633
|
isDisabled
|
|
6571
6634
|
},
|
|
6572
|
-
/* @__PURE__ */
|
|
6635
|
+
/* @__PURE__ */ React96.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
6573
6636
|
);
|
|
6574
6637
|
};
|
|
6575
6638
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
6576
6639
|
if (isFinalValue) {
|
|
6577
|
-
return
|
|
6640
|
+
return __67("This is the final value", "elementor");
|
|
6578
6641
|
}
|
|
6579
6642
|
if (hasValue) {
|
|
6580
|
-
return
|
|
6643
|
+
return __67("This value is overridden by another style", "elementor");
|
|
6581
6644
|
}
|
|
6582
|
-
return
|
|
6645
|
+
return __67("This has value from another style", "elementor");
|
|
6583
6646
|
};
|
|
6584
6647
|
|
|
6585
6648
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -6604,7 +6667,7 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6604
6667
|
]);
|
|
6605
6668
|
|
|
6606
6669
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6607
|
-
import * as
|
|
6670
|
+
import * as React97 from "react";
|
|
6608
6671
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
6609
6672
|
var arrayTransformer = createTransformer2((values) => {
|
|
6610
6673
|
if (!values || values.length === 0) {
|
|
@@ -6614,16 +6677,16 @@ var arrayTransformer = createTransformer2((values) => {
|
|
|
6614
6677
|
if (allStrings) {
|
|
6615
6678
|
return values.join(" ");
|
|
6616
6679
|
}
|
|
6617
|
-
return /* @__PURE__ */
|
|
6680
|
+
return /* @__PURE__ */ React97.createElement(React97.Fragment, null, values.map((item, index) => /* @__PURE__ */ React97.createElement(React97.Fragment, { key: index }, index > 0 && " ", item)));
|
|
6618
6681
|
});
|
|
6619
6682
|
|
|
6620
6683
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6621
|
-
import * as
|
|
6684
|
+
import * as React98 from "react";
|
|
6622
6685
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
6623
6686
|
import { Stack as Stack18, styled as styled6, UnstableColorIndicator } from "@elementor/ui";
|
|
6624
|
-
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
6687
|
+
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React98.createElement(Stack18, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React98.createElement(ItemLabelColor, { value })));
|
|
6625
6688
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6626
|
-
return /* @__PURE__ */
|
|
6689
|
+
return /* @__PURE__ */ React98.createElement("span", null, color);
|
|
6627
6690
|
};
|
|
6628
6691
|
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) => ({
|
|
6629
6692
|
width: "1em",
|
|
@@ -6634,20 +6697,20 @@ var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) =
|
|
|
6634
6697
|
}));
|
|
6635
6698
|
|
|
6636
6699
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6637
|
-
import * as
|
|
6700
|
+
import * as React99 from "react";
|
|
6638
6701
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
6639
6702
|
import { Stack as Stack19 } from "@elementor/ui";
|
|
6640
|
-
import { __ as
|
|
6641
|
-
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
6703
|
+
import { __ as __68 } from "@wordpress/i18n";
|
|
6704
|
+
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React99.createElement(Stack19, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React99.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React99.createElement(ItemLabelGradient, { value })));
|
|
6642
6705
|
var ItemIconGradient = ({ value }) => {
|
|
6643
6706
|
const gradient = getGradientValue(value);
|
|
6644
|
-
return /* @__PURE__ */
|
|
6707
|
+
return /* @__PURE__ */ React99.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
6645
6708
|
};
|
|
6646
6709
|
var ItemLabelGradient = ({ value }) => {
|
|
6647
6710
|
if (value.type === "linear") {
|
|
6648
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ React99.createElement("span", null, __68("Linear gradient", "elementor"));
|
|
6649
6712
|
}
|
|
6650
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ React99.createElement("span", null, __68("Radial gradient", "elementor"));
|
|
6651
6714
|
};
|
|
6652
6715
|
var getGradientValue = (gradient) => {
|
|
6653
6716
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -6658,15 +6721,15 @@ var getGradientValue = (gradient) => {
|
|
|
6658
6721
|
};
|
|
6659
6722
|
|
|
6660
6723
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6661
|
-
import * as
|
|
6724
|
+
import * as React100 from "react";
|
|
6662
6725
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
6663
6726
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
6664
6727
|
import { CardMedia, Stack as Stack20 } from "@elementor/ui";
|
|
6665
6728
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
6666
|
-
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */
|
|
6729
|
+
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React100.createElement(Stack20, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React100.createElement(ItemIconImage, { value }), /* @__PURE__ */ React100.createElement(ItemLabelImage, { value })));
|
|
6667
6730
|
var ItemIconImage = ({ value }) => {
|
|
6668
6731
|
const { imageUrl } = useImage(value);
|
|
6669
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ React100.createElement(
|
|
6670
6733
|
CardMedia,
|
|
6671
6734
|
{
|
|
6672
6735
|
image: imageUrl,
|
|
@@ -6682,7 +6745,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6682
6745
|
};
|
|
6683
6746
|
var ItemLabelImage = ({ value }) => {
|
|
6684
6747
|
const { imageTitle } = useImage(value);
|
|
6685
|
-
return /* @__PURE__ */
|
|
6748
|
+
return /* @__PURE__ */ React100.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React100.createElement("span", null, imageTitle));
|
|
6686
6749
|
};
|
|
6687
6750
|
var useImage = (image) => {
|
|
6688
6751
|
let imageTitle, imageUrl = null;
|
|
@@ -6707,7 +6770,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6707
6770
|
};
|
|
6708
6771
|
|
|
6709
6772
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6710
|
-
import * as
|
|
6773
|
+
import * as React101 from "react";
|
|
6711
6774
|
import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
|
|
6712
6775
|
var boxShadowTransformer = createTransformer6((value) => {
|
|
6713
6776
|
if (!value) {
|
|
@@ -6717,11 +6780,11 @@ var boxShadowTransformer = createTransformer6((value) => {
|
|
|
6717
6780
|
const colorValue = color || "#000000";
|
|
6718
6781
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6719
6782
|
const positionValue = position || "outset";
|
|
6720
|
-
return /* @__PURE__ */
|
|
6783
|
+
return /* @__PURE__ */ React101.createElement(React101.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
6721
6784
|
});
|
|
6722
6785
|
|
|
6723
6786
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6724
|
-
import * as
|
|
6787
|
+
import * as React102 from "react";
|
|
6725
6788
|
import { createTransformer as createTransformer7 } from "@elementor/editor-canvas";
|
|
6726
6789
|
import { Stack as Stack21, styled as styled7, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
6727
6790
|
function isValidCSSColor(value) {
|
|
@@ -6741,7 +6804,7 @@ var colorTransformer = createTransformer7((value) => {
|
|
|
6741
6804
|
if (!isValidCSSColor(value)) {
|
|
6742
6805
|
return value;
|
|
6743
6806
|
}
|
|
6744
|
-
return /* @__PURE__ */
|
|
6807
|
+
return /* @__PURE__ */ React102.createElement(Stack21, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React102.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React102.createElement("span", null, value));
|
|
6745
6808
|
});
|
|
6746
6809
|
|
|
6747
6810
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|