@elementor/editor-ui 4.0.0-549 → 4.0.0-550

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.js CHANGED
@@ -600,24 +600,20 @@ var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React16.create
600
600
  role: "dialog",
601
601
  "aria-label": "promotion-alert",
602
602
  size: "small",
603
- sx: { m: 2, mt: 1, mb: 1, pt: 0.25, pb: 1 }
603
+ sx: { m: 2, mt: 1, pt: 0.5, pb: 0.5 }
604
604
  },
605
605
  message,
606
606
  /* @__PURE__ */ React16.createElement(
607
- import_ui16.Box,
607
+ import_ui16.Button,
608
608
  {
609
- component: "a",
610
- href: upgradeUrl,
609
+ size: "tiny",
610
+ variant: "text",
611
+ color: "promotion",
611
612
  target: "_blank",
613
+ href: upgradeUrl,
612
614
  rel: "noopener noreferrer",
613
- sx: {
614
- display: "flex",
615
- alignItems: "center",
616
- gap: 0.5,
617
- color: "promotion.main"
618
- }
615
+ startIcon: /* @__PURE__ */ React16.createElement(import_icons7.CrownFilledIcon, { fontSize: "tiny" })
619
616
  },
620
- /* @__PURE__ */ React16.createElement(import_icons7.CrownFilledIcon, { fontSize: "tiny" }),
621
617
  (0, import_i18n4.__)("Upgrade now", "elementor")
622
618
  )
623
619
  );
