@elementor/editor-editing-panel 4.1.0-811 → 4.1.0-813

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.mjs CHANGED
@@ -2493,7 +2493,7 @@ import { __ as __57 } from "@wordpress/i18n";
2493
2493
 
2494
2494
  // src/contexts/styles-inheritance-context.tsx
2495
2495
  import * as React24 from "react";
2496
- import { createContext as createContext7, useContext as useContext7 } from "react";
2496
+ import { createContext as createContext7, useContext as useContext7, useMemo as useMemo8 } from "react";
2497
2497
  import { getWidgetsCache } from "@elementor/editor-elements";
2498
2498
  import { classesPropTypeUtil as classesPropTypeUtil3 } from "@elementor/editor-props";
2499
2499
  import { getBreakpointsTree as getBreakpointsTree2 } from "@elementor/editor-responsive";
@@ -2759,6 +2759,16 @@ function useStylesInheritanceChain(path) {
2759
2759
  }
2760
2760
  return context.getInheritanceChain(snapshot, path, topLevelPropType);
2761
2761
  }
2762
+ var EMPTY_INHERITED_VALUES = {};
2763
+ function useInheritedValues(propKeys) {
2764
+ const snapshot = useStylesInheritanceSnapshot();
2765
+ return useMemo8(() => {
2766
+ if (!snapshot || propKeys.length === 0) {
2767
+ return EMPTY_INHERITED_VALUES;
2768
+ }
2769
+ return Object.fromEntries(propKeys.map((key) => [key, snapshot[key]?.[0]?.value ?? null]));
2770
+ }, [snapshot, propKeys]);
2771
+ }
2762
2772
  var useAppliedStyles = () => {
2763
2773
  const currentClassesProp = useClassesProp();
2764
2774
  const baseStyles = useBaseStyles();
@@ -2818,15 +2828,67 @@ function useStylesField(propName, meta) {
2818
2828
  }
2819
2829
 
2820
2830
  // src/controls-registry/conditional-field.tsx
2831
+ import { useEffect as useEffect4, useRef as useRef4 } from "react";
2821
2832
  import { useBoundProp } from "@elementor/editor-controls";
2822
2833
  import { isDependency as isDependency2, isDependencyMet as isDependencyMet2 } from "@elementor/editor-props";
2823
2834
  var ConditionalField = ({ children }) => {
2824
- const { propType } = useBoundProp();
2835
+ const { propType, value, resetValue } = useBoundProp();
2825
2836
  const depList = getDependencies(propType);
2826
- const { values: depValues } = useStylesFields(depList);
2827
- const isHidden = !isDependencyMet2(propType?.dependencies, depValues).isMet;
2837
+ const { values: depValues, setValues: setDepValues } = useStylesFields(depList);
2838
+ const inheritedValues = useInheritedValues(depList);
2839
+ const resolvedValues = resolveWithInherited(depValues, inheritedValues);
2840
+ const isHidden = !isDependencyMet2(propType?.dependencies, resolvedValues).isMet;
2841
+ useSyncDepsWithInherited({ isHidden, depValues, value, inheritedValues, setDepValues, resetValue });
2828
2842
  return isHidden ? null : children;
2829
2843
  };
2844
+ function wasDepsCleared(prevDepValues, depValues) {
2845
+ if (!prevDepValues) {
2846
+ return false;
2847
+ }
2848
+ return Object.keys(prevDepValues).some(
2849
+ (key) => prevDepValues[key] && (!depValues || !depValues[key])
2850
+ );
2851
+ }
2852
+ function useSyncDepsWithInherited({
2853
+ isHidden,
2854
+ depValues,
2855
+ value,
2856
+ inheritedValues,
2857
+ setDepValues,
2858
+ resetValue
2859
+ }) {
2860
+ const syncRef = useRef4({ hasSynced: false, prevDepValues: depValues });
2861
+ useEffect4(() => {
2862
+ const { hasSynced, prevDepValues } = syncRef.current;
2863
+ if (hasSynced && value && wasDepsCleared(prevDepValues, depValues)) {
2864
+ resetValue();
2865
+ }
2866
+ if (isHidden || !value || !depValues) {
2867
+ syncRef.current = { hasSynced: false, prevDepValues: depValues };
2868
+ return;
2869
+ }
2870
+ if (hasSynced) {
2871
+ syncRef.current.prevDepValues = depValues;
2872
+ return;
2873
+ }
2874
+ syncRef.current = { hasSynced: true, prevDepValues: depValues };
2875
+ Object.entries(depValues).forEach(([key, depValue]) => {
2876
+ const inherited = inheritedValues[key];
2877
+ if (!depValue && inherited) {
2878
+ setDepValues({ [key]: inherited }, { history: { propDisplayName: key } });
2879
+ }
2880
+ });
2881
+ }, [isHidden, depValues, value, inheritedValues, setDepValues, resetValue]);
2882
+ }
2883
+ function resolveWithInherited(localValues, inheritedValues) {
2884
+ if (!localValues) {
2885
+ const hasInherited = Object.keys(inheritedValues).length > 0;
2886
+ return hasInherited ? { ...inheritedValues } : null;
2887
+ }
2888
+ return Object.fromEntries(
2889
+ Object.entries(localValues).map(([key, val]) => [key, val ?? inheritedValues[key] ?? null])
2890
+ );
2891
+ }
2830
2892
  function getDependencies(propType) {
2831
2893
  if (!propType?.dependencies?.terms.length) {
2832
2894
  return [];
@@ -3210,12 +3272,12 @@ var BlendModeField = () => {
3210
3272
 
3211
3273
  // src/components/style-sections/effects-section/opacity-control-field.tsx
3212
3274
  import * as React37 from "react";
3213
- import { useRef as useRef4 } from "react";
3275
+ import { useRef as useRef5 } from "react";
3214
3276
  import { SizeControl as SizeControl2 } from "@elementor/editor-controls";
3215
3277
  import { __ as __15 } from "@wordpress/i18n";
3216
3278
  var OPACITY_LABEL = __15("Opacity", "elementor");
3217
3279
  var OpacityControlField = () => {
3218
- const rowRef = useRef4(null);
3280
+ const rowRef = useRef5(null);
3219
3281
  return /* @__PURE__ */ React37.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(SizeControl2, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
3220
3282
  };
3221
3283
 
@@ -3285,7 +3347,7 @@ import { __ as __18 } from "@wordpress/i18n";
3285
3347
 
3286
3348
  // src/components/style-sections/layout-section/utils/rotated-icon.tsx
3287
3349
  import * as React39 from "react";
3288
- import { useRef as useRef5 } from "react";
3350
+ import { useRef as useRef6 } from "react";
3289
3351
  import { useTheme as useTheme2 } from "@elementor/ui";
3290
3352
  import { __ as __17 } from "@wordpress/i18n";
3291
3353
  var FLEX_DIRECTION_LABEL = __17("Flex direction", "elementor");
@@ -3308,7 +3370,7 @@ var RotatedIcon = ({
3308
3370
  offset = 0,
3309
3371
  disableRotationForReversed = false
3310
3372
  }) => {
3311
- const rotate = useRef5(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
3373
+ const rotate = useRef6(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
3312
3374
  rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
3313
3375
  return /* @__PURE__ */ React39.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
3314
3376
  };
@@ -3512,7 +3574,7 @@ var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React42.creat
3512
3574
 
3513
3575
  // src/components/style-sections/layout-section/display-field.tsx
3514
3576
  import * as React43 from "react";
3515
- import { useMemo as useMemo8 } from "react";
3577
+ import { useMemo as useMemo9 } from "react";
3516
3578
  import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
3517
3579
  import { isExperimentActive } from "@elementor/editor-v1-adapters";
3518
3580
  import { __ as __21 } from "@wordpress/i18n";
@@ -3558,7 +3620,7 @@ var displayFieldItems = [
3558
3620
  var DisplayField = () => {
3559
3621
  const placeholder = useDisplayPlaceholderValue();
3560
3622
  const isGridActive = isExperimentActive("e_css_grid");
3561
- const items3 = useMemo8(
3623
+ const items3 = useMemo9(
3562
3624
  () => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
3563
3625
  [isGridActive]
3564
3626
  );
@@ -3611,7 +3673,7 @@ var FlexDirectionField = () => {
3611
3673
 
3612
3674
  // src/components/style-sections/layout-section/flex-order-field.tsx
3613
3675
  import * as React45 from "react";
3614
- import { useEffect as useEffect4, useMemo as useMemo9, useState as useState7 } from "react";
3676
+ import { useEffect as useEffect5, useMemo as useMemo10, useState as useState7 } from "react";
3615
3677
  import {
3616
3678
  ControlToggleButtonGroup,
3617
3679
  NumberControl as NumberControl2,
@@ -3663,15 +3725,15 @@ function FlexOrderFieldContent() {
3663
3725
  });
3664
3726
  const { placeholder } = useBoundProp2();
3665
3727
  const placeholderValue = placeholder;
3666
- const currentGroup = useMemo9(() => getGroupControlValue(order?.value ?? null), [order]);
3728
+ const currentGroup = useMemo10(() => getGroupControlValue(order?.value ?? null), [order]);
3667
3729
  const [activeGroup, setActiveGroup] = useState7(currentGroup);
3668
3730
  const [customLocked, setCustomLocked] = useState7(false);
3669
- useEffect4(() => {
3731
+ useEffect5(() => {
3670
3732
  if (!customLocked) {
3671
3733
  setActiveGroup(currentGroup);
3672
3734
  }
3673
3735
  }, [currentGroup, customLocked]);
3674
- useEffect4(() => {
3736
+ useEffect5(() => {
3675
3737
  if (order === null) {
3676
3738
  setCustomLocked(false);
3677
3739
  }
@@ -3731,7 +3793,7 @@ var getGroupControlValue = (order) => {
3731
3793
 
3732
3794
  // src/components/style-sections/layout-section/flex-size-field.tsx
3733
3795
  import * as React46 from "react";
3734
- import { useEffect as useEffect5, useMemo as useMemo10, useRef as useRef6, useState as useState8 } from "react";
3796
+ import { useEffect as useEffect6, useMemo as useMemo11, useRef as useRef7, useState as useState8 } from "react";
3735
3797
  import {
3736
3798
  ControlToggleButtonGroup as ControlToggleButtonGroup2,
3737
3799
  NumberControl as NumberControl3,
@@ -3774,15 +3836,15 @@ var FlexSizeFieldContent = () => {
3774
3836
  });
3775
3837
  const { placeholder } = useBoundProp3();
3776
3838
  const flexValues = extractFlexValues(value);
3777
- const currentGroup = useMemo10(() => getActiveGroup(flexValues), [flexValues]);
3839
+ const currentGroup = useMemo11(() => getActiveGroup(flexValues), [flexValues]);
3778
3840
  const [activeGroup, setActiveGroup] = useState8(currentGroup);
3779
3841
  const [customLocked, setCustomLocked] = useState8(false);
3780
- useEffect5(() => {
3842
+ useEffect6(() => {
3781
3843
  if (!customLocked) {
3782
3844
  setActiveGroup(currentGroup);
3783
3845
  }
3784
3846
  }, [currentGroup, customLocked]);
3785
- useEffect5(() => {
3847
+ useEffect6(() => {
3786
3848
  if (value === null) {
3787
3849
  setCustomLocked(false);
3788
3850
  }
@@ -3845,7 +3907,7 @@ var createFlexValueForGroup = (group, flexValue) => {
3845
3907
  return null;
3846
3908
  };
3847
3909
  var FlexCustomField = () => {
3848
- const flexBasisRowRef = useRef6(null);
3910
+ const flexBasisRowRef = useRef7(null);
3849
3911
  const context = useBoundProp3(flexPropTypeUtil);
3850
3912
  return /* @__PURE__ */ React46.createElement(PropProvider3, { ...context }, /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: __24("Grow", "elementor") }, /* @__PURE__ */ React46.createElement(PropKeyProvider3, { bind: "flexGrow" }, /* @__PURE__ */ React46.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: __24("Shrink", "elementor") }, /* @__PURE__ */ React46.createElement(PropKeyProvider3, { bind: "flexShrink" }, /* @__PURE__ */ React46.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: __24("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React46.createElement(PropKeyProvider3, { bind: "flexBasis" }, /* @__PURE__ */ React46.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
3851
3913
  };
@@ -3994,7 +4056,7 @@ var GridJustifyItemsField = () => /* @__PURE__ */ React49.createElement(StylesFi
3994
4056
 
3995
4057
  // src/components/style-sections/layout-section/grid-size-field.tsx
3996
4058
  import * as React50 from "react";
3997
- import { useRef as useRef7 } from "react";
4059
+ import { useRef as useRef8 } from "react";
3998
4060
  import { SizeComponent } from "@elementor/editor-controls";
3999
4061
  import { Grid as Grid4 } from "@elementor/ui";
4000
4062
  import { __ as __28 } from "@wordpress/i18n";
@@ -4026,7 +4088,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
4026
4088
  const { value, setValue } = useStylesField(cssProp, {
4027
4089
  history: { propDisplayName: label }
4028
4090
  });
4029
- const anchorRef = useRef7(null);
4091
+ const anchorRef = useRef8(null);
4030
4092
  const trackValue = cssToTrackValue(value?.value ?? null);
4031
4093
  const handleChange = (newValue) => {
4032
4094
  const css = trackValueToCss(newValue);
@@ -4172,13 +4234,13 @@ var shouldDisplayFlexFields = (display, local) => {
4172
4234
 
4173
4235
  // src/components/style-sections/position-section/position-section.tsx
4174
4236
  import * as React58 from "react";
4175
- import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef10 } from "react";
4237
+ import { useCallback as useCallback2, useEffect as useEffect7, useRef as useRef11 } from "react";
4176
4238
  import { useSessionStorage as useSessionStorage4 } from "@elementor/session";
4177
4239
  import { __ as __36 } from "@wordpress/i18n";
4178
4240
 
4179
4241
  // src/components/style-sections/position-section/dimensions-field.tsx
4180
4242
  import * as React54 from "react";
4181
- import { useRef as useRef8 } from "react";
4243
+ import { useRef as useRef9 } from "react";
4182
4244
  import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
4183
4245
  import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
4184
4246
  import { Grid as Grid5, Stack as Stack8, withDirection as withDirection10 } from "@elementor/ui";
@@ -4195,7 +4257,7 @@ var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __32("Right", "elementor")
4195
4257
  var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __32("Left", "elementor") : __32("Right", "elementor");
4196
4258
  var DimensionsField = () => {
4197
4259
  const { isSiteRtl } = useDirection();
4198
- const rowRefs = [useRef8(null), useRef8(null)];
4260
+ const rowRefs = [useRef9(null), useRef9(null)];
4199
4261
  return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-start", label: __32("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React54.createElement(
4200
4262
  DimensionField,
4201
4263
  {
@@ -4228,13 +4290,13 @@ var DimensionField = ({
4228
4290
 
4229
4291
  // src/components/style-sections/position-section/offset-field.tsx
4230
4292
  import * as React55 from "react";
4231
- import { useRef as useRef9 } from "react";
4293
+ import { useRef as useRef10 } from "react";
4232
4294
  import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
4233
4295
  import { __ as __33 } from "@wordpress/i18n";
4234
4296
  var OFFSET_LABEL = __33("Anchor offset", "elementor");
4235
4297
  var UNITS2 = ["px", "em", "rem", "vw", "vh"];
4236
4298
  var OffsetField = () => {
4237
- const rowRef = useRef9(null);
4299
+ const rowRef = useRef10(null);
4238
4300
  return /* @__PURE__ */ React55.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React55.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React55.createElement(SizeControl5, { units: UNITS2, anchorRef: rowRef })));
4239
4301
  };
4240
4302
 
@@ -4301,9 +4363,9 @@ var PositionSection = () => {
4301
4363
  setPositionDependentValues(CLEARED_POSITION_DEPENDENT_VALUES, meta);
4302
4364
  }
4303
4365
  }, [positionDependentValues, updateDimensionsHistory, setPositionDependentValues]);
4304
- const clearPositionDependentPropsRef = useRef10(clearPositionDependentProps);
4366
+ const clearPositionDependentPropsRef = useRef11(clearPositionDependentProps);
4305
4367
  clearPositionDependentPropsRef.current = clearPositionDependentProps;
4306
- useEffect6(() => {
4368
+ useEffect7(() => {
4307
4369
  if (positionValue?.value === POSITION_STATIC || positionValue === null) {
4308
4370
  clearPositionDependentPropsRef.current();
4309
4371
  }
@@ -4334,7 +4396,7 @@ var usePersistDimensions = () => {
4334
4396
 
4335
4397
  // src/components/style-sections/size-section/size-section.tsx
4336
4398
  import * as React63 from "react";
4337
- import { useRef as useRef11 } from "react";
4399
+ import { useRef as useRef12 } from "react";
4338
4400
  import { AspectRatioControl, PositionControl, SizeControl as SizeControl6 } from "@elementor/editor-controls";
4339
4401
  import { Grid as Grid6, Stack as Stack10 } from "@elementor/ui";
4340
4402
  import { __ as __40 } from "@wordpress/i18n";
@@ -4501,7 +4563,7 @@ var CssSizeProps = [
4501
4563
  ];
4502
4564
  var ASPECT_RATIO_LABEL = __40("Aspect Ratio", "elementor");
4503
4565
  var SizeSection = () => {
4504
- const gridRowRefs = [useRef11(null), useRef11(null), useRef11(null)];
4566
+ const gridRowRefs = [useRef12(null), useRef12(null), useRef12(null)];
4505
4567
  return /* @__PURE__ */ React63.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React63.createElement(Grid6, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React63.createElement(Grid6, { 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(Stack10, null, /* @__PURE__ */ React63.createElement(OverflowField, null)), /* @__PURE__ */ React63.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React63.createElement(Stack10, { gap: 2, pt: 2 }, /* @__PURE__ */ React63.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React63.createElement(AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ObjectFitField, null), /* @__PURE__ */ React63.createElement(StylesField, { bind: "object-position", propDisplayName: __40("Object position", "elementor") }, /* @__PURE__ */ React63.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(PositionControl, null))))));
4506
4568
  };
4507
4569
  var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
@@ -4540,12 +4602,12 @@ var ColumnCountField = () => {
4540
4602
 
4541
4603
  // src/components/style-sections/typography-section/column-gap-field.tsx
4542
4604
  import * as React66 from "react";
4543
- import { useRef as useRef12 } from "react";
4605
+ import { useRef as useRef13 } from "react";
4544
4606
  import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
4545
4607
  import { __ as __43 } from "@wordpress/i18n";
4546
4608
  var COLUMN_GAP_LABEL = __43("Column gap", "elementor");
4547
4609
  var ColumnGapField = () => {
4548
- const rowRef = useRef12(null);
4610
+ const rowRef = useRef13(null);
4549
4611
  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(SizeControl7, { anchorRef: rowRef })));
4550
4612
  };
4551
4613
 
@@ -4573,12 +4635,12 @@ var FontFamilyField = () => {
4573
4635
 
4574
4636
  // src/components/style-sections/typography-section/font-size-field.tsx
4575
4637
  import * as React68 from "react";
4576
- import { useRef as useRef13 } from "react";
4638
+ import { useRef as useRef14 } from "react";
4577
4639
  import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
4578
4640
  import { __ as __45 } from "@wordpress/i18n";
4579
4641
  var FONT_SIZE_LABEL = __45("Font size", "elementor");
4580
4642
  var FontSizeField = () => {
4581
- const rowRef = useRef13(null);
4643
+ const rowRef = useRef14(null);
4582
4644
  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(SizeControl8, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
4583
4645
  };
4584
4646
 
@@ -4628,23 +4690,23 @@ var FontWeightField = () => {
4628
4690
 
4629
4691
  // src/components/style-sections/typography-section/letter-spacing-field.tsx
4630
4692
  import * as React71 from "react";
4631
- import { useRef as useRef14 } from "react";
4693
+ import { useRef as useRef15 } from "react";
4632
4694
  import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
4633
4695
  import { __ as __48 } from "@wordpress/i18n";
4634
4696
  var LETTER_SPACING_LABEL = __48("Letter spacing", "elementor");
4635
4697
  var LetterSpacingField = () => {
4636
- const rowRef = useRef14(null);
4698
+ const rowRef = useRef15(null);
4637
4699
  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(SizeControl9, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
4638
4700
  };
4639
4701
 
4640
4702
  // src/components/style-sections/typography-section/line-height-field.tsx
4641
4703
  import * as React72 from "react";
4642
- import { useRef as useRef15 } from "react";
4704
+ import { useRef as useRef16 } from "react";
4643
4705
  import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
4644
4706
  import { __ as __49 } from "@wordpress/i18n";
4645
4707
  var LINE_HEIGHT_LABEL = __49("Line height", "elementor");
4646
4708
  var LineHeightField = () => {
4647
- const rowRef = useRef15(null);
4709
+ const rowRef = useRef16(null);
4648
4710
  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(SizeControl10, { anchorRef: rowRef })));
4649
4711
  };
4650
4712
 
@@ -4866,12 +4928,12 @@ var TransformField = () => /* @__PURE__ */ React79.createElement(StylesField, {
4866
4928
 
4867
4929
  // src/components/style-sections/typography-section/word-spacing-field.tsx
4868
4930
  import * as React80 from "react";
4869
- import { useRef as useRef16 } from "react";
4931
+ import { useRef as useRef17 } from "react";
4870
4932
  import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
4871
4933
  import { __ as __56 } from "@wordpress/i18n";
4872
4934
  var WORD_SPACING_LABEL = __56("Word spacing", "elementor");
4873
4935
  var WordSpacingField = () => {
4874
- const rowRef = useRef16(null);
4936
+ const rowRef = useRef17(null);
4875
4937
  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(SizeControl11, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
4876
4938
  };
4877
4939
 
@@ -5147,7 +5209,7 @@ import { __registerPanel as registerPanel } from "@elementor/editor-panels";
5147
5209
  import { blockCommand } from "@elementor/editor-v1-adapters";
5148
5210
 
5149
5211
  // src/hooks/use-open-editor-panel.ts
5150
- import { useEffect as useEffect7 } from "react";
5212
+ import { useEffect as useEffect8 } from "react";
5151
5213
  import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/editor-v1-adapters";
5152
5214
 
5153
5215
  // src/panel.ts
@@ -5171,7 +5233,7 @@ var isAtomicWidgetSelected = () => {
5171
5233
  // src/hooks/use-open-editor-panel.ts
5172
5234
  var useOpenEditorPanel = () => {
5173
5235
  const { open } = usePanelActions();
5174
- useEffect7(() => {
5236
+ useEffect8(() => {
5175
5237
  return listenTo(commandStartEvent("panel/editor/open"), () => {
5176
5238
  if (isAtomicWidgetSelected()) {
5177
5239
  open();
@@ -5191,12 +5253,12 @@ import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-c
5191
5253
 
5192
5254
  // src/components/promotions/custom-css.tsx
5193
5255
  import * as React86 from "react";
5194
- import { useRef as useRef17 } from "react";
5256
+ import { useRef as useRef18 } from "react";
5195
5257
  import { PromotionTrigger } from "@elementor/editor-controls";
5196
5258
  import { __ as __60 } from "@wordpress/i18n";
5197
5259
  var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
5198
5260
  var CustomCssSection = () => {
5199
- const triggerRef = useRef17(null);
5261
+ const triggerRef = useRef18(null);
5200
5262
  return /* @__PURE__ */ React86.createElement(
5201
5263
  StyleTabSection,
5202
5264
  {
@@ -5634,10 +5696,10 @@ import {
5634
5696
  import { DatabaseIcon } from "@elementor/icons";
5635
5697
 
5636
5698
  // src/dynamics/hooks/use-dynamic-tag.ts
5637
- import { useMemo as useMemo12 } from "react";
5699
+ import { useMemo as useMemo13 } from "react";
5638
5700
 
5639
5701
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
5640
- import { useMemo as useMemo11 } from "react";
5702
+ import { useMemo as useMemo12 } from "react";
5641
5703
  import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
5642
5704
 
5643
5705
  // src/dynamics/sync/get-atomic-dynamic-tags.ts
@@ -5731,7 +5793,7 @@ var usePropDynamicTagsInternal = (filterByLicense2) => {
5731
5793
  categories = propDynamicType?.settings.categories || [];
5732
5794
  }
5733
5795
  const categoriesKey = categories.join();
5734
- return useMemo11(
5796
+ return useMemo12(
5735
5797
  () => getDynamicTagsByCategories(categories, filterByLicense2),
5736
5798
  // eslint-disable-next-line react-hooks/exhaustive-deps
5737
5799
  [categoriesKey, filterByLicense2]
@@ -5765,7 +5827,7 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
5765
5827
  // src/dynamics/hooks/use-dynamic-tag.ts
5766
5828
  var useDynamicTag = (tagName) => {
5767
5829
  const dynamicTags = useAllPropDynamicTags();
5768
- return useMemo12(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
5830
+ return useMemo13(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
5769
5831
  };
5770
5832
 
5771
5833
  // src/dynamics/components/background-control-dynamic-tag.tsx
@@ -5827,7 +5889,7 @@ import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, use
5827
5889
 
5828
5890
  // src/dynamics/components/dynamic-conditional-control.tsx
5829
5891
  import * as React89 from "react";
5830
- import { useMemo as useMemo13 } from "react";
5892
+ import { useMemo as useMemo14 } from "react";
5831
5893
  import { isDependencyMet as isDependencyMet3 } from "@elementor/editor-props";
5832
5894
  var DynamicConditionalControl = ({
5833
5895
  children,
@@ -5835,7 +5897,7 @@ var DynamicConditionalControl = ({
5835
5897
  propsSchema,
5836
5898
  dynamicSettings
5837
5899
  }) => {
5838
- const defaults = useMemo13(() => {
5900
+ const defaults = useMemo14(() => {
5839
5901
  if (!propsSchema) {
5840
5902
  return {};
5841
5903
  }
@@ -5845,7 +5907,7 @@ var DynamicConditionalControl = ({
5845
5907
  return result;
5846
5908
  }, {});
5847
5909
  }, [propsSchema]);
5848
- const convertedSettings = useMemo13(() => {
5910
+ const convertedSettings = useMemo14(() => {
5849
5911
  if (!dynamicSettings) {
5850
5912
  return {};
5851
5913
  }
@@ -5864,7 +5926,7 @@ var DynamicConditionalControl = ({
5864
5926
  {}
5865
5927
  );
5866
5928
  }, [dynamicSettings]);
5867
- const effectiveSettings = useMemo13(() => {
5929
+ const effectiveSettings = useMemo14(() => {
5868
5930
  return { ...defaults, ...convertedSettings };
5869
5931
  }, [defaults, convertedSettings]);
5870
5932
  if (!propType?.dependencies?.terms.length) {
@@ -5909,7 +5971,7 @@ var DynamicControl = ({ bind, children }) => {
5909
5971
 
5910
5972
  // src/dynamics/components/dynamic-selection.tsx
5911
5973
  import * as React91 from "react";
5912
- import { Fragment as Fragment14, useEffect as useEffect8, useState as useState10 } from "react";
5974
+ import { Fragment as Fragment14, useEffect as useEffect9, useState as useState10 } from "react";
5913
5975
  import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
5914
5976
  import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
5915
5977
  import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
@@ -5929,7 +5991,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
5929
5991
  const isCurrentValueDynamic = !!dynamicValue;
5930
5992
  const options13 = useFilteredOptions(searchValue);
5931
5993
  const hasNoDynamicTags = !options13.length && !searchValue.trim();
5932
- useEffect8(() => {
5994
+ useEffect9(() => {
5933
5995
  if (hasNoDynamicTags) {
5934
5996
  trackViewPromotion({ target_name: "dynamic_tags" });
5935
5997
  } else if (expired) {
@@ -6432,7 +6494,7 @@ import { __ as __70 } from "@wordpress/i18n";
6432
6494
 
6433
6495
  // src/styles-inheritance/components/styles-inheritance-infotip.tsx
6434
6496
  import * as React98 from "react";
6435
- import { useMemo as useMemo14, useRef as useRef18, useState as useState12 } from "react";
6497
+ import { useMemo as useMemo15, useRef as useRef19, useState as useState12 } from "react";
6436
6498
  import {
6437
6499
  createPropsResolver as createPropsResolver2,
6438
6500
  stylesInheritanceTransformersRegistry
@@ -6452,7 +6514,7 @@ import {
6452
6514
  import { __ as __69 } from "@wordpress/i18n";
6453
6515
 
6454
6516
  // src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
6455
- import { isValidElement, useEffect as useEffect9, useState as useState11 } from "react";
6517
+ import { isValidElement, useEffect as useEffect10, useState as useState11 } from "react";
6456
6518
  import { UnknownStyleStateError } from "@elementor/editor-canvas";
6457
6519
  import {
6458
6520
  isClassState as isClassState2,
@@ -6463,7 +6525,7 @@ import { __ as __67 } from "@wordpress/i18n";
6463
6525
  var MAXIMUM_ITEMS = 2;
6464
6526
  var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
6465
6527
  const [items3, setItems] = useState11([]);
6466
- useEffect9(() => {
6528
+ useEffect10(() => {
6467
6529
  (async () => {
6468
6530
  const normalizedItems = await Promise.all(
6469
6531
  inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
@@ -6638,7 +6700,7 @@ var StylesInheritanceInfotip = ({
6638
6700
  isDisabled
6639
6701
  }) => {
6640
6702
  const [showInfotip, setShowInfotip] = useState12(false);
6641
- const triggerRef = useRef18(null);
6703
+ const triggerRef = useRef19(null);
6642
6704
  const toggleInfotip = () => {
6643
6705
  if (isDisabled) {
6644
6706
  return;
@@ -6653,7 +6715,7 @@ var StylesInheritanceInfotip = ({
6653
6715
  };
6654
6716
  const key = path.join(".");
6655
6717
  const sectionWidth = useSectionWidth2();
6656
- const resolve = useMemo14(() => {
6718
+ const resolve = useMemo15(() => {
6657
6719
  return createPropsResolver2({
6658
6720
  transformers: stylesInheritanceTransformersRegistry,
6659
6721
  schema: { [key]: propType }