@elementor/editor-editing-panel 1.44.0 → 1.46.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 +62 -0
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +867 -765
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +740 -636
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -13
- package/src/components/css-classes/css-class-menu.tsx +6 -8
- package/src/components/css-classes/css-class-selector.tsx +17 -11
- package/src/components/settings-tab.tsx +25 -2
- package/src/components/style-indicator.tsx +19 -15
- package/src/components/style-sections/border-section/border-field.tsx +4 -6
- package/src/components/style-sections/border-section/border-radius-field.tsx +12 -9
- package/src/components/style-sections/effects-section/effects-section.tsx +6 -0
- package/src/components/style-sections/layout-section/align-content-field.tsx +10 -14
- package/src/components/style-sections/layout-section/align-items-field.tsx +13 -17
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +13 -17
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +13 -17
- package/src/components/style-sections/layout-section/flex-order-field.tsx +31 -36
- package/src/components/style-sections/layout-section/flex-size-field.tsx +67 -69
- package/src/components/style-sections/layout-section/justify-content-field.tsx +10 -14
- package/src/components/style-sections/layout-section/layout-section.tsx +2 -2
- package/src/components/style-sections/layout-section/opacity-control-field.tsx +25 -0
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +1 -1
- package/src/components/style-sections/layout-section/wrap-field.tsx +13 -17
- package/src/components/style-sections/position-section/dimensions-field.tsx +39 -21
- package/src/components/style-sections/position-section/offset-field.tsx +5 -2
- package/src/components/style-sections/position-section/position-section.tsx +6 -6
- package/src/components/style-sections/size-section/object-position-field.tsx +2 -24
- package/src/components/style-sections/size-section/size-section.tsx +52 -37
- package/src/components/style-sections/spacing-section/spacing-section.tsx +1 -1
- package/src/components/style-sections/typography-section/column-gap-field.tsx +5 -2
- package/src/components/style-sections/typography-section/font-size-field.tsx +5 -2
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +5 -2
- package/src/components/style-sections/typography-section/line-height-field.tsx +5 -2
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +12 -9
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +4 -6
- package/src/components/style-sections/typography-section/typography-section.tsx +4 -2
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +5 -2
- package/src/controls-registry/controls-registry.tsx +30 -10
- package/src/controls-registry/styles-field.tsx +1 -3
- package/src/dynamics/components/background-control-dynamic-tag.tsx +48 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +10 -18
- package/src/dynamics/components/dynamic-selection.tsx +58 -77
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +1 -1
- package/src/dynamics/init.ts +21 -0
- package/src/hooks/use-styles-field.ts +9 -3
- package/src/hooks/use-styles-fields.ts +4 -4
- package/src/index.ts +1 -0
- package/src/popover-action.tsx +3 -5
- package/src/provider-colors-registry.ts +20 -0
- package/src/styles-inheritance/components/infotip/label-chip.tsx +4 -5
- package/src/styles-inheritance/components/styles-inheritance-indicator.tsx +32 -40
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +1 -5
- package/src/styles-inheritance/components/styles-inheritance-section-indicators.tsx +29 -44
- package/src/styles-inheritance/components/ui-providers.tsx +18 -0
- package/src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx +1 -17
- package/src/styles-inheritance/types.ts +0 -2
- package/src/styles-inheritance/utils.ts +17 -1
- package/src/utils/get-styles-provider-color.ts +28 -0
package/dist/index.js
CHANGED
|
@@ -34,23 +34,35 @@ __export(index_exports, {
|
|
|
34
34
|
init: () => init3,
|
|
35
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
36
36
|
registerControlReplacement: () => registerControlReplacement,
|
|
37
|
-
|
|
37
|
+
registerStyleProviderToColors: () => registerStyleProviderToColors,
|
|
38
|
+
useBoundProp: () => import_editor_controls60.useBoundProp,
|
|
38
39
|
useFontFamilies: () => useFontFamilies,
|
|
39
40
|
usePanelActions: () => usePanelActions,
|
|
40
41
|
usePanelStatus: () => usePanelStatus
|
|
41
42
|
});
|
|
42
43
|
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
var
|
|
44
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
44
45
|
|
|
45
46
|
// src/control-replacement.tsx
|
|
46
47
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
47
48
|
var { registerControlReplacement, getControlReplacements } = (0, import_editor_controls.createControlReplacementsRegistry)();
|
|
48
49
|
|
|
50
|
+
// src/provider-colors-registry.ts
|
|
51
|
+
var DEFAULT_COLORS = {
|
|
52
|
+
name: "default",
|
|
53
|
+
getThemeColor: null
|
|
54
|
+
};
|
|
55
|
+
var providerColorsRegistry = /* @__PURE__ */ new Map();
|
|
56
|
+
var registerStyleProviderToColors = (provider, colors) => {
|
|
57
|
+
providerColorsRegistry.set(provider, colors);
|
|
58
|
+
};
|
|
59
|
+
var getStyleProviderColors = (provider) => providerColorsRegistry.get(provider) ?? DEFAULT_COLORS;
|
|
60
|
+
|
|
49
61
|
// src/components/css-classes/css-class-selector.tsx
|
|
50
62
|
var React8 = __toESM(require("react"));
|
|
51
63
|
var import_react10 = require("react");
|
|
52
64
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
53
|
-
var
|
|
65
|
+
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
54
66
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
55
67
|
var import_icons2 = require("@elementor/icons");
|
|
56
68
|
var import_locations = require("@elementor/locations");
|
|
@@ -139,6 +151,27 @@ function useIsStyle() {
|
|
|
139
151
|
return !!(0, import_react3.useContext)(Context3);
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
// src/utils/get-styles-provider-color.ts
|
|
155
|
+
var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
|
|
156
|
+
var getStylesProviderColorName = (provider) => {
|
|
157
|
+
if (!provider || provider === import_editor_styles_repository2.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
158
|
+
return "default";
|
|
159
|
+
}
|
|
160
|
+
if ((0, import_editor_styles_repository2.isElementsStylesProvider)(provider)) {
|
|
161
|
+
return "accent";
|
|
162
|
+
}
|
|
163
|
+
return getStyleProviderColors(provider).name;
|
|
164
|
+
};
|
|
165
|
+
var getStylesProviderThemeColor = (provider) => {
|
|
166
|
+
if (!provider || provider === import_editor_styles_repository2.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
if ((0, import_editor_styles_repository2.isElementsStylesProvider)(provider)) {
|
|
170
|
+
return (theme) => theme.palette.accent.main;
|
|
171
|
+
}
|
|
172
|
+
return getStyleProviderColors(provider).getThemeColor;
|
|
173
|
+
};
|
|
174
|
+
|
|
142
175
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
143
176
|
var React4 = __toESM(require("react"));
|
|
144
177
|
var import_react6 = require("react");
|
|
@@ -468,7 +501,7 @@ var StyledGroupItems = (0, import_ui2.styled)("ul")`
|
|
|
468
501
|
// src/components/css-classes/css-class-item.tsx
|
|
469
502
|
var React7 = __toESM(require("react"));
|
|
470
503
|
var import_react9 = require("react");
|
|
471
|
-
var
|
|
504
|
+
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
472
505
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
473
506
|
var import_icons = require("@elementor/icons");
|
|
474
507
|
var import_ui5 = require("@elementor/ui");
|
|
@@ -491,7 +524,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
491
524
|
|
|
492
525
|
// src/components/css-classes/css-class-menu.tsx
|
|
493
526
|
var React6 = __toESM(require("react"));
|
|
494
|
-
var
|
|
527
|
+
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
495
528
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
496
529
|
var import_ui4 = require("@elementor/ui");
|
|
497
530
|
var import_i18n2 = require("@wordpress/i18n");
|
|
@@ -499,22 +532,17 @@ var import_i18n2 = require("@wordpress/i18n");
|
|
|
499
532
|
// src/components/style-indicator.tsx
|
|
500
533
|
var import_ui3 = require("@elementor/ui");
|
|
501
534
|
var StyleIndicator = (0, import_ui3.styled)("div", {
|
|
502
|
-
shouldForwardProp: (prop) =>
|
|
535
|
+
shouldForwardProp: (prop) => !["isOverridden", "getColor"].includes(prop)
|
|
503
536
|
})`
|
|
504
537
|
width: 5px;
|
|
505
538
|
height: 5px;
|
|
506
539
|
border-radius: 50%;
|
|
507
|
-
background-color: ${({ theme,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
return theme.palette.warning.light;
|
|
511
|
-
case "global":
|
|
512
|
-
return theme.palette.global.dark;
|
|
513
|
-
case "local":
|
|
514
|
-
return theme.palette.accent.main;
|
|
515
|
-
default:
|
|
516
|
-
return theme.palette.text.disabled;
|
|
540
|
+
background-color: ${({ theme, isOverridden, getColor }) => {
|
|
541
|
+
if (isOverridden) {
|
|
542
|
+
return theme.palette.warning.light;
|
|
517
543
|
}
|
|
544
|
+
const providerColor = getColor?.(theme);
|
|
545
|
+
return providerColor ?? theme.palette.text.disabled;
|
|
518
546
|
}};
|
|
519
547
|
`;
|
|
520
548
|
|
|
@@ -523,7 +551,7 @@ var import_react8 = require("react");
|
|
|
523
551
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
524
552
|
var import_editor_elements = require("@elementor/editor-elements");
|
|
525
553
|
var import_editor_props = require("@elementor/editor-props");
|
|
526
|
-
var
|
|
554
|
+
var import_editor_styles_repository3 = require("@elementor/editor-styles-repository");
|
|
527
555
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
528
556
|
var import_i18n = require("@wordpress/i18n");
|
|
529
557
|
|
|
@@ -606,7 +634,7 @@ function useUnapplyClass() {
|
|
|
606
634
|
function useCreateAndApplyClass() {
|
|
607
635
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
608
636
|
const isVersion330Active = (0, import_editor_v1_adapters.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
609
|
-
const [provider, createAction] = (0,
|
|
637
|
+
const [provider, createAction] = (0, import_editor_styles_repository3.useGetStylesRepositoryCreateAction)() ?? [null, null];
|
|
610
638
|
const deleteAction = provider?.actions.delete;
|
|
611
639
|
const applyClass = useApply();
|
|
612
640
|
const unapplyClass = useUnapply();
|
|
@@ -749,7 +777,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
749
777
|
}
|
|
750
778
|
function useModifiedStates(styleId) {
|
|
751
779
|
const { meta } = useStyle();
|
|
752
|
-
const styleDef =
|
|
780
|
+
const styleDef = import_editor_styles_repository4.stylesRepository.all().find((style) => style.id === styleId);
|
|
753
781
|
return Object.fromEntries(
|
|
754
782
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
755
783
|
);
|
|
@@ -762,7 +790,7 @@ function getMenuItemsByProvider({
|
|
|
762
790
|
if (!provider) {
|
|
763
791
|
return [];
|
|
764
792
|
}
|
|
765
|
-
const providerInstance =
|
|
793
|
+
const providerInstance = import_editor_styles_repository4.stylesRepository.getProviderByKey(provider);
|
|
766
794
|
const providerActions = providerInstance?.actions;
|
|
767
795
|
const canUpdate = providerActions?.update;
|
|
768
796
|
const canUnapply = !fixed;
|
|
@@ -789,10 +817,9 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
789
817
|
const { id: styleId, provider } = useCssClass();
|
|
790
818
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
791
819
|
const { state: activeState } = meta;
|
|
792
|
-
const { userCan } = (0,
|
|
820
|
+
const { userCan } = (0, import_editor_styles_repository4.useUserStylesCapability)();
|
|
793
821
|
const modifiedStates = useModifiedStates(styleId);
|
|
794
822
|
const isUpdateAllowed = !state || userCan(provider ?? "").updateProps;
|
|
795
|
-
const indicatorVariant = !provider || (0, import_editor_styles_repository3.isElementsStylesProvider)(provider) ? "local" : "global";
|
|
796
823
|
const isStyled = modifiedStates[state ?? "normal"] ?? false;
|
|
797
824
|
const disabled = !isUpdateAllowed && !isStyled;
|
|
798
825
|
const isActive = styleId === activeId;
|
|
@@ -818,7 +845,13 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
818
845
|
showInfoTip: disabled,
|
|
819
846
|
content: (0, import_i18n2.__)("With your current role, you can only use existing states.", "elementor")
|
|
820
847
|
},
|
|
821
|
-
/* @__PURE__ */ React6.createElement(import_ui4.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React6.createElement(
|
|
848
|
+
/* @__PURE__ */ React6.createElement(import_ui4.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React6.createElement(
|
|
849
|
+
StyleIndicator,
|
|
850
|
+
{
|
|
851
|
+
"aria-label": (0, import_i18n2.__)("Has style", "elementor"),
|
|
852
|
+
getColor: getStylesProviderThemeColor(provider ?? "")
|
|
853
|
+
}
|
|
854
|
+
), state ?? "normal")
|
|
822
855
|
)
|
|
823
856
|
);
|
|
824
857
|
}
|
|
@@ -839,7 +872,7 @@ function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
|
839
872
|
}
|
|
840
873
|
function RenameClassMenuItem({ closeMenu }) {
|
|
841
874
|
const { handleRename, provider } = useCssClass();
|
|
842
|
-
const { userCan } = (0,
|
|
875
|
+
const { userCan } = (0, import_editor_styles_repository4.useUserStylesCapability)();
|
|
843
876
|
if (!provider) {
|
|
844
877
|
return null;
|
|
845
878
|
}
|
|
@@ -876,7 +909,7 @@ function CssClassItem(props) {
|
|
|
876
909
|
const popupState = (0, import_ui5.usePopupState)({ variant: "popover" });
|
|
877
910
|
const [chipRef, setChipRef] = (0, import_react9.useState)(null);
|
|
878
911
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
879
|
-
const { userCan } = (0,
|
|
912
|
+
const { userCan } = (0, import_editor_styles_repository5.useUserStylesCapability)();
|
|
880
913
|
const {
|
|
881
914
|
ref,
|
|
882
915
|
isEditing,
|
|
@@ -890,7 +923,7 @@ function CssClassItem(props) {
|
|
|
890
923
|
onError: setError
|
|
891
924
|
});
|
|
892
925
|
const color = error ? "error" : colorProp;
|
|
893
|
-
const providerActions = provider ?
|
|
926
|
+
const providerActions = provider ? import_editor_styles_repository5.stylesRepository.getProviderByKey(provider)?.actions : null;
|
|
894
927
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
895
928
|
const isShowingState = isActive && meta.state;
|
|
896
929
|
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(
|
|
@@ -957,7 +990,7 @@ function CssClassItem(props) {
|
|
|
957
990
|
), /* @__PURE__ */ React7.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React7.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
958
991
|
}
|
|
959
992
|
var validateLabel = (newLabel) => {
|
|
960
|
-
const result = (0,
|
|
993
|
+
const result = (0, import_editor_styles_repository5.validateStyleLabel)(newLabel, "rename");
|
|
961
994
|
if (result.isValid) {
|
|
962
995
|
return null;
|
|
963
996
|
}
|
|
@@ -986,7 +1019,7 @@ function CssClassSelector() {
|
|
|
986
1019
|
const appliedOptions = useAppliedOptions(options12);
|
|
987
1020
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
988
1021
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
989
|
-
const { userCan } = (0,
|
|
1022
|
+
const { userCan } = (0, import_editor_styles_repository6.useUserStylesCapability)();
|
|
990
1023
|
const canEdit = active.provider ? userCan(active.provider).updateProps : true;
|
|
991
1024
|
return /* @__PURE__ */ React8.createElement(import_ui6.Stack, { p: 2 }, /* @__PURE__ */ React8.createElement(import_ui6.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React8.createElement(import_ui6.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n4.__)("Classes", "elementor")), /* @__PURE__ */ React8.createElement(import_ui6.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React8.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React8.createElement(
|
|
992
1025
|
import_editor_ui3.WarningInfotip,
|
|
@@ -1042,16 +1075,7 @@ function CssClassSelector() {
|
|
|
1042
1075
|
})
|
|
1043
1076
|
}
|
|
1044
1077
|
)
|
|
1045
|
-
), !canEdit && /* @__PURE__ */ React8.createElement(
|
|
1046
|
-
import_editor_ui3.InfoAlert,
|
|
1047
|
-
{
|
|
1048
|
-
content: (0, import_i18n4.__)(
|
|
1049
|
-
"With your current role, you can use existing classes but can\u2019t modify them.",
|
|
1050
|
-
"elementor"
|
|
1051
|
-
),
|
|
1052
|
-
sx: { mt: 1 }
|
|
1053
|
-
}
|
|
1054
|
-
));
|
|
1078
|
+
), !canEdit && /* @__PURE__ */ React8.createElement(import_editor_ui3.InfoAlert, { sx: { mt: 1 } }, (0, import_i18n4.__)("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1055
1079
|
}
|
|
1056
1080
|
var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React8.createElement(import_ui6.Box, { sx: { py: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
1057
1081
|
import_ui6.Stack,
|
|
@@ -1071,7 +1095,7 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1071
1095
|
if (!provider) {
|
|
1072
1096
|
return;
|
|
1073
1097
|
}
|
|
1074
|
-
const providerInstance =
|
|
1098
|
+
const providerInstance = import_editor_styles_repository6.stylesRepository.getProviderByKey(provider);
|
|
1075
1099
|
if (!providerInstance) {
|
|
1076
1100
|
return;
|
|
1077
1101
|
}
|
|
@@ -1080,8 +1104,8 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1080
1104
|
function useOptions() {
|
|
1081
1105
|
const { element } = useElement();
|
|
1082
1106
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
1083
|
-
return (0,
|
|
1084
|
-
const isElements = (0,
|
|
1107
|
+
return (0, import_editor_styles_repository6.useProviders)().filter(isProviderEditable).flatMap((provider) => {
|
|
1108
|
+
const isElements = (0, import_editor_styles_repository6.isElementsStylesProvider)(provider.getKey());
|
|
1085
1109
|
const styleDefs = provider.actions.all({ elementId: element.id });
|
|
1086
1110
|
if (isElements && styleDefs.length === 0) {
|
|
1087
1111
|
return [EMPTY_OPTION];
|
|
@@ -1091,7 +1115,7 @@ function useOptions() {
|
|
|
1091
1115
|
label: styleDef.label,
|
|
1092
1116
|
value: styleDef.id,
|
|
1093
1117
|
fixed: isElements,
|
|
1094
|
-
color:
|
|
1118
|
+
color: getStylesProviderColorName(provider.getKey()),
|
|
1095
1119
|
icon: isElements ? /* @__PURE__ */ React8.createElement(import_icons2.MapPinIcon, null) : null,
|
|
1096
1120
|
provider: provider.getKey()
|
|
1097
1121
|
};
|
|
@@ -1116,7 +1140,7 @@ function useCreateAction() {
|
|
|
1116
1140
|
)
|
|
1117
1141
|
};
|
|
1118
1142
|
}
|
|
1119
|
-
return (0,
|
|
1143
|
+
return (0, import_editor_styles_repository6.validateStyleLabel)(newClassLabel, event);
|
|
1120
1144
|
};
|
|
1121
1145
|
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1122
1146
|
return { create, validate, entityName };
|
|
@@ -1130,7 +1154,7 @@ function useAppliedOptions(options12) {
|
|
|
1130
1154
|
const appliedIds = (0, import_editor_elements2.useElementSetting)(element.id, currentClassesProp)?.value || [];
|
|
1131
1155
|
const appliedOptions = options12.filter((option) => option.value && appliedIds.includes(option.value));
|
|
1132
1156
|
const hasElementsProviderStyleApplied = appliedOptions.some(
|
|
1133
|
-
(option) => option.provider && (0,
|
|
1157
|
+
(option) => option.provider && (0, import_editor_styles_repository6.isElementsStylesProvider)(option.provider)
|
|
1134
1158
|
);
|
|
1135
1159
|
if (!hasElementsProviderStyleApplied) {
|
|
1136
1160
|
appliedOptions.unshift(EMPTY_OPTION);
|
|
@@ -1159,14 +1183,14 @@ function useHandleSelect() {
|
|
|
1159
1183
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
1160
1184
|
|
|
1161
1185
|
// src/components/editing-panel.tsx
|
|
1162
|
-
var
|
|
1163
|
-
var
|
|
1186
|
+
var React85 = __toESM(require("react"));
|
|
1187
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
1164
1188
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
1165
1189
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1166
|
-
var
|
|
1190
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1167
1191
|
var import_icons24 = require("@elementor/icons");
|
|
1168
1192
|
var import_session5 = require("@elementor/session");
|
|
1169
|
-
var
|
|
1193
|
+
var import_ui69 = require("@elementor/ui");
|
|
1170
1194
|
var import_i18n55 = require("@wordpress/i18n");
|
|
1171
1195
|
|
|
1172
1196
|
// src/controls-actions.ts
|
|
@@ -1186,14 +1210,13 @@ function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
|
1186
1210
|
// src/popover-action.tsx
|
|
1187
1211
|
var React10 = __toESM(require("react"));
|
|
1188
1212
|
var import_react11 = require("react");
|
|
1189
|
-
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1190
1213
|
var import_ui8 = require("@elementor/ui");
|
|
1191
1214
|
var SIZE2 = "tiny";
|
|
1192
1215
|
function PopoverAction({
|
|
1193
1216
|
title,
|
|
1194
1217
|
visible = true,
|
|
1195
1218
|
icon: Icon,
|
|
1196
|
-
|
|
1219
|
+
content: PopoverContent2
|
|
1197
1220
|
}) {
|
|
1198
1221
|
const id = (0, import_react11.useId)();
|
|
1199
1222
|
const popupState = (0, import_ui8.usePopupState)({
|
|
@@ -1214,8 +1237,7 @@ function PopoverAction({
|
|
|
1214
1237
|
},
|
|
1215
1238
|
...(0, import_ui8.bindPopover)(popupState)
|
|
1216
1239
|
},
|
|
1217
|
-
/* @__PURE__ */ React10.createElement(
|
|
1218
|
-
/* @__PURE__ */ React10.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
1240
|
+
/* @__PURE__ */ React10.createElement(PopoverContent2, { close: popupState.close })
|
|
1219
1241
|
));
|
|
1220
1242
|
}
|
|
1221
1243
|
|
|
@@ -1235,10 +1257,10 @@ function EditorPanelErrorFallback() {
|
|
|
1235
1257
|
}
|
|
1236
1258
|
|
|
1237
1259
|
// src/components/editing-panel-tabs.tsx
|
|
1238
|
-
var
|
|
1239
|
-
var
|
|
1260
|
+
var React84 = __toESM(require("react"));
|
|
1261
|
+
var import_react37 = require("react");
|
|
1240
1262
|
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1241
|
-
var
|
|
1263
|
+
var import_ui68 = require("@elementor/ui");
|
|
1242
1264
|
var import_i18n54 = require("@wordpress/i18n");
|
|
1243
1265
|
|
|
1244
1266
|
// src/contexts/scroll-context.tsx
|
|
@@ -1334,19 +1356,23 @@ var React13 = __toESM(require("react"));
|
|
|
1334
1356
|
|
|
1335
1357
|
// src/controls-registry/controls-registry.tsx
|
|
1336
1358
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
1359
|
+
var import_editor_props2 = require("@elementor/editor-props");
|
|
1337
1360
|
var controlTypes = {
|
|
1338
|
-
image: { component: import_editor_controls2.ImageControl, layout: "full" },
|
|
1339
|
-
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full" },
|
|
1340
|
-
text: { component: import_editor_controls2.TextControl, layout: "full" },
|
|
1341
|
-
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full" },
|
|
1342
|
-
size: { component: import_editor_controls2.SizeControl, layout: "two-columns" },
|
|
1343
|
-
select: { component: import_editor_controls2.SelectControl, layout: "two-columns" },
|
|
1344
|
-
link: { component: import_editor_controls2.LinkControl, layout: "full" },
|
|
1345
|
-
url: { component: import_editor_controls2.UrlControl, layout: "full" },
|
|
1346
|
-
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns" }
|
|
1361
|
+
image: { component: import_editor_controls2.ImageControl, layout: "full", propTypeUtil: import_editor_props2.imagePropTypeUtil },
|
|
1362
|
+
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full", propTypeUtil: import_editor_props2.imageSrcPropTypeUtil },
|
|
1363
|
+
text: { component: import_editor_controls2.TextControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1364
|
+
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1365
|
+
size: { component: import_editor_controls2.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props2.sizePropTypeUtil },
|
|
1366
|
+
select: { component: import_editor_controls2.SelectControl, layout: "two-columns", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1367
|
+
link: { component: import_editor_controls2.LinkControl, layout: "full", propTypeUtil: import_editor_props2.linkPropTypeUtil },
|
|
1368
|
+
url: { component: import_editor_controls2.UrlControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1369
|
+
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props2.booleanPropTypeUtil },
|
|
1370
|
+
repeatable: { component: import_editor_controls2.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
1371
|
+
"key-value": { component: import_editor_controls2.KeyValueControl, layout: "full", propTypeUtil: import_editor_props2.keyValuePropTypeUtil }
|
|
1347
1372
|
};
|
|
1348
1373
|
var getControl = (type) => controlTypes[type]?.component;
|
|
1349
1374
|
var getDefaultLayout = (type) => controlTypes[type].layout;
|
|
1375
|
+
var getPropTypeUtil = (type) => controlTypes[type]?.propTypeUtil;
|
|
1350
1376
|
|
|
1351
1377
|
// src/controls-registry/control.tsx
|
|
1352
1378
|
var Control = ({ props, type }) => {
|
|
@@ -1543,26 +1569,42 @@ var Control2 = ({ control }) => {
|
|
|
1543
1569
|
return null;
|
|
1544
1570
|
}
|
|
1545
1571
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1546
|
-
|
|
1547
|
-
};
|
|
1572
|
+
const controlProps = populateChildControlProps(control.props);
|
|
1573
|
+
return /* @__PURE__ */ React19.createElement(SettingsField, { bind: control.bind }, control.meta?.topDivider && /* @__PURE__ */ React19.createElement(import_ui16.Divider, null), /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, control.label ? /* @__PURE__ */ React19.createElement(import_editor_controls4.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React19.createElement(Control, { type: control.type, props: controlProps })));
|
|
1574
|
+
};
|
|
1575
|
+
function populateChildControlProps(props) {
|
|
1576
|
+
if (props.childControlType) {
|
|
1577
|
+
const childComponent = getControl(props.childControlType);
|
|
1578
|
+
const childPropType = getPropTypeUtil(props.childControlType);
|
|
1579
|
+
props = {
|
|
1580
|
+
...props,
|
|
1581
|
+
childControlConfig: {
|
|
1582
|
+
component: childComponent,
|
|
1583
|
+
props: props.childControlProps || {},
|
|
1584
|
+
propTypeUtil: childPropType
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
return props;
|
|
1589
|
+
}
|
|
1548
1590
|
|
|
1549
1591
|
// src/components/style-tab.tsx
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
var
|
|
1592
|
+
var React83 = __toESM(require("react"));
|
|
1593
|
+
var import_react36 = require("react");
|
|
1594
|
+
var import_editor_props10 = require("@elementor/editor-props");
|
|
1553
1595
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1554
1596
|
var import_session4 = require("@elementor/session");
|
|
1555
|
-
var
|
|
1597
|
+
var import_ui67 = require("@elementor/ui");
|
|
1556
1598
|
var import_i18n53 = require("@wordpress/i18n");
|
|
1557
1599
|
|
|
1558
1600
|
// src/contexts/styles-inheritance-context.tsx
|
|
1559
1601
|
var React20 = __toESM(require("react"));
|
|
1560
1602
|
var import_react18 = require("react");
|
|
1561
1603
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1562
|
-
var
|
|
1604
|
+
var import_editor_props5 = require("@elementor/editor-props");
|
|
1563
1605
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1564
1606
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
1565
|
-
var
|
|
1607
|
+
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1566
1608
|
|
|
1567
1609
|
// src/hooks/use-styles-rerender.ts
|
|
1568
1610
|
var import_react17 = require("react");
|
|
@@ -1573,16 +1615,24 @@ var useStylesRerender = () => {
|
|
|
1573
1615
|
};
|
|
1574
1616
|
|
|
1575
1617
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1576
|
-
var
|
|
1618
|
+
var import_editor_props4 = require("@elementor/editor-props");
|
|
1577
1619
|
|
|
1578
1620
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1579
|
-
var
|
|
1621
|
+
var import_editor_props3 = require("@elementor/editor-props");
|
|
1580
1622
|
|
|
1581
1623
|
// src/styles-inheritance/utils.ts
|
|
1582
1624
|
var DEFAULT_STATE = "normal";
|
|
1583
1625
|
var DEFAULT_BREAKPOINT = "desktop";
|
|
1584
1626
|
var getStateKey = (state) => state ?? DEFAULT_STATE;
|
|
1585
1627
|
var getBreakpointKey = (breakpoint) => breakpoint ?? DEFAULT_BREAKPOINT;
|
|
1628
|
+
var getValueFromInheritanceChain = (inheritanceChain, styleId, meta) => inheritanceChain.find(
|
|
1629
|
+
({
|
|
1630
|
+
style,
|
|
1631
|
+
variant: {
|
|
1632
|
+
meta: { breakpoint, state }
|
|
1633
|
+
}
|
|
1634
|
+
}) => style.id === styleId && breakpoint === meta.breakpoint && state === meta.state
|
|
1635
|
+
);
|
|
1586
1636
|
|
|
1587
1637
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1588
1638
|
function createSnapshotsManager(getStylesByMeta, breakpointsRoot) {
|
|
@@ -1668,7 +1718,7 @@ function buildInitialSnapshotFromStyles(styles) {
|
|
|
1668
1718
|
variant: { props }
|
|
1669
1719
|
} = styleData;
|
|
1670
1720
|
Object.entries(props).forEach(([key, value]) => {
|
|
1671
|
-
const filteredValue = (0,
|
|
1721
|
+
const filteredValue = (0, import_editor_props3.filterEmptyValues)(value);
|
|
1672
1722
|
if (filteredValue === null) {
|
|
1673
1723
|
return;
|
|
1674
1724
|
}
|
|
@@ -1714,7 +1764,7 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
1714
1764
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
1715
1765
|
...rest,
|
|
1716
1766
|
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
1717
|
-
})).filter(({ value: styleValue }) => !(0,
|
|
1767
|
+
})).filter(({ value: styleValue }) => !(0, import_editor_props4.isEmpty)(styleValue));
|
|
1718
1768
|
}
|
|
1719
1769
|
return inheritanceChain;
|
|
1720
1770
|
}
|
|
@@ -1756,7 +1806,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
1756
1806
|
if (!currentScope) {
|
|
1757
1807
|
return null;
|
|
1758
1808
|
}
|
|
1759
|
-
if ((0,
|
|
1809
|
+
if ((0, import_editor_props4.isTransformable)(currentScope)) {
|
|
1760
1810
|
return currentScope.value?.[key] ?? null;
|
|
1761
1811
|
}
|
|
1762
1812
|
if (typeof currentScope === "object") {
|
|
@@ -1766,7 +1816,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
1766
1816
|
}, value);
|
|
1767
1817
|
}
|
|
1768
1818
|
function shouldUseOriginalValue(filterPropType, value) {
|
|
1769
|
-
return !!filterPropType && (0,
|
|
1819
|
+
return !!filterPropType && (0, import_editor_props4.isTransformable)(value) && filterPropType.key !== value.$$type;
|
|
1770
1820
|
}
|
|
1771
1821
|
var getFilterPropType = (propType, path) => {
|
|
1772
1822
|
if (!propType || propType.kind !== "union") {
|
|
@@ -1824,8 +1874,8 @@ var useAppliedStyles = () => {
|
|
|
1824
1874
|
const baseStyles = useBaseStyles();
|
|
1825
1875
|
useStylesRerender();
|
|
1826
1876
|
const classesProp = (0, import_editor_elements4.useElementSetting)(element.id, currentClassesProp);
|
|
1827
|
-
const appliedStyles =
|
|
1828
|
-
return
|
|
1877
|
+
const appliedStyles = import_editor_props5.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
1878
|
+
return import_editor_styles_repository7.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
1829
1879
|
};
|
|
1830
1880
|
var useBaseStyles = () => {
|
|
1831
1881
|
const { elementType } = useElement();
|
|
@@ -1873,24 +1923,24 @@ var import_editor_styles3 = require("@elementor/editor-styles");
|
|
|
1873
1923
|
var import_react19 = require("react");
|
|
1874
1924
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1875
1925
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1876
|
-
var
|
|
1926
|
+
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
1877
1927
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
1878
1928
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1879
1929
|
function useStylesFields(propNames) {
|
|
1880
1930
|
const { element } = useElement();
|
|
1881
|
-
const { id, meta, provider } = useStyle();
|
|
1931
|
+
const { id, meta, provider, canEdit } = useStyle();
|
|
1882
1932
|
const classesProp = useClassesProp();
|
|
1883
1933
|
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
1884
1934
|
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
1885
1935
|
useStylesRerender();
|
|
1886
|
-
const
|
|
1936
|
+
const values = getProps({
|
|
1887
1937
|
elementId: element.id,
|
|
1888
1938
|
styleId: id,
|
|
1889
1939
|
provider,
|
|
1890
1940
|
meta,
|
|
1891
1941
|
propNames
|
|
1892
1942
|
});
|
|
1893
|
-
const
|
|
1943
|
+
const setValues = (props) => {
|
|
1894
1944
|
if (id === null) {
|
|
1895
1945
|
undoableCreateElementStyle({
|
|
1896
1946
|
elementId: element.id,
|
|
@@ -1908,7 +1958,7 @@ function useStylesFields(propNames) {
|
|
|
1908
1958
|
props
|
|
1909
1959
|
});
|
|
1910
1960
|
};
|
|
1911
|
-
return
|
|
1961
|
+
return { values, setValues, canEdit };
|
|
1912
1962
|
}
|
|
1913
1963
|
function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
1914
1964
|
if (!provider || !styleId) {
|
|
@@ -1930,7 +1980,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1930
1980
|
do: (payload) => {
|
|
1931
1981
|
return (0, import_editor_elements6.createElementStyle)({
|
|
1932
1982
|
...payload,
|
|
1933
|
-
label:
|
|
1983
|
+
label: import_editor_styles_repository8.ELEMENTS_STYLES_RESERVED_LABEL
|
|
1934
1984
|
});
|
|
1935
1985
|
},
|
|
1936
1986
|
undo: ({ elementId }, styleId) => {
|
|
@@ -1940,7 +1990,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1940
1990
|
return (0, import_editor_elements6.createElementStyle)({
|
|
1941
1991
|
...payload,
|
|
1942
1992
|
styleId,
|
|
1943
|
-
label:
|
|
1993
|
+
label: import_editor_styles_repository8.ELEMENTS_STYLES_RESERVED_LABEL
|
|
1944
1994
|
});
|
|
1945
1995
|
}
|
|
1946
1996
|
},
|
|
@@ -1995,21 +2045,21 @@ function getCurrentProps(style, meta) {
|
|
|
1995
2045
|
|
|
1996
2046
|
// src/hooks/use-styles-field.ts
|
|
1997
2047
|
function useStylesField(propName) {
|
|
1998
|
-
const
|
|
2048
|
+
const { values, setValues, canEdit } = useStylesFields([propName]);
|
|
1999
2049
|
const value = values?.[propName] ?? null;
|
|
2000
2050
|
const setValue = (newValue) => {
|
|
2001
2051
|
setValues({
|
|
2002
2052
|
[propName]: newValue
|
|
2003
2053
|
});
|
|
2004
2054
|
};
|
|
2005
|
-
return
|
|
2055
|
+
return { value, setValue, canEdit };
|
|
2006
2056
|
}
|
|
2007
2057
|
|
|
2008
2058
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2009
2059
|
var React27 = __toESM(require("react"));
|
|
2010
2060
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2011
|
-
var
|
|
2012
|
-
var
|
|
2061
|
+
var import_editor_props6 = require("@elementor/editor-props");
|
|
2062
|
+
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
2013
2063
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
2014
2064
|
var import_ui24 = require("@elementor/ui");
|
|
2015
2065
|
var import_i18n10 = require("@wordpress/i18n");
|
|
@@ -2070,7 +2120,7 @@ function useDirection() {
|
|
|
2070
2120
|
|
|
2071
2121
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2072
2122
|
var import_react21 = require("react");
|
|
2073
|
-
var
|
|
2123
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
2074
2124
|
var import_i18n7 = require("@wordpress/i18n");
|
|
2075
2125
|
var MAXIMUM_ITEMS = 2;
|
|
2076
2126
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
@@ -2082,7 +2132,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
2082
2132
|
);
|
|
2083
2133
|
const validItems = normalizedItems.map((item) => ({
|
|
2084
2134
|
...item,
|
|
2085
|
-
displayLabel:
|
|
2135
|
+
displayLabel: import_editor_styles_repository9.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n7.__)("Base", "elementor")
|
|
2086
2136
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2087
2137
|
setItems(validItems);
|
|
2088
2138
|
})();
|
|
@@ -2103,8 +2153,7 @@ var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
|
2103
2153
|
provider: item.provider || "",
|
|
2104
2154
|
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT2,
|
|
2105
2155
|
displayLabel,
|
|
2106
|
-
value: await getTransformedValue(item, bind, resolve)
|
|
2107
|
-
chipColor: getChipColor(item)
|
|
2156
|
+
value: await getTransformedValue(item, bind, resolve)
|
|
2108
2157
|
};
|
|
2109
2158
|
};
|
|
2110
2159
|
var getTransformedValue = async (item, bind, resolve) => {
|
|
@@ -2126,16 +2175,6 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
2126
2175
|
return "";
|
|
2127
2176
|
}
|
|
2128
2177
|
};
|
|
2129
|
-
var getChipColor = (item) => {
|
|
2130
|
-
const { provider = "", style } = item;
|
|
2131
|
-
if (provider === import_editor_styles_repository8.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2132
|
-
return "default";
|
|
2133
|
-
}
|
|
2134
|
-
if (style?.label === "local") {
|
|
2135
|
-
return "accent";
|
|
2136
|
-
}
|
|
2137
|
-
return "global";
|
|
2138
|
-
};
|
|
2139
2178
|
|
|
2140
2179
|
// src/styles-inheritance/styles-inheritance-transformers-registry.tsx
|
|
2141
2180
|
var import_editor_canvas = require("@elementor/editor-canvas");
|
|
@@ -2170,20 +2209,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
2170
2209
|
|
|
2171
2210
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2172
2211
|
var React23 = __toESM(require("react"));
|
|
2173
|
-
var
|
|
2212
|
+
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
2174
2213
|
var import_icons5 = require("@elementor/icons");
|
|
2175
2214
|
var import_ui20 = require("@elementor/ui");
|
|
2176
2215
|
var import_i18n8 = require("@wordpress/i18n");
|
|
2177
2216
|
var SIZE4 = "tiny";
|
|
2178
|
-
var LabelChip = ({ displayLabel, provider
|
|
2179
|
-
const isBaseStyle = provider ===
|
|
2217
|
+
var LabelChip = ({ displayLabel, provider }) => {
|
|
2218
|
+
const isBaseStyle = provider === import_editor_styles_repository10.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2180
2219
|
const chipIcon = isBaseStyle ? /* @__PURE__ */ React23.createElement(import_ui20.Tooltip, { title: (0, import_i18n8.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React23.createElement(import_icons5.InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2181
2220
|
return /* @__PURE__ */ React23.createElement(
|
|
2182
2221
|
import_ui20.Chip,
|
|
2183
2222
|
{
|
|
2184
2223
|
label: displayLabel,
|
|
2185
2224
|
size: SIZE4,
|
|
2186
|
-
color:
|
|
2225
|
+
color: getStylesProviderColorName(provider),
|
|
2187
2226
|
variant: "standard",
|
|
2188
2227
|
state: "enabled",
|
|
2189
2228
|
icon: chipIcon,
|
|
@@ -2296,14 +2335,7 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2296
2335
|
item.displayLabel
|
|
2297
2336
|
)
|
|
2298
2337
|
},
|
|
2299
|
-
/* @__PURE__ */ React26.createElement(import_ui23.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(
|
|
2300
|
-
LabelChip,
|
|
2301
|
-
{
|
|
2302
|
-
displayLabel: item.displayLabel,
|
|
2303
|
-
provider: item.provider,
|
|
2304
|
-
chipColor: item.chipColor
|
|
2305
|
-
}
|
|
2306
|
-
), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2338
|
+
/* @__PURE__ */ React26.createElement(import_ui23.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2307
2339
|
/* @__PURE__ */ React26.createElement(ActionIcons, null)
|
|
2308
2340
|
);
|
|
2309
2341
|
})
|
|
@@ -2364,41 +2396,40 @@ function TooltipOrInfotip({
|
|
|
2364
2396
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2365
2397
|
var StylesInheritanceIndicator = () => {
|
|
2366
2398
|
const { path, propType } = (0, import_editor_controls5.useBoundProp)();
|
|
2367
|
-
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2368
2399
|
const isUsingNestedProps = (0, import_editor_v1_adapters7.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2369
2400
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
2370
2401
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
2371
2402
|
if (!inheritanceChain.length) {
|
|
2372
2403
|
return null;
|
|
2373
2404
|
}
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
}) => style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state
|
|
2381
|
-
);
|
|
2382
|
-
const hasValue = !(0, import_editor_props5.isEmpty)(currentItem?.value);
|
|
2405
|
+
return /* @__PURE__ */ React27.createElement(Indicator, { inheritanceChain, path: finalPath, propType });
|
|
2406
|
+
};
|
|
2407
|
+
var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
2408
|
+
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2409
|
+
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2410
|
+
const hasValue = !(0, import_editor_props6.isEmpty)(currentItem?.value);
|
|
2383
2411
|
const [actualStyle] = inheritanceChain;
|
|
2384
|
-
if (actualStyle.provider ===
|
|
2412
|
+
if (actualStyle.provider === import_editor_styles_repository11.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2385
2413
|
return null;
|
|
2386
2414
|
}
|
|
2387
2415
|
const isFinalValue = currentItem === actualStyle;
|
|
2388
2416
|
const label = getLabel({ isFinalValue, hasValue });
|
|
2389
|
-
const
|
|
2417
|
+
const styleIndicatorProps = {
|
|
2418
|
+
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
2419
|
+
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
2420
|
+
};
|
|
2390
2421
|
if (!isUsingIndicatorPopover()) {
|
|
2391
|
-
return /* @__PURE__ */ React27.createElement(import_ui24.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, {
|
|
2422
|
+
return /* @__PURE__ */ React27.createElement(import_ui24.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, { ...styleIndicatorProps, "aria-label": label }));
|
|
2392
2423
|
}
|
|
2393
2424
|
return /* @__PURE__ */ React27.createElement(
|
|
2394
2425
|
StylesInheritanceInfotip,
|
|
2395
2426
|
{
|
|
2396
2427
|
inheritanceChain,
|
|
2397
|
-
path
|
|
2428
|
+
path,
|
|
2398
2429
|
propType,
|
|
2399
2430
|
label
|
|
2400
2431
|
},
|
|
2401
|
-
/* @__PURE__ */ React27.createElement(StyleIndicator, {
|
|
2432
|
+
/* @__PURE__ */ React27.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2402
2433
|
);
|
|
2403
2434
|
};
|
|
2404
2435
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
@@ -2410,24 +2441,10 @@ var getLabel = ({ isFinalValue, hasValue }) => {
|
|
|
2410
2441
|
}
|
|
2411
2442
|
return (0, import_i18n10.__)("This has value from another style", "elementor");
|
|
2412
2443
|
};
|
|
2413
|
-
var getVariant = ({
|
|
2414
|
-
isFinalValue,
|
|
2415
|
-
hasValue,
|
|
2416
|
-
currentStyleProvider
|
|
2417
|
-
}) => {
|
|
2418
|
-
if (isFinalValue) {
|
|
2419
|
-
return (0, import_editor_styles_repository10.isElementsStylesProvider)(currentStyleProvider?.getKey?.()) ? "local" : "global";
|
|
2420
|
-
}
|
|
2421
|
-
if (hasValue) {
|
|
2422
|
-
return "overridden";
|
|
2423
|
-
}
|
|
2424
|
-
return void 0;
|
|
2425
|
-
};
|
|
2426
2444
|
|
|
2427
2445
|
// src/controls-registry/styles-field.tsx
|
|
2428
2446
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
2429
|
-
const
|
|
2430
|
-
const { canEdit } = useStyle();
|
|
2447
|
+
const { value, setValue, canEdit } = useStylesField(bind);
|
|
2431
2448
|
const stylesSchema = (0, import_editor_styles3.getStylesSchema)();
|
|
2432
2449
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2433
2450
|
const values = { [bind]: value };
|
|
@@ -2465,7 +2482,7 @@ var BackgroundSection = () => {
|
|
|
2465
2482
|
};
|
|
2466
2483
|
|
|
2467
2484
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2468
|
-
var
|
|
2485
|
+
var React39 = __toESM(require("react"));
|
|
2469
2486
|
|
|
2470
2487
|
// src/components/panel-divider.tsx
|
|
2471
2488
|
var React30 = __toESM(require("react"));
|
|
@@ -2547,7 +2564,7 @@ var BorderStyleField = () => {
|
|
|
2547
2564
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2548
2565
|
var React35 = __toESM(require("react"));
|
|
2549
2566
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
2550
|
-
var
|
|
2567
|
+
var import_editor_props7 = require("@elementor/editor-props");
|
|
2551
2568
|
var import_icons7 = require("@elementor/icons");
|
|
2552
2569
|
var import_ui30 = require("@elementor/ui");
|
|
2553
2570
|
var import_i18n13 = require("@wordpress/i18n");
|
|
@@ -2584,7 +2601,7 @@ var BorderWidthField = () => {
|
|
|
2584
2601
|
label: (0, import_i18n13.__)("Border width", "elementor"),
|
|
2585
2602
|
icon: /* @__PURE__ */ React35.createElement(import_icons7.SideAllIcon, { fontSize: "tiny" }),
|
|
2586
2603
|
tooltipLabel: (0, import_i18n13.__)("Adjust borders", "elementor"),
|
|
2587
|
-
multiSizePropTypeUtil:
|
|
2604
|
+
multiSizePropTypeUtil: import_editor_props7.borderWidthPropTypeUtil
|
|
2588
2605
|
}
|
|
2589
2606
|
));
|
|
2590
2607
|
};
|
|
@@ -2596,19 +2613,18 @@ var initialBorder = {
|
|
|
2596
2613
|
"border-style": { $$type: "string", value: "solid" }
|
|
2597
2614
|
};
|
|
2598
2615
|
var BorderField = () => {
|
|
2599
|
-
const { canEdit } =
|
|
2600
|
-
const [border, setBorder] = useStylesFields(Object.keys(initialBorder));
|
|
2616
|
+
const { values, setValues, canEdit } = useStylesFields(Object.keys(initialBorder));
|
|
2601
2617
|
const addBorder = () => {
|
|
2602
|
-
|
|
2618
|
+
setValues(initialBorder);
|
|
2603
2619
|
};
|
|
2604
2620
|
const removeBorder = () => {
|
|
2605
|
-
|
|
2621
|
+
setValues({
|
|
2606
2622
|
"border-width": null,
|
|
2607
2623
|
"border-color": null,
|
|
2608
2624
|
"border-style": null
|
|
2609
2625
|
});
|
|
2610
2626
|
};
|
|
2611
|
-
const hasBorder = Object.values(
|
|
2627
|
+
const hasBorder = Object.values(values ?? {}).some(Boolean);
|
|
2612
2628
|
return /* @__PURE__ */ React36.createElement(
|
|
2613
2629
|
AddOrRemoveContent,
|
|
2614
2630
|
{
|
|
@@ -2625,16 +2641,26 @@ var BorderField = () => {
|
|
|
2625
2641
|
};
|
|
2626
2642
|
|
|
2627
2643
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2628
|
-
var
|
|
2644
|
+
var React38 = __toESM(require("react"));
|
|
2629
2645
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
2630
|
-
var
|
|
2646
|
+
var import_editor_props8 = require("@elementor/editor-props");
|
|
2631
2647
|
var import_icons8 = require("@elementor/icons");
|
|
2632
|
-
var
|
|
2648
|
+
var import_ui32 = require("@elementor/ui");
|
|
2633
2649
|
var import_i18n15 = require("@wordpress/i18n");
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
var
|
|
2637
|
-
var
|
|
2650
|
+
|
|
2651
|
+
// src/styles-inheritance/components/ui-providers.tsx
|
|
2652
|
+
var React37 = __toESM(require("react"));
|
|
2653
|
+
var import_ui31 = require("@elementor/ui");
|
|
2654
|
+
var UiProviders = ({ children }) => {
|
|
2655
|
+
const { isSiteRtl } = useDirection();
|
|
2656
|
+
return /* @__PURE__ */ React37.createElement(import_ui31.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(import_ui31.ThemeProvider, null, children));
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2659
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2660
|
+
var StartStartIcon = (0, import_ui32.withDirection)(import_icons8.RadiusTopLeftIcon);
|
|
2661
|
+
var StartEndIcon = (0, import_ui32.withDirection)(import_icons8.RadiusTopRightIcon);
|
|
2662
|
+
var EndStartIcon = (0, import_ui32.withDirection)(import_icons8.RadiusBottomLeftIcon);
|
|
2663
|
+
var EndEndIcon = (0, import_ui32.withDirection)(import_icons8.RadiusBottomRightIcon);
|
|
2638
2664
|
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Top right", "elementor") : (0, import_i18n15.__)("Top left", "elementor");
|
|
2639
2665
|
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Top left", "elementor") : (0, import_i18n15.__)("Top right", "elementor");
|
|
2640
2666
|
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Bottom right", "elementor") : (0, import_i18n15.__)("Bottom left", "elementor");
|
|
@@ -2642,54 +2668,67 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n15.__)("Bottom le
|
|
|
2642
2668
|
var getCorners = (isSiteRtl) => [
|
|
2643
2669
|
{
|
|
2644
2670
|
label: getStartStartLabel(isSiteRtl),
|
|
2645
|
-
icon: /* @__PURE__ */
|
|
2671
|
+
icon: /* @__PURE__ */ React38.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2646
2672
|
bind: "start-start"
|
|
2647
2673
|
},
|
|
2648
2674
|
{
|
|
2649
2675
|
label: getStartEndLabel(isSiteRtl),
|
|
2650
|
-
icon: /* @__PURE__ */
|
|
2676
|
+
icon: /* @__PURE__ */ React38.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2651
2677
|
bind: "start-end"
|
|
2652
2678
|
},
|
|
2653
2679
|
{
|
|
2654
2680
|
label: getEndStartLabel(isSiteRtl),
|
|
2655
|
-
icon: /* @__PURE__ */
|
|
2681
|
+
icon: /* @__PURE__ */ React38.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2656
2682
|
bind: "end-start"
|
|
2657
2683
|
},
|
|
2658
2684
|
{
|
|
2659
2685
|
label: getEndEndLabel(isSiteRtl),
|
|
2660
|
-
icon: /* @__PURE__ */
|
|
2686
|
+
icon: /* @__PURE__ */ React38.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2661
2687
|
bind: "end-end"
|
|
2662
2688
|
}
|
|
2663
2689
|
];
|
|
2664
2690
|
var BorderRadiusField = () => {
|
|
2665
2691
|
const { isSiteRtl } = useDirection();
|
|
2666
|
-
return /* @__PURE__ */
|
|
2692
|
+
return /* @__PURE__ */ React38.createElement(UiProviders, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React38.createElement(
|
|
2667
2693
|
import_editor_controls13.EqualUnequalSizesControl,
|
|
2668
2694
|
{
|
|
2669
2695
|
items: getCorners(isSiteRtl),
|
|
2670
2696
|
label: (0, import_i18n15.__)("Border radius", "elementor"),
|
|
2671
|
-
icon: /* @__PURE__ */
|
|
2697
|
+
icon: /* @__PURE__ */ React38.createElement(import_icons8.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2672
2698
|
tooltipLabel: (0, import_i18n15.__)("Adjust corners", "elementor"),
|
|
2673
|
-
multiSizePropTypeUtil:
|
|
2699
|
+
multiSizePropTypeUtil: import_editor_props8.borderRadiusPropTypeUtil
|
|
2674
2700
|
}
|
|
2675
|
-
));
|
|
2701
|
+
)));
|
|
2676
2702
|
};
|
|
2677
2703
|
|
|
2678
2704
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2679
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2705
|
+
var BorderSection = () => /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(BorderRadiusField, null), /* @__PURE__ */ React39.createElement(PanelDivider, null), /* @__PURE__ */ React39.createElement(BorderField, null));
|
|
2680
2706
|
|
|
2681
2707
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2682
|
-
var
|
|
2708
|
+
var React41 = __toESM(require("react"));
|
|
2709
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2710
|
+
|
|
2711
|
+
// src/components/style-sections/layout-section/opacity-control-field.tsx
|
|
2712
|
+
var React40 = __toESM(require("react"));
|
|
2713
|
+
var import_react23 = require("react");
|
|
2683
2714
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
2715
|
+
var import_ui33 = require("@elementor/ui");
|
|
2716
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
2717
|
+
var OpacityControlField = () => {
|
|
2718
|
+
const rowRef = (0, import_react23.useRef)();
|
|
2719
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "opacity" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n16.__)("Opacity", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(import_editor_controls14.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" }))));
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2722
|
+
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2684
2723
|
var EffectsSection = () => {
|
|
2685
|
-
return /* @__PURE__ */
|
|
2724
|
+
return /* @__PURE__ */ React41.createElement(SectionContent, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "opacity" }, /* @__PURE__ */ React41.createElement(OpacityControlField, null)), /* @__PURE__ */ React41.createElement(PanelDivider, null), /* @__PURE__ */ React41.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React41.createElement(import_editor_controls15.BoxShadowRepeaterControl, null)));
|
|
2686
2725
|
};
|
|
2687
2726
|
|
|
2688
2727
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2689
|
-
var
|
|
2690
|
-
var
|
|
2728
|
+
var React53 = __toESM(require("react"));
|
|
2729
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2691
2730
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2692
|
-
var
|
|
2731
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
2693
2732
|
|
|
2694
2733
|
// src/hooks/use-computed-style.ts
|
|
2695
2734
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
@@ -2717,16 +2756,16 @@ function useComputedStyle(elementId) {
|
|
|
2717
2756
|
}
|
|
2718
2757
|
|
|
2719
2758
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2720
|
-
var
|
|
2721
|
-
var
|
|
2759
|
+
var React43 = __toESM(require("react"));
|
|
2760
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2722
2761
|
var import_icons9 = require("@elementor/icons");
|
|
2723
|
-
var
|
|
2724
|
-
var
|
|
2762
|
+
var import_ui35 = require("@elementor/ui");
|
|
2763
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
2725
2764
|
|
|
2726
2765
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2727
|
-
var
|
|
2728
|
-
var
|
|
2729
|
-
var
|
|
2766
|
+
var React42 = __toESM(require("react"));
|
|
2767
|
+
var import_react24 = require("react");
|
|
2768
|
+
var import_ui34 = require("@elementor/ui");
|
|
2730
2769
|
var CLOCKWISE_ANGLES = {
|
|
2731
2770
|
row: 0,
|
|
2732
2771
|
column: 90,
|
|
@@ -2746,13 +2785,13 @@ var RotatedIcon = ({
|
|
|
2746
2785
|
offset = 0,
|
|
2747
2786
|
disableRotationForReversed = false
|
|
2748
2787
|
}) => {
|
|
2749
|
-
const rotate = (0,
|
|
2788
|
+
const rotate = (0, import_react24.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2750
2789
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2751
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ React42.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2752
2791
|
};
|
|
2753
2792
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2754
|
-
const
|
|
2755
|
-
const isRtl = "rtl" === (0,
|
|
2793
|
+
const { value: direction } = useStylesField("flex-direction");
|
|
2794
|
+
const isRtl = "rtl" === (0, import_ui34.useTheme)().direction;
|
|
2756
2795
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2757
2796
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
2758
2797
|
const currentDirection = direction?.value || "row";
|
|
@@ -2767,8 +2806,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
2767
2806
|
};
|
|
2768
2807
|
|
|
2769
2808
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2770
|
-
var StartIcon = (0,
|
|
2771
|
-
var EndIcon = (0,
|
|
2809
|
+
var StartIcon = (0, import_ui35.withDirection)(import_icons9.JustifyTopIcon);
|
|
2810
|
+
var EndIcon = (0, import_ui35.withDirection)(import_icons9.JustifyBottomIcon);
|
|
2772
2811
|
var iconProps = {
|
|
2773
2812
|
isClockwise: false,
|
|
2774
2813
|
offset: 0,
|
|
@@ -2777,54 +2816,53 @@ var iconProps = {
|
|
|
2777
2816
|
var options = [
|
|
2778
2817
|
{
|
|
2779
2818
|
value: "start",
|
|
2780
|
-
label: (0,
|
|
2781
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2819
|
+
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
2820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2782
2821
|
showTooltip: true
|
|
2783
2822
|
},
|
|
2784
2823
|
{
|
|
2785
2824
|
value: "center",
|
|
2786
|
-
label: (0,
|
|
2787
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2825
|
+
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
2826
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifyCenterIcon, size, ...iconProps }),
|
|
2788
2827
|
showTooltip: true
|
|
2789
2828
|
},
|
|
2790
2829
|
{
|
|
2791
2830
|
value: "end",
|
|
2792
|
-
label: (0,
|
|
2793
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2831
|
+
label: (0, import_i18n17.__)("End", "elementor"),
|
|
2832
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2794
2833
|
showTooltip: true
|
|
2795
2834
|
},
|
|
2796
2835
|
{
|
|
2797
2836
|
value: "space-between",
|
|
2798
|
-
label: (0,
|
|
2799
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2837
|
+
label: (0, import_i18n17.__)("Space between", "elementor"),
|
|
2838
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
2800
2839
|
showTooltip: true
|
|
2801
2840
|
},
|
|
2802
2841
|
{
|
|
2803
2842
|
value: "space-around",
|
|
2804
|
-
label: (0,
|
|
2805
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2843
|
+
label: (0, import_i18n17.__)("Space around", "elementor"),
|
|
2844
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
2806
2845
|
showTooltip: true
|
|
2807
2846
|
},
|
|
2808
2847
|
{
|
|
2809
2848
|
value: "space-evenly",
|
|
2810
|
-
label: (0,
|
|
2811
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2849
|
+
label: (0, import_i18n17.__)("Space evenly", "elementor"),
|
|
2850
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
2812
2851
|
showTooltip: true
|
|
2813
2852
|
}
|
|
2814
2853
|
];
|
|
2815
2854
|
var AlignContentField = () => {
|
|
2816
|
-
|
|
2817
|
-
return /* @__PURE__ */ React41.createElement(import_ui33.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(import_ui33.ThemeProvider, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React41.createElement(import_ui33.Stack, { gap: 1 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, (0, import_i18n16.__)("Align content", "elementor")), /* @__PURE__ */ React41.createElement(import_editor_controls15.ToggleControl, { options, fullWidth: true })))));
|
|
2855
|
+
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React43.createElement(import_ui35.Stack, { gap: 1 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n17.__)("Align content", "elementor")), /* @__PURE__ */ React43.createElement(import_editor_controls16.ToggleControl, { options, fullWidth: true }))));
|
|
2818
2856
|
};
|
|
2819
2857
|
|
|
2820
2858
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2821
|
-
var
|
|
2822
|
-
var
|
|
2859
|
+
var React44 = __toESM(require("react"));
|
|
2860
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2823
2861
|
var import_icons10 = require("@elementor/icons");
|
|
2824
|
-
var
|
|
2825
|
-
var
|
|
2826
|
-
var StartIcon2 = (0,
|
|
2827
|
-
var EndIcon2 = (0,
|
|
2862
|
+
var import_ui36 = require("@elementor/ui");
|
|
2863
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
2864
|
+
var StartIcon2 = (0, import_ui36.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
2865
|
+
var EndIcon2 = (0, import_ui36.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
2828
2866
|
var iconProps2 = {
|
|
2829
2867
|
isClockwise: false,
|
|
2830
2868
|
offset: 90
|
|
@@ -2832,56 +2870,55 @@ var iconProps2 = {
|
|
|
2832
2870
|
var options2 = [
|
|
2833
2871
|
{
|
|
2834
2872
|
value: "start",
|
|
2835
|
-
label: (0,
|
|
2836
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2873
|
+
label: (0, import_i18n18.__)("Start", "elementor"),
|
|
2874
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2837
2875
|
showTooltip: true
|
|
2838
2876
|
},
|
|
2839
2877
|
{
|
|
2840
2878
|
value: "center",
|
|
2841
|
-
label: (0,
|
|
2842
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2879
|
+
label: (0, import_i18n18.__)("Center", "elementor"),
|
|
2880
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons10.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
2843
2881
|
showTooltip: true
|
|
2844
2882
|
},
|
|
2845
2883
|
{
|
|
2846
2884
|
value: "end",
|
|
2847
|
-
label: (0,
|
|
2848
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2885
|
+
label: (0, import_i18n18.__)("End", "elementor"),
|
|
2886
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2849
2887
|
showTooltip: true
|
|
2850
2888
|
},
|
|
2851
2889
|
{
|
|
2852
2890
|
value: "stretch",
|
|
2853
|
-
label: (0,
|
|
2854
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2891
|
+
label: (0, import_i18n18.__)("Stretch", "elementor"),
|
|
2892
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons10.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
2855
2893
|
showTooltip: true
|
|
2856
2894
|
}
|
|
2857
2895
|
];
|
|
2858
2896
|
var AlignItemsField = () => {
|
|
2859
|
-
|
|
2860
|
-
return /* @__PURE__ */ React42.createElement(import_ui34.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(import_ui34.ThemeProvider, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React42.createElement(import_ui34.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n17.__)("Align items", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui34.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React42.createElement(import_editor_controls16.ToggleControl, { options: options2 }))))));
|
|
2897
|
+
return /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, (0, import_i18n18.__)("Align items", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React44.createElement(import_editor_controls17.ToggleControl, { options: options2 })))));
|
|
2861
2898
|
};
|
|
2862
2899
|
|
|
2863
2900
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2864
|
-
var
|
|
2865
|
-
var
|
|
2901
|
+
var React45 = __toESM(require("react"));
|
|
2902
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
2866
2903
|
var import_icons11 = require("@elementor/icons");
|
|
2867
|
-
var
|
|
2868
|
-
var
|
|
2904
|
+
var import_ui37 = require("@elementor/ui");
|
|
2905
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
2869
2906
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2870
2907
|
row: 90,
|
|
2871
2908
|
"row-reverse": 90,
|
|
2872
2909
|
column: 0,
|
|
2873
2910
|
"column-reverse": 0
|
|
2874
2911
|
};
|
|
2875
|
-
var StartIcon3 = (0,
|
|
2876
|
-
var EndIcon3 = (0,
|
|
2912
|
+
var StartIcon3 = (0, import_ui37.withDirection)(import_icons11.LayoutAlignLeftIcon);
|
|
2913
|
+
var EndIcon3 = (0, import_ui37.withDirection)(import_icons11.LayoutAlignRightIcon);
|
|
2877
2914
|
var iconProps3 = {
|
|
2878
2915
|
isClockwise: false
|
|
2879
2916
|
};
|
|
2880
2917
|
var getOptions = (parentStyleDirection) => [
|
|
2881
2918
|
{
|
|
2882
2919
|
value: "start",
|
|
2883
|
-
label: (0,
|
|
2884
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2920
|
+
label: (0, import_i18n19.__)("Start", "elementor"),
|
|
2921
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2885
2922
|
RotatedIcon,
|
|
2886
2923
|
{
|
|
2887
2924
|
icon: StartIcon3,
|
|
@@ -2894,8 +2931,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2894
2931
|
},
|
|
2895
2932
|
{
|
|
2896
2933
|
value: "center",
|
|
2897
|
-
label: (0,
|
|
2898
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2934
|
+
label: (0, import_i18n19.__)("Center", "elementor"),
|
|
2935
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2899
2936
|
RotatedIcon,
|
|
2900
2937
|
{
|
|
2901
2938
|
icon: import_icons11.LayoutAlignCenterIcon,
|
|
@@ -2908,8 +2945,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2908
2945
|
},
|
|
2909
2946
|
{
|
|
2910
2947
|
value: "end",
|
|
2911
|
-
label: (0,
|
|
2912
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2948
|
+
label: (0, import_i18n19.__)("End", "elementor"),
|
|
2949
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2913
2950
|
RotatedIcon,
|
|
2914
2951
|
{
|
|
2915
2952
|
icon: EndIcon3,
|
|
@@ -2922,8 +2959,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2922
2959
|
},
|
|
2923
2960
|
{
|
|
2924
2961
|
value: "stretch",
|
|
2925
|
-
label: (0,
|
|
2926
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2962
|
+
label: (0, import_i18n19.__)("Stretch", "elementor"),
|
|
2963
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2927
2964
|
RotatedIcon,
|
|
2928
2965
|
{
|
|
2929
2966
|
icon: import_icons11.LayoutDistributeVerticalIcon,
|
|
@@ -2936,33 +2973,32 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2936
2973
|
}
|
|
2937
2974
|
];
|
|
2938
2975
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2939
|
-
|
|
2940
|
-
return /* @__PURE__ */ React43.createElement(import_ui35.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React43.createElement(import_ui35.ThemeProvider, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n18.__)("Align self", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React43.createElement(import_editor_controls17.ToggleControl, { options: getOptions(parentStyleDirection) }))))));
|
|
2976
|
+
return /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n19.__)("Align self", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(import_editor_controls18.ToggleControl, { options: getOptions(parentStyleDirection) })))));
|
|
2941
2977
|
};
|
|
2942
2978
|
|
|
2943
2979
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2944
|
-
var
|
|
2945
|
-
var
|
|
2980
|
+
var React46 = __toESM(require("react"));
|
|
2981
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2946
2982
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
2947
|
-
var
|
|
2948
|
-
var
|
|
2983
|
+
var import_ui38 = require("@elementor/ui");
|
|
2984
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
2949
2985
|
var displayFieldItems = [
|
|
2950
2986
|
{
|
|
2951
2987
|
value: "block",
|
|
2952
|
-
renderContent: () => (0,
|
|
2953
|
-
label: (0,
|
|
2988
|
+
renderContent: () => (0, import_i18n20.__)("Block", "elementor"),
|
|
2989
|
+
label: (0, import_i18n20.__)("Block", "elementor"),
|
|
2954
2990
|
showTooltip: true
|
|
2955
2991
|
},
|
|
2956
2992
|
{
|
|
2957
2993
|
value: "flex",
|
|
2958
|
-
renderContent: () => (0,
|
|
2959
|
-
label: (0,
|
|
2994
|
+
renderContent: () => (0, import_i18n20.__)("Flex", "elementor"),
|
|
2995
|
+
label: (0, import_i18n20.__)("Flex", "elementor"),
|
|
2960
2996
|
showTooltip: true
|
|
2961
2997
|
},
|
|
2962
2998
|
{
|
|
2963
2999
|
value: "inline-block",
|
|
2964
|
-
renderContent: () => (0,
|
|
2965
|
-
label: (0,
|
|
3000
|
+
renderContent: () => (0, import_i18n20.__)("In-blk", "elementor"),
|
|
3001
|
+
label: (0, import_i18n20.__)("Inline-block", "elementor"),
|
|
2966
3002
|
showTooltip: true
|
|
2967
3003
|
}
|
|
2968
3004
|
];
|
|
@@ -2972,72 +3008,71 @@ var DisplayField = () => {
|
|
|
2972
3008
|
if (isDisplayNoneFeatureActive) {
|
|
2973
3009
|
items3.push({
|
|
2974
3010
|
value: "none",
|
|
2975
|
-
renderContent: () => (0,
|
|
2976
|
-
label: (0,
|
|
3011
|
+
renderContent: () => (0, import_i18n20.__)("None", "elementor"),
|
|
3012
|
+
label: (0, import_i18n20.__)("None", "elementor"),
|
|
2977
3013
|
showTooltip: true
|
|
2978
3014
|
});
|
|
2979
3015
|
}
|
|
2980
3016
|
items3.push({
|
|
2981
3017
|
value: "inline-flex",
|
|
2982
|
-
renderContent: () => (0,
|
|
2983
|
-
label: (0,
|
|
3018
|
+
renderContent: () => (0, import_i18n20.__)("In-flx", "elementor"),
|
|
3019
|
+
label: (0, import_i18n20.__)("Inline-flex", "elementor"),
|
|
2984
3020
|
showTooltip: true
|
|
2985
3021
|
});
|
|
2986
3022
|
const placeholder = useDisplayPlaceholderValue();
|
|
2987
|
-
return /* @__PURE__ */
|
|
3023
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React46.createElement(import_ui38.Stack, { gap: 0.75 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n20.__)("Display", "elementor")), /* @__PURE__ */ React46.createElement(import_editor_controls19.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2988
3024
|
};
|
|
2989
3025
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2990
3026
|
|
|
2991
3027
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2992
|
-
var
|
|
2993
|
-
var
|
|
3028
|
+
var React47 = __toESM(require("react"));
|
|
3029
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
2994
3030
|
var import_icons12 = require("@elementor/icons");
|
|
2995
|
-
var
|
|
2996
|
-
var
|
|
3031
|
+
var import_ui39 = require("@elementor/ui");
|
|
3032
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
2997
3033
|
var options3 = [
|
|
2998
3034
|
{
|
|
2999
3035
|
value: "row",
|
|
3000
|
-
label: (0,
|
|
3036
|
+
label: (0, import_i18n21.__)("Row", "elementor"),
|
|
3001
3037
|
renderContent: ({ size }) => {
|
|
3002
|
-
const StartIcon5 = (0,
|
|
3003
|
-
return /* @__PURE__ */
|
|
3038
|
+
const StartIcon5 = (0, import_ui39.withDirection)(import_icons12.ArrowRightIcon);
|
|
3039
|
+
return /* @__PURE__ */ React47.createElement(StartIcon5, { fontSize: size });
|
|
3004
3040
|
},
|
|
3005
3041
|
showTooltip: true
|
|
3006
3042
|
},
|
|
3007
3043
|
{
|
|
3008
3044
|
value: "column",
|
|
3009
|
-
label: (0,
|
|
3010
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3045
|
+
label: (0, import_i18n21.__)("Column", "elementor"),
|
|
3046
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
3011
3047
|
showTooltip: true
|
|
3012
3048
|
},
|
|
3013
3049
|
{
|
|
3014
3050
|
value: "row-reverse",
|
|
3015
|
-
label: (0,
|
|
3051
|
+
label: (0, import_i18n21.__)("Reversed row", "elementor"),
|
|
3016
3052
|
renderContent: ({ size }) => {
|
|
3017
|
-
const EndIcon5 = (0,
|
|
3018
|
-
return /* @__PURE__ */
|
|
3053
|
+
const EndIcon5 = (0, import_ui39.withDirection)(import_icons12.ArrowLeftIcon);
|
|
3054
|
+
return /* @__PURE__ */ React47.createElement(EndIcon5, { fontSize: size });
|
|
3019
3055
|
},
|
|
3020
3056
|
showTooltip: true
|
|
3021
3057
|
},
|
|
3022
3058
|
{
|
|
3023
3059
|
value: "column-reverse",
|
|
3024
|
-
label: (0,
|
|
3025
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3060
|
+
label: (0, import_i18n21.__)("Reversed column", "elementor"),
|
|
3061
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
3026
3062
|
showTooltip: true
|
|
3027
3063
|
}
|
|
3028
3064
|
];
|
|
3029
3065
|
var FlexDirectionField = () => {
|
|
3030
|
-
|
|
3031
|
-
return /* @__PURE__ */ React45.createElement(import_ui37.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React45.createElement(import_ui37.ThemeProvider, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n20.__)("Direction", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React45.createElement(import_editor_controls19.ToggleControl, { options: options3 }))))));
|
|
3066
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n21.__)("Direction", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls20.ToggleControl, { options: options3 })))));
|
|
3032
3067
|
};
|
|
3033
3068
|
|
|
3034
3069
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3035
|
-
var
|
|
3036
|
-
var
|
|
3037
|
-
var
|
|
3070
|
+
var React48 = __toESM(require("react"));
|
|
3071
|
+
var import_react25 = require("react");
|
|
3072
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3038
3073
|
var import_icons13 = require("@elementor/icons");
|
|
3039
|
-
var
|
|
3040
|
-
var
|
|
3074
|
+
var import_ui40 = require("@elementor/ui");
|
|
3075
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
3041
3076
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3042
3077
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3043
3078
|
var FIRST = "first";
|
|
@@ -3050,28 +3085,26 @@ var orderValueMap = {
|
|
|
3050
3085
|
var items = [
|
|
3051
3086
|
{
|
|
3052
3087
|
value: FIRST,
|
|
3053
|
-
label: (0,
|
|
3054
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3088
|
+
label: (0, import_i18n22.__)("First", "elementor"),
|
|
3089
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons13.ArrowUpSmallIcon, { fontSize: size }),
|
|
3055
3090
|
showTooltip: true
|
|
3056
3091
|
},
|
|
3057
3092
|
{
|
|
3058
3093
|
value: LAST,
|
|
3059
|
-
label: (0,
|
|
3060
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3094
|
+
label: (0, import_i18n22.__)("Last", "elementor"),
|
|
3095
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons13.ArrowDownSmallIcon, { fontSize: size }),
|
|
3061
3096
|
showTooltip: true
|
|
3062
3097
|
},
|
|
3063
3098
|
{
|
|
3064
3099
|
value: CUSTOM,
|
|
3065
|
-
label: (0,
|
|
3066
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3100
|
+
label: (0, import_i18n22.__)("Custom", "elementor"),
|
|
3101
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
3067
3102
|
showTooltip: true
|
|
3068
3103
|
}
|
|
3069
3104
|
];
|
|
3070
3105
|
var FlexOrderField = () => {
|
|
3071
|
-
const {
|
|
3072
|
-
const [
|
|
3073
|
-
const { canEdit } = useStyle();
|
|
3074
|
-
const [groupControlValue, setGroupControlValue] = (0, import_react24.useState)(getGroupControlValue(order?.value || null));
|
|
3106
|
+
const { value: order, setValue: setOrder, canEdit } = useStylesField("order");
|
|
3107
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react25.useState)(getGroupControlValue(order?.value || null));
|
|
3075
3108
|
const handleToggleButtonChange = (group) => {
|
|
3076
3109
|
setGroupControlValue(group);
|
|
3077
3110
|
if (!group || group === CUSTOM) {
|
|
@@ -3080,8 +3113,8 @@ var FlexOrderField = () => {
|
|
|
3080
3113
|
}
|
|
3081
3114
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3082
3115
|
};
|
|
3083
|
-
return /* @__PURE__ */
|
|
3084
|
-
|
|
3116
|
+
return /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Order", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3117
|
+
import_editor_controls21.ControlToggleButtonGroup,
|
|
3085
3118
|
{
|
|
3086
3119
|
items,
|
|
3087
3120
|
value: groupControlValue,
|
|
@@ -3089,14 +3122,14 @@ var FlexOrderField = () => {
|
|
|
3089
3122
|
exclusive: true,
|
|
3090
3123
|
disabled: !canEdit
|
|
3091
3124
|
}
|
|
3092
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
3093
|
-
|
|
3125
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Custom order", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3126
|
+
import_editor_controls21.NumberControl,
|
|
3094
3127
|
{
|
|
3095
3128
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3096
3129
|
max: LAST_DEFAULT_VALUE - 1,
|
|
3097
3130
|
shouldForceInt: true
|
|
3098
3131
|
}
|
|
3099
|
-
))))))
|
|
3132
|
+
))))));
|
|
3100
3133
|
};
|
|
3101
3134
|
var getGroupControlValue = (order) => {
|
|
3102
3135
|
if (LAST_DEFAULT_VALUE === order) {
|
|
@@ -3109,46 +3142,44 @@ var getGroupControlValue = (order) => {
|
|
|
3109
3142
|
};
|
|
3110
3143
|
|
|
3111
3144
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3112
|
-
var
|
|
3113
|
-
var
|
|
3114
|
-
var
|
|
3115
|
-
var
|
|
3145
|
+
var React49 = __toESM(require("react"));
|
|
3146
|
+
var import_react26 = require("react");
|
|
3147
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3148
|
+
var import_editor_props9 = require("@elementor/editor-props");
|
|
3116
3149
|
var import_icons14 = require("@elementor/icons");
|
|
3117
|
-
var
|
|
3118
|
-
var
|
|
3150
|
+
var import_ui41 = require("@elementor/ui");
|
|
3151
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3119
3152
|
var DEFAULT = 1;
|
|
3120
3153
|
var items2 = [
|
|
3121
3154
|
{
|
|
3122
3155
|
value: "flex-grow",
|
|
3123
|
-
label: (0,
|
|
3124
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3156
|
+
label: (0, import_i18n23.__)("Grow", "elementor"),
|
|
3157
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons14.ExpandIcon, { fontSize: size }),
|
|
3125
3158
|
showTooltip: true
|
|
3126
3159
|
},
|
|
3127
3160
|
{
|
|
3128
3161
|
value: "flex-shrink",
|
|
3129
|
-
label: (0,
|
|
3130
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3162
|
+
label: (0, import_i18n23.__)("Shrink", "elementor"),
|
|
3163
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons14.ShrinkIcon, { fontSize: size }),
|
|
3131
3164
|
showTooltip: true
|
|
3132
3165
|
},
|
|
3133
3166
|
{
|
|
3134
3167
|
value: "custom",
|
|
3135
|
-
label: (0,
|
|
3136
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3168
|
+
label: (0, import_i18n23.__)("Custom", "elementor"),
|
|
3169
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons14.PencilIcon, { fontSize: size }),
|
|
3137
3170
|
showTooltip: true
|
|
3138
3171
|
}
|
|
3139
3172
|
];
|
|
3140
3173
|
var FlexSizeField = () => {
|
|
3141
|
-
const {
|
|
3142
|
-
const
|
|
3143
|
-
const
|
|
3144
|
-
const
|
|
3145
|
-
const
|
|
3146
|
-
const basis = fields?.["flex-basis"]?.value || null;
|
|
3147
|
-
const currentGroup = (0, import_react25.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
3174
|
+
const { values, setValues, canEdit } = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
3175
|
+
const grow = values?.["flex-grow"]?.value || null;
|
|
3176
|
+
const shrink = values?.["flex-shrink"]?.value || null;
|
|
3177
|
+
const basis = values?.["flex-basis"]?.value || null;
|
|
3178
|
+
const currentGroup = (0, import_react26.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react26.useState)(currentGroup);
|
|
3148
3179
|
const onChangeGroup = (group = null) => {
|
|
3149
3180
|
setActiveGroup(group);
|
|
3150
3181
|
if (!group || group === "custom") {
|
|
3151
|
-
|
|
3182
|
+
setValues({
|
|
3152
3183
|
"flex-basis": null,
|
|
3153
3184
|
"flex-grow": null,
|
|
3154
3185
|
"flex-shrink": null
|
|
@@ -3156,21 +3187,21 @@ var FlexSizeField = () => {
|
|
|
3156
3187
|
return;
|
|
3157
3188
|
}
|
|
3158
3189
|
if (group === "flex-grow") {
|
|
3159
|
-
|
|
3190
|
+
setValues({
|
|
3160
3191
|
"flex-basis": null,
|
|
3161
|
-
"flex-grow":
|
|
3192
|
+
"flex-grow": import_editor_props9.numberPropTypeUtil.create(DEFAULT),
|
|
3162
3193
|
"flex-shrink": null
|
|
3163
3194
|
});
|
|
3164
3195
|
return;
|
|
3165
3196
|
}
|
|
3166
|
-
|
|
3197
|
+
setValues({
|
|
3167
3198
|
"flex-basis": null,
|
|
3168
3199
|
"flex-grow": null,
|
|
3169
|
-
"flex-shrink":
|
|
3200
|
+
"flex-shrink": import_editor_props9.numberPropTypeUtil.create(DEFAULT)
|
|
3170
3201
|
});
|
|
3171
3202
|
};
|
|
3172
|
-
return /* @__PURE__ */
|
|
3173
|
-
|
|
3203
|
+
return /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Size", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(
|
|
3204
|
+
import_editor_controls22.ControlToggleButtonGroup,
|
|
3174
3205
|
{
|
|
3175
3206
|
value: activeGroup,
|
|
3176
3207
|
onChange: onChangeGroup,
|
|
@@ -3178,9 +3209,12 @@ var FlexSizeField = () => {
|
|
|
3178
3209
|
items: items2,
|
|
3179
3210
|
exclusive: true
|
|
3180
3211
|
}
|
|
3181
|
-
)))), "custom" === activeGroup && /* @__PURE__ */
|
|
3212
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React49.createElement(FlexCustomField, null)));
|
|
3213
|
+
};
|
|
3214
|
+
var FlexCustomField = () => {
|
|
3215
|
+
const flexBasisRowRef = (0, import_react26.useRef)();
|
|
3216
|
+
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Grow", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Shrink", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: flexBasisRowRef }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Basis", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3182
3217
|
};
|
|
3183
|
-
var FlexCustomField = () => /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n22.__)("Grow", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n22.__)("Shrink", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n22.__)("Basis", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls21.SizeControl, { extendedValues: ["auto"] })))));
|
|
3184
3218
|
var getActiveGroup = ({
|
|
3185
3219
|
grow,
|
|
3186
3220
|
shrink,
|
|
@@ -3202,22 +3236,22 @@ var getActiveGroup = ({
|
|
|
3202
3236
|
};
|
|
3203
3237
|
|
|
3204
3238
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3205
|
-
var
|
|
3206
|
-
var
|
|
3207
|
-
var
|
|
3208
|
-
var
|
|
3239
|
+
var React50 = __toESM(require("react"));
|
|
3240
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3241
|
+
var import_ui42 = require("@elementor/ui");
|
|
3242
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3209
3243
|
var GapControlField = () => {
|
|
3210
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ React50.createElement(import_ui42.Stack, { gap: 1 }, /* @__PURE__ */ React50.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React50.createElement(import_editor_controls23.GapControl, { label: (0, import_i18n24.__)("Gaps", "elementor") })));
|
|
3211
3245
|
};
|
|
3212
3246
|
|
|
3213
3247
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3214
|
-
var
|
|
3215
|
-
var
|
|
3248
|
+
var React51 = __toESM(require("react"));
|
|
3249
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3216
3250
|
var import_icons15 = require("@elementor/icons");
|
|
3217
|
-
var
|
|
3218
|
-
var
|
|
3219
|
-
var StartIcon4 = (0,
|
|
3220
|
-
var EndIcon4 = (0,
|
|
3251
|
+
var import_ui43 = require("@elementor/ui");
|
|
3252
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3253
|
+
var StartIcon4 = (0, import_ui43.withDirection)(import_icons15.JustifyTopIcon);
|
|
3254
|
+
var EndIcon4 = (0, import_ui43.withDirection)(import_icons15.JustifyBottomIcon);
|
|
3221
3255
|
var iconProps4 = {
|
|
3222
3256
|
isClockwise: true,
|
|
3223
3257
|
offset: -90
|
|
@@ -3225,93 +3259,91 @@ var iconProps4 = {
|
|
|
3225
3259
|
var options4 = [
|
|
3226
3260
|
{
|
|
3227
3261
|
value: "flex-start",
|
|
3228
|
-
label: (0,
|
|
3229
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3262
|
+
label: (0, import_i18n25.__)("Start", "elementor"),
|
|
3263
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3230
3264
|
showTooltip: true
|
|
3231
3265
|
},
|
|
3232
3266
|
{
|
|
3233
3267
|
value: "center",
|
|
3234
|
-
label: (0,
|
|
3235
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3268
|
+
label: (0, import_i18n25.__)("Center", "elementor"),
|
|
3269
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifyCenterIcon, size, ...iconProps4 }),
|
|
3236
3270
|
showTooltip: true
|
|
3237
3271
|
},
|
|
3238
3272
|
{
|
|
3239
3273
|
value: "flex-end",
|
|
3240
|
-
label: (0,
|
|
3241
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3274
|
+
label: (0, import_i18n25.__)("End", "elementor"),
|
|
3275
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3242
3276
|
showTooltip: true
|
|
3243
3277
|
},
|
|
3244
3278
|
{
|
|
3245
3279
|
value: "space-between",
|
|
3246
|
-
label: (0,
|
|
3247
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3280
|
+
label: (0, import_i18n25.__)("Space between", "elementor"),
|
|
3281
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
3248
3282
|
showTooltip: true
|
|
3249
3283
|
},
|
|
3250
3284
|
{
|
|
3251
3285
|
value: "space-around",
|
|
3252
|
-
label: (0,
|
|
3253
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3286
|
+
label: (0, import_i18n25.__)("Space around", "elementor"),
|
|
3287
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
3254
3288
|
showTooltip: true
|
|
3255
3289
|
},
|
|
3256
3290
|
{
|
|
3257
3291
|
value: "space-evenly",
|
|
3258
|
-
label: (0,
|
|
3259
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3292
|
+
label: (0, import_i18n25.__)("Space evenly", "elementor"),
|
|
3293
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
3260
3294
|
showTooltip: true
|
|
3261
3295
|
}
|
|
3262
3296
|
];
|
|
3263
3297
|
var JustifyContentField = () => {
|
|
3264
|
-
|
|
3265
|
-
return /* @__PURE__ */ React49.createElement(import_ui41.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React49.createElement(import_ui41.ThemeProvider, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React49.createElement(import_ui41.Stack, { gap: 0.75 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n24.__)("Justify content", "elementor")), /* @__PURE__ */ React49.createElement(import_editor_controls23.ToggleControl, { options: options4, fullWidth: true })))));
|
|
3298
|
+
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React51.createElement(import_ui43.Stack, { gap: 0.75 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, (0, import_i18n25.__)("Justify content", "elementor")), /* @__PURE__ */ React51.createElement(import_editor_controls24.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3266
3299
|
};
|
|
3267
3300
|
|
|
3268
3301
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3269
|
-
var
|
|
3270
|
-
var
|
|
3271
|
-
var import_icons16 = require("@elementor/icons");
|
|
3272
|
-
var
|
|
3273
|
-
var
|
|
3302
|
+
var React52 = __toESM(require("react"));
|
|
3303
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
3304
|
+
var import_icons16 = require("@elementor/icons");
|
|
3305
|
+
var import_ui44 = require("@elementor/ui");
|
|
3306
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
3274
3307
|
var options5 = [
|
|
3275
3308
|
{
|
|
3276
3309
|
value: "nowrap",
|
|
3277
|
-
label: (0,
|
|
3278
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3310
|
+
label: (0, import_i18n26.__)("No wrap", "elementor"),
|
|
3311
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.ArrowRightIcon, { fontSize: size }),
|
|
3279
3312
|
showTooltip: true
|
|
3280
3313
|
},
|
|
3281
3314
|
{
|
|
3282
3315
|
value: "wrap",
|
|
3283
|
-
label: (0,
|
|
3284
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3316
|
+
label: (0, import_i18n26.__)("Wrap", "elementor"),
|
|
3317
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.ArrowBackIcon, { fontSize: size }),
|
|
3285
3318
|
showTooltip: true
|
|
3286
3319
|
},
|
|
3287
3320
|
{
|
|
3288
3321
|
value: "wrap-reverse",
|
|
3289
|
-
label: (0,
|
|
3290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3322
|
+
label: (0, import_i18n26.__)("Reversed wrap", "elementor"),
|
|
3323
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.ArrowForwardIcon, { fontSize: size }),
|
|
3291
3324
|
showTooltip: true
|
|
3292
3325
|
}
|
|
3293
3326
|
];
|
|
3294
3327
|
var WrapField = () => {
|
|
3295
|
-
|
|
3296
|
-
return /* @__PURE__ */ React50.createElement(import_ui42.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React50.createElement(import_ui42.ThemeProvider, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React50.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel, null, (0, import_i18n25.__)("Wrap", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui42.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React50.createElement(import_editor_controls24.ToggleControl, { options: options5 }))))));
|
|
3328
|
+
return /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, (0, import_i18n26.__)("Wrap", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React52.createElement(import_editor_controls25.ToggleControl, { options: options5 })))));
|
|
3297
3329
|
};
|
|
3298
3330
|
|
|
3299
3331
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3300
3332
|
var LayoutSection = () => {
|
|
3301
|
-
const
|
|
3333
|
+
const { value: display } = useStylesField("display");
|
|
3302
3334
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
3303
3335
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
3304
3336
|
const { element } = useElement();
|
|
3305
3337
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
3306
3338
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3307
3339
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3308
|
-
return /* @__PURE__ */
|
|
3340
|
+
return /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React53.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React53.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3309
3341
|
};
|
|
3310
3342
|
var FlexFields = () => {
|
|
3311
|
-
const
|
|
3312
|
-
return /* @__PURE__ */
|
|
3343
|
+
const { value: flexWrap } = useStylesField("flex-wrap");
|
|
3344
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(FlexDirectionField, null), /* @__PURE__ */ React53.createElement(JustifyContentField, null), /* @__PURE__ */ React53.createElement(AlignItemsField, null), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(GapControlField, null), /* @__PURE__ */ React53.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React53.createElement(AlignContentField, null));
|
|
3313
3345
|
};
|
|
3314
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3346
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(import_editor_controls26.ControlFormLabel, null, (0, import_i18n27.__)("Flex child", "elementor")), /* @__PURE__ */ React53.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React53.createElement(FlexOrderField, null), /* @__PURE__ */ React53.createElement(FlexSizeField, null));
|
|
3315
3347
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3316
3348
|
const value = display?.value ?? local?.value;
|
|
3317
3349
|
if (!value) {
|
|
@@ -3321,72 +3353,92 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3321
3353
|
};
|
|
3322
3354
|
|
|
3323
3355
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3324
|
-
var
|
|
3356
|
+
var React58 = __toESM(require("react"));
|
|
3325
3357
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
3326
3358
|
var import_session3 = require("@elementor/session");
|
|
3327
3359
|
|
|
3328
3360
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3329
|
-
var
|
|
3330
|
-
var
|
|
3361
|
+
var React54 = __toESM(require("react"));
|
|
3362
|
+
var import_react27 = require("react");
|
|
3363
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3331
3364
|
var import_icons17 = require("@elementor/icons");
|
|
3332
|
-
var
|
|
3333
|
-
var
|
|
3334
|
-
var InlineStartIcon2 = (0,
|
|
3335
|
-
var InlineEndIcon2 = (0,
|
|
3365
|
+
var import_ui45 = require("@elementor/ui");
|
|
3366
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
3367
|
+
var InlineStartIcon2 = (0, import_ui45.withDirection)(import_icons17.SideLeftIcon);
|
|
3368
|
+
var InlineEndIcon2 = (0, import_ui45.withDirection)(import_icons17.SideRightIcon);
|
|
3336
3369
|
var sideIcons = {
|
|
3337
|
-
"inset-block-start": /* @__PURE__ */
|
|
3338
|
-
"inset-block-end": /* @__PURE__ */
|
|
3339
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3340
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3370
|
+
"inset-block-start": /* @__PURE__ */ React54.createElement(import_icons17.SideTopIcon, { fontSize: "tiny" }),
|
|
3371
|
+
"inset-block-end": /* @__PURE__ */ React54.createElement(import_icons17.SideBottomIcon, { fontSize: "tiny" }),
|
|
3372
|
+
"inset-inline-start": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3373
|
+
"inset-inline-end": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3341
3374
|
};
|
|
3342
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3343
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3375
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n28.__)("Right", "elementor") : (0, import_i18n28.__)("Left", "elementor");
|
|
3376
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n28.__)("Left", "elementor") : (0, import_i18n28.__)("Right", "elementor");
|
|
3344
3377
|
var DimensionsField = () => {
|
|
3345
3378
|
const { isSiteRtl } = useDirection();
|
|
3346
|
-
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3379
|
+
const rowRefs = [(0, import_react27.useRef)(), (0, import_react27.useRef)()];
|
|
3380
|
+
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(import_ui45.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n28.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React54.createElement(
|
|
3381
|
+
DimensionField,
|
|
3382
|
+
{
|
|
3383
|
+
side: "inset-inline-end",
|
|
3384
|
+
label: getInlineEndLabel(isSiteRtl),
|
|
3385
|
+
rowRef: rowRefs[0]
|
|
3386
|
+
}
|
|
3387
|
+
)), /* @__PURE__ */ React54.createElement(import_ui45.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n28.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React54.createElement(
|
|
3388
|
+
DimensionField,
|
|
3389
|
+
{
|
|
3390
|
+
side: "inset-inline-start",
|
|
3391
|
+
label: getInlineStartLabel(isSiteRtl),
|
|
3392
|
+
rowRef: rowRefs[1]
|
|
3393
|
+
}
|
|
3394
|
+
)));
|
|
3350
3395
|
};
|
|
3396
|
+
var DimensionField = ({
|
|
3397
|
+
side,
|
|
3398
|
+
label,
|
|
3399
|
+
rowRef
|
|
3400
|
+
}) => /* @__PURE__ */ React54.createElement(StylesField, { bind: side }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, label)), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(import_editor_controls27.SizeControl, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3351
3401
|
|
|
3352
3402
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3353
|
-
var
|
|
3354
|
-
var
|
|
3355
|
-
var
|
|
3356
|
-
var
|
|
3403
|
+
var React55 = __toESM(require("react"));
|
|
3404
|
+
var import_react28 = require("react");
|
|
3405
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3406
|
+
var import_ui46 = require("@elementor/ui");
|
|
3407
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
3357
3408
|
var OffsetField = () => {
|
|
3358
|
-
|
|
3409
|
+
const rowRef = (0, import_react28.useRef)();
|
|
3410
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, (0, import_i18n29.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls28.SizeControl, { units: ["px", "em", "rem", "vw", "vh"], anchorRef: rowRef }))));
|
|
3359
3411
|
};
|
|
3360
3412
|
|
|
3361
3413
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
var
|
|
3365
|
-
var
|
|
3414
|
+
var React56 = __toESM(require("react"));
|
|
3415
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3416
|
+
var import_ui47 = require("@elementor/ui");
|
|
3417
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
3366
3418
|
var positionOptions = [
|
|
3367
|
-
{ label: (0,
|
|
3368
|
-
{ label: (0,
|
|
3369
|
-
{ label: (0,
|
|
3370
|
-
{ label: (0,
|
|
3371
|
-
{ label: (0,
|
|
3419
|
+
{ label: (0, import_i18n30.__)("Static", "elementor"), value: "static" },
|
|
3420
|
+
{ label: (0, import_i18n30.__)("Relative", "elementor"), value: "relative" },
|
|
3421
|
+
{ label: (0, import_i18n30.__)("Absolute", "elementor"), value: "absolute" },
|
|
3422
|
+
{ label: (0, import_i18n30.__)("Fixed", "elementor"), value: "fixed" },
|
|
3423
|
+
{ label: (0, import_i18n30.__)("Sticky", "elementor"), value: "sticky" }
|
|
3372
3424
|
];
|
|
3373
3425
|
var PositionField = ({ onChange }) => {
|
|
3374
|
-
return /* @__PURE__ */
|
|
3426
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, (0, import_i18n30.__)("Position", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React56.createElement(import_editor_controls29.SelectControl, { options: positionOptions, onChange }))));
|
|
3375
3427
|
};
|
|
3376
3428
|
|
|
3377
3429
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3378
|
-
var
|
|
3379
|
-
var
|
|
3380
|
-
var
|
|
3381
|
-
var
|
|
3430
|
+
var React57 = __toESM(require("react"));
|
|
3431
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3432
|
+
var import_ui48 = require("@elementor/ui");
|
|
3433
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
3382
3434
|
var ZIndexField = () => {
|
|
3383
|
-
return /* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React57.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n31.__)("Z-index", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(import_editor_controls30.NumberControl, null))));
|
|
3384
3436
|
};
|
|
3385
3437
|
|
|
3386
3438
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3387
3439
|
var PositionSection = () => {
|
|
3388
|
-
const
|
|
3389
|
-
const
|
|
3440
|
+
const { value: positionValue } = useStylesField("position");
|
|
3441
|
+
const { values: dimensions, setValues: setDimensions } = useStylesFields([
|
|
3390
3442
|
"inset-block-start",
|
|
3391
3443
|
"inset-block-end",
|
|
3392
3444
|
"inset-inline-start",
|
|
@@ -3396,9 +3448,9 @@ var PositionSection = () => {
|
|
|
3396
3448
|
const isCssIdFeatureActive = (0, import_editor_v1_adapters10.isExperimentActive)("e_v_3_30");
|
|
3397
3449
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3398
3450
|
if (newPosition === "static") {
|
|
3399
|
-
if (
|
|
3400
|
-
updateDimensionsHistory(
|
|
3401
|
-
|
|
3451
|
+
if (dimensions) {
|
|
3452
|
+
updateDimensionsHistory(dimensions);
|
|
3453
|
+
setDimensions({
|
|
3402
3454
|
"inset-block-start": void 0,
|
|
3403
3455
|
"inset-block-end": void 0,
|
|
3404
3456
|
"inset-inline-start": void 0,
|
|
@@ -3407,13 +3459,13 @@ var PositionSection = () => {
|
|
|
3407
3459
|
}
|
|
3408
3460
|
} else if (previousPosition === "static") {
|
|
3409
3461
|
if (dimensionsValuesFromHistory) {
|
|
3410
|
-
|
|
3462
|
+
setDimensions(dimensionsValuesFromHistory);
|
|
3411
3463
|
clearDimensionsHistory();
|
|
3412
3464
|
}
|
|
3413
3465
|
}
|
|
3414
3466
|
};
|
|
3415
3467
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3416
|
-
return /* @__PURE__ */
|
|
3468
|
+
return /* @__PURE__ */ React58.createElement(SectionContent, null, /* @__PURE__ */ React58.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(DimensionsField, null), /* @__PURE__ */ React58.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(OffsetField, null)));
|
|
3417
3469
|
};
|
|
3418
3470
|
var usePersistDimensions = () => {
|
|
3419
3471
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3423,49 +3475,55 @@ var usePersistDimensions = () => {
|
|
|
3423
3475
|
};
|
|
3424
3476
|
|
|
3425
3477
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3426
|
-
var
|
|
3427
|
-
var
|
|
3478
|
+
var React64 = __toESM(require("react"));
|
|
3479
|
+
var import_react29 = require("react");
|
|
3480
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
3428
3481
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
3429
|
-
var
|
|
3482
|
+
var import_ui52 = require("@elementor/ui");
|
|
3430
3483
|
var import_i18n35 = require("@wordpress/i18n");
|
|
3431
3484
|
|
|
3432
3485
|
// src/components/style-tab-collapsible-content.tsx
|
|
3433
|
-
var
|
|
3486
|
+
var React60 = __toESM(require("react"));
|
|
3434
3487
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
3435
3488
|
|
|
3436
3489
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3437
|
-
var
|
|
3438
|
-
var
|
|
3439
|
-
var
|
|
3440
|
-
var
|
|
3441
|
-
var orderedVariants = ["global", "local", "overridden"];
|
|
3490
|
+
var React59 = __toESM(require("react"));
|
|
3491
|
+
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
3492
|
+
var import_ui49 = require("@elementor/ui");
|
|
3493
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
3442
3494
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3443
|
-
const { id, meta } = useStyle();
|
|
3495
|
+
const { id, meta, provider } = useStyle();
|
|
3444
3496
|
const snapshot = useStylesInheritanceSnapshot();
|
|
3445
3497
|
const snapshotFields = Object.fromEntries(
|
|
3446
3498
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
3447
3499
|
);
|
|
3448
|
-
const
|
|
3449
|
-
if (
|
|
3500
|
+
const { hasValues, hasOverrides } = getIndicators(snapshotFields, id ?? "", meta);
|
|
3501
|
+
if (!hasValues && !hasOverrides) {
|
|
3450
3502
|
return null;
|
|
3451
3503
|
}
|
|
3452
|
-
const
|
|
3453
|
-
const
|
|
3454
|
-
return /* @__PURE__ */
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3504
|
+
const hasValueLabel = (0, import_i18n32.__)("Has effective styles", "elementor");
|
|
3505
|
+
const hasOverridesLabel = (0, import_i18n32.__)("Has overridden styles", "elementor");
|
|
3506
|
+
return /* @__PURE__ */ React59.createElement(import_ui49.Tooltip, { title: (0, import_i18n32.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React59.createElement(import_ui49.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React59.createElement(
|
|
3507
|
+
StyleIndicator,
|
|
3508
|
+
{
|
|
3509
|
+
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3510
|
+
"data-variant": (0, import_editor_styles_repository12.isElementsStylesProvider)(provider.getKey()) ? "local" : "global",
|
|
3511
|
+
role: "listitem",
|
|
3512
|
+
"aria-label": hasValueLabel
|
|
3513
|
+
}
|
|
3514
|
+
), hasOverrides && /* @__PURE__ */ React59.createElement(
|
|
3515
|
+
StyleIndicator,
|
|
3516
|
+
{
|
|
3517
|
+
isOverridden: true,
|
|
3518
|
+
"data-variant": "overridden",
|
|
3519
|
+
role: "listitem",
|
|
3520
|
+
"aria-label": hasOverridesLabel
|
|
3521
|
+
}
|
|
3465
3522
|
)));
|
|
3466
3523
|
};
|
|
3467
3524
|
function getIndicators(snapshotFields, styleId, meta) {
|
|
3468
|
-
|
|
3525
|
+
let hasValues = false;
|
|
3526
|
+
let hasOverrides = false;
|
|
3469
3527
|
Object.values(snapshotFields).forEach((inheritanceChain) => {
|
|
3470
3528
|
const currentStyle = getCurrentStyleFromChain(inheritanceChain, styleId, meta);
|
|
3471
3529
|
if (!currentStyle) {
|
|
@@ -3473,19 +3531,12 @@ function getIndicators(snapshotFields, styleId, meta) {
|
|
|
3473
3531
|
}
|
|
3474
3532
|
const [actualStyle] = inheritanceChain;
|
|
3475
3533
|
if (currentStyle === actualStyle) {
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
return;
|
|
3480
|
-
}
|
|
3481
|
-
if (providerKey !== import_editor_styles_repository11.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
3482
|
-
indicators.global = true;
|
|
3483
|
-
}
|
|
3484
|
-
return;
|
|
3534
|
+
hasValues = true;
|
|
3535
|
+
} else {
|
|
3536
|
+
hasOverrides = true;
|
|
3485
3537
|
}
|
|
3486
|
-
indicators.overridden = true;
|
|
3487
3538
|
});
|
|
3488
|
-
return
|
|
3539
|
+
return { hasValues, hasOverrides };
|
|
3489
3540
|
}
|
|
3490
3541
|
function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
3491
3542
|
return chain.find(
|
|
@@ -3500,153 +3551,162 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3500
3551
|
|
|
3501
3552
|
// src/components/style-tab-collapsible-content.tsx
|
|
3502
3553
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3503
|
-
return /* @__PURE__ */
|
|
3554
|
+
return /* @__PURE__ */ React60.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3504
3555
|
};
|
|
3505
3556
|
function getStylesInheritanceIndicators(fields) {
|
|
3506
3557
|
const isUsingFieldsIndicators = (0, import_editor_v1_adapters11.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3507
3558
|
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3508
3559
|
return null;
|
|
3509
3560
|
}
|
|
3510
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3561
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React60.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3511
3562
|
}
|
|
3512
3563
|
|
|
3513
3564
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3514
|
-
var
|
|
3515
|
-
var
|
|
3516
|
-
var
|
|
3517
|
-
var
|
|
3565
|
+
var React61 = __toESM(require("react"));
|
|
3566
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3567
|
+
var import_ui50 = require("@elementor/ui");
|
|
3568
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
3518
3569
|
var positionOptions2 = [
|
|
3519
|
-
{ label: (0,
|
|
3520
|
-
{ label: (0,
|
|
3521
|
-
{ label: (0,
|
|
3522
|
-
{ label: (0,
|
|
3523
|
-
{ label: (0,
|
|
3570
|
+
{ label: (0, import_i18n33.__)("Fill", "elementor"), value: "fill" },
|
|
3571
|
+
{ label: (0, import_i18n33.__)("Cover", "elementor"), value: "cover" },
|
|
3572
|
+
{ label: (0, import_i18n33.__)("Contain", "elementor"), value: "contain" },
|
|
3573
|
+
{ label: (0, import_i18n33.__)("None", "elementor"), value: "none" },
|
|
3574
|
+
{ label: (0, import_i18n33.__)("Scale down", "elementor"), value: "scale-down" }
|
|
3524
3575
|
];
|
|
3525
3576
|
var ObjectFitField = () => {
|
|
3526
|
-
return /* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n33.__)("Object fit", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React61.createElement(import_editor_controls31.SelectControl, { options: positionOptions2 }))));
|
|
3527
3578
|
};
|
|
3528
3579
|
|
|
3529
3580
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3530
|
-
var
|
|
3531
|
-
var
|
|
3532
|
-
var import_ui49 = require("@elementor/ui");
|
|
3533
|
-
var import_i18n33 = require("@wordpress/i18n");
|
|
3534
|
-
var positionOptions3 = [
|
|
3535
|
-
{ label: (0, import_i18n33.__)("Center center", "elementor"), value: "center center" },
|
|
3536
|
-
{ label: (0, import_i18n33.__)("Center left", "elementor"), value: "center left" },
|
|
3537
|
-
{ label: (0, import_i18n33.__)("Center right", "elementor"), value: "center right" },
|
|
3538
|
-
{ label: (0, import_i18n33.__)("Top center", "elementor"), value: "top center" },
|
|
3539
|
-
{ label: (0, import_i18n33.__)("Top left", "elementor"), value: "top left" },
|
|
3540
|
-
{ label: (0, import_i18n33.__)("Top right", "elementor"), value: "top right" },
|
|
3541
|
-
{ label: (0, import_i18n33.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
3542
|
-
{ label: (0, import_i18n33.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
3543
|
-
{ label: (0, import_i18n33.__)("Bottom right", "elementor"), value: "bottom right" }
|
|
3544
|
-
];
|
|
3581
|
+
var React62 = __toESM(require("react"));
|
|
3582
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3545
3583
|
var ObjectPositionField = () => {
|
|
3546
|
-
return /* @__PURE__ */
|
|
3584
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React62.createElement(import_editor_controls32.PositionControl, null));
|
|
3547
3585
|
};
|
|
3548
3586
|
|
|
3549
3587
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3550
|
-
var
|
|
3551
|
-
var
|
|
3588
|
+
var React63 = __toESM(require("react"));
|
|
3589
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
3552
3590
|
var import_icons18 = require("@elementor/icons");
|
|
3553
|
-
var
|
|
3591
|
+
var import_ui51 = require("@elementor/ui");
|
|
3554
3592
|
var import_i18n34 = require("@wordpress/i18n");
|
|
3555
3593
|
var options6 = [
|
|
3556
3594
|
{
|
|
3557
3595
|
value: "visible",
|
|
3558
3596
|
label: (0, import_i18n34.__)("Visible", "elementor"),
|
|
3559
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3597
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons18.EyeIcon, { fontSize: size }),
|
|
3560
3598
|
showTooltip: true
|
|
3561
3599
|
},
|
|
3562
3600
|
{
|
|
3563
3601
|
value: "hidden",
|
|
3564
3602
|
label: (0, import_i18n34.__)("Hidden", "elementor"),
|
|
3565
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3603
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons18.EyeOffIcon, { fontSize: size }),
|
|
3566
3604
|
showTooltip: true
|
|
3567
3605
|
},
|
|
3568
3606
|
{
|
|
3569
3607
|
value: "auto",
|
|
3570
3608
|
label: (0, import_i18n34.__)("Auto", "elementor"),
|
|
3571
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3609
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons18.LetterAIcon, { fontSize: size }),
|
|
3572
3610
|
showTooltip: true
|
|
3573
3611
|
}
|
|
3574
3612
|
];
|
|
3575
3613
|
var OverflowField = () => {
|
|
3576
|
-
return /* @__PURE__ */
|
|
3614
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React63.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, (0, import_i18n34.__)("Overflow", "elementor"))), /* @__PURE__ */ React63.createElement(import_ui51.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React63.createElement(import_editor_controls33.ToggleControl, { options: options6 }))));
|
|
3577
3615
|
};
|
|
3578
3616
|
|
|
3579
3617
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3580
|
-
var
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
const isVersion330Active = (0, import_editor_v1_adapters12.isExperimentActive)("e_v_3_30");
|
|
3584
|
-
return /* @__PURE__ */ React62.createElement(SectionContent, null, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(SizeField, { bind: "width", label: (0, import_i18n35.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(SizeField, { bind: "height", label: (0, import_i18n35.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React62.createElement(import_ui51.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(
|
|
3585
|
-
SizeField,
|
|
3618
|
+
var EXPERIMENT_ID = "e_v_3_30";
|
|
3619
|
+
var CssSizeProps = [
|
|
3620
|
+
[
|
|
3586
3621
|
{
|
|
3587
|
-
bind: "
|
|
3588
|
-
label: (0, import_i18n35.__)("
|
|
3589
|
-
|
|
3622
|
+
bind: "width",
|
|
3623
|
+
label: (0, import_i18n35.__)("Width", "elementor")
|
|
3624
|
+
},
|
|
3625
|
+
{
|
|
3626
|
+
bind: "height",
|
|
3627
|
+
label: (0, import_i18n35.__)("Height", "elementor")
|
|
3590
3628
|
}
|
|
3591
|
-
|
|
3592
|
-
|
|
3629
|
+
],
|
|
3630
|
+
[
|
|
3631
|
+
{
|
|
3632
|
+
bind: "min-width",
|
|
3633
|
+
label: (0, import_i18n35.__)("Min width", "elementor")
|
|
3634
|
+
},
|
|
3593
3635
|
{
|
|
3594
3636
|
bind: "min-height",
|
|
3595
|
-
label: (0, import_i18n35.__)("Min height", "elementor")
|
|
3596
|
-
|
|
3637
|
+
label: (0, import_i18n35.__)("Min height", "elementor")
|
|
3638
|
+
}
|
|
3639
|
+
],
|
|
3640
|
+
[
|
|
3641
|
+
{
|
|
3642
|
+
bind: "max-width",
|
|
3643
|
+
label: (0, import_i18n35.__)("Max width", "elementor")
|
|
3644
|
+
},
|
|
3645
|
+
{
|
|
3646
|
+
bind: "max-height",
|
|
3647
|
+
label: (0, import_i18n35.__)("Max height", "elementor")
|
|
3597
3648
|
}
|
|
3598
|
-
|
|
3649
|
+
]
|
|
3650
|
+
];
|
|
3651
|
+
var SizeSection = () => {
|
|
3652
|
+
const { value: fitValue } = useStylesField("object-fit");
|
|
3653
|
+
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3654
|
+
const gridRowRefs = [(0, import_react29.useRef)(), (0, import_react29.useRef)(), (0, import_react29.useRef)()];
|
|
3655
|
+
const isVersion330Active = (0, import_editor_v1_adapters12.isExperimentActive)(EXPERIMENT_ID);
|
|
3656
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React64.createElement(import_ui52.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React64.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(import_ui52.Stack, null, /* @__PURE__ */ React64.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React64.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React64.createElement(import_ui52.Stack, { gap: 2 }, /* @__PURE__ */ React64.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React64.createElement(import_editor_controls34.AspectRatioControl, { label: (0, import_i18n35.__)("Aspect Ratio", "elementor") })), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ObjectPositionField, null)))));
|
|
3599
3657
|
};
|
|
3600
|
-
var SizeField = ({ label, bind,
|
|
3601
|
-
return /* @__PURE__ */
|
|
3658
|
+
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3659
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind }, /* @__PURE__ */ React64.createElement(import_ui52.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, label)), /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(import_editor_controls34.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
3602
3660
|
};
|
|
3603
3661
|
|
|
3604
3662
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3605
|
-
var
|
|
3606
|
-
var
|
|
3663
|
+
var React65 = __toESM(require("react"));
|
|
3664
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
3607
3665
|
var import_i18n36 = require("@wordpress/i18n");
|
|
3608
3666
|
var SpacingSection = () => {
|
|
3609
3667
|
const { isSiteRtl } = useDirection();
|
|
3610
|
-
return /* @__PURE__ */
|
|
3611
|
-
|
|
3668
|
+
return /* @__PURE__ */ React65.createElement(SectionContent, null, /* @__PURE__ */ React65.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React65.createElement(
|
|
3669
|
+
import_editor_controls35.LinkedDimensionsControl,
|
|
3612
3670
|
{
|
|
3613
3671
|
label: (0, import_i18n36.__)("Margin", "elementor"),
|
|
3614
3672
|
isSiteRtl,
|
|
3615
|
-
|
|
3673
|
+
extendedOptions: ["auto"]
|
|
3616
3674
|
}
|
|
3617
|
-
)), /* @__PURE__ */
|
|
3675
|
+
)), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React65.createElement(import_editor_controls35.LinkedDimensionsControl, { label: (0, import_i18n36.__)("Padding", "elementor"), isSiteRtl })));
|
|
3618
3676
|
};
|
|
3619
3677
|
|
|
3620
3678
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3621
|
-
var
|
|
3679
|
+
var React81 = __toESM(require("react"));
|
|
3622
3680
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
3623
3681
|
|
|
3624
3682
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3625
|
-
var
|
|
3626
|
-
var
|
|
3627
|
-
var
|
|
3683
|
+
var React66 = __toESM(require("react"));
|
|
3684
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
3685
|
+
var import_ui53 = require("@elementor/ui");
|
|
3628
3686
|
var import_i18n37 = require("@wordpress/i18n");
|
|
3629
3687
|
var ColumnCountField = () => {
|
|
3630
|
-
return /* @__PURE__ */
|
|
3688
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React66.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React66.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, (0, import_i18n37.__)("Columns", "elementor"))), /* @__PURE__ */ React66.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(import_editor_controls36.NumberControl, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
3631
3689
|
};
|
|
3632
3690
|
|
|
3633
3691
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3634
|
-
var
|
|
3635
|
-
var
|
|
3636
|
-
var
|
|
3692
|
+
var React67 = __toESM(require("react"));
|
|
3693
|
+
var import_react30 = require("react");
|
|
3694
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3695
|
+
var import_ui54 = require("@elementor/ui");
|
|
3637
3696
|
var import_i18n38 = require("@wordpress/i18n");
|
|
3638
3697
|
var ColumnGapField = () => {
|
|
3639
|
-
|
|
3698
|
+
const rowRef = (0, import_react30.useRef)();
|
|
3699
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React67.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React67.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, (0, import_i18n38.__)("Column gap", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(import_editor_controls37.SizeControl, { anchorRef: rowRef }))));
|
|
3640
3700
|
};
|
|
3641
3701
|
|
|
3642
3702
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3643
|
-
var
|
|
3644
|
-
var
|
|
3645
|
-
var
|
|
3703
|
+
var React68 = __toESM(require("react"));
|
|
3704
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3705
|
+
var import_ui55 = require("@elementor/ui");
|
|
3646
3706
|
var import_i18n40 = require("@wordpress/i18n");
|
|
3647
3707
|
|
|
3648
3708
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3649
|
-
var
|
|
3709
|
+
var import_react31 = require("react");
|
|
3650
3710
|
var import_i18n39 = require("@wordpress/i18n");
|
|
3651
3711
|
var supportedCategories = {
|
|
3652
3712
|
system: (0, import_i18n39.__)("System", "elementor"),
|
|
@@ -3663,7 +3723,7 @@ var getFontFamilies = () => {
|
|
|
3663
3723
|
};
|
|
3664
3724
|
var useFontFamilies = () => {
|
|
3665
3725
|
const fontFamilies = getFontFamilies();
|
|
3666
|
-
return (0,
|
|
3726
|
+
return (0, import_react31.useMemo)(() => {
|
|
3667
3727
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
3668
3728
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
3669
3729
|
if (!supportedCategories[category]) {
|
|
@@ -3688,44 +3748,46 @@ var FontFamilyField = () => {
|
|
|
3688
3748
|
if (fontFamilies.length === 0) {
|
|
3689
3749
|
return null;
|
|
3690
3750
|
}
|
|
3691
|
-
return /* @__PURE__ */
|
|
3751
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React68.createElement(import_ui55.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, (0, import_i18n40.__)("Font family", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui55.Grid, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React68.createElement(import_editor_controls38.FontFamilyControl, { fontFamilies }))));
|
|
3692
3752
|
};
|
|
3693
3753
|
|
|
3694
3754
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3695
|
-
var
|
|
3696
|
-
var
|
|
3697
|
-
var
|
|
3755
|
+
var React69 = __toESM(require("react"));
|
|
3756
|
+
var import_react32 = require("react");
|
|
3757
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3758
|
+
var import_ui56 = require("@elementor/ui");
|
|
3698
3759
|
var import_i18n41 = require("@wordpress/i18n");
|
|
3699
3760
|
var FontSizeField = () => {
|
|
3700
|
-
|
|
3761
|
+
const rowRef = (0, import_react32.useRef)();
|
|
3762
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React69.createElement(import_ui56.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React69.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, (0, import_i18n41.__)("Font size", "elementor"))), /* @__PURE__ */ React69.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(import_editor_controls39.SizeControl, { anchorRef: rowRef }))));
|
|
3701
3763
|
};
|
|
3702
3764
|
|
|
3703
3765
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3704
|
-
var
|
|
3705
|
-
var
|
|
3766
|
+
var React70 = __toESM(require("react"));
|
|
3767
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
3706
3768
|
var import_icons19 = require("@elementor/icons");
|
|
3707
|
-
var
|
|
3769
|
+
var import_ui57 = require("@elementor/ui");
|
|
3708
3770
|
var import_i18n42 = require("@wordpress/i18n");
|
|
3709
3771
|
var options7 = [
|
|
3710
3772
|
{
|
|
3711
3773
|
value: "normal",
|
|
3712
3774
|
label: (0, import_i18n42.__)("Normal", "elementor"),
|
|
3713
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3775
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
3714
3776
|
showTooltip: true
|
|
3715
3777
|
},
|
|
3716
3778
|
{
|
|
3717
3779
|
value: "italic",
|
|
3718
3780
|
label: (0, import_i18n42.__)("Italic", "elementor"),
|
|
3719
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3781
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(import_icons19.ItalicIcon, { fontSize: size }),
|
|
3720
3782
|
showTooltip: true
|
|
3721
3783
|
}
|
|
3722
3784
|
];
|
|
3723
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3785
|
+
var FontStyleField = () => /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React70.createElement(import_ui57.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(import_editor_controls40.ControlFormLabel, null, (0, import_i18n42.__)("Font style", "elementor"))), /* @__PURE__ */ React70.createElement(import_ui57.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React70.createElement(import_editor_controls40.ToggleControl, { options: options7 }))));
|
|
3724
3786
|
|
|
3725
3787
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3726
|
-
var
|
|
3727
|
-
var
|
|
3728
|
-
var
|
|
3788
|
+
var React71 = __toESM(require("react"));
|
|
3789
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3790
|
+
var import_ui58 = require("@elementor/ui");
|
|
3729
3791
|
var import_i18n43 = require("@wordpress/i18n");
|
|
3730
3792
|
var fontWeightOptions = [
|
|
3731
3793
|
{ value: "100", label: (0, import_i18n43.__)("100 - Thin", "elementor") },
|
|
@@ -3739,136 +3801,140 @@ var fontWeightOptions = [
|
|
|
3739
3801
|
{ value: "900", label: (0, import_i18n43.__)("900 - Black", "elementor") }
|
|
3740
3802
|
];
|
|
3741
3803
|
var FontWeightField = () => {
|
|
3742
|
-
return /* @__PURE__ */
|
|
3804
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React71.createElement(import_ui58.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React71.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, (0, import_i18n43.__)("Font weight", "elementor"))), /* @__PURE__ */ React71.createElement(import_ui58.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React71.createElement(import_editor_controls41.SelectControl, { options: fontWeightOptions }))));
|
|
3743
3805
|
};
|
|
3744
3806
|
|
|
3745
3807
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3746
|
-
var
|
|
3747
|
-
var
|
|
3748
|
-
var
|
|
3808
|
+
var React72 = __toESM(require("react"));
|
|
3809
|
+
var import_react33 = require("react");
|
|
3810
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3811
|
+
var import_ui59 = require("@elementor/ui");
|
|
3749
3812
|
var import_i18n44 = require("@wordpress/i18n");
|
|
3750
3813
|
var LetterSpacingField = () => {
|
|
3751
|
-
|
|
3814
|
+
const rowRef = (0, import_react33.useRef)();
|
|
3815
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React72.createElement(import_ui59.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React72.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, (0, import_i18n44.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React72.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef }))));
|
|
3752
3816
|
};
|
|
3753
3817
|
|
|
3754
3818
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3755
|
-
var
|
|
3756
|
-
var
|
|
3757
|
-
var
|
|
3819
|
+
var React73 = __toESM(require("react"));
|
|
3820
|
+
var import_react34 = require("react");
|
|
3821
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3822
|
+
var import_ui60 = require("@elementor/ui");
|
|
3758
3823
|
var import_i18n45 = require("@wordpress/i18n");
|
|
3759
3824
|
var LineHeightField = () => {
|
|
3760
|
-
|
|
3825
|
+
const rowRef = (0, import_react34.useRef)();
|
|
3826
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React73.createElement(import_ui60.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React73.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, (0, import_i18n45.__)("Line height", "elementor"))), /* @__PURE__ */ React73.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(import_editor_controls43.SizeControl, { anchorRef: rowRef }))));
|
|
3761
3827
|
};
|
|
3762
3828
|
|
|
3763
3829
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3764
|
-
var
|
|
3765
|
-
var
|
|
3830
|
+
var React74 = __toESM(require("react"));
|
|
3831
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3766
3832
|
var import_icons20 = require("@elementor/icons");
|
|
3767
|
-
var
|
|
3833
|
+
var import_ui61 = require("@elementor/ui");
|
|
3768
3834
|
var import_i18n46 = require("@wordpress/i18n");
|
|
3769
|
-
var AlignStartIcon = (0,
|
|
3770
|
-
var AlignEndIcon = (0,
|
|
3835
|
+
var AlignStartIcon = (0, import_ui61.withDirection)(import_icons20.AlignLeftIcon);
|
|
3836
|
+
var AlignEndIcon = (0, import_ui61.withDirection)(import_icons20.AlignRightIcon);
|
|
3771
3837
|
var options8 = [
|
|
3772
3838
|
{
|
|
3773
3839
|
value: "start",
|
|
3774
3840
|
label: (0, import_i18n46.__)("Start", "elementor"),
|
|
3775
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3841
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignStartIcon, { fontSize: size }),
|
|
3776
3842
|
showTooltip: true
|
|
3777
3843
|
},
|
|
3778
3844
|
{
|
|
3779
3845
|
value: "center",
|
|
3780
3846
|
label: (0, import_i18n46.__)("Center", "elementor"),
|
|
3781
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3847
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons20.AlignCenterIcon, { fontSize: size }),
|
|
3782
3848
|
showTooltip: true
|
|
3783
3849
|
},
|
|
3784
3850
|
{
|
|
3785
3851
|
value: "end",
|
|
3786
3852
|
label: (0, import_i18n46.__)("End", "elementor"),
|
|
3787
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3853
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignEndIcon, { fontSize: size }),
|
|
3788
3854
|
showTooltip: true
|
|
3789
3855
|
},
|
|
3790
3856
|
{
|
|
3791
3857
|
value: "justify",
|
|
3792
3858
|
label: (0, import_i18n46.__)("Justify", "elementor"),
|
|
3793
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3859
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons20.AlignJustifiedIcon, { fontSize: size }),
|
|
3794
3860
|
showTooltip: true
|
|
3795
3861
|
}
|
|
3796
3862
|
];
|
|
3797
3863
|
var TextAlignmentField = () => {
|
|
3798
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ React74.createElement(UiProviders, null, /* @__PURE__ */ React74.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React74.createElement(import_ui61.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React74.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlLabel, null, (0, import_i18n46.__)("Text align", "elementor"))), /* @__PURE__ */ React74.createElement(import_ui61.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React74.createElement(import_editor_controls44.ToggleControl, { options: options8 })))));
|
|
3799
3865
|
};
|
|
3800
3866
|
|
|
3801
3867
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3802
|
-
var
|
|
3803
|
-
var
|
|
3804
|
-
var
|
|
3868
|
+
var React75 = __toESM(require("react"));
|
|
3869
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3870
|
+
var import_ui62 = require("@elementor/ui");
|
|
3805
3871
|
var import_i18n47 = require("@wordpress/i18n");
|
|
3806
3872
|
var TextColorField = () => {
|
|
3807
|
-
return /* @__PURE__ */
|
|
3873
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React75.createElement(import_ui62.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React75.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, (0, import_i18n47.__)("Text color", "elementor"))), /* @__PURE__ */ React75.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(import_editor_controls45.ColorControl, null))));
|
|
3808
3874
|
};
|
|
3809
3875
|
|
|
3810
3876
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3811
|
-
var
|
|
3812
|
-
var
|
|
3877
|
+
var React76 = __toESM(require("react"));
|
|
3878
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3813
3879
|
var import_icons21 = require("@elementor/icons");
|
|
3814
|
-
var
|
|
3880
|
+
var import_ui63 = require("@elementor/ui");
|
|
3815
3881
|
var import_i18n48 = require("@wordpress/i18n");
|
|
3816
3882
|
var options9 = [
|
|
3817
3883
|
{
|
|
3818
3884
|
value: "none",
|
|
3819
3885
|
label: (0, import_i18n48.__)("None", "elementor"),
|
|
3820
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3886
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
3821
3887
|
showTooltip: true,
|
|
3822
3888
|
exclusive: true
|
|
3823
3889
|
},
|
|
3824
3890
|
{
|
|
3825
3891
|
value: "underline",
|
|
3826
3892
|
label: (0, import_i18n48.__)("Underline", "elementor"),
|
|
3827
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3893
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.UnderlineIcon, { fontSize: size }),
|
|
3828
3894
|
showTooltip: true
|
|
3829
3895
|
},
|
|
3830
3896
|
{
|
|
3831
3897
|
value: "line-through",
|
|
3832
3898
|
label: (0, import_i18n48.__)("Line-through", "elementor"),
|
|
3833
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3899
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.StrikethroughIcon, { fontSize: size }),
|
|
3834
3900
|
showTooltip: true
|
|
3835
3901
|
},
|
|
3836
3902
|
{
|
|
3837
3903
|
value: "overline",
|
|
3838
3904
|
label: (0, import_i18n48.__)("Overline", "elementor"),
|
|
3839
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3905
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.OverlineIcon, { fontSize: size }),
|
|
3840
3906
|
showTooltip: true
|
|
3841
3907
|
}
|
|
3842
3908
|
];
|
|
3843
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3909
|
+
var TextDecorationField = () => /* @__PURE__ */ React76.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React76.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React76.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, (0, import_i18n48.__)("Line decoration", "elementor"))), /* @__PURE__ */ React76.createElement(import_ui63.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React76.createElement(import_editor_controls46.ToggleControl, { options: options9, exclusive: false }))));
|
|
3844
3910
|
|
|
3845
3911
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3846
|
-
var
|
|
3847
|
-
var
|
|
3912
|
+
var React77 = __toESM(require("react"));
|
|
3913
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
3848
3914
|
var import_icons22 = require("@elementor/icons");
|
|
3849
|
-
var
|
|
3915
|
+
var import_ui64 = require("@elementor/ui");
|
|
3850
3916
|
var import_i18n49 = require("@wordpress/i18n");
|
|
3851
3917
|
var options10 = [
|
|
3852
3918
|
{
|
|
3853
3919
|
value: "ltr",
|
|
3854
3920
|
label: (0, import_i18n49.__)("Left to right", "elementor"),
|
|
3855
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3921
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons22.TextDirectionLtrIcon, { fontSize: size }),
|
|
3856
3922
|
showTooltip: true
|
|
3857
3923
|
},
|
|
3858
3924
|
{
|
|
3859
3925
|
value: "rtl",
|
|
3860
3926
|
label: (0, import_i18n49.__)("Right to left", "elementor"),
|
|
3861
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3927
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons22.TextDirectionRtlIcon, { fontSize: size }),
|
|
3862
3928
|
showTooltip: true
|
|
3863
3929
|
}
|
|
3864
3930
|
];
|
|
3865
3931
|
var TextDirectionField = () => {
|
|
3866
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React77.createElement(import_ui64.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, (0, import_i18n49.__)("Direction", "elementor"))), /* @__PURE__ */ React77.createElement(import_ui64.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React77.createElement(import_editor_controls47.ToggleControl, { options: options10 }))));
|
|
3867
3933
|
};
|
|
3868
3934
|
|
|
3869
3935
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3870
|
-
var
|
|
3871
|
-
var
|
|
3936
|
+
var React78 = __toESM(require("react"));
|
|
3937
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3872
3938
|
var import_i18n50 = require("@wordpress/i18n");
|
|
3873
3939
|
var initTextStroke = {
|
|
3874
3940
|
$$type: "stroke",
|
|
@@ -3887,77 +3953,78 @@ var initTextStroke = {
|
|
|
3887
3953
|
}
|
|
3888
3954
|
};
|
|
3889
3955
|
var TextStrokeField = () => {
|
|
3890
|
-
const { canEdit } =
|
|
3891
|
-
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
3956
|
+
const { value, setValue, canEdit } = useStylesField("stroke");
|
|
3892
3957
|
const addTextStroke = () => {
|
|
3893
|
-
|
|
3958
|
+
setValue(initTextStroke);
|
|
3894
3959
|
};
|
|
3895
3960
|
const removeTextStroke = () => {
|
|
3896
|
-
|
|
3961
|
+
setValue(null);
|
|
3897
3962
|
};
|
|
3898
|
-
const hasTextStroke = Boolean(
|
|
3899
|
-
return /* @__PURE__ */
|
|
3963
|
+
const hasTextStroke = Boolean(value);
|
|
3964
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React78.createElement(
|
|
3900
3965
|
AddOrRemoveContent,
|
|
3901
3966
|
{
|
|
3902
3967
|
isAdded: hasTextStroke,
|
|
3903
3968
|
onAdd: addTextStroke,
|
|
3904
3969
|
onRemove: removeTextStroke,
|
|
3905
3970
|
disabled: !canEdit,
|
|
3906
|
-
renderLabel: () => /* @__PURE__ */
|
|
3971
|
+
renderLabel: () => /* @__PURE__ */ React78.createElement(ControlLabel, null, (0, import_i18n50.__)("Text stroke", "elementor"))
|
|
3907
3972
|
},
|
|
3908
|
-
/* @__PURE__ */
|
|
3973
|
+
/* @__PURE__ */ React78.createElement(import_editor_controls48.StrokeControl, null)
|
|
3909
3974
|
));
|
|
3910
3975
|
};
|
|
3911
3976
|
|
|
3912
3977
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3913
|
-
var
|
|
3914
|
-
var
|
|
3978
|
+
var React79 = __toESM(require("react"));
|
|
3979
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
3915
3980
|
var import_icons23 = require("@elementor/icons");
|
|
3916
|
-
var
|
|
3981
|
+
var import_ui65 = require("@elementor/ui");
|
|
3917
3982
|
var import_i18n51 = require("@wordpress/i18n");
|
|
3918
3983
|
var options11 = [
|
|
3919
3984
|
{
|
|
3920
3985
|
value: "none",
|
|
3921
3986
|
label: (0, import_i18n51.__)("None", "elementor"),
|
|
3922
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3987
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.MinusIcon, { fontSize: size }),
|
|
3923
3988
|
showTooltip: true
|
|
3924
3989
|
},
|
|
3925
3990
|
{
|
|
3926
3991
|
value: "capitalize",
|
|
3927
3992
|
label: (0, import_i18n51.__)("Capitalize", "elementor"),
|
|
3928
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3993
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.LetterCaseIcon, { fontSize: size }),
|
|
3929
3994
|
showTooltip: true
|
|
3930
3995
|
},
|
|
3931
3996
|
{
|
|
3932
3997
|
value: "uppercase",
|
|
3933
3998
|
label: (0, import_i18n51.__)("Uppercase", "elementor"),
|
|
3934
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3999
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.LetterCaseUpperIcon, { fontSize: size }),
|
|
3935
4000
|
showTooltip: true
|
|
3936
4001
|
},
|
|
3937
4002
|
{
|
|
3938
4003
|
value: "lowercase",
|
|
3939
4004
|
label: (0, import_i18n51.__)("Lowercase", "elementor"),
|
|
3940
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4005
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.LetterCaseLowerIcon, { fontSize: size }),
|
|
3941
4006
|
showTooltip: true
|
|
3942
4007
|
}
|
|
3943
4008
|
];
|
|
3944
|
-
var TransformField = () => /* @__PURE__ */
|
|
4009
|
+
var TransformField = () => /* @__PURE__ */ React79.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React79.createElement(import_ui65.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React79.createElement(import_ui65.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(ControlLabel, null, (0, import_i18n51.__)("Text transform", "elementor"))), /* @__PURE__ */ React79.createElement(import_ui65.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React79.createElement(import_editor_controls49.ToggleControl, { options: options11 }))));
|
|
3945
4010
|
|
|
3946
4011
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3947
|
-
var
|
|
3948
|
-
var
|
|
3949
|
-
var
|
|
4012
|
+
var React80 = __toESM(require("react"));
|
|
4013
|
+
var import_react35 = require("react");
|
|
4014
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4015
|
+
var import_ui66 = require("@elementor/ui");
|
|
3950
4016
|
var import_i18n52 = require("@wordpress/i18n");
|
|
3951
4017
|
var WordSpacingField = () => {
|
|
3952
|
-
|
|
4018
|
+
const rowRef = (0, import_react35.useRef)();
|
|
4019
|
+
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(ControlLabel, null, (0, import_i18n52.__)("Word spacing", "elementor"))), /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(import_editor_controls50.SizeControl, { anchorRef: rowRef }))));
|
|
3953
4020
|
};
|
|
3954
4021
|
|
|
3955
4022
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3956
4023
|
var TypographySection = () => {
|
|
3957
|
-
const
|
|
3958
|
-
const isVersion330Active = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
4024
|
+
const { value: columnCount } = useStylesField("column-count");
|
|
3959
4025
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
3960
|
-
|
|
4026
|
+
const isVersion330Active = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
4027
|
+
return /* @__PURE__ */ React81.createElement(SectionContent, null, /* @__PURE__ */ React81.createElement(FontFamilyField, null), /* @__PURE__ */ React81.createElement(FontWeightField, null), /* @__PURE__ */ React81.createElement(FontSizeField, null), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextAlignmentField, null), /* @__PURE__ */ React81.createElement(TextColorField, null), /* @__PURE__ */ React81.createElement(
|
|
3961
4028
|
StyleTabCollapsibleContent,
|
|
3962
4029
|
{
|
|
3963
4030
|
fields: [
|
|
@@ -3972,19 +4039,19 @@ var TypographySection = () => {
|
|
|
3972
4039
|
"stroke"
|
|
3973
4040
|
]
|
|
3974
4041
|
},
|
|
3975
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ React81.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React81.createElement(LineHeightField, null), /* @__PURE__ */ React81.createElement(LetterSpacingField, null), /* @__PURE__ */ React81.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React81.createElement(ColumnGapField, null)), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextDecorationField, null), /* @__PURE__ */ React81.createElement(TransformField, null), /* @__PURE__ */ React81.createElement(TextDirectionField, null), /* @__PURE__ */ React81.createElement(FontStyleField, null), /* @__PURE__ */ React81.createElement(TextStrokeField, null))
|
|
3976
4043
|
));
|
|
3977
4044
|
};
|
|
3978
4045
|
|
|
3979
4046
|
// src/components/style-tab-section.tsx
|
|
3980
|
-
var
|
|
4047
|
+
var React82 = __toESM(require("react"));
|
|
3981
4048
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
3982
4049
|
var StyleTabSection = ({ section, fields = [] }) => {
|
|
3983
4050
|
const { component, name, title } = section;
|
|
3984
4051
|
const tabDefaults = useDefaultPanelSettings();
|
|
3985
4052
|
const SectionComponent = component;
|
|
3986
4053
|
const isExpanded = (0, import_editor_v1_adapters14.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
3987
|
-
return /* @__PURE__ */
|
|
4054
|
+
return /* @__PURE__ */ React82.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React82.createElement(SectionComponent, null));
|
|
3988
4055
|
};
|
|
3989
4056
|
|
|
3990
4057
|
// src/components/style-tab.tsx
|
|
@@ -3999,9 +4066,9 @@ var stickyHeaderStyles = {
|
|
|
3999
4066
|
var StyleTab = () => {
|
|
4000
4067
|
const currentClassesProp = useCurrentClassesProp();
|
|
4001
4068
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
4002
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4069
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react36.useState)(null);
|
|
4003
4070
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4004
|
-
return /* @__PURE__ */
|
|
4071
|
+
return /* @__PURE__ */ React83.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React83.createElement(
|
|
4005
4072
|
StyleProvider,
|
|
4006
4073
|
{
|
|
4007
4074
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4012,7 +4079,7 @@ var StyleTab = () => {
|
|
|
4012
4079
|
},
|
|
4013
4080
|
setMetaState: setActiveStyleState
|
|
4014
4081
|
},
|
|
4015
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ React83.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React83.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React83.createElement(ClassesHeader, null, /* @__PURE__ */ React83.createElement(CssClassSelector, null), /* @__PURE__ */ React83.createElement(import_ui67.Divider, null)), /* @__PURE__ */ React83.createElement(SectionsList, null, /* @__PURE__ */ React83.createElement(
|
|
4016
4083
|
StyleTabSection,
|
|
4017
4084
|
{
|
|
4018
4085
|
section: {
|
|
@@ -4031,7 +4098,7 @@ var StyleTab = () => {
|
|
|
4031
4098
|
"gap"
|
|
4032
4099
|
]
|
|
4033
4100
|
}
|
|
4034
|
-
), /* @__PURE__ */
|
|
4101
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4035
4102
|
StyleTabSection,
|
|
4036
4103
|
{
|
|
4037
4104
|
section: {
|
|
@@ -4041,7 +4108,7 @@ var StyleTab = () => {
|
|
|
4041
4108
|
},
|
|
4042
4109
|
fields: ["margin", "padding"]
|
|
4043
4110
|
}
|
|
4044
|
-
), /* @__PURE__ */
|
|
4111
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4045
4112
|
StyleTabSection,
|
|
4046
4113
|
{
|
|
4047
4114
|
section: {
|
|
@@ -4061,7 +4128,7 @@ var StyleTab = () => {
|
|
|
4061
4128
|
"object-fit"
|
|
4062
4129
|
]
|
|
4063
4130
|
}
|
|
4064
|
-
), /* @__PURE__ */
|
|
4131
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4065
4132
|
StyleTabSection,
|
|
4066
4133
|
{
|
|
4067
4134
|
section: {
|
|
@@ -4071,7 +4138,7 @@ var StyleTab = () => {
|
|
|
4071
4138
|
},
|
|
4072
4139
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4073
4140
|
}
|
|
4074
|
-
), /* @__PURE__ */
|
|
4141
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4075
4142
|
StyleTabSection,
|
|
4076
4143
|
{
|
|
4077
4144
|
section: {
|
|
@@ -4096,7 +4163,7 @@ var StyleTab = () => {
|
|
|
4096
4163
|
"stroke"
|
|
4097
4164
|
]
|
|
4098
4165
|
}
|
|
4099
|
-
), /* @__PURE__ */
|
|
4166
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4100
4167
|
StyleTabSection,
|
|
4101
4168
|
{
|
|
4102
4169
|
section: {
|
|
@@ -4106,7 +4173,7 @@ var StyleTab = () => {
|
|
|
4106
4173
|
},
|
|
4107
4174
|
fields: ["background"]
|
|
4108
4175
|
}
|
|
4109
|
-
), /* @__PURE__ */
|
|
4176
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4110
4177
|
StyleTabSection,
|
|
4111
4178
|
{
|
|
4112
4179
|
section: {
|
|
@@ -4116,7 +4183,7 @@ var StyleTab = () => {
|
|
|
4116
4183
|
},
|
|
4117
4184
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4118
4185
|
}
|
|
4119
|
-
), /* @__PURE__ */
|
|
4186
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4120
4187
|
StyleTabSection,
|
|
4121
4188
|
{
|
|
4122
4189
|
section: {
|
|
@@ -4131,12 +4198,12 @@ var StyleTab = () => {
|
|
|
4131
4198
|
};
|
|
4132
4199
|
function ClassesHeader({ children }) {
|
|
4133
4200
|
const scrollDirection = useScrollDirection();
|
|
4134
|
-
return /* @__PURE__ */
|
|
4201
|
+
return /* @__PURE__ */ React83.createElement(import_ui67.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4135
4202
|
}
|
|
4136
4203
|
function useCurrentClassesProp() {
|
|
4137
4204
|
const { elementType } = useElement();
|
|
4138
4205
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
4139
|
-
([, propType]) => propType.kind === "plain" && propType.key ===
|
|
4206
|
+
([, propType]) => propType.kind === "plain" && propType.key === import_editor_props10.CLASSES_PROP_KEY
|
|
4140
4207
|
);
|
|
4141
4208
|
if (!prop) {
|
|
4142
4209
|
throw new Error("Element does not have a classes prop");
|
|
@@ -4150,16 +4217,16 @@ var EditingPanelTabs = () => {
|
|
|
4150
4217
|
return (
|
|
4151
4218
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4152
4219
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4153
|
-
/* @__PURE__ */
|
|
4220
|
+
/* @__PURE__ */ React84.createElement(import_react37.Fragment, { key: element.id }, /* @__PURE__ */ React84.createElement(PanelTabContent, null))
|
|
4154
4221
|
);
|
|
4155
4222
|
};
|
|
4156
4223
|
var PanelTabContent = () => {
|
|
4157
4224
|
const editorDefaults = useDefaultPanelSettings();
|
|
4158
4225
|
const defaultComponentTab = (0, import_editor_v1_adapters15.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
4159
4226
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4160
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
4161
|
-
return /* @__PURE__ */
|
|
4162
|
-
|
|
4227
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui68.useTabs)(currentTab);
|
|
4228
|
+
return /* @__PURE__ */ React84.createElement(ScrollProvider, null, /* @__PURE__ */ React84.createElement(import_ui68.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React84.createElement(import_ui68.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React84.createElement(
|
|
4229
|
+
import_ui68.Tabs,
|
|
4163
4230
|
{
|
|
4164
4231
|
variant: "fullWidth",
|
|
4165
4232
|
size: "small",
|
|
@@ -4170,9 +4237,9 @@ var PanelTabContent = () => {
|
|
|
4170
4237
|
setCurrentTab(newValue);
|
|
4171
4238
|
}
|
|
4172
4239
|
},
|
|
4173
|
-
/* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4175
|
-
), /* @__PURE__ */
|
|
4240
|
+
/* @__PURE__ */ React84.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4241
|
+
/* @__PURE__ */ React84.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("Style", "elementor"), ...getTabProps("style") })
|
|
4242
|
+
), /* @__PURE__ */ React84.createElement(import_ui68.Divider, null)), /* @__PURE__ */ React84.createElement(import_ui68.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React84.createElement(SettingsTab, null)), /* @__PURE__ */ React84.createElement(import_ui68.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React84.createElement(StyleTab, null))));
|
|
4176
4243
|
};
|
|
4177
4244
|
|
|
4178
4245
|
// src/components/editing-panel.tsx
|
|
@@ -4185,7 +4252,7 @@ var EditingPanel = () => {
|
|
|
4185
4252
|
return null;
|
|
4186
4253
|
}
|
|
4187
4254
|
const panelTitle = (0, import_i18n55.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4188
|
-
return /* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ React85.createElement(import_ui69.ErrorBoundary, { fallback: /* @__PURE__ */ React85.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React85.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React85.createElement(import_editor_ui4.ThemeProvider, null, /* @__PURE__ */ React85.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React85.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React85.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React85.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React85.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React85.createElement(import_editor_controls51.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React85.createElement(import_editor_controls51.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React85.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React85.createElement(EditingPanelTabs, null)))))))));
|
|
4189
4256
|
};
|
|
4190
4257
|
|
|
4191
4258
|
// src/panel.ts
|
|
@@ -4201,7 +4268,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4201
4268
|
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
4202
4269
|
|
|
4203
4270
|
// src/hooks/use-open-editor-panel.ts
|
|
4204
|
-
var
|
|
4271
|
+
var import_react38 = require("react");
|
|
4205
4272
|
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
4206
4273
|
|
|
4207
4274
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -4218,7 +4285,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
4218
4285
|
// src/hooks/use-open-editor-panel.ts
|
|
4219
4286
|
var useOpenEditorPanel = () => {
|
|
4220
4287
|
const { open } = usePanelActions();
|
|
4221
|
-
(0,
|
|
4288
|
+
(0, import_react38.useEffect)(() => {
|
|
4222
4289
|
return (0, import_editor_v1_adapters16.__privateListenTo)((0, import_editor_v1_adapters16.commandStartEvent)("panel/editor/open"), () => {
|
|
4223
4290
|
if (isAtomicWidgetSelected()) {
|
|
4224
4291
|
open();
|
|
@@ -4235,38 +4302,20 @@ var EditingPanelHooks = () => {
|
|
|
4235
4302
|
|
|
4236
4303
|
// src/dynamics/init.ts
|
|
4237
4304
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
4305
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4238
4306
|
|
|
4239
|
-
// src/dynamics/components/dynamic-
|
|
4240
|
-
var
|
|
4241
|
-
var
|
|
4242
|
-
var
|
|
4243
|
-
var
|
|
4244
|
-
var import_ui71 = require("@elementor/ui");
|
|
4245
|
-
var import_i18n57 = require("@wordpress/i18n");
|
|
4246
|
-
|
|
4247
|
-
// src/components/popover-content.tsx
|
|
4248
|
-
var React84 = __toESM(require("react"));
|
|
4249
|
-
var import_ui69 = require("@elementor/ui");
|
|
4250
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React84.createElement(import_ui69.Stack, { alignItems, gap, p }, children);
|
|
4251
|
-
|
|
4252
|
-
// src/hooks/use-persist-dynamic-value.ts
|
|
4253
|
-
var import_session6 = require("@elementor/session");
|
|
4254
|
-
var usePersistDynamicValue = (propKey) => {
|
|
4255
|
-
const { element } = useElement();
|
|
4256
|
-
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
4257
|
-
return (0, import_session6.useSessionStorage)(prefixedKey);
|
|
4258
|
-
};
|
|
4259
|
-
|
|
4260
|
-
// src/dynamics/dynamic-control.tsx
|
|
4261
|
-
var React85 = __toESM(require("react"));
|
|
4262
|
-
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4307
|
+
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4308
|
+
var React86 = __toESM(require("react"));
|
|
4309
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4310
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
4311
|
+
var import_icons25 = require("@elementor/icons");
|
|
4263
4312
|
|
|
4264
4313
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4265
|
-
var
|
|
4314
|
+
var import_react40 = require("react");
|
|
4266
4315
|
|
|
4267
4316
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4268
|
-
var
|
|
4269
|
-
var
|
|
4317
|
+
var import_react39 = require("react");
|
|
4318
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4270
4319
|
|
|
4271
4320
|
// src/dynamics/sync/get-elementor-config.ts
|
|
4272
4321
|
var getElementorConfig2 = () => {
|
|
@@ -4287,7 +4336,7 @@ var getAtomicDynamicTags = () => {
|
|
|
4287
4336
|
};
|
|
4288
4337
|
|
|
4289
4338
|
// src/dynamics/utils.ts
|
|
4290
|
-
var
|
|
4339
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
4291
4340
|
var import_schema = require("@elementor/schema");
|
|
4292
4341
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
4293
4342
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
@@ -4296,12 +4345,12 @@ var getDynamicPropType = (propType) => {
|
|
|
4296
4345
|
return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
|
|
4297
4346
|
};
|
|
4298
4347
|
var isDynamicPropValue = (prop) => {
|
|
4299
|
-
return (0,
|
|
4348
|
+
return (0, import_editor_props11.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
|
|
4300
4349
|
};
|
|
4301
4350
|
var supportsDynamic = (propType) => {
|
|
4302
4351
|
return !!getDynamicPropType(propType);
|
|
4303
4352
|
};
|
|
4304
|
-
var dynamicPropTypeUtil = (0,
|
|
4353
|
+
var dynamicPropTypeUtil = (0, import_editor_props11.createPropUtils)(
|
|
4305
4354
|
DYNAMIC_PROP_TYPE_KEY,
|
|
4306
4355
|
import_schema.z.strictObject({
|
|
4307
4356
|
name: import_schema.z.string(),
|
|
@@ -4312,12 +4361,12 @@ var dynamicPropTypeUtil = (0, import_editor_props10.createPropUtils)(
|
|
|
4312
4361
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4313
4362
|
var usePropDynamicTags = () => {
|
|
4314
4363
|
let categories = [];
|
|
4315
|
-
const { propType } = (0,
|
|
4364
|
+
const { propType } = (0, import_editor_controls52.useBoundProp)();
|
|
4316
4365
|
if (propType) {
|
|
4317
4366
|
const propDynamicType = getDynamicPropType(propType);
|
|
4318
4367
|
categories = propDynamicType?.settings.categories || [];
|
|
4319
4368
|
}
|
|
4320
|
-
return (0,
|
|
4369
|
+
return (0, import_react39.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
4321
4370
|
};
|
|
4322
4371
|
var getDynamicTagsByCategories = (categories) => {
|
|
4323
4372
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -4333,12 +4382,52 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
4333
4382
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4334
4383
|
var useDynamicTag = (tagName) => {
|
|
4335
4384
|
const dynamicTags = usePropDynamicTags();
|
|
4336
|
-
return (0,
|
|
4385
|
+
return (0, import_react40.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
4386
|
+
};
|
|
4387
|
+
|
|
4388
|
+
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4389
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React86.createElement(import_icons25.DatabaseIcon, { fontSize: "tiny" });
|
|
4390
|
+
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4391
|
+
const context = (0, import_editor_controls53.useBoundProp)(import_editor_props12.backgroundImageOverlayPropTypeUtil);
|
|
4392
|
+
return /* @__PURE__ */ React86.createElement(import_editor_controls53.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React86.createElement(import_editor_controls53.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React86.createElement(Wrapper, { rawValue: value.value })));
|
|
4393
|
+
};
|
|
4394
|
+
var Wrapper = ({ rawValue }) => {
|
|
4395
|
+
const { propType } = (0, import_editor_controls53.useBoundProp)();
|
|
4396
|
+
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4397
|
+
return /* @__PURE__ */ React86.createElement(import_editor_controls53.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React86.createElement(import_editor_controls53.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React86.createElement(Content, { rawValue: rawValue.image })));
|
|
4398
|
+
};
|
|
4399
|
+
var Content = ({ rawValue }) => {
|
|
4400
|
+
const src = rawValue.value.src;
|
|
4401
|
+
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4402
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, dynamicTag?.label);
|
|
4403
|
+
};
|
|
4404
|
+
|
|
4405
|
+
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4406
|
+
var React90 = __toESM(require("react"));
|
|
4407
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4408
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4409
|
+
var import_icons27 = require("@elementor/icons");
|
|
4410
|
+
var import_ui72 = require("@elementor/ui");
|
|
4411
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
4412
|
+
|
|
4413
|
+
// src/components/popover-content.tsx
|
|
4414
|
+
var React87 = __toESM(require("react"));
|
|
4415
|
+
var import_ui70 = require("@elementor/ui");
|
|
4416
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React87.createElement(import_ui70.Stack, { alignItems, gap, p }, children);
|
|
4417
|
+
|
|
4418
|
+
// src/hooks/use-persist-dynamic-value.ts
|
|
4419
|
+
var import_session6 = require("@elementor/session");
|
|
4420
|
+
var usePersistDynamicValue = (propKey) => {
|
|
4421
|
+
const { element } = useElement();
|
|
4422
|
+
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
4423
|
+
return (0, import_session6.useSessionStorage)(prefixedKey);
|
|
4337
4424
|
};
|
|
4338
4425
|
|
|
4339
4426
|
// src/dynamics/dynamic-control.tsx
|
|
4427
|
+
var React88 = __toESM(require("react"));
|
|
4428
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4340
4429
|
var DynamicControl = ({ bind, children }) => {
|
|
4341
|
-
const { value, setValue } = (0,
|
|
4430
|
+
const { value, setValue } = (0, import_editor_controls54.useBoundProp)(dynamicPropTypeUtil);
|
|
4342
4431
|
const { name = "", settings } = value ?? {};
|
|
4343
4432
|
const dynamicTag = useDynamicTag(name);
|
|
4344
4433
|
if (!dynamicTag) {
|
|
@@ -4357,71 +4446,79 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4357
4446
|
});
|
|
4358
4447
|
};
|
|
4359
4448
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4360
|
-
return /* @__PURE__ */
|
|
4449
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls54.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React88.createElement(import_editor_controls54.PropKeyProvider, { bind }, children));
|
|
4361
4450
|
};
|
|
4362
4451
|
|
|
4363
4452
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4364
|
-
var
|
|
4365
|
-
var
|
|
4366
|
-
var
|
|
4367
|
-
var
|
|
4368
|
-
var
|
|
4453
|
+
var import_react41 = require("react");
|
|
4454
|
+
var React89 = __toESM(require("react"));
|
|
4455
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
4456
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
4457
|
+
var import_icons26 = require("@elementor/icons");
|
|
4458
|
+
var import_ui71 = require("@elementor/ui");
|
|
4369
4459
|
var import_i18n56 = require("@wordpress/i18n");
|
|
4370
4460
|
var SIZE7 = "tiny";
|
|
4371
|
-
var DynamicSelection = ({
|
|
4372
|
-
const [searchValue, setSearchValue] = (0,
|
|
4461
|
+
var DynamicSelection = ({ close: closePopover }) => {
|
|
4462
|
+
const [searchValue, setSearchValue] = (0, import_react41.useState)("");
|
|
4373
4463
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
4374
|
-
const
|
|
4375
|
-
const {
|
|
4464
|
+
const theme = (0, import_ui71.useTheme)();
|
|
4465
|
+
const { value: anyValue } = (0, import_editor_controls55.useBoundProp)();
|
|
4466
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
|
|
4376
4467
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
4377
4468
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
4378
4469
|
const options12 = useFilteredOptions(searchValue);
|
|
4379
4470
|
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
4380
|
-
const handleSearch = (
|
|
4381
|
-
setSearchValue(
|
|
4471
|
+
const handleSearch = (value) => {
|
|
4472
|
+
setSearchValue(value);
|
|
4382
4473
|
};
|
|
4383
|
-
const handleSetDynamicTag = (value
|
|
4474
|
+
const handleSetDynamicTag = (value) => {
|
|
4384
4475
|
if (!isCurrentValueDynamic) {
|
|
4385
4476
|
updatePropValueHistory(anyValue);
|
|
4386
4477
|
}
|
|
4387
|
-
|
|
4388
|
-
|
|
4478
|
+
const selectedOption = options12.flatMap(([, items3]) => items3).find((item) => item.value === value);
|
|
4479
|
+
setValue({ name: value, settings: { label: selectedOption?.label } });
|
|
4480
|
+
closePopover();
|
|
4389
4481
|
};
|
|
4390
|
-
|
|
4391
|
-
|
|
4482
|
+
const virtualizedItems = options12.flatMap(([category, items3]) => [
|
|
4483
|
+
{
|
|
4484
|
+
type: "category",
|
|
4485
|
+
value: category,
|
|
4486
|
+
label: dynamicGroups?.[category]?.title || category
|
|
4487
|
+
},
|
|
4488
|
+
...items3.map((item) => ({
|
|
4489
|
+
type: "item",
|
|
4490
|
+
value: item.value,
|
|
4491
|
+
label: item.label
|
|
4492
|
+
}))
|
|
4493
|
+
]);
|
|
4494
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
4495
|
+
import_editor_ui5.PopoverHeader,
|
|
4496
|
+
{
|
|
4497
|
+
title: (0, import_i18n56.__)("Dynamic tags", "elementor"),
|
|
4498
|
+
onClose: closePopover,
|
|
4499
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons26.DatabaseIcon, { fontSize: SIZE7 })
|
|
4500
|
+
}
|
|
4501
|
+
), /* @__PURE__ */ React89.createElement(import_ui71.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React89.createElement(NoDynamicTags, null) : /* @__PURE__ */ React89.createElement(import_react41.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
4502
|
+
import_editor_ui5.PopoverSearch,
|
|
4392
4503
|
{
|
|
4393
|
-
fullWidth: true,
|
|
4394
|
-
size: SIZE7,
|
|
4395
4504
|
value: searchValue,
|
|
4396
|
-
|
|
4397
|
-
placeholder: (0, import_i18n56.__)("Search dynamic tags\u2026", "elementor")
|
|
4398
|
-
InputProps: {
|
|
4399
|
-
startAdornment: /* @__PURE__ */ React86.createElement(import_ui70.InputAdornment, { position: "start" }, /* @__PURE__ */ React86.createElement(import_icons25.SearchIcon, { fontSize: SIZE7 }))
|
|
4400
|
-
}
|
|
4505
|
+
onSearch: handleSearch,
|
|
4506
|
+
placeholder: (0, import_i18n56.__)("Search dynamic tags\u2026", "elementor")
|
|
4401
4507
|
}
|
|
4402
|
-
)
|
|
4403
|
-
|
|
4508
|
+
), /* @__PURE__ */ React89.createElement(import_ui71.Divider, null), /* @__PURE__ */ React89.createElement(
|
|
4509
|
+
import_editor_ui5.PopoverMenuList,
|
|
4404
4510
|
{
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
key: value,
|
|
4414
|
-
selected: isSelected,
|
|
4415
|
-
autoFocus: isSelected,
|
|
4416
|
-
sx: { px: 3.5, typography: "caption" },
|
|
4417
|
-
onClick: () => handleSetDynamicTag(value, tagLabel)
|
|
4418
|
-
},
|
|
4419
|
-
tagLabel
|
|
4420
|
-
);
|
|
4421
|
-
})))) : /* @__PURE__ */ React86.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
4511
|
+
items: virtualizedItems,
|
|
4512
|
+
onSelect: handleSetDynamicTag,
|
|
4513
|
+
onClose: closePopover,
|
|
4514
|
+
selectedValue: dynamicValue?.name,
|
|
4515
|
+
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
4516
|
+
noResultsComponent: /* @__PURE__ */ React89.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
4517
|
+
}
|
|
4518
|
+
))));
|
|
4422
4519
|
};
|
|
4423
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4424
|
-
|
|
4520
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React89.createElement(
|
|
4521
|
+
import_ui71.Stack,
|
|
4425
4522
|
{
|
|
4426
4523
|
gap: 1,
|
|
4427
4524
|
alignItems: "center",
|
|
@@ -4431,12 +4528,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React86.createElem
|
|
|
4431
4528
|
color: "text.secondary",
|
|
4432
4529
|
sx: { pb: 3.5 }
|
|
4433
4530
|
},
|
|
4434
|
-
/* @__PURE__ */
|
|
4435
|
-
/* @__PURE__ */
|
|
4436
|
-
/* @__PURE__ */
|
|
4531
|
+
/* @__PURE__ */ React89.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4532
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React89.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4533
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React89.createElement(import_ui71.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n56.__)("Clear & try again", "elementor")))
|
|
4437
4534
|
);
|
|
4438
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4439
|
-
|
|
4535
|
+
var NoDynamicTags = () => /* @__PURE__ */ React89.createElement(import_ui71.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React89.createElement(import_ui71.Divider, null), /* @__PURE__ */ React89.createElement(
|
|
4536
|
+
import_ui71.Stack,
|
|
4440
4537
|
{
|
|
4441
4538
|
gap: 1,
|
|
4442
4539
|
alignItems: "center",
|
|
@@ -4446,9 +4543,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React86.createElement(import_ui70.Box,
|
|
|
4446
4543
|
color: "text.secondary",
|
|
4447
4544
|
sx: { pb: 3.5 }
|
|
4448
4545
|
},
|
|
4449
|
-
/* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ React89.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4547
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
4548
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
4452
4549
|
));
|
|
4453
4550
|
var useFilteredOptions = (searchValue) => {
|
|
4454
4551
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4469,10 +4566,10 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4469
4566
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4470
4567
|
var SIZE8 = "tiny";
|
|
4471
4568
|
var DynamicSelectionControl = () => {
|
|
4472
|
-
const { setValue: setAnyValue } = (0,
|
|
4473
|
-
const { bind, value } = (0,
|
|
4569
|
+
const { setValue: setAnyValue } = (0, import_editor_controls56.useBoundProp)();
|
|
4570
|
+
const { bind, value } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
|
|
4474
4571
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
4475
|
-
const selectionPopoverState = (0,
|
|
4572
|
+
const selectionPopoverState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4476
4573
|
const { name: tagName = "" } = value;
|
|
4477
4574
|
const dynamicTag = useDynamicTag(tagName);
|
|
4478
4575
|
const removeDynamicTag = () => {
|
|
@@ -4481,76 +4578,70 @@ var DynamicSelectionControl = () => {
|
|
|
4481
4578
|
if (!dynamicTag) {
|
|
4482
4579
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4483
4580
|
}
|
|
4484
|
-
return /* @__PURE__ */
|
|
4485
|
-
|
|
4581
|
+
return /* @__PURE__ */ React90.createElement(import_ui72.Box, null, /* @__PURE__ */ React90.createElement(
|
|
4582
|
+
import_ui72.UnstableTag,
|
|
4486
4583
|
{
|
|
4487
4584
|
fullWidth: true,
|
|
4488
4585
|
showActionsOnHover: true,
|
|
4489
4586
|
label: dynamicTag.label,
|
|
4490
|
-
startIcon: /* @__PURE__ */
|
|
4491
|
-
...(0,
|
|
4492
|
-
actions: /* @__PURE__ */
|
|
4493
|
-
|
|
4587
|
+
startIcon: /* @__PURE__ */ React90.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 }),
|
|
4588
|
+
...(0, import_ui72.bindTrigger)(selectionPopoverState),
|
|
4589
|
+
actions: /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React90.createElement(
|
|
4590
|
+
import_ui72.IconButton,
|
|
4494
4591
|
{
|
|
4495
4592
|
size: SIZE8,
|
|
4496
4593
|
onClick: removeDynamicTag,
|
|
4497
4594
|
"aria-label": (0, import_i18n57.__)("Remove dynamic value", "elementor")
|
|
4498
4595
|
},
|
|
4499
|
-
/* @__PURE__ */
|
|
4596
|
+
/* @__PURE__ */ React90.createElement(import_icons27.XIcon, { fontSize: SIZE8 })
|
|
4500
4597
|
))
|
|
4501
4598
|
}
|
|
4502
|
-
), /* @__PURE__ */
|
|
4503
|
-
|
|
4599
|
+
), /* @__PURE__ */ React90.createElement(
|
|
4600
|
+
import_ui72.Popover,
|
|
4504
4601
|
{
|
|
4505
4602
|
disablePortal: true,
|
|
4506
4603
|
disableScrollLock: true,
|
|
4507
4604
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4508
|
-
...(0,
|
|
4605
|
+
...(0, import_ui72.bindPopover)(selectionPopoverState)
|
|
4509
4606
|
},
|
|
4510
|
-
/* @__PURE__ */
|
|
4511
|
-
import_editor_ui6.PopoverHeader,
|
|
4512
|
-
{
|
|
4513
|
-
title: (0, import_i18n57.__)("Dynamic tags", "elementor"),
|
|
4514
|
-
onClose: selectionPopoverState.close,
|
|
4515
|
-
icon: /* @__PURE__ */ React87.createElement(import_icons26.DatabaseIcon, { fontSize: SIZE8 })
|
|
4516
|
-
}
|
|
4517
|
-
), /* @__PURE__ */ React87.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
4607
|
+
/* @__PURE__ */ React90.createElement(import_ui72.Stack, null, /* @__PURE__ */ React90.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
4518
4608
|
));
|
|
4519
4609
|
};
|
|
4520
4610
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
4521
|
-
const popupState = (0,
|
|
4611
|
+
const popupState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4522
4612
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
4523
4613
|
if (!hasDynamicSettings) {
|
|
4524
4614
|
return null;
|
|
4525
4615
|
}
|
|
4526
|
-
return /* @__PURE__ */
|
|
4527
|
-
|
|
4616
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(import_ui72.IconButton, { size: SIZE8, ...(0, import_ui72.bindTrigger)(popupState), "aria-label": (0, import_i18n57.__)("Settings", "elementor") }, /* @__PURE__ */ React90.createElement(import_icons27.SettingsIcon, { fontSize: SIZE8 })), /* @__PURE__ */ React90.createElement(
|
|
4617
|
+
import_ui72.Popover,
|
|
4528
4618
|
{
|
|
4529
4619
|
disablePortal: true,
|
|
4530
4620
|
disableScrollLock: true,
|
|
4531
4621
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4532
|
-
...(0,
|
|
4622
|
+
...(0, import_ui72.bindPopover)(popupState)
|
|
4533
4623
|
},
|
|
4534
|
-
/* @__PURE__ */
|
|
4624
|
+
/* @__PURE__ */ React90.createElement(
|
|
4535
4625
|
import_editor_ui6.PopoverHeader,
|
|
4536
4626
|
{
|
|
4537
4627
|
title: dynamicTag.label,
|
|
4538
4628
|
onClose: popupState.close,
|
|
4539
|
-
icon: /* @__PURE__ */
|
|
4629
|
+
icon: /* @__PURE__ */ React90.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4540
4630
|
}
|
|
4541
|
-
),
|
|
4631
|
+
),
|
|
4632
|
+
/* @__PURE__ */ React90.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls })
|
|
4542
4633
|
));
|
|
4543
4634
|
};
|
|
4544
4635
|
var DynamicSettings = ({ controls }) => {
|
|
4545
4636
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
4546
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4637
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui72.useTabs)(0);
|
|
4547
4638
|
if (!tabs.length) {
|
|
4548
4639
|
return null;
|
|
4549
4640
|
}
|
|
4550
|
-
return /* @__PURE__ */
|
|
4551
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ React90.createElement(import_editor_ui6.PopoverScrollableContent, null, /* @__PURE__ */ React90.createElement(import_ui72.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React90.createElement(import_ui72.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React90.createElement(import_ui72.Divider, null), tabs.map(({ value }, index) => {
|
|
4642
|
+
return /* @__PURE__ */ React90.createElement(import_ui72.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React90.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4552
4643
|
if (item.type === "control") {
|
|
4553
|
-
return /* @__PURE__ */
|
|
4644
|
+
return /* @__PURE__ */ React90.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4554
4645
|
}
|
|
4555
4646
|
return null;
|
|
4556
4647
|
})));
|
|
@@ -4560,16 +4651,16 @@ var Control3 = ({ control }) => {
|
|
|
4560
4651
|
if (!getControl(control.type)) {
|
|
4561
4652
|
return null;
|
|
4562
4653
|
}
|
|
4563
|
-
return /* @__PURE__ */
|
|
4654
|
+
return /* @__PURE__ */ React90.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React90.createElement(import_ui72.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React90.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(import_editor_controls56.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React90.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(Control, { type: control.type, props: control.props }))));
|
|
4564
4655
|
};
|
|
4565
4656
|
|
|
4566
4657
|
// src/dynamics/dynamic-transformer.ts
|
|
4567
4658
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
4568
|
-
var
|
|
4659
|
+
var import_editor_props13 = require("@elementor/editor-props");
|
|
4569
4660
|
|
|
4570
4661
|
// src/dynamics/errors.ts
|
|
4571
|
-
var
|
|
4572
|
-
var DynamicTagsManagerNotFoundError = (0,
|
|
4662
|
+
var import_utils9 = require("@elementor/utils");
|
|
4663
|
+
var DynamicTagsManagerNotFoundError = (0, import_utils9.createError)({
|
|
4573
4664
|
code: "dynamic_tags_manager_not_found",
|
|
4574
4665
|
message: "Dynamic tags manager not found"
|
|
4575
4666
|
});
|
|
@@ -4583,7 +4674,7 @@ var dynamicTransformer = (0, import_editor_canvas3.createTransformer)((value) =>
|
|
|
4583
4674
|
});
|
|
4584
4675
|
function simpleTransform(props) {
|
|
4585
4676
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
4586
|
-
const value = (0,
|
|
4677
|
+
const value = (0, import_editor_props13.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
4587
4678
|
return [settingKey, value];
|
|
4588
4679
|
});
|
|
4589
4680
|
return Object.fromEntries(transformed);
|
|
@@ -4613,18 +4704,18 @@ function getDynamicValue(name, settings) {
|
|
|
4613
4704
|
}
|
|
4614
4705
|
|
|
4615
4706
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4616
|
-
var
|
|
4617
|
-
var
|
|
4618
|
-
var
|
|
4707
|
+
var React91 = __toESM(require("react"));
|
|
4708
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
4709
|
+
var import_icons28 = require("@elementor/icons");
|
|
4619
4710
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4620
4711
|
var usePropDynamicAction = () => {
|
|
4621
|
-
const { propType } = (0,
|
|
4712
|
+
const { propType } = (0, import_editor_controls57.useBoundProp)();
|
|
4622
4713
|
const visible = !!propType && supportsDynamic(propType);
|
|
4623
4714
|
return {
|
|
4624
4715
|
visible,
|
|
4625
|
-
icon:
|
|
4716
|
+
icon: import_icons28.DatabaseIcon,
|
|
4626
4717
|
title: (0, import_i18n58.__)("Dynamic tags", "elementor"),
|
|
4627
|
-
|
|
4718
|
+
content: ({ close }) => /* @__PURE__ */ React91.createElement(DynamicSelection, { close })
|
|
4628
4719
|
};
|
|
4629
4720
|
};
|
|
4630
4721
|
|
|
@@ -4635,6 +4726,16 @@ var init = () => {
|
|
|
4635
4726
|
component: DynamicSelectionControl,
|
|
4636
4727
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
4637
4728
|
});
|
|
4729
|
+
(0, import_editor_controls58.injectIntoRepeaterItemLabel)({
|
|
4730
|
+
id: "dynamic-background-image",
|
|
4731
|
+
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4732
|
+
component: BackgroundControlDynamicTagLabel
|
|
4733
|
+
});
|
|
4734
|
+
(0, import_editor_controls58.injectIntoRepeaterItemIcon)({
|
|
4735
|
+
id: "dynamic-background-image",
|
|
4736
|
+
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4737
|
+
component: BackgroundControlDynamicTagIcon
|
|
4738
|
+
});
|
|
4638
4739
|
registerPopoverAction({
|
|
4639
4740
|
id: "dynamic-tags",
|
|
4640
4741
|
useProps: usePropDynamicAction
|
|
@@ -4644,8 +4745,8 @@ var init = () => {
|
|
|
4644
4745
|
};
|
|
4645
4746
|
|
|
4646
4747
|
// src/reset-style-props.tsx
|
|
4647
|
-
var
|
|
4648
|
-
var
|
|
4748
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
4749
|
+
var import_icons29 = require("@elementor/icons");
|
|
4649
4750
|
var import_i18n59 = require("@wordpress/i18n");
|
|
4650
4751
|
var { registerAction } = controlActionsMenu;
|
|
4651
4752
|
function initResetStyleProps() {
|
|
@@ -4657,11 +4758,11 @@ function initResetStyleProps() {
|
|
|
4657
4758
|
var EXCLUDED_BINDS = ["order", "flex-grow", "flex-shrink", "flex-basis"];
|
|
4658
4759
|
function useResetStyleValueProps() {
|
|
4659
4760
|
const isStyle = useIsStyle();
|
|
4660
|
-
const { value, setValue, path, bind } = (0,
|
|
4761
|
+
const { value, setValue, path, bind } = (0, import_editor_controls59.useBoundProp)();
|
|
4661
4762
|
return {
|
|
4662
4763
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4663
4764
|
title: (0, import_i18n59.__)("Clear", "elementor"),
|
|
4664
|
-
icon:
|
|
4765
|
+
icon: import_icons29.BrushBigIcon,
|
|
4665
4766
|
onClick: () => setValue(null)
|
|
4666
4767
|
};
|
|
4667
4768
|
}
|
|
@@ -4670,36 +4771,36 @@ function useResetStyleValueProps() {
|
|
|
4670
4771
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
4671
4772
|
|
|
4672
4773
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4673
|
-
var
|
|
4774
|
+
var React92 = __toESM(require("react"));
|
|
4674
4775
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
4675
|
-
var
|
|
4676
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */
|
|
4776
|
+
var import_ui73 = require("@elementor/ui");
|
|
4777
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React92.createElement(import_ui73.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React92.createElement(ItemIconColor, { value }), /* @__PURE__ */ React92.createElement(ItemLabelColor, { value })));
|
|
4677
4778
|
var ItemIconColor = ({ value }) => {
|
|
4678
4779
|
const { color } = value;
|
|
4679
|
-
return /* @__PURE__ */
|
|
4780
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4680
4781
|
};
|
|
4681
4782
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4682
|
-
return /* @__PURE__ */
|
|
4783
|
+
return /* @__PURE__ */ React92.createElement("span", null, color);
|
|
4683
4784
|
};
|
|
4684
|
-
var StyledUnstableColorIndicator = (0,
|
|
4785
|
+
var StyledUnstableColorIndicator = (0, import_ui73.styled)(import_ui73.UnstableColorIndicator)(({ theme }) => ({
|
|
4685
4786
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4686
4787
|
}));
|
|
4687
4788
|
|
|
4688
4789
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4689
|
-
var
|
|
4790
|
+
var React93 = __toESM(require("react"));
|
|
4690
4791
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
4691
|
-
var
|
|
4792
|
+
var import_ui74 = require("@elementor/ui");
|
|
4692
4793
|
var import_i18n60 = require("@wordpress/i18n");
|
|
4693
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */
|
|
4794
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React93.createElement(import_ui74.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React93.createElement(ItemLabelGradient, { value })));
|
|
4694
4795
|
var ItemIconGradient = ({ value }) => {
|
|
4695
4796
|
const gradient = getGradientValue(value);
|
|
4696
|
-
return /* @__PURE__ */
|
|
4797
|
+
return /* @__PURE__ */ React93.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4697
4798
|
};
|
|
4698
4799
|
var ItemLabelGradient = ({ value }) => {
|
|
4699
4800
|
if (value.type === "linear") {
|
|
4700
|
-
return /* @__PURE__ */
|
|
4801
|
+
return /* @__PURE__ */ React93.createElement("span", null, (0, import_i18n60.__)("Linear Gradient", "elementor"));
|
|
4701
4802
|
}
|
|
4702
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ React93.createElement("span", null, (0, import_i18n60.__)("Radial Gradient", "elementor"));
|
|
4703
4804
|
};
|
|
4704
4805
|
var getGradientValue = (gradient) => {
|
|
4705
4806
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4710,16 +4811,16 @@ var getGradientValue = (gradient) => {
|
|
|
4710
4811
|
};
|
|
4711
4812
|
|
|
4712
4813
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4713
|
-
var
|
|
4814
|
+
var React94 = __toESM(require("react"));
|
|
4714
4815
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
4715
4816
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4716
|
-
var
|
|
4817
|
+
var import_ui75 = require("@elementor/ui");
|
|
4717
4818
|
var import_wp_media = require("@elementor/wp-media");
|
|
4718
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
4819
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React94.createElement(import_ui75.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React94.createElement(ItemIconImage, { value }), /* @__PURE__ */ React94.createElement(ItemLabelImage, { value })));
|
|
4719
4820
|
var ItemIconImage = ({ value }) => {
|
|
4720
4821
|
const { imageUrl } = useImage(value);
|
|
4721
|
-
return /* @__PURE__ */
|
|
4722
|
-
|
|
4822
|
+
return /* @__PURE__ */ React94.createElement(
|
|
4823
|
+
import_ui75.CardMedia,
|
|
4723
4824
|
{
|
|
4724
4825
|
image: imageUrl,
|
|
4725
4826
|
sx: (theme) => ({
|
|
@@ -4733,7 +4834,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4733
4834
|
};
|
|
4734
4835
|
var ItemLabelImage = ({ value }) => {
|
|
4735
4836
|
const { imageTitle } = useImage(value);
|
|
4736
|
-
return /* @__PURE__ */
|
|
4837
|
+
return /* @__PURE__ */ React94.createElement(import_editor_ui7.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React94.createElement("span", null, imageTitle));
|
|
4737
4838
|
};
|
|
4738
4839
|
var useImage = (image) => {
|
|
4739
4840
|
let imageTitle, imageUrl = null;
|
|
@@ -4758,14 +4859,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4758
4859
|
};
|
|
4759
4860
|
|
|
4760
4861
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4761
|
-
var
|
|
4862
|
+
var React95 = __toESM(require("react"));
|
|
4762
4863
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
4763
|
-
var
|
|
4864
|
+
var import_ui76 = require("@elementor/ui");
|
|
4764
4865
|
var backgroundOverlayTransformer = (0, import_editor_canvas8.createTransformer)((values) => {
|
|
4765
4866
|
if (!values || values.length === 0) {
|
|
4766
4867
|
return null;
|
|
4767
4868
|
}
|
|
4768
|
-
return /* @__PURE__ */
|
|
4869
|
+
return /* @__PURE__ */ React95.createElement(import_ui76.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React95.createElement(import_ui76.Stack, { key: index }, item)));
|
|
4769
4870
|
});
|
|
4770
4871
|
|
|
4771
4872
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -4831,6 +4932,7 @@ var blockV1Panel = () => {
|
|
|
4831
4932
|
init,
|
|
4832
4933
|
injectIntoClassSelectorActions,
|
|
4833
4934
|
registerControlReplacement,
|
|
4935
|
+
registerStyleProviderToColors,
|
|
4834
4936
|
useBoundProp,
|
|
4835
4937
|
useFontFamilies,
|
|
4836
4938
|
usePanelActions,
|