package/dist/index.mjs CHANGED
@@ -554,7 +554,7 @@ var PromotionChip = React15.forwardRef(({ ...props }, ref) => {
554
554
  // src/components/promotion-alert.tsx
555
555
  import * as React16 from "react";
556
556
  import { CrownFilledIcon as CrownFilledIcon4 } from "@elementor/icons";
557
- import { Alert as Alert4, Box as Box6 } from "@elementor/ui";
557
+ import { Alert as Alert4, Button as Button4 } from "@elementor/ui";
558
558
  import { __ as __4 } from "@wordpress/i18n";
559
559
  var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React16.createElement(
560
560
  Alert4,
@@ -565,24 +565,20 @@ var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React16.create
565
565
  role: "dialog",
566
566
  "aria-label": "promotion-alert",
567
567
  size: "small",
568
- sx: { m: 2, mt: 1, mb: 1, pt: 0.25, pb: 1 }
568
+ sx: { m: 2, mt: 1, pt: 0.5, pb: 0.5 }
569
569
  },
570
570
  message,
571
571
  /* @__PURE__ */ React16.createElement(
572
- Box6,
572
+ Button4,
573
573
  {
574
- component: "a",
575
- href: upgradeUrl,
574
+ size: "tiny",
575
+ variant: "text",
576
+ color: "promotion",
576
577
  target: "_blank",
578
+ href: upgradeUrl,
577
579
  rel: "noopener noreferrer",
578
- sx: {
579
- display: "flex",
580
- alignItems: "center",
581
- gap: 0.5,
582
- color: "promotion.main"
583
- }
580
+ startIcon: /* @__PURE__ */ React16.createElement(CrownFilledIcon4, { fontSize: "tiny" })
584
581
  },
585
- /* @__PURE__ */ React16.createElement(CrownFilledIcon4, { fontSize: "tiny" }),
586
582
  __4("Upgrade now", "elementor")
587
583
  )
588
584
  );
@@ -617,13 +613,13 @@ function useFloatingActionsBar() {
617
613
 
618
614
  // src/components/popover/body.tsx
619
615
  import * as React18 from "react";
620
- import { Box as Box7 } from "@elementor/ui";
616
+ import { Box as Box6 } from "@elementor/ui";
621
617
  var SECTION_PADDING_INLINE = 32;
622
618
  var DEFAULT_POPOVER_HEIGHT = 348;
623
619
  var FALLBACK_POPOVER_WIDTH = 220;
624
620
  var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) => {
625
621
  return /* @__PURE__ */ React18.createElement(
626
- Box7,
622
+ Box6,
627
623
  {
628
624
  display: "flex",
629
625
  flexDirection: "column",
@@ -675,7 +671,7 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
675
671
  // src/components/popover/menu-list.tsx
676
672
  import * as React21 from "react";
677
673
  import { useEffect as useEffect8, useMemo, useRef as useRef4 } from "react";
678
- import { Box as Box8, ListItem, MenuList, MenuSubheader, styled as styled4, useTheme } from "@elementor/ui";
674
+ import { Box as Box7, ListItem, MenuList, MenuSubheader, styled as styled4, useTheme } from "@elementor/ui";
679
675
  import { useVirtualizer } from "@tanstack/react-virtual";
680
676
 
681
677
  // src/hooks/use-scroll-to-selected.ts
@@ -796,7 +792,7 @@ var PopoverMenuList = ({
796
792
  }, [items]);
797
793
  useScrollToSelected({ selectedValue, items, virtualizer });
798
794
  const virtualItems = virtualizer.getVirtualItems();
799
- return /* @__PURE__ */ React21.createElement(Box8, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React21.createElement(
795
+ return /* @__PURE__ */ React21.createElement(Box7, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React21.createElement(
800
796
  MenuListComponent,
801
797
  {
802
798
  role: "listbox",
@@ -952,7 +948,7 @@ import * as React23 from "react";
952
948
  import { useState as useState7 } from "react";
953
949
  import { AlertTriangleFilledIcon, XIcon as XIcon2 } from "@elementor/icons";
954
950
  import {
955
- Button as Button4,
951
+ Button as Button5,
956
952
  Dialog as Dialog3,
957
953
  DialogActions as DialogActions2,
958
954
  DialogContent,
@@ -985,7 +981,7 @@ var SaveChangesDialogActions = ({ actions }) => {
985
981
  await confirm.action();
986
982
  setIsConfirming(false);
987
983
  };
988
- return /* @__PURE__ */ React23.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React23.createElement(Button4, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React23.createElement(Button4, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React23.createElement(Button4, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
984
+ return /* @__PURE__ */ React23.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React23.createElement(Button5, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React23.createElement(Button5, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React23.createElement(Button5, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
989
985
  };
990
986
  SaveChangesDialog.Title = SaveChangesDialogTitle;
991
987
  SaveChangesDialog.Content = SaveChangesDialogContent;
@@ -1002,7 +998,7 @@ var useDialog = () => {
1002
998
  import * as React24 from "react";
1003
999
  import { AlertOctagonFilledIcon } from "@elementor/icons";
1004
1000
  import {
1005
- Button as Button5,
1001
+ Button as Button6,
1006
1002
  Dialog as Dialog4,
1007
1003
  DialogActions as DialogActions3,
1008
1004
  DialogContent as DialogContent2,
@@ -1020,7 +1016,7 @@ var ConfirmationDialogActions = ({
1020
1016
  onConfirm,
1021
1017
  cancelLabel,
1022
1018
  confirmLabel
1023
- }) => /* @__PURE__ */ React24.createElement(DialogActions3, null, /* @__PURE__ */ React24.createElement(Button5, { color: "secondary", onClick: onClose }, cancelLabel ?? __5("Not now", "elementor")), /* @__PURE__ */ React24.createElement(Button5, { autoFocus: true, variant: "contained", color: "error", onClick: onConfirm }, confirmLabel ?? __5("Delete", "elementor")));
1019
+ }) => /* @__PURE__ */ React24.createElement(DialogActions3, null, /* @__PURE__ */ React24.createElement(Button6, { color: "secondary", onClick: onClose }, cancelLabel ?? __5("Not now", "elementor")), /* @__PURE__ */ React24.createElement(Button6, { autoFocus: true, variant: "contained", color: "error", onClick: onConfirm }, confirmLabel ?? __5("Delete", "elementor")));
1024
1020
  ConfirmationDialog.Title = ConfirmationDialogTitle;
1025
1021
  ConfirmationDialog.Content = ConfirmationDialogContent;
1026
1022
  ConfirmationDialog.ContentText = ConfirmationDialogContentText;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-ui",
3
3
  "description": "Elementor Editor UI",
4
- "version": "4.0.0-549",
4
+ "version": "4.0.0-550",
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": "4.0.0-549",
40
+ "@elementor/editor-v1-adapters": "4.0.0-550",
41
41
  "@elementor/icons": "^1.63.0",
42
42
  "@elementor/ui": "1.36.17",
43
43
  "@tanstack/react-virtual": "^3.13.3",
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { CrownFilledIcon } from '@elementor/icons';
3
- import { Alert, Box } from '@elementor/ui';
3
+ import { Alert, Button } from '@elementor/ui';
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
6
6
  type PromotionAlertProps = {
@@ -16,23 +16,19 @@ export const PromotionAlert = ( { message, upgradeUrl }: PromotionAlertProps ) =
16
16
  role="dialog"
17
17
  aria-label="promotion-alert"
18
18
  size="small"
19
- sx={ { m: 2, mt: 1, mb: 1, pt: 0.25, pb: 1 } }
19
+ sx={ { m: 2, mt: 1, pt: 0.5, pb: 0.5 } }
20
20
  >
21
21
  { message }
22
- <Box
23
- component="a"
24
- href={ upgradeUrl }
22
+ <Button
23
+ size={ 'tiny' }
24
+ variant={ 'text' }
25
+ color={ 'promotion' }
25
26
  target="_blank"
27
+ href={ upgradeUrl }
26
28
  rel="noopener noreferrer"
27
- sx={ {
28
- display: 'flex',
29
- alignItems: 'center',
30
- gap: 0.5,
31
- color: 'promotion.main',
32
- } }
29
+ startIcon={ <CrownFilledIcon fontSize="tiny" /> }
33
30
  >
34
- <CrownFilledIcon fontSize="tiny" />
35
31
  { __( 'Upgrade now', 'elementor' ) }
36
- </Box>
32
+ </Button>
37
33
  </Alert>
38
34
  );