@elementor/editor-controls 4.4.0-1086 → 4.4.0-1088
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 +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +148 -85
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +109 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/notice-control.tsx +105 -0
- package/src/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -9699,8 +9699,69 @@ var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
|
9699
9699
|
))));
|
|
9700
9700
|
});
|
|
9701
9701
|
|
|
9702
|
-
// src/controls/
|
|
9702
|
+
// src/controls/notice-control.tsx
|
|
9703
9703
|
import * as React128 from "react";
|
|
9704
|
+
import { useState as useState23 } from "react";
|
|
9705
|
+
import { ajax } from "@elementor/editor-v1-adapters";
|
|
9706
|
+
import { BulbIcon } from "@elementor/icons";
|
|
9707
|
+
import { Alert as Alert3, AlertAction as AlertAction2, AlertTitle as AlertTitle4, styled as styled13, Typography as Typography12 } from "@elementor/ui";
|
|
9708
|
+
var NoticeTitle = styled13(AlertTitle4)({
|
|
9709
|
+
"&.MuiAlertTitle-root.MuiAlertTitle-root": {
|
|
9710
|
+
marginBottom: 4,
|
|
9711
|
+
fontStyle: "italic"
|
|
9712
|
+
}
|
|
9713
|
+
});
|
|
9714
|
+
var markNoticeAsDismissedInSession = (dismissId) => {
|
|
9715
|
+
const dismissedNotices = window.elementor?.config?.user?.dismissed_editor_notices;
|
|
9716
|
+
if (dismissedNotices && !dismissedNotices.includes(dismissId)) {
|
|
9717
|
+
dismissedNotices.push(dismissId);
|
|
9718
|
+
}
|
|
9719
|
+
};
|
|
9720
|
+
var NoticeControl = createControl(
|
|
9721
|
+
({ noticeType = "info", heading, content, dismissible, buttonText, buttonUrl }) => {
|
|
9722
|
+
const [isDismissed, setIsDismissed] = useState23(false);
|
|
9723
|
+
if (isDismissed || !content) {
|
|
9724
|
+
return null;
|
|
9725
|
+
}
|
|
9726
|
+
const severity = noticeType === "danger" ? "error" : noticeType;
|
|
9727
|
+
const icon = noticeType === "info" ? /* @__PURE__ */ React128.createElement(BulbIcon, { fontSize: "inherit" }) : void 0;
|
|
9728
|
+
const handleDismiss = () => {
|
|
9729
|
+
setIsDismissed(true);
|
|
9730
|
+
if (!dismissible) {
|
|
9731
|
+
return;
|
|
9732
|
+
}
|
|
9733
|
+
markNoticeAsDismissedInSession(dismissible);
|
|
9734
|
+
ajax.load({
|
|
9735
|
+
action: "dismissed_editor_notices",
|
|
9736
|
+
unique_id: `dismiss-editor-notice-${dismissible}`,
|
|
9737
|
+
data: { dismissId: dismissible }
|
|
9738
|
+
}).catch(() => {
|
|
9739
|
+
});
|
|
9740
|
+
};
|
|
9741
|
+
const handleActionClick = () => {
|
|
9742
|
+
setIsDismissed(true);
|
|
9743
|
+
if (dismissible) {
|
|
9744
|
+
markNoticeAsDismissedInSession(dismissible);
|
|
9745
|
+
}
|
|
9746
|
+
};
|
|
9747
|
+
return /* @__PURE__ */ React128.createElement(Alert3, { variant: "outlined", severity, icon, size: "small", onClose: handleDismiss }, heading && /* @__PURE__ */ React128.createElement(NoticeTitle, null, heading), /* @__PURE__ */ React128.createElement(Typography12, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content), buttonText && buttonUrl && /* @__PURE__ */ React128.createElement(
|
|
9748
|
+
AlertAction2,
|
|
9749
|
+
{
|
|
9750
|
+
variant: "contained",
|
|
9751
|
+
color: severity,
|
|
9752
|
+
target: "_blank",
|
|
9753
|
+
rel: "noopener noreferrer",
|
|
9754
|
+
href: buttonUrl,
|
|
9755
|
+
onClick: handleActionClick,
|
|
9756
|
+
sx: { mt: 2 }
|
|
9757
|
+
},
|
|
9758
|
+
buttonText
|
|
9759
|
+
));
|
|
9760
|
+
}
|
|
9761
|
+
);
|
|
9762
|
+
|
|
9763
|
+
// src/controls/grid-span-control.tsx
|
|
9764
|
+
import * as React129 from "react";
|
|
9704
9765
|
import { spanPropTypeUtil } from "@elementor/editor-props";
|
|
9705
9766
|
import { TextField as TextField13 } from "@elementor/ui";
|
|
9706
9767
|
var GridSpanControl = createControl(
|
|
@@ -9719,7 +9780,7 @@ var GridSpanControl = createControl(
|
|
|
9719
9780
|
setValue(next === "" ? null : next);
|
|
9720
9781
|
};
|
|
9721
9782
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
9722
|
-
return /* @__PURE__ */
|
|
9783
|
+
return /* @__PURE__ */ React129.createElement(ControlActions, null, /* @__PURE__ */ React129.createElement(
|
|
9723
9784
|
TextField13,
|
|
9724
9785
|
{
|
|
9725
9786
|
size: "tiny",
|
|
@@ -9740,15 +9801,15 @@ var GridSpanControl = createControl(
|
|
|
9740
9801
|
);
|
|
9741
9802
|
|
|
9742
9803
|
// src/components/promotions/display-conditions-control.tsx
|
|
9743
|
-
import * as
|
|
9804
|
+
import * as React131 from "react";
|
|
9744
9805
|
import { useRef as useRef32 } from "react";
|
|
9745
9806
|
import { SitemapIcon } from "@elementor/icons";
|
|
9746
9807
|
import { IconButton as IconButton10, Stack as Stack25, Tooltip as Tooltip12 } from "@elementor/ui";
|
|
9747
9808
|
import { __ as __66 } from "@wordpress/i18n";
|
|
9748
9809
|
|
|
9749
9810
|
// src/components/promotions/promotion-trigger.tsx
|
|
9750
|
-
import * as
|
|
9751
|
-
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as
|
|
9811
|
+
import * as React130 from "react";
|
|
9812
|
+
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState24 } from "react";
|
|
9752
9813
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
9753
9814
|
import { Box as Box33 } from "@elementor/ui";
|
|
9754
9815
|
function getV4Promotion(key) {
|
|
@@ -9756,7 +9817,7 @@ function getV4Promotion(key) {
|
|
|
9756
9817
|
}
|
|
9757
9818
|
var PromotionTrigger = forwardRef12(
|
|
9758
9819
|
({ promotionKey, children, trackingData }, ref) => {
|
|
9759
|
-
const [isOpen, setIsOpen] =
|
|
9820
|
+
const [isOpen, setIsOpen] = useState24(false);
|
|
9760
9821
|
const promotion = getV4Promotion(promotionKey);
|
|
9761
9822
|
const toggle = useCallback5(() => {
|
|
9762
9823
|
setIsOpen((prev) => {
|
|
@@ -9767,7 +9828,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9767
9828
|
});
|
|
9768
9829
|
}, [trackingData]);
|
|
9769
9830
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
9770
|
-
return /* @__PURE__ */
|
|
9831
|
+
return /* @__PURE__ */ React130.createElement(React130.Fragment, null, promotion && /* @__PURE__ */ React130.createElement(
|
|
9771
9832
|
PromotionInfotip,
|
|
9772
9833
|
{
|
|
9773
9834
|
title: promotion.title,
|
|
@@ -9781,7 +9842,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9781
9842
|
},
|
|
9782
9843
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
9783
9844
|
},
|
|
9784
|
-
/* @__PURE__ */
|
|
9845
|
+
/* @__PURE__ */ React130.createElement(
|
|
9785
9846
|
Box33,
|
|
9786
9847
|
{
|
|
9787
9848
|
onClick: (e) => {
|
|
@@ -9790,7 +9851,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9790
9851
|
},
|
|
9791
9852
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
9792
9853
|
},
|
|
9793
|
-
children ?? /* @__PURE__ */
|
|
9854
|
+
children ?? /* @__PURE__ */ React130.createElement(PromotionChip2, null)
|
|
9794
9855
|
)
|
|
9795
9856
|
));
|
|
9796
9857
|
}
|
|
@@ -9801,7 +9862,7 @@ var ARIA_LABEL = __66("Display Conditions", "elementor");
|
|
|
9801
9862
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
9802
9863
|
var DisplayConditionsControl = createControl(() => {
|
|
9803
9864
|
const triggerRef = useRef32(null);
|
|
9804
|
-
return /* @__PURE__ */
|
|
9865
|
+
return /* @__PURE__ */ React131.createElement(
|
|
9805
9866
|
Stack25,
|
|
9806
9867
|
{
|
|
9807
9868
|
direction: "row",
|
|
@@ -9811,8 +9872,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9811
9872
|
alignItems: "center"
|
|
9812
9873
|
}
|
|
9813
9874
|
},
|
|
9814
|
-
/* @__PURE__ */
|
|
9815
|
-
/* @__PURE__ */
|
|
9875
|
+
/* @__PURE__ */ React131.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
9876
|
+
/* @__PURE__ */ React131.createElement(Tooltip12, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React131.createElement(
|
|
9816
9877
|
IconButton10,
|
|
9817
9878
|
{
|
|
9818
9879
|
size: "tiny",
|
|
@@ -9825,13 +9886,13 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9825
9886
|
borderRadius: 1
|
|
9826
9887
|
}
|
|
9827
9888
|
},
|
|
9828
|
-
/* @__PURE__ */
|
|
9889
|
+
/* @__PURE__ */ React131.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
9829
9890
|
))
|
|
9830
9891
|
);
|
|
9831
9892
|
});
|
|
9832
9893
|
|
|
9833
9894
|
// src/components/promotions/attributes-control.tsx
|
|
9834
|
-
import * as
|
|
9895
|
+
import * as React132 from "react";
|
|
9835
9896
|
import { useRef as useRef33 } from "react";
|
|
9836
9897
|
import { PlusIcon as PlusIcon4 } from "@elementor/icons";
|
|
9837
9898
|
import { Stack as Stack26, Tooltip as Tooltip13 } from "@elementor/ui";
|
|
@@ -9840,7 +9901,7 @@ var ARIA_LABEL2 = __67("Attributes", "elementor");
|
|
|
9840
9901
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
9841
9902
|
var AttributesControl = createControl(() => {
|
|
9842
9903
|
const triggerRef = useRef33(null);
|
|
9843
|
-
return /* @__PURE__ */
|
|
9904
|
+
return /* @__PURE__ */ React132.createElement(
|
|
9844
9905
|
Stack26,
|
|
9845
9906
|
{
|
|
9846
9907
|
direction: "row",
|
|
@@ -9850,8 +9911,8 @@ var AttributesControl = createControl(() => {
|
|
|
9850
9911
|
alignItems: "center"
|
|
9851
9912
|
}
|
|
9852
9913
|
},
|
|
9853
|
-
/* @__PURE__ */
|
|
9854
|
-
/* @__PURE__ */
|
|
9914
|
+
/* @__PURE__ */ React132.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
9915
|
+
/* @__PURE__ */ React132.createElement(Tooltip13, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React132.createElement(
|
|
9855
9916
|
PlusIcon4,
|
|
9856
9917
|
{
|
|
9857
9918
|
"aria-label": ARIA_LABEL2,
|
|
@@ -9865,18 +9926,18 @@ var AttributesControl = createControl(() => {
|
|
|
9865
9926
|
});
|
|
9866
9927
|
|
|
9867
9928
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
9868
|
-
import * as
|
|
9929
|
+
import * as React133 from "react";
|
|
9869
9930
|
import { BrushBigIcon } from "@elementor/icons";
|
|
9870
|
-
import { IconButton as IconButton11, styled as
|
|
9871
|
-
var CustomIconButton =
|
|
9931
|
+
import { IconButton as IconButton11, styled as styled14, Tooltip as Tooltip14 } from "@elementor/ui";
|
|
9932
|
+
var CustomIconButton = styled14(IconButton11)(({ theme }) => ({
|
|
9872
9933
|
width: theme.spacing(2.5),
|
|
9873
9934
|
height: theme.spacing(2.5)
|
|
9874
9935
|
}));
|
|
9875
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
9936
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React133.createElement(Tooltip14, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React133.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React133.createElement(BrushBigIcon, { fontSize: size })));
|
|
9876
9937
|
|
|
9877
9938
|
// src/components/repeater/repeater.tsx
|
|
9878
|
-
import * as
|
|
9879
|
-
import { useEffect as useEffect21, useState as
|
|
9939
|
+
import * as React134 from "react";
|
|
9940
|
+
import { useEffect as useEffect21, useState as useState25 } from "react";
|
|
9880
9941
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
|
|
9881
9942
|
import {
|
|
9882
9943
|
bindPopover as bindPopover9,
|
|
@@ -9906,7 +9967,7 @@ var Repeater3 = ({
|
|
|
9906
9967
|
isSortable = true,
|
|
9907
9968
|
adornment = ControlAdornments
|
|
9908
9969
|
}) => {
|
|
9909
|
-
const [openItem, setOpenItem] =
|
|
9970
|
+
const [openItem, setOpenItem] = useState25(initialOpenItem);
|
|
9910
9971
|
const uniqueKeys = items2.map(
|
|
9911
9972
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
9912
9973
|
);
|
|
@@ -9969,7 +10030,7 @@ var Repeater3 = ({
|
|
|
9969
10030
|
};
|
|
9970
10031
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
9971
10032
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
9972
|
-
const addButton = /* @__PURE__ */
|
|
10033
|
+
const addButton = /* @__PURE__ */ React134.createElement(
|
|
9973
10034
|
IconButton12,
|
|
9974
10035
|
{
|
|
9975
10036
|
size: SIZE12,
|
|
@@ -9980,9 +10041,9 @@ var Repeater3 = ({
|
|
|
9980
10041
|
onClick: addRepeaterItem,
|
|
9981
10042
|
"aria-label": __68("Add item", "elementor")
|
|
9982
10043
|
},
|
|
9983
|
-
/* @__PURE__ */
|
|
10044
|
+
/* @__PURE__ */ React134.createElement(PlusIcon5, { fontSize: SIZE12 })
|
|
9984
10045
|
);
|
|
9985
|
-
return /* @__PURE__ */
|
|
10046
|
+
return /* @__PURE__ */ React134.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React134.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React134.createElement(
|
|
9986
10047
|
Infotip4,
|
|
9987
10048
|
{
|
|
9988
10049
|
placement: "right",
|
|
@@ -9990,20 +10051,20 @@ var Repeater3 = ({
|
|
|
9990
10051
|
color: "secondary",
|
|
9991
10052
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
9992
10053
|
},
|
|
9993
|
-
/* @__PURE__ */
|
|
9994
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
10054
|
+
/* @__PURE__ */ React134.createElement(Box34, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
10055
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React134.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
9995
10056
|
const index = uniqueKeys.indexOf(key);
|
|
9996
10057
|
const value = items2[index];
|
|
9997
10058
|
if (!value) {
|
|
9998
10059
|
return null;
|
|
9999
10060
|
}
|
|
10000
|
-
return /* @__PURE__ */
|
|
10061
|
+
return /* @__PURE__ */ React134.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React134.createElement(
|
|
10001
10062
|
RepeaterItem,
|
|
10002
10063
|
{
|
|
10003
10064
|
disabled,
|
|
10004
10065
|
propDisabled: value?.disabled,
|
|
10005
|
-
label: /* @__PURE__ */
|
|
10006
|
-
startIcon: /* @__PURE__ */
|
|
10066
|
+
label: /* @__PURE__ */ React134.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React134.createElement(itemSettings.Label, { value, index })),
|
|
10067
|
+
startIcon: /* @__PURE__ */ React134.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React134.createElement(itemSettings.Icon, { value })),
|
|
10007
10068
|
removeItem: () => removeRepeaterItem(index),
|
|
10008
10069
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
10009
10070
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -10017,7 +10078,7 @@ var Repeater3 = ({
|
|
|
10017
10078
|
actions: itemSettings.actions,
|
|
10018
10079
|
value
|
|
10019
10080
|
},
|
|
10020
|
-
(props) => /* @__PURE__ */
|
|
10081
|
+
(props) => /* @__PURE__ */ React134.createElement(
|
|
10021
10082
|
itemSettings.Content,
|
|
10022
10083
|
{
|
|
10023
10084
|
...props,
|
|
@@ -10062,7 +10123,7 @@ var RepeaterItem = ({
|
|
|
10062
10123
|
const duplicateLabel = __68("Duplicate", "elementor");
|
|
10063
10124
|
const toggleLabel = propDisabled ? __68("Show", "elementor") : __68("Hide", "elementor");
|
|
10064
10125
|
const removeLabel = __68("Remove", "elementor");
|
|
10065
|
-
return /* @__PURE__ */
|
|
10126
|
+
return /* @__PURE__ */ React134.createElement(Box34, { sx: { display: "contents" } }, /* @__PURE__ */ React134.createElement(
|
|
10066
10127
|
RepeaterTag,
|
|
10067
10128
|
{
|
|
10068
10129
|
disabled,
|
|
@@ -10077,12 +10138,12 @@ var RepeaterItem = ({
|
|
|
10077
10138
|
}
|
|
10078
10139
|
},
|
|
10079
10140
|
startIcon,
|
|
10080
|
-
actions: /* @__PURE__ */
|
|
10141
|
+
actions: /* @__PURE__ */ React134.createElement(React134.Fragment, null, showDuplicate && /* @__PURE__ */ React134.createElement(Tooltip15, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React134.createElement(IconButton12, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React134.createElement(CopyIcon2, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React134.createElement(Tooltip15, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React134.createElement(IconButton12, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React134.createElement(EyeOffIcon2, { fontSize: SIZE12 }) : /* @__PURE__ */ React134.createElement(EyeIcon2, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React134.createElement(Tooltip15, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React134.createElement(IconButton12, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React134.createElement(XIcon4, { fontSize: SIZE12 }))))
|
|
10081
10142
|
}
|
|
10082
|
-
), /* @__PURE__ */
|
|
10143
|
+
), /* @__PURE__ */ React134.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React134.createElement(Box34, null, children({ anchorEl: ref }))));
|
|
10083
10144
|
};
|
|
10084
10145
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
10085
|
-
const [ref, setRef] =
|
|
10146
|
+
const [ref, setRef] = useState25(null);
|
|
10086
10147
|
const popoverState = usePopupState13({ variant: "popover" });
|
|
10087
10148
|
const popoverProps = bindPopover9(popoverState);
|
|
10088
10149
|
useEffect21(() => {
|
|
@@ -10104,7 +10165,7 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
10104
10165
|
};
|
|
10105
10166
|
|
|
10106
10167
|
// src/components/size/unstable-size-field.tsx
|
|
10107
|
-
import * as
|
|
10168
|
+
import * as React137 from "react";
|
|
10108
10169
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
10109
10170
|
|
|
10110
10171
|
// src/hooks/use-size-value.ts
|
|
@@ -10147,10 +10208,10 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
10147
10208
|
};
|
|
10148
10209
|
|
|
10149
10210
|
// src/components/size/unit-select.tsx
|
|
10150
|
-
import * as
|
|
10211
|
+
import * as React135 from "react";
|
|
10151
10212
|
import { useId as useId5 } from "react";
|
|
10152
10213
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
10153
|
-
import { bindMenu as bindMenu4, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu5, styled as
|
|
10214
|
+
import { bindMenu as bindMenu4, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu5, styled as styled15, usePopupState as usePopupState14 } from "@elementor/ui";
|
|
10154
10215
|
var menuItemContentStyles2 = {
|
|
10155
10216
|
display: "flex",
|
|
10156
10217
|
flexDirection: "column",
|
|
@@ -10165,7 +10226,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
10165
10226
|
onClick(options[index]);
|
|
10166
10227
|
popupState.close();
|
|
10167
10228
|
};
|
|
10168
|
-
return /* @__PURE__ */
|
|
10229
|
+
return /* @__PURE__ */ React135.createElement(React135.Fragment, null, /* @__PURE__ */ React135.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React135.createElement(Menu5, { MenuListProps: { dense: true }, ...bindMenu4(popupState) }, options.map((option, index) => /* @__PURE__ */ React135.createElement(
|
|
10169
10230
|
MenuListItem8,
|
|
10170
10231
|
{
|
|
10171
10232
|
key: option,
|
|
@@ -10184,7 +10245,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
10184
10245
|
option.toUpperCase()
|
|
10185
10246
|
))));
|
|
10186
10247
|
};
|
|
10187
|
-
var StyledButton3 =
|
|
10248
|
+
var StyledButton3 = styled15(Button7, {
|
|
10188
10249
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
10189
10250
|
})(({ isPrimaryColor, theme }) => ({
|
|
10190
10251
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -10194,11 +10255,11 @@ var StyledButton3 = styled14(Button7, {
|
|
|
10194
10255
|
}));
|
|
10195
10256
|
|
|
10196
10257
|
// src/components/size/unstable-size-input.tsx
|
|
10197
|
-
import * as
|
|
10258
|
+
import * as React136 from "react";
|
|
10198
10259
|
import { forwardRef as forwardRef13 } from "react";
|
|
10199
10260
|
var UnstableSizeInput = forwardRef13(
|
|
10200
10261
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
10201
|
-
return /* @__PURE__ */
|
|
10262
|
+
return /* @__PURE__ */ React136.createElement(
|
|
10202
10263
|
NumberInput,
|
|
10203
10264
|
{
|
|
10204
10265
|
ref,
|
|
@@ -10236,7 +10297,7 @@ var UnstableSizeField = ({
|
|
|
10236
10297
|
const shouldHighlightUnit2 = () => {
|
|
10237
10298
|
return hasValue(size);
|
|
10238
10299
|
};
|
|
10239
|
-
return /* @__PURE__ */
|
|
10300
|
+
return /* @__PURE__ */ React137.createElement(
|
|
10240
10301
|
UnstableSizeInput,
|
|
10241
10302
|
{
|
|
10242
10303
|
type: "number",
|
|
@@ -10245,8 +10306,8 @@ var UnstableSizeField = ({
|
|
|
10245
10306
|
onChange: (event) => setSize(event.target.value),
|
|
10246
10307
|
InputProps: {
|
|
10247
10308
|
...InputProps,
|
|
10248
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
10249
|
-
endAdornment: /* @__PURE__ */
|
|
10309
|
+
startAdornment: startIcon && /* @__PURE__ */ React137.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
10310
|
+
endAdornment: /* @__PURE__ */ React137.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React137.createElement(
|
|
10250
10311
|
UnitSelect,
|
|
10251
10312
|
{
|
|
10252
10313
|
options: units2,
|
|
@@ -10329,6 +10390,7 @@ export {
|
|
|
10329
10390
|
LinkControl,
|
|
10330
10391
|
LinkedDimensionsControl,
|
|
10331
10392
|
MentionTextAreaControl,
|
|
10393
|
+
NoticeControl,
|
|
10332
10394
|
NumberControl,
|
|
10333
10395
|
NumberInput,
|
|
10334
10396
|
PopoverContent,
|