@elementor/editor-editing-panel 1.40.0 → 1.42.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 +46 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1227 -745
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1133 -628
- 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/size-section/object-fit-field.tsx +2 -6
- package/src/components/style-sections/size-section/object-position-field.tsx +2 -6
- package/src/components/style-sections/size-section/size-section.tsx +4 -10
- 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 +48 -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/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx +121 -0
- 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 +169 -20
- 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 +8 -2
- package/src/hooks/use-normalized-inheritance-chain-items.tsx +0 -75
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
|
|
1157
|
-
import { Fragment as
|
|
1158
|
-
import { isExperimentActive as
|
|
1159
|
-
import { Divider as Divider6, Stack as
|
|
1160
|
-
import { __ as
|
|
1181
|
+
import * as React79 from "react";
|
|
1182
|
+
import { Fragment as Fragment10 } from "react";
|
|
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,46 +1927,213 @@ 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 Tooltip6 } 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_v_3_30");
|
|
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 {
|
|
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 {
|
|
1959
|
+
Backdrop,
|
|
1960
|
+
Box as Box6,
|
|
1961
|
+
Card,
|
|
1962
|
+
CardContent,
|
|
1963
|
+
ClickAwayListener,
|
|
1964
|
+
CloseButton,
|
|
1965
|
+
IconButton as IconButton3,
|
|
1966
|
+
Infotip,
|
|
1967
|
+
Stack as Stack7,
|
|
1968
|
+
Tooltip as Tooltip5,
|
|
1969
|
+
Typography as Typography6
|
|
1970
|
+
} from "@elementor/ui";
|
|
1971
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1972
|
+
|
|
1973
|
+
// src/components/section-content.tsx
|
|
1974
|
+
import { createContext as createContext8, useContext as useContext8, useRef as useRef3 } from "react";
|
|
1975
|
+
import * as React20 from "react";
|
|
1976
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
1977
|
+
var SectionContentRefContext = createContext8(null);
|
|
1978
|
+
var useSectionContentRef = () => useContext8(SectionContentRefContext);
|
|
1979
|
+
var SectionContent = ({ gap = 2, sx, children }) => {
|
|
1980
|
+
const ref = useRef3(null);
|
|
1981
|
+
return /* @__PURE__ */ React20.createElement(SectionContentRefContext.Provider, { value: ref }, /* @__PURE__ */ React20.createElement(Stack6, { gap, sx: { ...sx }, ref }, children));
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
// src/hooks/use-direction.ts
|
|
1985
|
+
import { useTheme } from "@elementor/ui";
|
|
1986
|
+
|
|
1987
|
+
// src/sync/get-elementor-globals.ts
|
|
1988
|
+
var getElementorConfig = () => {
|
|
1989
|
+
const extendedWindow = window;
|
|
1990
|
+
return extendedWindow.elementor?.config ?? {};
|
|
1991
|
+
};
|
|
1992
|
+
var getElementorFrontendConfig = () => {
|
|
1993
|
+
const extendedWindow = window;
|
|
1994
|
+
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1997
|
+
// src/hooks/use-direction.ts
|
|
1998
|
+
function useDirection() {
|
|
1999
|
+
const theme = useTheme();
|
|
2000
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2001
|
+
return { isSiteRtl, isUiRtl };
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
// src/styles-inheritance/components/breakpoint-icon.tsx
|
|
2005
|
+
import * as React21 from "react";
|
|
2006
|
+
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
2007
|
+
import {
|
|
2008
|
+
DesktopIcon,
|
|
2009
|
+
LaptopIcon,
|
|
2010
|
+
MobileLandscapeIcon,
|
|
2011
|
+
MobilePortraitIcon,
|
|
2012
|
+
TabletLandscapeIcon,
|
|
2013
|
+
TabletPortraitIcon,
|
|
2014
|
+
WidescreenIcon
|
|
2015
|
+
} from "@elementor/icons";
|
|
2016
|
+
import { Tooltip as Tooltip3 } from "@elementor/ui";
|
|
2017
|
+
var SIZE3 = "tiny";
|
|
2018
|
+
var DEFAULT_BREAKPOINT2 = "desktop";
|
|
2019
|
+
var breakpointIconMap = {
|
|
2020
|
+
widescreen: WidescreenIcon,
|
|
2021
|
+
desktop: DesktopIcon,
|
|
2022
|
+
laptop: LaptopIcon,
|
|
2023
|
+
tablet_extra: TabletLandscapeIcon,
|
|
2024
|
+
tablet: TabletPortraitIcon,
|
|
2025
|
+
mobile_extra: MobileLandscapeIcon,
|
|
2026
|
+
mobile: MobilePortraitIcon
|
|
2027
|
+
};
|
|
2028
|
+
var BreakpointIcon = ({ breakpoint }) => {
|
|
2029
|
+
const breakpoints = useBreakpoints();
|
|
2030
|
+
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT2;
|
|
2031
|
+
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
2032
|
+
if (!IconComponent) {
|
|
2033
|
+
return null;
|
|
2034
|
+
}
|
|
2035
|
+
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2036
|
+
return /* @__PURE__ */ React21.createElement(Tooltip3, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2037
|
+
};
|
|
2038
|
+
|
|
2039
|
+
// src/styles-inheritance/components/label-chip.tsx
|
|
2040
|
+
import * as React22 from "react";
|
|
2041
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY } from "@elementor/editor-styles-repository";
|
|
2042
|
+
import { InfoCircleIcon } from "@elementor/icons";
|
|
2043
|
+
import { Chip as Chip4, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
2044
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
2045
|
+
var SIZE4 = "tiny";
|
|
2046
|
+
var LabelChip = ({ displayLabel, provider, chipColor }) => {
|
|
2047
|
+
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2048
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React22.createElement(Tooltip4, { title: __6("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React22.createElement(InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2049
|
+
return /* @__PURE__ */ React22.createElement(
|
|
2050
|
+
Chip4,
|
|
2051
|
+
{
|
|
2052
|
+
label: displayLabel,
|
|
2053
|
+
size: SIZE4,
|
|
2054
|
+
color: chipColor,
|
|
2055
|
+
variant: "standard",
|
|
2056
|
+
state: "enabled",
|
|
2057
|
+
icon: chipIcon,
|
|
2058
|
+
sx: (theme) => ({
|
|
2059
|
+
lineHeight: 1,
|
|
2060
|
+
flexWrap: "nowrap",
|
|
2061
|
+
alignItems: "center",
|
|
2062
|
+
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
2063
|
+
flexDirection: "row-reverse",
|
|
2064
|
+
".MuiChip-label": {
|
|
2065
|
+
overflow: "hidden",
|
|
2066
|
+
textOverflow: "ellipsis",
|
|
2067
|
+
whiteSpace: "nowrap"
|
|
2068
|
+
}
|
|
2069
|
+
})
|
|
2070
|
+
}
|
|
2071
|
+
);
|
|
2072
|
+
};
|
|
2073
|
+
|
|
2074
|
+
// src/styles-inheritance/components/value-component.tsx
|
|
2075
|
+
import * as React23 from "react";
|
|
2076
|
+
import { Typography as Typography5 } from "@elementor/ui";
|
|
2077
|
+
var ValueComponent = ({ index, value }) => {
|
|
2078
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2079
|
+
Typography5,
|
|
2080
|
+
{
|
|
2081
|
+
variant: "caption",
|
|
2082
|
+
color: "text.tertiary",
|
|
2083
|
+
sx: {
|
|
2084
|
+
mt: "1px",
|
|
2085
|
+
textDecoration: index === 0 ? "none" : "line-through",
|
|
2086
|
+
overflow: "hidden",
|
|
2087
|
+
textOverflow: "ellipsis",
|
|
2088
|
+
whiteSpace: "nowrap"
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2091
|
+
value
|
|
2092
|
+
);
|
|
2093
|
+
};
|
|
2094
|
+
|
|
2095
|
+
// src/styles-inheritance/components/action-icons.tsx
|
|
2096
|
+
import * as React24 from "react";
|
|
2097
|
+
import { Box as Box5 } from "@elementor/ui";
|
|
2098
|
+
var ActionIcons = () => /* @__PURE__ */ React24.createElement(Box5, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
1889
2099
|
|
|
1890
|
-
// src/hooks/use-normalized-inheritance-chain-items.tsx
|
|
1891
|
-
import { useEffect as useEffect3, useState as useState7 } from "react";
|
|
2100
|
+
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2101
|
+
import { isValidElement, useEffect as useEffect3, useState as useState7 } from "react";
|
|
2102
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
2103
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1892
2104
|
var MAXIMUM_ITEMS = 2;
|
|
1893
2105
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
1894
2106
|
const [items3, setItems] = useState7([]);
|
|
1895
2107
|
useEffect3(() => {
|
|
1896
2108
|
(async () => {
|
|
1897
2109
|
const normalizedItems = await Promise.all(
|
|
1898
|
-
inheritanceChain.filter((
|
|
2110
|
+
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
1899
2111
|
);
|
|
1900
|
-
const validItems = normalizedItems.
|
|
2112
|
+
const validItems = normalizedItems.map((item) => ({
|
|
2113
|
+
...item,
|
|
2114
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __7("Base", "elementor")
|
|
2115
|
+
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
1901
2116
|
setItems(validItems);
|
|
1902
2117
|
})();
|
|
1903
2118
|
}, [inheritanceChain, bind, resolve]);
|
|
1904
2119
|
return items3;
|
|
1905
2120
|
};
|
|
2121
|
+
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
1906
2122
|
var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1909
|
-
|
|
2123
|
+
const {
|
|
2124
|
+
variant: {
|
|
2125
|
+
meta: { state, breakpoint }
|
|
2126
|
+
},
|
|
2127
|
+
style: { label, id }
|
|
2128
|
+
} = item;
|
|
2129
|
+
const displayLabel = `${label}${state ? ":" + state : ""}`;
|
|
1910
2130
|
return {
|
|
1911
|
-
id:
|
|
1912
|
-
|
|
2131
|
+
id: id ? id + (state ?? "") : index,
|
|
2132
|
+
provider: item.provider || "",
|
|
2133
|
+
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT3,
|
|
1913
2134
|
displayLabel,
|
|
1914
|
-
value: await getTransformedValue(item, bind, resolve)
|
|
2135
|
+
value: await getTransformedValue(item, bind, resolve),
|
|
2136
|
+
chipColor: getChipColor(item)
|
|
1915
2137
|
};
|
|
1916
2138
|
};
|
|
1917
2139
|
var getTransformedValue = async (item, bind, resolve) => {
|
|
@@ -1921,75 +2143,213 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
1921
2143
|
[bind]: item.value
|
|
1922
2144
|
}
|
|
1923
2145
|
});
|
|
1924
|
-
|
|
2146
|
+
const value = result?.[bind] ?? result;
|
|
2147
|
+
if (isValidElement(value)) {
|
|
2148
|
+
return value;
|
|
2149
|
+
}
|
|
2150
|
+
if (typeof value === "object") {
|
|
2151
|
+
return JSON.stringify(value);
|
|
2152
|
+
}
|
|
2153
|
+
return String(value);
|
|
1925
2154
|
} catch {
|
|
1926
2155
|
return "";
|
|
1927
2156
|
}
|
|
1928
2157
|
};
|
|
2158
|
+
var getChipColor = (item) => {
|
|
2159
|
+
const { provider = "", style } = item;
|
|
2160
|
+
if (provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY2) {
|
|
2161
|
+
return "default";
|
|
2162
|
+
}
|
|
2163
|
+
if (style?.label === "local") {
|
|
2164
|
+
return "accent";
|
|
2165
|
+
}
|
|
2166
|
+
return "global";
|
|
2167
|
+
};
|
|
2168
|
+
|
|
2169
|
+
// src/styles-inheritance/styles-inheritance-transformers-registry.tsx
|
|
2170
|
+
import { createTransformersRegistry } from "@elementor/editor-canvas";
|
|
2171
|
+
var stylesInheritanceTransformersRegistry = createTransformersRegistry();
|
|
1929
2172
|
|
|
1930
2173
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1931
|
-
var
|
|
2174
|
+
var SIZE5 = "tiny";
|
|
2175
|
+
var StyleIndicatorInfotip = ({ inheritanceChain, propType, path, label, children }) => {
|
|
2176
|
+
const [showInfotip, setShowInfotip] = useState8(false);
|
|
2177
|
+
const toggleInfotip = () => setShowInfotip((prev) => !prev);
|
|
2178
|
+
const closeInfotip = () => setShowInfotip(false);
|
|
1932
2179
|
const key = path.join(".");
|
|
2180
|
+
const sectionContentRef = useSectionContentRef();
|
|
2181
|
+
const sectionContentWidth = sectionContentRef?.current?.offsetWidth ?? 320;
|
|
1933
2182
|
const resolve = useMemo4(() => {
|
|
1934
2183
|
return createPropsResolver({
|
|
1935
|
-
transformers:
|
|
2184
|
+
transformers: stylesInheritanceTransformersRegistry,
|
|
1936
2185
|
schema: { [key]: propType }
|
|
1937
2186
|
});
|
|
1938
2187
|
}, [key, propType]);
|
|
1939
2188
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
1940
|
-
|
|
1941
|
-
|
|
2189
|
+
const infotipContent = /* @__PURE__ */ React25.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React25.createElement(
|
|
2190
|
+
Card,
|
|
1942
2191
|
{
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
2192
|
+
elevation: 0,
|
|
2193
|
+
sx: {
|
|
2194
|
+
width: `${sectionContentWidth}px`,
|
|
2195
|
+
maxWidth: 500,
|
|
2196
|
+
overflowX: "hidden"
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
/* @__PURE__ */ React25.createElement(
|
|
2200
|
+
CardContent,
|
|
2201
|
+
{
|
|
2202
|
+
sx: {
|
|
2203
|
+
display: "flex",
|
|
2204
|
+
gap: 0.5,
|
|
2205
|
+
flexDirection: "column",
|
|
2206
|
+
p: 0,
|
|
2207
|
+
"&:last-child": {
|
|
2208
|
+
pb: 0
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
},
|
|
2212
|
+
/* @__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(
|
|
2213
|
+
CloseButton,
|
|
2214
|
+
{
|
|
2215
|
+
slotProps: { icon: { fontSize: SIZE5 } },
|
|
2216
|
+
sx: { ml: "auto" },
|
|
2217
|
+
onClick: closeInfotip
|
|
2218
|
+
}
|
|
2219
|
+
)),
|
|
2220
|
+
/* @__PURE__ */ React25.createElement(
|
|
2221
|
+
Stack7,
|
|
2222
|
+
{
|
|
2223
|
+
gap: 1.5,
|
|
2224
|
+
sx: { pl: 2, pr: 1, pb: 2, overflowX: "hidden", overflowY: "auto" },
|
|
2225
|
+
role: "list"
|
|
2226
|
+
},
|
|
2227
|
+
items3.map((item, index) => {
|
|
2228
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2229
|
+
Box6,
|
|
2230
|
+
{
|
|
2231
|
+
key: item.id,
|
|
2232
|
+
display: "flex",
|
|
2233
|
+
gap: 0.5,
|
|
2234
|
+
role: "listitem",
|
|
2235
|
+
"aria-label": __8("Inheritance item: %s", "elementor").replace(
|
|
2236
|
+
"%s",
|
|
2237
|
+
item.displayLabel
|
|
2238
|
+
)
|
|
2239
|
+
},
|
|
2240
|
+
/* @__PURE__ */ React25.createElement(Box6, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React25.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React25.createElement(
|
|
2241
|
+
LabelChip,
|
|
2242
|
+
{
|
|
2243
|
+
displayLabel: item.displayLabel,
|
|
2244
|
+
provider: item.provider,
|
|
2245
|
+
chipColor: item.chipColor
|
|
2246
|
+
}
|
|
2247
|
+
), /* @__PURE__ */ React25.createElement(ValueComponent, { index, value: item.value })),
|
|
2248
|
+
/* @__PURE__ */ React25.createElement(ActionIcons, null)
|
|
2249
|
+
);
|
|
2250
|
+
})
|
|
2251
|
+
)
|
|
2252
|
+
)
|
|
2253
|
+
));
|
|
2254
|
+
return /* @__PURE__ */ React25.createElement(TooltipOrInfotip, { showInfotip, onClose: closeInfotip, infotipContent }, /* @__PURE__ */ React25.createElement(IconButton3, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" } }, children));
|
|
1946
2255
|
};
|
|
2256
|
+
function TooltipOrInfotip({
|
|
2257
|
+
children,
|
|
2258
|
+
showInfotip,
|
|
2259
|
+
onClose,
|
|
2260
|
+
infotipContent
|
|
2261
|
+
}) {
|
|
2262
|
+
const { isSiteRtl } = useDirection();
|
|
2263
|
+
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2264
|
+
if (showInfotip) {
|
|
2265
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
2266
|
+
Backdrop,
|
|
2267
|
+
{
|
|
2268
|
+
open: showInfotip,
|
|
2269
|
+
onClick: onClose,
|
|
2270
|
+
sx: {
|
|
2271
|
+
backgroundColor: "transparent",
|
|
2272
|
+
zIndex: (theme) => theme.zIndex.modal - 1
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
), /* @__PURE__ */ React25.createElement(
|
|
2276
|
+
Infotip,
|
|
2277
|
+
{
|
|
2278
|
+
placement: "top",
|
|
2279
|
+
content: infotipContent,
|
|
2280
|
+
open: showInfotip,
|
|
2281
|
+
onClose,
|
|
2282
|
+
disableHoverListener: true,
|
|
2283
|
+
componentsProps: {
|
|
2284
|
+
tooltip: {
|
|
2285
|
+
sx: { mx: 2 }
|
|
2286
|
+
}
|
|
2287
|
+
},
|
|
2288
|
+
slotProps: {
|
|
2289
|
+
popper: {
|
|
2290
|
+
modifiers: [
|
|
2291
|
+
{
|
|
2292
|
+
name: "offset",
|
|
2293
|
+
options: { offset: [forceInfotipAlignLeft, 0] }
|
|
2294
|
+
}
|
|
2295
|
+
]
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
children
|
|
2300
|
+
));
|
|
2301
|
+
}
|
|
2302
|
+
return /* @__PURE__ */ React25.createElement(Tooltip5, { title: __8("Style origin", "elementor"), placement: "top" }, children);
|
|
2303
|
+
}
|
|
1947
2304
|
|
|
1948
2305
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1949
2306
|
var StylesInheritanceIndicator = () => {
|
|
1950
|
-
const
|
|
1951
|
-
const { value, path, propType } = useBoundProp();
|
|
2307
|
+
const { path, propType } = useBoundProp();
|
|
1952
2308
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1953
|
-
const isUsingNestedProps =
|
|
2309
|
+
const isUsingNestedProps = isExperimentActive5(EXPERIMENTAL_FEATURES.V_3_30);
|
|
1954
2310
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
1955
2311
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
1956
2312
|
if (!inheritanceChain.length) {
|
|
1957
2313
|
return null;
|
|
1958
2314
|
}
|
|
1959
|
-
const
|
|
1960
|
-
|
|
2315
|
+
const currentItem = inheritanceChain.find(
|
|
2316
|
+
({
|
|
2317
|
+
style,
|
|
2318
|
+
variant: {
|
|
2319
|
+
meta: { breakpoint, state }
|
|
2320
|
+
}
|
|
2321
|
+
}) => style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state
|
|
2322
|
+
);
|
|
2323
|
+
const hasValue = !isEmpty2(currentItem?.value);
|
|
2324
|
+
const [actualStyle] = inheritanceChain;
|
|
2325
|
+
if (actualStyle.provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3) {
|
|
1961
2326
|
return null;
|
|
1962
2327
|
}
|
|
1963
|
-
const
|
|
1964
|
-
const isFinalValue = style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state;
|
|
1965
|
-
const hasValue = !isEmpty2(value);
|
|
2328
|
+
const isFinalValue = currentItem === actualStyle;
|
|
1966
2329
|
const label = getLabel({ isFinalValue, hasValue });
|
|
1967
2330
|
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
return /* @__PURE__ */ React20.createElement(StyleIndicator, { variant: variantType, "aria-label": label });
|
|
2331
|
+
if (!isUsingIndicatorPopover()) {
|
|
2332
|
+
return /* @__PURE__ */ React26.createElement(Tooltip6, { title: __9("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React26.createElement(StyleIndicator, { variant: variantType, "aria-label": label }));
|
|
1971
2333
|
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
Infotip,
|
|
2334
|
+
return /* @__PURE__ */ React26.createElement(
|
|
2335
|
+
StyleIndicatorInfotip,
|
|
1975
2336
|
{
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
trigger: "manual"
|
|
2337
|
+
inheritanceChain,
|
|
2338
|
+
path: finalPath,
|
|
2339
|
+
propType,
|
|
2340
|
+
label
|
|
1981
2341
|
},
|
|
1982
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ React26.createElement(StyleIndicator, { variant: variantType })
|
|
1983
2343
|
);
|
|
1984
2344
|
};
|
|
1985
2345
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
1986
2346
|
if (isFinalValue) {
|
|
1987
|
-
return
|
|
2347
|
+
return __9("This is the final value", "elementor");
|
|
1988
2348
|
}
|
|
1989
2349
|
if (hasValue) {
|
|
1990
|
-
return
|
|
2350
|
+
return __9("This value is overridden by another style", "elementor");
|
|
1991
2351
|
}
|
|
1992
|
-
return
|
|
2352
|
+
return __9("This has value from another style", "elementor");
|
|
1993
2353
|
};
|
|
1994
2354
|
var getVariant = ({
|
|
1995
2355
|
isFinalValue,
|
|
@@ -2008,14 +2368,15 @@ var getVariant = ({
|
|
|
2008
2368
|
// src/controls-registry/styles-field.tsx
|
|
2009
2369
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
2010
2370
|
const [value, setValue] = useStylesField(bind);
|
|
2011
|
-
const
|
|
2371
|
+
const { canEdit } = useStyle();
|
|
2372
|
+
const stylesSchema = getStylesSchema2();
|
|
2012
2373
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2013
2374
|
const values = { [bind]: value };
|
|
2014
2375
|
const placeholderValues = { [bind]: placeholder };
|
|
2015
2376
|
const setValues = (newValue) => {
|
|
2016
2377
|
setValue(newValue[bind]);
|
|
2017
2378
|
};
|
|
2018
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2019
2380
|
ControlAdornmentsProvider,
|
|
2020
2381
|
{
|
|
2021
2382
|
items: [
|
|
@@ -2025,59 +2386,62 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2025
2386
|
}
|
|
2026
2387
|
]
|
|
2027
2388
|
},
|
|
2028
|
-
/* @__PURE__ */
|
|
2389
|
+
/* @__PURE__ */ React27.createElement(
|
|
2029
2390
|
PropProvider2,
|
|
2030
2391
|
{
|
|
2031
2392
|
propType,
|
|
2032
2393
|
value: values,
|
|
2033
2394
|
setValue: setValues,
|
|
2034
|
-
placeholder: placeholderValues
|
|
2395
|
+
placeholder: placeholderValues,
|
|
2396
|
+
disabled: !canEdit
|
|
2035
2397
|
},
|
|
2036
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ React27.createElement(PropKeyProvider2, { bind }, children)
|
|
2037
2399
|
)
|
|
2038
2400
|
);
|
|
2039
2401
|
};
|
|
2040
2402
|
|
|
2041
2403
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2042
2404
|
var BackgroundSection = () => {
|
|
2043
|
-
return /* @__PURE__ */
|
|
2405
|
+
return /* @__PURE__ */ React28.createElement(SectionContent, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React28.createElement(BackgroundControl, null)));
|
|
2044
2406
|
};
|
|
2045
2407
|
|
|
2046
2408
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2047
|
-
import * as
|
|
2409
|
+
import * as React37 from "react";
|
|
2048
2410
|
|
|
2049
2411
|
// src/components/panel-divider.tsx
|
|
2050
|
-
import * as
|
|
2412
|
+
import * as React29 from "react";
|
|
2051
2413
|
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);
|
|
2414
|
+
var PanelDivider = () => /* @__PURE__ */ React29.createElement(Divider4, { sx: { my: 0.5 } });
|
|
2058
2415
|
|
|
2059
2416
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2060
|
-
import * as
|
|
2061
|
-
import { __ as
|
|
2417
|
+
import * as React35 from "react";
|
|
2418
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
2062
2419
|
|
|
2063
2420
|
// src/components/add-or-remove-content.tsx
|
|
2064
|
-
import * as
|
|
2421
|
+
import * as React31 from "react";
|
|
2065
2422
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
2066
|
-
import { Collapse as Collapse2, IconButton as
|
|
2423
|
+
import { Collapse as Collapse2, IconButton as IconButton4, Stack as Stack9 } from "@elementor/ui";
|
|
2067
2424
|
|
|
2068
2425
|
// src/components/control-label.tsx
|
|
2069
|
-
import * as
|
|
2426
|
+
import * as React30 from "react";
|
|
2070
2427
|
import { ControlAdornments, ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
2071
|
-
import { Stack as
|
|
2428
|
+
import { Stack as Stack8 } from "@elementor/ui";
|
|
2072
2429
|
var ControlLabel = ({ children }) => {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2430
|
+
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
2431
|
};
|
|
2075
2432
|
|
|
2076
2433
|
// src/components/add-or-remove-content.tsx
|
|
2077
|
-
var
|
|
2078
|
-
var AddOrRemoveContent = ({
|
|
2079
|
-
|
|
2080
|
-
|
|
2434
|
+
var SIZE6 = "tiny";
|
|
2435
|
+
var AddOrRemoveContent = ({
|
|
2436
|
+
isAdded,
|
|
2437
|
+
label,
|
|
2438
|
+
onAdd,
|
|
2439
|
+
onRemove,
|
|
2440
|
+
children,
|
|
2441
|
+
disabled
|
|
2442
|
+
}) => {
|
|
2443
|
+
return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(
|
|
2444
|
+
Stack9,
|
|
2081
2445
|
{
|
|
2082
2446
|
direction: "row",
|
|
2083
2447
|
sx: {
|
|
@@ -2086,102 +2450,80 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
2086
2450
|
marginInlineEnd: -0.75
|
|
2087
2451
|
}
|
|
2088
2452
|
},
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
isAdded ? /* @__PURE__ */
|
|
2091
|
-
), /* @__PURE__ */
|
|
2453
|
+
/* @__PURE__ */ React31.createElement(ControlLabel, null, label),
|
|
2454
|
+
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 }))
|
|
2455
|
+
), /* @__PURE__ */ React31.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React31.createElement(SectionContent, null, children)));
|
|
2092
2456
|
};
|
|
2093
2457
|
|
|
2094
2458
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2095
|
-
import * as
|
|
2459
|
+
import * as React32 from "react";
|
|
2096
2460
|
import { ColorControl } from "@elementor/editor-controls";
|
|
2097
2461
|
import { Grid } from "@elementor/ui";
|
|
2098
|
-
import { __ as
|
|
2462
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
2099
2463
|
var BorderColorField = () => {
|
|
2100
|
-
return /* @__PURE__ */
|
|
2464
|
+
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
2465
|
};
|
|
2102
2466
|
|
|
2103
2467
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2104
|
-
import * as
|
|
2468
|
+
import * as React33 from "react";
|
|
2105
2469
|
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
2106
2470
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
2107
|
-
import { __ as
|
|
2471
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
2108
2472
|
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:
|
|
2473
|
+
{ value: "none", label: __11("None", "elementor") },
|
|
2474
|
+
{ value: "solid", label: __11("Solid", "elementor") },
|
|
2475
|
+
{ value: "dashed", label: __11("Dashed", "elementor") },
|
|
2476
|
+
{ value: "dotted", label: __11("Dotted", "elementor") },
|
|
2477
|
+
{ value: "double", label: __11("Double", "elementor") },
|
|
2478
|
+
{ value: "groove", label: __11("Groove", "elementor") },
|
|
2479
|
+
{ value: "ridge", label: __11("Ridge", "elementor") },
|
|
2480
|
+
{ value: "inset", label: __11("Inset", "elementor") },
|
|
2481
|
+
{ value: "outset", label: __11("Outset", "elementor") }
|
|
2118
2482
|
];
|
|
2119
2483
|
var BorderStyleField = () => {
|
|
2120
|
-
return /* @__PURE__ */
|
|
2484
|
+
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
2485
|
};
|
|
2122
2486
|
|
|
2123
2487
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2124
|
-
import * as
|
|
2488
|
+
import * as React34 from "react";
|
|
2125
2489
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
2126
2490
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
2127
2491
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
2128
2492
|
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
|
|
2493
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
2152
2494
|
var InlineStartIcon = withDirection(SideRightIcon);
|
|
2153
2495
|
var InlineEndIcon = withDirection(SideLeftIcon);
|
|
2154
2496
|
var getEdges = (isSiteRtl) => [
|
|
2155
2497
|
{
|
|
2156
|
-
label:
|
|
2157
|
-
icon: /* @__PURE__ */
|
|
2498
|
+
label: __12("Top", "elementor"),
|
|
2499
|
+
icon: /* @__PURE__ */ React34.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
2158
2500
|
bind: "block-start"
|
|
2159
2501
|
},
|
|
2160
2502
|
{
|
|
2161
|
-
label: isSiteRtl ?
|
|
2162
|
-
icon: /* @__PURE__ */
|
|
2503
|
+
label: isSiteRtl ? __12("Left", "elementor") : __12("Right", "elementor"),
|
|
2504
|
+
icon: /* @__PURE__ */ React34.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
2163
2505
|
bind: "inline-end"
|
|
2164
2506
|
},
|
|
2165
2507
|
{
|
|
2166
|
-
label:
|
|
2167
|
-
icon: /* @__PURE__ */
|
|
2508
|
+
label: __12("Bottom", "elementor"),
|
|
2509
|
+
icon: /* @__PURE__ */ React34.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
2168
2510
|
bind: "block-end"
|
|
2169
2511
|
},
|
|
2170
2512
|
{
|
|
2171
|
-
label: isSiteRtl ?
|
|
2172
|
-
icon: /* @__PURE__ */
|
|
2513
|
+
label: isSiteRtl ? __12("Right", "elementor") : __12("Left", "elementor"),
|
|
2514
|
+
icon: /* @__PURE__ */ React34.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
2173
2515
|
bind: "inline-start"
|
|
2174
2516
|
}
|
|
2175
2517
|
];
|
|
2176
2518
|
var BorderWidthField = () => {
|
|
2177
2519
|
const { isSiteRtl } = useDirection();
|
|
2178
|
-
return /* @__PURE__ */
|
|
2520
|
+
return /* @__PURE__ */ React34.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React34.createElement(
|
|
2179
2521
|
EqualUnequalSizesControl,
|
|
2180
2522
|
{
|
|
2181
2523
|
items: getEdges(isSiteRtl),
|
|
2182
|
-
label:
|
|
2183
|
-
icon: /* @__PURE__ */
|
|
2184
|
-
tooltipLabel:
|
|
2524
|
+
label: __12("Border width", "elementor"),
|
|
2525
|
+
icon: /* @__PURE__ */ React34.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
2526
|
+
tooltipLabel: __12("Adjust borders", "elementor"),
|
|
2185
2527
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
2186
2528
|
}
|
|
2187
2529
|
));
|
|
@@ -2194,6 +2536,7 @@ var initialBorder = {
|
|
|
2194
2536
|
"border-style": { $$type: "string", value: "solid" }
|
|
2195
2537
|
};
|
|
2196
2538
|
var BorderField = () => {
|
|
2539
|
+
const { canEdit } = useStyle();
|
|
2197
2540
|
const [border, setBorder] = useStylesFields(Object.keys(initialBorder));
|
|
2198
2541
|
const addBorder = () => {
|
|
2199
2542
|
setBorder(initialBorder);
|
|
@@ -2206,22 +2549,23 @@ var BorderField = () => {
|
|
|
2206
2549
|
});
|
|
2207
2550
|
};
|
|
2208
2551
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
2209
|
-
return /* @__PURE__ */
|
|
2552
|
+
return /* @__PURE__ */ React35.createElement(
|
|
2210
2553
|
AddOrRemoveContent,
|
|
2211
2554
|
{
|
|
2212
|
-
label:
|
|
2555
|
+
label: __13("Border", "elementor"),
|
|
2213
2556
|
isAdded: hasBorder,
|
|
2214
2557
|
onAdd: addBorder,
|
|
2215
|
-
onRemove: removeBorder
|
|
2558
|
+
onRemove: removeBorder,
|
|
2559
|
+
disabled: !canEdit
|
|
2216
2560
|
},
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2219
|
-
/* @__PURE__ */
|
|
2561
|
+
/* @__PURE__ */ React35.createElement(BorderWidthField, null),
|
|
2562
|
+
/* @__PURE__ */ React35.createElement(BorderColorField, null),
|
|
2563
|
+
/* @__PURE__ */ React35.createElement(BorderStyleField, null)
|
|
2220
2564
|
);
|
|
2221
2565
|
};
|
|
2222
2566
|
|
|
2223
2567
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2224
|
-
import * as
|
|
2568
|
+
import * as React36 from "react";
|
|
2225
2569
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
2226
2570
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
2227
2571
|
import {
|
|
@@ -2232,66 +2576,66 @@ import {
|
|
|
2232
2576
|
RadiusTopRightIcon
|
|
2233
2577
|
} from "@elementor/icons";
|
|
2234
2578
|
import { withDirection as withDirection2 } from "@elementor/ui";
|
|
2235
|
-
import { __ as
|
|
2579
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
2236
2580
|
var StartStartIcon = withDirection2(RadiusTopLeftIcon);
|
|
2237
2581
|
var StartEndIcon = withDirection2(RadiusTopRightIcon);
|
|
2238
2582
|
var EndStartIcon = withDirection2(RadiusBottomLeftIcon);
|
|
2239
2583
|
var EndEndIcon = withDirection2(RadiusBottomRightIcon);
|
|
2240
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2241
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2242
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2243
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2584
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __14("Top right", "elementor") : __14("Top left", "elementor");
|
|
2585
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __14("Top left", "elementor") : __14("Top right", "elementor");
|
|
2586
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __14("Bottom right", "elementor") : __14("Bottom left", "elementor");
|
|
2587
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __14("Bottom left", "elementor") : __14("Bottom right", "elementor");
|
|
2244
2588
|
var getCorners = (isSiteRtl) => [
|
|
2245
2589
|
{
|
|
2246
2590
|
label: getStartStartLabel(isSiteRtl),
|
|
2247
|
-
icon: /* @__PURE__ */
|
|
2591
|
+
icon: /* @__PURE__ */ React36.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2248
2592
|
bind: "start-start"
|
|
2249
2593
|
},
|
|
2250
2594
|
{
|
|
2251
2595
|
label: getStartEndLabel(isSiteRtl),
|
|
2252
|
-
icon: /* @__PURE__ */
|
|
2596
|
+
icon: /* @__PURE__ */ React36.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2253
2597
|
bind: "start-end"
|
|
2254
2598
|
},
|
|
2255
2599
|
{
|
|
2256
2600
|
label: getEndStartLabel(isSiteRtl),
|
|
2257
|
-
icon: /* @__PURE__ */
|
|
2601
|
+
icon: /* @__PURE__ */ React36.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2258
2602
|
bind: "end-start"
|
|
2259
2603
|
},
|
|
2260
2604
|
{
|
|
2261
2605
|
label: getEndEndLabel(isSiteRtl),
|
|
2262
|
-
icon: /* @__PURE__ */
|
|
2606
|
+
icon: /* @__PURE__ */ React36.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2263
2607
|
bind: "end-end"
|
|
2264
2608
|
}
|
|
2265
2609
|
];
|
|
2266
2610
|
var BorderRadiusField = () => {
|
|
2267
2611
|
const { isSiteRtl } = useDirection();
|
|
2268
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React36.createElement(
|
|
2269
2613
|
EqualUnequalSizesControl2,
|
|
2270
2614
|
{
|
|
2271
2615
|
items: getCorners(isSiteRtl),
|
|
2272
|
-
label:
|
|
2273
|
-
icon: /* @__PURE__ */
|
|
2274
|
-
tooltipLabel:
|
|
2616
|
+
label: __14("Border radius", "elementor"),
|
|
2617
|
+
icon: /* @__PURE__ */ React36.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
2618
|
+
tooltipLabel: __14("Adjust corners", "elementor"),
|
|
2275
2619
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
2276
2620
|
}
|
|
2277
2621
|
));
|
|
2278
2622
|
};
|
|
2279
2623
|
|
|
2280
2624
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2281
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2625
|
+
var BorderSection = () => /* @__PURE__ */ React37.createElement(SectionContent, null, /* @__PURE__ */ React37.createElement(BorderRadiusField, null), /* @__PURE__ */ React37.createElement(PanelDivider, null), /* @__PURE__ */ React37.createElement(BorderField, null));
|
|
2282
2626
|
|
|
2283
2627
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2284
|
-
import * as
|
|
2628
|
+
import * as React38 from "react";
|
|
2285
2629
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
2286
2630
|
var EffectsSection = () => {
|
|
2287
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React38.createElement(BoxShadowRepeaterControl, null)));
|
|
2288
2632
|
};
|
|
2289
2633
|
|
|
2290
2634
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2291
|
-
import * as
|
|
2635
|
+
import * as React50 from "react";
|
|
2292
2636
|
import { ControlFormLabel as ControlFormLabel3 } from "@elementor/editor-controls";
|
|
2293
2637
|
import { useParentElement } from "@elementor/editor-elements";
|
|
2294
|
-
import { __ as
|
|
2638
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
2295
2639
|
|
|
2296
2640
|
// src/hooks/use-computed-style.ts
|
|
2297
2641
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -2319,7 +2663,7 @@ function useComputedStyle(elementId) {
|
|
|
2319
2663
|
}
|
|
2320
2664
|
|
|
2321
2665
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2322
|
-
import * as
|
|
2666
|
+
import * as React40 from "react";
|
|
2323
2667
|
import { ToggleControl } from "@elementor/editor-controls";
|
|
2324
2668
|
import {
|
|
2325
2669
|
JustifyBottomIcon,
|
|
@@ -2329,12 +2673,12 @@ import {
|
|
|
2329
2673
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
2330
2674
|
JustifyTopIcon
|
|
2331
2675
|
} from "@elementor/icons";
|
|
2332
|
-
import { DirectionProvider, Stack as
|
|
2333
|
-
import { __ as
|
|
2676
|
+
import { DirectionProvider, Stack as Stack10, ThemeProvider, withDirection as withDirection3 } from "@elementor/ui";
|
|
2677
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
2334
2678
|
|
|
2335
2679
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2336
|
-
import * as
|
|
2337
|
-
import { useRef as
|
|
2680
|
+
import * as React39 from "react";
|
|
2681
|
+
import { useRef as useRef4 } from "react";
|
|
2338
2682
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
2339
2683
|
var CLOCKWISE_ANGLES = {
|
|
2340
2684
|
row: 0,
|
|
@@ -2355,9 +2699,9 @@ var RotatedIcon = ({
|
|
|
2355
2699
|
offset = 0,
|
|
2356
2700
|
disableRotationForReversed = false
|
|
2357
2701
|
}) => {
|
|
2358
|
-
const rotate =
|
|
2702
|
+
const rotate = useRef4(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2359
2703
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2360
|
-
return /* @__PURE__ */
|
|
2704
|
+
return /* @__PURE__ */ React39.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2361
2705
|
};
|
|
2362
2706
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2363
2707
|
const [direction] = useStylesField("flex-direction");
|
|
@@ -2386,48 +2730,48 @@ var iconProps = {
|
|
|
2386
2730
|
var options = [
|
|
2387
2731
|
{
|
|
2388
2732
|
value: "start",
|
|
2389
|
-
label:
|
|
2390
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2733
|
+
label: __15("Start", "elementor"),
|
|
2734
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2391
2735
|
showTooltip: true
|
|
2392
2736
|
},
|
|
2393
2737
|
{
|
|
2394
2738
|
value: "center",
|
|
2395
|
-
label:
|
|
2396
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2739
|
+
label: __15("Center", "elementor"),
|
|
2740
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
2397
2741
|
showTooltip: true
|
|
2398
2742
|
},
|
|
2399
2743
|
{
|
|
2400
2744
|
value: "end",
|
|
2401
|
-
label:
|
|
2402
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2745
|
+
label: __15("End", "elementor"),
|
|
2746
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2403
2747
|
showTooltip: true
|
|
2404
2748
|
},
|
|
2405
2749
|
{
|
|
2406
2750
|
value: "space-between",
|
|
2407
|
-
label:
|
|
2408
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2751
|
+
label: __15("Space between", "elementor"),
|
|
2752
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
2409
2753
|
showTooltip: true
|
|
2410
2754
|
},
|
|
2411
2755
|
{
|
|
2412
2756
|
value: "space-around",
|
|
2413
|
-
label:
|
|
2414
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2757
|
+
label: __15("Space around", "elementor"),
|
|
2758
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
2415
2759
|
showTooltip: true
|
|
2416
2760
|
},
|
|
2417
2761
|
{
|
|
2418
2762
|
value: "space-evenly",
|
|
2419
|
-
label:
|
|
2420
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2763
|
+
label: __15("Space evenly", "elementor"),
|
|
2764
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
2421
2765
|
showTooltip: true
|
|
2422
2766
|
}
|
|
2423
2767
|
];
|
|
2424
2768
|
var AlignContentField = () => {
|
|
2425
2769
|
const { isSiteRtl } = useDirection();
|
|
2426
|
-
return /* @__PURE__ */
|
|
2770
|
+
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
2771
|
};
|
|
2428
2772
|
|
|
2429
2773
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2430
|
-
import * as
|
|
2774
|
+
import * as React41 from "react";
|
|
2431
2775
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
2432
2776
|
import {
|
|
2433
2777
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -2436,7 +2780,7 @@ import {
|
|
|
2436
2780
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
2437
2781
|
} from "@elementor/icons";
|
|
2438
2782
|
import { DirectionProvider as DirectionProvider2, Grid as Grid3, ThemeProvider as ThemeProvider2, withDirection as withDirection4 } from "@elementor/ui";
|
|
2439
|
-
import { __ as
|
|
2783
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
2440
2784
|
var StartIcon2 = withDirection4(LayoutAlignLeftIcon);
|
|
2441
2785
|
var EndIcon2 = withDirection4(LayoutAlignRightIcon);
|
|
2442
2786
|
var iconProps2 = {
|
|
@@ -2446,36 +2790,36 @@ var iconProps2 = {
|
|
|
2446
2790
|
var options2 = [
|
|
2447
2791
|
{
|
|
2448
2792
|
value: "start",
|
|
2449
|
-
label:
|
|
2450
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2793
|
+
label: __16("Start", "elementor"),
|
|
2794
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2451
2795
|
showTooltip: true
|
|
2452
2796
|
},
|
|
2453
2797
|
{
|
|
2454
2798
|
value: "center",
|
|
2455
|
-
label:
|
|
2456
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2799
|
+
label: __16("Center", "elementor"),
|
|
2800
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
2457
2801
|
showTooltip: true
|
|
2458
2802
|
},
|
|
2459
2803
|
{
|
|
2460
2804
|
value: "end",
|
|
2461
|
-
label:
|
|
2462
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2805
|
+
label: __16("End", "elementor"),
|
|
2806
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2463
2807
|
showTooltip: true
|
|
2464
2808
|
},
|
|
2465
2809
|
{
|
|
2466
2810
|
value: "stretch",
|
|
2467
|
-
label:
|
|
2468
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2811
|
+
label: __16("Stretch", "elementor"),
|
|
2812
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
2469
2813
|
showTooltip: true
|
|
2470
2814
|
}
|
|
2471
2815
|
];
|
|
2472
2816
|
var AlignItemsField = () => {
|
|
2473
2817
|
const { isSiteRtl } = useDirection();
|
|
2474
|
-
return /* @__PURE__ */
|
|
2818
|
+
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
2819
|
};
|
|
2476
2820
|
|
|
2477
2821
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2478
|
-
import * as
|
|
2822
|
+
import * as React42 from "react";
|
|
2479
2823
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
2480
2824
|
import {
|
|
2481
2825
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -2484,7 +2828,7 @@ import {
|
|
|
2484
2828
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
2485
2829
|
} from "@elementor/icons";
|
|
2486
2830
|
import { DirectionProvider as DirectionProvider3, Grid as Grid4, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
|
|
2487
|
-
import { __ as
|
|
2831
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
2488
2832
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2489
2833
|
row: 90,
|
|
2490
2834
|
"row-reverse": 90,
|
|
@@ -2499,8 +2843,8 @@ var iconProps3 = {
|
|
|
2499
2843
|
var getOptions = (parentStyleDirection) => [
|
|
2500
2844
|
{
|
|
2501
2845
|
value: "start",
|
|
2502
|
-
label:
|
|
2503
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2846
|
+
label: __17("Start", "elementor"),
|
|
2847
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2504
2848
|
RotatedIcon,
|
|
2505
2849
|
{
|
|
2506
2850
|
icon: StartIcon3,
|
|
@@ -2513,8 +2857,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2513
2857
|
},
|
|
2514
2858
|
{
|
|
2515
2859
|
value: "center",
|
|
2516
|
-
label:
|
|
2517
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2860
|
+
label: __17("Center", "elementor"),
|
|
2861
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2518
2862
|
RotatedIcon,
|
|
2519
2863
|
{
|
|
2520
2864
|
icon: CenterIcon3,
|
|
@@ -2527,8 +2871,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2527
2871
|
},
|
|
2528
2872
|
{
|
|
2529
2873
|
value: "end",
|
|
2530
|
-
label:
|
|
2531
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2874
|
+
label: __17("End", "elementor"),
|
|
2875
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2532
2876
|
RotatedIcon,
|
|
2533
2877
|
{
|
|
2534
2878
|
icon: EndIcon3,
|
|
@@ -2541,8 +2885,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2541
2885
|
},
|
|
2542
2886
|
{
|
|
2543
2887
|
value: "stretch",
|
|
2544
|
-
label:
|
|
2545
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2888
|
+
label: __17("Stretch", "elementor"),
|
|
2889
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(
|
|
2546
2890
|
RotatedIcon,
|
|
2547
2891
|
{
|
|
2548
2892
|
icon: JustifyIcon2,
|
|
@@ -2556,107 +2900,107 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2556
2900
|
];
|
|
2557
2901
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2558
2902
|
const { isSiteRtl } = useDirection();
|
|
2559
|
-
return /* @__PURE__ */
|
|
2903
|
+
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
2904
|
};
|
|
2561
2905
|
|
|
2562
2906
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2563
|
-
import * as
|
|
2907
|
+
import * as React43 from "react";
|
|
2564
2908
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
2565
|
-
import { isExperimentActive as
|
|
2566
|
-
import { Stack as
|
|
2567
|
-
import { __ as
|
|
2909
|
+
import { isExperimentActive as isExperimentActive6 } from "@elementor/editor-v1-adapters";
|
|
2910
|
+
import { Stack as Stack11 } from "@elementor/ui";
|
|
2911
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
2568
2912
|
var displayFieldItems = [
|
|
2569
2913
|
{
|
|
2570
2914
|
value: "block",
|
|
2571
|
-
renderContent: () =>
|
|
2572
|
-
label:
|
|
2915
|
+
renderContent: () => __18("Block", "elementor"),
|
|
2916
|
+
label: __18("Block", "elementor"),
|
|
2573
2917
|
showTooltip: true
|
|
2574
2918
|
},
|
|
2575
2919
|
{
|
|
2576
2920
|
value: "flex",
|
|
2577
|
-
renderContent: () =>
|
|
2578
|
-
label:
|
|
2921
|
+
renderContent: () => __18("Flex", "elementor"),
|
|
2922
|
+
label: __18("Flex", "elementor"),
|
|
2579
2923
|
showTooltip: true
|
|
2580
2924
|
},
|
|
2581
2925
|
{
|
|
2582
2926
|
value: "inline-block",
|
|
2583
|
-
renderContent: () =>
|
|
2584
|
-
label:
|
|
2927
|
+
renderContent: () => __18("In-blk", "elementor"),
|
|
2928
|
+
label: __18("Inline-block", "elementor"),
|
|
2585
2929
|
showTooltip: true
|
|
2586
2930
|
}
|
|
2587
2931
|
];
|
|
2588
2932
|
var DisplayField = () => {
|
|
2589
|
-
const isDisplayNoneFeatureActive =
|
|
2933
|
+
const isDisplayNoneFeatureActive = isExperimentActive6(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2590
2934
|
const items3 = [...displayFieldItems];
|
|
2591
2935
|
if (isDisplayNoneFeatureActive) {
|
|
2592
2936
|
items3.push({
|
|
2593
2937
|
value: "none",
|
|
2594
|
-
renderContent: () =>
|
|
2595
|
-
label:
|
|
2938
|
+
renderContent: () => __18("None", "elementor"),
|
|
2939
|
+
label: __18("None", "elementor"),
|
|
2596
2940
|
showTooltip: true
|
|
2597
2941
|
});
|
|
2598
2942
|
}
|
|
2599
2943
|
items3.push({
|
|
2600
2944
|
value: "inline-flex",
|
|
2601
|
-
renderContent: () =>
|
|
2602
|
-
label:
|
|
2945
|
+
renderContent: () => __18("In-flx", "elementor"),
|
|
2946
|
+
label: __18("Inline-flex", "elementor"),
|
|
2603
2947
|
showTooltip: true
|
|
2604
2948
|
});
|
|
2605
2949
|
const placeholder = useDisplayPlaceholderValue();
|
|
2606
|
-
return /* @__PURE__ */
|
|
2950
|
+
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
2951
|
};
|
|
2608
2952
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2609
2953
|
|
|
2610
2954
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2611
|
-
import * as
|
|
2955
|
+
import * as React44 from "react";
|
|
2612
2956
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
2613
2957
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
2614
2958
|
import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
|
|
2615
|
-
import { __ as
|
|
2959
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
2616
2960
|
var options3 = [
|
|
2617
2961
|
{
|
|
2618
2962
|
value: "row",
|
|
2619
|
-
label:
|
|
2963
|
+
label: __19("Row", "elementor"),
|
|
2620
2964
|
renderContent: ({ size }) => {
|
|
2621
2965
|
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
2622
|
-
return /* @__PURE__ */
|
|
2966
|
+
return /* @__PURE__ */ React44.createElement(StartIcon5, { fontSize: size });
|
|
2623
2967
|
},
|
|
2624
2968
|
showTooltip: true
|
|
2625
2969
|
},
|
|
2626
2970
|
{
|
|
2627
2971
|
value: "column",
|
|
2628
|
-
label:
|
|
2629
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2972
|
+
label: __19("Column", "elementor"),
|
|
2973
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
2630
2974
|
showTooltip: true
|
|
2631
2975
|
},
|
|
2632
2976
|
{
|
|
2633
2977
|
value: "row-reverse",
|
|
2634
|
-
label:
|
|
2978
|
+
label: __19("Reversed row", "elementor"),
|
|
2635
2979
|
renderContent: ({ size }) => {
|
|
2636
2980
|
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
2637
|
-
return /* @__PURE__ */
|
|
2981
|
+
return /* @__PURE__ */ React44.createElement(EndIcon5, { fontSize: size });
|
|
2638
2982
|
},
|
|
2639
2983
|
showTooltip: true
|
|
2640
2984
|
},
|
|
2641
2985
|
{
|
|
2642
2986
|
value: "column-reverse",
|
|
2643
|
-
label:
|
|
2644
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2987
|
+
label: __19("Reversed column", "elementor"),
|
|
2988
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
2645
2989
|
showTooltip: true
|
|
2646
2990
|
}
|
|
2647
2991
|
];
|
|
2648
2992
|
var FlexDirectionField = () => {
|
|
2649
2993
|
const { isSiteRtl } = useDirection();
|
|
2650
|
-
return /* @__PURE__ */
|
|
2994
|
+
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
2995
|
};
|
|
2652
2996
|
|
|
2653
2997
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2654
|
-
import * as
|
|
2998
|
+
import * as React45 from "react";
|
|
2655
2999
|
import { useState as useState9 } from "react";
|
|
2656
3000
|
import { ControlToggleButtonGroup, NumberControl } from "@elementor/editor-controls";
|
|
2657
3001
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
2658
3002
|
import { DirectionProvider as DirectionProvider5, Grid as Grid6, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
2659
|
-
import { __ as
|
|
3003
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
2660
3004
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
2661
3005
|
var LAST_DEFAULT_VALUE = 99999;
|
|
2662
3006
|
var FIRST = "first";
|
|
@@ -2669,25 +3013,27 @@ var orderValueMap = {
|
|
|
2669
3013
|
var items = [
|
|
2670
3014
|
{
|
|
2671
3015
|
value: FIRST,
|
|
2672
|
-
label:
|
|
2673
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3016
|
+
label: __20("First", "elementor"),
|
|
3017
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
2674
3018
|
showTooltip: true
|
|
2675
3019
|
},
|
|
2676
3020
|
{
|
|
2677
3021
|
value: LAST,
|
|
2678
|
-
label:
|
|
2679
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3022
|
+
label: __20("Last", "elementor"),
|
|
3023
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
2680
3024
|
showTooltip: true
|
|
2681
3025
|
},
|
|
2682
3026
|
{
|
|
2683
3027
|
value: CUSTOM,
|
|
2684
|
-
label:
|
|
2685
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3028
|
+
label: __20("Custom", "elementor"),
|
|
3029
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PencilIcon, { fontSize: size }),
|
|
2686
3030
|
showTooltip: true
|
|
2687
3031
|
}
|
|
2688
3032
|
];
|
|
2689
3033
|
var FlexOrderField = () => {
|
|
2690
|
-
const { isSiteRtl } = useDirection()
|
|
3034
|
+
const { isSiteRtl } = useDirection();
|
|
3035
|
+
const [order, setOrder] = useStylesField("order");
|
|
3036
|
+
const { canEdit } = useStyle();
|
|
2691
3037
|
const [groupControlValue, setGroupControlValue] = useState9(getGroupControlValue(order?.value || null));
|
|
2692
3038
|
const handleToggleButtonChange = (group) => {
|
|
2693
3039
|
setGroupControlValue(group);
|
|
@@ -2697,15 +3043,16 @@ var FlexOrderField = () => {
|
|
|
2697
3043
|
}
|
|
2698
3044
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
2699
3045
|
};
|
|
2700
|
-
return /* @__PURE__ */
|
|
3046
|
+
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
3047
|
ControlToggleButtonGroup,
|
|
2702
3048
|
{
|
|
2703
3049
|
items,
|
|
2704
3050
|
value: groupControlValue,
|
|
2705
3051
|
onChange: handleToggleButtonChange,
|
|
2706
|
-
exclusive: true
|
|
3052
|
+
exclusive: true,
|
|
3053
|
+
disabled: !canEdit
|
|
2707
3054
|
}
|
|
2708
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
3055
|
+
))), 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
3056
|
NumberControl,
|
|
2710
3057
|
{
|
|
2711
3058
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -2725,7 +3072,7 @@ var getGroupControlValue = (order) => {
|
|
|
2725
3072
|
};
|
|
2726
3073
|
|
|
2727
3074
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
2728
|
-
import * as
|
|
3075
|
+
import * as React46 from "react";
|
|
2729
3076
|
import { useMemo as useMemo5, useState as useState10 } from "react";
|
|
2730
3077
|
import {
|
|
2731
3078
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
@@ -2735,30 +3082,31 @@ import {
|
|
|
2735
3082
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
2736
3083
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
2737
3084
|
import { DirectionProvider as DirectionProvider6, Grid as Grid7, ThemeProvider as ThemeProvider6 } from "@elementor/ui";
|
|
2738
|
-
import { __ as
|
|
3085
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
2739
3086
|
var DEFAULT = 1;
|
|
2740
3087
|
var items2 = [
|
|
2741
3088
|
{
|
|
2742
3089
|
value: "flex-grow",
|
|
2743
|
-
label:
|
|
2744
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3090
|
+
label: __21("Grow", "elementor"),
|
|
3091
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(ExpandIcon, { fontSize: size }),
|
|
2745
3092
|
showTooltip: true
|
|
2746
3093
|
},
|
|
2747
3094
|
{
|
|
2748
3095
|
value: "flex-shrink",
|
|
2749
|
-
label:
|
|
2750
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3096
|
+
label: __21("Shrink", "elementor"),
|
|
3097
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(ShrinkIcon, { fontSize: size }),
|
|
2751
3098
|
showTooltip: true
|
|
2752
3099
|
},
|
|
2753
3100
|
{
|
|
2754
3101
|
value: "custom",
|
|
2755
|
-
label:
|
|
2756
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3102
|
+
label: __21("Custom", "elementor"),
|
|
3103
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(PencilIcon2, { fontSize: size }),
|
|
2757
3104
|
showTooltip: true
|
|
2758
3105
|
}
|
|
2759
3106
|
];
|
|
2760
3107
|
var FlexSizeField = () => {
|
|
2761
3108
|
const { isSiteRtl } = useDirection();
|
|
3109
|
+
const { canEdit } = useStyle();
|
|
2762
3110
|
const [fields, setFields] = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
2763
3111
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
2764
3112
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
@@ -2788,17 +3136,18 @@ var FlexSizeField = () => {
|
|
|
2788
3136
|
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
2789
3137
|
});
|
|
2790
3138
|
};
|
|
2791
|
-
return /* @__PURE__ */
|
|
3139
|
+
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
3140
|
ControlToggleButtonGroup2,
|
|
2793
3141
|
{
|
|
2794
3142
|
value: activeGroup,
|
|
2795
3143
|
onChange: onChangeGroup,
|
|
3144
|
+
disabled: !canEdit,
|
|
2796
3145
|
items: items2,
|
|
2797
3146
|
exclusive: true
|
|
2798
3147
|
}
|
|
2799
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
3148
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React46.createElement(FlexCustomField, null))));
|
|
2800
3149
|
};
|
|
2801
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
3150
|
+
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
3151
|
var getActiveGroup = ({
|
|
2803
3152
|
grow,
|
|
2804
3153
|
shrink,
|
|
@@ -2820,16 +3169,16 @@ var getActiveGroup = ({
|
|
|
2820
3169
|
};
|
|
2821
3170
|
|
|
2822
3171
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
2823
|
-
import * as
|
|
3172
|
+
import * as React47 from "react";
|
|
2824
3173
|
import { GapControl } from "@elementor/editor-controls";
|
|
2825
|
-
import { Stack as
|
|
2826
|
-
import { __ as
|
|
3174
|
+
import { Stack as Stack12 } from "@elementor/ui";
|
|
3175
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
2827
3176
|
var GapControlField = () => {
|
|
2828
|
-
return /* @__PURE__ */
|
|
3177
|
+
return /* @__PURE__ */ React47.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React47.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React47.createElement(GapControl, { label: __22("Gaps", "elementor") })));
|
|
2829
3178
|
};
|
|
2830
3179
|
|
|
2831
3180
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
2832
|
-
import * as
|
|
3181
|
+
import * as React48 from "react";
|
|
2833
3182
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
2834
3183
|
import {
|
|
2835
3184
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -2839,8 +3188,8 @@ import {
|
|
|
2839
3188
|
JustifySpaceBetweenVerticalIcon as BetweenIcon2,
|
|
2840
3189
|
JustifyTopIcon as JustifyTopIcon2
|
|
2841
3190
|
} from "@elementor/icons";
|
|
2842
|
-
import { DirectionProvider as DirectionProvider7, Stack as
|
|
2843
|
-
import { __ as
|
|
3191
|
+
import { DirectionProvider as DirectionProvider7, Stack as Stack13, ThemeProvider as ThemeProvider7, withDirection as withDirection7 } from "@elementor/ui";
|
|
3192
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
2844
3193
|
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
2845
3194
|
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
2846
3195
|
var iconProps4 = {
|
|
@@ -2850,75 +3199,75 @@ var iconProps4 = {
|
|
|
2850
3199
|
var options4 = [
|
|
2851
3200
|
{
|
|
2852
3201
|
value: "flex-start",
|
|
2853
|
-
label:
|
|
2854
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3202
|
+
label: __23("Start", "elementor"),
|
|
3203
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
2855
3204
|
showTooltip: true
|
|
2856
3205
|
},
|
|
2857
3206
|
{
|
|
2858
3207
|
value: "center",
|
|
2859
|
-
label:
|
|
2860
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3208
|
+
label: __23("Center", "elementor"),
|
|
3209
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
2861
3210
|
showTooltip: true
|
|
2862
3211
|
},
|
|
2863
3212
|
{
|
|
2864
3213
|
value: "flex-end",
|
|
2865
|
-
label:
|
|
2866
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3214
|
+
label: __23("End", "elementor"),
|
|
3215
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
2867
3216
|
showTooltip: true
|
|
2868
3217
|
},
|
|
2869
3218
|
{
|
|
2870
3219
|
value: "space-between",
|
|
2871
|
-
label:
|
|
2872
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3220
|
+
label: __23("Space between", "elementor"),
|
|
3221
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
2873
3222
|
showTooltip: true
|
|
2874
3223
|
},
|
|
2875
3224
|
{
|
|
2876
3225
|
value: "space-around",
|
|
2877
|
-
label:
|
|
2878
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3226
|
+
label: __23("Space around", "elementor"),
|
|
3227
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
2879
3228
|
showTooltip: true
|
|
2880
3229
|
},
|
|
2881
3230
|
{
|
|
2882
3231
|
value: "space-evenly",
|
|
2883
|
-
label:
|
|
2884
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3232
|
+
label: __23("Space evenly", "elementor"),
|
|
3233
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
2885
3234
|
showTooltip: true
|
|
2886
3235
|
}
|
|
2887
3236
|
];
|
|
2888
3237
|
var JustifyContentField = () => {
|
|
2889
3238
|
const { isSiteRtl } = useDirection();
|
|
2890
|
-
return /* @__PURE__ */
|
|
3239
|
+
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
3240
|
};
|
|
2892
3241
|
|
|
2893
3242
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2894
|
-
import * as
|
|
3243
|
+
import * as React49 from "react";
|
|
2895
3244
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
2896
3245
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
2897
3246
|
import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
|
|
2898
|
-
import { __ as
|
|
3247
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
2899
3248
|
var options5 = [
|
|
2900
3249
|
{
|
|
2901
3250
|
value: "nowrap",
|
|
2902
|
-
label:
|
|
2903
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3251
|
+
label: __24("No wrap", "elementor"),
|
|
3252
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
2904
3253
|
showTooltip: true
|
|
2905
3254
|
},
|
|
2906
3255
|
{
|
|
2907
3256
|
value: "wrap",
|
|
2908
|
-
label:
|
|
2909
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3257
|
+
label: __24("Wrap", "elementor"),
|
|
3258
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowBackIcon, { fontSize: size }),
|
|
2910
3259
|
showTooltip: true
|
|
2911
3260
|
},
|
|
2912
3261
|
{
|
|
2913
3262
|
value: "wrap-reverse",
|
|
2914
|
-
label:
|
|
2915
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3263
|
+
label: __24("Reversed wrap", "elementor"),
|
|
3264
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
2916
3265
|
showTooltip: true
|
|
2917
3266
|
}
|
|
2918
3267
|
];
|
|
2919
3268
|
var WrapField = () => {
|
|
2920
3269
|
const { isSiteRtl } = useDirection();
|
|
2921
|
-
return /* @__PURE__ */
|
|
3270
|
+
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
3271
|
};
|
|
2923
3272
|
|
|
2924
3273
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2930,13 +3279,13 @@ var LayoutSection = () => {
|
|
|
2930
3279
|
const parent = useParentElement(element.id);
|
|
2931
3280
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2932
3281
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
2933
|
-
return /* @__PURE__ */
|
|
3282
|
+
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
3283
|
};
|
|
2935
3284
|
var FlexFields = () => {
|
|
2936
3285
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2937
|
-
return /* @__PURE__ */
|
|
3286
|
+
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
3287
|
};
|
|
2939
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3288
|
+
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
3289
|
var shouldDisplayFlexFields = (display, local) => {
|
|
2941
3290
|
const value = display?.value ?? local?.value;
|
|
2942
3291
|
if (!value) {
|
|
@@ -2946,66 +3295,66 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
2946
3295
|
};
|
|
2947
3296
|
|
|
2948
3297
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2949
|
-
import * as
|
|
2950
|
-
import { isExperimentActive as
|
|
3298
|
+
import * as React55 from "react";
|
|
3299
|
+
import { isExperimentActive as isExperimentActive7 } from "@elementor/editor-v1-adapters";
|
|
2951
3300
|
import { useSessionStorage } from "@elementor/session";
|
|
2952
3301
|
|
|
2953
3302
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2954
|
-
import * as
|
|
3303
|
+
import * as React51 from "react";
|
|
2955
3304
|
import { SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
2956
3305
|
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
|
|
3306
|
+
import { Grid as Grid9, Stack as Stack14, withDirection as withDirection8 } from "@elementor/ui";
|
|
3307
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
2959
3308
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
2960
3309
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
2961
3310
|
var sideIcons = {
|
|
2962
|
-
"inset-block-start": /* @__PURE__ */
|
|
2963
|
-
"inset-block-end": /* @__PURE__ */
|
|
2964
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2965
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3311
|
+
"inset-block-start": /* @__PURE__ */ React51.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
3312
|
+
"inset-block-end": /* @__PURE__ */ React51.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
3313
|
+
"inset-inline-start": /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3314
|
+
"inset-inline-end": /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2966
3315
|
};
|
|
2967
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2968
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
3316
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __26("Right", "elementor") : __26("Left", "elementor");
|
|
3317
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __26("Left", "elementor") : __26("Right", "elementor");
|
|
2969
3318
|
var DimensionsField = () => {
|
|
2970
3319
|
const { isSiteRtl } = useDirection();
|
|
2971
|
-
return /* @__PURE__ */
|
|
3320
|
+
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
3321
|
};
|
|
2973
3322
|
var DimensionField = ({ side, label }) => {
|
|
2974
|
-
return /* @__PURE__ */
|
|
3323
|
+
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
3324
|
};
|
|
2976
3325
|
|
|
2977
3326
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
2978
|
-
import * as
|
|
3327
|
+
import * as React52 from "react";
|
|
2979
3328
|
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
2980
3329
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2981
|
-
import { __ as
|
|
3330
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
2982
3331
|
var OffsetField = () => {
|
|
2983
|
-
return /* @__PURE__ */
|
|
3332
|
+
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
3333
|
};
|
|
2985
3334
|
|
|
2986
3335
|
// src/components/style-sections/position-section/position-field.tsx
|
|
2987
|
-
import * as
|
|
3336
|
+
import * as React53 from "react";
|
|
2988
3337
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
2989
3338
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2990
|
-
import { __ as
|
|
3339
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
2991
3340
|
var positionOptions = [
|
|
2992
|
-
{ label:
|
|
2993
|
-
{ label:
|
|
2994
|
-
{ label:
|
|
2995
|
-
{ label:
|
|
2996
|
-
{ label:
|
|
3341
|
+
{ label: __28("Static", "elementor"), value: "static" },
|
|
3342
|
+
{ label: __28("Relative", "elementor"), value: "relative" },
|
|
3343
|
+
{ label: __28("Absolute", "elementor"), value: "absolute" },
|
|
3344
|
+
{ label: __28("Fixed", "elementor"), value: "fixed" },
|
|
3345
|
+
{ label: __28("Sticky", "elementor"), value: "sticky" }
|
|
2997
3346
|
];
|
|
2998
3347
|
var PositionField = ({ onChange }) => {
|
|
2999
|
-
return /* @__PURE__ */
|
|
3348
|
+
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
3349
|
};
|
|
3001
3350
|
|
|
3002
3351
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3003
|
-
import * as
|
|
3352
|
+
import * as React54 from "react";
|
|
3004
3353
|
import { NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
3005
3354
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
3006
|
-
import { __ as
|
|
3355
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
3007
3356
|
var ZIndexField = () => {
|
|
3008
|
-
return /* @__PURE__ */
|
|
3357
|
+
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
3358
|
};
|
|
3010
3359
|
|
|
3011
3360
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -3018,7 +3367,7 @@ var PositionSection = () => {
|
|
|
3018
3367
|
"inset-inline-end"
|
|
3019
3368
|
]);
|
|
3020
3369
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3021
|
-
const isCssIdFeatureActive =
|
|
3370
|
+
const isCssIdFeatureActive = isExperimentActive7("e_v_3_30");
|
|
3022
3371
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3023
3372
|
if (newPosition === "static") {
|
|
3024
3373
|
if (dimensionsValues) {
|
|
@@ -3038,7 +3387,7 @@ var PositionSection = () => {
|
|
|
3038
3387
|
}
|
|
3039
3388
|
};
|
|
3040
3389
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3041
|
-
return /* @__PURE__ */
|
|
3390
|
+
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
3391
|
};
|
|
3043
3392
|
var usePersistDimensions = () => {
|
|
3044
3393
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3048,23 +3397,23 @@ var usePersistDimensions = () => {
|
|
|
3048
3397
|
};
|
|
3049
3398
|
|
|
3050
3399
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3051
|
-
import * as
|
|
3400
|
+
import * as React60 from "react";
|
|
3052
3401
|
import { AspectRatioControl, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
3053
|
-
import { isExperimentActive as
|
|
3054
|
-
import { Grid as Grid16, Stack as
|
|
3055
|
-
import { __ as
|
|
3402
|
+
import { isExperimentActive as isExperimentActive8 } from "@elementor/editor-v1-adapters";
|
|
3403
|
+
import { Grid as Grid16, Stack as Stack16 } from "@elementor/ui";
|
|
3404
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
3056
3405
|
|
|
3057
3406
|
// src/components/collapsible-content.tsx
|
|
3058
|
-
import * as
|
|
3407
|
+
import * as React56 from "react";
|
|
3059
3408
|
import { useState as useState11 } from "react";
|
|
3060
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
3061
|
-
import { __ as
|
|
3409
|
+
import { Button, Collapse as Collapse3, Stack as Stack15 } from "@elementor/ui";
|
|
3410
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
3062
3411
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
3063
3412
|
const [open, setOpen] = useState11(defaultOpen);
|
|
3064
3413
|
const handleToggle = () => {
|
|
3065
3414
|
setOpen((prevOpen) => !prevOpen);
|
|
3066
3415
|
};
|
|
3067
|
-
return /* @__PURE__ */
|
|
3416
|
+
return /* @__PURE__ */ React56.createElement(Stack15, null, /* @__PURE__ */ React56.createElement(
|
|
3068
3417
|
Button,
|
|
3069
3418
|
{
|
|
3070
3419
|
fullWidth: true,
|
|
@@ -3072,163 +3421,155 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
3072
3421
|
color: "secondary",
|
|
3073
3422
|
variant: "outlined",
|
|
3074
3423
|
onClick: handleToggle,
|
|
3075
|
-
endIcon: /* @__PURE__ */
|
|
3424
|
+
endIcon: /* @__PURE__ */ React56.createElement(CollapseIcon, { open }),
|
|
3076
3425
|
sx: { my: 0.5 }
|
|
3077
3426
|
},
|
|
3078
|
-
open ?
|
|
3079
|
-
), /* @__PURE__ */
|
|
3427
|
+
open ? __30("Show less", "elementor") : __30("Show more", "elementor")
|
|
3428
|
+
), /* @__PURE__ */ React56.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
3080
3429
|
};
|
|
3081
3430
|
|
|
3082
3431
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3083
|
-
import * as
|
|
3432
|
+
import * as React57 from "react";
|
|
3084
3433
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
3085
3434
|
import { Grid as Grid13 } from "@elementor/ui";
|
|
3086
|
-
import { __ as
|
|
3435
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
3087
3436
|
var positionOptions2 = [
|
|
3088
|
-
{ label:
|
|
3089
|
-
{ label:
|
|
3090
|
-
{ label:
|
|
3091
|
-
{ label:
|
|
3092
|
-
{ label:
|
|
3437
|
+
{ label: __31("Fill", "elementor"), value: "fill" },
|
|
3438
|
+
{ label: __31("Cover", "elementor"), value: "cover" },
|
|
3439
|
+
{ label: __31("Contain", "elementor"), value: "contain" },
|
|
3440
|
+
{ label: __31("None", "elementor"), value: "none" },
|
|
3441
|
+
{ label: __31("Scale down", "elementor"), value: "scale-down" }
|
|
3093
3442
|
];
|
|
3094
|
-
var ObjectFitField = (
|
|
3095
|
-
return /* @__PURE__ */
|
|
3443
|
+
var ObjectFitField = () => {
|
|
3444
|
+
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 }))));
|
|
3096
3445
|
};
|
|
3097
3446
|
|
|
3098
3447
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3099
|
-
import * as
|
|
3448
|
+
import * as React58 from "react";
|
|
3100
3449
|
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
3101
3450
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
3102
|
-
import { __ as
|
|
3451
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
3103
3452
|
var positionOptions3 = [
|
|
3104
|
-
{ label:
|
|
3105
|
-
{ label:
|
|
3106
|
-
{ label:
|
|
3107
|
-
{ label:
|
|
3108
|
-
{ label:
|
|
3109
|
-
{ label:
|
|
3110
|
-
{ label:
|
|
3111
|
-
{ label:
|
|
3112
|
-
{ label:
|
|
3453
|
+
{ label: __32("Center center", "elementor"), value: "center center" },
|
|
3454
|
+
{ label: __32("Center left", "elementor"), value: "center left" },
|
|
3455
|
+
{ label: __32("Center right", "elementor"), value: "center right" },
|
|
3456
|
+
{ label: __32("Top center", "elementor"), value: "top center" },
|
|
3457
|
+
{ label: __32("Top left", "elementor"), value: "top left" },
|
|
3458
|
+
{ label: __32("Top right", "elementor"), value: "top right" },
|
|
3459
|
+
{ label: __32("Bottom center", "elementor"), value: "bottom center" },
|
|
3460
|
+
{ label: __32("Bottom left", "elementor"), value: "bottom left" },
|
|
3461
|
+
{ label: __32("Bottom right", "elementor"), value: "bottom right" }
|
|
3113
3462
|
];
|
|
3114
|
-
var ObjectPositionField = (
|
|
3115
|
-
return /* @__PURE__ */
|
|
3463
|
+
var ObjectPositionField = () => {
|
|
3464
|
+
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 }))));
|
|
3116
3465
|
};
|
|
3117
3466
|
|
|
3118
3467
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3119
|
-
import * as
|
|
3468
|
+
import * as React59 from "react";
|
|
3120
3469
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
3121
3470
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
3122
3471
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
3123
|
-
import { __ as
|
|
3472
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
3124
3473
|
var options6 = [
|
|
3125
3474
|
{
|
|
3126
3475
|
value: "visible",
|
|
3127
|
-
label:
|
|
3128
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3476
|
+
label: __33("Visible", "elementor"),
|
|
3477
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(EyeIcon, { fontSize: size }),
|
|
3129
3478
|
showTooltip: true
|
|
3130
3479
|
},
|
|
3131
3480
|
{
|
|
3132
3481
|
value: "hidden",
|
|
3133
|
-
label:
|
|
3134
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3482
|
+
label: __33("Hidden", "elementor"),
|
|
3483
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(EyeOffIcon, { fontSize: size }),
|
|
3135
3484
|
showTooltip: true
|
|
3136
3485
|
},
|
|
3137
3486
|
{
|
|
3138
3487
|
value: "auto",
|
|
3139
|
-
label:
|
|
3140
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3488
|
+
label: __33("Auto", "elementor"),
|
|
3489
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(LetterAIcon, { fontSize: size }),
|
|
3141
3490
|
showTooltip: true
|
|
3142
3491
|
}
|
|
3143
3492
|
];
|
|
3144
3493
|
var OverflowField = () => {
|
|
3145
|
-
return /* @__PURE__ */
|
|
3494
|
+
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
3495
|
};
|
|
3147
3496
|
|
|
3148
3497
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3149
3498
|
var SizeSection = () => {
|
|
3150
|
-
const [fitValue
|
|
3499
|
+
const [fitValue] = useStylesField("object-fit");
|
|
3151
3500
|
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3152
|
-
const
|
|
3153
|
-
|
|
3154
|
-
setFitValue({
|
|
3155
|
-
value: newFit,
|
|
3156
|
-
$$type: "string"
|
|
3157
|
-
});
|
|
3158
|
-
}
|
|
3159
|
-
};
|
|
3160
|
-
const isVersion330Active = isExperimentActive7("e_v_3_30");
|
|
3161
|
-
return /* @__PURE__ */ React55.createElement(SectionContent, null, /* @__PURE__ */ React55.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeField, { bind: "width", label: __31("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeField, { bind: "height", label: __31("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React55.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(
|
|
3501
|
+
const isVersion330Active = isExperimentActive8("e_v_3_30");
|
|
3502
|
+
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
3503
|
SizeField,
|
|
3163
3504
|
{
|
|
3164
3505
|
bind: "min-width",
|
|
3165
|
-
label:
|
|
3506
|
+
label: __34("Min width", "elementor"),
|
|
3166
3507
|
extendedValues: ["auto"]
|
|
3167
3508
|
}
|
|
3168
|
-
)), /* @__PURE__ */
|
|
3509
|
+
)), /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(
|
|
3169
3510
|
SizeField,
|
|
3170
3511
|
{
|
|
3171
3512
|
bind: "min-height",
|
|
3172
|
-
label:
|
|
3513
|
+
label: __34("Min height", "elementor"),
|
|
3173
3514
|
extendedValues: ["auto"]
|
|
3174
3515
|
}
|
|
3175
|
-
))), /* @__PURE__ */
|
|
3516
|
+
))), /* @__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, null), isNotFill && /* @__PURE__ */ React60.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ObjectPositionField, null)))));
|
|
3176
3517
|
};
|
|
3177
3518
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
3178
|
-
return /* @__PURE__ */
|
|
3519
|
+
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
3520
|
};
|
|
3180
3521
|
|
|
3181
3522
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3182
|
-
import * as
|
|
3523
|
+
import * as React61 from "react";
|
|
3183
3524
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
3184
|
-
import { __ as
|
|
3525
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
3185
3526
|
var SpacingSection = () => {
|
|
3186
3527
|
const { isSiteRtl } = useDirection();
|
|
3187
|
-
return /* @__PURE__ */
|
|
3528
|
+
return /* @__PURE__ */ React61.createElement(SectionContent, null, /* @__PURE__ */ React61.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React61.createElement(
|
|
3188
3529
|
LinkedDimensionsControl,
|
|
3189
3530
|
{
|
|
3190
|
-
label:
|
|
3531
|
+
label: __35("Margin", "elementor"),
|
|
3191
3532
|
isSiteRtl,
|
|
3192
3533
|
extendedValues: ["auto"]
|
|
3193
3534
|
}
|
|
3194
|
-
)), /* @__PURE__ */
|
|
3535
|
+
)), /* @__PURE__ */ React61.createElement(PanelDivider, null), /* @__PURE__ */ React61.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React61.createElement(LinkedDimensionsControl, { label: __35("Padding", "elementor"), isSiteRtl })));
|
|
3195
3536
|
};
|
|
3196
3537
|
|
|
3197
3538
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3198
|
-
import * as
|
|
3199
|
-
import { isExperimentActive as
|
|
3539
|
+
import * as React77 from "react";
|
|
3540
|
+
import { isExperimentActive as isExperimentActive9 } from "@elementor/editor-v1-adapters";
|
|
3200
3541
|
|
|
3201
3542
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3202
|
-
import * as
|
|
3543
|
+
import * as React62 from "react";
|
|
3203
3544
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
3204
3545
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
3205
|
-
import { __ as
|
|
3546
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
3206
3547
|
var ColumnCountField = () => {
|
|
3207
|
-
return /* @__PURE__ */
|
|
3548
|
+
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
3549
|
};
|
|
3209
3550
|
|
|
3210
3551
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3211
|
-
import * as
|
|
3552
|
+
import * as React63 from "react";
|
|
3212
3553
|
import { SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
3213
3554
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
3214
|
-
import { __ as
|
|
3555
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
3215
3556
|
var ColumnGapField = () => {
|
|
3216
|
-
return /* @__PURE__ */
|
|
3557
|
+
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
3558
|
};
|
|
3218
3559
|
|
|
3219
3560
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3220
|
-
import * as
|
|
3561
|
+
import * as React64 from "react";
|
|
3221
3562
|
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
3222
3563
|
import { Grid as Grid19 } from "@elementor/ui";
|
|
3223
|
-
import { __ as
|
|
3564
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
3224
3565
|
|
|
3225
3566
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3226
3567
|
import { useMemo as useMemo6 } from "react";
|
|
3227
|
-
import { __ as
|
|
3568
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
3228
3569
|
var supportedCategories = {
|
|
3229
|
-
system:
|
|
3230
|
-
custom:
|
|
3231
|
-
googlefonts:
|
|
3570
|
+
system: __38("System", "elementor"),
|
|
3571
|
+
custom: __38("Custom Fonts", "elementor"),
|
|
3572
|
+
googlefonts: __38("Google Fonts", "elementor")
|
|
3232
3573
|
};
|
|
3233
3574
|
var getFontFamilies = () => {
|
|
3234
3575
|
const { controls } = getElementorConfig();
|
|
@@ -3265,188 +3606,188 @@ var FontFamilyField = () => {
|
|
|
3265
3606
|
if (fontFamilies.length === 0) {
|
|
3266
3607
|
return null;
|
|
3267
3608
|
}
|
|
3268
|
-
return /* @__PURE__ */
|
|
3609
|
+
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
3610
|
};
|
|
3270
3611
|
|
|
3271
3612
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3272
|
-
import * as
|
|
3613
|
+
import * as React65 from "react";
|
|
3273
3614
|
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
3274
3615
|
import { Grid as Grid20 } from "@elementor/ui";
|
|
3275
|
-
import { __ as
|
|
3616
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
3276
3617
|
var FontSizeField = () => {
|
|
3277
|
-
return /* @__PURE__ */
|
|
3618
|
+
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
3619
|
};
|
|
3279
3620
|
|
|
3280
3621
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3281
|
-
import * as
|
|
3622
|
+
import * as React66 from "react";
|
|
3282
3623
|
import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
3283
3624
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
3284
3625
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
3285
|
-
import { __ as
|
|
3626
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
3286
3627
|
var options7 = [
|
|
3287
3628
|
{
|
|
3288
3629
|
value: "normal",
|
|
3289
|
-
label:
|
|
3290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3630
|
+
label: __41("Normal", "elementor"),
|
|
3631
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(MinusIcon2, { fontSize: size }),
|
|
3291
3632
|
showTooltip: true
|
|
3292
3633
|
},
|
|
3293
3634
|
{
|
|
3294
3635
|
value: "italic",
|
|
3295
|
-
label:
|
|
3296
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3636
|
+
label: __41("Italic", "elementor"),
|
|
3637
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(ItalicIcon, { fontSize: size }),
|
|
3297
3638
|
showTooltip: true
|
|
3298
3639
|
}
|
|
3299
3640
|
];
|
|
3300
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3641
|
+
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
3642
|
|
|
3302
3643
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3303
|
-
import * as
|
|
3644
|
+
import * as React67 from "react";
|
|
3304
3645
|
import { SelectControl as SelectControl6 } from "@elementor/editor-controls";
|
|
3305
3646
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
3306
|
-
import { __ as
|
|
3647
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
3307
3648
|
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:
|
|
3649
|
+
{ value: "100", label: __42("100 - Thin", "elementor") },
|
|
3650
|
+
{ value: "200", label: __42("200 - Extra light", "elementor") },
|
|
3651
|
+
{ value: "300", label: __42("300 - Light", "elementor") },
|
|
3652
|
+
{ value: "400", label: __42("400 - Normal", "elementor") },
|
|
3653
|
+
{ value: "500", label: __42("500 - Medium", "elementor") },
|
|
3654
|
+
{ value: "600", label: __42("600 - Semi bold", "elementor") },
|
|
3655
|
+
{ value: "700", label: __42("700 - Bold", "elementor") },
|
|
3656
|
+
{ value: "800", label: __42("800 - Extra bold", "elementor") },
|
|
3657
|
+
{ value: "900", label: __42("900 - Black", "elementor") }
|
|
3317
3658
|
];
|
|
3318
3659
|
var FontWeightField = () => {
|
|
3319
|
-
return /* @__PURE__ */
|
|
3660
|
+
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
3661
|
};
|
|
3321
3662
|
|
|
3322
3663
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3323
|
-
import * as
|
|
3664
|
+
import * as React68 from "react";
|
|
3324
3665
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
3325
3666
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
3326
|
-
import { __ as
|
|
3667
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
3327
3668
|
var LetterSpacingField = () => {
|
|
3328
|
-
return /* @__PURE__ */
|
|
3669
|
+
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
3670
|
};
|
|
3330
3671
|
|
|
3331
3672
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3332
|
-
import * as
|
|
3673
|
+
import * as React69 from "react";
|
|
3333
3674
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
3334
3675
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
3335
|
-
import { __ as
|
|
3676
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
3336
3677
|
var LineHeightField = () => {
|
|
3337
|
-
return /* @__PURE__ */
|
|
3678
|
+
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
3679
|
};
|
|
3339
3680
|
|
|
3340
3681
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3341
|
-
import * as
|
|
3682
|
+
import * as React70 from "react";
|
|
3342
3683
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
3343
3684
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
3344
3685
|
import { Grid as Grid25, withDirection as withDirection9 } from "@elementor/ui";
|
|
3345
|
-
import { __ as
|
|
3686
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
3346
3687
|
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
3347
3688
|
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
3348
3689
|
var options8 = [
|
|
3349
3690
|
{
|
|
3350
3691
|
value: "start",
|
|
3351
|
-
label:
|
|
3352
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3692
|
+
label: __45("Start", "elementor"),
|
|
3693
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignStartIcon, { fontSize: size }),
|
|
3353
3694
|
showTooltip: true
|
|
3354
3695
|
},
|
|
3355
3696
|
{
|
|
3356
3697
|
value: "center",
|
|
3357
|
-
label:
|
|
3358
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3698
|
+
label: __45("Center", "elementor"),
|
|
3699
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignCenterIcon, { fontSize: size }),
|
|
3359
3700
|
showTooltip: true
|
|
3360
3701
|
},
|
|
3361
3702
|
{
|
|
3362
3703
|
value: "end",
|
|
3363
|
-
label:
|
|
3364
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3704
|
+
label: __45("End", "elementor"),
|
|
3705
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignEndIcon, { fontSize: size }),
|
|
3365
3706
|
showTooltip: true
|
|
3366
3707
|
},
|
|
3367
3708
|
{
|
|
3368
3709
|
value: "justify",
|
|
3369
|
-
label:
|
|
3370
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3710
|
+
label: __45("Justify", "elementor"),
|
|
3711
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
3371
3712
|
showTooltip: true
|
|
3372
3713
|
}
|
|
3373
3714
|
];
|
|
3374
3715
|
var TextAlignmentField = () => {
|
|
3375
|
-
return /* @__PURE__ */
|
|
3716
|
+
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
3717
|
};
|
|
3377
3718
|
|
|
3378
3719
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3379
|
-
import * as
|
|
3720
|
+
import * as React71 from "react";
|
|
3380
3721
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
3381
3722
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
3382
|
-
import { __ as
|
|
3723
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
3383
3724
|
var TextColorField = () => {
|
|
3384
|
-
return /* @__PURE__ */
|
|
3725
|
+
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
3726
|
};
|
|
3386
3727
|
|
|
3387
3728
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3388
|
-
import * as
|
|
3729
|
+
import * as React72 from "react";
|
|
3389
3730
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
3390
3731
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
3391
3732
|
import { Grid as Grid27 } from "@elementor/ui";
|
|
3392
|
-
import { __ as
|
|
3733
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
3393
3734
|
var options9 = [
|
|
3394
3735
|
{
|
|
3395
3736
|
value: "none",
|
|
3396
|
-
label:
|
|
3397
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3737
|
+
label: __47("None", "elementor"),
|
|
3738
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(MinusIcon3, { fontSize: size }),
|
|
3398
3739
|
showTooltip: true,
|
|
3399
3740
|
exclusive: true
|
|
3400
3741
|
},
|
|
3401
3742
|
{
|
|
3402
3743
|
value: "underline",
|
|
3403
|
-
label:
|
|
3404
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3744
|
+
label: __47("Underline", "elementor"),
|
|
3745
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(UnderlineIcon, { fontSize: size }),
|
|
3405
3746
|
showTooltip: true
|
|
3406
3747
|
},
|
|
3407
3748
|
{
|
|
3408
3749
|
value: "line-through",
|
|
3409
|
-
label:
|
|
3410
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3750
|
+
label: __47("Line-through", "elementor"),
|
|
3751
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(StrikethroughIcon, { fontSize: size }),
|
|
3411
3752
|
showTooltip: true
|
|
3412
3753
|
},
|
|
3413
3754
|
{
|
|
3414
3755
|
value: "overline",
|
|
3415
|
-
label:
|
|
3416
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3756
|
+
label: __47("Overline", "elementor"),
|
|
3757
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(OverlineIcon, { fontSize: size }),
|
|
3417
3758
|
showTooltip: true
|
|
3418
3759
|
}
|
|
3419
3760
|
];
|
|
3420
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3761
|
+
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
3762
|
|
|
3422
3763
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3423
|
-
import * as
|
|
3764
|
+
import * as React73 from "react";
|
|
3424
3765
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
3425
3766
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
3426
3767
|
import { Grid as Grid28 } from "@elementor/ui";
|
|
3427
|
-
import { __ as
|
|
3768
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
3428
3769
|
var options10 = [
|
|
3429
3770
|
{
|
|
3430
3771
|
value: "ltr",
|
|
3431
|
-
label:
|
|
3432
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3772
|
+
label: __48("Left to right", "elementor"),
|
|
3773
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
3433
3774
|
showTooltip: true
|
|
3434
3775
|
},
|
|
3435
3776
|
{
|
|
3436
3777
|
value: "rtl",
|
|
3437
|
-
label:
|
|
3438
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3778
|
+
label: __48("Right to left", "elementor"),
|
|
3779
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
3439
3780
|
showTooltip: true
|
|
3440
3781
|
}
|
|
3441
3782
|
];
|
|
3442
3783
|
var TextDirectionField = () => {
|
|
3443
|
-
return /* @__PURE__ */
|
|
3784
|
+
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
3785
|
};
|
|
3445
3786
|
|
|
3446
3787
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3447
|
-
import * as
|
|
3788
|
+
import * as React74 from "react";
|
|
3448
3789
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
3449
|
-
import { __ as
|
|
3790
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
3450
3791
|
var initTextStroke = {
|
|
3451
3792
|
$$type: "stroke",
|
|
3452
3793
|
value: {
|
|
@@ -3464,6 +3805,7 @@ var initTextStroke = {
|
|
|
3464
3805
|
}
|
|
3465
3806
|
};
|
|
3466
3807
|
var TextStrokeField = () => {
|
|
3808
|
+
const { canEdit } = useStyle();
|
|
3467
3809
|
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
3468
3810
|
const addTextStroke = () => {
|
|
3469
3811
|
setTextStroke(initTextStroke);
|
|
@@ -3472,67 +3814,68 @@ var TextStrokeField = () => {
|
|
|
3472
3814
|
setTextStroke(null);
|
|
3473
3815
|
};
|
|
3474
3816
|
const hasTextStroke = Boolean(textStroke);
|
|
3475
|
-
return /* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React74.createElement(
|
|
3476
3818
|
AddOrRemoveContent,
|
|
3477
3819
|
{
|
|
3478
|
-
label:
|
|
3820
|
+
label: __49("Text stroke", "elementor"),
|
|
3479
3821
|
isAdded: hasTextStroke,
|
|
3480
3822
|
onAdd: addTextStroke,
|
|
3481
|
-
onRemove: removeTextStroke
|
|
3823
|
+
onRemove: removeTextStroke,
|
|
3824
|
+
disabled: !canEdit
|
|
3482
3825
|
},
|
|
3483
|
-
/* @__PURE__ */
|
|
3826
|
+
/* @__PURE__ */ React74.createElement(StrokeControl, null)
|
|
3484
3827
|
));
|
|
3485
3828
|
};
|
|
3486
3829
|
|
|
3487
3830
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3488
|
-
import * as
|
|
3831
|
+
import * as React75 from "react";
|
|
3489
3832
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
3490
3833
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
3491
3834
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
3492
|
-
import { __ as
|
|
3835
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
3493
3836
|
var options11 = [
|
|
3494
3837
|
{
|
|
3495
3838
|
value: "none",
|
|
3496
|
-
label:
|
|
3497
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3839
|
+
label: __50("None", "elementor"),
|
|
3840
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(MinusIcon4, { fontSize: size }),
|
|
3498
3841
|
showTooltip: true
|
|
3499
3842
|
},
|
|
3500
3843
|
{
|
|
3501
3844
|
value: "capitalize",
|
|
3502
|
-
label:
|
|
3503
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3845
|
+
label: __50("Capitalize", "elementor"),
|
|
3846
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterCaseIcon, { fontSize: size }),
|
|
3504
3847
|
showTooltip: true
|
|
3505
3848
|
},
|
|
3506
3849
|
{
|
|
3507
3850
|
value: "uppercase",
|
|
3508
|
-
label:
|
|
3509
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3851
|
+
label: __50("Uppercase", "elementor"),
|
|
3852
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
3510
3853
|
showTooltip: true
|
|
3511
3854
|
},
|
|
3512
3855
|
{
|
|
3513
3856
|
value: "lowercase",
|
|
3514
|
-
label:
|
|
3515
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3857
|
+
label: __50("Lowercase", "elementor"),
|
|
3858
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
3516
3859
|
showTooltip: true
|
|
3517
3860
|
}
|
|
3518
3861
|
];
|
|
3519
|
-
var TransformField = () => /* @__PURE__ */
|
|
3862
|
+
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
3863
|
|
|
3521
3864
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3522
|
-
import * as
|
|
3865
|
+
import * as React76 from "react";
|
|
3523
3866
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
3524
3867
|
import { Grid as Grid30 } from "@elementor/ui";
|
|
3525
|
-
import { __ as
|
|
3868
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
3526
3869
|
var WordSpacingField = () => {
|
|
3527
|
-
return /* @__PURE__ */
|
|
3870
|
+
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
3871
|
};
|
|
3529
3872
|
|
|
3530
3873
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3531
3874
|
var TypographySection = () => {
|
|
3532
3875
|
const [columnCount] = useStylesField("column-count");
|
|
3533
|
-
const isVersion330Active =
|
|
3876
|
+
const isVersion330Active = isExperimentActive9("e_v_3_30");
|
|
3534
3877
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
3535
|
-
return /* @__PURE__ */
|
|
3878
|
+
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
3879
|
};
|
|
3537
3880
|
|
|
3538
3881
|
// src/components/style-tab.tsx
|
|
@@ -3548,15 +3891,15 @@ var PanelSection = ({ section }) => {
|
|
|
3548
3891
|
const { component, name, title } = section;
|
|
3549
3892
|
const tabDefaults = useDefaultPanelSettings();
|
|
3550
3893
|
const SectionComponent = component;
|
|
3551
|
-
const isExpanded =
|
|
3552
|
-
return /* @__PURE__ */
|
|
3894
|
+
const isExpanded = isExperimentActive10(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
3895
|
+
return /* @__PURE__ */ React78.createElement(Section, { title, defaultExpanded: isExpanded }, /* @__PURE__ */ React78.createElement(SectionComponent, null));
|
|
3553
3896
|
};
|
|
3554
3897
|
var StyleTab = () => {
|
|
3555
3898
|
const currentClassesProp = useCurrentClassesProp();
|
|
3556
3899
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
3557
3900
|
const [activeStyleState, setActiveStyleState] = useState12(null);
|
|
3558
3901
|
const breakpoint = useActiveBreakpoint();
|
|
3559
|
-
return /* @__PURE__ */
|
|
3902
|
+
return /* @__PURE__ */ React78.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React78.createElement(
|
|
3560
3903
|
StyleProvider,
|
|
3561
3904
|
{
|
|
3562
3905
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -3567,76 +3910,76 @@ var StyleTab = () => {
|
|
|
3567
3910
|
},
|
|
3568
3911
|
setMetaState: setActiveStyleState
|
|
3569
3912
|
},
|
|
3570
|
-
/* @__PURE__ */
|
|
3913
|
+
/* @__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
3914
|
PanelSection,
|
|
3572
3915
|
{
|
|
3573
3916
|
section: {
|
|
3574
3917
|
component: LayoutSection,
|
|
3575
3918
|
name: "Layout",
|
|
3576
|
-
title:
|
|
3919
|
+
title: __52("Layout", "elementor")
|
|
3577
3920
|
}
|
|
3578
3921
|
}
|
|
3579
|
-
), /* @__PURE__ */
|
|
3922
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3580
3923
|
PanelSection,
|
|
3581
3924
|
{
|
|
3582
3925
|
section: {
|
|
3583
3926
|
component: SpacingSection,
|
|
3584
3927
|
name: "Spacing",
|
|
3585
|
-
title:
|
|
3928
|
+
title: __52("Spacing", "elementor")
|
|
3586
3929
|
}
|
|
3587
3930
|
}
|
|
3588
|
-
), /* @__PURE__ */
|
|
3931
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3589
3932
|
PanelSection,
|
|
3590
3933
|
{
|
|
3591
3934
|
section: {
|
|
3592
3935
|
component: SizeSection,
|
|
3593
3936
|
name: "Size",
|
|
3594
|
-
title:
|
|
3937
|
+
title: __52("Size", "elementor")
|
|
3595
3938
|
}
|
|
3596
3939
|
}
|
|
3597
|
-
), /* @__PURE__ */
|
|
3940
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3598
3941
|
PanelSection,
|
|
3599
3942
|
{
|
|
3600
3943
|
section: {
|
|
3601
3944
|
component: PositionSection,
|
|
3602
3945
|
name: "Position",
|
|
3603
|
-
title:
|
|
3946
|
+
title: __52("Position", "elementor")
|
|
3604
3947
|
}
|
|
3605
3948
|
}
|
|
3606
|
-
), /* @__PURE__ */
|
|
3949
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3607
3950
|
PanelSection,
|
|
3608
3951
|
{
|
|
3609
3952
|
section: {
|
|
3610
3953
|
component: TypographySection,
|
|
3611
3954
|
name: "Typography",
|
|
3612
|
-
title:
|
|
3955
|
+
title: __52("Typography", "elementor")
|
|
3613
3956
|
}
|
|
3614
3957
|
}
|
|
3615
|
-
), /* @__PURE__ */
|
|
3958
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3616
3959
|
PanelSection,
|
|
3617
3960
|
{
|
|
3618
3961
|
section: {
|
|
3619
3962
|
component: BackgroundSection,
|
|
3620
3963
|
name: "Background",
|
|
3621
|
-
title:
|
|
3964
|
+
title: __52("Background", "elementor")
|
|
3622
3965
|
}
|
|
3623
3966
|
}
|
|
3624
|
-
), /* @__PURE__ */
|
|
3967
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3625
3968
|
PanelSection,
|
|
3626
3969
|
{
|
|
3627
3970
|
section: {
|
|
3628
3971
|
component: BorderSection,
|
|
3629
3972
|
name: "Border",
|
|
3630
|
-
title:
|
|
3973
|
+
title: __52("Border", "elementor")
|
|
3631
3974
|
}
|
|
3632
3975
|
}
|
|
3633
|
-
), /* @__PURE__ */
|
|
3976
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3634
3977
|
PanelSection,
|
|
3635
3978
|
{
|
|
3636
3979
|
section: {
|
|
3637
3980
|
component: EffectsSection,
|
|
3638
3981
|
name: "Effects",
|
|
3639
|
-
title:
|
|
3982
|
+
title: __52("Effects", "elementor")
|
|
3640
3983
|
}
|
|
3641
3984
|
}
|
|
3642
3985
|
))))
|
|
@@ -3644,7 +3987,7 @@ var StyleTab = () => {
|
|
|
3644
3987
|
};
|
|
3645
3988
|
function ClassesHeader({ children }) {
|
|
3646
3989
|
const scrollDirection = useScrollDirection();
|
|
3647
|
-
return /* @__PURE__ */
|
|
3990
|
+
return /* @__PURE__ */ React78.createElement(Stack17, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3648
3991
|
}
|
|
3649
3992
|
function useCurrentClassesProp() {
|
|
3650
3993
|
const { elementType } = useElement();
|
|
@@ -3663,15 +4006,15 @@ var EditingPanelTabs = () => {
|
|
|
3663
4006
|
return (
|
|
3664
4007
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
3665
4008
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
3666
|
-
/* @__PURE__ */
|
|
4009
|
+
/* @__PURE__ */ React79.createElement(Fragment10, { key: element.id }, /* @__PURE__ */ React79.createElement(PanelTabContent, null))
|
|
3667
4010
|
);
|
|
3668
4011
|
};
|
|
3669
4012
|
var PanelTabContent = () => {
|
|
3670
4013
|
const editorDefaults = useDefaultPanelSettings();
|
|
3671
|
-
const defaultComponentTab =
|
|
4014
|
+
const defaultComponentTab = isExperimentActive11(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
3672
4015
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
3673
4016
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
3674
|
-
return /* @__PURE__ */
|
|
4017
|
+
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
4018
|
Tabs,
|
|
3676
4019
|
{
|
|
3677
4020
|
variant: "fullWidth",
|
|
@@ -3683,9 +4026,9 @@ var PanelTabContent = () => {
|
|
|
3683
4026
|
setCurrentTab(newValue);
|
|
3684
4027
|
}
|
|
3685
4028
|
},
|
|
3686
|
-
/* @__PURE__ */
|
|
3687
|
-
/* @__PURE__ */
|
|
3688
|
-
), /* @__PURE__ */
|
|
4029
|
+
/* @__PURE__ */ React79.createElement(Tab, { label: __53("General", "elementor"), ...getTabProps("settings") }),
|
|
4030
|
+
/* @__PURE__ */ React79.createElement(Tab, { label: __53("Style", "elementor"), ...getTabProps("style") })
|
|
4031
|
+
), /* @__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
4032
|
};
|
|
3690
4033
|
|
|
3691
4034
|
// src/components/editing-panel.tsx
|
|
@@ -3697,8 +4040,8 @@ var EditingPanel = () => {
|
|
|
3697
4040
|
if (!element || !elementType) {
|
|
3698
4041
|
return null;
|
|
3699
4042
|
}
|
|
3700
|
-
const panelTitle =
|
|
3701
|
-
return /* @__PURE__ */
|
|
4043
|
+
const panelTitle = __54("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4044
|
+
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
4045
|
};
|
|
3703
4046
|
|
|
3704
4047
|
// src/panel.ts
|
|
@@ -3711,7 +4054,7 @@ var { panel, usePanelActions, usePanelStatus } = createPanel({
|
|
|
3711
4054
|
import { injectIntoLogic } from "@elementor/editor";
|
|
3712
4055
|
import { PrefetchUserData } from "@elementor/editor-current-user";
|
|
3713
4056
|
import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
3714
|
-
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
4057
|
+
import { blockCommand, isExperimentActive as isExperimentActive12 } from "@elementor/editor-v1-adapters";
|
|
3715
4058
|
|
|
3716
4059
|
// src/hooks/use-open-editor-panel.ts
|
|
3717
4060
|
import { useEffect as useEffect4 } from "react";
|
|
@@ -3747,36 +4090,36 @@ var EditingPanelHooks = () => {
|
|
|
3747
4090
|
};
|
|
3748
4091
|
|
|
3749
4092
|
// src/dynamics/init.ts
|
|
3750
|
-
import { settingsTransformersRegistry, styleTransformersRegistry
|
|
4093
|
+
import { settingsTransformersRegistry, styleTransformersRegistry } from "@elementor/editor-canvas";
|
|
3751
4094
|
|
|
3752
4095
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3753
|
-
import * as
|
|
4096
|
+
import * as React84 from "react";
|
|
3754
4097
|
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
3755
4098
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
3756
4099
|
import {
|
|
3757
4100
|
bindPopover as bindPopover2,
|
|
3758
4101
|
bindTrigger as bindTrigger2,
|
|
3759
|
-
Box as
|
|
4102
|
+
Box as Box8,
|
|
3760
4103
|
Divider as Divider8,
|
|
3761
4104
|
Grid as Grid31,
|
|
3762
|
-
IconButton as
|
|
4105
|
+
IconButton as IconButton5,
|
|
3763
4106
|
Paper,
|
|
3764
4107
|
Popover as Popover2,
|
|
3765
|
-
Stack as
|
|
4108
|
+
Stack as Stack21,
|
|
3766
4109
|
Tab as Tab2,
|
|
3767
4110
|
TabPanel as TabPanel2,
|
|
3768
4111
|
Tabs as Tabs2,
|
|
3769
|
-
Typography as
|
|
4112
|
+
Typography as Typography8,
|
|
3770
4113
|
UnstableTag as Tag,
|
|
3771
4114
|
usePopupState as usePopupState3,
|
|
3772
4115
|
useTabs as useTabs2
|
|
3773
4116
|
} from "@elementor/ui";
|
|
3774
|
-
import { __ as
|
|
4117
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
3775
4118
|
|
|
3776
4119
|
// src/components/popover-content.tsx
|
|
3777
|
-
import * as
|
|
3778
|
-
import { Stack as
|
|
3779
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
4120
|
+
import * as React81 from "react";
|
|
4121
|
+
import { Stack as Stack19 } from "@elementor/ui";
|
|
4122
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React81.createElement(Stack19, { alignItems, gap, p }, children);
|
|
3780
4123
|
|
|
3781
4124
|
// src/hooks/use-persist-dynamic-value.ts
|
|
3782
4125
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -3787,7 +4130,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
3787
4130
|
};
|
|
3788
4131
|
|
|
3789
4132
|
// src/dynamics/dynamic-control.tsx
|
|
3790
|
-
import * as
|
|
4133
|
+
import * as React82 from "react";
|
|
3791
4134
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
3792
4135
|
|
|
3793
4136
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -3889,28 +4232,28 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3889
4232
|
});
|
|
3890
4233
|
};
|
|
3891
4234
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3892
|
-
return /* @__PURE__ */
|
|
4235
|
+
return /* @__PURE__ */ React82.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React82.createElement(PropKeyProvider3, { bind }, children));
|
|
3893
4236
|
};
|
|
3894
4237
|
|
|
3895
4238
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3896
|
-
import * as
|
|
3897
|
-
import { Fragment as
|
|
4239
|
+
import * as React83 from "react";
|
|
4240
|
+
import { Fragment as Fragment11, useState as useState13 } from "react";
|
|
3898
4241
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
3899
4242
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
3900
4243
|
import {
|
|
3901
|
-
Box as
|
|
4244
|
+
Box as Box7,
|
|
3902
4245
|
Divider as Divider7,
|
|
3903
4246
|
InputAdornment,
|
|
3904
4247
|
Link as Link2,
|
|
3905
4248
|
MenuItem,
|
|
3906
4249
|
MenuList,
|
|
3907
4250
|
MenuSubheader as MenuSubheader2,
|
|
3908
|
-
Stack as
|
|
4251
|
+
Stack as Stack20,
|
|
3909
4252
|
TextField as TextField2,
|
|
3910
|
-
Typography as
|
|
4253
|
+
Typography as Typography7
|
|
3911
4254
|
} from "@elementor/ui";
|
|
3912
|
-
import { __ as
|
|
3913
|
-
var
|
|
4255
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
4256
|
+
var SIZE7 = "tiny";
|
|
3914
4257
|
var DynamicSelection = ({ onSelect }) => {
|
|
3915
4258
|
const [searchValue, setSearchValue] = useState13("");
|
|
3916
4259
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
@@ -3930,19 +4273,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3930
4273
|
setValue({ name: value, settings: { label } });
|
|
3931
4274
|
onSelect?.();
|
|
3932
4275
|
};
|
|
3933
|
-
return /* @__PURE__ */
|
|
4276
|
+
return /* @__PURE__ */ React83.createElement(Stack20, null, hasNoDynamicTags ? /* @__PURE__ */ React83.createElement(NoDynamicTags, null) : /* @__PURE__ */ React83.createElement(Fragment11, null, /* @__PURE__ */ React83.createElement(Box7, { px: 1.5, pb: 1 }, /* @__PURE__ */ React83.createElement(
|
|
3934
4277
|
TextField2,
|
|
3935
4278
|
{
|
|
3936
4279
|
fullWidth: true,
|
|
3937
|
-
size:
|
|
4280
|
+
size: SIZE7,
|
|
3938
4281
|
value: searchValue,
|
|
3939
4282
|
onChange: handleSearch,
|
|
3940
|
-
placeholder:
|
|
4283
|
+
placeholder: __55("Search dynamic tags\u2026", "elementor"),
|
|
3941
4284
|
InputProps: {
|
|
3942
|
-
startAdornment: /* @__PURE__ */
|
|
4285
|
+
startAdornment: /* @__PURE__ */ React83.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React83.createElement(SearchIcon, { fontSize: SIZE7 }))
|
|
3943
4286
|
}
|
|
3944
4287
|
}
|
|
3945
|
-
)), /* @__PURE__ */
|
|
4288
|
+
)), /* @__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(Fragment11, { key: index }, /* @__PURE__ */ React83.createElement(
|
|
3946
4289
|
MenuSubheader2,
|
|
3947
4290
|
{
|
|
3948
4291
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -3950,7 +4293,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3950
4293
|
dynamicGroups?.[category]?.title || category
|
|
3951
4294
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3952
4295
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3953
|
-
return /* @__PURE__ */
|
|
4296
|
+
return /* @__PURE__ */ React83.createElement(
|
|
3954
4297
|
MenuItem,
|
|
3955
4298
|
{
|
|
3956
4299
|
key: value,
|
|
@@ -3961,10 +4304,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3961
4304
|
},
|
|
3962
4305
|
tagLabel
|
|
3963
4306
|
);
|
|
3964
|
-
})))) : /* @__PURE__ */
|
|
4307
|
+
})))) : /* @__PURE__ */ React83.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3965
4308
|
};
|
|
3966
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3967
|
-
|
|
4309
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React83.createElement(
|
|
4310
|
+
Stack20,
|
|
3968
4311
|
{
|
|
3969
4312
|
gap: 1,
|
|
3970
4313
|
alignItems: "center",
|
|
@@ -3974,12 +4317,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React78.createElem
|
|
|
3974
4317
|
color: "text.secondary",
|
|
3975
4318
|
sx: { pb: 3.5 }
|
|
3976
4319
|
},
|
|
3977
|
-
/* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */
|
|
3979
|
-
/* @__PURE__ */
|
|
4320
|
+
/* @__PURE__ */ React83.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
4321
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "subtitle2" }, __55("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React83.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4322
|
+
/* @__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
4323
|
);
|
|
3981
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3982
|
-
|
|
4324
|
+
var NoDynamicTags = () => /* @__PURE__ */ React83.createElement(Box7, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React83.createElement(Divider7, null), /* @__PURE__ */ React83.createElement(
|
|
4325
|
+
Stack20,
|
|
3983
4326
|
{
|
|
3984
4327
|
gap: 1,
|
|
3985
4328
|
alignItems: "center",
|
|
@@ -3989,9 +4332,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React78.createElement(Box5, { sx: { ov
|
|
|
3989
4332
|
color: "text.secondary",
|
|
3990
4333
|
sx: { pb: 3.5 }
|
|
3991
4334
|
},
|
|
3992
|
-
/* @__PURE__ */
|
|
3993
|
-
/* @__PURE__ */
|
|
3994
|
-
/* @__PURE__ */
|
|
4335
|
+
/* @__PURE__ */ React83.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
4336
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "subtitle2" }, __55("Streamline your workflow with dynamic tags", "elementor")),
|
|
4337
|
+
/* @__PURE__ */ React83.createElement(Typography7, { align: "center", variant: "caption" }, __55("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3995
4338
|
));
|
|
3996
4339
|
var useFilteredOptions = (searchValue) => {
|
|
3997
4340
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4010,7 +4353,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4010
4353
|
};
|
|
4011
4354
|
|
|
4012
4355
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4013
|
-
var
|
|
4356
|
+
var SIZE8 = "tiny";
|
|
4014
4357
|
var DynamicSelectionControl = () => {
|
|
4015
4358
|
const { setValue: setAnyValue } = useBoundProp5();
|
|
4016
4359
|
const { bind, value } = useBoundProp5(dynamicPropTypeUtil);
|
|
@@ -4024,25 +4367,25 @@ var DynamicSelectionControl = () => {
|
|
|
4024
4367
|
if (!dynamicTag) {
|
|
4025
4368
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4026
4369
|
}
|
|
4027
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ React84.createElement(Box8, null, /* @__PURE__ */ React84.createElement(
|
|
4028
4371
|
Tag,
|
|
4029
4372
|
{
|
|
4030
4373
|
fullWidth: true,
|
|
4031
4374
|
showActionsOnHover: true,
|
|
4032
4375
|
label: dynamicTag.label,
|
|
4033
|
-
startIcon: /* @__PURE__ */
|
|
4376
|
+
startIcon: /* @__PURE__ */ React84.createElement(DatabaseIcon2, { fontSize: SIZE8 }),
|
|
4034
4377
|
...bindTrigger2(selectionPopoverState),
|
|
4035
|
-
actions: /* @__PURE__ */
|
|
4036
|
-
|
|
4378
|
+
actions: /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React84.createElement(
|
|
4379
|
+
IconButton5,
|
|
4037
4380
|
{
|
|
4038
|
-
size:
|
|
4381
|
+
size: SIZE8,
|
|
4039
4382
|
onClick: removeDynamicTag,
|
|
4040
|
-
"aria-label":
|
|
4383
|
+
"aria-label": __56("Remove dynamic value", "elementor")
|
|
4041
4384
|
},
|
|
4042
|
-
/* @__PURE__ */
|
|
4385
|
+
/* @__PURE__ */ React84.createElement(XIcon2, { fontSize: SIZE8 })
|
|
4043
4386
|
))
|
|
4044
4387
|
}
|
|
4045
|
-
), /* @__PURE__ */
|
|
4388
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4046
4389
|
Popover2,
|
|
4047
4390
|
{
|
|
4048
4391
|
disablePortal: true,
|
|
@@ -4050,7 +4393,7 @@ var DynamicSelectionControl = () => {
|
|
|
4050
4393
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4051
4394
|
...bindPopover2(selectionPopoverState)
|
|
4052
4395
|
},
|
|
4053
|
-
/* @__PURE__ */
|
|
4396
|
+
/* @__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
4397
|
));
|
|
4055
4398
|
};
|
|
4056
4399
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -4059,7 +4402,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4059
4402
|
if (!hasDynamicSettings) {
|
|
4060
4403
|
return null;
|
|
4061
4404
|
}
|
|
4062
|
-
return /* @__PURE__ */
|
|
4405
|
+
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
4406
|
Popover2,
|
|
4064
4407
|
{
|
|
4065
4408
|
disablePortal: true,
|
|
@@ -4067,7 +4410,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4067
4410
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4068
4411
|
...bindPopover2(popupState)
|
|
4069
4412
|
},
|
|
4070
|
-
/* @__PURE__ */
|
|
4413
|
+
/* @__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
4414
|
));
|
|
4072
4415
|
};
|
|
4073
4416
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -4076,10 +4419,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
4076
4419
|
if (!tabs.length) {
|
|
4077
4420
|
return null;
|
|
4078
4421
|
}
|
|
4079
|
-
return /* @__PURE__ */
|
|
4080
|
-
return /* @__PURE__ */
|
|
4422
|
+
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) => {
|
|
4423
|
+
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
4424
|
if (item.type === "control") {
|
|
4082
|
-
return /* @__PURE__ */
|
|
4425
|
+
return /* @__PURE__ */ React84.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4083
4426
|
}
|
|
4084
4427
|
return null;
|
|
4085
4428
|
})));
|
|
@@ -4089,7 +4432,7 @@ var Control3 = ({ control }) => {
|
|
|
4089
4432
|
if (!getControl(control.type)) {
|
|
4090
4433
|
return null;
|
|
4091
4434
|
}
|
|
4092
|
-
return /* @__PURE__ */
|
|
4435
|
+
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
4436
|
};
|
|
4094
4437
|
|
|
4095
4438
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -4142,18 +4485,18 @@ function getDynamicValue(name, settings) {
|
|
|
4142
4485
|
}
|
|
4143
4486
|
|
|
4144
4487
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4145
|
-
import * as
|
|
4488
|
+
import * as React85 from "react";
|
|
4146
4489
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4147
4490
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
4148
|
-
import { __ as
|
|
4491
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
4149
4492
|
var usePropDynamicAction = () => {
|
|
4150
4493
|
const { propType } = useBoundProp6();
|
|
4151
4494
|
const visible = !!propType && supportsDynamic(propType);
|
|
4152
4495
|
return {
|
|
4153
4496
|
visible,
|
|
4154
4497
|
icon: DatabaseIcon3,
|
|
4155
|
-
title:
|
|
4156
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
4498
|
+
title: __57("Dynamic tags", "elementor"),
|
|
4499
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React85.createElement(DynamicSelection, { onSelect: closePopover })
|
|
4157
4500
|
};
|
|
4158
4501
|
};
|
|
4159
4502
|
|
|
@@ -4168,12 +4511,170 @@ var init = () => {
|
|
|
4168
4511
|
id: "dynamic-tags",
|
|
4169
4512
|
useProps: usePropDynamicAction
|
|
4170
4513
|
});
|
|
4171
|
-
|
|
4514
|
+
styleTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
4172
4515
|
settingsTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
4173
4516
|
};
|
|
4174
4517
|
|
|
4518
|
+
// src/reset-style-props.tsx
|
|
4519
|
+
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
4520
|
+
import { BrushBigIcon } from "@elementor/icons";
|
|
4521
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
4522
|
+
var { registerAction } = controlActionsMenu;
|
|
4523
|
+
function initResetStyleProps() {
|
|
4524
|
+
registerAction({
|
|
4525
|
+
id: "reset-style-value",
|
|
4526
|
+
useProps: useResetStyleValueProps
|
|
4527
|
+
});
|
|
4528
|
+
}
|
|
4529
|
+
var EXCLUDED_BINDS = ["order", "flex-grow", "flex-shrink", "flex-basis"];
|
|
4530
|
+
function useResetStyleValueProps() {
|
|
4531
|
+
const isStyle = useIsStyle();
|
|
4532
|
+
const { value, setValue, path, bind } = useBoundProp7();
|
|
4533
|
+
return {
|
|
4534
|
+
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4535
|
+
title: __58("Clear", "elementor"),
|
|
4536
|
+
icon: BrushBigIcon,
|
|
4537
|
+
onClick: () => setValue(null)
|
|
4538
|
+
};
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
4542
|
+
import { createTransformer as createTransformer6, styleTransformersRegistry as styleTransformersRegistry2 } from "@elementor/editor-canvas";
|
|
4543
|
+
|
|
4544
|
+
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4545
|
+
import * as React86 from "react";
|
|
4546
|
+
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
4547
|
+
import { Stack as Stack22, styled as styled6, UnstableColorIndicator } from "@elementor/ui";
|
|
4548
|
+
var backgroundColorOverlayTransformer = createTransformer2((value) => /* @__PURE__ */ React86.createElement(Stack22, { direction: "row", gap: 10 }, /* @__PURE__ */ React86.createElement(ItemIconColor, { value }), /* @__PURE__ */ React86.createElement(ItemLabelColor, { value })));
|
|
4549
|
+
var ItemIconColor = ({ value }) => {
|
|
4550
|
+
const { color } = value;
|
|
4551
|
+
return /* @__PURE__ */ React86.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4552
|
+
};
|
|
4553
|
+
var ItemLabelColor = ({ value: { color } }) => {
|
|
4554
|
+
return /* @__PURE__ */ React86.createElement("span", null, color);
|
|
4555
|
+
};
|
|
4556
|
+
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) => ({
|
|
4557
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4558
|
+
}));
|
|
4559
|
+
|
|
4560
|
+
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4561
|
+
import * as React87 from "react";
|
|
4562
|
+
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
4563
|
+
import { Stack as Stack23 } from "@elementor/ui";
|
|
4564
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
4565
|
+
var backgroundGradientOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React87.createElement(Stack23, { direction: "row", gap: 10 }, /* @__PURE__ */ React87.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React87.createElement(ItemLabelGradient, { value })));
|
|
4566
|
+
var ItemIconGradient = ({ value }) => {
|
|
4567
|
+
const gradient = getGradientValue(value);
|
|
4568
|
+
return /* @__PURE__ */ React87.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4569
|
+
};
|
|
4570
|
+
var ItemLabelGradient = ({ value }) => {
|
|
4571
|
+
if (value.type === "linear") {
|
|
4572
|
+
return /* @__PURE__ */ React87.createElement("span", null, __59("Linear Gradient", "elementor"));
|
|
4573
|
+
}
|
|
4574
|
+
return /* @__PURE__ */ React87.createElement("span", null, __59("Radial Gradient", "elementor"));
|
|
4575
|
+
};
|
|
4576
|
+
var getGradientValue = (gradient) => {
|
|
4577
|
+
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
4578
|
+
if (gradient.type === "linear") {
|
|
4579
|
+
return `linear-gradient(${gradient.angle}deg, ${stops})`;
|
|
4580
|
+
}
|
|
4581
|
+
return `radial-gradient(circle at ${gradient.positions}, ${stops})`;
|
|
4582
|
+
};
|
|
4583
|
+
|
|
4584
|
+
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4585
|
+
import * as React88 from "react";
|
|
4586
|
+
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
4587
|
+
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
4588
|
+
import { CardMedia, Stack as Stack24 } from "@elementor/ui";
|
|
4589
|
+
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
4590
|
+
var backgroundImageOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React88.createElement(Stack24, { direction: "row", gap: 10 }, /* @__PURE__ */ React88.createElement(ItemIconImage, { value }), /* @__PURE__ */ React88.createElement(ItemLabelImage, { value })));
|
|
4591
|
+
var ItemIconImage = ({ value }) => {
|
|
4592
|
+
const { imageUrl } = useImage(value);
|
|
4593
|
+
return /* @__PURE__ */ React88.createElement(
|
|
4594
|
+
CardMedia,
|
|
4595
|
+
{
|
|
4596
|
+
image: imageUrl,
|
|
4597
|
+
sx: (theme) => ({
|
|
4598
|
+
height: "1em",
|
|
4599
|
+
width: "1em",
|
|
4600
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
4601
|
+
outline: `1px solid ${theme.palette.action.disabled}`
|
|
4602
|
+
})
|
|
4603
|
+
}
|
|
4604
|
+
);
|
|
4605
|
+
};
|
|
4606
|
+
var ItemLabelImage = ({ value }) => {
|
|
4607
|
+
const { imageTitle } = useImage(value);
|
|
4608
|
+
return /* @__PURE__ */ React88.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React88.createElement("span", null, imageTitle));
|
|
4609
|
+
};
|
|
4610
|
+
var useImage = (image) => {
|
|
4611
|
+
let imageTitle, imageUrl = null;
|
|
4612
|
+
const imageSrc = image?.image.src;
|
|
4613
|
+
const { data: attachment } = useWpMediaAttachment(imageSrc.id || null);
|
|
4614
|
+
if (imageSrc.id) {
|
|
4615
|
+
const imageFileTypeExtension = getFileExtensionFromFilename(attachment?.filename);
|
|
4616
|
+
imageTitle = `${attachment?.title}${imageFileTypeExtension}` || null;
|
|
4617
|
+
imageUrl = attachment?.url || null;
|
|
4618
|
+
} else if (imageSrc.url) {
|
|
4619
|
+
imageUrl = imageSrc.url;
|
|
4620
|
+
imageTitle = imageUrl?.substring(imageUrl.lastIndexOf("/") + 1) || null;
|
|
4621
|
+
}
|
|
4622
|
+
return { imageTitle, imageUrl };
|
|
4623
|
+
};
|
|
4624
|
+
var getFileExtensionFromFilename = (filename) => {
|
|
4625
|
+
if (!filename) {
|
|
4626
|
+
return "";
|
|
4627
|
+
}
|
|
4628
|
+
const extension = filename.substring(filename.lastIndexOf(".") + 1);
|
|
4629
|
+
return `.${extension}`;
|
|
4630
|
+
};
|
|
4631
|
+
|
|
4632
|
+
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4633
|
+
import * as React89 from "react";
|
|
4634
|
+
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
4635
|
+
import { Stack as Stack25 } from "@elementor/ui";
|
|
4636
|
+
var backgroundOverlayTransformer = createTransformer5((values) => {
|
|
4637
|
+
if (!values || values.length === 0) {
|
|
4638
|
+
return null;
|
|
4639
|
+
}
|
|
4640
|
+
return /* @__PURE__ */ React89.createElement(Stack25, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React89.createElement(Stack25, { key: index }, item)));
|
|
4641
|
+
});
|
|
4642
|
+
|
|
4643
|
+
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
4644
|
+
function initStylesInheritanceTransformers() {
|
|
4645
|
+
const originalStyleTransformers = styleTransformersRegistry2.all();
|
|
4646
|
+
Object.entries(originalStyleTransformers).forEach(([propType, transformer]) => {
|
|
4647
|
+
if (excludePropTypeTransformers.has(propType)) {
|
|
4648
|
+
return;
|
|
4649
|
+
}
|
|
4650
|
+
stylesInheritanceTransformersRegistry.register(propType, transformer);
|
|
4651
|
+
});
|
|
4652
|
+
stylesInheritanceTransformersRegistry.registerFallback(
|
|
4653
|
+
createTransformer6((value) => {
|
|
4654
|
+
return value;
|
|
4655
|
+
})
|
|
4656
|
+
);
|
|
4657
|
+
registerCustomTransformers();
|
|
4658
|
+
}
|
|
4659
|
+
function registerCustomTransformers() {
|
|
4660
|
+
stylesInheritanceTransformersRegistry.register("background-color-overlay", backgroundColorOverlayTransformer);
|
|
4661
|
+
stylesInheritanceTransformersRegistry.register(
|
|
4662
|
+
"background-gradient-overlay",
|
|
4663
|
+
backgroundGradientOverlayTransformer
|
|
4664
|
+
);
|
|
4665
|
+
stylesInheritanceTransformersRegistry.register("background-image-overlay", backgroundImageOverlayTransformer);
|
|
4666
|
+
stylesInheritanceTransformersRegistry.register("background-overlay", backgroundOverlayTransformer);
|
|
4667
|
+
}
|
|
4668
|
+
|
|
4669
|
+
// src/styles-inheritance/init.ts
|
|
4670
|
+
var init2 = () => {
|
|
4671
|
+
if (isUsingIndicatorPopover()) {
|
|
4672
|
+
initStylesInheritanceTransformers();
|
|
4673
|
+
}
|
|
4674
|
+
};
|
|
4675
|
+
|
|
4175
4676
|
// src/init.ts
|
|
4176
|
-
function
|
|
4677
|
+
function init3() {
|
|
4177
4678
|
registerPanel(panel);
|
|
4178
4679
|
blockV1Panel();
|
|
4179
4680
|
injectIntoLogic({
|
|
@@ -4185,6 +4686,10 @@ function init2() {
|
|
|
4185
4686
|
component: PrefetchUserData
|
|
4186
4687
|
});
|
|
4187
4688
|
init();
|
|
4689
|
+
init2();
|
|
4690
|
+
if (isExperimentActive12(EXPERIMENTAL_FEATURES.V_3_30)) {
|
|
4691
|
+
initResetStyleProps();
|
|
4692
|
+
}
|
|
4188
4693
|
}
|
|
4189
4694
|
var blockV1Panel = () => {
|
|
4190
4695
|
blockCommand({
|
|
@@ -4194,10 +4699,10 @@ var blockV1Panel = () => {
|
|
|
4194
4699
|
};
|
|
4195
4700
|
export {
|
|
4196
4701
|
controlActionsMenu,
|
|
4197
|
-
|
|
4702
|
+
init3 as init,
|
|
4198
4703
|
injectIntoClassSelectorActions,
|
|
4199
4704
|
registerControlReplacement,
|
|
4200
|
-
|
|
4705
|
+
useBoundProp8 as useBoundProp,
|
|
4201
4706
|
usePanelActions,
|
|
4202
4707
|
usePanelStatus
|
|
4203
4708
|
};
|