@elementor/editor-ui 3.35.0-394 → 3.35.0-396
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +51 -25
- package/dist/index.mjs +41 -16
- package/package.json +2 -2
- package/src/components/promotion-chip.tsx +22 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -108,6 +108,10 @@ type PromotionInfotipProps = React$1.PropsWithChildren<InfotipCardProps & {
|
|
|
108
108
|
}>;
|
|
109
109
|
declare const PromotionInfotip: ({ children, open, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
|
|
110
110
|
|
|
111
|
+
declare const PromotionChip: React$1.ForwardRefExoticComponent<{
|
|
112
|
+
onClick: () => void;
|
|
113
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
114
|
+
|
|
111
115
|
type PopoverBodyProps = PropsWithChildren<{
|
|
112
116
|
height?: number | 'auto';
|
|
113
117
|
width?: number;
|
|
@@ -204,4 +208,4 @@ declare const useEditable: ({ value, onSubmit, validation, onClick, onError }: U
|
|
|
204
208
|
};
|
|
205
209
|
};
|
|
206
210
|
|
|
207
|
-
export { CollapseIcon, CtaButton, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionInfotip, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
|
|
211
|
+
export { CollapseIcon, CtaButton, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionChip, PromotionInfotip, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
|
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,10 @@ type PromotionInfotipProps = React$1.PropsWithChildren<InfotipCardProps & {
|
|
|
108
108
|
}>;
|
|
109
109
|
declare const PromotionInfotip: ({ children, open, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
|
|
110
110
|
|
|
111
|
+
declare const PromotionChip: React$1.ForwardRefExoticComponent<{
|
|
112
|
+
onClick: () => void;
|
|
113
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
114
|
+
|
|
111
115
|
type PopoverBodyProps = PropsWithChildren<{
|
|
112
116
|
height?: number | 'auto';
|
|
113
117
|
width?: number;
|
|
@@ -204,4 +208,4 @@ declare const useEditable: ({ value, onSubmit, validation, onClick, onError }: U
|
|
|
204
208
|
};
|
|
205
209
|
};
|
|
206
210
|
|
|
207
|
-
export { CollapseIcon, CtaButton, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionInfotip, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
|
|
211
|
+
export { CollapseIcon, CtaButton, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionChip, PromotionInfotip, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(index_exports, {
|
|
|
45
45
|
PopoverBody: () => PopoverBody,
|
|
46
46
|
PopoverHeader: () => PopoverHeader,
|
|
47
47
|
PopoverMenuList: () => PopoverMenuList,
|
|
48
|
+
PromotionChip: () => PromotionChip,
|
|
48
49
|
PromotionInfotip: () => PromotionInfotip,
|
|
49
50
|
SaveChangesDialog: () => SaveChangesDialog,
|
|
50
51
|
SearchField: () => SearchField,
|
|
@@ -467,15 +468,39 @@ function InfotipCard({ title, content, assetUrl, ctaUrl, setOpen }) {
|
|
|
467
468
|
);
|
|
468
469
|
}
|
|
469
470
|
|
|
470
|
-
// src/components/
|
|
471
|
+
// src/components/promotion-chip.tsx
|
|
471
472
|
var React14 = __toESM(require("react"));
|
|
473
|
+
var import_icons5 = require("@elementor/icons");
|
|
472
474
|
var import_ui14 = require("@elementor/ui");
|
|
475
|
+
var PromotionChip = React14.forwardRef(({ onClick }, ref) => {
|
|
476
|
+
return /* @__PURE__ */ React14.createElement(
|
|
477
|
+
import_ui14.Chip,
|
|
478
|
+
{
|
|
479
|
+
ref,
|
|
480
|
+
size: "tiny",
|
|
481
|
+
color: "promotion",
|
|
482
|
+
variant: "standard",
|
|
483
|
+
icon: /* @__PURE__ */ React14.createElement(import_icons5.CrownFilledIcon, null),
|
|
484
|
+
sx: {
|
|
485
|
+
ml: 1,
|
|
486
|
+
"& .MuiChip-label": {
|
|
487
|
+
display: "none"
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
onClick
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
// src/components/popover/body.tsx
|
|
496
|
+
var React15 = __toESM(require("react"));
|
|
497
|
+
var import_ui15 = require("@elementor/ui");
|
|
473
498
|
var SECTION_PADDING_INLINE = 32;
|
|
474
499
|
var DEFAULT_POPOVER_HEIGHT = 348;
|
|
475
500
|
var FALLBACK_POPOVER_WIDTH = 220;
|
|
476
501
|
var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) => {
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
502
|
+
return /* @__PURE__ */ React15.createElement(
|
|
503
|
+
import_ui15.Box,
|
|
479
504
|
{
|
|
480
505
|
display: "flex",
|
|
481
506
|
flexDirection: "column",
|
|
@@ -492,8 +517,8 @@ var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) =>
|
|
|
492
517
|
};
|
|
493
518
|
|
|
494
519
|
// src/components/popover/header.tsx
|
|
495
|
-
var
|
|
496
|
-
var
|
|
520
|
+
var React16 = __toESM(require("react"));
|
|
521
|
+
var import_ui16 = require("@elementor/ui");
|
|
497
522
|
var SIZE2 = "tiny";
|
|
498
523
|
var PopoverHeader = ({ title, onClose, icon, actions }) => {
|
|
499
524
|
const paddingAndSizing = {
|
|
@@ -502,13 +527,13 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
|
|
|
502
527
|
py: 1.5,
|
|
503
528
|
maxHeight: 36
|
|
504
529
|
};
|
|
505
|
-
return /* @__PURE__ */
|
|
530
|
+
return /* @__PURE__ */ React16.createElement(import_ui16.Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React16.createElement(import_ui16.Typography, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React16.createElement(import_ui16.Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React16.createElement(import_ui16.CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
|
|
506
531
|
};
|
|
507
532
|
|
|
508
533
|
// src/components/popover/menu-list.tsx
|
|
509
|
-
var
|
|
534
|
+
var React17 = __toESM(require("react"));
|
|
510
535
|
var import_react12 = require("react");
|
|
511
|
-
var
|
|
536
|
+
var import_ui17 = require("@elementor/ui");
|
|
512
537
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
513
538
|
|
|
514
539
|
// src/hooks/use-scroll-to-selected.ts
|
|
@@ -607,7 +632,7 @@ var PopoverMenuList = ({
|
|
|
607
632
|
});
|
|
608
633
|
useScrollToSelected({ selectedValue, items, virtualizer });
|
|
609
634
|
const virtualItems = virtualizer.getVirtualItems();
|
|
610
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ React17.createElement(import_ui17.Box, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React17.createElement(
|
|
611
636
|
MenuListComponent,
|
|
612
637
|
{
|
|
613
638
|
role: "listbox",
|
|
@@ -625,8 +650,8 @@ var PopoverMenuList = ({
|
|
|
625
650
|
}
|
|
626
651
|
if (item.type === "category") {
|
|
627
652
|
const shouldStick = virtualRow.start + MENU_LIST_PADDING_TOP <= scrollTop;
|
|
628
|
-
return /* @__PURE__ */
|
|
629
|
-
|
|
653
|
+
return /* @__PURE__ */ React17.createElement(
|
|
654
|
+
import_ui17.MenuSubheader,
|
|
630
655
|
{
|
|
631
656
|
key: virtualRow.key,
|
|
632
657
|
style: shouldStick ? {} : menuSubHeaderAbsoluteStyling(virtualRow.start),
|
|
@@ -636,8 +661,8 @@ var PopoverMenuList = ({
|
|
|
636
661
|
);
|
|
637
662
|
}
|
|
638
663
|
const isDisabled = item.disabled;
|
|
639
|
-
return /* @__PURE__ */
|
|
640
|
-
|
|
664
|
+
return /* @__PURE__ */ React17.createElement(
|
|
665
|
+
import_ui17.ListItem,
|
|
641
666
|
{
|
|
642
667
|
key: virtualRow.key,
|
|
643
668
|
role: "option",
|
|
@@ -675,7 +700,7 @@ var PopoverMenuList = ({
|
|
|
675
700
|
})
|
|
676
701
|
));
|
|
677
702
|
};
|
|
678
|
-
var StyledMenuList = (0,
|
|
703
|
+
var StyledMenuList = (0, import_ui17.styled)(import_ui17.MenuList)(({ theme }) => ({
|
|
679
704
|
"& > li": {
|
|
680
705
|
height: ITEM_HEIGHT,
|
|
681
706
|
width: "100%",
|
|
@@ -706,14 +731,14 @@ var StyledMenuList = (0, import_ui16.styled)(import_ui16.MenuList)(({ theme }) =
|
|
|
706
731
|
}));
|
|
707
732
|
|
|
708
733
|
// src/components/save-changes-dialog.tsx
|
|
709
|
-
var
|
|
734
|
+
var React18 = __toESM(require("react"));
|
|
710
735
|
var import_react13 = require("react");
|
|
711
|
-
var
|
|
712
|
-
var
|
|
736
|
+
var import_icons6 = require("@elementor/icons");
|
|
737
|
+
var import_ui18 = require("@elementor/ui");
|
|
713
738
|
var TITLE_ID = "save-changes-dialog";
|
|
714
|
-
var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */
|
|
715
|
-
var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */
|
|
716
|
-
|
|
739
|
+
var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React18.createElement(import_ui18.Dialog, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
|
|
740
|
+
var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React18.createElement(
|
|
741
|
+
import_ui18.DialogTitle,
|
|
717
742
|
{
|
|
718
743
|
id: TITLE_ID,
|
|
719
744
|
display: "flex",
|
|
@@ -721,11 +746,11 @@ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React17.
|
|
|
721
746
|
gap: 1,
|
|
722
747
|
sx: { lineHeight: 1, justifyContent: "space-between" }
|
|
723
748
|
},
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
onClose && /* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ React18.createElement(import_ui18.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React18.createElement(import_icons6.AlertTriangleFilledIcon, { color: "secondary" }), children),
|
|
750
|
+
onClose && /* @__PURE__ */ React18.createElement(import_ui18.IconButton, { onClick: onClose, size: "small" }, /* @__PURE__ */ React18.createElement(import_icons6.XIcon, null))
|
|
726
751
|
);
|
|
727
|
-
var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */
|
|
728
|
-
var SaveChangesDialogContentText = (props) => /* @__PURE__ */
|
|
752
|
+
var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React18.createElement(import_ui18.DialogContent, null, children);
|
|
753
|
+
var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React18.createElement(import_ui18.DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
|
|
729
754
|
var SaveChangesDialogActions = ({ actions }) => {
|
|
730
755
|
const [isConfirming, setIsConfirming] = (0, import_react13.useState)(false);
|
|
731
756
|
const { cancel, confirm, discard } = actions;
|
|
@@ -734,7 +759,7 @@ var SaveChangesDialogActions = ({ actions }) => {
|
|
|
734
759
|
await confirm.action();
|
|
735
760
|
setIsConfirming(false);
|
|
736
761
|
};
|
|
737
|
-
return /* @__PURE__ */
|
|
762
|
+
return /* @__PURE__ */ React18.createElement(import_ui18.DialogActions, null, cancel && /* @__PURE__ */ React18.createElement(import_ui18.Button, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React18.createElement(import_ui18.Button, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React18.createElement(import_ui18.Button, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
|
|
738
763
|
};
|
|
739
764
|
SaveChangesDialog.Title = SaveChangesDialogTitle;
|
|
740
765
|
SaveChangesDialog.Content = SaveChangesDialogContent;
|
|
@@ -868,6 +893,7 @@ var selectAll = (el) => {
|
|
|
868
893
|
PopoverBody,
|
|
869
894
|
PopoverHeader,
|
|
870
895
|
PopoverMenuList,
|
|
896
|
+
PromotionChip,
|
|
871
897
|
PromotionInfotip,
|
|
872
898
|
SaveChangesDialog,
|
|
873
899
|
SearchField,
|
package/dist/index.mjs
CHANGED
|
@@ -435,14 +435,38 @@ function InfotipCard({ title, content, assetUrl, ctaUrl, setOpen }) {
|
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
// src/components/
|
|
438
|
+
// src/components/promotion-chip.tsx
|
|
439
439
|
import * as React14 from "react";
|
|
440
|
+
import { CrownFilledIcon as CrownFilledIcon2 } from "@elementor/icons";
|
|
441
|
+
import { Chip } from "@elementor/ui";
|
|
442
|
+
var PromotionChip = React14.forwardRef(({ onClick }, ref) => {
|
|
443
|
+
return /* @__PURE__ */ React14.createElement(
|
|
444
|
+
Chip,
|
|
445
|
+
{
|
|
446
|
+
ref,
|
|
447
|
+
size: "tiny",
|
|
448
|
+
color: "promotion",
|
|
449
|
+
variant: "standard",
|
|
450
|
+
icon: /* @__PURE__ */ React14.createElement(CrownFilledIcon2, null),
|
|
451
|
+
sx: {
|
|
452
|
+
ml: 1,
|
|
453
|
+
"& .MuiChip-label": {
|
|
454
|
+
display: "none"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
onClick
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
// src/components/popover/body.tsx
|
|
463
|
+
import * as React15 from "react";
|
|
440
464
|
import { Box as Box5 } from "@elementor/ui";
|
|
441
465
|
var SECTION_PADDING_INLINE = 32;
|
|
442
466
|
var DEFAULT_POPOVER_HEIGHT = 348;
|
|
443
467
|
var FALLBACK_POPOVER_WIDTH = 220;
|
|
444
468
|
var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) => {
|
|
445
|
-
return /* @__PURE__ */
|
|
469
|
+
return /* @__PURE__ */ React15.createElement(
|
|
446
470
|
Box5,
|
|
447
471
|
{
|
|
448
472
|
display: "flex",
|
|
@@ -460,7 +484,7 @@ var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) =>
|
|
|
460
484
|
};
|
|
461
485
|
|
|
462
486
|
// src/components/popover/header.tsx
|
|
463
|
-
import * as
|
|
487
|
+
import * as React16 from "react";
|
|
464
488
|
import { CloseButton as CloseButton2, Stack, Typography as Typography4 } from "@elementor/ui";
|
|
465
489
|
var SIZE2 = "tiny";
|
|
466
490
|
var PopoverHeader = ({ title, onClose, icon, actions }) => {
|
|
@@ -470,11 +494,11 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
|
|
|
470
494
|
py: 1.5,
|
|
471
495
|
maxHeight: 36
|
|
472
496
|
};
|
|
473
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ React16.createElement(Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React16.createElement(Typography4, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React16.createElement(Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React16.createElement(CloseButton2, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
|
|
474
498
|
};
|
|
475
499
|
|
|
476
500
|
// src/components/popover/menu-list.tsx
|
|
477
|
-
import * as
|
|
501
|
+
import * as React17 from "react";
|
|
478
502
|
import { useMemo, useRef as useRef3 } from "react";
|
|
479
503
|
import { Box as Box6, ListItem, MenuList, MenuSubheader, styled as styled3 } from "@elementor/ui";
|
|
480
504
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -575,7 +599,7 @@ var PopoverMenuList = ({
|
|
|
575
599
|
});
|
|
576
600
|
useScrollToSelected({ selectedValue, items, virtualizer });
|
|
577
601
|
const virtualItems = virtualizer.getVirtualItems();
|
|
578
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ React17.createElement(Box6, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React17.createElement(
|
|
579
603
|
MenuListComponent,
|
|
580
604
|
{
|
|
581
605
|
role: "listbox",
|
|
@@ -593,7 +617,7 @@ var PopoverMenuList = ({
|
|
|
593
617
|
}
|
|
594
618
|
if (item.type === "category") {
|
|
595
619
|
const shouldStick = virtualRow.start + MENU_LIST_PADDING_TOP <= scrollTop;
|
|
596
|
-
return /* @__PURE__ */
|
|
620
|
+
return /* @__PURE__ */ React17.createElement(
|
|
597
621
|
MenuSubheader,
|
|
598
622
|
{
|
|
599
623
|
key: virtualRow.key,
|
|
@@ -604,7 +628,7 @@ var PopoverMenuList = ({
|
|
|
604
628
|
);
|
|
605
629
|
}
|
|
606
630
|
const isDisabled = item.disabled;
|
|
607
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ React17.createElement(
|
|
608
632
|
ListItem,
|
|
609
633
|
{
|
|
610
634
|
key: virtualRow.key,
|
|
@@ -674,7 +698,7 @@ var StyledMenuList = styled3(MenuList)(({ theme }) => ({
|
|
|
674
698
|
}));
|
|
675
699
|
|
|
676
700
|
// src/components/save-changes-dialog.tsx
|
|
677
|
-
import * as
|
|
701
|
+
import * as React18 from "react";
|
|
678
702
|
import { useState as useState6 } from "react";
|
|
679
703
|
import { AlertTriangleFilledIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
680
704
|
import {
|
|
@@ -688,8 +712,8 @@ import {
|
|
|
688
712
|
Stack as Stack2
|
|
689
713
|
} from "@elementor/ui";
|
|
690
714
|
var TITLE_ID = "save-changes-dialog";
|
|
691
|
-
var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */
|
|
692
|
-
var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */
|
|
715
|
+
var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React18.createElement(Dialog3, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
|
|
716
|
+
var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React18.createElement(
|
|
693
717
|
DialogTitle2,
|
|
694
718
|
{
|
|
695
719
|
id: TITLE_ID,
|
|
@@ -698,11 +722,11 @@ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React17.
|
|
|
698
722
|
gap: 1,
|
|
699
723
|
sx: { lineHeight: 1, justifyContent: "space-between" }
|
|
700
724
|
},
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
onClose && /* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ React18.createElement(Stack2, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React18.createElement(AlertTriangleFilledIcon, { color: "secondary" }), children),
|
|
726
|
+
onClose && /* @__PURE__ */ React18.createElement(IconButton2, { onClick: onClose, size: "small" }, /* @__PURE__ */ React18.createElement(XIcon2, null))
|
|
703
727
|
);
|
|
704
|
-
var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */
|
|
705
|
-
var SaveChangesDialogContentText = (props) => /* @__PURE__ */
|
|
728
|
+
var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React18.createElement(DialogContent, null, children);
|
|
729
|
+
var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React18.createElement(DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
|
|
706
730
|
var SaveChangesDialogActions = ({ actions }) => {
|
|
707
731
|
const [isConfirming, setIsConfirming] = useState6(false);
|
|
708
732
|
const { cancel, confirm, discard } = actions;
|
|
@@ -711,7 +735,7 @@ var SaveChangesDialogActions = ({ actions }) => {
|
|
|
711
735
|
await confirm.action();
|
|
712
736
|
setIsConfirming(false);
|
|
713
737
|
};
|
|
714
|
-
return /* @__PURE__ */
|
|
738
|
+
return /* @__PURE__ */ React18.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React18.createElement(Button4, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React18.createElement(Button4, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React18.createElement(Button4, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
|
|
715
739
|
};
|
|
716
740
|
SaveChangesDialog.Title = SaveChangesDialogTitle;
|
|
717
741
|
SaveChangesDialog.Content = SaveChangesDialogContent;
|
|
@@ -844,6 +868,7 @@ export {
|
|
|
844
868
|
PopoverBody,
|
|
845
869
|
PopoverHeader,
|
|
846
870
|
PopoverMenuList,
|
|
871
|
+
PromotionChip,
|
|
847
872
|
PromotionInfotip,
|
|
848
873
|
SaveChangesDialog,
|
|
849
874
|
SearchField,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-ui",
|
|
3
3
|
"description": "Elementor Editor UI",
|
|
4
|
-
"version": "3.35.0-
|
|
4
|
+
"version": "3.35.0-396",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-dom": "^18.3.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
40
|
+
"@elementor/editor-v1-adapters": "3.35.0-396",
|
|
41
41
|
"@elementor/icons": "^1.63.0",
|
|
42
42
|
"@elementor/ui": "1.36.17",
|
|
43
43
|
"@tanstack/react-virtual": "^3.13.3",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CrownFilledIcon } from '@elementor/icons';
|
|
3
|
+
import { Chip } from '@elementor/ui';
|
|
4
|
+
|
|
5
|
+
export const PromotionChip = React.forwardRef< HTMLDivElement, { onClick: () => void } >( ( { onClick }, ref ) => {
|
|
6
|
+
return (
|
|
7
|
+
<Chip
|
|
8
|
+
ref={ ref }
|
|
9
|
+
size="tiny"
|
|
10
|
+
color="promotion"
|
|
11
|
+
variant="standard"
|
|
12
|
+
icon={ <CrownFilledIcon /> }
|
|
13
|
+
sx={ {
|
|
14
|
+
ml: 1,
|
|
15
|
+
'& .MuiChip-label': {
|
|
16
|
+
display: 'none',
|
|
17
|
+
},
|
|
18
|
+
} }
|
|
19
|
+
onClick={ onClick }
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
} );
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { SearchField } from './components/search-field';
|
|
|
13
13
|
export { Form } from './components/form';
|
|
14
14
|
export { CtaButton } from './components/cta-button';
|
|
15
15
|
export { PromotionInfotip } from './components/promotion-infotip';
|
|
16
|
+
export { PromotionChip } from './components/promotion-chip';
|
|
16
17
|
|
|
17
18
|
export * from './components/popover';
|
|
18
19
|
export * from './components/save-changes-dialog';
|