@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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +55 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/inline-editor.tsx +6 -8
- package/src/controls/equal-unequal-sizes-control.tsx +6 -3
- package/src/controls/gap-control.tsx +16 -4
- package/src/controls/inline-editing-control.tsx +4 -0
- package/src/controls/linked-dimensions-control.tsx +22 -3
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2730,7 +2730,8 @@ function EqualUnequalSizesControl({
|
|
|
2730
2730
|
));
|
|
2731
2731
|
}
|
|
2732
2732
|
var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
2733
|
-
|
|
2733
|
+
const { bind, label, icon, ariaLabel } = item;
|
|
2734
|
+
return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(SizeControl, { startIcon: icon, ariaLabel, anchorRef: rowRef })))));
|
|
2734
2735
|
};
|
|
2735
2736
|
|
|
2736
2737
|
// src/controls/linked-dimensions-control.tsx
|
|
@@ -2817,10 +2818,11 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2817
2818
|
isPlaceholder: hasPlaceholders
|
|
2818
2819
|
},
|
|
2819
2820
|
/* @__PURE__ */ React57.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2820
|
-
))), getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(import_ui42.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(import_ui42.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
|
|
2821
|
+
))), getCssDimensionProps(label, isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(import_ui42.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(import_ui42.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
|
|
2821
2822
|
Control3,
|
|
2822
2823
|
{
|
|
2823
2824
|
bind: props.bind,
|
|
2825
|
+
ariaLabel: props.ariaLabel,
|
|
2824
2826
|
startIcon: icon,
|
|
2825
2827
|
isLinked,
|
|
2826
2828
|
extendedOptions,
|
|
@@ -2831,6 +2833,7 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2831
2833
|
};
|
|
2832
2834
|
var Control3 = ({
|
|
2833
2835
|
bind,
|
|
2836
|
+
ariaLabel,
|
|
2834
2837
|
startIcon,
|
|
2835
2838
|
isLinked,
|
|
2836
2839
|
extendedOptions,
|
|
@@ -2841,6 +2844,7 @@ var Control3 = ({
|
|
|
2841
2844
|
return /* @__PURE__ */ React57.createElement(
|
|
2842
2845
|
SizeControl,
|
|
2843
2846
|
{
|
|
2847
|
+
ariaLabel,
|
|
2844
2848
|
startIcon,
|
|
2845
2849
|
extendedOptions,
|
|
2846
2850
|
anchorRef,
|
|
@@ -2851,6 +2855,7 @@ var Control3 = ({
|
|
|
2851
2855
|
return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(
|
|
2852
2856
|
SizeControl,
|
|
2853
2857
|
{
|
|
2858
|
+
ariaLabel,
|
|
2854
2859
|
startIcon,
|
|
2855
2860
|
extendedOptions,
|
|
2856
2861
|
anchorRef,
|
|
@@ -2861,17 +2866,26 @@ var Control3 = ({
|
|
|
2861
2866
|
var Label = ({ label, bind }) => {
|
|
2862
2867
|
return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(ControlLabel, null, label));
|
|
2863
2868
|
};
|
|
2864
|
-
function getCssDimensionProps(isSiteRtl) {
|
|
2869
|
+
function getCssDimensionProps(label, isSiteRtl) {
|
|
2865
2870
|
return [
|
|
2866
2871
|
[
|
|
2867
2872
|
{
|
|
2868
2873
|
bind: "block-start",
|
|
2869
2874
|
label: (0, import_i18n18.__)("Top", "elementor"),
|
|
2875
|
+
/* translators: %s is the name of the main group (margin or padding) */
|
|
2876
|
+
ariaLabel: (0, import_i18n18.sprintf)((0, import_i18n18.__)("%s top", "elementor"), label),
|
|
2870
2877
|
icon: /* @__PURE__ */ React57.createElement(import_icons10.SideTopIcon, { fontSize: "tiny" })
|
|
2871
2878
|
},
|
|
2872
2879
|
{
|
|
2873
2880
|
bind: "inline-end",
|
|
2874
2881
|
label: isSiteRtl ? (0, import_i18n18.__)("Left", "elementor") : (0, import_i18n18.__)("Right", "elementor"),
|
|
2882
|
+
ariaLabel: isSiteRtl ? (
|
|
2883
|
+
/* translators: %s is the name of the main group (margin or padding) */
|
|
2884
|
+
(0, import_i18n18.sprintf)((0, import_i18n18.__)("%s left", "elementor"), label)
|
|
2885
|
+
) : (
|
|
2886
|
+
/* translators: %s is the name of the main group (margin or padding) */
|
|
2887
|
+
(0, import_i18n18.sprintf)((0, import_i18n18.__)("%s right", "elementor"), label)
|
|
2888
|
+
),
|
|
2875
2889
|
icon: isSiteRtl ? /* @__PURE__ */ React57.createElement(import_icons10.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React57.createElement(import_icons10.SideRightIcon, { fontSize: "tiny" })
|
|
2876
2890
|
}
|
|
2877
2891
|
],
|
|
@@ -2879,11 +2893,20 @@ function getCssDimensionProps(isSiteRtl) {
|
|
|
2879
2893
|
{
|
|
2880
2894
|
bind: "block-end",
|
|
2881
2895
|
label: (0, import_i18n18.__)("Bottom", "elementor"),
|
|
2896
|
+
/* translators: %s is the name of the main group (margin or padding) */
|
|
2897
|
+
ariaLabel: (0, import_i18n18.sprintf)((0, import_i18n18.__)("%s bottom", "elementor"), label),
|
|
2882
2898
|
icon: /* @__PURE__ */ React57.createElement(import_icons10.SideBottomIcon, { fontSize: "tiny" })
|
|
2883
2899
|
},
|
|
2884
2900
|
{
|
|
2885
2901
|
bind: "inline-start",
|
|
2886
2902
|
label: isSiteRtl ? (0, import_i18n18.__)("Right", "elementor") : (0, import_i18n18.__)("Left", "elementor"),
|
|
2903
|
+
ariaLabel: isSiteRtl ? (
|
|
2904
|
+
/* translators: %s is the name of the main group (margin or padding) */
|
|
2905
|
+
(0, import_i18n18.sprintf)((0, import_i18n18.__)("%s right", "elementor"), label)
|
|
2906
|
+
) : (
|
|
2907
|
+
/* translators: %s is the name of the main group (margin or padding) */
|
|
2908
|
+
(0, import_i18n18.sprintf)((0, import_i18n18.__)("%s left", "elementor"), label)
|
|
2909
|
+
),
|
|
2887
2910
|
icon: isSiteRtl ? /* @__PURE__ */ React57.createElement(import_icons10.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React57.createElement(import_icons10.SideLeftIcon, { fontSize: "tiny" })
|
|
2888
2911
|
}
|
|
2889
2912
|
]
|
|
@@ -3761,17 +3784,34 @@ var GapControl = ({ label }) => {
|
|
|
3761
3784
|
isPlaceholder: hasPlaceholders
|
|
3762
3785
|
},
|
|
3763
3786
|
/* @__PURE__ */ React68.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
3764
|
-
))), /* @__PURE__ */ React68.createElement(import_ui53.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Column", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(
|
|
3787
|
+
))), /* @__PURE__ */ React68.createElement(import_ui53.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Column", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(
|
|
3788
|
+
Control4,
|
|
3789
|
+
{
|
|
3790
|
+
bind: "column",
|
|
3791
|
+
ariaLabel: (0, import_i18n25.__)("Column gap", "elementor"),
|
|
3792
|
+
isLinked,
|
|
3793
|
+
anchorRef: stackRef
|
|
3794
|
+
}
|
|
3795
|
+
))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Row", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(
|
|
3796
|
+
Control4,
|
|
3797
|
+
{
|
|
3798
|
+
bind: "row",
|
|
3799
|
+
ariaLabel: (0, import_i18n25.__)("Row gap", "elementor"),
|
|
3800
|
+
isLinked,
|
|
3801
|
+
anchorRef: stackRef
|
|
3802
|
+
}
|
|
3803
|
+
)))));
|
|
3765
3804
|
};
|
|
3766
3805
|
var Control4 = ({
|
|
3767
3806
|
bind,
|
|
3807
|
+
ariaLabel,
|
|
3768
3808
|
isLinked,
|
|
3769
3809
|
anchorRef
|
|
3770
3810
|
}) => {
|
|
3771
3811
|
if (isLinked) {
|
|
3772
|
-
return /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef });
|
|
3812
|
+
return /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef, ariaLabel });
|
|
3773
3813
|
}
|
|
3774
|
-
return /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef }));
|
|
3814
|
+
return /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef, ariaLabel }));
|
|
3775
3815
|
};
|
|
3776
3816
|
|
|
3777
3817
|
// src/controls/aspect-ratio-control.tsx
|
|
@@ -6271,7 +6311,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6271
6311
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
6272
6312
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
6273
6313
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
6274
|
-
var
|
|
6314
|
+
var INLINE_EDITOR_RESET_CLASS = "elementor-inline-editor-reset";
|
|
6275
6315
|
var useOnUpdate = (callback, dependencies) => {
|
|
6276
6316
|
const hasMounted = (0, import_react56.useRef)(false);
|
|
6277
6317
|
(0, import_react56.useEffect)(() => {
|
|
@@ -6358,6 +6398,7 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6358
6398
|
const newValue = updatedEditor.getHTML();
|
|
6359
6399
|
setValue(isEmpty(newValue) ? null : newValue);
|
|
6360
6400
|
};
|
|
6401
|
+
const classes = `${INLINE_EDITOR_RESET_CLASS} ${elementClasses}`;
|
|
6361
6402
|
const editor = (0, import_react57.useEditor)({
|
|
6362
6403
|
extensions: [
|
|
6363
6404
|
import_extension_document.default.extend({
|
|
@@ -6366,20 +6407,16 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6366
6407
|
import_extension_paragraph.default.extend({
|
|
6367
6408
|
renderHTML({ HTMLAttributes }) {
|
|
6368
6409
|
const tag = expectedTag ?? "p";
|
|
6369
|
-
return [tag, { ...HTMLAttributes,
|
|
6410
|
+
return [tag, { ...HTMLAttributes, class: classes }, 0];
|
|
6370
6411
|
}
|
|
6371
6412
|
}),
|
|
6372
6413
|
import_extension_heading.default.extend({
|
|
6373
6414
|
renderHTML({ node, HTMLAttributes }) {
|
|
6374
6415
|
if (expectedTag) {
|
|
6375
|
-
return [
|
|
6376
|
-
expectedTag,
|
|
6377
|
-
{ ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses },
|
|
6378
|
-
0
|
|
6379
|
-
];
|
|
6416
|
+
return [expectedTag, { ...HTMLAttributes, class: classes }, 0];
|
|
6380
6417
|
}
|
|
6381
6418
|
const level = this.options.levels.includes(node.attrs.level) ? node.attrs.level : this.options.levels[0];
|
|
6382
|
-
return [`h${level}`, { ...HTMLAttributes,
|
|
6419
|
+
return [`h${level}`, { ...HTMLAttributes, class: classes }, 0];
|
|
6383
6420
|
}
|
|
6384
6421
|
}).configure({
|
|
6385
6422
|
levels: [1, 2, 3, 4, 5, 6]
|
|
@@ -6492,6 +6529,10 @@ var InlineEditingControl = createControl(
|
|
|
6492
6529
|
fontSize: "12px",
|
|
6493
6530
|
"& a": {
|
|
6494
6531
|
color: "inherit"
|
|
6532
|
+
},
|
|
6533
|
+
"& .elementor-inline-editor-reset": {
|
|
6534
|
+
margin: 0,
|
|
6535
|
+
padding: 0
|
|
6495
6536
|
}
|
|
6496
6537
|
},
|
|
6497
6538
|
".strip-styles *": {
|