@elementor/editor-ui 3.35.0-342 → 3.35.0-344

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 CHANGED
@@ -3,7 +3,7 @@ import * as _mui_system from '@mui/system';
3
3
  import * as React$1 from 'react';
4
4
  import { ReactNode, PropsWithChildren, ReactElement } from 'react';
5
5
  import * as _mui_material from '@mui/material';
6
- import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
6
+ import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, ButtonProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
7
7
 
8
8
  declare const CollapseIcon: _emotion_styled.StyledComponent<Omit<_mui_material.SvgIconProps, "ref"> & React$1.RefAttributes<SVGSVGElement> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
9
9
  open: boolean;
@@ -90,6 +90,11 @@ type Props = PropsWithChildren<{
90
90
  }>;
91
91
  declare const Form: ({ children, onSubmit }: Props) => React$1.JSX.Element;
92
92
 
93
+ type UpgradeButtonProps = {
94
+ href: string;
95
+ } & Omit<ButtonProps, 'href' | 'target' | 'startIcon' | 'color' | 'variant'>;
96
+ declare const UpgradeButton: ({ href, children, ...props }: UpgradeButtonProps) => React$1.JSX.Element;
97
+
93
98
  type PopoverBodyProps = PropsWithChildren<{
94
99
  height?: number | 'auto';
95
100
  width?: number;
@@ -186,4 +191,4 @@ declare const useEditable: ({ value, onSubmit, validation, onClick, onError }: U
186
191
  };
187
192
  };
188
193
 
