@elementor/editor-controls 3.35.0-450 → 3.35.0-452

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
@@ -2667,7 +2667,8 @@ function EqualUnequalSizesControl({
2667
2667
  ));
2668
2668
  }
2669
2669
  var MultiSizeValueControl = ({ item, rowRef }) => {
2670
- return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React56.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React56.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, item.label)), /* @__PURE__ */ React56.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
2670
+ const { bind, label, icon, ariaLabel } = item;
2671
+ return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React56.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React56.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(SizeControl, { startIcon: icon, ariaLabel, anchorRef: rowRef })))));
2671
2672
  };
2672
2673
 
2673
2674
  // src/controls/linked-dimensions-control.tsx
@@ -2677,7 +2678,7 @@ import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@
2677
2678
  import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
2678
2679
  import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
2679
2680
  import { Grid as Grid9, Stack as Stack8, Tooltip as Tooltip6 } from "@elementor/ui";
2680
- import { __ as __18 } from "@wordpress/i18n";
2681
+ import { __ as __18, sprintf as sprintf2 } from "@wordpress/i18n";
2681
2682
  var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min }) => {
2682
2683
  const gridRowRefs = [useRef9(null), useRef9(null)];
2683
2684
  const { disabled: sizeDisabled } = useBoundProp(sizePropTypeUtil3);
@@ -2754,10 +2755,11 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
2754
2755
  isPlaceholder: hasPlaceholders
2755
2756
  },
2756
2757
  /* @__PURE__ */ React57.createElement(LinkedIcon, { fontSize: "tiny" })
2757
- ))), getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
2758
+ ))), getCssDimensionProps(label, isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
2758
2759
  Control3,
2759
2760
  {
2760
2761
  bind: props.bind,
2762
+ ariaLabel: props.ariaLabel,
2761
2763
  startIcon: icon,
2762
2764
  isLinked,
2763
2765
  extendedOptions,
@@ -2768,6 +2770,7 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
2768
2770
  };
2769
2771
  var Control3 = ({
2770
2772
  bind,
2773
+ ariaLabel,
2771
2774
  startIcon,
2772
2775
  isLinked,
2773
2776
  extendedOptions,
@@ -2778,6 +2781,7 @@ var Control3 = ({
2778
2781
  return /* @__PURE__ */ React57.createElement(
2779
2782
  SizeControl,
2780
2783
  {
2784
+ ariaLabel,
2781
2785
  startIcon,
2782
2786
  extendedOptions,
2783
2787
  anchorRef,
@@ -2788,6 +2792,7 @@ var Control3 = ({
2788
2792
  return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(
2789
2793
  SizeControl,
2790
2794
  {
2795
+ ariaLabel,
2791
2796
  startIcon,
2792
2797
  extendedOptions,
2793
2798
  anchorRef,
@@ -2798,17 +2803,26 @@ var Control3 = ({
2798
2803
  var Label = ({ label, bind }) => {
2799
2804
  return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(ControlLabel, null, label));
2800
2805
  };
2801
- function getCssDimensionProps(isSiteRtl) {
2806
+ function getCssDimensionProps(label, isSiteRtl) {
2802
2807
  return [
2803
2808
  [
2804
2809
  {
2805
2810
  bind: "block-start",
2806
2811
  label: __18("Top", "elementor"),
2812
+ /* translators: %s is the name of the main group (margin or padding) */
2813
+ ariaLabel: sprintf2(__18("%s top", "elementor"), label),
2807
2814
  icon: /* @__PURE__ */ React57.createElement(SideTopIcon, { fontSize: "tiny" })
2808
2815
  },
2809
2816
  {
2810
2817
  bind: "inline-end",
2811
2818
  label: isSiteRtl ? __18("Left", "elementor") : __18("Right", "elementor"),
2819
+ ariaLabel: isSiteRtl ? (
2820
+ /* translators: %s is the name of the main group (margin or padding) */
2821
+ sprintf2(__18("%s left", "elementor"), label)
2822
+ ) : (
2823
+ /* translators: %s is the name of the main group (margin or padding) */
2824
+ sprintf2(__18("%s right", "elementor"), label)
2825
+ ),
2812
2826
  icon: isSiteRtl ? /* @__PURE__ */ React57.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React57.createElement(SideRightIcon, { fontSize: "tiny" })
2813
2827
  }
2814
2828
  ],
@@ -2816,11 +2830,20 @@ function getCssDimensionProps(isSiteRtl) {
2816
2830
  {
2817
2831
  bind: "block-end",
2818
2832
  label: __18("Bottom", "elementor"),
2833
+ /* translators: %s is the name of the main group (margin or padding) */
2834
+ ariaLabel: sprintf2(__18("%s bottom", "elementor"), label),
2819
2835
  icon: /* @__PURE__ */ React57.createElement(SideBottomIcon, { fontSize: "tiny" })
2820
2836
  },
2821
2837
  {
2822
2838
  bind: "inline-start",
2823
2839
  label: isSiteRtl ? __18("Right", "elementor") : __18("Left", "elementor"),
2840
+ ariaLabel: isSiteRtl ? (
2841
+ /* translators: %s is the name of the main group (margin or padding) */
2842
+ sprintf2(__18("%s right", "elementor"), label)
2843
+ ) : (
2844
+ /* translators: %s is the name of the main group (margin or padding) */
2845
+ sprintf2(__18("%s left", "elementor"), label)
2846
+ ),
2824
2847
  icon: isSiteRtl ? /* @__PURE__ */ React57.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React57.createElement(SideLeftIcon, { fontSize: "tiny" })
2825
2848
  }
2826
2849
  ]
@@ -3704,17 +3727,34 @@ var GapControl = ({ label }) => {
3704
3727
  isPlaceholder: hasPlaceholders
3705
3728
  },
3706
3729
  /* @__PURE__ */ React68.createElement(LinkedIcon, { fontSize: "tiny" })
3707
- ))), /* @__PURE__ */ React68.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React68.createElement(Grid11, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, __25("Column", "elementor"))), /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React68.createElement(Grid11, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, __25("Row", "elementor"))), /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
3730
+ ))), /* @__PURE__ */ React68.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React68.createElement(Grid11, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, __25("Column", "elementor"))), /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(
3731
+ Control4,
3732
+ {
3733
+ bind: "column",
3734
+ ariaLabel: __25("Column gap", "elementor"),
3735
+ isLinked,
3736
+ anchorRef: stackRef
3737
+ }
3738
+ ))), /* @__PURE__ */ React68.createElement(Grid11, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, __25("Row", "elementor"))), /* @__PURE__ */ React68.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(
3739
+ Control4,
3740
+ {
3741
+ bind: "row",
3742
+ ariaLabel: __25("Row gap", "elementor"),
3743
+ isLinked,
3744
+ anchorRef: stackRef
3745
+ }
3746
+ )))));
3708
3747
  };
