@elementor/editor-controls 4.0.0-521 → 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.d.mts
CHANGED
|
@@ -389,6 +389,8 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
389
389
|
props?: ComponentProps<"div">;
|
|
390
390
|
}) => React$1.JSX.Element>;
|
|
391
391
|
|
|
392
|
+
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
393
|
+
|
|
392
394
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
393
395
|
|
|
394
396
|
type ClearIconButtonProps = {
|
|
@@ -677,4 +679,4 @@ declare const useElementCanHaveChildren: () => boolean;
|
|
|
677
679
|
|
|
678
680
|
declare const useFontFamilies: () => FontCategory[];
|
|
679
681
|
|
|
680
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeField, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
|
682
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeField, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
package/dist/index.d.ts
CHANGED
|
@@ -389,6 +389,8 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
389
389
|
props?: ComponentProps<"div">;
|
|
390
390
|
}) => React$1.JSX.Element>;
|
|
391
391
|
|
|
392
|
+
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
393
|
+
|
|
392
394
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
393
395
|
|
|
394
396
|
type ClearIconButtonProps = {
|
|
@@ -677,4 +679,4 @@ declare const useElementCanHaveChildren: () => boolean;
|
|
|
677
679
|
|
|
678
680
|
declare const useFontFamilies: () => FontCategory[];
|
|
679
681
|
|
|
680
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeField, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
|
682
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeField, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
ControlReplacementsProvider: () => ControlReplacementsProvider,
|
|
43
43
|
ControlToggleButtonGroup: () => ControlToggleButtonGroup,
|
|
44
44
|
DateTimeControl: () => DateTimeControl,
|
|
45
|
+
DisplayConditionsControl: () => DisplayConditionsControl,
|
|
45
46
|
EqualUnequalSizesControl: () => EqualUnequalSizesControl,
|
|
46
47
|
FilterRepeaterControl: () => FilterRepeaterControl,
|
|
47
48
|
FontFamilyControl: () => FontFamilyControl,
|
|
@@ -6440,22 +6441,83 @@ var InlineEditingControl = createControl(
|
|
|
6440
6441
|
}
|
|
6441
6442
|
);
|
|
6442
6443
|
|
|
6443
|
-
// src/components/
|
|
6444
|
+
// src/components/promotions/display-conditions-control.tsx
|
|
6444
6445
|
var React100 = __toESM(require("react"));
|
|
6446
|
+
var import_react54 = require("react");
|
|
6447
|
+
var import_editor_ui13 = require("@elementor/editor-ui");
|
|
6445
6448
|
var import_icons33 = require("@elementor/icons");
|
|
6446
6449
|
var import_ui86 = require("@elementor/ui");
|
|
6447
|
-
var
|
|
6450
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
6451
|
+
var ARIA_LABEL = (0, import_i18n50.__)("Display Conditions", "elementor");
|
|
6452
|
+
function getDisplayConditionPromotion() {
|
|
6453
|
+
return window.elementor?.config?.v4Promotions?.displayConditions;
|
|
6454
|
+
}
|
|
6455
|
+
var DisplayConditionsControl = createControl(() => {
|
|
6456
|
+
const [isInfotipOpen, setIsInfotipOpen] = (0, import_react54.useState)(false);
|
|
6457
|
+
const promotion = getDisplayConditionPromotion();
|
|
6458
|
+
return /* @__PURE__ */ React100.createElement(
|
|
6459
|
+
import_ui86.Stack,
|
|
6460
|
+
{
|
|
6461
|
+
direction: "row",
|
|
6462
|
+
spacing: 2,
|
|
6463
|
+
sx: {
|
|
6464
|
+
justifyContent: "flex-end",
|
|
6465
|
+
alignItems: "center"
|
|
6466
|
+
}
|
|
6467
|
+
},
|
|
6468
|
+
/* @__PURE__ */ React100.createElement(
|
|
6469
|
+
import_editor_ui13.PromotionInfotip,
|
|
6470
|
+
{
|
|
6471
|
+
title: promotion?.title ?? "",
|
|
6472
|
+
content: promotion?.content ?? "",
|
|
6473
|
+
assetUrl: promotion?.image ?? "",
|
|
6474
|
+
ctaUrl: promotion?.ctaUrl ?? "",
|
|
6475
|
+
open: isInfotipOpen,
|
|
6476
|
+
onClose: () => setIsInfotipOpen(false)
|
|
6477
|
+
},
|
|
6478
|
+
/* @__PURE__ */ React100.createElement(
|
|
6479
|
+
import_ui86.Box,
|
|
6480
|
+
{
|
|
6481
|
+
onClick: () => setIsInfotipOpen((prev) => !prev),
|
|
6482
|
+
sx: { cursor: "pointer", display: "inline-flex" }
|
|
6483
|
+
},
|
|
6484
|
+
/* @__PURE__ */ React100.createElement(import_editor_ui13.PromotionChip, null)
|
|
6485
|
+
)
|
|
6486
|
+
),
|
|
6487
|
+
/* @__PURE__ */ React100.createElement(import_ui86.Tooltip, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React100.createElement(
|
|
6488
|
+
import_ui86.IconButton,
|
|
6489
|
+
{
|
|
6490
|
+
size: "tiny",
|
|
6491
|
+
"aria-label": ARIA_LABEL,
|
|
6492
|
+
"data-behavior": "display-conditions",
|
|
6493
|
+
onClick: () => setIsInfotipOpen((prev) => !prev),
|
|
6494
|
+
sx: {
|
|
6495
|
+
border: "1px solid",
|
|
6496
|
+
borderColor: "divider",
|
|
6497
|
+
borderRadius: 1
|
|
6498
|
+
}
|
|
6499
|
+
},
|
|
6500
|
+
/* @__PURE__ */ React100.createElement(import_icons33.SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
6501
|
+
))
|
|
6502
|
+
);
|
|
6503
|
+
});
|
|
6504
|
+
|
|
6505
|
+
// src/components/icon-buttons/clear-icon-button.tsx
|
|
6506
|
+
var React101 = __toESM(require("react"));
|
|
6507
|
+
var import_icons34 = require("@elementor/icons");
|
|
6508
|
+
var import_ui87 = require("@elementor/ui");
|
|
6509
|
+
var CustomIconButton = (0, import_ui87.styled)(import_ui87.IconButton)(({ theme }) => ({
|
|
6448
6510
|
width: theme.spacing(2.5),
|
|
6449
6511
|
height: theme.spacing(2.5)
|
|
6450
6512
|
}));
|
|
6451
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
6513
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React101.createElement(import_ui87.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React101.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React101.createElement(import_icons34.BrushBigIcon, { fontSize: size })));
|
|
6452
6514
|
|
|
6453
6515
|
// src/components/repeater/repeater.tsx
|
|
6454
|
-
var
|
|
6455
|
-
var
|
|
6456
|
-
var
|
|
6457
|
-
var
|
|
6458
|
-
var
|
|
6516
|
+
var React102 = __toESM(require("react"));
|
|
6517
|
+
var import_react55 = require("react");
|
|
6518
|
+
var import_icons35 = require("@elementor/icons");
|
|
6519
|
+
var import_ui88 = require("@elementor/ui");
|
|
6520
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
6459
6521
|
var SIZE9 = "tiny";
|
|
6460
6522
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
6461
6523
|
var Repeater3 = ({
|
|
@@ -6473,7 +6535,7 @@ var Repeater3 = ({
|
|
|
6473
6535
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
|
|
6474
6536
|
isSortable = true
|
|
6475
6537
|
}) => {
|
|
6476
|
-
const [openItem, setOpenItem] = (0,
|
|
6538
|
+
const [openItem, setOpenItem] = (0, import_react55.useState)(initialOpenItem);
|
|
6477
6539
|
const uniqueKeys = items2.map(
|
|
6478
6540
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
6479
6541
|
);
|
|
@@ -6536,8 +6598,8 @@ var Repeater3 = ({
|
|
|
6536
6598
|
};
|
|
6537
6599
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
6538
6600
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
6539
|
-
const addButton = /* @__PURE__ */
|
|
6540
|
-
|
|
6601
|
+
const addButton = /* @__PURE__ */ React102.createElement(
|
|
6602
|
+
import_ui88.IconButton,
|
|
6541
6603
|
{
|
|
6542
6604
|
size: SIZE9,
|
|
6543
6605
|
sx: {
|
|
@@ -6545,32 +6607,32 @@ var Repeater3 = ({
|
|
|
6545
6607
|
},
|
|
6546
6608
|
disabled: isButtonDisabled,
|
|
6547
6609
|
onClick: addRepeaterItem,
|
|
6548
|
-
"aria-label": (0,
|
|
6610
|
+
"aria-label": (0, import_i18n51.__)("Add item", "elementor")
|
|
6549
6611
|
},
|
|
6550
|
-
/* @__PURE__ */
|
|
6612
|
+
/* @__PURE__ */ React102.createElement(import_icons35.PlusIcon, { fontSize: SIZE9 })
|
|
6551
6613
|
);
|
|
6552
|
-
return /* @__PURE__ */
|
|
6553
|
-
|
|
6614
|
+
return /* @__PURE__ */ React102.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React102.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React102.createElement(
|
|
6615
|
+
import_ui88.Infotip,
|
|
6554
6616
|
{
|
|
6555
6617
|
placement: "right",
|
|
6556
6618
|
content: addButtonInfotipContent,
|
|
6557
6619
|
color: "secondary",
|
|
6558
6620
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
6559
6621
|
},
|
|
6560
|
-
/* @__PURE__ */
|
|
6561
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
6622
|
+
/* @__PURE__ */ React102.createElement(import_ui88.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
6623
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React102.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
6562
6624
|
const index = uniqueKeys.indexOf(key);
|
|
6563
6625
|
const value = items2[index];
|
|
6564
6626
|
if (!value) {
|
|
6565
6627
|
return null;
|
|
6566
6628
|
}
|
|
6567
|
-
return /* @__PURE__ */
|
|
6629
|
+
return /* @__PURE__ */ React102.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React102.createElement(
|
|
6568
6630
|
RepeaterItem,
|
|
6569
6631
|
{
|
|
6570
6632
|
disabled,
|
|
6571
6633
|
propDisabled: value?.disabled,
|
|
6572
|
-
label: /* @__PURE__ */
|
|
6573
|
-
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 })),
|
|
6574
6636
|
removeItem: () => removeRepeaterItem(index),
|
|
6575
6637
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
6576
6638
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -6582,7 +6644,7 @@ var Repeater3 = ({
|
|
|
6582
6644
|
actions: itemSettings.actions,
|
|
6583
6645
|
value
|
|
6584
6646
|
},
|
|
6585
|
-
(props) => /* @__PURE__ */
|
|
6647
|
+
(props) => /* @__PURE__ */ React102.createElement(
|
|
6586
6648
|
itemSettings.Content,
|
|
6587
6649
|
{
|
|
6588
6650
|
...props,
|
|
@@ -6612,27 +6674,27 @@ var RepeaterItem = ({
|
|
|
6612
6674
|
value
|
|
6613
6675
|
}) => {
|
|
6614
6676
|
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
|
|
6615
|
-
const duplicateLabel = (0,
|
|
6616
|
-
const toggleLabel = propDisabled ? (0,
|
|
6617
|
-
const removeLabel = (0,
|
|
6618
|
-
return /* @__PURE__ */
|
|
6677
|
+
const duplicateLabel = (0, import_i18n51.__)("Duplicate", "elementor");
|
|
6678
|
+
const toggleLabel = propDisabled ? (0, import_i18n51.__)("Show", "elementor") : (0, import_i18n51.__)("Hide", "elementor");
|
|
6679
|
+
const removeLabel = (0, import_i18n51.__)("Remove", "elementor");
|
|
6680
|
+
return /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(
|
|
6619
6681
|
RepeaterTag,
|
|
6620
6682
|
{
|
|
6621
6683
|
disabled,
|
|
6622
6684
|
label,
|
|
6623
6685
|
ref: setRef,
|
|
6624
|
-
"aria-label": (0,
|
|
6625
|
-
...(0,
|
|
6686
|
+
"aria-label": (0, import_i18n51.__)("Open item", "elementor"),
|
|
6687
|
+
...(0, import_ui88.bindTrigger)(popoverState),
|
|
6626
6688
|
startIcon,
|
|
6627
|
-
actions: /* @__PURE__ */
|
|
6689
|
+
actions: /* @__PURE__ */ React102.createElement(React102.Fragment, null, showDuplicate && /* @__PURE__ */ React102.createElement(import_ui88.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(import_ui88.IconButton, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React102.createElement(import_icons35.CopyIcon, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React102.createElement(import_ui88.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(import_ui88.IconButton, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React102.createElement(import_icons35.EyeOffIcon, { fontSize: SIZE9 }) : /* @__PURE__ */ React102.createElement(import_icons35.EyeIcon, { fontSize: SIZE9 }))), actions?.(value), showRemove && /* @__PURE__ */ React102.createElement(import_ui88.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(import_ui88.IconButton, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React102.createElement(import_icons35.XIcon, { fontSize: SIZE9 }))))
|
|
6628
6690
|
}
|
|
6629
|
-
), /* @__PURE__ */
|
|
6691
|
+
), /* @__PURE__ */ React102.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React102.createElement(import_ui88.Box, null, children({ anchorEl: ref }))));
|
|
6630
6692
|
};
|
|
6631
6693
|
var usePopover = (openOnMount, onOpen) => {
|
|
6632
|
-
const [ref, setRef] = (0,
|
|
6633
|
-
const popoverState = (0,
|
|
6634
|
-
const popoverProps = (0,
|
|
6635
|
-
(0,
|
|
6694
|
+
const [ref, setRef] = (0, import_react55.useState)(null);
|
|
6695
|
+
const popoverState = (0, import_ui88.usePopupState)({ variant: "popover" });
|
|
6696
|
+
const popoverProps = (0, import_ui88.bindPopover)(popoverState);
|
|
6697
|
+
(0, import_react55.useEffect)(() => {
|
|
6636
6698
|
if (openOnMount && ref) {
|
|
6637
6699
|
popoverState.open(ref);
|
|
6638
6700
|
onOpen?.();
|
|
@@ -6647,20 +6709,20 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
6647
6709
|
};
|
|
6648
6710
|
|
|
6649
6711
|
// src/components/inline-editor-toolbar.tsx
|
|
6712
|
+
var React104 = __toESM(require("react"));
|
|
6713
|
+
var import_react57 = require("react");
|
|
6714
|
+
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
6715
|
+
var import_icons37 = require("@elementor/icons");
|
|
6716
|
+
var import_ui90 = require("@elementor/ui");
|
|
6717
|
+
var import_react58 = require("@tiptap/react");
|
|
6718
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
6719
|
+
|
|
6720
|
+
// src/components/url-popover.tsx
|
|
6650
6721
|
var React103 = __toESM(require("react"));
|
|
6651
6722
|
var import_react56 = require("react");
|
|
6652
|
-
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
6653
6723
|
var import_icons36 = require("@elementor/icons");
|
|
6654
6724
|
var import_ui89 = require("@elementor/ui");
|
|
6655
|
-
var import_react57 = require("@tiptap/react");
|
|
6656
6725
|
var import_i18n52 = require("@wordpress/i18n");
|
|
6657
|
-
|
|
6658
|
-
// src/components/url-popover.tsx
|
|
6659
|
-
var React102 = __toESM(require("react"));
|
|
6660
|
-
var import_react55 = require("react");
|
|
6661
|
-
var import_icons35 = require("@elementor/icons");
|
|
6662
|
-
var import_ui88 = require("@elementor/ui");
|
|
6663
|
-
var import_i18n51 = require("@wordpress/i18n");
|
|
6664
6726
|
var UrlPopover = ({
|
|
6665
6727
|
popupState,
|
|
6666
6728
|
restoreValue,
|
|
@@ -6670,8 +6732,8 @@ var UrlPopover = ({
|
|
|
6670
6732
|
openInNewTab,
|
|
6671
6733
|
onToggleNewTab
|
|
6672
6734
|
}) => {
|
|
6673
|
-
const inputRef = (0,
|
|
6674
|
-
(0,
|
|
6735
|
+
const inputRef = (0, import_react56.useRef)(null);
|
|
6736
|
+
(0, import_react56.useEffect)(() => {
|
|
6675
6737
|
if (popupState.isOpen) {
|
|
6676
6738
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
6677
6739
|
}
|
|
@@ -6680,57 +6742,57 @@ var UrlPopover = ({
|
|
|
6680
6742
|
restoreValue();
|
|
6681
6743
|
popupState.close();
|
|
6682
6744
|
};
|
|
6683
|
-
return /* @__PURE__ */
|
|
6684
|
-
|
|
6745
|
+
return /* @__PURE__ */ React103.createElement(
|
|
6746
|
+
import_ui89.Popover,
|
|
6685
6747
|
{
|
|
6686
6748
|
slotProps: {
|
|
6687
6749
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
6688
6750
|
},
|
|
6689
|
-
...(0,
|
|
6751
|
+
...(0, import_ui89.bindPopover)(popupState),
|
|
6690
6752
|
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
6691
6753
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6692
6754
|
onClose: handleClose
|
|
6693
6755
|
},
|
|
6694
|
-
/* @__PURE__ */
|
|
6695
|
-
|
|
6756
|
+
/* @__PURE__ */ React103.createElement(import_ui89.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React103.createElement(
|
|
6757
|
+
import_ui89.TextField,
|
|
6696
6758
|
{
|
|
6697
6759
|
value,
|
|
6698
6760
|
onChange,
|
|
6699
6761
|
size: "tiny",
|
|
6700
6762
|
fullWidth: true,
|
|
6701
|
-
placeholder: (0,
|
|
6763
|
+
placeholder: (0, import_i18n52.__)("Type a URL", "elementor"),
|
|
6702
6764
|
inputProps: { ref: inputRef },
|
|
6703
6765
|
color: "secondary",
|
|
6704
6766
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
6705
6767
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
6706
6768
|
}
|
|
6707
|
-
), /* @__PURE__ */
|
|
6708
|
-
|
|
6769
|
+
), /* @__PURE__ */ React103.createElement(import_ui89.Tooltip, { title: (0, import_i18n52.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React103.createElement(
|
|
6770
|
+
import_ui89.ToggleButton,
|
|
6709
6771
|
{
|
|
6710
6772
|
size: "tiny",
|
|
6711
6773
|
value: "newTab",
|
|
6712
6774
|
selected: openInNewTab,
|
|
6713
6775
|
onClick: onToggleNewTab,
|
|
6714
|
-
"aria-label": (0,
|
|
6776
|
+
"aria-label": (0, import_i18n52.__)("Open in a new tab", "elementor"),
|
|
6715
6777
|
sx: { borderRadius: "8px" }
|
|
6716
6778
|
},
|
|
6717
|
-
/* @__PURE__ */
|
|
6779
|
+
/* @__PURE__ */ React103.createElement(import_icons36.ExternalLinkIcon, { fontSize: "tiny" })
|
|
6718
6780
|
)))
|
|
6719
6781
|
);
|
|
6720
6782
|
};
|
|
6721
6783
|
|
|
6722
6784
|
// src/components/inline-editor-toolbar.tsx
|
|
6723
6785
|
var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
6724
|
-
const [urlValue, setUrlValue] = (0,
|
|
6725
|
-
const [openInNewTab, setOpenInNewTab] = (0,
|
|
6726
|
-
const toolbarRef = (0,
|
|
6727
|
-
const linkPopupState = (0,
|
|
6786
|
+
const [urlValue, setUrlValue] = (0, import_react57.useState)("");
|
|
6787
|
+
const [openInNewTab, setOpenInNewTab] = (0, import_react57.useState)(false);
|
|
6788
|
+
const toolbarRef = (0, import_react57.useRef)(null);
|
|
6789
|
+
const linkPopupState = (0, import_ui90.usePopupState)({ variant: "popover" });
|
|
6728
6790
|
const hasLinkOnElement = elementId ? checkIfElementHasLink(elementId) : false;
|
|
6729
|
-
const editorState = (0,
|
|
6791
|
+
const editorState = (0, import_react58.useEditorState)({
|
|
6730
6792
|
editor,
|
|
6731
6793
|
selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
|
|
6732
6794
|
});
|
|
6733
|
-
const formatButtonsList = (0,
|
|
6795
|
+
const formatButtonsList = (0, import_react57.useMemo)(() => {
|
|
6734
6796
|
const buttons = Object.values(formatButtons);
|
|
6735
6797
|
if (hasLinkOnElement) {
|
|
6736
6798
|
return buttons.filter((button) => button.action !== "link");
|
|
@@ -6767,11 +6829,11 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6767
6829
|
}
|
|
6768
6830
|
linkPopupState.close();
|
|
6769
6831
|
};
|
|
6770
|
-
|
|
6832
|
+
React104.useEffect(() => {
|
|
6771
6833
|
editor?.commands?.focus();
|
|
6772
6834
|
}, [editor]);
|
|
6773
|
-
return /* @__PURE__ */
|
|
6774
|
-
|
|
6835
|
+
return /* @__PURE__ */ React104.createElement(
|
|
6836
|
+
import_ui90.Box,
|
|
6775
6837
|
{
|
|
6776
6838
|
ref: toolbarRef,
|
|
6777
6839
|
sx: {
|
|
@@ -6787,9 +6849,9 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6787
6849
|
...sx
|
|
6788
6850
|
}
|
|
6789
6851
|
},
|
|
6790
|
-
/* @__PURE__ */
|
|
6791
|
-
/* @__PURE__ */
|
|
6792
|
-
|
|
6852
|
+
/* @__PURE__ */ React104.createElement(import_ui90.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React104.createElement(import_ui90.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
6853
|
+
/* @__PURE__ */ React104.createElement(
|
|
6854
|
+
import_ui90.ToggleButtonGroup,
|
|
6793
6855
|
{
|
|
6794
6856
|
value: editorState,
|
|
6795
6857
|
size: "tiny",
|
|
@@ -6797,7 +6859,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6797
6859
|
display: "flex",
|
|
6798
6860
|
gap: 0.5,
|
|
6799
6861
|
border: "none",
|
|
6800
|
-
[`& .${
|
|
6862
|
+
[`& .${import_ui90.toggleButtonGroupClasses.firstButton}, & .${import_ui90.toggleButtonGroupClasses.middleButton}, & .${import_ui90.toggleButtonGroupClasses.lastButton}`]: {
|
|
6801
6863
|
borderRadius: "8px",
|
|
6802
6864
|
border: "none",
|
|
6803
6865
|
marginLeft: 0,
|
|
@@ -6810,8 +6872,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6810
6872
|
}
|
|
6811
6873
|
}
|
|
6812
6874
|
},
|
|
6813
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
6814
|
-
|
|
6875
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React104.createElement(import_ui90.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React104.createElement(
|
|
6876
|
+
import_ui90.ToggleButton,
|
|
6815
6877
|
{
|
|
6816
6878
|
value: button.action,
|
|
6817
6879
|
"aria-label": button.label,
|
|
@@ -6828,7 +6890,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6828
6890
|
button.icon
|
|
6829
6891
|
)))
|
|
6830
6892
|
),
|
|
6831
|
-
/* @__PURE__ */
|
|
6893
|
+
/* @__PURE__ */ React104.createElement(
|
|
6832
6894
|
UrlPopover,
|
|
6833
6895
|
{
|
|
6834
6896
|
popupState: linkPopupState,
|
|
@@ -6845,64 +6907,64 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
6845
6907
|
var checkIfElementHasLink = (elementId) => !!(0, import_editor_elements6.getElementSetting)(elementId, "link")?.value?.destination;
|
|
6846
6908
|
var toolbarButtons = {
|
|
6847
6909
|
clear: {
|
|
6848
|
-
label: (0,
|
|
6849
|
-
icon: /* @__PURE__ */
|
|
6910
|
+
label: (0, import_i18n53.__)("Clear", "elementor"),
|
|
6911
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.MinusIcon, { fontSize: "tiny" }),
|
|
6850
6912
|
action: "clear",
|
|
6851
6913
|
method: (editor) => {
|
|
6852
6914
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
6853
6915
|
}
|
|
6854
6916
|
},
|
|
6855
6917
|
bold: {
|
|
6856
|
-
label: (0,
|
|
6857
|
-
icon: /* @__PURE__ */
|
|
6918
|
+
label: (0, import_i18n53.__)("Bold", "elementor"),
|
|
6919
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.BoldIcon, { fontSize: "tiny" }),
|
|
6858
6920
|
action: "bold",
|
|
6859
6921
|
method: (editor) => {
|
|
6860
6922
|
editor.chain().focus().toggleBold().run();
|
|
6861
6923
|
}
|
|
6862
6924
|
},
|
|
6863
6925
|
italic: {
|
|
6864
|
-
label: (0,
|
|
6865
|
-
icon: /* @__PURE__ */
|
|
6926
|
+
label: (0, import_i18n53.__)("Italic", "elementor"),
|
|
6927
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.ItalicIcon, { fontSize: "tiny" }),
|
|
6866
6928
|
action: "italic",
|
|
6867
6929
|
method: (editor) => {
|
|
6868
6930
|
editor.chain().focus().toggleItalic().run();
|
|
6869
6931
|
}
|
|
6870
6932
|
},
|
|
6871
6933
|
underline: {
|
|
6872
|
-
label: (0,
|
|
6873
|
-
icon: /* @__PURE__ */
|
|
6934
|
+
label: (0, import_i18n53.__)("Underline", "elementor"),
|
|
6935
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.UnderlineIcon, { fontSize: "tiny" }),
|
|
6874
6936
|
action: "underline",
|
|
6875
6937
|
method: (editor) => {
|
|
6876
6938
|
editor.chain().focus().toggleUnderline().run();
|
|
6877
6939
|
}
|
|
6878
6940
|
},
|
|
6879
6941
|
strike: {
|
|
6880
|
-
label: (0,
|
|
6881
|
-
icon: /* @__PURE__ */
|
|
6942
|
+
label: (0, import_i18n53.__)("Strikethrough", "elementor"),
|
|
6943
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.StrikethroughIcon, { fontSize: "tiny" }),
|
|
6882
6944
|
action: "strike",
|
|
6883
6945
|
method: (editor) => {
|
|
6884
6946
|
editor.chain().focus().toggleStrike().run();
|
|
6885
6947
|
}
|
|
6886
6948
|
},
|
|
6887
6949
|
superscript: {
|
|
6888
|
-
label: (0,
|
|
6889
|
-
icon: /* @__PURE__ */
|
|
6950
|
+
label: (0, import_i18n53.__)("Superscript", "elementor"),
|
|
6951
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.SuperscriptIcon, { fontSize: "tiny" }),
|
|
6890
6952
|
action: "superscript",
|
|
6891
6953
|
method: (editor) => {
|
|
6892
6954
|
editor.chain().focus().toggleSuperscript().run();
|
|
6893
6955
|
}
|
|
6894
6956
|
},
|
|
6895
6957
|
subscript: {
|
|
6896
|
-
label: (0,
|
|
6897
|
-
icon: /* @__PURE__ */
|
|
6958
|
+
label: (0, import_i18n53.__)("Subscript", "elementor"),
|
|
6959
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.SubscriptIcon, { fontSize: "tiny" }),
|
|
6898
6960
|
action: "subscript",
|
|
6899
6961
|
method: (editor) => {
|
|
6900
6962
|
editor.chain().focus().toggleSubscript().run();
|
|
6901
6963
|
}
|
|
6902
6964
|
},
|
|
6903
6965
|
link: {
|
|
6904
|
-
label: (0,
|
|
6905
|
-
icon: /* @__PURE__ */
|
|
6966
|
+
label: (0, import_i18n53.__)("Link", "elementor"),
|
|
6967
|
+
icon: /* @__PURE__ */ React104.createElement(import_icons37.LinkIcon, { fontSize: "tiny" }),
|
|
6906
6968
|
action: "link",
|
|
6907
6969
|
method: null
|
|
6908
6970
|
}
|
|
@@ -6911,8 +6973,8 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
|
6911
6973
|
var possibleFormats = Object.keys(formatButtons);
|
|
6912
6974
|
|
|
6913
6975
|
// src/components/size/unstable-size-field.tsx
|
|
6914
|
-
var
|
|
6915
|
-
var
|
|
6976
|
+
var React107 = __toESM(require("react"));
|
|
6977
|
+
var import_ui92 = require("@elementor/ui");
|
|
6916
6978
|
|
|
6917
6979
|
// src/hooks/use-size-value.ts
|
|
6918
6980
|
var useSizeValue = (externalValue, onChange, defaultValue) => {
|
|
@@ -6952,26 +7014,26 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
6952
7014
|
};
|
|
6953
7015
|
|
|
6954
7016
|
// src/components/size/unit-select.tsx
|
|
6955
|
-
var
|
|
6956
|
-
var
|
|
6957
|
-
var
|
|
6958
|
-
var
|
|
7017
|
+
var React105 = __toESM(require("react"));
|
|
7018
|
+
var import_react59 = require("react");
|
|
7019
|
+
var import_editor_ui14 = require("@elementor/editor-ui");
|
|
7020
|
+
var import_ui91 = require("@elementor/ui");
|
|
6959
7021
|
var menuItemContentStyles = {
|
|
6960
7022
|
display: "flex",
|
|
6961
7023
|
flexDirection: "column",
|
|
6962
7024
|
justifyContent: "center"
|
|
6963
7025
|
};
|
|
6964
7026
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
6965
|
-
const popupState = (0,
|
|
7027
|
+
const popupState = (0, import_ui91.usePopupState)({
|
|
6966
7028
|
variant: "popover",
|
|
6967
|
-
popupId: (0,
|
|
7029
|
+
popupId: (0, import_react59.useId)()
|
|
6968
7030
|
});
|
|
6969
7031
|
const handleMenuItemClick = (index) => {
|
|
6970
7032
|
onClick(options[index]);
|
|
6971
7033
|
popupState.close();
|
|
6972
7034
|
};
|
|
6973
|
-
return /* @__PURE__ */
|
|
6974
|
-
|
|
7035
|
+
return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(StyledButton2, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui91.bindTrigger)(popupState) }, value), /* @__PURE__ */ React105.createElement(import_ui91.Menu, { MenuListProps: { dense: true }, ...(0, import_ui91.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React105.createElement(
|
|
7036
|
+
import_editor_ui14.MenuListItem,
|
|
6975
7037
|
{
|
|
6976
7038
|
key: option,
|
|
6977
7039
|
onClick: () => handleMenuItemClick(index),
|
|
@@ -6989,7 +7051,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
6989
7051
|
option.toUpperCase()
|
|
6990
7052
|
))));
|
|
6991
7053
|
};
|
|
6992
|
-
var StyledButton2 = (0,
|
|
7054
|
+
var StyledButton2 = (0, import_ui91.styled)(import_ui91.Button, {
|
|
6993
7055
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
6994
7056
|
})(({ isPrimaryColor, theme }) => ({
|
|
6995
7057
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -6999,11 +7061,11 @@ var StyledButton2 = (0, import_ui90.styled)(import_ui90.Button, {
|
|
|
6999
7061
|
}));
|
|
7000
7062
|
|
|
7001
7063
|
// src/components/size/unstable-size-input.tsx
|
|
7002
|
-
var
|
|
7003
|
-
var
|
|
7004
|
-
var UnstableSizeInput = (0,
|
|
7064
|
+
var React106 = __toESM(require("react"));
|
|
7065
|
+
var import_react60 = require("react");
|
|
7066
|
+
var UnstableSizeInput = (0, import_react60.forwardRef)(
|
|
7005
7067
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
7006
|
-
return /* @__PURE__ */
|
|
7068
|
+
return /* @__PURE__ */ React106.createElement(
|
|
7007
7069
|
NumberInput,
|
|
7008
7070
|
{
|
|
7009
7071
|
ref,
|
|
@@ -7047,7 +7109,7 @@ var UnstableSizeField = ({
|
|
|
7047
7109
|
const shouldHighlightUnit = () => {
|
|
7048
7110
|
return hasValue(size);
|
|
7049
7111
|
};
|
|
7050
|
-
return /* @__PURE__ */
|
|
7112
|
+
return /* @__PURE__ */ React107.createElement(
|
|
7051
7113
|
UnstableSizeInput,
|
|
7052
7114
|
{
|
|
7053
7115
|
type: "number",
|
|
@@ -7056,7 +7118,7 @@ var UnstableSizeField = ({
|
|
|
7056
7118
|
onChange: (event) => setSize(event.target.value),
|
|
7057
7119
|
InputProps: {
|
|
7058
7120
|
...InputProps,
|
|
7059
|
-
endAdornment: /* @__PURE__ */
|
|
7121
|
+
endAdornment: /* @__PURE__ */ React107.createElement(import_ui92.InputAdornment, { position: "end" }, /* @__PURE__ */ React107.createElement(
|
|
7060
7122
|
UnitSelect,
|
|
7061
7123
|
{
|
|
7062
7124
|
options: units2,
|
|
@@ -7074,13 +7136,13 @@ var hasValue = (value) => {
|
|
|
7074
7136
|
};
|
|
7075
7137
|
|
|
7076
7138
|
// src/hooks/use-font-families.ts
|
|
7077
|
-
var
|
|
7139
|
+
var import_react61 = require("react");
|
|
7078
7140
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
7079
|
-
var
|
|
7141
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
7080
7142
|
var supportedCategories = {
|
|
7081
|
-
system: (0,
|
|
7082
|
-
custom: (0,
|
|
7083
|
-
googlefonts: (0,
|
|
7143
|
+
system: (0, import_i18n54.__)("System", "elementor"),
|
|
7144
|
+
custom: (0, import_i18n54.__)("Custom Fonts", "elementor"),
|
|
7145
|
+
googlefonts: (0, import_i18n54.__)("Google Fonts", "elementor")
|
|
7084
7146
|
};
|
|
7085
7147
|
var getFontFamilies = () => {
|
|
7086
7148
|
const { controls } = (0, import_editor_v1_adapters.getElementorConfig)();
|
|
@@ -7092,7 +7154,7 @@ var getFontFamilies = () => {
|
|
|
7092
7154
|
};
|
|
7093
7155
|
var useFontFamilies = () => {
|
|
7094
7156
|
const fontFamilies = getFontFamilies();
|
|
7095
|
-
return (0,
|
|
7157
|
+
return (0, import_react61.useMemo)(() => {
|
|
7096
7158
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
7097
7159
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
7098
7160
|
if (!supportedCategories[category]) {
|
|
@@ -7124,6 +7186,7 @@ var useFontFamilies = () => {
|
|
|
7124
7186
|
ControlReplacementsProvider,
|
|
7125
7187
|
ControlToggleButtonGroup,
|
|
7126
7188
|
DateTimeControl,
|
|
7189
|
+
DisplayConditionsControl,
|
|
7127
7190
|
EqualUnequalSizesControl,
|
|
7128
7191
|
FilterRepeaterControl,
|
|
7129
7192
|
FontFamilyControl,
|