@elementor/editor-editing-panel 4.1.0-811 → 4.1.0-812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +136 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/contexts/styles-inheritance-context.tsx +16 -2
- package/src/controls-registry/conditional-field.tsx +81 -7
package/dist/index.js
CHANGED
|
@@ -1847,7 +1847,7 @@ function EditorPanelErrorFallback() {
|
|
|
1847
1847
|
}
|
|
1848
1848
|
|
|
1849
1849
|
// src/components/editing-panel-tabs.tsx
|
|
1850
|
-
var
|
|
1850
|
+
var import_react38 = require("react");
|
|
1851
1851
|
var React84 = __toESM(require("react"));
|
|
1852
1852
|
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
1853
1853
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
@@ -2473,7 +2473,7 @@ function isControl(control) {
|
|
|
2473
2473
|
|
|
2474
2474
|
// src/components/style-tab.tsx
|
|
2475
2475
|
var React83 = __toESM(require("react"));
|
|
2476
|
-
var
|
|
2476
|
+
var import_react37 = require("react");
|
|
2477
2477
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
2478
2478
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
2479
2479
|
var import_locations3 = require("@elementor/locations");
|
|
@@ -2746,6 +2746,16 @@ function useStylesInheritanceChain(path) {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
return context.getInheritanceChain(snapshot, path, topLevelPropType);
|
|
2748
2748
|
}
|
|
2749
|
+
var EMPTY_INHERITED_VALUES = {};
|
|
2750
|
+
function useInheritedValues(propKeys) {
|
|
2751
|
+
const snapshot = useStylesInheritanceSnapshot();
|
|
2752
|
+
return (0, import_react20.useMemo)(() => {
|
|
2753
|
+
if (!snapshot || propKeys.length === 0) {
|
|
2754
|
+
return EMPTY_INHERITED_VALUES;
|
|
2755
|
+
}
|
|
2756
|
+
return Object.fromEntries(propKeys.map((key) => [key, snapshot[key]?.[0]?.value ?? null]));
|
|
2757
|
+
}, [snapshot, propKeys]);
|
|
2758
|
+
}
|
|
2749
2759
|
var useAppliedStyles = () => {
|
|
2750
2760
|
const currentClassesProp = useClassesProp();
|
|
2751
2761
|
const baseStyles = useBaseStyles();
|
|
@@ -2805,15 +2815,67 @@ function useStylesField(propName, meta) {
|
|
|
2805
2815
|
}
|
|
2806
2816
|
|
|
2807
2817
|
// src/controls-registry/conditional-field.tsx
|
|
2818
|
+
var import_react21 = require("react");
|
|
2808
2819
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2809
2820
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
2810
2821
|
var ConditionalField = ({ children }) => {
|
|
2811
|
-
const { propType } = (0, import_editor_controls5.useBoundProp)();
|
|
2822
|
+
const { propType, value, resetValue } = (0, import_editor_controls5.useBoundProp)();
|
|
2812
2823
|
const depList = getDependencies(propType);
|
|
2813
|
-
const { values: depValues } = useStylesFields(depList);
|
|
2814
|
-
const
|
|
2824
|
+
const { values: depValues, setValues: setDepValues } = useStylesFields(depList);
|
|
2825
|
+
const inheritedValues = useInheritedValues(depList);
|
|
2826
|
+
const resolvedValues = resolveWithInherited(depValues, inheritedValues);
|
|
2827
|
+
const isHidden = !(0, import_editor_props9.isDependencyMet)(propType?.dependencies, resolvedValues).isMet;
|
|
2828
|
+
useSyncDepsWithInherited({ isHidden, depValues, value, inheritedValues, setDepValues, resetValue });
|
|
2815
2829
|
return isHidden ? null : children;
|
|
2816
2830
|
};
|
|
2831
|
+
function wasDepsCleared(prevDepValues, depValues) {
|
|
2832
|
+
if (!prevDepValues) {
|
|
2833
|
+
return false;
|
|
2834
|
+
}
|
|
2835
|
+
return Object.keys(prevDepValues).some(
|
|
2836
|
+
(key) => prevDepValues[key] && (!depValues || !depValues[key])
|
|
2837
|
+
);
|
|
2838
|
+
}
|
|
2839
|
+
function useSyncDepsWithInherited({
|
|
2840
|
+
isHidden,
|
|
2841
|
+
depValues,
|
|
2842
|
+
value,
|
|
2843
|
+
inheritedValues,
|
|
2844
|
+
setDepValues,
|
|
2845
|
+
resetValue
|
|
2846
|
+
}) {
|
|
2847
|
+
const syncRef = (0, import_react21.useRef)({ hasSynced: false, prevDepValues: depValues });
|
|
2848
|
+
(0, import_react21.useEffect)(() => {
|
|
2849
|
+
const { hasSynced, prevDepValues } = syncRef.current;
|
|
2850
|
+
if (hasSynced && value && wasDepsCleared(prevDepValues, depValues)) {
|
|
2851
|
+
resetValue();
|
|
2852
|
+
}
|
|
2853
|
+
if (isHidden || !value || !depValues) {
|
|
2854
|
+
syncRef.current = { hasSynced: false, prevDepValues: depValues };
|
|
2855
|
+
return;
|
|
2856
|
+
}
|
|
2857
|
+
if (hasSynced) {
|
|
2858
|
+
syncRef.current.prevDepValues = depValues;
|
|
2859
|
+
return;
|
|
2860
|
+
}
|
|
2861
|
+
syncRef.current = { hasSynced: true, prevDepValues: depValues };
|
|
2862
|
+
Object.entries(depValues).forEach(([key, depValue]) => {
|
|
2863
|
+
const inherited = inheritedValues[key];
|
|
2864
|
+
if (!depValue && inherited) {
|
|
2865
|
+
setDepValues({ [key]: inherited }, { history: { propDisplayName: key } });
|
|
2866
|
+
}
|
|
2867
|
+
});
|
|
2868
|
+
}, [isHidden, depValues, value, inheritedValues, setDepValues, resetValue]);
|
|
2869
|
+
}
|
|
2870
|
+
function resolveWithInherited(localValues, inheritedValues) {
|
|
2871
|
+
if (!localValues) {
|
|
2872
|
+
const hasInherited = Object.keys(inheritedValues).length > 0;
|
|
2873
|
+
return hasInherited ? { ...inheritedValues } : null;
|
|
2874
|
+
}
|
|
2875
|
+
return Object.fromEntries(
|
|
2876
|
+
Object.entries(localValues).map(([key, val]) => [key, val ?? inheritedValues[key] ?? null])
|
|
2877
|
+
);
|
|
2878
|
+
}
|
|
2817
2879
|
function getDependencies(propType) {
|
|
2818
2880
|
if (!propType?.dependencies?.terms.length) {
|
|
2819
2881
|
return [];
|
|
@@ -3186,12 +3248,12 @@ var BlendModeField = () => {
|
|
|
3186
3248
|
|
|
3187
3249
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3188
3250
|
var React37 = __toESM(require("react"));
|
|
3189
|
-
var
|
|
3251
|
+
var import_react22 = require("react");
|
|
3190
3252
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
3191
3253
|
var import_i18n15 = require("@wordpress/i18n");
|
|
3192
3254
|
var OPACITY_LABEL = (0, import_i18n15.__)("Opacity", "elementor");
|
|
3193
3255
|
var OpacityControlField = () => {
|
|
3194
|
-
const rowRef = (0,
|
|
3256
|
+
const rowRef = (0, import_react22.useRef)(null);
|
|
3195
3257
|
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(import_editor_controls13.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3196
3258
|
};
|
|
3197
3259
|
|
|
@@ -3254,7 +3316,7 @@ var import_i18n18 = require("@wordpress/i18n");
|
|
|
3254
3316
|
|
|
3255
3317
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3256
3318
|
var React39 = __toESM(require("react"));
|
|
3257
|
-
var
|
|
3319
|
+
var import_react23 = require("react");
|
|
3258
3320
|
var import_ui22 = require("@elementor/ui");
|
|
3259
3321
|
var import_i18n17 = require("@wordpress/i18n");
|
|
3260
3322
|
var FLEX_DIRECTION_LABEL = (0, import_i18n17.__)("Flex direction", "elementor");
|
|
@@ -3277,7 +3339,7 @@ var RotatedIcon = ({
|
|
|
3277
3339
|
offset = 0,
|
|
3278
3340
|
disableRotationForReversed = false
|
|
3279
3341
|
}) => {
|
|
3280
|
-
const rotate = (0,
|
|
3342
|
+
const rotate = (0, import_react23.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
3281
3343
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
3282
3344
|
return /* @__PURE__ */ React39.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
3283
3345
|
};
|
|
@@ -3471,7 +3533,7 @@ var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React42.creat
|
|
|
3471
3533
|
|
|
3472
3534
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3473
3535
|
var React43 = __toESM(require("react"));
|
|
3474
|
-
var
|
|
3536
|
+
var import_react24 = require("react");
|
|
3475
3537
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
3476
3538
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
3477
3539
|
var import_i18n21 = require("@wordpress/i18n");
|
|
@@ -3517,7 +3579,7 @@ var displayFieldItems = [
|
|
|
3517
3579
|
var DisplayField = () => {
|
|
3518
3580
|
const placeholder = useDisplayPlaceholderValue();
|
|
3519
3581
|
const isGridActive = (0, import_editor_v1_adapters7.isExperimentActive)("e_css_grid");
|
|
3520
|
-
const items3 = (0,
|
|
3582
|
+
const items3 = (0, import_react24.useMemo)(
|
|
3521
3583
|
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3522
3584
|
[isGridActive]
|
|
3523
3585
|
);
|
|
@@ -3570,7 +3632,7 @@ var FlexDirectionField = () => {
|
|
|
3570
3632
|
|
|
3571
3633
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3572
3634
|
var React45 = __toESM(require("react"));
|
|
3573
|
-
var
|
|
3635
|
+
var import_react25 = require("react");
|
|
3574
3636
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3575
3637
|
var import_icons9 = require("@elementor/icons");
|
|
3576
3638
|
var import_ui27 = require("@elementor/ui");
|
|
@@ -3618,15 +3680,15 @@ function FlexOrderFieldContent() {
|
|
|
3618
3680
|
});
|
|
3619
3681
|
const { placeholder } = (0, import_editor_controls20.useBoundProp)();
|
|
3620
3682
|
const placeholderValue = placeholder;
|
|
3621
|
-
const currentGroup = (0,
|
|
3622
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
3623
|
-
const [customLocked, setCustomLocked] = (0,
|
|
3624
|
-
(0,
|
|
3683
|
+
const currentGroup = (0, import_react25.useMemo)(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
3684
|
+
const [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
3685
|
+
const [customLocked, setCustomLocked] = (0, import_react25.useState)(false);
|
|
3686
|
+
(0, import_react25.useEffect)(() => {
|
|
3625
3687
|
if (!customLocked) {
|
|
3626
3688
|
setActiveGroup(currentGroup);
|
|
3627
3689
|
}
|
|
3628
3690
|
}, [currentGroup, customLocked]);
|
|
3629
|
-
(0,
|
|
3691
|
+
(0, import_react25.useEffect)(() => {
|
|
3630
3692
|
if (order === null) {
|
|
3631
3693
|
setCustomLocked(false);
|
|
3632
3694
|
}
|
|
@@ -3686,7 +3748,7 @@ var getGroupControlValue = (order) => {
|
|
|
3686
3748
|
|
|
3687
3749
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3688
3750
|
var React46 = __toESM(require("react"));
|
|
3689
|
-
var
|
|
3751
|
+
var import_react26 = require("react");
|
|
3690
3752
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3691
3753
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
3692
3754
|
var import_icons10 = require("@elementor/icons");
|
|
@@ -3722,15 +3784,15 @@ var FlexSizeFieldContent = () => {
|
|
|
3722
3784
|
});
|
|
3723
3785
|
const { placeholder } = (0, import_editor_controls21.useBoundProp)();
|
|
3724
3786
|
const flexValues = extractFlexValues(value);
|
|
3725
|
-
const currentGroup = (0,
|
|
3726
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
3727
|
-
const [customLocked, setCustomLocked] = (0,
|
|
3728
|
-
(0,
|
|
3787
|
+
const currentGroup = (0, import_react26.useMemo)(() => getActiveGroup(flexValues), [flexValues]);
|
|
3788
|
+
const [activeGroup, setActiveGroup] = (0, import_react26.useState)(currentGroup);
|
|
3789
|
+
const [customLocked, setCustomLocked] = (0, import_react26.useState)(false);
|
|
3790
|
+
(0, import_react26.useEffect)(() => {
|
|
3729
3791
|
if (!customLocked) {
|
|
3730
3792
|
setActiveGroup(currentGroup);
|
|
3731
3793
|
}
|
|
3732
3794
|
}, [currentGroup, customLocked]);
|
|
3733
|
-
(0,
|
|
3795
|
+
(0, import_react26.useEffect)(() => {
|
|
3734
3796
|
if (value === null) {
|
|
3735
3797
|
setCustomLocked(false);
|
|
3736
3798
|
}
|
|
@@ -3793,7 +3855,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3793
3855
|
return null;
|
|
3794
3856
|
};
|
|
3795
3857
|
var FlexCustomField = () => {
|
|
3796
|
-
const flexBasisRowRef = (0,
|
|
3858
|
+
const flexBasisRowRef = (0, import_react26.useRef)(null);
|
|
3797
3859
|
const context = (0, import_editor_controls21.useBoundProp)(import_editor_props13.flexPropTypeUtil);
|
|
3798
3860
|
return /* @__PURE__ */ React46.createElement(import_editor_controls21.PropProvider, { ...context }, /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: (0, import_i18n24.__)("Grow", "elementor") }, /* @__PURE__ */ React46.createElement(import_editor_controls21.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React46.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: (0, import_i18n24.__)("Shrink", "elementor") }, /* @__PURE__ */ React46.createElement(import_editor_controls21.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React46.createElement(import_editor_controls21.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: (0, import_i18n24.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React46.createElement(import_editor_controls21.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React46.createElement(import_editor_controls21.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3799
3861
|
};
|
|
@@ -3937,7 +3999,7 @@ var GridJustifyItemsField = () => /* @__PURE__ */ React49.createElement(StylesFi
|
|
|
3937
3999
|
|
|
3938
4000
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
3939
4001
|
var React50 = __toESM(require("react"));
|
|
3940
|
-
var
|
|
4002
|
+
var import_react27 = require("react");
|
|
3941
4003
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
3942
4004
|
var import_ui30 = require("@elementor/ui");
|
|
3943
4005
|
var import_i18n28 = require("@wordpress/i18n");
|
|
@@ -3969,7 +4031,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
3969
4031
|
const { value, setValue } = useStylesField(cssProp, {
|
|
3970
4032
|
history: { propDisplayName: label }
|
|
3971
4033
|
});
|
|
3972
|
-
const anchorRef = (0,
|
|
4034
|
+
const anchorRef = (0, import_react27.useRef)(null);
|
|
3973
4035
|
const trackValue = cssToTrackValue(value?.value ?? null);
|
|
3974
4036
|
const handleChange = (newValue) => {
|
|
3975
4037
|
const css = trackValueToCss(newValue);
|
|
@@ -4108,13 +4170,13 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
4108
4170
|
|
|
4109
4171
|
// src/components/style-sections/position-section/position-section.tsx
|
|
4110
4172
|
var React58 = __toESM(require("react"));
|
|
4111
|
-
var
|
|
4173
|
+
var import_react30 = require("react");
|
|
4112
4174
|
var import_session7 = require("@elementor/session");
|
|
4113
4175
|
var import_i18n36 = require("@wordpress/i18n");
|
|
4114
4176
|
|
|
4115
4177
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
4116
4178
|
var React54 = __toESM(require("react"));
|
|
4117
|
-
var
|
|
4179
|
+
var import_react28 = require("react");
|
|
4118
4180
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
4119
4181
|
var import_icons15 = require("@elementor/icons");
|
|
4120
4182
|
var import_ui32 = require("@elementor/ui");
|
|
@@ -4131,7 +4193,7 @@ var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n32.__)("Righ
|
|
|
4131
4193
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n32.__)("Left", "elementor") : (0, import_i18n32.__)("Right", "elementor");
|
|
4132
4194
|
var DimensionsField = () => {
|
|
4133
4195
|
const { isSiteRtl } = useDirection();
|
|
4134
|
-
const rowRefs = [(0,
|
|
4196
|
+
const rowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
4135
4197
|
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(import_ui32.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n32.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React54.createElement(
|
|
4136
4198
|
DimensionField,
|
|
4137
4199
|
{
|
|
@@ -4164,13 +4226,13 @@ var DimensionField = ({
|
|
|
4164
4226
|
|
|
4165
4227
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
4166
4228
|
var React55 = __toESM(require("react"));
|
|
4167
|
-
var
|
|
4229
|
+
var import_react29 = require("react");
|
|
4168
4230
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
4169
4231
|
var import_i18n33 = require("@wordpress/i18n");
|
|
4170
4232
|
var OFFSET_LABEL = (0, import_i18n33.__)("Anchor offset", "elementor");
|
|
4171
4233
|
var UNITS2 = ["px", "em", "rem", "vw", "vh"];
|
|
4172
4234
|
var OffsetField = () => {
|
|
4173
|
-
const rowRef = (0,
|
|
4235
|
+
const rowRef = (0, import_react29.useRef)(null);
|
|
4174
4236
|
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React55.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React55.createElement(import_editor_controls30.SizeControl, { units: UNITS2, anchorRef: rowRef })));
|
|
4175
4237
|
};
|
|
4176
4238
|
|
|
@@ -4223,7 +4285,7 @@ var PositionSection = () => {
|
|
|
4223
4285
|
});
|
|
4224
4286
|
const { values: positionDependentValues, setValues: setPositionDependentValues } = useStylesFields([...POSITION_DEPENDENT_PROP_NAMES]);
|
|
4225
4287
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
4226
|
-
const clearPositionDependentProps = (0,
|
|
4288
|
+
const clearPositionDependentProps = (0, import_react30.useCallback)(() => {
|
|
4227
4289
|
const dimensions = {
|
|
4228
4290
|
"inset-block-start": positionDependentValues?.["inset-block-start"],
|
|
4229
4291
|
"inset-block-end": positionDependentValues?.["inset-block-end"],
|
|
@@ -4237,9 +4299,9 @@ var PositionSection = () => {
|
|
|
4237
4299
|
setPositionDependentValues(CLEARED_POSITION_DEPENDENT_VALUES, meta);
|
|
4238
4300
|
}
|
|
4239
4301
|
}, [positionDependentValues, updateDimensionsHistory, setPositionDependentValues]);
|
|
4240
|
-
const clearPositionDependentPropsRef = (0,
|
|
4302
|
+
const clearPositionDependentPropsRef = (0, import_react30.useRef)(clearPositionDependentProps);
|
|
4241
4303
|
clearPositionDependentPropsRef.current = clearPositionDependentProps;
|
|
4242
|
-
(0,
|
|
4304
|
+
(0, import_react30.useEffect)(() => {
|
|
4243
4305
|
if (positionValue?.value === POSITION_STATIC || positionValue === null) {
|
|
4244
4306
|
clearPositionDependentPropsRef.current();
|
|
4245
4307
|
}
|
|
@@ -4270,7 +4332,7 @@ var usePersistDimensions = () => {
|
|
|
4270
4332
|
|
|
4271
4333
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4272
4334
|
var React63 = __toESM(require("react"));
|
|
4273
|
-
var
|
|
4335
|
+
var import_react31 = require("react");
|
|
4274
4336
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
4275
4337
|
var import_ui34 = require("@elementor/ui");
|
|
4276
4338
|
var import_i18n40 = require("@wordpress/i18n");
|
|
@@ -4437,7 +4499,7 @@ var CssSizeProps = [
|
|
|
4437
4499
|
];
|
|
4438
4500
|
var ASPECT_RATIO_LABEL = (0, import_i18n40.__)("Aspect Ratio", "elementor");
|
|
4439
4501
|
var SizeSection = () => {
|
|
4440
|
-
const gridRowRefs = [(0,
|
|
4502
|
+
const gridRowRefs = [(0, import_react31.useRef)(null), (0, import_react31.useRef)(null), (0, import_react31.useRef)(null)];
|
|
4441
4503
|
return /* @__PURE__ */ React63.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React63.createElement(import_ui34.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React63.createElement(import_ui34.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React63.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(import_ui34.Stack, null, /* @__PURE__ */ React63.createElement(OverflowField, null)), /* @__PURE__ */ React63.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React63.createElement(import_ui34.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React63.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React63.createElement(import_editor_controls35.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ObjectFitField, null), /* @__PURE__ */ React63.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n40.__)("Object position", "elementor") }, /* @__PURE__ */ React63.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(import_editor_controls35.PositionControl, null))))));
|
|
4442
4504
|
};
|
|
4443
4505
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
@@ -4476,12 +4538,12 @@ var ColumnCountField = () => {
|
|
|
4476
4538
|
|
|
4477
4539
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4478
4540
|
var React66 = __toESM(require("react"));
|
|
4479
|
-
var
|
|
4541
|
+
var import_react32 = require("react");
|
|
4480
4542
|
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
4481
4543
|
var import_i18n43 = require("@wordpress/i18n");
|
|
4482
4544
|
var COLUMN_GAP_LABEL = (0, import_i18n43.__)("Column gap", "elementor");
|
|
4483
4545
|
var ColumnGapField = () => {
|
|
4484
|
-
const rowRef = (0,
|
|
4546
|
+
const rowRef = (0, import_react32.useRef)(null);
|
|
4485
4547
|
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React66.createElement(import_editor_controls38.SizeControl, { anchorRef: rowRef })));
|
|
4486
4548
|
};
|
|
4487
4549
|
|
|
@@ -4509,12 +4571,12 @@ var FontFamilyField = () => {
|
|
|
4509
4571
|
|
|
4510
4572
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4511
4573
|
var React68 = __toESM(require("react"));
|
|
4512
|
-
var
|
|
4574
|
+
var import_react33 = require("react");
|
|
4513
4575
|
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
4514
4576
|
var import_i18n45 = require("@wordpress/i18n");
|
|
4515
4577
|
var FONT_SIZE_LABEL = (0, import_i18n45.__)("Font size", "elementor");
|
|
4516
4578
|
var FontSizeField = () => {
|
|
4517
|
-
const rowRef = (0,
|
|
4579
|
+
const rowRef = (0, import_react33.useRef)(null);
|
|
4518
4580
|
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(import_editor_controls40.SizeControl, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4519
4581
|
};
|
|
4520
4582
|
|
|
@@ -4564,23 +4626,23 @@ var FontWeightField = () => {
|
|
|
4564
4626
|
|
|
4565
4627
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4566
4628
|
var React71 = __toESM(require("react"));
|
|
4567
|
-
var
|
|
4629
|
+
var import_react34 = require("react");
|
|
4568
4630
|
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
4569
4631
|
var import_i18n48 = require("@wordpress/i18n");
|
|
4570
4632
|
var LETTER_SPACING_LABEL = (0, import_i18n48.__)("Letter spacing", "elementor");
|
|
4571
4633
|
var LetterSpacingField = () => {
|
|
4572
|
-
const rowRef = (0,
|
|
4634
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
4573
4635
|
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React71.createElement(import_editor_controls43.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4574
4636
|
};
|
|
4575
4637
|
|
|
4576
4638
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4577
4639
|
var React72 = __toESM(require("react"));
|
|
4578
|
-
var
|
|
4640
|
+
var import_react35 = require("react");
|
|
4579
4641
|
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
4580
4642
|
var import_i18n49 = require("@wordpress/i18n");
|
|
4581
4643
|
var LINE_HEIGHT_LABEL = (0, import_i18n49.__)("Line height", "elementor");
|
|
4582
4644
|
var LineHeightField = () => {
|
|
4583
|
-
const rowRef = (0,
|
|
4645
|
+
const rowRef = (0, import_react35.useRef)(null);
|
|
4584
4646
|
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React72.createElement(import_editor_controls44.SizeControl, { anchorRef: rowRef })));
|
|
4585
4647
|
};
|
|
4586
4648
|
|
|
@@ -4802,12 +4864,12 @@ var TransformField = () => /* @__PURE__ */ React79.createElement(StylesField, {
|
|
|
4802
4864
|
|
|
4803
4865
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4804
4866
|
var React80 = __toESM(require("react"));
|
|
4805
|
-
var
|
|
4867
|
+
var import_react36 = require("react");
|
|
4806
4868
|
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4807
4869
|
var import_i18n56 = require("@wordpress/i18n");
|
|
4808
4870
|
var WORD_SPACING_LABEL = (0, import_i18n56.__)("Word spacing", "elementor");
|
|
4809
4871
|
var WordSpacingField = () => {
|
|
4810
|
-
const rowRef = (0,
|
|
4872
|
+
const rowRef = (0, import_react36.useRef)(null);
|
|
4811
4873
|
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React80.createElement(import_editor_controls51.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4812
4874
|
};
|
|
4813
4875
|
|
|
@@ -4865,7 +4927,7 @@ var stickyHeaderStyles = {
|
|
|
4865
4927
|
var StyleTab = () => {
|
|
4866
4928
|
const currentClassesProp = useCurrentClassesProp();
|
|
4867
4929
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
4868
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4930
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react37.useState)(null);
|
|
4869
4931
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4870
4932
|
if (!currentClassesProp) {
|
|
4871
4933
|
return null;
|
|
@@ -5028,7 +5090,7 @@ var EditingPanelTabs = () => {
|
|
|
5028
5090
|
return (
|
|
5029
5091
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5030
5092
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5031
|
-
/* @__PURE__ */ React84.createElement(
|
|
5093
|
+
/* @__PURE__ */ React84.createElement(import_react38.Fragment, { key: element.id }, /* @__PURE__ */ React84.createElement(PanelTabContent, null))
|
|
5032
5094
|
);
|
|
5033
5095
|
};
|
|
5034
5096
|
var PanelTabContent = () => {
|
|
@@ -5083,7 +5145,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
5083
5145
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
5084
5146
|
|
|
5085
5147
|
// src/hooks/use-open-editor-panel.ts
|
|
5086
|
-
var
|
|
5148
|
+
var import_react39 = require("react");
|
|
5087
5149
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
5088
5150
|
|
|
5089
5151
|
// src/panel.ts
|
|
@@ -5107,7 +5169,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5107
5169
|
// src/hooks/use-open-editor-panel.ts
|
|
5108
5170
|
var useOpenEditorPanel = () => {
|
|
5109
5171
|
const { open } = usePanelActions();
|
|
5110
|
-
(0,
|
|
5172
|
+
(0, import_react39.useEffect)(() => {
|
|
5111
5173
|
return (0, import_editor_v1_adapters10.__privateListenTo)((0, import_editor_v1_adapters10.commandStartEvent)("panel/editor/open"), () => {
|
|
5112
5174
|
if (isAtomicWidgetSelected()) {
|
|
5113
5175
|
open();
|
|
@@ -5127,12 +5189,12 @@ var import_editor_controls54 = require("@elementor/editor-controls");
|
|
|
5127
5189
|
|
|
5128
5190
|
// src/components/promotions/custom-css.tsx
|
|
5129
5191
|
var React86 = __toESM(require("react"));
|
|
5130
|
-
var
|
|
5192
|
+
var import_react40 = require("react");
|
|
5131
5193
|
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
5132
5194
|
var import_i18n60 = require("@wordpress/i18n");
|
|
5133
5195
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
5134
5196
|
var CustomCssSection = () => {
|
|
5135
|
-
const triggerRef = (0,
|
|
5197
|
+
const triggerRef = (0, import_react40.useRef)(null);
|
|
5136
5198
|
return /* @__PURE__ */ React86.createElement(
|
|
5137
5199
|
StyleTabSection,
|
|
5138
5200
|
{
|
|
@@ -5550,17 +5612,17 @@ var import_editor_props18 = require("@elementor/editor-props");
|
|
|
5550
5612
|
var import_icons25 = require("@elementor/icons");
|
|
5551
5613
|
|
|
5552
5614
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5553
|
-
var
|
|
5615
|
+
var import_react43 = require("react");
|
|
5554
5616
|
|
|
5555
5617
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5556
|
-
var
|
|
5618
|
+
var import_react42 = require("react");
|
|
5557
5619
|
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5558
5620
|
|
|
5559
5621
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5560
5622
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
5561
5623
|
|
|
5562
5624
|
// src/hooks/use-license-config.ts
|
|
5563
|
-
var
|
|
5625
|
+
var import_react41 = require("react");
|
|
5564
5626
|
var config = { expired: false };
|
|
5565
5627
|
var listeners = /* @__PURE__ */ new Set();
|
|
5566
5628
|
function setLicenseConfig(newConfig) {
|
|
@@ -5575,7 +5637,7 @@ function subscribe(listener) {
|
|
|
5575
5637
|
return () => listeners.delete(listener);
|
|
5576
5638
|
}
|
|
5577
5639
|
function useLicenseConfig() {
|
|
5578
|
-
return (0,
|
|
5640
|
+
return (0, import_react41.useSyncExternalStore)(subscribe, getLicenseConfig, getLicenseConfig);
|
|
5579
5641
|
}
|
|
5580
5642
|
|
|
5581
5643
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
@@ -5644,7 +5706,7 @@ var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
|
5644
5706
|
categories = propDynamicType?.settings.categories || [];
|
|
5645
5707
|
}
|
|
5646
5708
|
const categoriesKey = categories.join();
|
|
5647
|
-
return (0,
|
|
5709
|
+
return (0, import_react42.useMemo)(
|
|
5648
5710
|
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
5649
5711
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5650
5712
|
[categoriesKey, filterByLicense2]
|
|
@@ -5678,7 +5740,7 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
|
5678
5740
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5679
5741
|
var useDynamicTag = (tagName) => {
|
|
5680
5742
|
const dynamicTags = useAllPropDynamicTags();
|
|
5681
|
-
return (0,
|
|
5743
|
+
return (0, import_react43.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5682
5744
|
};
|
|
5683
5745
|
|
|
5684
5746
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
@@ -5720,7 +5782,7 @@ var import_editor_controls59 = require("@elementor/editor-controls");
|
|
|
5720
5782
|
|
|
5721
5783
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5722
5784
|
var React89 = __toESM(require("react"));
|
|
5723
|
-
var
|
|
5785
|
+
var import_react44 = require("react");
|
|
5724
5786
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
5725
5787
|
var DynamicConditionalControl = ({
|
|
5726
5788
|
children,
|
|
@@ -5728,7 +5790,7 @@ var DynamicConditionalControl = ({
|
|
|
5728
5790
|
propsSchema,
|
|
5729
5791
|
dynamicSettings
|
|
5730
5792
|
}) => {
|
|
5731
|
-
const defaults = (0,
|
|
5793
|
+
const defaults = (0, import_react44.useMemo)(() => {
|
|
5732
5794
|
if (!propsSchema) {
|
|
5733
5795
|
return {};
|
|
5734
5796
|
}
|
|
@@ -5738,7 +5800,7 @@ var DynamicConditionalControl = ({
|
|
|
5738
5800
|
return result;
|
|
5739
5801
|
}, {});
|
|
5740
5802
|
}, [propsSchema]);
|
|
5741
|
-
const convertedSettings = (0,
|
|
5803
|
+
const convertedSettings = (0, import_react44.useMemo)(() => {
|
|
5742
5804
|
if (!dynamicSettings) {
|
|
5743
5805
|
return {};
|
|
5744
5806
|
}
|
|
@@ -5757,7 +5819,7 @@ var DynamicConditionalControl = ({
|
|
|
5757
5819
|
{}
|
|
5758
5820
|
);
|
|
5759
5821
|
}, [dynamicSettings]);
|
|
5760
|
-
const effectiveSettings = (0,
|
|
5822
|
+
const effectiveSettings = (0, import_react44.useMemo)(() => {
|
|
5761
5823
|
return { ...defaults, ...convertedSettings };
|
|
5762
5824
|
}, [defaults, convertedSettings]);
|
|
5763
5825
|
if (!propType?.dependencies?.terms.length) {
|
|
@@ -5802,7 +5864,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5802
5864
|
|
|
5803
5865
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5804
5866
|
var React91 = __toESM(require("react"));
|
|
5805
|
-
var
|
|
5867
|
+
var import_react45 = require("react");
|
|
5806
5868
|
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5807
5869
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5808
5870
|
var import_icons26 = require("@elementor/icons");
|
|
@@ -5813,7 +5875,7 @@ var PROMO_TEXT_WIDTH = 170;
|
|
|
5813
5875
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
5814
5876
|
var RENEW_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-renew-modal/";
|
|
5815
5877
|
var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
5816
|
-
const [searchValue, setSearchValue] = (0,
|
|
5878
|
+
const [searchValue, setSearchValue] = (0, import_react45.useState)("");
|
|
5817
5879
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5818
5880
|
const theme = (0, import_ui41.useTheme)();
|
|
5819
5881
|
const { value: anyValue } = (0, import_editor_controls60.useBoundProp)();
|
|
@@ -5822,7 +5884,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5822
5884
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5823
5885
|
const options13 = useFilteredOptions(searchValue);
|
|
5824
5886
|
const hasNoDynamicTags = !options13.length && !searchValue.trim();
|
|
5825
|
-
(0,
|
|
5887
|
+
(0, import_react45.useEffect)(() => {
|
|
5826
5888
|
if (hasNoDynamicTags) {
|
|
5827
5889
|
(0, import_editor_controls60.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
5828
5890
|
} else if (expired) {
|
|
@@ -5859,7 +5921,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5859
5921
|
if (expired) {
|
|
5860
5922
|
return /* @__PURE__ */ React91.createElement(ExpiredDynamicTags, null);
|
|
5861
5923
|
}
|
|
5862
|
-
return /* @__PURE__ */ React91.createElement(
|
|
5924
|
+
return /* @__PURE__ */ React91.createElement(import_react45.Fragment, null, /* @__PURE__ */ React91.createElement(
|
|
5863
5925
|
import_editor_ui9.SearchField,
|
|
5864
5926
|
{
|
|
5865
5927
|
value: searchValue,
|
|
@@ -6325,22 +6387,22 @@ var import_i18n70 = require("@wordpress/i18n");
|
|
|
6325
6387
|
|
|
6326
6388
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6327
6389
|
var React98 = __toESM(require("react"));
|
|
6328
|
-
var
|
|
6390
|
+
var import_react47 = require("react");
|
|
6329
6391
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
6330
6392
|
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
6331
6393
|
var import_ui47 = require("@elementor/ui");
|
|
6332
6394
|
var import_i18n69 = require("@wordpress/i18n");
|
|
6333
6395
|
|
|
6334
6396
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6335
|
-
var
|
|
6397
|
+
var import_react46 = require("react");
|
|
6336
6398
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
6337
6399
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
6338
6400
|
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
6339
6401
|
var import_i18n67 = require("@wordpress/i18n");
|
|
6340
6402
|
var MAXIMUM_ITEMS = 2;
|
|
6341
6403
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6342
|
-
const [items3, setItems] = (0,
|
|
6343
|
-
(0,
|
|
6404
|
+
const [items3, setItems] = (0, import_react46.useState)([]);
|
|
6405
|
+
(0, import_react46.useEffect)(() => {
|
|
6344
6406
|
(async () => {
|
|
6345
6407
|
const normalizedItems = await Promise.all(
|
|
6346
6408
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
@@ -6391,7 +6453,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6391
6453
|
}
|
|
6392
6454
|
});
|
|
6393
6455
|
const value = result?.[bind] ?? result;
|
|
6394
|
-
if ((0,
|
|
6456
|
+
if ((0, import_react46.isValidElement)(value)) {
|
|
6395
6457
|
return value;
|
|
6396
6458
|
}
|
|
6397
6459
|
if (typeof value === "object") {
|
|
@@ -6506,8 +6568,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6506
6568
|
children,
|
|
6507
6569
|
isDisabled
|
|
6508
6570
|
}) => {
|
|
6509
|
-
const [showInfotip, setShowInfotip] = (0,
|
|
6510
|
-
const triggerRef = (0,
|
|
6571
|
+
const [showInfotip, setShowInfotip] = (0, import_react47.useState)(false);
|
|
6572
|
+
const triggerRef = (0, import_react47.useRef)(null);
|
|
6511
6573
|
const toggleInfotip = () => {
|
|
6512
6574
|
if (isDisabled) {
|
|
6513
6575
|
return;
|
|
@@ -6522,7 +6584,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6522
6584
|
};
|
|
6523
6585
|
const key = path.join(".");
|
|
6524
6586
|
const sectionWidth = (0, import_editor_ui11.useSectionWidth)();
|
|
6525
|
-
const resolve = (0,
|
|
6587
|
+
const resolve = (0, import_react47.useMemo)(() => {
|
|
6526
6588
|
return (0, import_editor_canvas5.createPropsResolver)({
|
|
6527
6589
|
transformers: import_editor_canvas5.stylesInheritanceTransformersRegistry,
|
|
6528
6590
|
schema: { [key]: propType }
|