@elementor/editor-controls 4.0.0-520 → 4.0.0-522
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +172 -109
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +143 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/promotions/display-conditions-control.tsx +61 -0
- package/src/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -6433,30 +6433,91 @@ var InlineEditingControl = createControl(
|
|
|
6433
6433
|
}
|
|
6434
6434
|
);
|
|
6435
6435
|
|
|
6436
|
-
// src/components/
|
|
6436
|
+
// src/components/promotions/display-conditions-control.tsx
|
|
6437
6437
|
import * as React100 from "react";
|
|
6438
|
+
import { useState as useState17 } from "react";
|
|
6439
|
+
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
6440
|
+
import { SitemapIcon } from "@elementor/icons";
|
|
6441
|
+
import { Box as Box24, IconButton as IconButton8, Stack as Stack16, Tooltip as Tooltip9 } from "@elementor/ui";
|
|
6442
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
6443
|
+
var ARIA_LABEL = __50("Display Conditions", "elementor");
|
|
6444
|
+
function getDisplayConditionPromotion() {
|
|
6445
|
+
return window.elementor?.config?.v4Promotions?.displayConditions;
|
|
6446
|
+
}
|
|
6447
|
+
var DisplayConditionsControl = createControl(() => {
|
|
6448
|
+
const [isInfotipOpen, setIsInfotipOpen] = useState17(false);
|
|
6449
|
+
const promotion = getDisplayConditionPromotion();
|
|
6450
|
+
return /* @__PURE__ */ React100.createElement(
|
|
6451
|
+
Stack16,
|
|
6452
|
+
{
|
|
6453
|
+
direction: "row",
|
|
6454
|
+
spacing: 2,
|
|
6455
|
+
sx: {
|
|
6456
|
+
justifyContent: "flex-end",
|
|
6457
|
+
alignItems: "center"
|
|
6458
|
+
}
|
|
6459
|
+
},
|
|
6460
|
+
/* @__PURE__ */ React100.createElement(
|
|
6461
|
+
PromotionInfotip,
|
|
6462
|
+
{
|
|
6463
|
+
title: promotion?.title ?? "",
|
|
6464
|
+
content: promotion?.content ?? "",
|
|
6465
|
+
assetUrl: promotion?.image ?? "",
|
|
6466
|
+
ctaUrl: promotion?.ctaUrl ?? "",
|
|
6467
|
+
open: isInfotipOpen,
|
|
6468
|
+
onClose: () => setIsInfotipOpen(false)
|
|
6469
|
+
},
|
|
6470
|
+
/* @__PURE__ */ React100.createElement(
|
|
6471
|
+
Box24,
|
|
6472
|
+
{
|
|
6473
|
+
onClick: () => setIsInfotipOpen((prev) => !prev),
|
|
6474
|
+
sx: { cursor: "pointer", display: "inline-flex" }
|
|
6475
|
+
},
|
|
6476
|
+
/* @__PURE__ */ React100.createElement(PromotionChip2, null)
|
|
6477
|
+
)
|
|
6478
|
+
),
|
|
6479
|
+
/* @__PURE__ */ React100.createElement(Tooltip9, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React100.createElement(
|
|
6480
|
+
IconButton8,
|
|
6481
|
+
{
|
|
6482
|
+
size: "tiny",
|
|
6483
|
+
"aria-label": ARIA_LABEL,
|
|
6484
|
+
"data-behavior": "display-conditions",
|
|
6485
|
+
onClick: () => setIsInfotipOpen((prev) => !prev),
|
|
6486
|
+
sx: {
|
|
6487
|
+
border: "1px solid",
|
|
6488
|
+
borderColor: "divider",
|
|
6489
|
+
borderRadius: 1
|
|
6490
|
+
}
|
|
6491
|
+
},
|
|
6492
|
+
/* @__PURE__ */ React100.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
6493
|
+
))
|
|
6494
|
+
);
|
|
6495
|
+
});
|
|
6496
|
+
|
|
6497
|
+
// src/components/icon-buttons/clear-icon-button.tsx
|
|
6498
|
+
import * as React101 from "react";
|
|
6438
6499
|
import { BrushBigIcon } from "@elementor/icons";
|
|
6439
|
-
import { IconButton as
|
|
6440
|
-
var CustomIconButton = styled9(
|
|
6500
|
+
import { IconButton as IconButton9, styled as styled9, Tooltip as Tooltip10 } from "@elementor/ui";
|
|
6501
|
+
var CustomIconButton = styled9(IconButton9)(({ theme }) => ({
|
|
6441
6502
|
width: theme.spacing(2.5),
|
|
6442
6503
|
height: theme.spacing(2.5)
|
|
6443
6504
|
}));
|
|
6444
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
6505
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React101.createElement(Tooltip10, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React101.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React101.createElement(BrushBigIcon, { fontSize: size })));
|
|
6445
6506
|
|
|
6446
6507
|
// src/components/repeater/repeater.tsx
|
|
6447
|
-
import * as
|
|
6448
|
-
import { useEffect as useEffect12, useState as
|
|
6508
|
+
import * as React102 from "react";
|
|
6509
|
+
import { useEffect as useEffect12, useState as useState18 } from "react";
|
|
6449
6510
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon3, XIcon as XIcon4 } from "@elementor/icons";
|
|
6450
6511
|
import {
|
|
6451
6512
|
bindPopover as bindPopover7,
|
|
6452
6513
|
bindTrigger as bindTrigger6,
|
|
6453
|
-
Box as
|
|
6454
|
-
IconButton as
|
|
6514
|
+
Box as Box25,
|
|
6515
|
+
IconButton as IconButton10,
|
|
6455
6516
|
Infotip as Infotip4,
|
|
6456
|
-
Tooltip as
|
|
6517
|
+
Tooltip as Tooltip11,
|
|
6457
6518
|
usePopupState as usePopupState8
|
|
6458
6519
|
} from "@elementor/ui";
|
|
6459
|
-
import { __ as
|
|
6520
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
6460
6521
|
var SIZE9 = "tiny";
|
|
6461
6522
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
6462
6523
|
var Repeater3 = ({
|
|
@@ -6474,7 +6535,7 @@ var Repeater3 = ({
|
|
|
6474
6535
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
|
|
6475
6536
|
isSortable = true
|
|
6476
6537
|
}) => {
|
|
6477
|
-
const [openItem, setOpenItem] =
|
|
6538
|
+
const [openItem, setOpenItem] = useState18(initialOpenItem);
|
|
6478
6539
|
const uniqueKeys = items2.map(
|
|
6479
6540
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
6480
6541
|
);
|
|
@@ -6537,8 +6598,8 @@ var Repeater3 = ({
|
|
|
6537
6598
|
};
|
|
6538
6599
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
6539
6600
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
6540
|
-
const addButton = /* @__PURE__ */
|
|
6541
|
-
|
|
6601
|
+
const addButton = /* @__PURE__ */ React102.createElement(
|
|
6602
|
+
IconButton10,
|
|
6542
6603
|
{
|
|
6543
6604
|
size: SIZE9,
|
|
6544
6605
|
sx: {
|
|
@@ -6546,11 +6607,11 @@ var Repeater3 = ({
|
|
|
6546
6607
|
},
|
|
6547
6608
|
disabled: isButtonDisabled,
|
|
6548
6609
|
onClick: addRepeaterItem,
|
|
6549
|
-
"aria-label":
|
|
6610
|
+
"aria-label": __51("Add item", "elementor")
|
|
6550
6611
|
},
|
|
6551
|
-
/* @__PURE__ */
|
|
6612
|
+
/* @__PURE__ */ React102.createElement(PlusIcon3, { fontSize: SIZE9 })
|
|
6552
6613
|
);
|
|
6553
|
-
return /* @__PURE__ */
|
|
6614
|
+
return /* @__PURE__ */ React102.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React102.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React102.createElement(
|
|
6554
6615
|
Infotip4,
|
|
6555
6616
|
{
|
|
6556
6617
|
placement: "right",
|
|
@@ -6558,20 +6619,20 @@ var Repeater3 = ({
|
|
|
6558
6619
|
color: "secondary",
|
|
6559
6620
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
6560
6621
|
},
|
|
6561
|
-
/* @__PURE__ */
|
|
6562
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
6622
|
+
/* @__PURE__ */ React102.createElement(Box25, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
6623
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React102.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
6563
6624
|
const index = uniqueKeys.indexOf(key);
|
|
6564
6625
|
const value = items2[index];
|
|
6565
6626
|
if (!value) {
|
|
6566
6627
|
return null;
|
|
6567
6628
|
}
|
|
6568
|
-
return /* @__PURE__ */
|
|
6629
|
+
return /* @__PURE__ */ React102.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React102.createElement(
|
|
6569
6630
|
RepeaterItem,
|
|
6570
6631
|
{
|
|
6571
6632
|
disabled,
|
|
6572
6633
|
propDisabled: value?.disabled,
|
|
6573
|
-
label: /* @__PURE__ */
|
|
6574
|
-
startIcon: /* @__PURE__ */
|
|
6634
|
+
label: /* @__PURE__ */ React102.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React102.createElement(itemSettings.Label, { value, index })),
|
|
6635
|
+
startIcon: /* @__PURE__ */ React102.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React102.createElement(itemSettings.Icon, { value })),
|
|
6575
6636
|
removeItem: () => removeRepeaterItem(index),
|
|
6576
6637
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
6577
6638
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -6583,7 +6644,7 @@ var Repeater3 = ({
|
|
|
6583
6644
|
actions: itemSettings.actions,
|
|
6584
6645
|
value
|
|
6585
6646
|
},
|
|
6586
|
-
(props) => /* @__PURE__ */
|
|
6647
|
+
(props) => /* @__PURE__ */ React102.createElement(
|
|
6587
6648
|
itemSettings.Content,
|
|
6588
6649
|
{
|
|
6589
6650
|
...props,
|
|
@@ -6613,24 +6674,24 @@ var RepeaterItem = ({
|
|
|
6613
6674
|
value
|
|
6614
6675
|
}) => {
|
|
6615
6676
|
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
|
|
6616
|
-
const duplicateLabel =
|
|
6617
|
-
const toggleLabel = propDisabled ?
|
|
6618
|
-
const removeLabel =
|
|
6619
|
-
return /* @__PURE__ */
|
|
6677
|
+
const duplicateLabel = __51("Duplicate", "elementor");
|
|
6678
|
+
const toggleLabel = propDisabled ? __51("Show", "elementor") : __51("Hide", "elementor");
|
|
6679
|
+
const removeLabel = __51("Remove", "elementor");
|
|
6680
|
+
return /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(
|
|
6620
6681
|
RepeaterTag,
|
|
6621
6682
|
{
|
|
6622
6683
|
disabled,
|
|
6623
6684
|
label,
|
|
6624
6685
|
ref: setRef,
|
|
6625
|
-
"aria-label":
|
|
6686
|
+
"aria-label": __51("Open item", "elementor"),
|
|
6626
6687
|
...bindTrigger6(popoverState),
|
|
6627
6688
|
startIcon,
|
|
6628
|
-
actions: /* @__PURE__ */
|
|
6689
|
+
actions: /* @__PURE__ */ React102.createElement(React102.Fragment, null, showDuplicate && /* @__PURE__ */ React102.createElement(Tooltip11, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton10, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React102.createElement(CopyIcon2, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React102.createElement(Tooltip11, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton10, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React102.createElement(EyeOffIcon2, { fontSize: SIZE9 }) : /* @__PURE__ */ React102.createElement(EyeIcon2, { fontSize: SIZE9 }))), actions?.(value), showRemove && /* @__PURE__ */ React102.createElement(Tooltip11, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton10, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React102.createElement(XIcon4, { fontSize: SIZE9 }))))
|
|
6629
6690
|
}
|
|
6630
|
-
), /* @__PURE__ */
|
|
6691
|
+
), /* @__PURE__ */ React102.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React102.createElement(Box25, null, children({ anchorEl: ref }))));
|
|
6631
6692
|
};
|
|
6632
6693
|
var usePopover = (openOnMount, onOpen) => {
|
|
6633
|
-
const [ref, setRef] =
|
|
6694
|
+
const [ref, setRef] = useState18(null);
|
|
6634
6695
|
const popoverState = usePopupState8({ variant: "popover" });
|
|
6635
6696
|
const popoverProps = bindPopover7(popoverState);
|
|
6636
6697
|
useEffect12(() => {
|
|
@@ -6648,8 +6709,8 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
6648
6709
|
};
|
|
6649
6710
|
|
|
6650
6711
|
// src/components/inline-editor-toolbar.tsx
|
|
6651
|
-
import * as
|
|
6652
|
-
import { useMemo as useMemo15, useRef as useRef26, useState as
|
|
6712
|
+
import * as React104 from "react";
|
|
6713
|
+
import { useMemo as useMemo15, useRef as useRef26, useState as useState19 } from "react";
|
|
6653
6714
|
import { getElementSetting } from "@elementor/editor-elements";
|
|
6654
6715
|
import {
|
|
6655
6716
|
BoldIcon,
|
|
@@ -6662,23 +6723,23 @@ import {
|
|
|
6662
6723
|
UnderlineIcon
|
|
6663
6724
|
} from "@elementor/icons";
|
|
6664
6725
|
import {
|
|
6665
|
-
Box as
|
|
6666
|
-
IconButton as
|
|
6726
|
+
Box as Box26,
|
|
6727
|
+
IconButton as IconButton11,
|
|
6667
6728
|
ToggleButton as ToggleButton3,
|
|
6668
6729
|
ToggleButtonGroup as ToggleButtonGroup2,
|
|
6669
6730
|
toggleButtonGroupClasses,
|
|
6670
|
-
Tooltip as
|
|
6731
|
+
Tooltip as Tooltip13,
|
|
6671
6732
|
usePopupState as usePopupState9
|
|
6672
6733
|
} from "@elementor/ui";
|
|
6673
6734
|
import { useEditorState } from "@tiptap/react";
|
|
6674
|
-
import { __ as
|
|
6735
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
6675
6736
|
|
|
6676
6737
|
// src/components/url-popover.tsx
|
|
6677
|
-
import * as
|
|
6738
|
+
import * as React103 from "react";
|
|
6678
6739
|
import { useEffect as useEffect13, useRef as useRef25 } from "react";
|
|
6679
6740
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
6680
|
-
import { bindPopover as bindPopover8, Popover as Popover7, Stack as
|
|
6681
|
-
import { __ as
|
|
6741
|
+
import { bindPopover as bindPopover8, Popover as Popover7, Stack as Stack17, TextField as TextField8, ToggleButton as ToggleButton2, Tooltip as Tooltip12 } from "@elementor/ui";
|
|
6742
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
6682
6743
|
var UrlPopover = ({
|
|
6683
6744
|
popupState,
|
|
6684
6745
|
restoreValue,
|
|
@@ -6698,7 +6759,7 @@ var UrlPopover = ({
|
|
|
6698
6759
|
restoreValue();
|
|
6699
6760
|
popupState.close();
|
|
6700
6761
|
};
|
|
6701
|
-
return /* @__PURE__ */
|
|
6762
|
+
return /* @__PURE__ */ React103.createElement(
|
|
6702
6763
|
Popover7,
|
|
6703
6764
|
{
|
|
6704
6765
|
slotProps: {
|
|
@@ -6709,38 +6770,38 @@ var UrlPopover = ({
|
|
|
6709
6770
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6710
6771
|
onClose: handleClose
|
|
6711
6772
|
},
|
|
6712
|
-
/* @__PURE__ */
|
|
6773
|
+
/* @__PURE__ */ React103.createElement(Stack17, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React103.createElement(
|
|
6713
6774
|
TextField8,
|
|
6714
6775
|
{
|
|
6715
6776
|
value,
|
|
6716
6777
|
onChange,
|
|
6717
6778
|
size: "tiny",
|
|
6718
6779
|
fullWidth: true,
|
|
6719
|
-
placeholder:
|
|
6780
|
+
placeholder: __52("Type a URL", "elementor"),
|
|
6720
6781
|
inputProps: { ref: inputRef },
|
|
6721
6782
|
color: "secondary",
|
|
6722
6783
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
6723
6784
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
6724
6785
|
}
|
|
6725
|
-
), /* @__PURE__ */
|
|
6786
|
+
), /* @__PURE__ */ React103.createElement(Tooltip12, { title: __52("Open in a new tab", "elementor") }, /* @__PURE__ */ React103.createElement(
|
|
6726
6787
|
ToggleButton2,
|
|
6727
6788
|
{
|
|
6728
6789
|
size: "tiny",
|
|
6729
6790
|
value: "newTab",
|
|
6730
6791
|
selected: openInNewTab,
|
|
6731
6792
|
onClick: onToggleNewTab,
|
|
6732
|
-
"aria-label":
|
|
6793
|
+
"aria-label": __52("Open in a new tab", "elementor"),
|
|
6733
6794
|
sx: { borderRadius: "8px" }
|
|
6734
6795
|
},
|
|
6735
|
-
/* @__PURE__ */
|
|
6796
|
+
/* @__PURE__ */ React103.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
6736
6797
|
)))
|
|
6737
6798
|
);
|
|
6738
6799
|
};
|
|
6739
6800
|
|
|
6740
6801
|
// src/components/inline-editor-toolbar.tsx
|
|
6741
6802
|
var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
6742
|
-
const [urlValue, setUrlValue] =
|
|
6743
|
-
const [openInNewTab, setOpenInNewTab] =
|
|
6803
|
+
const [urlValue, setUrlValue] = useState19("");
|
|
6804
|
+
const [openInNewTab, setOpenInNewTab] = useState19(false);
|
|
6744
6805
|
const toolbarRef = useRef26(null);
|
|
6745
6806
|
const linkPopupState = usePopupState9({ variant: "popover" });
|
|
6746
6807
|
const hasLinkOnElement = elementId ? checkIfElementHasLink(elementId) : false;
|
|
@@ -6785,11 +6846,11 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6785
6846
|
}
|
|
6786
6847
|
linkPopupState.close();
|
|
6787
6848
|
};
|
|
6788
|
-
|
|
6849
|
+
React104.useEffect(() => {
|
|
6789
6850
|
editor?.commands?.focus();
|
|
6790
6851
|
}, [editor]);
|
|
6791
|
-
return /* @__PURE__ */
|
|
6792
|
-
|
|
6852
|
+
return /* @__PURE__ */ React104.createElement(
|
|
6853
|
+
Box26,
|
|
6793
6854
|
{
|
|
6794
6855
|
ref: toolbarRef,
|
|
6795
6856
|
sx: {
|
|
@@ -6805,8 +6866,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6805
6866
|
...sx
|
|
6806
6867
|
}
|
|
6807
6868
|
},
|
|
6808
|
-
/* @__PURE__ */
|
|
6809
|
-
/* @__PURE__ */
|
|
6869
|
+
/* @__PURE__ */ React104.createElement(Tooltip13, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React104.createElement(IconButton11, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
6870
|
+
/* @__PURE__ */ React104.createElement(
|
|
6810
6871
|
ToggleButtonGroup2,
|
|
6811
6872
|
{
|
|
6812
6873
|
value: editorState,
|
|
@@ -6828,7 +6889,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6828
6889
|
}
|
|
6829
6890
|
}
|
|
6830
6891
|
},
|
|
6831
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
6892
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React104.createElement(Tooltip13, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React104.createElement(
|
|
6832
6893
|
ToggleButton3,
|
|
6833
6894
|
{
|
|
6834
6895
|
value: button.action,
|
|
@@ -6846,7 +6907,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6846
6907
|
button.icon
|
|
6847
6908
|
)))
|
|
6848
6909
|
),
|
|
6849
|
-
/* @__PURE__ */
|
|
6910
|
+
/* @__PURE__ */ React104.createElement(
|
|
6850
6911
|
UrlPopover,
|
|
6851
6912
|
{
|
|
6852
6913
|
popupState: linkPopupState,
|
|
@@ -6863,64 +6924,64 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6863
6924
|
var checkIfElementHasLink = (elementId) => !!getElementSetting(elementId, "link")?.value?.destination;
|
|
6864
6925
|
var toolbarButtons = {
|
|
6865
6926
|
clear: {
|
|
6866
|
-
label:
|
|
6867
|
-
icon: /* @__PURE__ */
|
|
6927
|
+
label: __53("Clear", "elementor"),
|
|
6928
|
+
icon: /* @__PURE__ */ React104.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
6868
6929
|
action: "clear",
|
|
6869
6930
|
method: (editor) => {
|
|
6870
6931
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
6871
6932
|
}
|
|
6872
6933
|
},
|
|
6873
6934
|
bold: {
|
|
6874
|
-
label:
|
|
6875
|
-
icon: /* @__PURE__ */
|
|
6935
|
+
label: __53("Bold", "elementor"),
|
|
6936
|
+
icon: /* @__PURE__ */ React104.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
6876
6937
|
action: "bold",
|
|
6877
6938
|
method: (editor) => {
|
|
6878
6939
|
editor.chain().focus().toggleBold().run();
|
|
6879
6940
|
}
|
|
6880
6941
|
},
|
|
6881
6942
|
italic: {
|
|
6882
|
-
label:
|
|
6883
|
-
icon: /* @__PURE__ */
|
|
6943
|
+
label: __53("Italic", "elementor"),
|
|
6944
|
+
icon: /* @__PURE__ */ React104.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
6884
6945
|
action: "italic",
|
|
6885
6946
|
method: (editor) => {
|
|
6886
6947
|
editor.chain().focus().toggleItalic().run();
|
|
6887
6948
|
}
|
|
6888
6949
|
},
|
|
6889
6950
|
underline: {
|
|
6890
|
-
label:
|
|
6891
|
-
icon: /* @__PURE__ */
|
|
6951
|
+
label: __53("Underline", "elementor"),
|
|
6952
|
+
icon: /* @__PURE__ */ React104.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
6892
6953
|
action: "underline",
|
|
6893
6954
|
method: (editor) => {
|
|
6894
6955
|
editor.chain().focus().toggleUnderline().run();
|
|
6895
6956
|
}
|
|
6896
6957
|
},
|
|
6897
6958
|
strike: {
|
|
6898
|
-
label:
|
|
6899
|
-
icon: /* @__PURE__ */
|
|
6959
|
+
label: __53("Strikethrough", "elementor"),
|
|
6960
|
+
icon: /* @__PURE__ */ React104.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
6900
6961
|
action: "strike",
|
|
6901
6962
|
method: (editor) => {
|
|
6902
6963
|
editor.chain().focus().toggleStrike().run();
|
|
6903
6964
|
}
|
|
6904
6965
|
},
|
|
6905
6966
|
superscript: {
|
|
6906
|
-
label:
|
|
6907
|
-
icon: /* @__PURE__ */
|
|
6967
|
+
label: __53("Superscript", "elementor"),
|
|
6968
|
+
icon: /* @__PURE__ */ React104.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
6908
6969
|
action: "superscript",
|
|
6909
6970
|
method: (editor) => {
|
|
6910
6971
|
editor.chain().focus().toggleSuperscript().run();
|
|
6911
6972
|
}
|
|
6912
6973
|
},
|
|
6913
6974
|
subscript: {
|
|
6914
|
-
label:
|
|
6915
|
-
icon: /* @__PURE__ */
|
|
6975
|
+
label: __53("Subscript", "elementor"),
|
|
6976
|
+
icon: /* @__PURE__ */ React104.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
6916
6977
|
action: "subscript",
|
|
6917
6978
|
method: (editor) => {
|
|
6918
6979
|
editor.chain().focus().toggleSubscript().run();
|
|
6919
6980
|
}
|
|
6920
6981
|
},
|
|
6921
6982
|
link: {
|
|
6922
|
-
label:
|
|
6923
|
-
icon: /* @__PURE__ */
|
|
6983
|
+
label: __53("Link", "elementor"),
|
|
6984
|
+
icon: /* @__PURE__ */ React104.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
6924
6985
|
action: "link",
|
|
6925
6986
|
method: null
|
|
6926
6987
|
}
|
|
@@ -6929,7 +6990,7 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
|
6929
6990
|
var possibleFormats = Object.keys(formatButtons);
|
|
6930
6991
|
|
|
6931
6992
|
// src/components/size/unstable-size-field.tsx
|
|
6932
|
-
import * as
|
|
6993
|
+
import * as React107 from "react";
|
|
6933
6994
|
import { InputAdornment as InputAdornment5 } from "@elementor/ui";
|
|
6934
6995
|
|
|
6935
6996
|
// src/hooks/use-size-value.ts
|
|
@@ -6970,7 +7031,7 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
6970
7031
|
};
|
|
6971
7032
|
|
|
6972
7033
|
// src/components/size/unit-select.tsx
|
|
6973
|
-
import * as
|
|
7034
|
+
import * as React105 from "react";
|
|
6974
7035
|
import { useId as useId3 } from "react";
|
|
6975
7036
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
6976
7037
|
import { bindMenu as bindMenu2, bindTrigger as bindTrigger7, Button as Button5, Menu as Menu3, styled as styled10, usePopupState as usePopupState10 } from "@elementor/ui";
|
|
@@ -6988,7 +7049,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
6988
7049
|
onClick(options[index]);
|
|
6989
7050
|
popupState.close();
|
|
6990
7051
|
};
|
|
6991
|
-
return /* @__PURE__ */
|
|
7052
|
+
return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(StyledButton2, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger7(popupState) }, value), /* @__PURE__ */ React105.createElement(Menu3, { MenuListProps: { dense: true }, ...bindMenu2(popupState) }, options.map((option, index) => /* @__PURE__ */ React105.createElement(
|
|
6992
7053
|
MenuListItem7,
|
|
6993
7054
|
{
|
|
6994
7055
|
key: option,
|
|
@@ -7017,11 +7078,11 @@ var StyledButton2 = styled10(Button5, {
|
|
|
7017
7078
|
}));
|
|
7018
7079
|
|
|
7019
7080
|
// src/components/size/unstable-size-input.tsx
|
|
7020
|
-
import * as
|
|
7081
|
+
import * as React106 from "react";
|
|
7021
7082
|
import { forwardRef as forwardRef11 } from "react";
|
|
7022
7083
|
var UnstableSizeInput = forwardRef11(
|
|
7023
7084
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
7024
|
-
return /* @__PURE__ */
|
|
7085
|
+
return /* @__PURE__ */ React106.createElement(
|
|
7025
7086
|
NumberInput,
|
|
7026
7087
|
{
|
|
7027
7088
|
ref,
|
|
@@ -7065,7 +7126,7 @@ var UnstableSizeField = ({
|
|
|
7065
7126
|
const shouldHighlightUnit = () => {
|
|
7066
7127
|
return hasValue(size);
|
|
7067
7128
|
};
|
|
7068
|
-
return /* @__PURE__ */
|
|
7129
|
+
return /* @__PURE__ */ React107.createElement(
|
|
7069
7130
|
UnstableSizeInput,
|
|
7070
7131
|
{
|
|
7071
7132
|
type: "number",
|
|
@@ -7074,7 +7135,7 @@ var UnstableSizeField = ({
|
|
|
7074
7135
|
onChange: (event) => setSize(event.target.value),
|
|
7075
7136
|
InputProps: {
|
|
7076
7137
|
...InputProps,
|
|
7077
|
-
endAdornment: /* @__PURE__ */
|
|
7138
|
+
endAdornment: /* @__PURE__ */ React107.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React107.createElement(
|
|
7078
7139
|
UnitSelect,
|
|
7079
7140
|
{
|
|
7080
7141
|
options: units2,
|
|
@@ -7094,11 +7155,11 @@ var hasValue = (value) => {
|
|
|
7094
7155
|
// src/hooks/use-font-families.ts
|
|
7095
7156
|
import { useMemo as useMemo16 } from "react";
|
|
7096
7157
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
7097
|
-
import { __ as
|
|
7158
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
7098
7159
|
var supportedCategories = {
|
|
7099
|
-
system:
|
|
7100
|
-
custom:
|
|
7101
|
-
googlefonts:
|
|
7160
|
+
system: __54("System", "elementor"),
|
|
7161
|
+
custom: __54("Custom Fonts", "elementor"),
|
|
7162
|
+
googlefonts: __54("Google Fonts", "elementor")
|
|
7102
7163
|
};
|
|
7103
7164
|
var getFontFamilies = () => {
|
|
7104
7165
|
const { controls } = getElementorConfig();
|
|
@@ -7141,6 +7202,7 @@ export {
|
|
|
7141
7202
|
ControlReplacementsProvider,
|
|
7142
7203
|
ControlToggleButtonGroup,
|
|
7143
7204
|
DateTimeControl,
|
|
7205
|
+
DisplayConditionsControl,
|
|
7144
7206
|
EqualUnequalSizesControl,
|
|
7145
7207
|
FilterRepeaterControl,
|
|
7146
7208
|
FontFamilyControl,
|