@elementor/editor-editing-panel 4.0.0-683 → 4.0.0-beta5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +91 -48
- package/dist/index.d.ts +91 -48
- package/dist/index.js +119 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +103 -83
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/style-sections/position-section/position-section.tsx +58 -21
- package/src/controls-registry/controls-registry.tsx +2 -2
- package/src/index.ts +1 -0
- package/src/styles-inheritance/components/infotip/value-component.tsx +20 -17
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +8 -10
- package/src/styles-inheritance/init-styles-inheritance-transformers.ts +1 -1
- package/src/styles-inheritance/transformers/array-transformer.tsx +13 -5
- package/src/styles-inheritance/transformers/box-shadow-transformer.tsx +5 -7
- package/src/styles-inheritance/transformers/repeater-to-items-transformer.tsx +2 -16
package/dist/index.mjs
CHANGED
|
@@ -1954,7 +1954,6 @@ import {
|
|
|
1954
1954
|
emailPropTypeUtil,
|
|
1955
1955
|
htmlV3PropTypeUtil,
|
|
1956
1956
|
imagePropTypeUtil,
|
|
1957
|
-
imageSrcPropTypeUtil,
|
|
1958
1957
|
keyValuePropTypeUtil,
|
|
1959
1958
|
linkPropTypeUtil,
|
|
1960
1959
|
numberPropTypeUtil,
|
|
@@ -1962,11 +1961,12 @@ import {
|
|
|
1962
1961
|
sizePropTypeUtil,
|
|
1963
1962
|
stringArrayPropTypeUtil,
|
|
1964
1963
|
stringPropTypeUtil as stringPropTypeUtil2,
|
|
1964
|
+
svgSrcPropTypeUtil,
|
|
1965
1965
|
videoSrcPropTypeUtil
|
|
1966
1966
|
} from "@elementor/editor-props";
|
|
1967
1967
|
var controlTypes = {
|
|
1968
1968
|
image: { component: ImageControl, layout: "custom", propTypeUtil: imagePropTypeUtil },
|
|
1969
|
-
"svg-media": { component: SvgMediaControl, layout: "full", propTypeUtil:
|
|
1969
|
+
"svg-media": { component: SvgMediaControl, layout: "full", propTypeUtil: svgSrcPropTypeUtil },
|
|
1970
1970
|
text: { component: TextControl, layout: "full", propTypeUtil: stringPropTypeUtil2 },
|
|
1971
1971
|
textarea: { component: TextAreaControl, layout: "full", propTypeUtil: stringPropTypeUtil2 },
|
|
1972
1972
|
size: { component: SizeControl, layout: "two-columns", propTypeUtil: sizePropTypeUtil },
|
|
@@ -3876,6 +3876,7 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3876
3876
|
|
|
3877
3877
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3878
3878
|
import * as React54 from "react";
|
|
3879
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef9 } from "react";
|
|
3879
3880
|
import { useSessionStorage as useSessionStorage3 } from "@elementor/session";
|
|
3880
3881
|
import { __ as __32 } from "@wordpress/i18n";
|
|
3881
3882
|
|
|
@@ -3967,42 +3968,65 @@ var ZIndexField = () => {
|
|
|
3967
3968
|
};
|
|
3968
3969
|
|
|
3969
3970
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3971
|
+
var POSITION_STATIC = "static";
|
|
3970
3972
|
var POSITION_LABEL2 = __32("Position", "elementor");
|
|
3971
3973
|
var DIMENSIONS_LABEL = __32("Dimensions", "elementor");
|
|
3974
|
+
var POSITION_DEPENDENT_PROP_NAMES = [
|
|
3975
|
+
"inset-block-start",
|
|
3976
|
+
"inset-block-end",
|
|
3977
|
+
"inset-inline-start",
|
|
3978
|
+
"inset-inline-end",
|
|
3979
|
+
"z-index"
|
|
3980
|
+
];
|
|
3981
|
+
var CLEARED_POSITION_DEPENDENT_VALUES = {
|
|
3982
|
+
"inset-block-start": void 0,
|
|
3983
|
+
"inset-block-end": void 0,
|
|
3984
|
+
"inset-inline-start": void 0,
|
|
3985
|
+
"inset-inline-end": void 0,
|
|
3986
|
+
"z-index": void 0
|
|
3987
|
+
};
|
|
3972
3988
|
var PositionSection = () => {
|
|
3973
3989
|
const { value: positionValue } = useStylesField("position", {
|
|
3974
3990
|
history: { propDisplayName: POSITION_LABEL2 }
|
|
3975
3991
|
});
|
|
3976
|
-
const { values:
|
|
3977
|
-
"inset-block-start",
|
|
3978
|
-
"inset-block-end",
|
|
3979
|
-
"inset-inline-start",
|
|
3980
|
-
"inset-inline-end"
|
|
3981
|
-
]);
|
|
3992
|
+
const { values: positionDependentValues, setValues: setPositionDependentValues } = useStylesFields([...POSITION_DEPENDENT_PROP_NAMES]);
|
|
3982
3993
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3994
|
+
const clearPositionDependentProps = useCallback2(() => {
|
|
3995
|
+
const dimensions = {
|
|
3996
|
+
"inset-block-start": positionDependentValues?.["inset-block-start"],
|
|
3997
|
+
"inset-block-end": positionDependentValues?.["inset-block-end"],
|
|
3998
|
+
"inset-inline-start": positionDependentValues?.["inset-inline-start"],
|
|
3999
|
+
"inset-inline-end": positionDependentValues?.["inset-inline-end"]
|
|
4000
|
+
};
|
|
4001
|
+
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
4002
|
+
const hasValuesToClear = Object.values(dimensions).some((v) => v !== null) || positionDependentValues?.["z-index"] !== null;
|
|
4003
|
+
if (hasValuesToClear) {
|
|
4004
|
+
updateDimensionsHistory(dimensions);
|
|
4005
|
+
setPositionDependentValues(CLEARED_POSITION_DEPENDENT_VALUES, meta);
|
|
4006
|
+
}
|
|
4007
|
+
}, [positionDependentValues, updateDimensionsHistory, setPositionDependentValues]);
|
|
4008
|
+
const clearPositionDependentPropsRef = useRef9(clearPositionDependentProps);
|
|
4009
|
+
clearPositionDependentPropsRef.current = clearPositionDependentProps;
|
|
4010
|
+
useEffect6(() => {
|
|
4011
|
+
if (positionValue?.value === POSITION_STATIC || positionValue === null) {
|
|
4012
|
+
clearPositionDependentPropsRef.current();
|
|
4013
|
+
}
|
|
4014
|
+
}, [positionValue]);
|
|
3983
4015
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3984
4016
|
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
3985
|
-
if (newPosition ===
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
"inset-block-end": void 0,
|
|
3992
|
-
"inset-inline-start": void 0,
|
|
3993
|
-
"inset-inline-end": void 0
|
|
3994
|
-
},
|
|
4017
|
+
if (newPosition === POSITION_STATIC) {
|
|
4018
|
+
clearPositionDependentProps();
|
|
4019
|
+
} else if (previousPosition === POSITION_STATIC) {
|
|
4020
|
+
if (dimensionsValuesFromHistory) {
|
|
4021
|
+
setPositionDependentValues(
|
|
4022
|
+
{ ...dimensionsValuesFromHistory, "z-index": void 0 },
|
|
3995
4023
|
meta
|
|
3996
4024
|
);
|
|
3997
|
-
}
|
|
3998
|
-
} else if (previousPosition === "static") {
|
|
3999
|
-
if (dimensionsValuesFromHistory) {
|
|
4000
|
-
setDimensions(dimensionsValuesFromHistory, meta);
|
|
4001
4025
|
clearDimensionsHistory();
|
|
4002
4026
|
}
|
|
4003
4027
|
}
|
|
4004
4028
|
};
|
|
4005
|
-
const isNotStatic = positionValue && positionValue?.value !==
|
|
4029
|
+
const isNotStatic = positionValue && positionValue?.value !== POSITION_STATIC;
|
|
4006
4030
|
return /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(DimensionsField, null), /* @__PURE__ */ React54.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(OffsetField, null));
|
|
4007
4031
|
};
|
|
4008
4032
|
var usePersistDimensions = () => {
|
|
@@ -4014,7 +4038,7 @@ var usePersistDimensions = () => {
|
|
|
4014
4038
|
|
|
4015
4039
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4016
4040
|
import * as React59 from "react";
|
|
4017
|
-
import { useRef as
|
|
4041
|
+
import { useRef as useRef10 } from "react";
|
|
4018
4042
|
import { AspectRatioControl, PositionControl, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
4019
4043
|
import { Grid as Grid4, Stack as Stack10 } from "@elementor/ui";
|
|
4020
4044
|
import { __ as __36 } from "@wordpress/i18n";
|
|
@@ -4181,7 +4205,7 @@ var CssSizeProps = [
|
|
|
4181
4205
|
];
|
|
4182
4206
|
var ASPECT_RATIO_LABEL = __36("Aspect Ratio", "elementor");
|
|
4183
4207
|
var SizeSection = () => {
|
|
4184
|
-
const gridRowRefs = [
|
|
4208
|
+
const gridRowRefs = [useRef10(null), useRef10(null), useRef10(null)];
|
|
4185
4209
|
return /* @__PURE__ */ React59.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React59.createElement(Grid4, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React59.createElement(Grid4, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React59.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(Stack10, null, /* @__PURE__ */ React59.createElement(OverflowField, null)), /* @__PURE__ */ React59.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React59.createElement(Stack10, { gap: 2, pt: 2 }, /* @__PURE__ */ React59.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React59.createElement(AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(ObjectFitField, null), /* @__PURE__ */ React59.createElement(StylesField, { bind: "object-position", propDisplayName: __36("Object position", "elementor") }, /* @__PURE__ */ React59.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(PositionControl, null))))));
|
|
4186
4210
|
};
|
|
4187
4211
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
@@ -4221,12 +4245,12 @@ var ColumnCountField = () => {
|
|
|
4221
4245
|
|
|
4222
4246
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4223
4247
|
import * as React62 from "react";
|
|
4224
|
-
import { useRef as
|
|
4248
|
+
import { useRef as useRef11 } from "react";
|
|
4225
4249
|
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
4226
4250
|
import { __ as __39 } from "@wordpress/i18n";
|
|
4227
4251
|
var COLUMN_GAP_LABEL = __39("Column gap", "elementor");
|
|
4228
4252
|
var ColumnGapField = () => {
|
|
4229
|
-
const rowRef =
|
|
4253
|
+
const rowRef = useRef11(null);
|
|
4230
4254
|
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React62.createElement(SizeControl7, { anchorRef: rowRef })));
|
|
4231
4255
|
};
|
|
4232
4256
|
|
|
@@ -4254,12 +4278,12 @@ var FontFamilyField = () => {
|
|
|
4254
4278
|
|
|
4255
4279
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4256
4280
|
import * as React64 from "react";
|
|
4257
|
-
import { useRef as
|
|
4281
|
+
import { useRef as useRef12 } from "react";
|
|
4258
4282
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
4259
4283
|
import { __ as __41 } from "@wordpress/i18n";
|
|
4260
4284
|
var FONT_SIZE_LABEL = __41("Font size", "elementor");
|
|
4261
4285
|
var FontSizeField = () => {
|
|
4262
|
-
const rowRef =
|
|
4286
|
+
const rowRef = useRef12(null);
|
|
4263
4287
|
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React64.createElement(SizeControl8, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4264
4288
|
};
|
|
4265
4289
|
|
|
@@ -4309,23 +4333,23 @@ var FontWeightField = () => {
|
|
|
4309
4333
|
|
|
4310
4334
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4311
4335
|
import * as React67 from "react";
|
|
4312
|
-
import { useRef as
|
|
4336
|
+
import { useRef as useRef13 } from "react";
|
|
4313
4337
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
4314
4338
|
import { __ as __44 } from "@wordpress/i18n";
|
|
4315
4339
|
var LETTER_SPACING_LABEL = __44("Letter spacing", "elementor");
|
|
4316
4340
|
var LetterSpacingField = () => {
|
|
4317
|
-
const rowRef =
|
|
4341
|
+
const rowRef = useRef13(null);
|
|
4318
4342
|
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React67.createElement(SizeControl9, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4319
4343
|
};
|
|
4320
4344
|
|
|
4321
4345
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4322
4346
|
import * as React68 from "react";
|
|
4323
|
-
import { useRef as
|
|
4347
|
+
import { useRef as useRef14 } from "react";
|
|
4324
4348
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
4325
4349
|
import { __ as __45 } from "@wordpress/i18n";
|
|
4326
4350
|
var LINE_HEIGHT_LABEL = __45("Line height", "elementor");
|
|
4327
4351
|
var LineHeightField = () => {
|
|
4328
|
-
const rowRef =
|
|
4352
|
+
const rowRef = useRef14(null);
|
|
4329
4353
|
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(SizeControl10, { anchorRef: rowRef })));
|
|
4330
4354
|
};
|
|
4331
4355
|
|
|
@@ -4547,12 +4571,12 @@ var TransformField = () => /* @__PURE__ */ React75.createElement(StylesField, {
|
|
|
4547
4571
|
|
|
4548
4572
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4549
4573
|
import * as React76 from "react";
|
|
4550
|
-
import { useRef as
|
|
4574
|
+
import { useRef as useRef15 } from "react";
|
|
4551
4575
|
import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
|
|
4552
4576
|
import { __ as __52 } from "@wordpress/i18n";
|
|
4553
4577
|
var WORD_SPACING_LABEL = __52("Word spacing", "elementor");
|
|
4554
4578
|
var WordSpacingField = () => {
|
|
4555
|
-
const rowRef =
|
|
4579
|
+
const rowRef = useRef15(null);
|
|
4556
4580
|
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React76.createElement(SizeControl11, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4557
4581
|
};
|
|
4558
4582
|
|
|
@@ -4825,7 +4849,7 @@ import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
|
4825
4849
|
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
4826
4850
|
|
|
4827
4851
|
// src/hooks/use-open-editor-panel.ts
|
|
4828
|
-
import { useEffect as
|
|
4852
|
+
import { useEffect as useEffect7 } from "react";
|
|
4829
4853
|
import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/editor-v1-adapters";
|
|
4830
4854
|
|
|
4831
4855
|
// src/panel.ts
|
|
@@ -4849,7 +4873,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
4849
4873
|
// src/hooks/use-open-editor-panel.ts
|
|
4850
4874
|
var useOpenEditorPanel = () => {
|
|
4851
4875
|
const { open } = usePanelActions();
|
|
4852
|
-
|
|
4876
|
+
useEffect7(() => {
|
|
4853
4877
|
return listenTo(commandStartEvent("panel/editor/open"), () => {
|
|
4854
4878
|
if (isAtomicWidgetSelected()) {
|
|
4855
4879
|
open();
|
|
@@ -4869,12 +4893,12 @@ import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-c
|
|
|
4869
4893
|
|
|
4870
4894
|
// src/components/promotions/custom-css.tsx
|
|
4871
4895
|
import * as React82 from "react";
|
|
4872
|
-
import { useRef as
|
|
4896
|
+
import { useRef as useRef16 } from "react";
|
|
4873
4897
|
import { PromotionTrigger } from "@elementor/editor-controls";
|
|
4874
4898
|
import { __ as __56 } from "@wordpress/i18n";
|
|
4875
4899
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
4876
4900
|
var CustomCssSection = () => {
|
|
4877
|
-
const triggerRef =
|
|
4901
|
+
const triggerRef = useRef16(null);
|
|
4878
4902
|
return /* @__PURE__ */ React82.createElement(
|
|
4879
4903
|
StyleTabSection,
|
|
4880
4904
|
{
|
|
@@ -5586,7 +5610,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5586
5610
|
|
|
5587
5611
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5588
5612
|
import * as React87 from "react";
|
|
5589
|
-
import { Fragment as Fragment14, useEffect as
|
|
5613
|
+
import { Fragment as Fragment14, useEffect as useEffect8, useState as useState10 } from "react";
|
|
5590
5614
|
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5591
5615
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
5592
5616
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
@@ -5606,7 +5630,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5606
5630
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5607
5631
|
const options12 = useFilteredOptions(searchValue);
|
|
5608
5632
|
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
5609
|
-
|
|
5633
|
+
useEffect8(() => {
|
|
5610
5634
|
if (hasNoDynamicTags) {
|
|
5611
5635
|
trackViewPromotion({ target_name: "dynamic_tags" });
|
|
5612
5636
|
} else if (expired) {
|
|
@@ -6109,7 +6133,7 @@ import { __ as __66 } from "@wordpress/i18n";
|
|
|
6109
6133
|
|
|
6110
6134
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6111
6135
|
import * as React94 from "react";
|
|
6112
|
-
import { useMemo as useMemo13, useRef as
|
|
6136
|
+
import { useMemo as useMemo13, useRef as useRef17, useState as useState12 } from "react";
|
|
6113
6137
|
import {
|
|
6114
6138
|
createPropsResolver as createPropsResolver2,
|
|
6115
6139
|
stylesInheritanceTransformersRegistry
|
|
@@ -6124,12 +6148,12 @@ import {
|
|
|
6124
6148
|
IconButton as IconButton3,
|
|
6125
6149
|
Infotip as Infotip2,
|
|
6126
6150
|
Stack as Stack17,
|
|
6127
|
-
Tooltip as
|
|
6151
|
+
Tooltip as Tooltip5
|
|
6128
6152
|
} from "@elementor/ui";
|
|
6129
6153
|
import { __ as __65 } from "@wordpress/i18n";
|
|
6130
6154
|
|
|
6131
6155
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6132
|
-
import { isValidElement, useEffect as
|
|
6156
|
+
import { isValidElement, useEffect as useEffect9, useState as useState11 } from "react";
|
|
6133
6157
|
import { UnknownStyleStateError } from "@elementor/editor-canvas";
|
|
6134
6158
|
import {
|
|
6135
6159
|
isClassState as isClassState2,
|
|
@@ -6140,7 +6164,7 @@ import { __ as __63 } from "@wordpress/i18n";
|
|
|
6140
6164
|
var MAXIMUM_ITEMS = 2;
|
|
6141
6165
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6142
6166
|
const [items3, setItems] = useState11([]);
|
|
6143
|
-
|
|
6167
|
+
useEffect9(() => {
|
|
6144
6168
|
(async () => {
|
|
6145
6169
|
const normalizedItems = await Promise.all(
|
|
6146
6170
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
@@ -6275,9 +6299,9 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
6275
6299
|
|
|
6276
6300
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
6277
6301
|
import * as React92 from "react";
|
|
6278
|
-
import { Typography as Typography6 } from "@elementor/ui";
|
|
6302
|
+
import { Tooltip as Tooltip4, Typography as Typography6 } from "@elementor/ui";
|
|
6279
6303
|
var ValueComponent = ({ index, value }) => {
|
|
6280
|
-
return /* @__PURE__ */ React92.createElement(
|
|
6304
|
+
return /* @__PURE__ */ React92.createElement(Tooltip4, { title: value, placement: "top" }, /* @__PURE__ */ React92.createElement(
|
|
6281
6305
|
Typography6,
|
|
6282
6306
|
{
|
|
6283
6307
|
variant: "caption",
|
|
@@ -6286,15 +6310,16 @@ var ValueComponent = ({ index, value }) => {
|
|
|
6286
6310
|
mt: "1px",
|
|
6287
6311
|
textDecoration: index === 0 ? "none" : "line-through",
|
|
6288
6312
|
overflow: "hidden",
|
|
6289
|
-
|
|
6290
|
-
|
|
6313
|
+
display: "-webkit-box",
|
|
6314
|
+
WebkitLineClamp: 1,
|
|
6315
|
+
WebkitBoxOrient: "vertical",
|
|
6291
6316
|
pl: 2.5,
|
|
6292
6317
|
minWidth: 0,
|
|
6293
6318
|
maxWidth: "100%"
|
|
6294
6319
|
}
|
|
6295
6320
|
},
|
|
6296
6321
|
value
|
|
6297
|
-
);
|
|
6322
|
+
));
|
|
6298
6323
|
};
|
|
6299
6324
|
|
|
6300
6325
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
@@ -6321,7 +6346,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6321
6346
|
isDisabled
|
|
6322
6347
|
}) => {
|
|
6323
6348
|
const [showInfotip, setShowInfotip] = useState12(false);
|
|
6324
|
-
const triggerRef =
|
|
6349
|
+
const triggerRef = useRef17(null);
|
|
6325
6350
|
const toggleInfotip = () => {
|
|
6326
6351
|
if (isDisabled) {
|
|
6327
6352
|
return;
|
|
@@ -6382,7 +6407,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6382
6407
|
}
|
|
6383
6408
|
}
|
|
6384
6409
|
},
|
|
6385
|
-
/* @__PURE__ */ React94.createElement(Stack17, { gap: 1.5, sx: { pl:
|
|
6410
|
+
/* @__PURE__ */ React94.createElement(Stack17, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
6386
6411
|
return /* @__PURE__ */ React94.createElement(
|
|
6387
6412
|
Box8,
|
|
6388
6413
|
{
|
|
@@ -6477,21 +6502,19 @@ function TooltipOrInfotip({
|
|
|
6477
6502
|
sx: { mx: 2 }
|
|
6478
6503
|
}
|
|
6479
6504
|
},
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
]
|
|
6488
|
-
}
|
|
6505
|
+
PopperProps: {
|
|
6506
|
+
modifiers: [
|
|
6507
|
+
{
|
|
6508
|
+
name: "offset",
|
|
6509
|
+
options: { offset: [offsetX, 0] }
|
|
6510
|
+
}
|
|
6511
|
+
]
|
|
6489
6512
|
}
|
|
6490
6513
|
},
|
|
6491
6514
|
children
|
|
6492
6515
|
));
|
|
6493
6516
|
}
|
|
6494
|
-
return /* @__PURE__ */ React94.createElement(
|
|
6517
|
+
return /* @__PURE__ */ React94.createElement(Tooltip5, { title: __65("Style origin", "elementor"), placement: "top" }, children);
|
|
6495
6518
|
}
|
|
6496
6519
|
|
|
6497
6520
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
@@ -6566,19 +6589,22 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6566
6589
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6567
6590
|
import * as React96 from "react";
|
|
6568
6591
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
6569
|
-
import { Stack as Stack18 } from "@elementor/ui";
|
|
6570
6592
|
var arrayTransformer = createTransformer2((values) => {
|
|
6571
6593
|
if (!values || values.length === 0) {
|
|
6572
6594
|
return null;
|
|
6573
6595
|
}
|
|
6574
|
-
|
|
6596
|
+
const allStrings = values.every((item) => typeof item === "string" || typeof item === "number");
|
|
6597
|
+
if (allStrings) {
|
|
6598
|
+
return values.join(" ");
|
|
6599
|
+
}
|
|
6600
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, values.map((item, index) => /* @__PURE__ */ React96.createElement(React96.Fragment, { key: index }, index > 0 && " ", item)));
|
|
6575
6601
|
});
|
|
6576
6602
|
|
|
6577
6603
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6578
6604
|
import * as React97 from "react";
|
|
6579
6605
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
6580
|
-
import { Stack as
|
|
6581
|
-
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React97.createElement(
|
|
6606
|
+
import { Stack as Stack18, styled as styled6, UnstableColorIndicator } from "@elementor/ui";
|
|
6607
|
+
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React97.createElement(Stack18, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React97.createElement(ItemLabelColor, { value })));
|
|
6582
6608
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6583
6609
|
return /* @__PURE__ */ React97.createElement("span", null, color);
|
|
6584
6610
|
};
|
|
@@ -6593,9 +6619,9 @@ var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) =
|
|
|
6593
6619
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6594
6620
|
import * as React98 from "react";
|
|
6595
6621
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
6596
|
-
import { Stack as
|
|
6622
|
+
import { Stack as Stack19 } from "@elementor/ui";
|
|
6597
6623
|
import { __ as __67 } from "@wordpress/i18n";
|
|
6598
|
-
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React98.createElement(
|
|
6624
|
+
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React98.createElement(Stack19, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React98.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React98.createElement(ItemLabelGradient, { value })));
|
|
6599
6625
|
var ItemIconGradient = ({ value }) => {
|
|
6600
6626
|
const gradient = getGradientValue(value);
|
|
6601
6627
|
return /* @__PURE__ */ React98.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
@@ -6618,9 +6644,9 @@ var getGradientValue = (gradient) => {
|
|
|
6618
6644
|
import * as React99 from "react";
|
|
6619
6645
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
6620
6646
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
6621
|
-
import { CardMedia, Stack as
|
|
6647
|
+
import { CardMedia, Stack as Stack20 } from "@elementor/ui";
|
|
6622
6648
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
6623
|
-
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React99.createElement(
|
|
6649
|
+
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React99.createElement(Stack20, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React99.createElement(ItemIconImage, { value }), /* @__PURE__ */ React99.createElement(ItemLabelImage, { value })));
|
|
6624
6650
|
var ItemIconImage = ({ value }) => {
|
|
6625
6651
|
const { imageUrl } = useImage(value);
|
|
6626
6652
|
return /* @__PURE__ */ React99.createElement(
|
|
@@ -6666,7 +6692,6 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6666
6692
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6667
6693
|
import * as React100 from "react";
|
|
6668
6694
|
import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
|
|
6669
|
-
import { Stack as Stack22 } from "@elementor/ui";
|
|
6670
6695
|
var boxShadowTransformer = createTransformer6((value) => {
|
|
6671
6696
|
if (!value) {
|
|
6672
6697
|
return null;
|
|
@@ -6675,13 +6700,13 @@ var boxShadowTransformer = createTransformer6((value) => {
|
|
|
6675
6700
|
const colorValue = color || "#000000";
|
|
6676
6701
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6677
6702
|
const positionValue = position || "outset";
|
|
6678
|
-
return /* @__PURE__ */ React100.createElement(
|
|
6703
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
6679
6704
|
});
|
|
6680
6705
|
|
|
6681
6706
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6682
6707
|
import * as React101 from "react";
|
|
6683
6708
|
import { createTransformer as createTransformer7 } from "@elementor/editor-canvas";
|
|
6684
|
-
import { Stack as
|
|
6709
|
+
import { Stack as Stack21, styled as styled7, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
6685
6710
|
function isValidCSSColor(value) {
|
|
6686
6711
|
if (!value.trim()) {
|
|
6687
6712
|
return false;
|
|
@@ -6699,24 +6724,18 @@ var colorTransformer = createTransformer7((value) => {
|
|
|
6699
6724
|
if (!isValidCSSColor(value)) {
|
|
6700
6725
|
return value;
|
|
6701
6726
|
}
|
|
6702
|
-
return /* @__PURE__ */ React101.createElement(
|
|
6727
|
+
return /* @__PURE__ */ React101.createElement(Stack21, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React101.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React101.createElement("span", null, value));
|
|
6703
6728
|
});
|
|
6704
6729
|
|
|
6705
6730
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6706
|
-
import * as React102 from "react";
|
|
6707
6731
|
import { createTransformer as createTransformer8 } from "@elementor/editor-canvas";
|
|
6708
|
-
|
|
6709
|
-
var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") => {
|
|
6732
|
+
var createRepeaterToItemsTransformer = (originalTransformer) => {
|
|
6710
6733
|
return createTransformer8((value, options12) => {
|
|
6711
6734
|
const stringResult = originalTransformer(value, options12);
|
|
6712
6735
|
if (!stringResult || typeof stringResult !== "string") {
|
|
6713
6736
|
return stringResult;
|
|
6714
6737
|
}
|
|
6715
|
-
|
|
6716
|
-
if (parts.length <= 1) {
|
|
6717
|
-
return stringResult;
|
|
6718
|
-
}
|
|
6719
|
-
return /* @__PURE__ */ React102.createElement(Stack24, { direction: "column", gap: 0.5 }, parts.map((part, index) => /* @__PURE__ */ React102.createElement(Stack24, { key: index }, part.trim())));
|
|
6738
|
+
return stringResult;
|
|
6720
6739
|
});
|
|
6721
6740
|
};
|
|
6722
6741
|
|
|
@@ -6755,7 +6774,7 @@ function registerCustomTransformers(originalStyleTransformers) {
|
|
|
6755
6774
|
);
|
|
6756
6775
|
stylesInheritanceTransformersRegistry2.register(
|
|
6757
6776
|
"transition",
|
|
6758
|
-
createRepeaterToItemsTransformer(originalStyleTransformers.transition
|
|
6777
|
+
createRepeaterToItemsTransformer(originalStyleTransformers.transition)
|
|
6759
6778
|
);
|
|
6760
6779
|
["background-overlay", "box-shadow", "transform-functions"].forEach(
|
|
6761
6780
|
(propType) => stylesInheritanceTransformersRegistry2.register(propType, arrayTransformer)
|
|
@@ -6795,6 +6814,7 @@ var blockV1Panel = () => {
|
|
|
6795
6814
|
};
|
|
6796
6815
|
export {
|
|
6797
6816
|
Control as BaseControl,
|
|
6817
|
+
ControlTypeContainer,
|
|
6798
6818
|
CustomCssIndicator,
|
|
6799
6819
|
ElementProvider,
|
|
6800
6820
|
FIELD_TYPE,
|