3709
3748
  var Control4 = ({
3710
3749
  bind,
3750
+ ariaLabel,
3711
3751
  isLinked,
3712
3752
  anchorRef
3713
3753
  }) => {
3714
3754
  if (isLinked) {
3715
- return /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef });
3755
+ return /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef, ariaLabel });
3716
3756
  }
3717
- return /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef }));
3757
+ return /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef, ariaLabel }));
3718
3758
  };
3719
3759
 
3720
3760
  // src/controls/aspect-ratio-control.tsx
@@ -6286,7 +6326,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
6286
6326
  var ITALIC_KEYBOARD_SHORTCUT = "i";
6287
6327
  var BOLD_KEYBOARD_SHORTCUT = "b";
6288
6328
  var UNDERLINE_KEYBOARD_SHORTCUT = "u";
6289
- var INITIAL_STYLE = "margin:0;padding:0;";
6329
+ var INLINE_EDITOR_RESET_CLASS = "elementor-inline-editor-reset";
6290
6330
  var useOnUpdate = (callback, dependencies) => {
6291
6331
  const hasMounted = useRef26(false);
6292
6332
  useEffect12(() => {
@@ -6373,6 +6413,7 @@ var InlineEditor = forwardRef10(
6373
6413
  const newValue = updatedEditor.getHTML();
6374
6414
  setValue(isEmpty(newValue) ? null : newValue);
6375
6415
  };
6416
+ const classes = `${INLINE_EDITOR_RESET_CLASS} ${elementClasses}`;
6376
6417
  const editor = useEditor({
6377
6418
  extensions: [
6378
6419
  Document.extend({
@@ -6381,20 +6422,16 @@ var InlineEditor = forwardRef10(
6381
6422
  Paragraph.extend({
6382
6423
  renderHTML({ HTMLAttributes }) {
6383
6424
  const tag = expectedTag ?? "p";
6384
- return [tag, { ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses }, 0];
6425
+ return [tag, { ...HTMLAttributes, class: classes }, 0];
6385
6426
  }
6386
6427
  }),
6387
6428
  Heading.extend({
6388
6429
  renderHTML({ node, HTMLAttributes }) {
6389
6430
  if (expectedTag) {
6390
- return [
6391
- expectedTag,
6392
- { ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses },
6393
- 0
6394
- ];
6431
+ return [expectedTag, { ...HTMLAttributes, class: classes }, 0];
6395
6432
  }
6396
6433
  const level = this.options.levels.includes(node.attrs.level) ? node.attrs.level : this.options.levels[0];
6397
- return [`h${level}`, { ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses }, 0];
6434
+ return [`h${level}`, { ...HTMLAttributes, class: classes }, 0];
6398
6435
  }
6399
6436
  }).configure({
6400
6437
  levels: [1, 2, 3, 4, 5, 6]
@@ -6507,6 +6544,10 @@ var InlineEditingControl = createControl(
6507
6544
  fontSize: "12px",
6508
6545
  "& a": {
6509
6546
  color: "inherit"
6547
+ },
6548
+ "& .elementor-inline-editor-reset": {
6549
+ margin: 0,
6550
+ padding: 0
6510
6551
  }
6511
6552
  },
6512
6553
  ".strip-styles *": {