@elementor/editor-editing-panel 1.40.0 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1177 -732
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1070 -614
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
- package/src/action.tsx +26 -0
- package/src/components/add-or-remove-content.tsx +11 -3
- package/src/components/css-classes/css-class-item.tsx +3 -2
- package/src/components/css-classes/css-class-menu.tsx +15 -5
- package/src/components/css-classes/css-class-selector.tsx +1 -0
- package/src/components/css-classes/use-apply-and-unapply-class.ts +8 -4
- package/src/components/section-content.tsx +16 -6
- package/src/components/style-sections/background-section/background-section.tsx +6 -3
- package/src/components/style-sections/border-section/border-field.tsx +3 -0
- package/src/components/style-sections/layout-section/display-field.tsx +2 -1
- package/src/components/style-sections/layout-section/flex-order-field.tsx +5 -2
- package/src/components/style-sections/layout-section/flex-size-field.tsx +16 -12
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +3 -0
- package/src/components/style-tab.tsx +1 -1
- package/src/contexts/style-context.tsx +11 -2
- package/src/contexts/styles-inheritance-context.tsx +9 -7
- package/src/controls-actions.ts +2 -0
- package/src/controls-registry/styles-field.tsx +3 -0
- package/src/init.ts +11 -1
- package/src/reset-style-props.tsx +31 -0
- package/src/styles-inheritance/components/action-icons.tsx +8 -0
- package/src/styles-inheritance/components/breakpoint-icon.tsx +47 -0
- package/src/styles-inheritance/components/index.ts +4 -0
- package/src/styles-inheritance/components/label-chip.tsx +43 -0
- package/src/styles-inheritance/components/value-component.tsx +25 -0
- package/src/styles-inheritance/consts.ts +17 -0
- package/src/styles-inheritance/create-styles-inheritance.ts +50 -12
- package/src/{hooks → styles-inheritance/hooks}/use-normalized-inheritance-chain-items.tsx +41 -11
- package/src/styles-inheritance/init-styles-inheritance-transformers.ts +38 -0
- package/src/styles-inheritance/init.ts +8 -0
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +35 -32
- package/src/styles-inheritance/styles-inheritance-infotip.tsx +113 -19
- package/src/styles-inheritance/styles-inheritance-transformers-registry.tsx +3 -0
- package/src/styles-inheritance/transformers/background-color-overlay-transformer.tsx +27 -0
- package/src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx +50 -0
- package/src/styles-inheritance/transformers/background-image-overlay-transformer.tsx +79 -0
- package/src/styles-inheritance/transformers/background-overlay-transformer.tsx +20 -0
- package/src/styles-inheritance/types.ts +6 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { useBoundProp as
|
|
2
|
+
import { useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
3
3
|
|
|
4
4
|
// src/control-replacement.tsx
|
|
5
5
|
import { createControlReplacementsRegistry } from "@elementor/editor-controls";
|
|
@@ -56,7 +56,7 @@ function useElement() {
|
|
|
56
56
|
// src/contexts/style-context.tsx
|
|
57
57
|
import * as React3 from "react";
|
|
58
58
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
59
|
-
import { stylesRepository } from "@elementor/editor-styles-repository";
|
|
59
|
+
import { stylesRepository, useUserStylesCapability } from "@elementor/editor-styles-repository";
|
|
60
60
|
|
|
61
61
|
// src/errors.ts
|
|
62
62
|
import { createError } from "@elementor/utils";
|
|
@@ -81,10 +81,12 @@ var StyleNotFoundUnderProviderError = createError({
|
|
|
81
81
|
var Context3 = createContext3(null);
|
|
82
82
|
function StyleProvider({ children, ...props }) {
|
|
83
83
|
const provider = props.id === null ? null : getProviderByStyleId(props.id);
|
|
84
|
+
const { userCan } = useUserStylesCapability();
|
|
84
85
|
if (props.id && !provider) {
|
|
85
86
|
throw new StylesProviderNotFoundError({ context: { styleId: props.id } });
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
const canEdit = userCan(provider?.getKey() ?? "").updateProps;
|
|
89
|
+
return /* @__PURE__ */ React3.createElement(Context3.Provider, { value: { ...props, provider, canEdit } }, children);
|
|
88
90
|
}
|
|
89
91
|
function useStyle() {
|
|
90
92
|
const context = useContext3(Context3);
|
|
@@ -99,6 +101,9 @@ function getProviderByStyleId(styleId) {
|
|
|
99
101
|
});
|
|
100
102
|
return styleProvider ?? null;
|
|
101
103
|
}
|
|
104
|
+
function useIsStyle() {
|
|
105
|
+
return !!useContext3(Context3);
|
|
106
|
+
}
|
|
102
107
|
|
|
103
108
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
104
109
|
import * as React4 from "react";
|
|
@@ -469,7 +474,7 @@ import * as React6 from "react";
|
|
|
469
474
|
import {
|
|
470
475
|
isElementsStylesProvider,
|
|
471
476
|
stylesRepository as stylesRepository2,
|
|
472
|
-
useUserStylesCapability
|
|
477
|
+
useUserStylesCapability as useUserStylesCapability2
|
|
473
478
|
} from "@elementor/editor-styles-repository";
|
|
474
479
|
import { MenuItemInfotip, MenuListItem } from "@elementor/editor-ui";
|
|
475
480
|
import { bindMenu, Divider, Menu, MenuSubheader, Stack } from "@elementor/ui";
|
|
@@ -516,7 +521,6 @@ function useApplyClass() {
|
|
|
516
521
|
do: ({ classId }) => {
|
|
517
522
|
const prevActiveId = activeId;
|
|
518
523
|
applyClass(classId);
|
|
519
|
-
setDocumentModifiedStatus(true);
|
|
520
524
|
return prevActiveId;
|
|
521
525
|
},
|
|
522
526
|
undo: ({ classId }, prevActiveId) => {
|
|
@@ -552,7 +556,6 @@ function useUnapplyClass() {
|
|
|
552
556
|
do: ({ classId }) => {
|
|
553
557
|
const prevActiveId = activeId;
|
|
554
558
|
unapplyClass(classId);
|
|
555
|
-
setDocumentModifiedStatus(true);
|
|
556
559
|
return prevActiveId;
|
|
557
560
|
},
|
|
558
561
|
undo: ({ classId }, prevActiveId) => {
|
|
@@ -619,20 +622,24 @@ function useUnapply() {
|
|
|
619
622
|
function useSetClasses() {
|
|
620
623
|
const { element } = useElement();
|
|
621
624
|
const currentClassesProp = useClassesProp();
|
|
625
|
+
const isVersion330Active = isExperimentActive("e_v_3_30");
|
|
622
626
|
return useMemo2(() => {
|
|
623
627
|
const setClasses = (ids) => {
|
|
624
628
|
updateElementSettings({
|
|
625
629
|
id: element.id,
|
|
626
630
|
props: { [currentClassesProp]: classesPropTypeUtil.create(ids) },
|
|
627
|
-
withHistory: false
|
|
631
|
+
withHistory: isVersion330Active ? false : true
|
|
628
632
|
});
|
|
633
|
+
if (isVersion330Active) {
|
|
634
|
+
setDocumentModifiedStatus(true);
|
|
635
|
+
}
|
|
629
636
|
};
|
|
630
637
|
const getAppliedClasses = () => getElementSetting(element.id, currentClassesProp)?.value || [];
|
|
631
638
|
return {
|
|
632
639
|
setClasses,
|
|
633
640
|
getAppliedClasses
|
|
634
641
|
};
|
|
635
|
-
}, [currentClassesProp, element.id]);
|
|
642
|
+
}, [currentClassesProp, element.id, isVersion330Active]);
|
|
636
643
|
}
|
|
637
644
|
|
|
638
645
|
// src/components/css-classes/css-class-menu.tsx
|
|
@@ -642,7 +649,7 @@ var STATES = [
|
|
|
642
649
|
{ key: "focus", value: "focus" },
|
|
643
650
|
{ key: "active", value: "active" }
|
|
644
651
|
];
|
|
645
|
-
function CssClassMenu({ popupState, anchorEl }) {
|
|
652
|
+
function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
646
653
|
const { provider } = useCssClass();
|
|
647
654
|
const handleKeyDown = (e) => {
|
|
648
655
|
e.stopPropagation();
|
|
@@ -664,7 +671,7 @@ function CssClassMenu({ popupState, anchorEl }) {
|
|
|
664
671
|
onKeyDown: handleKeyDown,
|
|
665
672
|
disableAutoFocusItem: true
|
|
666
673
|
},
|
|
667
|
-
getMenuItemsByProvider({ provider, closeMenu: popupState.close }),
|
|
674
|
+
getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
|
|
668
675
|
/* @__PURE__ */ React6.createElement(MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __2("States", "elementor")),
|
|
669
676
|
STATES.map((state) => {
|
|
670
677
|
return /* @__PURE__ */ React6.createElement(StateMenuItem, { key: state.key, state: state.value, closeMenu: popupState.close });
|
|
@@ -678,16 +685,21 @@ function useModifiedStates(styleId) {
|
|
|
678
685
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
679
686
|
);
|
|
680
687
|
}
|
|
681
|
-
function getMenuItemsByProvider({
|
|
688
|
+
function getMenuItemsByProvider({
|
|
689
|
+
provider,
|
|
690
|
+
closeMenu,
|
|
691
|
+
fixed
|
|
692
|
+
}) {
|
|
682
693
|
if (!provider) {
|
|
683
694
|
return [];
|
|
684
695
|
}
|
|
685
696
|
const providerInstance = stylesRepository2.getProviderByKey(provider);
|
|
686
697
|
const providerActions = providerInstance?.actions;
|
|
687
|
-
const
|
|
698
|
+
const canUpdate = providerActions?.update;
|
|
699
|
+
const canUnapply = !fixed;
|
|
688
700
|
const actions = [
|
|
689
701
|
canUpdate && /* @__PURE__ */ React6.createElement(RenameClassMenuItem, { key: "rename-class", closeMenu }),
|
|
690
|
-
|
|
702
|
+
canUnapply && /* @__PURE__ */ React6.createElement(UnapplyClassMenuItem, { key: "unapply-class", closeMenu })
|
|
691
703
|
].filter(Boolean);
|
|
692
704
|
if (actions.length) {
|
|
693
705
|
actions.unshift(
|
|
@@ -708,7 +720,7 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
708
720
|
const { id: styleId, provider } = useCssClass();
|
|
709
721
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
710
722
|
const { state: activeState } = meta;
|
|
711
|
-
const { userCan } =
|
|
723
|
+
const { userCan } = useUserStylesCapability2();
|
|
712
724
|
const modifiedStates = useModifiedStates(styleId);
|
|
713
725
|
const isUpdateAllowed = userCan(provider ?? "").updateProps;
|
|
714
726
|
const indicatorVariant = !provider || isElementsStylesProvider(provider) ? "local" : "global";
|
|
@@ -758,7 +770,7 @@ function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
|
758
770
|
}
|
|
759
771
|
function RenameClassMenuItem({ closeMenu }) {
|
|
760
772
|
const { handleRename, provider } = useCssClass();
|
|
761
|
-
const { userCan } =
|
|
773
|
+
const { userCan } = useUserStylesCapability2();
|
|
762
774
|
if (!provider) {
|
|
763
775
|
return null;
|
|
764
776
|
}
|
|
@@ -789,7 +801,7 @@ function RenameClassMenuItem({ closeMenu }) {
|
|
|
789
801
|
// src/components/css-classes/css-class-item.tsx
|
|
790
802
|
var CHIP_SIZE = "tiny";
|
|
791
803
|
function CssClassItem(props) {
|
|
792
|
-
const { chipProps, icon, color: colorProp, ...classProps } = props;
|
|
804
|
+
const { chipProps, icon, color: colorProp, fixed, ...classProps } = props;
|
|
793
805
|
const { id, provider, label, isActive, onClickActive, renameLabel, setError } = classProps;
|
|
794
806
|
const { meta, setMetaState } = useStyle();
|
|
795
807
|
const popupState = usePopupState({ variant: "popover" });
|
|
@@ -872,7 +884,7 @@ function CssClassItem(props) {
|
|
|
872
884
|
})
|
|
873
885
|
}
|
|
874
886
|
)
|
|
875
|
-
), /* @__PURE__ */ React7.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React7.createElement(CssClassMenu, { popupState, anchorEl: chipRef })));
|
|
887
|
+
), /* @__PURE__ */ React7.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React7.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
876
888
|
}
|
|
877
889
|
var validateLabel = (newLabel) => {
|
|
878
890
|
const result = validateStyleLabel(newLabel, "rename");
|
|
@@ -943,6 +955,7 @@ function CssClassSelector() {
|
|
|
943
955
|
CssClassItem,
|
|
944
956
|
{
|
|
945
957
|
key: chipProps.key,
|
|
958
|
+
fixed: value.fixed,
|
|
946
959
|
label: value.label,
|
|
947
960
|
provider: value.provider,
|
|
948
961
|
id: value.value,
|
|
@@ -1089,7 +1102,7 @@ function useHandleSelect() {
|
|
|
1089
1102
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
1090
1103
|
|
|
1091
1104
|
// src/components/editing-panel.tsx
|
|
1092
|
-
import * as
|
|
1105
|
+
import * as React80 from "react";
|
|
1093
1106
|
import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
|
|
1094
1107
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
1095
1108
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
@@ -1097,17 +1110,28 @@ import { ThemeProvider as ThemeProvider9 } from "@elementor/editor-ui";
|
|
|
1097
1110
|
import { AtomIcon } from "@elementor/icons";
|
|
1098
1111
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
1099
1112
|
import { ErrorBoundary } from "@elementor/ui";
|
|
1100
|
-
import { __ as
|
|
1113
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
1101
1114
|
|
|
1102
1115
|
// src/controls-actions.ts
|
|
1103
1116
|
import { createMenu } from "@elementor/menus";
|
|
1104
1117
|
|
|
1105
|
-
// src/
|
|
1118
|
+
// src/action.tsx
|
|
1106
1119
|
import * as React9 from "react";
|
|
1120
|
+
import { IconButton, Tooltip } from "@elementor/ui";
|
|
1121
|
+
var SIZE = "tiny";
|
|
1122
|
+
function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
1123
|
+
if (!visible) {
|
|
1124
|
+
return null;
|
|
1125
|
+
}
|
|
1126
|
+
return /* @__PURE__ */ React9.createElement(Tooltip, { placement: "bottom", title, arrow: true }, /* @__PURE__ */ React9.createElement(IconButton, { "aria-label": title, size: SIZE, onClick }, /* @__PURE__ */ React9.createElement(Icon, { fontSize: SIZE })));
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
// src/popover-action.tsx
|
|
1130
|
+
import * as React10 from "react";
|
|
1107
1131
|
import { useId as useId2 } from "react";
|
|
1108
1132
|
import { XIcon } from "@elementor/icons";
|
|
1109
|
-
import { bindPopover, bindToggle, IconButton, Popover, Stack as Stack4, Tooltip, Typography as Typography4, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
1110
|
-
var
|
|
1133
|
+
import { bindPopover, bindToggle, IconButton as IconButton2, Popover, Stack as Stack4, Tooltip as Tooltip2, Typography as Typography4, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
1134
|
+
var SIZE2 = "tiny";
|
|
1111
1135
|
function PopoverAction({
|
|
1112
1136
|
title,
|
|
1113
1137
|
visible = true,
|
|
@@ -1122,7 +1146,7 @@ function PopoverAction({
|
|
|
1122
1146
|
if (!visible) {
|
|
1123
1147
|
return null;
|
|
1124
1148
|
}
|
|
1125
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Tooltip2, { placement: "top", title }, /* @__PURE__ */ React10.createElement(IconButton2, { "aria-label": title, key: id, size: SIZE2, ...bindToggle(popupState) }, /* @__PURE__ */ React10.createElement(Icon, { fontSize: SIZE2 }))), /* @__PURE__ */ React10.createElement(
|
|
1126
1150
|
Popover,
|
|
1127
1151
|
{
|
|
1128
1152
|
disablePortal: true,
|
|
@@ -1133,34 +1157,35 @@ function PopoverAction({
|
|
|
1133
1157
|
},
|
|
1134
1158
|
...bindPopover(popupState)
|
|
1135
1159
|
},
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ React10.createElement(Stack4, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React10.createElement(Icon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React10.createElement(Typography4, { variant: "subtitle2" }, title), /* @__PURE__ */ React10.createElement(IconButton2, { sx: { ml: "auto" }, size: SIZE2, onClick: popupState.close }, /* @__PURE__ */ React10.createElement(XIcon, { fontSize: SIZE2 }))),
|
|
1161
|
+
/* @__PURE__ */ React10.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
1138
1162
|
));
|
|
1139
1163
|
}
|
|
1140
1164
|
|
|
1141
1165
|
// src/controls-actions.ts
|
|
1142
1166
|
var controlActionsMenu = createMenu({
|
|
1143
1167
|
components: {
|
|
1168
|
+
Action,
|
|
1144
1169
|
PopoverAction
|
|
1145
1170
|
}
|
|
1146
1171
|
});
|
|
1147
1172
|
|
|
1148
1173
|
// src/components/editing-panel-error-fallback.tsx
|
|
1149
|
-
import * as
|
|
1174
|
+
import * as React11 from "react";
|
|
1150
1175
|
import { Alert, Box as Box3 } from "@elementor/ui";
|
|
1151
1176
|
function EditorPanelErrorFallback() {
|
|
1152
|
-
return /* @__PURE__ */
|
|
1177
|
+
return /* @__PURE__ */ React11.createElement(Box3, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React11.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React11.createElement("strong", null, "Something went wrong")));
|
|
1153
1178
|
}
|
|
1154
1179
|
|
|
1155
1180
|
// src/components/editing-panel-tabs.tsx
|
|
1156
|
-
import * as
|
|
1181
|
+
import * as React79 from "react";
|
|
1157
1182
|
import { Fragment as Fragment9 } from "react";
|
|
1158
|
-
import { isExperimentActive as
|
|
1159
|
-
import { Divider as Divider6, Stack as
|
|
1160
|
-
import { __ as
|
|
1183
|
+
import { isExperimentActive as isExperimentActive11 } from "@elementor/editor-v1-adapters";
|
|
1184
|
+
import { Divider as Divider6, Stack as Stack18, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
1185
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
1161
1186
|
|
|
1162
1187
|
// src/contexts/scroll-context.tsx
|
|
1163
|
-
import * as
|
|
1188
|
+
import * as React12 from "react";
|
|
1164
1189
|
import { createContext as createContext5, useContext as useContext5, useEffect, useRef as useRef2, useState as useState5 } from "react";
|
|
1165
1190
|
import { styled as styled3 } from "@elementor/ui";
|
|
1166
1191
|
var ScrollContext = createContext5(void 0);
|
|
@@ -1192,7 +1217,7 @@ function ScrollProvider({ children }) {
|
|
|
1192
1217
|
scrollElement.removeEventListener("scroll", handleScroll);
|
|
1193
1218
|
};
|
|
1194
1219
|
});
|
|
1195
|
-
return /* @__PURE__ */
|
|
1220
|
+
return /* @__PURE__ */ React12.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React12.createElement(ScrollPanel, { ref }, children));
|
|
1196
1221
|
}
|
|
1197
1222
|
function useScrollDirection() {
|
|
1198
1223
|
return useContext5(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
@@ -1248,14 +1273,14 @@ var useStateByElement = (key, initialValue) => {
|
|
|
1248
1273
|
};
|
|
1249
1274
|
|
|
1250
1275
|
// src/components/settings-tab.tsx
|
|
1251
|
-
import * as
|
|
1276
|
+
import * as React18 from "react";
|
|
1252
1277
|
import { ControlFormLabel } from "@elementor/editor-controls";
|
|
1253
1278
|
import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
|
|
1254
1279
|
import { SessionStorageProvider } from "@elementor/session";
|
|
1255
1280
|
import { Divider as Divider3 } from "@elementor/ui";
|
|
1256
1281
|
|
|
1257
1282
|
// src/controls-registry/control.tsx
|
|
1258
|
-
import * as
|
|
1283
|
+
import * as React13 from "react";
|
|
1259
1284
|
|
|
1260
1285
|
// src/controls-registry/controls-registry.tsx
|
|
1261
1286
|
import {
|
|
@@ -1292,14 +1317,14 @@ var Control = ({ props, type }) => {
|
|
|
1292
1317
|
context: { controlType: type }
|
|
1293
1318
|
});
|
|
1294
1319
|
}
|
|
1295
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ React13.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
1296
1321
|
};
|
|
1297
1322
|
|
|
1298
1323
|
// src/controls-registry/control-type-container.tsx
|
|
1299
|
-
import * as
|
|
1324
|
+
import * as React14 from "react";
|
|
1300
1325
|
import { Box as Box4, styled as styled4 } from "@elementor/ui";
|
|
1301
1326
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
1302
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ React14.createElement(StyledContainer, { layout }, children);
|
|
1303
1328
|
};
|
|
1304
1329
|
var StyledContainer = styled4(Box4, {
|
|
1305
1330
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
@@ -1317,7 +1342,7 @@ var getGridLayout = (layout) => ({
|
|
|
1317
1342
|
});
|
|
1318
1343
|
|
|
1319
1344
|
// src/controls-registry/settings-field.tsx
|
|
1320
|
-
import * as
|
|
1345
|
+
import * as React15 from "react";
|
|
1321
1346
|
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
1322
1347
|
import { updateElementSettings as updateElementSettings3, useElementSetting as useElementSetting2 } from "@elementor/editor-elements";
|
|
1323
1348
|
|
|
@@ -1346,11 +1371,11 @@ var SettingsField = ({ bind, children }) => {
|
|
|
1346
1371
|
props: { ...newValue }
|
|
1347
1372
|
});
|
|
1348
1373
|
};
|
|
1349
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ React15.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React15.createElement(PropKeyProvider, { bind }, children));
|
|
1350
1375
|
};
|
|
1351
1376
|
|
|
1352
1377
|
// src/components/section.tsx
|
|
1353
|
-
import * as
|
|
1378
|
+
import * as React16 from "react";
|
|
1354
1379
|
import { useId as useId3 } from "react";
|
|
1355
1380
|
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
1356
1381
|
|
|
@@ -1372,7 +1397,7 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
1372
1397
|
const id = useId3();
|
|
1373
1398
|
const labelId = `label-${id}`;
|
|
1374
1399
|
const contentId = `content-${id}`;
|
|
1375
|
-
return /* @__PURE__ */
|
|
1400
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
1376
1401
|
ListItemButton,
|
|
1377
1402
|
{
|
|
1378
1403
|
id: labelId,
|
|
@@ -1380,22 +1405,22 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
1380
1405
|
onClick: () => setIsOpen(!isOpen),
|
|
1381
1406
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
1382
1407
|
},
|
|
1383
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ React16.createElement(
|
|
1384
1409
|
ListItemText,
|
|
1385
1410
|
{
|
|
1386
1411
|
secondary: title,
|
|
1387
1412
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" }
|
|
1388
1413
|
}
|
|
1389
1414
|
),
|
|
1390
|
-
/* @__PURE__ */
|
|
1391
|
-
), /* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ React16.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
1416
|
+
), /* @__PURE__ */ React16.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React16.createElement(Stack5, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React16.createElement(Divider2, null));
|
|
1392
1417
|
}
|
|
1393
1418
|
|
|
1394
1419
|
// src/components/sections-list.tsx
|
|
1395
|
-
import * as
|
|
1420
|
+
import * as React17 from "react";
|
|
1396
1421
|
import { List } from "@elementor/ui";
|
|
1397
1422
|
function SectionsList(props) {
|
|
1398
|
-
return /* @__PURE__ */
|
|
1423
|
+
return /* @__PURE__ */ React17.createElement(List, { disablePadding: true, component: "div", ...props });
|
|
1399
1424
|
}
|
|
1400
1425
|
|
|
1401
1426
|
// src/components/settings-tab.tsx
|
|
@@ -1403,12 +1428,12 @@ var SettingsTab = () => {
|
|
|
1403
1428
|
const { elementType, element } = useElement();
|
|
1404
1429
|
const settingsDefault = useDefaultPanelSettings();
|
|
1405
1430
|
const isDefaultExpanded = (sectionId) => isExperimentActive3(EXPERIMENTAL_FEATURES.V_3_30) ? settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId) : true;
|
|
1406
|
-
return /* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ React18.createElement(SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React18.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
1407
1432
|
if (type === "control") {
|
|
1408
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ React18.createElement(Control2, { key: value.bind, control: value });
|
|
1409
1434
|
}
|
|
1410
1435
|
if (type === "section") {
|
|
1411
|
-
return /* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1412
1437
|
Section,
|
|
1413
1438
|
{
|
|
1414
1439
|
title: value.label,
|
|
@@ -1417,7 +1442,7 @@ var SettingsTab = () => {
|
|
|
1417
1442
|
},
|
|
1418
1443
|
value.items?.map((item) => {
|
|
1419
1444
|
if (item.type === "control") {
|
|
1420
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ React18.createElement(Control2, { key: item.value.bind, control: item.value });
|
|
1421
1446
|
}
|
|
1422
1447
|
return null;
|
|
1423
1448
|
})
|
|
@@ -1431,25 +1456,26 @@ var Control2 = ({ control }) => {
|
|
|
1431
1456
|
return null;
|
|
1432
1457
|
}
|
|
1433
1458
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1434
|
-
return /* @__PURE__ */
|
|
1459
|
+
return /* @__PURE__ */ React18.createElement(SettingsField, { bind: control.bind }, control.meta?.topDivider && /* @__PURE__ */ React18.createElement(Divider3, null), /* @__PURE__ */ React18.createElement(ControlTypeContainer, { layout }, control.label ? /* @__PURE__ */ React18.createElement(ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React18.createElement(Control, { type: control.type, props: control.props })));
|
|
1435
1460
|
};
|
|
1436
1461
|
|
|
1437
1462
|
// src/components/style-tab.tsx
|
|
1438
|
-
import * as
|
|
1463
|
+
import * as React78 from "react";
|
|
1439
1464
|
import { useState as useState12 } from "react";
|
|
1440
1465
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
1441
1466
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
1442
|
-
import { isExperimentActive as
|
|
1467
|
+
import { isExperimentActive as isExperimentActive10 } from "@elementor/editor-v1-adapters";
|
|
1443
1468
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
1444
|
-
import { Divider as Divider5, Stack as
|
|
1445
|
-
import { __ as
|
|
1469
|
+
import { Divider as Divider5, Stack as Stack17 } from "@elementor/ui";
|
|
1470
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
1446
1471
|
|
|
1447
1472
|
// src/contexts/styles-inheritance-context.tsx
|
|
1448
|
-
import * as
|
|
1473
|
+
import * as React19 from "react";
|
|
1449
1474
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
1450
1475
|
import { getWidgetsCache, useElementSetting as useElementSetting3 } from "@elementor/editor-elements";
|
|
1451
1476
|
import { classesPropTypeUtil as classesPropTypeUtil3 } from "@elementor/editor-props";
|
|
1452
1477
|
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
1478
|
+
import { getStylesSchema } from "@elementor/editor-styles";
|
|
1453
1479
|
import { stylesRepository as stylesRepository5 } from "@elementor/editor-styles-repository";
|
|
1454
1480
|
|
|
1455
1481
|
// src/hooks/use-styles-rerender.ts
|
|
@@ -1461,7 +1487,10 @@ var useStylesRerender = () => {
|
|
|
1461
1487
|
};
|
|
1462
1488
|
|
|
1463
1489
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1464
|
-
import {
|
|
1490
|
+
import {
|
|
1491
|
+
isEmpty,
|
|
1492
|
+
isTransformable
|
|
1493
|
+
} from "@elementor/editor-props";
|
|
1465
1494
|
|
|
1466
1495
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1467
1496
|
import { filterEmptyValues } from "@elementor/editor-props";
|
|
@@ -1594,13 +1623,14 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
1594
1623
|
const getStyles = ({ breakpoint, state }) => styleVariantsByMeta?.[getBreakpointKey(breakpoint)]?.[getStateKey(state)] ?? [];
|
|
1595
1624
|
return {
|
|
1596
1625
|
getSnapshot: createSnapshotsManager(getStyles, breakpointsRoot),
|
|
1597
|
-
getInheritanceChain: (snapshot, path) => {
|
|
1626
|
+
getInheritanceChain: (snapshot, path, topLevelPropType) => {
|
|
1598
1627
|
const [field, ...nextFields] = path;
|
|
1599
1628
|
let inheritanceChain = snapshot[field] ?? [];
|
|
1600
1629
|
if (nextFields.length > 0) {
|
|
1630
|
+
const filterPropType = getFilterPropType(topLevelPropType, nextFields);
|
|
1601
1631
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
1602
1632
|
...rest,
|
|
1603
|
-
value: getValueByPath(styleValue, nextFields)
|
|
1633
|
+
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
1604
1634
|
})).filter(({ value: styleValue }) => !isEmpty(styleValue));
|
|
1605
1635
|
}
|
|
1606
1636
|
return inheritanceChain;
|
|
@@ -1632,23 +1662,46 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1632
1662
|
});
|
|
1633
1663
|
return breakpointStateSlots;
|
|
1634
1664
|
}
|
|
1635
|
-
function getValueByPath(value, path) {
|
|
1665
|
+
function getValueByPath(value, path, filterPropType) {
|
|
1636
1666
|
if (!value || typeof value !== "object") {
|
|
1637
1667
|
return null;
|
|
1638
1668
|
}
|
|
1669
|
+
if (shouldUseOriginalValue(filterPropType, value)) {
|
|
1670
|
+
return value;
|
|
1671
|
+
}
|
|
1639
1672
|
return path.reduce((currentScope, key) => {
|
|
1640
1673
|
if (!currentScope) {
|
|
1641
1674
|
return null;
|
|
1642
1675
|
}
|
|
1643
1676
|
if (isTransformable(currentScope)) {
|
|
1644
|
-
return currentScope.value?.[key];
|
|
1677
|
+
return currentScope.value?.[key] ?? null;
|
|
1645
1678
|
}
|
|
1646
1679
|
if (typeof currentScope === "object") {
|
|
1647
|
-
return currentScope[key];
|
|
1680
|
+
return currentScope[key] ?? null;
|
|
1648
1681
|
}
|
|
1649
1682
|
return null;
|
|
1650
1683
|
}, value);
|
|
1651
1684
|
}
|
|
1685
|
+
function shouldUseOriginalValue(filterPropType, value) {
|
|
1686
|
+
return !!filterPropType && isTransformable(value) && filterPropType.key !== value.$$type;
|
|
1687
|
+
}
|
|
1688
|
+
var getFilterPropType = (propType, path) => {
|
|
1689
|
+
if (!propType || propType.kind !== "union") {
|
|
1690
|
+
return null;
|
|
1691
|
+
}
|
|
1692
|
+
return Object.values(propType.prop_types).find((type) => {
|
|
1693
|
+
return !!path.reduce((currentScope, key) => {
|
|
1694
|
+
if (currentScope?.kind !== "object") {
|
|
1695
|
+
return null;
|
|
1696
|
+
}
|
|
1697
|
+
const { shape } = currentScope;
|
|
1698
|
+
if (shape[key]) {
|
|
1699
|
+
return shape[key];
|
|
1700
|
+
}
|
|
1701
|
+
return null;
|
|
1702
|
+
}, type);
|
|
1703
|
+
}) ?? null;
|
|
1704
|
+
};
|
|
1652
1705
|
|
|
1653
1706
|
// src/contexts/styles-inheritance-context.tsx
|
|
1654
1707
|
var Context4 = createContext7(null);
|
|
@@ -1656,7 +1709,7 @@ function StyleInheritanceProvider({ children }) {
|
|
|
1656
1709
|
const styleDefs = useAppliedStyles();
|
|
1657
1710
|
const breakpointsTree = getBreakpointsTree();
|
|
1658
1711
|
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1659
|
-
return /* @__PURE__ */
|
|
1712
|
+
return /* @__PURE__ */ React19.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
1660
1713
|
}
|
|
1661
1714
|
function useStylesInheritanceSnapshot() {
|
|
1662
1715
|
const context = useContext7(Context4);
|
|
@@ -1674,11 +1727,13 @@ function useStylesInheritanceChain(path) {
|
|
|
1674
1727
|
if (!context) {
|
|
1675
1728
|
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
1676
1729
|
}
|
|
1730
|
+
const schema = getStylesSchema();
|
|
1731
|
+
const topLevelPropType = schema?.[path[0]];
|
|
1677
1732
|
const snapshot = useStylesInheritanceSnapshot();
|
|
1678
1733
|
if (!snapshot) {
|
|
1679
1734
|
return [];
|
|
1680
1735
|
}
|
|
1681
|
-
return context.getInheritanceChain(snapshot, path);
|
|
1736
|
+
return context.getInheritanceChain(snapshot, path, topLevelPropType);
|
|
1682
1737
|
}
|
|
1683
1738
|
var useAppliedStyles = () => {
|
|
1684
1739
|
const { element } = useElement();
|
|
@@ -1686,14 +1741,14 @@ var useAppliedStyles = () => {
|
|
|
1686
1741
|
const baseStyles = useBaseStyles();
|
|
1687
1742
|
useStylesRerender();
|
|
1688
1743
|
const classesProp = useElementSetting3(element.id, currentClassesProp);
|
|
1689
|
-
const appliedStyles = classesPropTypeUtil3.extract(classesProp);
|
|
1690
|
-
return stylesRepository5.all().filter((style) => appliedStyles
|
|
1744
|
+
const appliedStyles = classesPropTypeUtil3.extract(classesProp) ?? [];
|
|
1745
|
+
return stylesRepository5.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
1691
1746
|
};
|
|
1692
1747
|
var useBaseStyles = () => {
|
|
1693
1748
|
const { elementType } = useElement();
|
|
1694
1749
|
const widgetsCache = getWidgetsCache();
|
|
1695
1750
|
const widgetCache = widgetsCache?.[elementType.key];
|
|
1696
|
-
return Object.
|
|
1751
|
+
return Object.keys(widgetCache?.base_styles ?? {});
|
|
1697
1752
|
};
|
|
1698
1753
|
|
|
1699
1754
|
// src/hooks/use-active-style-def-id.ts
|
|
@@ -1723,13 +1778,13 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1723
1778
|
}
|
|
1724
1779
|
|
|
1725
1780
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1726
|
-
import * as
|
|
1781
|
+
import * as React28 from "react";
|
|
1727
1782
|
import { BackgroundControl } from "@elementor/editor-controls";
|
|
1728
1783
|
|
|
1729
1784
|
// src/controls-registry/styles-field.tsx
|
|
1730
|
-
import * as
|
|
1785
|
+
import * as React27 from "react";
|
|
1731
1786
|
import { ControlAdornmentsProvider, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
1732
|
-
import { getStylesSchema } from "@elementor/editor-styles";
|
|
1787
|
+
import { getStylesSchema as getStylesSchema2 } from "@elementor/editor-styles";
|
|
1733
1788
|
|
|
1734
1789
|
// src/hooks/use-styles-fields.ts
|
|
1735
1790
|
import { useMemo as useMemo3 } from "react";
|
|
@@ -1872,44 +1927,196 @@ function useStylesField(propName) {
|
|
|
1872
1927
|
}
|
|
1873
1928
|
|
|
1874
1929
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1875
|
-
import * as
|
|
1876
|
-
import { useState as useState8 } from "react";
|
|
1930
|
+
import * as React26 from "react";
|
|
1877
1931
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
1878
1932
|
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
1879
|
-
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, isElementsStylesProvider as isElementsStylesProvider3 } from "@elementor/editor-styles-repository";
|
|
1933
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3, isElementsStylesProvider as isElementsStylesProvider3 } from "@elementor/editor-styles-repository";
|
|
1934
|
+
import { isExperimentActive as isExperimentActive5 } from "@elementor/editor-v1-adapters";
|
|
1935
|
+
import { Tooltip as Tooltip5 } from "@elementor/ui";
|
|
1936
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
1937
|
+
|
|
1938
|
+
// src/styles-inheritance/consts.ts
|
|
1880
1939
|
import { isExperimentActive as isExperimentActive4 } from "@elementor/editor-v1-adapters";
|
|
1881
|
-
|
|
1882
|
-
|
|
1940
|
+
var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
1941
|
+
"background-color-overlay",
|
|
1942
|
+
"background-image-overlay",
|
|
1943
|
+
"background-gradient-overlay",
|
|
1944
|
+
"gradient-color-stop",
|
|
1945
|
+
"color-stop",
|
|
1946
|
+
"background-image-position-offset",
|
|
1947
|
+
"background-image-size-scale",
|
|
1948
|
+
"image-src",
|
|
1949
|
+
"image",
|
|
1950
|
+
"background-overlay"
|
|
1951
|
+
]);
|
|
1952
|
+
var isUsingIndicatorPopover = () => isExperimentActive4("e_indications_popover");
|
|
1883
1953
|
|
|
1884
1954
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1885
|
-
import * as
|
|
1886
|
-
import { useMemo as useMemo4 } from "react";
|
|
1887
|
-
import { createPropsResolver
|
|
1888
|
-
import { Card, CardContent,
|
|
1955
|
+
import * as React25 from "react";
|
|
1956
|
+
import { useMemo as useMemo4, useState as useState8 } from "react";
|
|
1957
|
+
import { createPropsResolver } from "@elementor/editor-canvas";
|
|
1958
|
+
import { Box as Box6, Card, CardContent, CloseButton, IconButton as IconButton3, Infotip, Stack as Stack7, Typography as Typography6 } from "@elementor/ui";
|
|
1959
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1960
|
+
|
|
1961
|
+
// src/components/section-content.tsx
|
|
1962
|
+
import { createContext as createContext8, useContext as useContext8, useRef as useRef3 } from "react";
|
|
1963
|
+
import * as React20 from "react";
|
|
1964
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
1965
|
+
var SectionContentRefContext = createContext8(null);
|
|
1966
|
+
var useSectionContentRef = () => useContext8(SectionContentRefContext);
|
|
1967
|
+
var SectionContent = ({ gap = 2, sx, children }) => {
|
|
1968
|
+
const ref = useRef3(null);
|
|
1969
|
+
return /* @__PURE__ */ React20.createElement(SectionContentRefContext.Provider, { value: ref }, /* @__PURE__ */ React20.createElement(Stack6, { gap, sx: { ...sx }, ref }, children));
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1972
|
+
// src/hooks/use-direction.ts
|
|
1973
|
+
import { useTheme } from "@elementor/ui";
|
|
1974
|
+
|
|
1975
|
+
// src/sync/get-elementor-globals.ts
|
|
1976
|
+
var getElementorConfig = () => {
|
|
1977
|
+
const extendedWindow = window;
|
|
1978
|
+
return extendedWindow.elementor?.config ?? {};
|
|
1979
|
+
};
|
|
1980
|
+
var getElementorFrontendConfig = () => {
|
|
1981
|
+
const extendedWindow = window;
|
|
1982
|
+
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1985
|
+
// src/hooks/use-direction.ts
|
|
1986
|
+
function useDirection() {
|
|
1987
|
+
const theme = useTheme();
|
|
1988
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
1989
|
+
return { isSiteRtl, isUiRtl };
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
// src/styles-inheritance/components/breakpoint-icon.tsx
|
|
1993
|
+
import * as React21 from "react";
|
|
1994
|
+
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
1995
|
+
import {
|
|
1996
|
+
DesktopIcon,
|
|
1997
|
+
LaptopIcon,
|
|
1998
|
+
MobileLandscapeIcon,
|
|
1999
|
+
MobilePortraitIcon,
|
|
2000
|
+
TabletLandscapeIcon,
|
|
2001
|
+
TabletPortraitIcon,
|
|
2002
|
+
WidescreenIcon
|
|
2003
|
+
} from "@elementor/icons";
|
|
2004
|
+
import { Tooltip as Tooltip3 } from "@elementor/ui";
|
|
2005
|
+
var SIZE3 = "tiny";
|
|
2006
|
+
var DEFAULT_BREAKPOINT2 = "desktop";
|
|
2007
|
+
var breakpointIconMap = {
|
|
2008
|
+
widescreen: WidescreenIcon,
|
|
2009
|
+
desktop: DesktopIcon,
|
|
2010
|
+
laptop: LaptopIcon,
|
|
2011
|
+
tablet_extra: TabletLandscapeIcon,
|
|
2012
|
+
tablet: TabletPortraitIcon,
|
|
2013
|
+
mobile_extra: MobileLandscapeIcon,
|
|
2014
|
+
mobile: MobilePortraitIcon
|
|
2015
|
+
};
|
|
2016
|
+
var BreakpointIcon = ({ breakpoint }) => {
|
|
2017
|
+
const breakpoints = useBreakpoints();
|
|
2018
|
+
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT2;
|
|
2019
|
+
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
2020
|
+
if (!IconComponent) {
|
|
2021
|
+
return null;
|
|
2022
|
+
}
|
|
2023
|
+
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2024
|
+
return /* @__PURE__ */ React21.createElement(Tooltip3, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2027
|
+
// src/styles-inheritance/components/label-chip.tsx
|
|
2028
|
+
import * as React22 from "react";
|
|
2029
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY } from "@elementor/editor-styles-repository";
|
|
2030
|
+
import { InfoCircleIcon } from "@elementor/icons";
|
|
2031
|
+
import { Chip as Chip4, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
2032
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
2033
|
+
var SIZE4 = "tiny";
|
|
2034
|
+
var LabelChip = ({ displayLabel, provider }) => {
|
|
2035
|
+
return /* @__PURE__ */ React22.createElement(
|
|
2036
|
+
Chip4,
|
|
2037
|
+
{
|
|
2038
|
+
label: displayLabel,
|
|
2039
|
+
size: SIZE4,
|
|
2040
|
+
color: "global",
|
|
2041
|
+
variant: "standard",
|
|
2042
|
+
state: "enabled",
|
|
2043
|
+
icon: provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY ? /* @__PURE__ */ React22.createElement(Tooltip4, { title: __6("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React22.createElement(InfoCircleIcon, { fontSize: SIZE4 })) : void 0,
|
|
2044
|
+
sx: (theme) => ({
|
|
2045
|
+
lineHeight: 1,
|
|
2046
|
+
flexWrap: "nowrap",
|
|
2047
|
+
alignItems: "center",
|
|
2048
|
+
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
2049
|
+
flexDirection: "row-reverse",
|
|
2050
|
+
".MuiChip-label": {
|
|
2051
|
+
overflow: "hidden",
|
|
2052
|
+
textOverflow: "ellipsis",
|
|
2053
|
+
whiteSpace: "nowrap"
|
|
2054
|
+
}
|
|
2055
|
+
})
|
|
2056
|
+
}
|
|
2057
|
+
);
|
|
2058
|
+
};
|
|
1889
2059
|
|
|
1890
|
-
// src/
|
|
1891
|
-
import
|
|
2060
|
+
// src/styles-inheritance/components/value-component.tsx
|
|
2061
|
+
import * as React23 from "react";
|
|
2062
|
+
import { Typography as Typography5 } from "@elementor/ui";
|
|
2063
|
+
var ValueComponent = ({ index, value }) => {
|
|
2064
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2065
|
+
Typography5,
|
|
2066
|
+
{
|
|
2067
|
+
variant: "caption",
|
|
2068
|
+
color: "text.tertiary",
|
|
2069
|
+
sx: {
|
|
2070
|
+
mt: "1px",
|
|
2071
|
+
textDecoration: index === 0 ? "none" : "line-through",
|
|
2072
|
+
overflow: "hidden",
|
|
2073
|
+
textOverflow: "ellipsis",
|
|
2074
|
+
whiteSpace: "nowrap"
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
value
|
|
2078
|
+
);
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
// src/styles-inheritance/components/action-icons.tsx
|
|
2082
|
+
import * as React24 from "react";
|
|
2083
|
+
import { Box as Box5 } from "@elementor/ui";
|
|
2084
|
+
var ActionIcons = () => /* @__PURE__ */ React24.createElement(Box5, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2085
|
+
|
|
2086
|
+
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2087
|
+
import { isValidElement, useEffect as useEffect3, useState as useState7 } from "react";
|
|
2088
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
2089
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1892
2090
|
var MAXIMUM_ITEMS = 2;
|
|
1893
2091
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
1894
2092
|
const [items3, setItems] = useState7([]);
|
|
1895
2093
|
useEffect3(() => {
|
|
1896
2094
|
(async () => {
|
|
1897
2095
|
const normalizedItems = await Promise.all(
|
|
1898
|
-
inheritanceChain.filter((
|
|
2096
|
+
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
1899
2097
|
);
|
|
1900
|
-
const validItems = normalizedItems.
|
|
2098
|
+
const validItems = normalizedItems.map((item) => ({
|
|
2099
|
+
...item,
|
|
2100
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __7("Base", "elementor")
|
|
2101
|
+
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
1901
2102
|
setItems(validItems);
|
|
1902
2103
|
})();
|
|
1903
2104
|
}, [inheritanceChain, bind, resolve]);
|
|
1904
2105
|
return items3;
|
|
1905
2106
|
};
|
|
2107
|
+
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
1906
2108
|
var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1909
|
-
|
|
2109
|
+
const {
|
|
2110
|
+
variant: {
|
|
2111
|
+
meta: { state, breakpoint }
|
|
2112
|
+
},
|
|
2113
|
+
style: { label, id }
|
|
2114
|
+
} = item;
|
|
2115
|
+
const displayLabel = `${label}${state ? ":" + state : ""}`;
|
|
1910
2116
|
return {
|
|
1911
|
-
id:
|
|
1912
|
-
|
|
2117
|
+
id: id ? id + (state ?? "") : index,
|
|
2118
|
+
provider: item.provider || "",
|
|
2119
|
+
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT3,
|
|
1913
2120
|
displayLabel,
|
|
1914
2121
|
value: await getTransformedValue(item, bind, resolve)
|
|
1915
2122
|
};
|
|
@@ -1921,75 +2128,171 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
1921
2128
|
[bind]: item.value
|
|
1922
2129
|
}
|
|
1923
2130
|
});
|
|
1924
|
-
|
|
2131
|
+
const value = result?.[bind] ?? result;
|
|
2132
|
+
if (isValidElement(value)) {
|
|
2133
|
+
return value;
|
|
2134
|
+
}
|
|
2135
|
+
if (typeof value === "object") {
|
|
2136
|
+
return JSON.stringify(value);
|
|
2137
|
+
}
|
|
2138
|
+
return String(value);
|
|
1925
2139
|
} catch {
|
|
1926
2140
|
return "";
|
|
1927
2141
|
}
|
|
1928
2142
|
};
|
|
1929
2143
|
|
|
2144
|
+
// src/styles-inheritance/styles-inheritance-transformers-registry.tsx
|
|
2145
|
+
import { createTransformersRegistry } from "@elementor/editor-canvas";
|
|
2146
|
+
var stylesInheritanceTransformersRegistry = createTransformersRegistry();
|
|
2147
|
+
|
|
1930
2148
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1931
|
-
var
|
|
2149
|
+
var SIZE5 = "tiny";
|
|
2150
|
+
var StyleIndicatorInfotip = ({ inheritanceChain, propType, path, label, children }) => {
|
|
2151
|
+
const [open, setOpen] = useState8(false);
|
|
2152
|
+
const { isSiteRtl } = useDirection();
|
|
1932
2153
|
const key = path.join(".");
|
|
2154
|
+
const sectionContentRef = useSectionContentRef();
|
|
2155
|
+
const sectionContentWidth = sectionContentRef?.current?.offsetWidth ?? 320;
|
|
1933
2156
|
const resolve = useMemo4(() => {
|
|
1934
2157
|
return createPropsResolver({
|
|
1935
|
-
transformers:
|
|
2158
|
+
transformers: stylesInheritanceTransformersRegistry,
|
|
1936
2159
|
schema: { [key]: propType }
|
|
1937
2160
|
});
|
|
1938
2161
|
}, [key, propType]);
|
|
1939
2162
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
1940
|
-
|
|
1941
|
-
|
|
2163
|
+
const toggleOpen = () => setOpen((prev) => !prev);
|
|
2164
|
+
const closeInfotip = () => {
|
|
2165
|
+
setOpen(false);
|
|
2166
|
+
};
|
|
2167
|
+
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2168
|
+
const infotipContent = /* @__PURE__ */ React25.createElement(
|
|
2169
|
+
Card,
|
|
1942
2170
|
{
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
2171
|
+
elevation: 0,
|
|
2172
|
+
sx: {
|
|
2173
|
+
width: `${sectionContentWidth}px`,
|
|
2174
|
+
maxWidth: 500,
|
|
2175
|
+
overflowX: "hidden"
|
|
2176
|
+
}
|
|
2177
|
+
},
|
|
2178
|
+
/* @__PURE__ */ React25.createElement(
|
|
2179
|
+
CardContent,
|
|
2180
|
+
{
|
|
2181
|
+
sx: {
|
|
2182
|
+
display: "flex",
|
|
2183
|
+
gap: 0.5,
|
|
2184
|
+
flexDirection: "column",
|
|
2185
|
+
p: 0,
|
|
2186
|
+
"&:last-child": {
|
|
2187
|
+
pb: 0
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
/* @__PURE__ */ React25.createElement(Stack7, { direction: "row", alignItems: "center", sx: { pl: 1.5, pr: 0.5, minHeight: 36, py: 0.5 } }, /* @__PURE__ */ React25.createElement(Typography6, { variant: "subtitle2", color: "secondary", sx: { fontSize: 12, fontWeight: "500" } }, __8("Style origin", "elementor")), /* @__PURE__ */ React25.createElement(
|
|
2192
|
+
CloseButton,
|
|
2193
|
+
{
|
|
2194
|
+
slotProps: { icon: { fontSize: SIZE5 } },
|
|
2195
|
+
sx: { ml: "auto" },
|
|
2196
|
+
onClick: closeInfotip
|
|
2197
|
+
}
|
|
2198
|
+
)),
|
|
2199
|
+
/* @__PURE__ */ React25.createElement(Stack7, { gap: 1.5, sx: { pl: 2, pr: 1, pb: 2, overflowX: "hidden", overflowY: "auto" }, role: "list" }, items3.map((item, index) => {
|
|
2200
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2201
|
+
Box6,
|
|
2202
|
+
{
|
|
2203
|
+
key: item.id,
|
|
2204
|
+
display: "flex",
|
|
2205
|
+
gap: 0.5,
|
|
2206
|
+
role: "listitem",
|
|
2207
|
+
"aria-label": __8("Inheritance item: %s", "elementor").replace(
|
|
2208
|
+
"%s",
|
|
2209
|
+
item.displayLabel
|
|
2210
|
+
)
|
|
2211
|
+
},
|
|
2212
|
+
/* @__PURE__ */ React25.createElement(Box6, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React25.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React25.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React25.createElement(ValueComponent, { index, value: item.value })),
|
|
2213
|
+
/* @__PURE__ */ React25.createElement(ActionIcons, null)
|
|
2214
|
+
);
|
|
2215
|
+
}))
|
|
2216
|
+
)
|
|
2217
|
+
);
|
|
2218
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2219
|
+
Infotip,
|
|
2220
|
+
{
|
|
2221
|
+
placement: "top",
|
|
2222
|
+
content: infotipContent,
|
|
2223
|
+
open,
|
|
2224
|
+
onClose: closeInfotip,
|
|
2225
|
+
disableHoverListener: true,
|
|
2226
|
+
componentsProps: {
|
|
2227
|
+
tooltip: {
|
|
2228
|
+
sx: {
|
|
2229
|
+
mx: 2
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
slotProps: {
|
|
2234
|
+
popper: {
|
|
2235
|
+
modifiers: [
|
|
2236
|
+
{
|
|
2237
|
+
name: "offset",
|
|
2238
|
+
options: { offset: [forceInfotipAlignLeft, 0] }
|
|
2239
|
+
}
|
|
2240
|
+
]
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
},
|
|
2244
|
+
/* @__PURE__ */ React25.createElement(IconButton3, { onClick: toggleOpen, "aria-label": label, sx: { my: "-1px" } }, children)
|
|
2245
|
+
);
|
|
1946
2246
|
};
|
|
1947
2247
|
|
|
1948
2248
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1949
2249
|
var StylesInheritanceIndicator = () => {
|
|
1950
|
-
const
|
|
1951
|
-
const { value, path, propType } = useBoundProp();
|
|
2250
|
+
const { path, propType } = useBoundProp();
|
|
1952
2251
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1953
|
-
const isUsingNestedProps =
|
|
2252
|
+
const isUsingNestedProps = isExperimentActive5(EXPERIMENTAL_FEATURES.V_3_30);
|
|
1954
2253
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
1955
2254
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
1956
2255
|
if (!inheritanceChain.length) {
|
|
1957
2256
|
return null;
|
|
1958
2257
|
}
|
|
1959
|
-
const
|
|
1960
|
-
|
|
2258
|
+
const currentItem = inheritanceChain.find(
|
|
2259
|
+
({
|
|
2260
|
+
style,
|
|
2261
|
+
variant: {
|
|
2262
|
+
meta: { breakpoint, state }
|
|
2263
|
+
}
|
|
2264
|
+
}) => style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state
|
|
2265
|
+
);
|
|
2266
|
+
const hasValue = !isEmpty2(currentItem?.value);
|
|
2267
|
+
const [actualStyle] = inheritanceChain;
|
|
2268
|
+
if (actualStyle.provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3) {
|
|
1961
2269
|
return null;
|
|
1962
2270
|
}
|
|
1963
|
-
const
|
|
1964
|
-
const isFinalValue = style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state;
|
|
1965
|
-
const hasValue = !isEmpty2(value);
|
|
2271
|
+
const isFinalValue = currentItem === actualStyle;
|
|
1966
2272
|
const label = getLabel({ isFinalValue, hasValue });
|
|
1967
2273
|
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
return /* @__PURE__ */ React20.createElement(StyleIndicator, { variant: variantType, "aria-label": label });
|
|
2274
|
+
if (!isUsingIndicatorPopover()) {
|
|
2275
|
+
return /* @__PURE__ */ React26.createElement(Tooltip5, { title: __9("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React26.createElement(StyleIndicator, { variant: variantType, "aria-label": label }));
|
|
1971
2276
|
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
Infotip,
|
|
2277
|
+
return /* @__PURE__ */ React26.createElement(
|
|
2278
|
+
StyleIndicatorInfotip,
|
|
1975
2279
|
{
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
trigger: "manual"
|
|
2280
|
+
inheritanceChain,
|
|
2281
|
+
path: finalPath,
|
|
2282
|
+
propType,
|
|
2283
|
+
label
|
|
1981
2284
|
},
|
|
1982
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ React26.createElement(StyleIndicator, { variant: variantType })
|
|
1983
2286
|
);
|
|
1984
2287
|
};
|
|
1985
2288
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
1986
2289
|
if (isFinalValue) {
|
|
1987
|
-
return
|
|
2290
|
+
return __9("This is the final value", "elementor");
|
|
1988
2291
|
}
|
|
1989
2292
|
if (hasValue) {
|
|
1990
|
-
return
|
|
2293
|
+
return __9("This value is overridden by another style", "elementor");
|
|
1991
2294
|
}
|
|
1992
|
-
return
|
|
2295
|
+
return __9("This has value from another style", "elementor");
|
|
1993
2296
|
};
|
|
1994
2297
|
var getVariant = ({
|
|
1995
2298
|
isFinalValue,
|
|
@@ -2008,14 +2311,15 @@ var getVariant = ({
|
|
|
2008
2311
|
// src/controls-registry/styles-field.tsx
|
|
2009
2312
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
2010
2313
|
const [value, setValue] = useStylesField(bind);
|
|
2011
|
-
const
|
|
2314
|
+
const { canEdit } = useStyle();
|
|
2315
|
+
const stylesSchema = getStylesSchema2();
|
|
2012
2316
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2013
2317
|
const values = { [bind]: value };
|
|
2014
2318
|
const placeholderValues = { [bind]: placeholder };
|
|
2015
2319
|
const setValues = (newValue) => {
|
|
2016
2320
|
setValue(newValue[bind]);
|
|
2017
2321
|
};
|
|
2018
|
-
return /* @__PURE__ */
|
|
2322
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2019
2323
|
ControlAdornmentsProvider,
|
|
2020
2324
|
{
|
|
2021
2325
|
items: [
|
|
@@ -2025,59 +2329,62 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2025
2329
|
}
|
|
2026
2330
|
]
|
|
2027
2331
|
},
|
|
2028
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ React27.createElement(
|
|
2029
2333
|
PropProvider2,
|
|
2030
2334
|
{
|
|
2031
2335
|
propType,
|
|
2032
2336
|
value: values,
|
|
2033
2337
|
setValue: setValues,
|
|
2034
|
-
placeholder: placeholderValues
|
|
2338
|
+
placeholder: placeholderValues,
|
|
2339
|
+
disabled: !canEdit
|
|
2035
2340
|
},
|
|
2036
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ React27.createElement(PropKeyProvider2, { bind }, children)
|
|
2037
2342
|
)
|
|
2038
2343
|
);
|
|
2039
2344
|
};
|
|
2040
2345
|
|
|
2041
2346
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2042
2347
|
var BackgroundSection = () => {
|
|
2043
|
-
return /* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ React28.createElement(SectionContent, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React28.createElement(BackgroundControl, null)));
|
|
2044
2349
|
};
|
|
2045
2350
|
|
|
2046
2351
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2047
|
-
import * as
|
|
2352
|
+
import * as React37 from "react";
|
|
2048
2353
|
|
|
2049
2354
|
// src/components/panel-divider.tsx
|
|
2050
|
-
import * as
|
|
2355
|
+
import * as React29 from "react";
|
|
2051
2356
|
import { Divider as Divider4 } from "@elementor/ui";
|
|
2052
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
2053
|
-
|
|
2054
|
-
// src/components/section-content.tsx
|
|
2055
|
-
import * as React24 from "react";
|
|
2056
|
-
import { Stack as Stack6 } from "@elementor/ui";
|
|
2057
|
-
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React24.createElement(Stack6, { gap, sx: { ...sx } }, children);
|
|
2357
|
+
var PanelDivider = () => /* @__PURE__ */ React29.createElement(Divider4, { sx: { my: 0.5 } });
|
|
2058
2358
|
|
|
2059
2359
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2060
|
-
import * as
|
|
2061
|
-
import { __ as
|
|
2360
|
+
import * as React35 from "react";
|
|
2361
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
2062
2362
|
|
|
2063
2363
|
// src/components/add-or-remove-content.tsx
|
|
2064
|
-
import * as
|
|
2364
|
+
import * as React31 from "react";
|
|
2065
2365
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
2066
|
-
import { Collapse as Collapse2, IconButton as
|
|
2366
|
+
import { Collapse as Collapse2, IconButton as IconButton4, Stack as Stack9 } from "@elementor/ui";
|
|
2067
2367
|
|
|
2068
2368
|
// src/components/control-label.tsx
|
|
2069
|
-
import * as
|
|
2369
|
+
import * as React30 from "react";
|
|
2070
2370
|
import { ControlAdornments, ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
2071
|
-
import { Stack as
|
|
2371
|
+
import { Stack as Stack8 } from "@elementor/ui";
|
|
2072
2372
|
var ControlLabel = ({ children }) => {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ React30.createElement(Stack8, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React30.createElement(ControlFormLabel2, null, children), /* @__PURE__ */ React30.createElement(ControlAdornments, null));
|
|
2074
2374
|
};
|
|
2075
2375
|
|
|
2076
2376
|
// src/components/add-or-remove-content.tsx
|
|
2077
|
-
var
|
|
2078
|
-
var AddOrRemoveContent = ({
|
|
2079
|
-
|
|
2080
|
-
|
|
2377
|
+
var SIZE6 = "tiny";
|
|
2378
|
+
var AddOrRemoveContent = ({
|
|
2379
|
+
isAdded,
|
|
2380
|
+
label,
|
|
2381
|
+
onAdd,
|
|
2382
|
+
onRemove,
|
|
2383
|
+
children,
|
|
2384
|
+
disabled
|
|
2385
|
+
}) => {
|
|
2386
|
+
return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(
|
|
2387
|
+
Stack9,
|
|
2081
2388
|
{
|
|
2082
2389
|
direction: "row",
|
|
2083
2390
|
sx: {
|
|
@@ -2086,102 +2393,80 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
2086
2393
|
marginInlineEnd: -0.75
|
|
2087
2394
|
}
|
|
2088
2395
|
},
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
isAdded ? /* @__PURE__ */
|
|
2091
|
-
), /* @__PURE__ */
|
|
2396
|
+
/* @__PURE__ */ React31.createElement(ControlLabel, null, label),
|
|
2397
|
+
isAdded ? /* @__PURE__ */ React31.createElement(IconButton4, { size: SIZE6, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React31.createElement(MinusIcon, { fontSize: SIZE6 })) : /* @__PURE__ */ React31.createElement(IconButton4, { size: SIZE6, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React31.createElement(PlusIcon, { fontSize: SIZE6 }))
|
|
2398
|
+
), /* @__PURE__ */ React31.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React31.createElement(SectionContent, null, children)));
|
|
2092
2399
|
};
|
|
2093
2400
|
|
|
2094
2401
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2095
|
-
import * as
|
|
2402
|
+
import * as React32 from "react";
|
|
2096
2403
|
import { ColorControl } from "@elementor/editor-controls";
|
|
2097
2404
|
import { Grid } from "@elementor/ui";
|
|
2098
|
-
import { __ as
|
|
2405
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
2099
2406
|
var BorderColorField = () => {
|
|
2100
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ React32.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React32.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel, null, __10("Border color", "elementor"))), /* @__PURE__ */ React32.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ColorControl, null))));
|
|
2101
2408
|
};
|
|
2102
2409
|
|
|
2103
2410
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2104
|
-
import * as
|
|
2411
|
+
import * as React33 from "react";
|
|
2105
2412
|
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
2106
2413
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
2107
|
-
import { __ as
|
|
2414
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
2108
2415
|
var borderStyles = [
|
|
2109
|
-
{ value: "none", label:
|
|
2110
|
-
{ value: "solid", label:
|
|
2111
|
-
{ value: "dashed", label:
|
|
2112
|
-
{ value: "dotted", label:
|
|
2113
|
-
{ value: "double", label:
|
|
2114
|
-
{ value: "groove", label:
|
|
2115
|
-
{ value: "ridge", label:
|
|
2116
|
-
{ value: "inset", label:
|
|
2117
|
-
{ value: "outset", label:
|
|
2416
|
+
{ value: "none", label: __11("None", "elementor") },
|
|
2417
|
+
{ value: "solid", label: __11("Solid", "elementor") },
|
|
2418
|
+
{ value: "dashed", label: __11("Dashed", "elementor") },
|
|
2419
|
+
{ value: "dotted", label: __11("Dotted", "elementor") },
|
|
2420
|
+
{ value: "double", label: __11("Double", "elementor") },
|
|
2421
|
+
{ value: "groove", label: __11("Groove", "elementor") },
|
|
2422
|
+
{ value: "ridge", label: __11("Ridge", "elementor") },
|
|
2423
|
+
{ value: "inset", label: __11("Inset", "elementor") },
|
|
2424
|
+
{ value: "outset", label: __11("Outset", "elementor") }
|
|
2118
2425
|
];
|
|
2119
2426
|
var BorderStyleField = () => {
|
|
2120
|
-
return /* @__PURE__ */
|
|
2427
|
+
return /* @__PURE__ */ React33.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React33.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, __11("Border type", "elementor"))), /* @__PURE__ */ React33.createElement(Grid2, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React33.createElement(SelectControl2, { options: borderStyles }))));
|
|
2121
2428
|
};
|
|
2122
2429
|
|
|
2123
2430
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2124
|
-
import * as
|
|
2431
|
+
import * as React34 from "react";
|
|
2125
2432
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
2126
2433
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
2127
2434
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
2128
2435
|
import { withDirection } from "@elementor/ui";
|
|
2129
|
-
import { __ as
|
|
2130
|
-
|
|
2131
|
-
// src/hooks/use-direction.ts
|
|
2132
|
-
import { useTheme } from "@elementor/ui";
|
|
2133
|
-
|
|
2134
|
-
// src/sync/get-elementor-globals.ts
|
|
2135
|
-
var getElementorConfig = () => {
|
|
2136
|
-
const extendedWindow = window;
|
|
2137
|
-
return extendedWindow.elementor?.config ?? {};
|
|
2138
|
-
};
|
|
2139
|
-
var getElementorFrontendConfig = () => {
|
|
2140
|
-
const extendedWindow = window;
|
|
2141
|
-
return extendedWindow.elementorFrontend?.config ?? {};
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
|
-
// src/hooks/use-direction.ts
|
|
2145
|
-
function useDirection() {
|
|
2146
|
-
const theme = useTheme();
|
|
2147
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2148
|
-
return { isSiteRtl, isUiRtl };
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2436
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
2152
2437
|
var InlineStartIcon = withDirection(SideRightIcon);
|
|
2153
2438
|
var InlineEndIcon = withDirection(SideLeftIcon);
|
|
2154
2439
|
var getEdges = (isSiteRtl) => [
|
|
2155
2440
|
{
|
|
2156
|
-
label:
|
|
2157
|
-
icon: /* @__PURE__ */
|
|
2441
|
+
label: __12("Top", "elementor"),
|
|
2442
|
+
icon: /* @__PURE__ */ React34.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
2158
2443
|
bind: "block-start"
|
|
2159
2444
|
},
|
|
2160
2445
|
{
|
|
2161
|
-
label: isSiteRtl ?
|
|
2162
|
-
icon: /* @__PURE__ */
|
|
2446
|
+
label: isSiteRtl ? __12("Left", "elementor") : __12("Right", "elementor"),
|
|
2447
|
+
icon: /* @__PURE__ */ React34.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
2163
2448
|
bind: "inline-end"
|
|
2164
2449
|
},
|
|
2165
2450
|
{
|
|
2166
|
-
label:
|
|
2167
|
-
icon: /* @__PURE__ */
|
|
2451
|
+
label: __12("Bottom", "elementor"),
|
|
2452
|
+
icon: /* @__PURE__ */ React34.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
2168
2453
|
bind: "block-end"
|
|
2169
2454
|
},
|
|
2170
2455
|
{
|
|
2171
|
-
label: isSiteRtl ?
|
|
2172
|
-
icon: /* @__PURE__ */
|
|
2456
|
+
label: isSiteRtl ? __12("Right", "elementor") : __12("Left", "elementor"),
|
|
2457
|
+
icon: /* @__PURE__ */ React34.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
2173
2458
|
bind: "inline-start"
|
|
2174
2459
|
}
|
|
2175
2460
|
];
|
|
2176
2461
|
var BorderWidthField = () => {
|
|
2177
2462
|
const { isSiteRtl } = useDirection();
|
|
2178
|
-
return /* @__PURE__ */
|
|
2463
|
+
return /* @__PURE__ */ React34.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React34.createElement(
|
|
2179
2464
|
EqualUnequalSizesControl,
|
|
2180
2465
|
{
|
|
2181
2466
|
items: getEdges(isSiteRtl),
|
|
2182
|
-
label:
|
|
2183
|
-
icon: /* @__PURE__ */
|
|
2184
|
-
tooltipLabel:
|
|
2467
|
+
label: __12("Border width", "elementor"),
|
|
2468
|
+
icon: /* @__PURE__ */ React34.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
2469
|
+
tooltipLabel: __12("Adjust borders", "elementor"),
|
|
2185
2470
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
2186
2471
|
}
|
|
2187
2472
|
));
|
|
@@ -2194,6 +2479,7 @@ var initialBorder = {
|
|
|
2194
2479
|
"border-style": { $$type: "string", value: "solid" }
|
|
2195
2480
|
};
|
|
2196
2481
|
var BorderField = () => {
|
|
2482
|
+
const { canEdit } = useStyle();
|
|
2197
2483
|
const [border, setBorder] = useStylesFields(Object.keys(initialBorder));
|
|
2198
2484
|
const addBorder = () => {
|
|
2199
2485
|
setBorder(initialBorder);
|
|
@@ -2206,22 +2492,23 @@ var BorderField = () => {
|
|
|
2206
2492
|
});
|
|
2207
2493
|
};
|
|
2208
2494
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
2209
|
-
return /* @__PURE__ */
|
|
2495
|
+
return /* @__PURE__ */ React35.createElement(
|
|
2210
2496
|
AddOrRemoveContent,
|
|
2211
2497
|
{
|
|
2212
|
-
label:
|
|
2498
|
+
label: __13("Border", "elementor"),
|
|
2213
2499
|
isAdded: hasBorder,
|
|
2214
2500
|
onAdd: addBorder,
|
|
2215
|
-
onRemove: removeBorder
|
|
2501
|
+
onRemove: removeBorder,
|
|
2502
|
+
disabled: !canEdit
|
|
2216
2503
|
},
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2219
|
-
/* @__PURE__ */
|
|
2504
|
+
/* @__PURE__ */ React35.createElement(BorderWidthField, null),
|
|
2505
|
+
/* @__PURE__ */ React35.createElement(BorderColorField, null),
|
|
2506
|
+
/* @__PURE__ */ React35.createElement(BorderStyleField, null)
|
|
2220
2507
|
);
|
|
2221
2508
|
};
|
|
2222
2509
|
|
|
2223
2510
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2224
|
-
import * as
|
|
2511
|
+
import * as React36 from "react";
|
|
2225
2512
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
2226
2513
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
2227
2514
|
import {
|
|
@@ -2232,66 +2519,66 @@ import {
|
|
|
2232
2519
|
RadiusTopRightIcon
|
|
2233
2520
|
} from "@elementor/icons";
|
|
2234
2521
|
import { withDirection as withDirection2 } from "@elementor/ui";
|
|
2235
|
-
import { __ as
|
|
2522
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
2236
2523
|
var StartStartIcon = withDirection2(RadiusTopLeftIcon);
|
|
2237
2524
|
var StartEndIcon = withDirection2(RadiusTopRightIcon);
|
|
2238
2525
|
var EndStartIcon = withDirection2(RadiusBottomLeftIcon);
|
|
2239
2526
|
var EndEndIcon = withDirection2(RadiusBottomRightIcon);
|
|
2240
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2241
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2242
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2243
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2527
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __14("Top right", "elementor") : __14("Top left", "elementor");
|
|
2528
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __14("Top left", "elementor") : __14("Top right", "elementor");
|
|
2529
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __14("Bottom right", "elementor") : __14("Bottom left", "elementor");
|
|
2530
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __14("Bottom left", "elementor") : __14("Bottom right", "elementor");
|
|
2244
2531
|
var getCorners = (isSiteRtl) => [
|
|
2245
2532
|
{
|
|
2246
2533
|
label: getStartStartLabel(isSiteRtl),
|
|
2247
|
-
icon: /* @__PURE__ */
|
|
2534
|
+
icon: /* @__PURE__ */ React36.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2248
2535
|
bind: "start-start"
|
|
2249
2536
|
},
|
|
2250
2537
|
{
|
|
2251
2538
|
label: getStartEndLabel(isSiteRtl),
|
|
2252
|
-
icon: /* @__PURE__ */
|
|
2539
|
+
icon: /* @__PURE__ */ React36.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2253
2540
|
bind: "start-end"
|
|
2254
2541
|
},
|
|
2255
2542
|
{
|
|
2256
2543
|
label: getEndStartLabel(isSiteRtl),
|
|
2257
|
-
icon: /* @__PURE__ */
|
|
2544
|
+
icon: /* @__PURE__ */ React36.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2258
2545
|
bind: "end-start"
|
|
2259
2546
|
},
|
|
2260
2547
|
{
|
|
2261
2548
|
label: getEndEndLabel(isSiteRtl),
|
|
2262
|
-
icon: /* @__PURE__ */
|
|
2549
|
+
icon: /* @__PURE__ */ React36.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2263
2550
|
bind: "end-end"
|
|
2264
2551
|
}
|
|
2265
2552
|
];
|
|
2266
2553
|
var BorderRadiusField = () => {
|
|
2267
2554
|
const { isSiteRtl } = useDirection();
|
|
2268
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React36.createElement(
|
|
2269
2556
|
EqualUnequalSizesControl2,
|
|
2270
2557
|
{
|
|
2271
2558
|
items: getCorners(isSiteRtl),
|
|
2272
|
-
label:
|
|
2273
|
-
icon: /* @__PURE__ */
|
|
2274
|
-
tooltipLabel:
|
|
2559
|
+
label: __14("Border radius", "elementor"),
|
|
2560
|
+
icon: /* @__PURE__ */ React36.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
2561
|
+
tooltipLabel: __14("Adjust corners", "elementor"),
|
|
2275
2562
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
2276
2563
|
}
|
|
2277
2564
|
));
|
|
2278
2565
|
};
|
|
2279
2566
|
|
|
2280
2567
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2281
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2568
|
+
var BorderSection = () => /* @__PURE__ */ React37.createElement(SectionContent, null, /* @__PURE__ */ React37.createElement(BorderRadiusField, null), /* @__PURE__ */ React37.createElement(PanelDivider, null), /* @__PURE__ */ React37.createElement(BorderField, null));
|
|
2282
2569
|
|
|
2283
2570
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2284
|
-
import * as
|
|
2571
|
+
import * as React38 from "react";
|
|
2285
2572
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
2286
2573
|
var EffectsSection = () => {
|
|
2287
|
-
return /* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React38.createElement(BoxShadowRepeaterControl, null)));
|
|
2288
2575
|
};
|
|
2289
2576
|
|
|
2290
2577
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2291
|
-
import * as
|
|
2578
|
+
import * as React50 from "react";
|
|
2292
2579
|
import { ControlFormLabel as ControlFormLabel3 } from "@elementor/editor-controls";
|
|
2293
2580
|
import { useParentElement } from "@elementor/editor-elements";
|
|
2294
|
-
import { __ as
|
|
2581
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
2295
2582
|
|
|
2296
2583
|
// src/hooks/use-computed-style.ts
|
|
2297
2584
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -2319,7 +2606,7 @@ function useComputedStyle(elementId) {
|
|
|
2319
2606
|
}
|
|
2320
2607
|
|
|
2321
2608
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2322
|
-
import * as
|
|
2609
|
+
import * as React40 from "react";
|
|
2323
2610
|
import { ToggleControl } from "@elementor/editor-controls";
|
|
2324
2611
|
import {
|
|
2325
2612
|
JustifyBottomIcon,
|
|
@@ -2329,12 +2616,12 @@ import {
|
|
|
2329
2616
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
2330
2617
|
JustifyTopIcon
|
|
2331
2618
|
} from "@elementor/icons";
|
|
2332
|
-
import { DirectionProvider, Stack as
|
|
2333
|
-
import { __ as
|
|
2619
|
+
import { DirectionProvider, Stack as Stack10, ThemeProvider, withDirection as withDirection3 } from "@elementor/ui";
|
|
2620
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
2334
2621
|
|
|
2335
2622
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2336
|
-
import * as
|
|
2337
|
-
import { useRef as
|
|
2623
|
+
import * as React39 from "react";
|
|
2624
|
+
import { useRef as useRef4 } from "react";
|
|
2338
2625
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
2339
2626
|
var CLOCKWISE_ANGLES = {
|
|
2340
2627
|
row: 0,
|
|
@@ -2355,9 +2642,9 @@ var RotatedIcon = ({
|
|
|
2355
2642
|
offset = 0,
|
|
2356
2643
|
disableRotationForReversed = false
|
|
2357
2644
|
}) => {
|
|
2358
|
-
const rotate =
|
|
2645
|
+
const rotate = useRef4(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2359
2646
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2360
|
-
return /* @__PURE__ */
|
|
2647
|
+
return /* @__PURE__ */ React39.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2361
2648
|
};
|
|
2362
2649
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2363
2650
|
const [direction] = useStylesField("flex-direction");
|
|
@@ -2386,48 +2673,48 @@ var iconProps = {
|
|
|
2386
2673
|
var options = [
|
|
2387
2674
|
{
|
|
2388
2675
|
value: "start",
|
|
2389
|
-
label:
|
|
2390
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2676
|
+
label: __15("Start", "elementor"),
|
|
2677
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2391
2678
|
showTooltip: true
|
|
2392
2679
|
},
|
|
2393
2680
|
{
|
|
2394
2681
|
value: "center",
|
|
2395
|
-
label:
|
|
2396
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2682
|
+
label: __15("Center", "elementor"),
|
|
2683
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
2397
2684
|
showTooltip: true
|
|
2398
2685
|
},
|
|
2399
2686
|
{
|
|
2400
2687
|
value: "end",
|
|
2401
|
-
label:
|
|
2402
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2688
|
+
label: __15("End", "elementor"),
|
|
2689
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2403
2690
|
showTooltip: true
|
|
2404
2691
|
},
|
|
2405
2692
|
{
|
|
2406
2693
|
value: "space-between",
|
|
2407
|
-
label:
|
|
2408
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2694
|
+
label: __15("Space between", "elementor"),
|
|
2695
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
2409
2696
|
showTooltip: true
|
|
2410
2697
|
},
|
|
2411
2698
|
{
|
|
2412
2699
|
value: "space-around",
|
|
2413
|
-
label:
|
|
2414
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2700
|
+
label: __15("Space around", "elementor"),
|
|
2701
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
2415
2702
|
showTooltip: true
|
|
2416
2703
|
},
|
|
2417
2704
|
{
|
|
2418
2705
|
value: "space-evenly",
|
|
2419
|
-
label:
|
|
2420
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2706
|
+
label: __15("Space evenly", "elementor"),
|
|
2707
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
2421
2708
|
showTooltip: true
|
|
2422
2709
|
}
|
|
2423
2710
|
];
|
|
2424
2711
|
var AlignContentField = () => {
|
|
2425
2712
|
const { isSiteRtl } = useDirection();
|
|
2426
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ React40.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(ThemeProvider, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React40.createElement(Stack10, { gap: 1 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, __15("Align content", "elementor")), /* @__PURE__ */ React40.createElement(ToggleControl, { options, fullWidth: true })))));
|
|
2427
2714
|
};
|
|
2428
2715
|
|
|
2429
2716
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2430
|
-
import * as
|
|
2717
|
+
import * as React41 from "react";
|
|
2431
2718
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
2432
2719
|
import {
|
|
2433
2720
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -2436,7 +2723,7 @@ import {
|
|
|
2436
2723
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
2437
2724
|
} from "@elementor/icons";
|
|
2438
2725
|
import { DirectionProvider as DirectionProvider2, Grid as Grid3, ThemeProvider as ThemeProvider2, withDirection as withDirection4 } from "@elementor/ui";
|
|
2439
|
-
import { __ as
|
|
2726
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
2440
2727
|
var StartIcon2 = withDirection4(LayoutAlignLeftIcon);
|
|
2441
2728
|
var EndIcon2 = withDirection4(LayoutAlignRightIcon);
|
|
2442
2729
|
var iconProps2 = {
|
|
@@ -2446,36 +2733,36 @@ var iconProps2 = {
|
|
|
2446
2733
|
var options2 = [
|
|
2447
2734
|
{
|
|
2448
2735
|
value: "start",
|
|
2449
|
-
label:
|
|
2450
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2736
|
+
label: __16("Start", "elementor"),
|
|
2737
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2451
2738
|
showTooltip: true
|
|
2452
2739
|
},
|
|
2453
2740
|
{
|
|
2454
2741
|
value: "center",
|
|
2455
|
-
label:
|
|
2456
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2742
|
+
label: __16("Center", "elementor"),
|
|
2743
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
2457
2744
|
showTooltip: true
|
|
2458
2745
|
},
|
|
2459
2746
|
{
|
|
2460
2747
|
value: "end",
|
|
2461
|
-
label:
|
|
2462
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2748
|
+
label: __16("End", "elementor"),
|
|
2749
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2463
2750
|
showTooltip: true
|
|
2464
2751
|
},
|
|
2465
2752
|
{
|
|
2466
2753
|
value: "stretch",
|
|
2467
|
-
label:
|
|
2468
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2754
|
+
label: __16("Stretch", "elementor"),
|
|
2755
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
2469
2756
|
showTooltip: true
|
|
2470
2757
|
}
|
|
2471
2758
|
];
|
|
2472
2759
|
var AlignItemsField = () => {
|
|
2473
2760
|
const { isSiteRtl } = useDirection();
|
|
2474
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ React41.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(ThemeProvider2, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React41.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __16("Align items", "elementor"))), /* @__PURE__ */ React41.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React41.createElement(ToggleControl2, { options: options2 }))))));
|
|
2475
2762
|
};
|
|
2476
2763
|
|
|
2477
2764
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2478
|
-
import * as
|
|
2765
|
+
import * as React42 from "react";
|
|
2479
2766
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
2480
2767
|
import {
|
|
2481
2768
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -2484,7 +2771,7 @@ import {
|
|
|
2484
2771
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
2485
2772
|
} from "@elementor/icons";
|
|
2486
2773
|
import { DirectionProvider as DirectionProvider3, Grid as Grid4, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
|
|
2487
|
-
import { __ as
|
|
2774
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
2488
2775
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2489
2776
|
row: 90,
|
|
2490
2777
|
"row-reverse": 90,
|
|
@@ -2499,8 +2786,8 @@ var iconProps3 = {
|
|
|
2499
2786
|
var getOptions = (parentStyleDirection) => [
|
|
2500
2787
|
{
|
|
2501
2788
|
value: "start",
|
|
2502
|
-
label:
|
|
2503
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2789
|
+
label: __17("Start", "elementor"),
|
|
2790
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2504
2791
|
RotatedIcon,
|
|
2505
2792
|
{
|
|
2506
2793
|
icon: StartIcon3,
|
|
@@ -2513,8 +2800,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2513
2800
|
},
|
|
2514
2801
|
{
|
|
2515
2802
|
value: "center",
|
|
2516
|
-
label:
|
|
2517
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2803
|
+
label: __17("Center", "elementor"),
|
|
2804
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2518
2805
|
RotatedIcon,
|
|
2519
2806
|
{
|
|
2520
2807
|
icon: CenterIcon3,
|
|
@@ -2527,8 +2814,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2527
2814
|
},
|
|
2528
2815
|
{
|
|
2529
2816
|
value: "end",
|
|
2530
|
-
label:
|
|
2531
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2817
|
+
label: __17("End", "elementor"),
|
|
2818
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2532
2819
|
RotatedIcon,
|
|
2533
2820
|
{
|
|
2534
2821
|
icon: EndIcon3,
|
|
@@ -2541,8 +2828,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2541
2828
|
},
|
|
2542
2829
|
{
|
|
2543
2830
|
value: "stretch",
|
|
2544
|
-
label:
|
|
2545
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2831
|
+
label: __17("Stretch", "elementor"),
|
|
2832
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2546
2833
|
RotatedIcon,
|
|
2547
2834
|
{
|
|
2548
2835
|
icon: JustifyIcon2,
|
|
@@ -2556,107 +2843,107 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2556
2843
|
];
|
|
2557
2844
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2558
2845
|
const { isSiteRtl } = useDirection();
|
|
2559
|
-
return /* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ React42.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(ThemeProvider3, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React42.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, __17("Align self", "elementor"))), /* @__PURE__ */ React42.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(ToggleControl3, { options: getOptions(parentStyleDirection) }))))));
|
|
2560
2847
|
};
|
|
2561
2848
|
|
|
2562
2849
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2563
|
-
import * as
|
|
2850
|
+
import * as React43 from "react";
|
|
2564
2851
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
2565
|
-
import { isExperimentActive as
|
|
2566
|
-
import { Stack as
|
|
2567
|
-
import { __ as
|
|
2852
|
+
import { isExperimentActive as isExperimentActive6 } from "@elementor/editor-v1-adapters";
|
|
2853
|
+
import { Stack as Stack11 } from "@elementor/ui";
|
|
2854
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
2568
2855
|
var displayFieldItems = [
|
|
2569
2856
|
{
|
|
2570
2857
|
value: "block",
|
|
2571
|
-
renderContent: () =>
|
|
2572
|
-
label:
|
|
2858
|
+
renderContent: () => __18("Block", "elementor"),
|
|
2859
|
+
label: __18("Block", "elementor"),
|
|
2573
2860
|
showTooltip: true
|
|
2574
2861
|
},
|
|
2575
2862
|
{
|
|
2576
2863
|
value: "flex",
|
|
2577
|
-
renderContent: () =>
|
|
2578
|
-
label:
|
|
2864
|
+
renderContent: () => __18("Flex", "elementor"),
|
|
2865
|
+
label: __18("Flex", "elementor"),
|
|
2579
2866
|
showTooltip: true
|
|
2580
2867
|
},
|
|
2581
2868
|
{
|
|
2582
2869
|
value: "inline-block",
|
|
2583
|
-
renderContent: () =>
|
|
2584
|
-
label:
|
|
2870
|
+
renderContent: () => __18("In-blk", "elementor"),
|
|
2871
|
+
label: __18("Inline-block", "elementor"),
|
|
2585
2872
|
showTooltip: true
|
|
2586
2873
|
}
|
|
2587
2874
|
];
|
|
2588
2875
|
var DisplayField = () => {
|
|
2589
|
-
const isDisplayNoneFeatureActive =
|
|
2876
|
+
const isDisplayNoneFeatureActive = isExperimentActive6(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2590
2877
|
const items3 = [...displayFieldItems];
|
|
2591
2878
|
if (isDisplayNoneFeatureActive) {
|
|
2592
2879
|
items3.push({
|
|
2593
2880
|
value: "none",
|
|
2594
|
-
renderContent: () =>
|
|
2595
|
-
label:
|
|
2881
|
+
renderContent: () => __18("None", "elementor"),
|
|
2882
|
+
label: __18("None", "elementor"),
|
|
2596
2883
|
showTooltip: true
|
|
2597
2884
|
});
|
|
2598
2885
|
}
|
|
2599
2886
|
items3.push({
|
|
2600
2887
|
value: "inline-flex",
|
|
2601
|
-
renderContent: () =>
|
|
2602
|
-
label:
|
|
2888
|
+
renderContent: () => __18("In-flx", "elementor"),
|
|
2889
|
+
label: __18("Inline-flex", "elementor"),
|
|
2603
2890
|
showTooltip: true
|
|
2604
2891
|
});
|
|
2605
2892
|
const placeholder = useDisplayPlaceholderValue();
|
|
2606
|
-
return /* @__PURE__ */
|
|
2893
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React43.createElement(Stack11, { gap: 0.75 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, __18("Display", "elementor")), /* @__PURE__ */ React43.createElement(ToggleControl4, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2607
2894
|
};
|
|
2608
2895
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2609
2896
|
|
|
2610
2897
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2611
|
-
import * as
|
|
2898
|
+
import * as React44 from "react";
|
|
2612
2899
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
2613
2900
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
2614
2901
|
import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
|
|
2615
|
-
import { __ as
|
|
2902
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
2616
2903
|
var options3 = [
|
|
2617
2904
|
{
|
|
2618
2905
|
value: "row",
|
|
2619
|
-
label:
|
|
2906
|
+
label: __19("Row", "elementor"),
|
|
2620
2907
|
renderContent: ({ size }) => {
|
|
2621
2908
|
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
2622
|
-
return /* @__PURE__ */
|
|
2909
|
+
return /* @__PURE__ */ React44.createElement(StartIcon5, { fontSize: size });
|
|
2623
2910
|
},
|
|
2624
2911
|
showTooltip: true
|
|
2625
2912
|
},
|
|
2626
2913
|
{
|
|
2627
2914
|
value: "column",
|
|
2628
|
-
label:
|
|
2629
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2915
|
+
label: __19("Column", "elementor"),
|
|
2916
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
2630
2917
|
showTooltip: true
|
|
2631
2918
|
},
|
|
2632
2919
|
{
|
|
2633
2920
|
value: "row-reverse",
|
|
2634
|
-
label:
|
|
2921
|
+
label: __19("Reversed row", "elementor"),
|
|
2635
2922
|
renderContent: ({ size }) => {
|
|
2636
2923
|
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
2637
|
-
return /* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ React44.createElement(EndIcon5, { fontSize: size });
|
|
2638
2925
|
},
|
|
2639
2926
|
showTooltip: true
|
|
2640
2927
|
},
|
|
2641
2928
|
{
|
|
2642
2929
|
value: "column-reverse",
|
|
2643
|
-
label:
|
|
2644
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2930
|
+
label: __19("Reversed column", "elementor"),
|
|
2931
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
2645
2932
|
showTooltip: true
|
|
2646
2933
|
}
|
|
2647
2934
|
];
|
|
2648
2935
|
var FlexDirectionField = () => {
|
|
2649
2936
|
const { isSiteRtl } = useDirection();
|
|
2650
|
-
return /* @__PURE__ */
|
|
2937
|
+
return /* @__PURE__ */ React44.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React44.createElement(ThemeProvider4, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React44.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, __19("Direction", "elementor"))), /* @__PURE__ */ React44.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React44.createElement(ToggleControl5, { options: options3 }))))));
|
|
2651
2938
|
};
|
|
2652
2939
|
|
|
2653
2940
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2654
|
-
import * as
|
|
2941
|
+
import * as React45 from "react";
|
|
2655
2942
|
import { useState as useState9 } from "react";
|
|
2656
2943
|
import { ControlToggleButtonGroup, NumberControl } from "@elementor/editor-controls";
|
|
2657
2944
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
2658
2945
|
import { DirectionProvider as DirectionProvider5, Grid as Grid6, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
2659
|
-
import { __ as
|
|
2946
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
2660
2947
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
2661
2948
|
var LAST_DEFAULT_VALUE = 99999;
|
|
2662
2949
|
var FIRST = "first";
|
|
@@ -2669,25 +2956,27 @@ var orderValueMap = {
|
|
|
2669
2956
|
var items = [
|
|
2670
2957
|
{
|
|
2671
2958
|
value: FIRST,
|
|
2672
|
-
label:
|
|
2673
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2959
|
+
label: __20("First", "elementor"),
|
|
2960
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
2674
2961
|
showTooltip: true
|
|
2675
2962
|
},
|
|
2676
2963
|
{
|
|
2677
2964
|
value: LAST,
|
|
2678
|
-
label:
|
|
2679
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2965
|
+
label: __20("Last", "elementor"),
|
|
2966
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
2680
2967
|
showTooltip: true
|
|
2681
2968
|
},
|
|
2682
2969
|
{
|
|
2683
2970
|
value: CUSTOM,
|
|
2684
|
-
label:
|
|
2685
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2971
|
+
label: __20("Custom", "elementor"),
|
|
2972
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PencilIcon, { fontSize: size }),
|
|
2686
2973
|
showTooltip: true
|
|
2687
2974
|
}
|
|
2688
2975
|
];
|
|
2689
2976
|
var FlexOrderField = () => {
|
|
2690
|
-
const { isSiteRtl } = useDirection()
|
|
2977
|
+
const { isSiteRtl } = useDirection();
|
|
2978
|
+
const [order, setOrder] = useStylesField("order");
|
|
2979
|
+
const { canEdit } = useStyle();
|
|
2691
2980
|
const [groupControlValue, setGroupControlValue] = useState9(getGroupControlValue(order?.value || null));
|
|
2692
2981
|
const handleToggleButtonChange = (group) => {
|
|
2693
2982
|
setGroupControlValue(group);
|
|
@@ -2697,15 +2986,16 @@ var FlexOrderField = () => {
|
|
|
2697
2986
|
}
|
|
2698
2987
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
2699
2988
|
};
|
|
2700
|
-
return /* @__PURE__ */
|
|
2989
|
+
return /* @__PURE__ */ React45.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React45.createElement(ThemeProvider5, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React45.createElement(SectionContent, null, /* @__PURE__ */ React45.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __20("Order", "elementor"))), /* @__PURE__ */ React45.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React45.createElement(
|
|
2701
2990
|
ControlToggleButtonGroup,
|
|
2702
2991
|
{
|
|
2703
2992
|
items,
|
|
2704
2993
|
value: groupControlValue,
|
|
2705
2994
|
onChange: handleToggleButtonChange,
|
|
2706
|
-
exclusive: true
|
|
2995
|
+
exclusive: true,
|
|
2996
|
+
disabled: !canEdit
|
|
2707
2997
|
}
|
|
2708
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
2998
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React45.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __20("Custom order", "elementor"))), /* @__PURE__ */ React45.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React45.createElement(
|
|
2709
2999
|
NumberControl,
|
|
2710
3000
|
{
|
|
2711
3001
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -2725,7 +3015,7 @@ var getGroupControlValue = (order) => {
|
|
|
2725
3015
|
};
|
|
2726
3016
|
|
|
2727
3017
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
2728
|
-
import * as
|
|
3018
|
+
import * as React46 from "react";
|
|
2729
3019
|
import { useMemo as useMemo5, useState as useState10 } from "react";
|
|
2730
3020
|
import {
|
|
2731
3021
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
@@ -2735,30 +3025,31 @@ import {
|
|
|
2735
3025
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
2736
3026
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
2737
3027
|
import { DirectionProvider as DirectionProvider6, Grid as Grid7, ThemeProvider as ThemeProvider6 } from "@elementor/ui";
|
|
2738
|
-
import { __ as
|
|
3028
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
2739
3029
|
var DEFAULT = 1;
|
|
2740
3030
|
var items2 = [
|
|
2741
3031
|
{
|
|
2742
3032
|
value: "flex-grow",
|
|
2743
|
-
label:
|
|
2744
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3033
|
+
label: __21("Grow", "elementor"),
|
|
3034
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(ExpandIcon, { fontSize: size }),
|
|
2745
3035
|
showTooltip: true
|
|
2746
3036
|
},
|
|
2747
3037
|
{
|
|
2748
3038
|
value: "flex-shrink",
|
|
2749
|
-
label:
|
|
2750
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3039
|
+
label: __21("Shrink", "elementor"),
|
|
3040
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(ShrinkIcon, { fontSize: size }),
|
|
2751
3041
|
showTooltip: true
|
|
2752
3042
|
},
|
|
2753
3043
|
{
|
|
2754
3044
|
value: "custom",
|
|
2755
|
-
label:
|
|
2756
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3045
|
+
label: __21("Custom", "elementor"),
|
|
3046
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(PencilIcon2, { fontSize: size }),
|
|
2757
3047
|
showTooltip: true
|
|
2758
3048
|
}
|
|
2759
3049
|
];
|
|
2760
3050
|
var FlexSizeField = () => {
|
|
2761
3051
|
const { isSiteRtl } = useDirection();
|
|
3052
|
+
const { canEdit } = useStyle();
|
|
2762
3053
|
const [fields, setFields] = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
2763
3054
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
2764
3055
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
@@ -2788,17 +3079,18 @@ var FlexSizeField = () => {
|
|
|
2788
3079
|
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
2789
3080
|
});
|
|
2790
3081
|
};
|
|
2791
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ React46.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React46.createElement(ThemeProvider6, null, /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __21("Size", "elementor"))), /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(
|
|
2792
3083
|
ControlToggleButtonGroup2,
|
|
2793
3084
|
{
|
|
2794
3085
|
value: activeGroup,
|
|
2795
3086
|
onChange: onChangeGroup,
|
|
3087
|
+
disabled: !canEdit,
|
|
2796
3088
|
items: items2,
|
|
2797
3089
|
exclusive: true
|
|
2798
3090
|
}
|
|
2799
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
3091
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React46.createElement(FlexCustomField, null))));
|
|
2800
3092
|
};
|
|
2801
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
3093
|
+
var FlexCustomField = () => /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React46.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __21("Grow", "elementor"))), /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React46.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __21("Shrink", "elementor"))), /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React46.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React46.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __21("Basis", "elementor"))), /* @__PURE__ */ React46.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(SizeControl2, { extendedValues: ["auto"] })))));
|
|
2802
3094
|
var getActiveGroup = ({
|
|
2803
3095
|
grow,
|
|
2804
3096
|
shrink,
|
|
@@ -2820,16 +3112,16 @@ var getActiveGroup = ({
|
|
|
2820
3112
|
};
|
|
2821
3113
|
|
|
2822
3114
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
2823
|
-
import * as
|
|
3115
|
+
import * as React47 from "react";
|
|
2824
3116
|
import { GapControl } from "@elementor/editor-controls";
|
|
2825
|
-
import { Stack as
|
|
2826
|
-
import { __ as
|
|
3117
|
+
import { Stack as Stack12 } from "@elementor/ui";
|
|
3118
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
2827
3119
|
var GapControlField = () => {
|
|
2828
|
-
return /* @__PURE__ */
|
|
3120
|
+
return /* @__PURE__ */ React47.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React47.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React47.createElement(GapControl, { label: __22("Gaps", "elementor") })));
|
|
2829
3121
|
};
|
|
2830
3122
|
|
|
2831
3123
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
2832
|
-
import * as
|
|
3124
|
+
import * as React48 from "react";
|
|
2833
3125
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
2834
3126
|
import {
|
|
2835
3127
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -2839,8 +3131,8 @@ import {
|
|
|
2839
3131
|
JustifySpaceBetweenVerticalIcon as BetweenIcon2,
|
|
2840
3132
|
JustifyTopIcon as JustifyTopIcon2
|
|
2841
3133
|
} from "@elementor/icons";
|
|
2842
|
-
import { DirectionProvider as DirectionProvider7, Stack as
|
|
2843
|
-
import { __ as
|
|
3134
|
+
import { DirectionProvider as DirectionProvider7, Stack as Stack13, ThemeProvider as ThemeProvider7, withDirection as withDirection7 } from "@elementor/ui";
|
|
3135
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
2844
3136
|
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
2845
3137
|
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
2846
3138
|
var iconProps4 = {
|
|
@@ -2850,75 +3142,75 @@ var iconProps4 = {
|
|
|
2850
3142
|
var options4 = [
|
|
2851
3143
|
{
|
|
2852
3144
|
value: "flex-start",
|
|
2853
|
-
label:
|
|
2854
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3145
|
+
label: __23("Start", "elementor"),
|
|
3146
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
2855
3147
|
showTooltip: true
|
|
2856
3148
|
},
|
|
2857
3149
|
{
|
|
2858
3150
|
value: "center",
|
|
2859
|
-
label:
|
|
2860
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3151
|
+
label: __23("Center", "elementor"),
|
|
3152
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
2861
3153
|
showTooltip: true
|
|
2862
3154
|
},
|
|
2863
3155
|
{
|
|
2864
3156
|
value: "flex-end",
|
|
2865
|
-
label:
|
|
2866
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3157
|
+
label: __23("End", "elementor"),
|
|
3158
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
2867
3159
|
showTooltip: true
|
|
2868
3160
|
},
|
|
2869
3161
|
{
|
|
2870
3162
|
value: "space-between",
|
|
2871
|
-
label:
|
|
2872
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3163
|
+
label: __23("Space between", "elementor"),
|
|
3164
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
2873
3165
|
showTooltip: true
|
|
2874
3166
|
},
|
|
2875
3167
|
{
|
|
2876
3168
|
value: "space-around",
|
|
2877
|
-
label:
|
|
2878
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3169
|
+
label: __23("Space around", "elementor"),
|
|
3170
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
2879
3171
|
showTooltip: true
|
|
2880
3172
|
},
|
|
2881
3173
|
{
|
|
2882
3174
|
value: "space-evenly",
|
|
2883
|
-
label:
|
|
2884
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3175
|
+
label: __23("Space evenly", "elementor"),
|
|
3176
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
2885
3177
|
showTooltip: true
|
|
2886
3178
|
}
|
|
2887
3179
|
];
|
|
2888
3180
|
var JustifyContentField = () => {
|
|
2889
3181
|
const { isSiteRtl } = useDirection();
|
|
2890
|
-
return /* @__PURE__ */
|
|
3182
|
+
return /* @__PURE__ */ React48.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React48.createElement(ThemeProvider7, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React48.createElement(Stack13, { gap: 0.75 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, __23("Justify content", "elementor")), /* @__PURE__ */ React48.createElement(ToggleControl6, { options: options4, fullWidth: true })))));
|
|
2891
3183
|
};
|
|
2892
3184
|
|
|
2893
3185
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2894
|
-
import * as
|
|
3186
|
+
import * as React49 from "react";
|
|
2895
3187
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
2896
3188
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
2897
3189
|
import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
|
|
2898
|
-
import { __ as
|
|
3190
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
2899
3191
|
var options5 = [
|
|
2900
3192
|
{
|
|
2901
3193
|
value: "nowrap",
|
|
2902
|
-
label:
|
|
2903
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3194
|
+
label: __24("No wrap", "elementor"),
|
|
3195
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
2904
3196
|
showTooltip: true
|
|
2905
3197
|
},
|
|
2906
3198
|
{
|
|
2907
3199
|
value: "wrap",
|
|
2908
|
-
label:
|
|
2909
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3200
|
+
label: __24("Wrap", "elementor"),
|
|
3201
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowBackIcon, { fontSize: size }),
|
|
2910
3202
|
showTooltip: true
|
|
2911
3203
|
},
|
|
2912
3204
|
{
|
|
2913
3205
|
value: "wrap-reverse",
|
|
2914
|
-
label:
|
|
2915
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3206
|
+
label: __24("Reversed wrap", "elementor"),
|
|
3207
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
2916
3208
|
showTooltip: true
|
|
2917
3209
|
}
|
|
2918
3210
|
];
|
|
2919
3211
|
var WrapField = () => {
|
|
2920
3212
|
const { isSiteRtl } = useDirection();
|
|
2921
|
-
return /* @__PURE__ */
|
|
3213
|
+
return /* @__PURE__ */ React49.createElement(DirectionProvider8, { rtl: isSiteRtl }, /* @__PURE__ */ React49.createElement(ThemeProvider8, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React49.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __24("Wrap", "elementor"))), /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React49.createElement(ToggleControl7, { options: options5 }))))));
|
|
2922
3214
|
};
|
|
2923
3215
|
|
|
2924
3216
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2930,13 +3222,13 @@ var LayoutSection = () => {
|
|
|
2930
3222
|
const parent = useParentElement(element.id);
|
|
2931
3223
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2932
3224
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
2933
|
-
return /* @__PURE__ */
|
|
3225
|
+
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 }));
|
|
2934
3226
|
};
|
|
2935
3227
|
var FlexFields = () => {
|
|
2936
3228
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2937
|
-
return /* @__PURE__ */
|
|
3229
|
+
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));
|
|
2938
3230
|
};
|
|
2939
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3231
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(PanelDivider, null), /* @__PURE__ */ React50.createElement(ControlFormLabel3, null, __25("Flex child", "elementor")), /* @__PURE__ */ React50.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React50.createElement(FlexOrderField, null), /* @__PURE__ */ React50.createElement(FlexSizeField, null));
|
|
2940
3232
|
var shouldDisplayFlexFields = (display, local) => {
|
|
2941
3233
|
const value = display?.value ?? local?.value;
|
|
2942
3234
|
if (!value) {
|
|
@@ -2946,66 +3238,66 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
2946
3238
|
};
|
|
2947
3239
|
|
|
2948
3240
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2949
|
-
import * as
|
|
2950
|
-
import { isExperimentActive as
|
|
3241
|
+
import * as React55 from "react";
|
|
3242
|
+
import { isExperimentActive as isExperimentActive7 } from "@elementor/editor-v1-adapters";
|
|
2951
3243
|
import { useSessionStorage } from "@elementor/session";
|
|
2952
3244
|
|
|
2953
3245
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2954
|
-
import * as
|
|
3246
|
+
import * as React51 from "react";
|
|
2955
3247
|
import { SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
2956
3248
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
2957
|
-
import { Grid as Grid9, Stack as
|
|
2958
|
-
import { __ as
|
|
3249
|
+
import { Grid as Grid9, Stack as Stack14, withDirection as withDirection8 } from "@elementor/ui";
|
|
3250
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
2959
3251
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
2960
3252
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
2961
3253
|
var sideIcons = {
|
|
2962
|
-
"inset-block-start": /* @__PURE__ */
|
|
2963
|
-
"inset-block-end": /* @__PURE__ */
|
|
2964
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2965
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3254
|
+
"inset-block-start": /* @__PURE__ */ React51.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
3255
|
+
"inset-block-end": /* @__PURE__ */ React51.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
3256
|
+
"inset-inline-start": /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3257
|
+
"inset-inline-end": /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2966
3258
|
};
|
|
2967
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2968
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
3259
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __26("Right", "elementor") : __26("Left", "elementor");
|
|
3260
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __26("Left", "elementor") : __26("Right", "elementor");
|
|
2969
3261
|
var DimensionsField = () => {
|
|
2970
3262
|
const { isSiteRtl } = useDirection();
|
|
2971
|
-
return /* @__PURE__ */
|
|
3263
|
+
return /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(DimensionField, { side: "inset-block-start", label: __26("Top", "elementor") }), /* @__PURE__ */ React51.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React51.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(DimensionField, { side: "inset-block-end", label: __26("Bottom", "elementor") }), /* @__PURE__ */ React51.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
2972
3264
|
};
|
|
2973
3265
|
var DimensionField = ({ side, label }) => {
|
|
2974
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ React51.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React51.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, label)), /* @__PURE__ */ React51.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React51.createElement(StylesField, { bind: side }, /* @__PURE__ */ React51.createElement(SizeControl3, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
2975
3267
|
};
|
|
2976
3268
|
|
|
2977
3269
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
2978
|
-
import * as
|
|
3270
|
+
import * as React52 from "react";
|
|
2979
3271
|
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
2980
3272
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2981
|
-
import { __ as
|
|
3273
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
2982
3274
|
var OffsetField = () => {
|
|
2983
|
-
return /* @__PURE__ */
|
|
3275
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React52.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __27("Anchor offset", "elementor"))), /* @__PURE__ */ React52.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(SizeControl4, { units: ["px", "em", "rem", "vw", "vh"] }))));
|
|
2984
3276
|
};
|
|
2985
3277
|
|
|
2986
3278
|
// src/components/style-sections/position-section/position-field.tsx
|
|
2987
|
-
import * as
|
|
3279
|
+
import * as React53 from "react";
|
|
2988
3280
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
2989
3281
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2990
|
-
import { __ as
|
|
3282
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
2991
3283
|
var positionOptions = [
|
|
2992
|
-
{ label:
|
|
2993
|
-
{ label:
|
|
2994
|
-
{ label:
|
|
2995
|
-
{ label:
|
|
2996
|
-
{ label:
|
|
3284
|
+
{ label: __28("Static", "elementor"), value: "static" },
|
|
3285
|
+
{ label: __28("Relative", "elementor"), value: "relative" },
|
|
3286
|
+
{ label: __28("Absolute", "elementor"), value: "absolute" },
|
|
3287
|
+
{ label: __28("Fixed", "elementor"), value: "fixed" },
|
|
3288
|
+
{ label: __28("Sticky", "elementor"), value: "sticky" }
|
|
2997
3289
|
];
|
|
2998
3290
|
var PositionField = ({ onChange }) => {
|
|
2999
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React53.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, __28("Position", "elementor"))), /* @__PURE__ */ React53.createElement(Grid11, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
3000
3292
|
};
|
|
3001
3293
|
|
|
3002
3294
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3003
|
-
import * as
|
|
3295
|
+
import * as React54 from "react";
|
|
3004
3296
|
import { NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
3005
3297
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
3006
|
-
import { __ as
|
|
3298
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
3007
3299
|
var ZIndexField = () => {
|
|
3008
|
-
return /* @__PURE__ */
|
|
3300
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React54.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, __29("Z-index", "elementor"))), /* @__PURE__ */ React54.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(NumberControl3, null))));
|
|
3009
3301
|
};
|
|
3010
3302
|
|
|
3011
3303
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -3018,7 +3310,7 @@ var PositionSection = () => {
|
|
|
3018
3310
|
"inset-inline-end"
|
|
3019
3311
|
]);
|
|
3020
3312
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3021
|
-
const isCssIdFeatureActive =
|
|
3313
|
+
const isCssIdFeatureActive = isExperimentActive7("e_v_3_30");
|
|
3022
3314
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3023
3315
|
if (newPosition === "static") {
|
|
3024
3316
|
if (dimensionsValues) {
|
|
@@ -3038,7 +3330,7 @@ var PositionSection = () => {
|
|
|
3038
3330
|
}
|
|
3039
3331
|
};
|
|
3040
3332
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3041
|
-
return /* @__PURE__ */
|
|
3333
|
+
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, isCssIdFeatureActive && /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(OffsetField, null)));
|
|
3042
3334
|
};
|
|
3043
3335
|
var usePersistDimensions = () => {
|
|
3044
3336
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3048,23 +3340,23 @@ var usePersistDimensions = () => {
|
|
|
3048
3340
|
};
|
|
3049
3341
|
|
|
3050
3342
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3051
|
-
import * as
|
|
3343
|
+
import * as React60 from "react";
|
|
3052
3344
|
import { AspectRatioControl, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
3053
|
-
import { isExperimentActive as
|
|
3054
|
-
import { Grid as Grid16, Stack as
|
|
3055
|
-
import { __ as
|
|
3345
|
+
import { isExperimentActive as isExperimentActive8 } from "@elementor/editor-v1-adapters";
|
|
3346
|
+
import { Grid as Grid16, Stack as Stack16 } from "@elementor/ui";
|
|
3347
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
3056
3348
|
|
|
3057
3349
|
// src/components/collapsible-content.tsx
|
|
3058
|
-
import * as
|
|
3350
|
+
import * as React56 from "react";
|
|
3059
3351
|
import { useState as useState11 } from "react";
|
|
3060
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
3061
|
-
import { __ as
|
|
3352
|
+
import { Button, Collapse as Collapse3, Stack as Stack15 } from "@elementor/ui";
|
|
3353
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
3062
3354
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
3063
3355
|
const [open, setOpen] = useState11(defaultOpen);
|
|
3064
3356
|
const handleToggle = () => {
|
|
3065
3357
|
setOpen((prevOpen) => !prevOpen);
|
|
3066
3358
|
};
|
|
3067
|
-
return /* @__PURE__ */
|
|
3359
|
+
return /* @__PURE__ */ React56.createElement(Stack15, null, /* @__PURE__ */ React56.createElement(
|
|
3068
3360
|
Button,
|
|
3069
3361
|
{
|
|
3070
3362
|
fullWidth: true,
|
|
@@ -3072,77 +3364,77 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
3072
3364
|
color: "secondary",
|
|
3073
3365
|
variant: "outlined",
|
|
3074
3366
|
onClick: handleToggle,
|
|
3075
|
-
endIcon: /* @__PURE__ */
|
|
3367
|
+
endIcon: /* @__PURE__ */ React56.createElement(CollapseIcon, { open }),
|
|
3076
3368
|
sx: { my: 0.5 }
|
|
3077
3369
|
},
|
|
3078
|
-
open ?
|
|
3079
|
-
), /* @__PURE__ */
|
|
3370
|
+
open ? __30("Show less", "elementor") : __30("Show more", "elementor")
|
|
3371
|
+
), /* @__PURE__ */ React56.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
3080
3372
|
};
|
|
3081
3373
|
|
|
3082
3374
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3083
|
-
import * as
|
|
3375
|
+
import * as React57 from "react";
|
|
3084
3376
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
3085
3377
|
import { Grid as Grid13 } from "@elementor/ui";
|
|
3086
|
-
import { __ as
|
|
3378
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
3087
3379
|
var positionOptions2 = [
|
|
3088
|
-
{ label:
|
|
3089
|
-
{ label:
|
|
3090
|
-
{ label:
|
|
3091
|
-
{ label:
|
|
3092
|
-
{ label:
|
|
3380
|
+
{ label: __31("Fill", "elementor"), value: "fill" },
|
|
3381
|
+
{ label: __31("Cover", "elementor"), value: "cover" },
|
|
3382
|
+
{ label: __31("Contain", "elementor"), value: "contain" },
|
|
3383
|
+
{ label: __31("None", "elementor"), value: "none" },
|
|
3384
|
+
{ label: __31("Scale down", "elementor"), value: "scale-down" }
|
|
3093
3385
|
];
|
|
3094
3386
|
var ObjectFitField = ({ onChange }) => {
|
|
3095
|
-
return /* @__PURE__ */
|
|
3387
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React57.createElement(Grid13, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __31("Object fit", "elementor"))), /* @__PURE__ */ React57.createElement(Grid13, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React57.createElement(SelectControl4, { options: positionOptions2, onChange }))));
|
|
3096
3388
|
};
|
|
3097
3389
|
|
|
3098
3390
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3099
|
-
import * as
|
|
3391
|
+
import * as React58 from "react";
|
|
3100
3392
|
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
3101
3393
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
3102
|
-
import { __ as
|
|
3394
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
3103
3395
|
var positionOptions3 = [
|
|
3104
|
-
{ label:
|
|
3105
|
-
{ label:
|
|
3106
|
-
{ label:
|
|
3107
|
-
{ label:
|
|
3108
|
-
{ label:
|
|
3109
|
-
{ label:
|
|
3110
|
-
{ label:
|
|
3111
|
-
{ label:
|
|
3112
|
-
{ label:
|
|
3396
|
+
{ label: __32("Center center", "elementor"), value: "center center" },
|
|
3397
|
+
{ label: __32("Center left", "elementor"), value: "center left" },
|
|
3398
|
+
{ label: __32("Center right", "elementor"), value: "center right" },
|
|
3399
|
+
{ label: __32("Top center", "elementor"), value: "top center" },
|
|
3400
|
+
{ label: __32("Top left", "elementor"), value: "top left" },
|
|
3401
|
+
{ label: __32("Top right", "elementor"), value: "top right" },
|
|
3402
|
+
{ label: __32("Bottom center", "elementor"), value: "bottom center" },
|
|
3403
|
+
{ label: __32("Bottom left", "elementor"), value: "bottom left" },
|
|
3404
|
+
{ label: __32("Bottom right", "elementor"), value: "bottom right" }
|
|
3113
3405
|
];
|
|
3114
3406
|
var ObjectPositionField = ({ onChange }) => {
|
|
3115
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React58.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, __32("Object position", "elementor"))), /* @__PURE__ */ React58.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React58.createElement(SelectControl5, { options: positionOptions3, onChange }))));
|
|
3116
3408
|
};
|
|
3117
3409
|
|
|
3118
3410
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3119
|
-
import * as
|
|
3411
|
+
import * as React59 from "react";
|
|
3120
3412
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
3121
3413
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
3122
3414
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
3123
|
-
import { __ as
|
|
3415
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
3124
3416
|
var options6 = [
|
|
3125
3417
|
{
|
|
3126
3418
|
value: "visible",
|
|
3127
|
-
label:
|
|
3128
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3419
|
+
label: __33("Visible", "elementor"),
|
|
3420
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(EyeIcon, { fontSize: size }),
|
|
3129
3421
|
showTooltip: true
|
|
3130
3422
|
},
|
|
3131
3423
|
{
|
|
3132
3424
|
value: "hidden",
|
|
3133
|
-
label:
|
|
3134
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3425
|
+
label: __33("Hidden", "elementor"),
|
|
3426
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(EyeOffIcon, { fontSize: size }),
|
|
3135
3427
|
showTooltip: true
|
|
3136
3428
|
},
|
|
3137
3429
|
{
|
|
3138
3430
|
value: "auto",
|
|
3139
|
-
label:
|
|
3140
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3431
|
+
label: __33("Auto", "elementor"),
|
|
3432
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(LetterAIcon, { fontSize: size }),
|
|
3141
3433
|
showTooltip: true
|
|
3142
3434
|
}
|
|
3143
3435
|
];
|
|
3144
3436
|
var OverflowField = () => {
|
|
3145
|
-
return /* @__PURE__ */
|
|
3437
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React59.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, __33("Overflow", "elementor"))), /* @__PURE__ */ React59.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React59.createElement(ToggleControl8, { options: options6 }))));
|
|
3146
3438
|
};
|
|
3147
3439
|
|
|
3148
3440
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -3157,78 +3449,78 @@ var SizeSection = () => {
|
|
|
3157
3449
|
});
|
|
3158
3450
|
}
|
|
3159
3451
|
};
|
|
3160
|
-
const isVersion330Active =
|
|
3161
|
-
return /* @__PURE__ */
|
|
3452
|
+
const isVersion330Active = isExperimentActive8("e_v_3_30");
|
|
3453
|
+
return /* @__PURE__ */ React60.createElement(SectionContent, null, /* @__PURE__ */ React60.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(SizeField, { bind: "width", label: __34("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(SizeField, { bind: "height", label: __34("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React60.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(
|
|
3162
3454
|
SizeField,
|
|
3163
3455
|
{
|
|
3164
3456
|
bind: "min-width",
|
|
3165
|
-
label:
|
|
3457
|
+
label: __34("Min width", "elementor"),
|
|
3166
3458
|
extendedValues: ["auto"]
|
|
3167
3459
|
}
|
|
3168
|
-
)), /* @__PURE__ */
|
|
3460
|
+
)), /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(
|
|
3169
3461
|
SizeField,
|
|
3170
3462
|
{
|
|
3171
3463
|
bind: "min-height",
|
|
3172
|
-
label:
|
|
3464
|
+
label: __34("Min height", "elementor"),
|
|
3173
3465
|
extendedValues: ["auto"]
|
|
3174
3466
|
}
|
|
3175
|
-
))), /* @__PURE__ */
|
|
3467
|
+
))), /* @__PURE__ */ React60.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(SizeField, { bind: "max-width", label: __34("Max width", "elementor") })), /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(SizeField, { bind: "max-height", label: __34("Max height", "elementor") }))), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(Stack16, null, /* @__PURE__ */ React60.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React60.createElement(CollapsibleContent, null, /* @__PURE__ */ React60.createElement(Stack16, { gap: 2 }, /* @__PURE__ */ React60.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React60.createElement(AspectRatioControl, { label: __34("Aspect Ratio", "elementor") })), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(ObjectFitField, { onChange: onFitChange }), isNotFill && /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ObjectPositionField, null)))));
|
|
3176
3468
|
};
|
|
3177
3469
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
3178
|
-
return /* @__PURE__ */
|
|
3470
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind }, /* @__PURE__ */ React60.createElement(Grid16, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, label)), /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React60.createElement(SizeControl5, { extendedValues }))));
|
|
3179
3471
|
};
|
|
3180
3472
|
|
|
3181
3473
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3182
|
-
import * as
|
|
3474
|
+
import * as React61 from "react";
|
|
3183
3475
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
3184
|
-
import { __ as
|
|
3476
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
3185
3477
|
var SpacingSection = () => {
|
|
3186
3478
|
const { isSiteRtl } = useDirection();
|
|
3187
|
-
return /* @__PURE__ */
|
|
3479
|
+
return /* @__PURE__ */ React61.createElement(SectionContent, null, /* @__PURE__ */ React61.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React61.createElement(
|
|
3188
3480
|
LinkedDimensionsControl,
|
|
3189
3481
|
{
|
|
3190
|
-
label:
|
|
3482
|
+
label: __35("Margin", "elementor"),
|
|
3191
3483
|
isSiteRtl,
|
|
3192
3484
|
extendedValues: ["auto"]
|
|
3193
3485
|
}
|
|
3194
|
-
)), /* @__PURE__ */
|
|
3486
|
+
)), /* @__PURE__ */ React61.createElement(PanelDivider, null), /* @__PURE__ */ React61.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React61.createElement(LinkedDimensionsControl, { label: __35("Padding", "elementor"), isSiteRtl })));
|
|
3195
3487
|
};
|
|
3196
3488
|
|
|
3197
3489
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3198
|
-
import * as
|
|
3199
|
-
import { isExperimentActive as
|
|
3490
|
+
import * as React77 from "react";
|
|
3491
|
+
import { isExperimentActive as isExperimentActive9 } from "@elementor/editor-v1-adapters";
|
|
3200
3492
|
|
|
3201
3493
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3202
|
-
import * as
|
|
3494
|
+
import * as React62 from "react";
|
|
3203
3495
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
3204
3496
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
3205
|
-
import { __ as
|
|
3497
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
3206
3498
|
var ColumnCountField = () => {
|
|
3207
|
-
return /* @__PURE__ */
|
|
3499
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React62.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, __36("Columns", "elementor"))), /* @__PURE__ */ React62.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(NumberControl4, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
3208
3500
|
};
|
|
3209
3501
|
|
|
3210
3502
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3211
|
-
import * as
|
|
3503
|
+
import * as React63 from "react";
|
|
3212
3504
|
import { SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
3213
3505
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
3214
|
-
import { __ as
|
|
3506
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
3215
3507
|
var ColumnGapField = () => {
|
|
3216
|
-
return /* @__PURE__ */
|
|
3508
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React63.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, __37("Column gap", "elementor"))), /* @__PURE__ */ React63.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(SizeControl6, null))));
|
|
3217
3509
|
};
|
|
3218
3510
|
|
|
3219
3511
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3220
|
-
import * as
|
|
3512
|
+
import * as React64 from "react";
|
|
3221
3513
|
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
3222
3514
|
import { Grid as Grid19 } from "@elementor/ui";
|
|
3223
|
-
import { __ as
|
|
3515
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
3224
3516
|
|
|
3225
3517
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3226
3518
|
import { useMemo as useMemo6 } from "react";
|
|
3227
|
-
import { __ as
|
|
3519
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
3228
3520
|
var supportedCategories = {
|
|
3229
|
-
system:
|
|
3230
|
-
custom:
|
|
3231
|
-
googlefonts:
|
|
3521
|
+
system: __38("System", "elementor"),
|
|
3522
|
+
custom: __38("Custom Fonts", "elementor"),
|
|
3523
|
+
googlefonts: __38("Google Fonts", "elementor")
|
|
3232
3524
|
};
|
|
3233
3525
|
var getFontFamilies = () => {
|
|
3234
3526
|
const { controls } = getElementorConfig();
|
|
@@ -3265,188 +3557,188 @@ var FontFamilyField = () => {
|
|
|
3265
3557
|
if (fontFamilies.length === 0) {
|
|
3266
3558
|
return null;
|
|
3267
3559
|
}
|
|
3268
|
-
return /* @__PURE__ */
|
|
3560
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React64.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React64.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, __39("Font family", "elementor"))), /* @__PURE__ */ React64.createElement(Grid19, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React64.createElement(FontFamilyControl, { fontFamilies }))));
|
|
3269
3561
|
};
|
|
3270
3562
|
|
|
3271
3563
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3272
|
-
import * as
|
|
3564
|
+
import * as React65 from "react";
|
|
3273
3565
|
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
3274
3566
|
import { Grid as Grid20 } from "@elementor/ui";
|
|
3275
|
-
import { __ as
|
|
3567
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
3276
3568
|
var FontSizeField = () => {
|
|
3277
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React65.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, __40("Font size", "elementor"))), /* @__PURE__ */ React65.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(SizeControl7, null))));
|
|
3278
3570
|
};
|
|
3279
3571
|
|
|
3280
3572
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3281
|
-
import * as
|
|
3573
|
+
import * as React66 from "react";
|
|
3282
3574
|
import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
3283
3575
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
3284
3576
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
3285
|
-
import { __ as
|
|
3577
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
3286
3578
|
var options7 = [
|
|
3287
3579
|
{
|
|
3288
3580
|
value: "normal",
|
|
3289
|
-
label:
|
|
3290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3581
|
+
label: __41("Normal", "elementor"),
|
|
3582
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(MinusIcon2, { fontSize: size }),
|
|
3291
3583
|
showTooltip: true
|
|
3292
3584
|
},
|
|
3293
3585
|
{
|
|
3294
3586
|
value: "italic",
|
|
3295
|
-
label:
|
|
3296
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3587
|
+
label: __41("Italic", "elementor"),
|
|
3588
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(ItalicIcon, { fontSize: size }),
|
|
3297
3589
|
showTooltip: true
|
|
3298
3590
|
}
|
|
3299
3591
|
];
|
|
3300
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3592
|
+
var FontStyleField = () => /* @__PURE__ */ React66.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React66.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React66.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlFormLabel4, null, __41("Font style", "elementor"))), /* @__PURE__ */ React66.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React66.createElement(ToggleControl9, { options: options7 }))));
|
|
3301
3593
|
|
|
3302
3594
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3303
|
-
import * as
|
|
3595
|
+
import * as React67 from "react";
|
|
3304
3596
|
import { SelectControl as SelectControl6 } from "@elementor/editor-controls";
|
|
3305
3597
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
3306
|
-
import { __ as
|
|
3598
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
3307
3599
|
var fontWeightOptions = [
|
|
3308
|
-
{ value: "100", label:
|
|
3309
|
-
{ value: "200", label:
|
|
3310
|
-
{ value: "300", label:
|
|
3311
|
-
{ value: "400", label:
|
|
3312
|
-
{ value: "500", label:
|
|
3313
|
-
{ value: "600", label:
|
|
3314
|
-
{ value: "700", label:
|
|
3315
|
-
{ value: "800", label:
|
|
3316
|
-
{ value: "900", label:
|
|
3600
|
+
{ value: "100", label: __42("100 - Thin", "elementor") },
|
|
3601
|
+
{ value: "200", label: __42("200 - Extra light", "elementor") },
|
|
3602
|
+
{ value: "300", label: __42("300 - Light", "elementor") },
|
|
3603
|
+
{ value: "400", label: __42("400 - Normal", "elementor") },
|
|
3604
|
+
{ value: "500", label: __42("500 - Medium", "elementor") },
|
|
3605
|
+
{ value: "600", label: __42("600 - Semi bold", "elementor") },
|
|
3606
|
+
{ value: "700", label: __42("700 - Bold", "elementor") },
|
|
3607
|
+
{ value: "800", label: __42("800 - Extra bold", "elementor") },
|
|
3608
|
+
{ value: "900", label: __42("900 - Black", "elementor") }
|
|
3317
3609
|
];
|
|
3318
3610
|
var FontWeightField = () => {
|
|
3319
|
-
return /* @__PURE__ */
|
|
3611
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React67.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, __42("Font weight", "elementor"))), /* @__PURE__ */ React67.createElement(Grid22, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React67.createElement(SelectControl6, { options: fontWeightOptions }))));
|
|
3320
3612
|
};
|
|
3321
3613
|
|
|
3322
3614
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3323
|
-
import * as
|
|
3615
|
+
import * as React68 from "react";
|
|
3324
3616
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
3325
3617
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
3326
|
-
import { __ as
|
|
3618
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
3327
3619
|
var LetterSpacingField = () => {
|
|
3328
|
-
return /* @__PURE__ */
|
|
3620
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React68.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, __43("Letter spacing", "elementor"))), /* @__PURE__ */ React68.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(SizeControl8, null))));
|
|
3329
3621
|
};
|
|
3330
3622
|
|
|
3331
3623
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3332
|
-
import * as
|
|
3624
|
+
import * as React69 from "react";
|
|
3333
3625
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
3334
3626
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
3335
|
-
import { __ as
|
|
3627
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
3336
3628
|
var LineHeightField = () => {
|
|
3337
|
-
return /* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React69.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, __44("Line height", "elementor"))), /* @__PURE__ */ React69.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(SizeControl9, null))));
|
|
3338
3630
|
};
|
|
3339
3631
|
|
|
3340
3632
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3341
|
-
import * as
|
|
3633
|
+
import * as React70 from "react";
|
|
3342
3634
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
3343
3635
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
3344
3636
|
import { Grid as Grid25, withDirection as withDirection9 } from "@elementor/ui";
|
|
3345
|
-
import { __ as
|
|
3637
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
3346
3638
|
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
3347
3639
|
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
3348
3640
|
var options8 = [
|
|
3349
3641
|
{
|
|
3350
3642
|
value: "start",
|
|
3351
|
-
label:
|
|
3352
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3643
|
+
label: __45("Start", "elementor"),
|
|
3644
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignStartIcon, { fontSize: size }),
|
|
3353
3645
|
showTooltip: true
|
|
3354
3646
|
},
|
|
3355
3647
|
{
|
|
3356
3648
|
value: "center",
|
|
3357
|
-
label:
|
|
3358
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3649
|
+
label: __45("Center", "elementor"),
|
|
3650
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignCenterIcon, { fontSize: size }),
|
|
3359
3651
|
showTooltip: true
|
|
3360
3652
|
},
|
|
3361
3653
|
{
|
|
3362
3654
|
value: "end",
|
|
3363
|
-
label:
|
|
3364
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3655
|
+
label: __45("End", "elementor"),
|
|
3656
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignEndIcon, { fontSize: size }),
|
|
3365
3657
|
showTooltip: true
|
|
3366
3658
|
},
|
|
3367
3659
|
{
|
|
3368
3660
|
value: "justify",
|
|
3369
|
-
label:
|
|
3370
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3661
|
+
label: __45("Justify", "elementor"),
|
|
3662
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
3371
3663
|
showTooltip: true
|
|
3372
3664
|
}
|
|
3373
3665
|
];
|
|
3374
3666
|
var TextAlignmentField = () => {
|
|
3375
|
-
return /* @__PURE__ */
|
|
3667
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React70.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(ControlLabel, null, __45("Text align", "elementor"))), /* @__PURE__ */ React70.createElement(Grid25, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React70.createElement(ToggleControl10, { options: options8 }))));
|
|
3376
3668
|
};
|
|
3377
3669
|
|
|
3378
3670
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3379
|
-
import * as
|
|
3671
|
+
import * as React71 from "react";
|
|
3380
3672
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
3381
3673
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
3382
|
-
import { __ as
|
|
3674
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
3383
3675
|
var TextColorField = () => {
|
|
3384
|
-
return /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React71.createElement(Grid26, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React71.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, __46("Text color", "elementor"))), /* @__PURE__ */ React71.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ColorControl2, null))));
|
|
3385
3677
|
};
|
|
3386
3678
|
|
|
3387
3679
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3388
|
-
import * as
|
|
3680
|
+
import * as React72 from "react";
|
|
3389
3681
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
3390
3682
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
3391
3683
|
import { Grid as Grid27 } from "@elementor/ui";
|
|
3392
|
-
import { __ as
|
|
3684
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
3393
3685
|
var options9 = [
|
|
3394
3686
|
{
|
|
3395
3687
|
value: "none",
|
|
3396
|
-
label:
|
|
3397
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3688
|
+
label: __47("None", "elementor"),
|
|
3689
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(MinusIcon3, { fontSize: size }),
|
|
3398
3690
|
showTooltip: true,
|
|
3399
3691
|
exclusive: true
|
|
3400
3692
|
},
|
|
3401
3693
|
{
|
|
3402
3694
|
value: "underline",
|
|
3403
|
-
label:
|
|
3404
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3695
|
+
label: __47("Underline", "elementor"),
|
|
3696
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(UnderlineIcon, { fontSize: size }),
|
|
3405
3697
|
showTooltip: true
|
|
3406
3698
|
},
|
|
3407
3699
|
{
|
|
3408
3700
|
value: "line-through",
|
|
3409
|
-
label:
|
|
3410
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3701
|
+
label: __47("Line-through", "elementor"),
|
|
3702
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(StrikethroughIcon, { fontSize: size }),
|
|
3411
3703
|
showTooltip: true
|
|
3412
3704
|
},
|
|
3413
3705
|
{
|
|
3414
3706
|
value: "overline",
|
|
3415
|
-
label:
|
|
3416
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3707
|
+
label: __47("Overline", "elementor"),
|
|
3708
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(OverlineIcon, { fontSize: size }),
|
|
3417
3709
|
showTooltip: true
|
|
3418
3710
|
}
|
|
3419
3711
|
];
|
|
3420
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3712
|
+
var TextDecorationField = () => /* @__PURE__ */ React72.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React72.createElement(Grid27, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React72.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, __47("Line decoration", "elementor"))), /* @__PURE__ */ React72.createElement(Grid27, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React72.createElement(ToggleControl11, { options: options9, exclusive: false }))));
|
|
3421
3713
|
|
|
3422
3714
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3423
|
-
import * as
|
|
3715
|
+
import * as React73 from "react";
|
|
3424
3716
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
3425
3717
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
3426
3718
|
import { Grid as Grid28 } from "@elementor/ui";
|
|
3427
|
-
import { __ as
|
|
3719
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
3428
3720
|
var options10 = [
|
|
3429
3721
|
{
|
|
3430
3722
|
value: "ltr",
|
|
3431
|
-
label:
|
|
3432
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3723
|
+
label: __48("Left to right", "elementor"),
|
|
3724
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
3433
3725
|
showTooltip: true
|
|
3434
3726
|
},
|
|
3435
3727
|
{
|
|
3436
3728
|
value: "rtl",
|
|
3437
|
-
label:
|
|
3438
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3729
|
+
label: __48("Right to left", "elementor"),
|
|
3730
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
3439
3731
|
showTooltip: true
|
|
3440
3732
|
}
|
|
3441
3733
|
];
|
|
3442
3734
|
var TextDirectionField = () => {
|
|
3443
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React73.createElement(Grid28, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React73.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, __48("Direction", "elementor"))), /* @__PURE__ */ React73.createElement(Grid28, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React73.createElement(ToggleControl12, { options: options10 }))));
|
|
3444
3736
|
};
|
|
3445
3737
|
|
|
3446
3738
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3447
|
-
import * as
|
|
3739
|
+
import * as React74 from "react";
|
|
3448
3740
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
3449
|
-
import { __ as
|
|
3741
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
3450
3742
|
var initTextStroke = {
|
|
3451
3743
|
$$type: "stroke",
|
|
3452
3744
|
value: {
|
|
@@ -3464,6 +3756,7 @@ var initTextStroke = {
|
|
|
3464
3756
|
}
|
|
3465
3757
|
};
|
|
3466
3758
|
var TextStrokeField = () => {
|
|
3759
|
+
const { canEdit } = useStyle();
|
|
3467
3760
|
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
3468
3761
|
const addTextStroke = () => {
|
|
3469
3762
|
setTextStroke(initTextStroke);
|
|
@@ -3472,67 +3765,68 @@ var TextStrokeField = () => {
|
|
|
3472
3765
|
setTextStroke(null);
|
|
3473
3766
|
};
|
|
3474
3767
|
const hasTextStroke = Boolean(textStroke);
|
|
3475
|
-
return /* @__PURE__ */
|
|
3768
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React74.createElement(
|
|
3476
3769
|
AddOrRemoveContent,
|
|
3477
3770
|
{
|
|
3478
|
-
label:
|
|
3771
|
+
label: __49("Text stroke", "elementor"),
|
|
3479
3772
|
isAdded: hasTextStroke,
|
|
3480
3773
|
onAdd: addTextStroke,
|
|
3481
|
-
onRemove: removeTextStroke
|
|
3774
|
+
onRemove: removeTextStroke,
|
|
3775
|
+
disabled: !canEdit
|
|
3482
3776
|
},
|
|
3483
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ React74.createElement(StrokeControl, null)
|
|
3484
3778
|
));
|
|
3485
3779
|
};
|
|
3486
3780
|
|
|
3487
3781
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3488
|
-
import * as
|
|
3782
|
+
import * as React75 from "react";
|
|
3489
3783
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
3490
3784
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
3491
3785
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
3492
|
-
import { __ as
|
|
3786
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
3493
3787
|
var options11 = [
|
|
3494
3788
|
{
|
|
3495
3789
|
value: "none",
|
|
3496
|
-
label:
|
|
3497
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3790
|
+
label: __50("None", "elementor"),
|
|
3791
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(MinusIcon4, { fontSize: size }),
|
|
3498
3792
|
showTooltip: true
|
|
3499
3793
|
},
|
|
3500
3794
|
{
|
|
3501
3795
|
value: "capitalize",
|
|
3502
|
-
label:
|
|
3503
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3796
|
+
label: __50("Capitalize", "elementor"),
|
|
3797
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterCaseIcon, { fontSize: size }),
|
|
3504
3798
|
showTooltip: true
|
|
3505
3799
|
},
|
|
3506
3800
|
{
|
|
3507
3801
|
value: "uppercase",
|
|
3508
|
-
label:
|
|
3509
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3802
|
+
label: __50("Uppercase", "elementor"),
|
|
3803
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
3510
3804
|
showTooltip: true
|
|
3511
3805
|
},
|
|
3512
3806
|
{
|
|
3513
3807
|
value: "lowercase",
|
|
3514
|
-
label:
|
|
3515
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3808
|
+
label: __50("Lowercase", "elementor"),
|
|
3809
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
3516
3810
|
showTooltip: true
|
|
3517
3811
|
}
|
|
3518
3812
|
];
|
|
3519
|
-
var TransformField = () => /* @__PURE__ */
|
|
3813
|
+
var TransformField = () => /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React75.createElement(Grid29, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React75.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, __50("Text transform", "elementor"))), /* @__PURE__ */ React75.createElement(Grid29, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React75.createElement(ToggleControl13, { options: options11 }))));
|
|
3520
3814
|
|
|
3521
3815
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3522
|
-
import * as
|
|
3816
|
+
import * as React76 from "react";
|
|
3523
3817
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
3524
3818
|
import { Grid as Grid30 } from "@elementor/ui";
|
|
3525
|
-
import { __ as
|
|
3819
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
3526
3820
|
var WordSpacingField = () => {
|
|
3527
|
-
return /* @__PURE__ */
|
|
3821
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React76.createElement(Grid30, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React76.createElement(Grid30, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, __51("Word spacing", "elementor"))), /* @__PURE__ */ React76.createElement(Grid30, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(SizeControl10, null))));
|
|
3528
3822
|
};
|
|
3529
3823
|
|
|
3530
3824
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3531
3825
|
var TypographySection = () => {
|
|
3532
3826
|
const [columnCount] = useStylesField("column-count");
|
|
3533
|
-
const isVersion330Active =
|
|
3827
|
+
const isVersion330Active = isExperimentActive9("e_v_3_30");
|
|
3534
3828
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
3535
|
-
return /* @__PURE__ */
|
|
3829
|
+
return /* @__PURE__ */ React77.createElement(SectionContent, null, /* @__PURE__ */ React77.createElement(FontFamilyField, null), /* @__PURE__ */ React77.createElement(FontWeightField, null), /* @__PURE__ */ React77.createElement(FontSizeField, null), /* @__PURE__ */ React77.createElement(PanelDivider, null), /* @__PURE__ */ React77.createElement(TextAlignmentField, null), /* @__PURE__ */ React77.createElement(TextColorField, null), /* @__PURE__ */ React77.createElement(CollapsibleContent, null, /* @__PURE__ */ React77.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React77.createElement(LineHeightField, null), /* @__PURE__ */ React77.createElement(LetterSpacingField, null), /* @__PURE__ */ React77.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React77.createElement(React77.Fragment, null, /* @__PURE__ */ React77.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React77.createElement(ColumnGapField, null)), /* @__PURE__ */ React77.createElement(PanelDivider, null), /* @__PURE__ */ React77.createElement(TextDecorationField, null), /* @__PURE__ */ React77.createElement(TransformField, null), /* @__PURE__ */ React77.createElement(TextDirectionField, null), /* @__PURE__ */ React77.createElement(FontStyleField, null), /* @__PURE__ */ React77.createElement(TextStrokeField, null))));
|
|
3536
3830
|
};
|
|
3537
3831
|
|
|
3538
3832
|
// src/components/style-tab.tsx
|
|
@@ -3548,15 +3842,15 @@ var PanelSection = ({ section }) => {
|
|
|
3548
3842
|
const { component, name, title } = section;
|
|
3549
3843
|
const tabDefaults = useDefaultPanelSettings();
|
|
3550
3844
|
const SectionComponent = component;
|
|
3551
|
-
const isExpanded =
|
|
3552
|
-
return /* @__PURE__ */
|
|
3845
|
+
const isExpanded = isExperimentActive10(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
3846
|
+
return /* @__PURE__ */ React78.createElement(Section, { title, defaultExpanded: isExpanded }, /* @__PURE__ */ React78.createElement(SectionComponent, null));
|
|
3553
3847
|
};
|
|
3554
3848
|
var StyleTab = () => {
|
|
3555
3849
|
const currentClassesProp = useCurrentClassesProp();
|
|
3556
3850
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
3557
3851
|
const [activeStyleState, setActiveStyleState] = useState12(null);
|
|
3558
3852
|
const breakpoint = useActiveBreakpoint();
|
|
3559
|
-
return /* @__PURE__ */
|
|
3853
|
+
return /* @__PURE__ */ React78.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React78.createElement(
|
|
3560
3854
|
StyleProvider,
|
|
3561
3855
|
{
|
|
3562
3856
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -3567,76 +3861,76 @@ var StyleTab = () => {
|
|
|
3567
3861
|
},
|
|
3568
3862
|
setMetaState: setActiveStyleState
|
|
3569
3863
|
},
|
|
3570
|
-
/* @__PURE__ */
|
|
3864
|
+
/* @__PURE__ */ React78.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React78.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React78.createElement(ClassesHeader, null, /* @__PURE__ */ React78.createElement(CssClassSelector, null), /* @__PURE__ */ React78.createElement(Divider5, null)), /* @__PURE__ */ React78.createElement(SectionsList, null, /* @__PURE__ */ React78.createElement(
|
|
3571
3865
|
PanelSection,
|
|
3572
3866
|
{
|
|
3573
3867
|
section: {
|
|
3574
3868
|
component: LayoutSection,
|
|
3575
3869
|
name: "Layout",
|
|
3576
|
-
title:
|
|
3870
|
+
title: __52("Layout", "elementor")
|
|
3577
3871
|
}
|
|
3578
3872
|
}
|
|
3579
|
-
), /* @__PURE__ */
|
|
3873
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3580
3874
|
PanelSection,
|
|
3581
3875
|
{
|
|
3582
3876
|
section: {
|
|
3583
3877
|
component: SpacingSection,
|
|
3584
3878
|
name: "Spacing",
|
|
3585
|
-
title:
|
|
3879
|
+
title: __52("Spacing", "elementor")
|
|
3586
3880
|
}
|
|
3587
3881
|
}
|
|
3588
|
-
), /* @__PURE__ */
|
|
3882
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3589
3883
|
PanelSection,
|
|
3590
3884
|
{
|
|
3591
3885
|
section: {
|
|
3592
3886
|
component: SizeSection,
|
|
3593
3887
|
name: "Size",
|
|
3594
|
-
title:
|
|
3888
|
+
title: __52("Size", "elementor")
|
|
3595
3889
|
}
|
|
3596
3890
|
}
|
|
3597
|
-
), /* @__PURE__ */
|
|
3891
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3598
3892
|
PanelSection,
|
|
3599
3893
|
{
|
|
3600
3894
|
section: {
|
|
3601
3895
|
component: PositionSection,
|
|
3602
3896
|
name: "Position",
|
|
3603
|
-
title:
|
|
3897
|
+
title: __52("Position", "elementor")
|
|
3604
3898
|
}
|
|
3605
3899
|
}
|
|
3606
|
-
), /* @__PURE__ */
|
|
3900
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3607
3901
|
PanelSection,
|
|
3608
3902
|
{
|
|
3609
3903
|
section: {
|
|
3610
3904
|
component: TypographySection,
|
|
3611
3905
|
name: "Typography",
|
|
3612
|
-
title:
|
|
3906
|
+
title: __52("Typography", "elementor")
|
|
3613
3907
|
}
|
|
3614
3908
|
}
|
|
3615
|
-
), /* @__PURE__ */
|
|
3909
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3616
3910
|
PanelSection,
|
|
3617
3911
|
{
|
|
3618
3912
|
section: {
|
|
3619
3913
|
component: BackgroundSection,
|
|
3620
3914
|
name: "Background",
|
|
3621
|
-
title:
|
|
3915
|
+
title: __52("Background", "elementor")
|
|
3622
3916
|
}
|
|
3623
3917
|
}
|
|
3624
|
-
), /* @__PURE__ */
|
|
3918
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3625
3919
|
PanelSection,
|
|
3626
3920
|
{
|
|
3627
3921
|
section: {
|
|
3628
3922
|
component: BorderSection,
|
|
3629
3923
|
name: "Border",
|
|
3630
|
-
title:
|
|
3924
|
+
title: __52("Border", "elementor")
|
|
3631
3925
|
}
|
|
3632
3926
|
}
|
|
3633
|
-
), /* @__PURE__ */
|
|
3927
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3634
3928
|
PanelSection,
|
|
3635
3929
|
{
|
|
3636
3930
|
section: {
|
|
3637
3931
|
component: EffectsSection,
|
|
3638
3932
|
name: "Effects",
|
|
3639
|
-
title:
|
|
3933
|
+
title: __52("Effects", "elementor")
|
|
3640
3934
|
}
|
|
3641
3935
|
}
|
|
3642
3936
|
))))
|
|
@@ -3644,7 +3938,7 @@ var StyleTab = () => {
|
|
|
3644
3938
|
};
|
|
3645
3939
|
function ClassesHeader({ children }) {
|
|
3646
3940
|
const scrollDirection = useScrollDirection();
|
|
3647
|
-
return /* @__PURE__ */
|
|
3941
|
+
return /* @__PURE__ */ React78.createElement(Stack17, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3648
3942
|
}
|
|
3649
3943
|
function useCurrentClassesProp() {
|
|
3650
3944
|
const { elementType } = useElement();
|
|
@@ -3663,15 +3957,15 @@ var EditingPanelTabs = () => {
|
|
|
3663
3957
|
return (
|
|
3664
3958
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
3665
3959
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
3666
|
-
/* @__PURE__ */
|
|
3960
|
+
/* @__PURE__ */ React79.createElement(Fragment9, { key: element.id }, /* @__PURE__ */ React79.createElement(PanelTabContent, null))
|
|
3667
3961
|
);
|
|
3668
3962
|
};
|
|
3669
3963
|
var PanelTabContent = () => {
|
|
3670
3964
|
const editorDefaults = useDefaultPanelSettings();
|
|
3671
|
-
const defaultComponentTab =
|
|
3965
|
+
const defaultComponentTab = isExperimentActive11(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
3672
3966
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
3673
3967
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
3674
|
-
return /* @__PURE__ */
|
|
3968
|
+
return /* @__PURE__ */ React79.createElement(ScrollProvider, null, /* @__PURE__ */ React79.createElement(Stack18, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React79.createElement(Stack18, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React79.createElement(
|
|
3675
3969
|
Tabs,
|
|
3676
3970
|
{
|
|
3677
3971
|
variant: "fullWidth",
|
|
@@ -3683,9 +3977,9 @@ var PanelTabContent = () => {
|
|
|
3683
3977
|
setCurrentTab(newValue);
|
|
3684
3978
|
}
|
|
3685
3979
|
},
|
|
3686
|
-
/* @__PURE__ */
|
|
3687
|
-
/* @__PURE__ */
|
|
3688
|
-
), /* @__PURE__ */
|
|
3980
|
+
/* @__PURE__ */ React79.createElement(Tab, { label: __53("General", "elementor"), ...getTabProps("settings") }),
|
|
3981
|
+
/* @__PURE__ */ React79.createElement(Tab, { label: __53("Style", "elementor"), ...getTabProps("style") })
|
|
3982
|
+
), /* @__PURE__ */ React79.createElement(Divider6, null)), /* @__PURE__ */ React79.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React79.createElement(SettingsTab, null)), /* @__PURE__ */ React79.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React79.createElement(StyleTab, null))));
|
|
3689
3983
|
};
|
|
3690
3984
|
|
|
3691
3985
|
// src/components/editing-panel.tsx
|
|
@@ -3697,8 +3991,8 @@ var EditingPanel = () => {
|
|
|
3697
3991
|
if (!element || !elementType) {
|
|
3698
3992
|
return null;
|
|
3699
3993
|
}
|
|
3700
|
-
const panelTitle =
|
|
3701
|
-
return /* @__PURE__ */
|
|
3994
|
+
const panelTitle = __54("Edit %s", "elementor").replace("%s", elementType.title);
|
|
3995
|
+
return /* @__PURE__ */ React80.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React80.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React80.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React80.createElement(ThemeProvider9, null, /* @__PURE__ */ React80.createElement(Panel, null, /* @__PURE__ */ React80.createElement(PanelHeader, null, /* @__PURE__ */ React80.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React80.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React80.createElement(PanelBody, null, /* @__PURE__ */ React80.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React80.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React80.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React80.createElement(EditingPanelTabs, null)))))))));
|
|
3702
3996
|
};
|
|
3703
3997
|
|
|
3704
3998
|
// src/panel.ts
|
|
@@ -3711,7 +4005,7 @@ var { panel, usePanelActions, usePanelStatus } = createPanel({
|
|
|
3711
4005
|
import { injectIntoLogic } from "@elementor/editor";
|
|
3712
4006
|
import { PrefetchUserData } from "@elementor/editor-current-user";
|
|
3713
4007
|
import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
3714
|
-
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
4008
|
+
import { blockCommand, isExperimentActive as isExperimentActive12 } from "@elementor/editor-v1-adapters";
|
|
3715
4009
|
|
|
3716
4010
|
// src/hooks/use-open-editor-panel.ts
|
|
3717
4011
|
import { useEffect as useEffect4 } from "react";
|
|
@@ -3747,36 +4041,36 @@ var EditingPanelHooks = () => {
|
|
|
3747
4041
|
};
|
|
3748
4042
|
|
|
3749
4043
|
// src/dynamics/init.ts
|
|
3750
|
-
import { settingsTransformersRegistry, styleTransformersRegistry
|
|
4044
|
+
import { settingsTransformersRegistry, styleTransformersRegistry } from "@elementor/editor-canvas";
|
|
3751
4045
|
|
|
3752
4046
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3753
|
-
import * as
|
|
4047
|
+
import * as React84 from "react";
|
|
3754
4048
|
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
3755
4049
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
3756
4050
|
import {
|
|
3757
4051
|
bindPopover as bindPopover2,
|
|
3758
4052
|
bindTrigger as bindTrigger2,
|
|
3759
|
-
Box as
|
|
4053
|
+
Box as Box8,
|
|
3760
4054
|
Divider as Divider8,
|
|
3761
4055
|
Grid as Grid31,
|
|
3762
|
-
IconButton as
|
|
4056
|
+
IconButton as IconButton5,
|
|
3763
4057
|
Paper,
|
|
3764
4058
|
Popover as Popover2,
|
|
3765
|
-
Stack as
|
|
4059
|
+
Stack as Stack21,
|
|
3766
4060
|
Tab as Tab2,
|
|
3767
4061
|
TabPanel as TabPanel2,
|
|
3768
4062
|
Tabs as Tabs2,
|
|
3769
|
-
Typography as
|
|
4063
|
+
Typography as Typography8,
|
|
3770
4064
|
UnstableTag as Tag,
|
|
3771
4065
|
usePopupState as usePopupState3,
|
|
3772
4066
|
useTabs as useTabs2
|
|
3773
4067
|
} from "@elementor/ui";
|
|
3774
|
-
import { __ as
|
|
4068
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
3775
4069
|
|
|
3776
4070
|
// src/components/popover-content.tsx
|
|
3777
|
-
import * as
|
|
3778
|
-
import { Stack as
|
|
3779
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
4071
|
+
import * as React81 from "react";
|
|
4072
|
+
import { Stack as Stack19 } from "@elementor/ui";
|
|
4073
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React81.createElement(Stack19, { alignItems, gap, p }, children);
|
|
3780
4074
|
|
|
3781
4075
|
// src/hooks/use-persist-dynamic-value.ts
|
|
3782
4076
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -3787,7 +4081,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
3787
4081
|
};
|
|
3788
4082
|
|
|
3789
4083
|
// src/dynamics/dynamic-control.tsx
|
|
3790
|
-
import * as
|
|
4084
|
+
import * as React82 from "react";
|
|
3791
4085
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
3792
4086
|
|
|
3793
4087
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -3889,28 +4183,28 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3889
4183
|
});
|
|
3890
4184
|
};
|
|
3891
4185
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3892
|
-
return /* @__PURE__ */
|
|
4186
|
+
return /* @__PURE__ */ React82.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React82.createElement(PropKeyProvider3, { bind }, children));
|
|
3893
4187
|
};
|
|
3894
4188
|
|
|
3895
4189
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3896
|
-
import * as
|
|
4190
|
+
import * as React83 from "react";
|
|
3897
4191
|
import { Fragment as Fragment10, useState as useState13 } from "react";
|
|
3898
4192
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
3899
4193
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
3900
4194
|
import {
|
|
3901
|
-
Box as
|
|
4195
|
+
Box as Box7,
|
|
3902
4196
|
Divider as Divider7,
|
|
3903
4197
|
InputAdornment,
|
|
3904
4198
|
Link as Link2,
|
|
3905
4199
|
MenuItem,
|
|
3906
4200
|
MenuList,
|
|
3907
4201
|
MenuSubheader as MenuSubheader2,
|
|
3908
|
-
Stack as
|
|
4202
|
+
Stack as Stack20,
|
|
3909
4203
|
TextField as TextField2,
|
|
3910
|
-
Typography as
|
|
4204
|
+
Typography as Typography7
|
|
3911
4205
|
} from "@elementor/ui";
|
|
3912
|
-
import { __ as
|
|
3913
|
-
var
|
|
4206
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
4207
|
+
var SIZE7 = "tiny";
|
|
3914
4208
|
var DynamicSelection = ({ onSelect }) => {
|
|
3915
4209
|
const [searchValue, setSearchValue] = useState13("");
|
|
3916
4210
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
@@ -3930,19 +4224,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3930
4224
|
setValue({ name: value, settings: { label } });
|
|
3931
4225
|
onSelect?.();
|
|
3932
4226
|
};
|
|
3933
|
-
return /* @__PURE__ */
|
|
4227
|
+
return /* @__PURE__ */ React83.createElement(Stack20, null, hasNoDynamicTags ? /* @__PURE__ */ React83.createElement(NoDynamicTags, null) : /* @__PURE__ */ React83.createElement(Fragment10, null, /* @__PURE__ */ React83.createElement(Box7, { px: 1.5, pb: 1 }, /* @__PURE__ */ React83.createElement(
|
|
3934
4228
|
TextField2,
|
|
3935
4229
|
{
|
|
3936
4230
|
fullWidth: true,
|
|
3937
|
-
size:
|
|
4231
|
+
size: SIZE7,
|
|
3938
4232
|
value: searchValue,
|
|
3939
4233
|
onChange: handleSearch,
|
|
3940
|
-
placeholder:
|
|
4234
|
+
placeholder: __55("Search dynamic tags\u2026", "elementor"),
|
|
3941
4235
|
InputProps: {
|
|
3942
|
-
startAdornment: /* @__PURE__ */
|
|
4236
|
+
startAdornment: /* @__PURE__ */ React83.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React83.createElement(SearchIcon, { fontSize: SIZE7 }))
|
|
3943
4237
|
}
|
|
3944
4238
|
}
|
|
3945
|
-
)), /* @__PURE__ */
|
|
4239
|
+
)), /* @__PURE__ */ React83.createElement(Divider7, null), /* @__PURE__ */ React83.createElement(Box7, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React83.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React83.createElement(Fragment10, { key: index }, /* @__PURE__ */ React83.createElement(
|
|
3946
4240
|
MenuSubheader2,
|
|
3947
4241
|
{
|
|
3948
4242
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -3950,7 +4244,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3950
4244
|
dynamicGroups?.[category]?.title || category
|
|
3951
4245
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3952
4246
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3953
|
-
return /* @__PURE__ */
|
|
4247
|
+
return /* @__PURE__ */ React83.createElement(
|
|
3954
4248
|
MenuItem,
|
|
3955
4249
|
{
|
|
3956
4250
|
key: value,
|
|
@@ -3961,10 +4255,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3961
4255
|
},
|
|
3962
4256
|
tagLabel
|
|
3963
4257
|
);
|
|
3964
|
-
})))) : /* @__PURE__ */
|
|
4258
|
+
})))) : /* @__PURE__ */ React83.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3965
4259
|
};
|
|
3966
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3967
|
-
|
|
4260
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React83.createElement(
|
|
4261
|
+
Stack20,
|
|
3968
4262
|
{
|
|
3969
4263
|
gap: 1,
|
|
3970
4264
|
alignItems: "center",
|
|
@@ -3974,12 +4268,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React78.createElem
|
|
|
3974
4268
|
color: "text.secondary",
|
|
3975
4269
|
sx: { pb: 3.5 }
|
|
3976
4270
|
},
|
|
3977
|
-
/* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */
|
|
3979
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ React83.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
4272
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "subtitle2" }, __55("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React83.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4273
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "caption" }, __55("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React83.createElement(Link2, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __55("Clear & try again", "elementor")))
|
|
3980
4274
|
);
|
|
3981
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3982
|
-
|
|
4275
|
+
var NoDynamicTags = () => /* @__PURE__ */ React83.createElement(Box7, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React83.createElement(Divider7, null), /* @__PURE__ */ React83.createElement(
|
|
4276
|
+
Stack20,
|
|
3983
4277
|
{
|
|
3984
4278
|
gap: 1,
|
|
3985
4279
|
alignItems: "center",
|
|
@@ -3989,9 +4283,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React78.createElement(Box5, { sx: { ov
|
|
|
3989
4283
|
color: "text.secondary",
|
|
3990
4284
|
sx: { pb: 3.5 }
|
|
3991
4285
|
},
|
|
3992
|
-
/* @__PURE__ */
|
|
3993
|
-
/* @__PURE__ */
|
|
3994
|
-
/* @__PURE__ */
|
|
4286
|
+
/* @__PURE__ */ React83.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
4287
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "subtitle2" }, __55("Streamline your workflow with dynamic tags", "elementor")),
|
|
4288
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "caption" }, __55("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3995
4289
|
));
|
|
3996
4290
|
var useFilteredOptions = (searchValue) => {
|
|
3997
4291
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4010,7 +4304,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4010
4304
|
};
|
|
4011
4305
|
|
|
4012
4306
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4013
|
-
var
|
|
4307
|
+
var SIZE8 = "tiny";
|
|
4014
4308
|
var DynamicSelectionControl = () => {
|
|
4015
4309
|
const { setValue: setAnyValue } = useBoundProp5();
|
|
4016
4310
|
const { bind, value } = useBoundProp5(dynamicPropTypeUtil);
|
|
@@ -4024,25 +4318,25 @@ var DynamicSelectionControl = () => {
|
|
|
4024
4318
|
if (!dynamicTag) {
|
|
4025
4319
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4026
4320
|
}
|
|
4027
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ React84.createElement(Box8, null, /* @__PURE__ */ React84.createElement(
|
|
4028
4322
|
Tag,
|
|
4029
4323
|
{
|
|
4030
4324
|
fullWidth: true,
|
|
4031
4325
|
showActionsOnHover: true,
|
|
4032
4326
|
label: dynamicTag.label,
|
|
4033
|
-
startIcon: /* @__PURE__ */
|
|
4327
|
+
startIcon: /* @__PURE__ */ React84.createElement(DatabaseIcon2, { fontSize: SIZE8 }),
|
|
4034
4328
|
...bindTrigger2(selectionPopoverState),
|
|
4035
|
-
actions: /* @__PURE__ */
|
|
4036
|
-
|
|
4329
|
+
actions: /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React84.createElement(
|
|
4330
|
+
IconButton5,
|
|
4037
4331
|
{
|
|
4038
|
-
size:
|
|
4332
|
+
size: SIZE8,
|
|
4039
4333
|
onClick: removeDynamicTag,
|
|
4040
|
-
"aria-label":
|
|
4334
|
+
"aria-label": __56("Remove dynamic value", "elementor")
|
|
4041
4335
|
},
|
|
4042
|
-
/* @__PURE__ */
|
|
4336
|
+
/* @__PURE__ */ React84.createElement(XIcon2, { fontSize: SIZE8 })
|
|
4043
4337
|
))
|
|
4044
4338
|
}
|
|
4045
|
-
), /* @__PURE__ */
|
|
4339
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4046
4340
|
Popover2,
|
|
4047
4341
|
{
|
|
4048
4342
|
disablePortal: true,
|
|
@@ -4050,7 +4344,7 @@ var DynamicSelectionControl = () => {
|
|
|
4050
4344
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4051
4345
|
...bindPopover2(selectionPopoverState)
|
|
4052
4346
|
},
|
|
4053
|
-
/* @__PURE__ */
|
|
4347
|
+
/* @__PURE__ */ React84.createElement(Stack21, null, /* @__PURE__ */ React84.createElement(Stack21, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React84.createElement(DatabaseIcon2, { fontSize: SIZE8, sx: { mr: 0.5 } }), /* @__PURE__ */ React84.createElement(Typography8, { variant: "subtitle2" }, __56("Dynamic tags", "elementor")), /* @__PURE__ */ React84.createElement(IconButton5, { size: SIZE8, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React84.createElement(XIcon2, { fontSize: SIZE8 }))), /* @__PURE__ */ React84.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
4054
4348
|
));
|
|
4055
4349
|
};
|
|
4056
4350
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -4059,7 +4353,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4059
4353
|
if (!hasDynamicSettings) {
|
|
4060
4354
|
return null;
|
|
4061
4355
|
}
|
|
4062
|
-
return /* @__PURE__ */
|
|
4356
|
+
return /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(IconButton5, { size: SIZE8, ...bindTrigger2(popupState), "aria-label": __56("Settings", "elementor") }, /* @__PURE__ */ React84.createElement(SettingsIcon, { fontSize: SIZE8 })), /* @__PURE__ */ React84.createElement(
|
|
4063
4357
|
Popover2,
|
|
4064
4358
|
{
|
|
4065
4359
|
disablePortal: true,
|
|
@@ -4067,7 +4361,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4067
4361
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4068
4362
|
...bindPopover2(popupState)
|
|
4069
4363
|
},
|
|
4070
|
-
/* @__PURE__ */
|
|
4364
|
+
/* @__PURE__ */ React84.createElement(Paper, { component: Stack21, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React84.createElement(Stack21, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React84.createElement(DatabaseIcon2, { fontSize: SIZE8, sx: { mr: 0.5 } }), /* @__PURE__ */ React84.createElement(Typography8, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React84.createElement(IconButton5, { sx: { ml: "auto" }, size: SIZE8, onClick: popupState.close }, /* @__PURE__ */ React84.createElement(XIcon2, { fontSize: SIZE8 }))), /* @__PURE__ */ React84.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
4071
4365
|
));
|
|
4072
4366
|
};
|
|
4073
4367
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -4076,10 +4370,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
4076
4370
|
if (!tabs.length) {
|
|
4077
4371
|
return null;
|
|
4078
4372
|
}
|
|
4079
|
-
return /* @__PURE__ */
|
|
4080
|
-
return /* @__PURE__ */
|
|
4373
|
+
return /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React84.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React84.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
4374
|
+
return /* @__PURE__ */ React84.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React84.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4081
4375
|
if (item.type === "control") {
|
|
4082
|
-
return /* @__PURE__ */
|
|
4376
|
+
return /* @__PURE__ */ React84.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4083
4377
|
}
|
|
4084
4378
|
return null;
|
|
4085
4379
|
})));
|
|
@@ -4089,7 +4383,7 @@ var Control3 = ({ control }) => {
|
|
|
4089
4383
|
if (!getControl(control.type)) {
|
|
4090
4384
|
return null;
|
|
4091
4385
|
}
|
|
4092
|
-
return /* @__PURE__ */
|
|
4386
|
+
return /* @__PURE__ */ React84.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React84.createElement(Grid31, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React84.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React84.createElement(ControlFormLabel5, null, control.label)) : null, /* @__PURE__ */ React84.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React84.createElement(Control, { type: control.type, props: control.props }))));
|
|
4093
4387
|
};
|
|
4094
4388
|
|
|
4095
4389
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -4142,18 +4436,18 @@ function getDynamicValue(name, settings) {
|
|
|
4142
4436
|
}
|
|
4143
4437
|
|
|
4144
4438
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4145
|
-
import * as
|
|
4439
|
+
import * as React85 from "react";
|
|
4146
4440
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4147
4441
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
4148
|
-
import { __ as
|
|
4442
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
4149
4443
|
var usePropDynamicAction = () => {
|
|
4150
4444
|
const { propType } = useBoundProp6();
|
|
4151
4445
|
const visible = !!propType && supportsDynamic(propType);
|
|
4152
4446
|
return {
|
|
4153
4447
|
visible,
|
|
4154
4448
|
icon: DatabaseIcon3,
|
|
4155
|
-
title:
|
|
4156
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
4449
|
+
title: __57("Dynamic tags", "elementor"),
|
|
4450
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React85.createElement(DynamicSelection, { onSelect: closePopover })
|
|
4157
4451
|
};
|
|
4158
4452
|
};
|
|
4159
4453
|
|
|
@@ -4168,12 +4462,170 @@ var init = () => {
|
|
|
4168
4462
|
id: "dynamic-tags",
|
|
4169
4463
|
useProps: usePropDynamicAction
|
|
4170
4464
|
});
|
|
4171
|
-
|
|
4465
|
+
styleTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
4172
4466
|
settingsTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
4173
4467
|
};
|
|
4174
4468
|
|
|
4469
|
+
// src/reset-style-props.tsx
|
|
4470
|
+
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
4471
|
+
import { BrushBigIcon } from "@elementor/icons";
|
|
4472
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
4473
|
+
var { registerAction } = controlActionsMenu;
|
|
4474
|
+
function initResetStyleProps() {
|
|
4475
|
+
registerAction({
|
|
4476
|
+
id: "reset-style-value",
|
|
4477
|
+
useProps: useResetStyleValueProps
|
|
4478
|
+
});
|
|
4479
|
+
}
|
|
4480
|
+
var EXCLUDED_BINDS = ["order", "flex-grow", "flex-shrink", "flex-basis"];
|
|
4481
|
+
function useResetStyleValueProps() {
|
|
4482
|
+
const isStyle = useIsStyle();
|
|
4483
|
+
const { value, setValue, path, bind } = useBoundProp7();
|
|
4484
|
+
return {
|
|
4485
|
+
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4486
|
+
title: __58("Clear", "elementor"),
|
|
4487
|
+
icon: BrushBigIcon,
|
|
4488
|
+
onClick: () => setValue(null)
|
|
4489
|
+
};
|
|
4490
|
+
}
|
|
4491
|
+
|
|
4492
|
+
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
4493
|
+
import { createTransformer as createTransformer6, styleTransformersRegistry as styleTransformersRegistry2 } from "@elementor/editor-canvas";
|
|
4494
|
+
|
|
4495
|
+
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4496
|
+
import * as React86 from "react";
|
|
4497
|
+
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
4498
|
+
import { Stack as Stack22, styled as styled6, UnstableColorIndicator } from "@elementor/ui";
|
|
4499
|
+
var backgroundColorOverlayTransformer = createTransformer2((value) => /* @__PURE__ */ React86.createElement(Stack22, { direction: "row", gap: 10 }, /* @__PURE__ */ React86.createElement(ItemIconColor, { value }), /* @__PURE__ */ React86.createElement(ItemLabelColor, { value })));
|
|
4500
|
+
var ItemIconColor = ({ value }) => {
|
|
4501
|
+
const { color } = value;
|
|
4502
|
+
return /* @__PURE__ */ React86.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4503
|
+
};
|
|
4504
|
+
var ItemLabelColor = ({ value: { color } }) => {
|
|
4505
|
+
return /* @__PURE__ */ React86.createElement("span", null, color);
|
|
4506
|
+
};
|
|
4507
|
+
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) => ({
|
|
4508
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4509
|
+
}));
|
|
4510
|
+
|
|
4511
|
+
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4512
|
+
import * as React87 from "react";
|
|
4513
|
+
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
4514
|
+
import { Stack as Stack23 } from "@elementor/ui";
|
|
4515
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
4516
|
+
var backgroundGradientOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React87.createElement(Stack23, { direction: "row", gap: 10 }, /* @__PURE__ */ React87.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React87.createElement(ItemLabelGradient, { value })));
|
|
4517
|
+
var ItemIconGradient = ({ value }) => {
|
|
4518
|
+
const gradient = getGradientValue(value);
|
|
4519
|
+
return /* @__PURE__ */ React87.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4520
|
+
};
|
|
4521
|
+
var ItemLabelGradient = ({ value }) => {
|
|
4522
|
+
if (value.type === "linear") {
|
|
4523
|
+
return /* @__PURE__ */ React87.createElement("span", null, __59("Linear Gradient", "elementor"));
|
|
4524
|
+
}
|
|
4525
|
+
return /* @__PURE__ */ React87.createElement("span", null, __59("Radial Gradient", "elementor"));
|
|
4526
|
+
};
|
|
4527
|
+
var getGradientValue = (gradient) => {
|
|
4528
|
+
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
4529
|
+
if (gradient.type === "linear") {
|
|
4530
|
+
return `linear-gradient(${gradient.angle}deg, ${stops})`;
|
|
4531
|
+
}
|
|
4532
|
+
return `radial-gradient(circle at ${gradient.positions}, ${stops})`;
|
|
4533
|
+
};
|
|
4534
|
+
|
|
4535
|
+
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4536
|
+
import * as React88 from "react";
|
|
4537
|
+
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
4538
|
+
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
4539
|
+
import { CardMedia, Stack as Stack24 } from "@elementor/ui";
|
|
4540
|
+
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
4541
|
+
var backgroundImageOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React88.createElement(Stack24, { direction: "row", gap: 10 }, /* @__PURE__ */ React88.createElement(ItemIconImage, { value }), /* @__PURE__ */ React88.createElement(ItemLabelImage, { value })));
|
|
4542
|
+
var ItemIconImage = ({ value }) => {
|
|
4543
|
+
const { imageUrl } = useImage(value);
|
|
4544
|
+
return /* @__PURE__ */ React88.createElement(
|
|
4545
|
+
CardMedia,
|
|
4546
|
+
{
|
|
4547
|
+
image: imageUrl,
|
|
4548
|
+
sx: (theme) => ({
|
|
4549
|
+
height: "1em",
|
|
4550
|
+
width: "1em",
|
|
4551
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
4552
|
+
outline: `1px solid ${theme.palette.action.disabled}`
|
|
4553
|
+
})
|
|
4554
|
+
}
|
|
4555
|
+
);
|
|
4556
|
+
};
|
|
4557
|
+
var ItemLabelImage = ({ value }) => {
|
|
4558
|
+
const { imageTitle } = useImage(value);
|
|
4559
|
+
return /* @__PURE__ */ React88.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React88.createElement("span", null, imageTitle));
|
|
4560
|
+
};
|
|
4561
|
+
var useImage = (image) => {
|
|
4562
|
+
let imageTitle, imageUrl = null;
|
|
4563
|
+
const imageSrc = image?.image.src;
|
|
4564
|
+
const { data: attachment } = useWpMediaAttachment(imageSrc.id || null);
|
|
4565
|
+
if (imageSrc.id) {
|
|
4566
|
+
const imageFileTypeExtension = getFileExtensionFromFilename(attachment?.filename);
|
|
4567
|
+
imageTitle = `${attachment?.title}${imageFileTypeExtension}` || null;
|
|
4568
|
+
imageUrl = attachment?.url || null;
|
|
4569
|
+
} else if (imageSrc.url) {
|
|
4570
|
+
imageUrl = imageSrc.url;
|
|
4571
|
+
imageTitle = imageUrl?.substring(imageUrl.lastIndexOf("/") + 1) || null;
|
|
4572
|
+
}
|
|
4573
|
+
return { imageTitle, imageUrl };
|
|
4574
|
+
};
|
|
4575
|
+
var getFileExtensionFromFilename = (filename) => {
|
|
4576
|
+
if (!filename) {
|
|
4577
|
+
return "";
|
|
4578
|
+
}
|
|
4579
|
+
const extension = filename.substring(filename.lastIndexOf(".") + 1);
|
|
4580
|
+
return `.${extension}`;
|
|
4581
|
+
};
|
|
4582
|
+
|
|
4583
|
+
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4584
|
+
import * as React89 from "react";
|
|
4585
|
+
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
4586
|
+
import { Stack as Stack25 } from "@elementor/ui";
|
|
4587
|
+
var backgroundOverlayTransformer = createTransformer5((values) => {
|
|
4588
|
+
if (!values || values.length === 0) {
|
|
4589
|
+
return null;
|
|
4590
|
+
}
|
|
4591
|
+
return /* @__PURE__ */ React89.createElement(Stack25, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React89.createElement(Stack25, { key: index }, item)));
|
|
4592
|
+
});
|
|
4593
|
+
|
|
4594
|
+
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
4595
|
+
function initStylesInheritanceTransformers() {
|
|
4596
|
+
const originalStyleTransformers = styleTransformersRegistry2.all();
|
|
4597
|
+
Object.entries(originalStyleTransformers).forEach(([propType, transformer]) => {
|
|
4598
|
+
if (excludePropTypeTransformers.has(propType)) {
|
|
4599
|
+
return;
|
|
4600
|
+
}
|
|
4601
|
+
stylesInheritanceTransformersRegistry.register(propType, transformer);
|
|
4602
|
+
});
|
|
4603
|
+
stylesInheritanceTransformersRegistry.registerFallback(
|
|
4604
|
+
createTransformer6((value) => {
|
|
4605
|
+
return value;
|
|
4606
|
+
})
|
|
4607
|
+
);
|
|
4608
|
+
registerCustomTransformers();
|
|
4609
|
+
}
|
|
4610
|
+
function registerCustomTransformers() {
|
|
4611
|
+
stylesInheritanceTransformersRegistry.register("background-color-overlay", backgroundColorOverlayTransformer);
|
|
4612
|
+
stylesInheritanceTransformersRegistry.register(
|
|
4613
|
+
"background-gradient-overlay",
|
|
4614
|
+
backgroundGradientOverlayTransformer
|
|
4615
|
+
);
|
|
4616
|
+
stylesInheritanceTransformersRegistry.register("background-image-overlay", backgroundImageOverlayTransformer);
|
|
4617
|
+
stylesInheritanceTransformersRegistry.register("background-overlay", backgroundOverlayTransformer);
|
|
4618
|
+
}
|
|
4619
|
+
|
|
4620
|
+
// src/styles-inheritance/init.ts
|
|
4621
|
+
var init2 = () => {
|
|
4622
|
+
if (isUsingIndicatorPopover()) {
|
|
4623
|
+
initStylesInheritanceTransformers();
|
|
4624
|
+
}
|
|
4625
|
+
};
|
|
4626
|
+
|
|
4175
4627
|
// src/init.ts
|
|
4176
|
-
function
|
|
4628
|
+
function init3() {
|
|
4177
4629
|
registerPanel(panel);
|
|
4178
4630
|
blockV1Panel();
|
|
4179
4631
|
injectIntoLogic({
|
|
@@ -4185,6 +4637,10 @@ function init2() {
|
|
|
4185
4637
|
component: PrefetchUserData
|
|
4186
4638
|
});
|
|
4187
4639
|
init();
|
|
4640
|
+
init2();
|
|
4641
|
+
if (isExperimentActive12(EXPERIMENTAL_FEATURES.V_3_30)) {
|
|
4642
|
+
initResetStyleProps();
|
|
4643
|
+
}
|
|
4188
4644
|
}
|
|
4189
4645
|
var blockV1Panel = () => {
|
|
4190
4646
|
blockCommand({
|
|
@@ -4194,10 +4650,10 @@ var blockV1Panel = () => {
|
|
|
4194
4650
|
};
|
|
4195
4651
|
export {
|
|
4196
4652
|
controlActionsMenu,
|
|
4197
|
-
|
|
4653
|
+
init3 as init,
|
|
4198
4654
|
injectIntoClassSelectorActions,
|
|
4199
4655
|
registerControlReplacement,
|
|
4200
|
-
|
|
4656
|
+
useBoundProp8 as useBoundProp,
|
|
4201
4657
|
usePanelActions,
|
|
4202
4658
|
usePanelStatus
|
|
4203
4659
|
};
|