189
- export { CollapseIcon, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
194
+ export { CollapseIcon, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, UpgradeButton, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as _mui_system from '@mui/system';
3
3
  import * as React$1 from 'react';
4
4
  import { ReactNode, PropsWithChildren, ReactElement } from 'react';
5
5
  import * as _mui_material from '@mui/material';
6
- import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
6
+ import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, ButtonProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
7
7
 
8
8
  declare const CollapseIcon: _emotion_styled.StyledComponent<Omit<_mui_material.SvgIconProps, "ref"> & React$1.RefAttributes<SVGSVGElement> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
9
9
  open: boolean;
@@ -90,6 +90,11 @@ type Props = PropsWithChildren<{
90
90
  }>;
91
91
  declare const Form: ({ children, onSubmit }: Props) => React$1.JSX.Element;
92
92
 
93
+ type UpgradeButtonProps = {
94
+ href: string;
95
+ } & Omit<ButtonProps, 'href' | 'target' | 'startIcon' | 'color' | 'variant'>;
96
+ declare const UpgradeButton: ({ href, children, ...props }: UpgradeButtonProps) => React$1.JSX.Element;
97
+
93
98
  type PopoverBodyProps = PropsWithChildren<{
94
99
  height?: number | 'auto';
95
100
  width?: number;
@@ -186,4 +191,4 @@ declare const useEditable: ({ value, onSubmit, validation, onClick, onError }: U
186
191
  };
187
192
  };
188
193
 
189
- export { CollapseIcon, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
194
+ export { CollapseIcon, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, UpgradeButton, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
package/dist/index.js CHANGED
@@ -48,6 +48,7 @@ __export(index_exports, {
48
48
  SearchField: () => SearchField,
49
49
  StyledMenuList: () => StyledMenuList,
50
50
  ThemeProvider: () => ThemeProvider,
51
+ UpgradeButton: () => UpgradeButton,
51
52
  WarningInfotip: () => WarningInfotip,
52
53
  closeDialog: () => closeDialog,
53
54
  openDialog: () => openDialog,
@@ -421,15 +422,33 @@ var Form = ({ children, onSubmit }) => {
421
422
  );
422
423
  };
423
424
 
424
- // src/components/popover/body.tsx
425
+ // src/components/upgrade-button.tsx
425
426
  var React12 = __toESM(require("react"));
427
+ var import_icons4 = require("@elementor/icons");
426
428
  var import_ui12 = require("@elementor/ui");
429
+ var import_i18n3 = require("@wordpress/i18n");
430
+ var UpgradeButton = ({ href, children, ...props }) => /* @__PURE__ */ React12.createElement(
431
+ import_ui12.Button,
432
+ {
433
+ variant: "contained",
434
+ color: "promotion",
435
+ href,
436
+ target: "_blank",
437
+ startIcon: /* @__PURE__ */ React12.createElement(import_icons4.CrownFilledIcon, null),
438
+ ...props
439
+ },
440
+ children ?? (0, import_i18n3.__)("Upgrade Now", "elementor")
441
+ );
442
+
443
+ // src/components/popover/body.tsx
444
+ var React13 = __toESM(require("react"));
445
+ var import_ui13 = require("@elementor/ui");
427
446
  var SECTION_PADDING_INLINE = 32;
428
447
  var DEFAULT_POPOVER_HEIGHT = 348;
429
448
  var FALLBACK_POPOVER_WIDTH = 220;
430
449
  var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) => {
431
- return /* @__PURE__ */ React12.createElement(
432
- import_ui12.Box,
450
+ return /* @__PURE__ */ React13.createElement(
451
+ import_ui13.Box,
433
452
  {
434
453
  display: "flex",
435
454
  flexDirection: "column",
@@ -446,8 +465,8 @@ var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) =>
446
465
  };
447
466
 
448
467
  // src/components/popover/header.tsx
449
- var React13 = __toESM(require("react"));
450
- var import_ui13 = require("@elementor/ui");
468
+ var React14 = __toESM(require("react"));
469
+ var import_ui14 = require("@elementor/ui");
451
470
  var SIZE2 = "tiny";
452
471
  var PopoverHeader = ({ title, onClose, icon, actions }) => {
453
472
  const paddingAndSizing = {
@@ -456,13 +475,13 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
456
475
  py: 1.5,
457
476
  maxHeight: 36
458
477
  };
459
- return /* @__PURE__ */ React13.createElement(import_ui13.Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React13.createElement(import_ui13.Typography, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React13.createElement(import_ui13.Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React13.createElement(import_ui13.CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
478
+ return /* @__PURE__ */ React14.createElement(import_ui14.Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React14.createElement(import_ui14.Typography, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React14.createElement(import_ui14.Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React14.createElement(import_ui14.CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
460
479
  };
461
480
 
462
481
  // src/components/popover/menu-list.tsx
463
- var React14 = __toESM(require("react"));
482
+ var React15 = __toESM(require("react"));
464
483
  var import_react12 = require("react");
465
- var import_ui14 = require("@elementor/ui");
484
+ var import_ui15 = require("@elementor/ui");
466
485
  var import_react_virtual = require("@tanstack/react-virtual");
467
486
 
468
487
  // src/hooks/use-scroll-to-selected.ts
@@ -561,7 +580,7 @@ var PopoverMenuList = ({
561
580
  });
562
581
  useScrollToSelected({ selectedValue, items, virtualizer });
563
582
  const virtualItems = virtualizer.getVirtualItems();
564
- return /* @__PURE__ */ React14.createElement(import_ui14.Box, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React14.createElement(
583
+ return /* @__PURE__ */ React15.createElement(import_ui15.Box, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React15.createElement(
565
584
  MenuListComponent,
566
585
  {
567
586
  role: "listbox",
@@ -579,8 +598,8 @@ var PopoverMenuList = ({
579
598
  }
580
599
  if (item.type === "category") {
581
600
  const shouldStick = virtualRow.start + MENU_LIST_PADDING_TOP <= scrollTop;
582
- return /* @__PURE__ */ React14.createElement(
583
- import_ui14.MenuSubheader,
601
+ return /* @__PURE__ */ React15.createElement(
602
+ import_ui15.MenuSubheader,
584
603
  {
585
604
  key: virtualRow.key,
586
605
  style: shouldStick ? {} : menuSubHeaderAbsoluteStyling(virtualRow.start),
@@ -590,8 +609,8 @@ var PopoverMenuList = ({
590
609
  );
591
610
  }
592
611
  const isDisabled = item.disabled;
593
- return /* @__PURE__ */ React14.createElement(
594
- import_ui14.ListItem,
612
+ return /* @__PURE__ */ React15.createElement(
613
+ import_ui15.ListItem,
595
614
  {
596
615
  key: virtualRow.key,
597
616
  role: "option",
@@ -629,7 +648,7 @@ var PopoverMenuList = ({
629
648
  })
630
649
  ));
631
650
  };
632
- var StyledMenuList = (0, import_ui14.styled)(import_ui14.MenuList)(({ theme }) => ({
651
+ var StyledMenuList = (0, import_ui15.styled)(import_ui15.MenuList)(({ theme }) => ({
633
652
  "& > li": {
634
653
  height: ITEM_HEIGHT,
635
654
  width: "100%",
@@ -660,14 +679,14 @@ var StyledMenuList = (0, import_ui14.styled)(import_ui14.MenuList)(({ theme }) =
660
679
  }));
661
680
 
662
681
  // src/components/save-changes-dialog.tsx
663
- var React15 = __toESM(require("react"));
682
+ var React16 = __toESM(require("react"));
664
683
  var import_react13 = require("react");
665
- var import_icons4 = require("@elementor/icons");
666
- var import_ui15 = require("@elementor/ui");
684
+ var import_icons5 = require("@elementor/icons");
685
+ var import_ui16 = require("@elementor/ui");
667
686
  var TITLE_ID = "save-changes-dialog";
668
- var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(import_ui15.Dialog, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
669
- var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(
670
- import_ui15.DialogTitle,
687
+ var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React16.createElement(import_ui16.Dialog, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
688
+ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React16.createElement(
689
+ import_ui16.DialogTitle,
671
690
  {
672
691
  id: TITLE_ID,
673
692
  display: "flex",
@@ -675,11 +694,11 @@ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React15.
675
694
  gap: 1,
676
695
  sx: { lineHeight: 1, justifyContent: "space-between" }
677
696
  },
678
- /* @__PURE__ */ React15.createElement(import_ui15.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React15.createElement(import_icons4.AlertTriangleFilledIcon, { color: "secondary" }), children),
679
- onClose && /* @__PURE__ */ React15.createElement(import_ui15.IconButton, { onClick: onClose, size: "small" }, /* @__PURE__ */ React15.createElement(import_icons4.XIcon, null))
697
+ /* @__PURE__ */ React16.createElement(import_ui16.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React16.createElement(import_icons5.AlertTriangleFilledIcon, { color: "secondary" }), children),
698
+ onClose && /* @__PURE__ */ React16.createElement(import_ui16.IconButton, { onClick: onClose, size: "small" }, /* @__PURE__ */ React16.createElement(import_icons5.XIcon, null))
680
699
  );
681
- var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React15.createElement(import_ui15.DialogContent, null, children);
682
- var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React15.createElement(import_ui15.DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
700
+ var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React16.createElement(import_ui16.DialogContent, null, children);
701
+ var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React16.createElement(import_ui16.DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
683
702
  var SaveChangesDialogActions = ({ actions }) => {
684
703
  const [isConfirming, setIsConfirming] = (0, import_react13.useState)(false);
685
704
  const { cancel, confirm, discard } = actions;
@@ -688,7 +707,7 @@ var SaveChangesDialogActions = ({ actions }) => {
688
707
  await confirm.action();
689
708
  setIsConfirming(false);
690
709
  };
691
- return /* @__PURE__ */ React15.createElement(import_ui15.DialogActions, null, cancel && /* @__PURE__ */ React15.createElement(import_ui15.Button, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React15.createElement(import_ui15.Button, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React15.createElement(import_ui15.Button, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
710
+ return /* @__PURE__ */ React16.createElement(import_ui16.DialogActions, null, cancel && /* @__PURE__ */ React16.createElement(import_ui16.Button, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React16.createElement(import_ui16.Button, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React16.createElement(import_ui16.Button, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
692
711
  };
693
712
  SaveChangesDialog.Title = SaveChangesDialogTitle;
694
713
  SaveChangesDialog.Content = SaveChangesDialogContent;
@@ -825,6 +844,7 @@ var selectAll = (el) => {
825
844
  SearchField,
826
845
  StyledMenuList,
827
846
  ThemeProvider,
847
+ UpgradeButton,
828
848
  WarningInfotip,
829
849
  closeDialog,
830
850
  openDialog,
package/dist/index.mjs CHANGED
@@ -381,14 +381,32 @@ var Form = ({ children, onSubmit }) => {
381
381
  );
382
382
  };
383
383
 
384
- // src/components/popover/body.tsx
384
+ // src/components/upgrade-button.tsx
385
385
  import * as React12 from "react";
386
+ import { CrownFilledIcon } from "@elementor/icons";
387
+ import { Button as Button3 } from "@elementor/ui";
388
+ import { __ as __3 } from "@wordpress/i18n";
389
+ var UpgradeButton = ({ href, children, ...props }) => /* @__PURE__ */ React12.createElement(
390
+ Button3,
391
+ {
392
+ variant: "contained",
393
+ color: "promotion",
394
+ href,
395
+ target: "_blank",
396
+ startIcon: /* @__PURE__ */ React12.createElement(CrownFilledIcon, null),
397
+ ...props
398
+ },
399
+ children ?? __3("Upgrade Now", "elementor")
400
+ );
401
+
402
+ // src/components/popover/body.tsx
403
+ import * as React13 from "react";
386
404
  import { Box as Box5 } from "@elementor/ui";
387
405
  var SECTION_PADDING_INLINE = 32;
388
406
  var DEFAULT_POPOVER_HEIGHT = 348;
389
407
  var FALLBACK_POPOVER_WIDTH = 220;
390
408
  var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) => {
391
- return /* @__PURE__ */ React12.createElement(
409
+ return /* @__PURE__ */ React13.createElement(
392
410
  Box5,
393
411
  {
394
412
  display: "flex",
@@ -406,7 +424,7 @@ var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) =>
406
424
  };
407
425
 
408
426
  // src/components/popover/header.tsx
409
- import * as React13 from "react";
427
+ import * as React14 from "react";
410
428
  import { CloseButton, Stack, Typography as Typography3 } from "@elementor/ui";
411
429
  var SIZE2 = "tiny";
412
430
  var PopoverHeader = ({ title, onClose, icon, actions }) => {
@@ -416,11 +434,11 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
416
434
  py: 1.5,
417
435
  maxHeight: 36
418
436
  };
419
- return /* @__PURE__ */ React13.createElement(Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React13.createElement(Typography3, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React13.createElement(Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React13.createElement(CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
437
+ return /* @__PURE__ */ React14.createElement(Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React14.createElement(Typography3, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React14.createElement(Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React14.createElement(CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
420
438
  };
421
439
 
422
440
  // src/components/popover/menu-list.tsx
423
- import * as React14 from "react";
441
+ import * as React15 from "react";
424
442
  import { useMemo, useRef as useRef3 } from "react";
425
443
  import { Box as Box6, ListItem, MenuList, MenuSubheader, styled as styled3 } from "@elementor/ui";
426
444
  import { useVirtualizer } from "@tanstack/react-virtual";
@@ -521,7 +539,7 @@ var PopoverMenuList = ({
521
539
  });
522
540
  useScrollToSelected({ selectedValue, items, virtualizer });
523
541
  const virtualItems = virtualizer.getVirtualItems();
524
- return /* @__PURE__ */ React14.createElement(Box6, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React14.createElement(
542
+ return /* @__PURE__ */ React15.createElement(Box6, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React15.createElement(
525
543
  MenuListComponent,
526
544
  {
527
545
  role: "listbox",
@@ -539,7 +557,7 @@ var PopoverMenuList = ({
539
557
  }
540
558
  if (item.type === "category") {
541
559
  const shouldStick = virtualRow.start + MENU_LIST_PADDING_TOP <= scrollTop;
542
- return /* @__PURE__ */ React14.createElement(
560
+ return /* @__PURE__ */ React15.createElement(
543
561
  MenuSubheader,
544
562
  {
545
563
  key: virtualRow.key,
@@ -550,7 +568,7 @@ var PopoverMenuList = ({
550
568
  );
551
569
  }
552
570
  const isDisabled = item.disabled;
553
- return /* @__PURE__ */ React14.createElement(
571
+ return /* @__PURE__ */ React15.createElement(
554
572
  ListItem,
555
573
  {
556
574
  key: virtualRow.key,
@@ -620,11 +638,11 @@ var StyledMenuList = styled3(MenuList)(({ theme }) => ({
620
638
  }));
621
639
 
622
640
  // src/components/save-changes-dialog.tsx
623
- import * as React15 from "react";
641
+ import * as React16 from "react";
624
642
  import { useState as useState6 } from "react";
625
643
  import { AlertTriangleFilledIcon, XIcon as XIcon2 } from "@elementor/icons";
626
644
  import {
627
- Button as Button3,
645
+ Button as Button4,
628
646
  Dialog as Dialog3,
629
647
  DialogActions as DialogActions2,
630
648
  DialogContent,
@@ -634,8 +652,8 @@ import {
634
652
  Stack as Stack2
635
653
  } from "@elementor/ui";
636
654
  var TITLE_ID = "save-changes-dialog";
637
- var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(Dialog3, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
638
- var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(
655
+ var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React16.createElement(Dialog3, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
656
+ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React16.createElement(
639
657
  DialogTitle2,
640
658
  {
641
659
  id: TITLE_ID,
@@ -644,11 +662,11 @@ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React15.
644
662
  gap: 1,
645
663
  sx: { lineHeight: 1, justifyContent: "space-between" }
646
664
  },
647
- /* @__PURE__ */ React15.createElement(Stack2, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React15.createElement(AlertTriangleFilledIcon, { color: "secondary" }), children),
648
- onClose && /* @__PURE__ */ React15.createElement(IconButton2, { onClick: onClose, size: "small" }, /* @__PURE__ */ React15.createElement(XIcon2, null))
665
+ /* @__PURE__ */ React16.createElement(Stack2, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React16.createElement(AlertTriangleFilledIcon, { color: "secondary" }), children),
666
+ onClose && /* @__PURE__ */ React16.createElement(IconButton2, { onClick: onClose, size: "small" }, /* @__PURE__ */ React16.createElement(XIcon2, null))
649
667
  );
650
- var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React15.createElement(DialogContent, null, children);
651
- var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React15.createElement(DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
668
+ var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React16.createElement(DialogContent, null, children);
669
+ var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React16.createElement(DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
652
670
  var SaveChangesDialogActions = ({ actions }) => {
653
671
  const [isConfirming, setIsConfirming] = useState6(false);
654
672
  const { cancel, confirm, discard } = actions;
@@ -657,7 +675,7 @@ var SaveChangesDialogActions = ({ actions }) => {
657
675
  await confirm.action();
658
676
  setIsConfirming(false);
659
677
  };
660
- return /* @__PURE__ */ React15.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React15.createElement(Button3, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React15.createElement(Button3, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React15.createElement(Button3, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
678
+ return /* @__PURE__ */ React16.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React16.createElement(Button4, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React16.createElement(Button4, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React16.createElement(Button4, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
661
679
  };
662
680
  SaveChangesDialog.Title = SaveChangesDialogTitle;
663
681
  SaveChangesDialog.Content = SaveChangesDialogContent;
@@ -793,6 +811,7 @@ export {
793
811
  SearchField,
794
812
  StyledMenuList,
795
813
  ThemeProvider,
814
+ UpgradeButton,
796
815
  WarningInfotip,
797
816
  closeDialog,
798
817
  openDialog,
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-342",
4
+ "version": "3.35.0-344",
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-342",
40
+ "@elementor/editor-v1-adapters": "3.35.0-344",
41
41
  "@elementor/icons": "^1.62.0",
42
42
  "@elementor/ui": "1.36.17",
43
43
  "@tanstack/react-virtual": "^3.13.3",
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { CrownFilledIcon } from '@elementor/icons';
3
+ import { Button, type ButtonProps } from '@elementor/ui';
4
+ import { __ } from '@wordpress/i18n';
5
+
6
+ type UpgradeButtonProps = {
7
+ href: string;
8
+ } & Omit< ButtonProps, 'href' | 'target' | 'startIcon' | 'color' | 'variant' >;
9
+
10
+ export const UpgradeButton = ( { href, children, ...props }: UpgradeButtonProps ) => (
11
+ <Button
12
+ variant="contained"
13
+ color="promotion"
14
+ href={ href }
15
+ target="_blank"
16
+ startIcon={ <CrownFilledIcon /> }
17
+ { ...props }
18
+ >
19
+ { children ?? __( 'Upgrade Now', 'elementor' ) }
20
+ </Button>
21
+ );
package/src/index.ts CHANGED
@@ -11,6 +11,7 @@ export { WarningInfotip } from './components/warning-infotip';
11
11
  export { GlobalDialog, openDialog, closeDialog } from './components/global-dialog';
12
12
  export { SearchField } from './components/search-field';
13
13
  export { Form } from './components/form';
14
+ export { UpgradeButton } from './components/upgrade-button';
14
15
 
15
16
  export * from './components/popover';
16
17
  export * from './components/save-changes-dialog';