@elementor/editor-global-classes 3.35.0-426 → 3.35.0-428

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.mjs CHANGED
@@ -587,7 +587,7 @@ import { __dispatch as dispatch4 } from "@elementor/store";
587
587
  import {
588
588
  Alert as Alert2,
589
589
  Box as Box10,
590
- Button as Button3,
590
+ Button as Button2,
591
591
  Chip as Chip4,
592
592
  DialogHeader as DialogHeader2,
593
593
  Divider as Divider4,
@@ -1553,16 +1553,8 @@ var InfoAlertMessage = ({ children }) => /* @__PURE__ */ React12.createElement(
1553
1553
  // src/components/class-manager/delete-confirmation-dialog.tsx
1554
1554
  import * as React13 from "react";
1555
1555
  import { createContext as createContext2, useContext as useContext2, useState as useState3 } from "react";
1556
- import { AlertOctagonFilledIcon } from "@elementor/icons";
1557
- import {
1558
- Button as Button2,
1559
- Dialog,
1560
- DialogActions as DialogActions2,
1561
- DialogContent as DialogContent2,
1562
- DialogContentText,
1563
- DialogTitle,
1564
- Typography as Typography5
1565
- } from "@elementor/ui";
1556
+ import { ConfirmationDialog } from "@elementor/editor-ui";
1557
+ import { Typography as Typography5 } from "@elementor/ui";
1566
1558
  import { __ as __10 } from "@wordpress/i18n";
1567
1559
  var context = createContext2(null);
1568
1560
  var DeleteConfirmationProvider = ({ children }) => {
@@ -1573,15 +1565,14 @@ var DeleteConfirmationProvider = ({ children }) => {
1573
1565
  const closeDialog2 = () => {
1574
1566
  setDialogProps(null);
1575
1567
  };
1576
- return /* @__PURE__ */ React13.createElement(context.Provider, { value: { openDialog: openDialog2, closeDialog: closeDialog2, dialogProps } }, children, !!dialogProps && /* @__PURE__ */ React13.createElement(DeleteConfirmationDialog, { ...dialogProps }));
1568
+ return /* @__PURE__ */ React13.createElement(context.Provider, { value: { openDialog: openDialog2, closeDialog: closeDialog2, dialogProps } }, children, !!dialogProps && /* @__PURE__ */ React13.createElement(DeleteClassDialog, { ...dialogProps }));
1577
1569
  };
1578
- var TITLE_ID = "delete-class-dialog";
1579
- var DeleteConfirmationDialog = ({ label, id: id2 }) => {
1570
+ var DeleteClassDialog = ({ label, id: id2 }) => {
1580
1571
  const { closeDialog: closeDialog2 } = useDeleteConfirmation();
1581
1572
  const {
1582
1573
  data: { total, content }
1583
1574
  } = useCssClassUsageByID(id2);
1584
- const onConfirm = () => {
1575
+ const handleConfirm = () => {
1585
1576
  closeDialog2();
1586
1577
  deleteClass(id2);
1587
1578
  };
@@ -1592,16 +1583,7 @@ var DeleteConfirmationDialog = ({ label, id: id2 }) => {
1592
1583
  "Will permanently remove it from your project and may affect the design across all elements using it. This action cannot be undone.",
1593
1584
  "elementor"
1594
1585
  );
1595
- return /* @__PURE__ */ React13.createElement(Dialog, { open: true, onClose: closeDialog2, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React13.createElement(DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React13.createElement(AlertOctagonFilledIcon, { color: "error" }), __10("Delete this class?", "elementor")), /* @__PURE__ */ React13.createElement(DialogContent2, null, /* @__PURE__ */ React13.createElement(DialogContentText, { variant: "body2", color: "textPrimary" }, __10("Deleting", "elementor"), /* @__PURE__ */ React13.createElement(Typography5, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), text)), /* @__PURE__ */ React13.createElement(DialogActions2, null, /* @__PURE__ */ React13.createElement(Button2, { color: "secondary", onClick: closeDialog2 }, __10("Not now", "elementor")), /* @__PURE__ */ React13.createElement(
1596
- Button2,
1597
- {
1598
- autoFocus: true,
1599
- variant: "contained",
1600
- color: "error",
1601
- onClick: onConfirm
1602
- },
1603
- __10("Delete", "elementor")
1604
- )));
1586
+ return /* @__PURE__ */ React13.createElement(ConfirmationDialog, { open: true, onClose: closeDialog2 }, /* @__PURE__ */ React13.createElement(ConfirmationDialog.Title, null, __10("Delete this class?", "elementor")), /* @__PURE__ */ React13.createElement(ConfirmationDialog.Content, null, /* @__PURE__ */ React13.createElement(ConfirmationDialog.ContentText, null, __10("Deleting", "elementor"), /* @__PURE__ */ React13.createElement(Typography5, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), text)), /* @__PURE__ */ React13.createElement(ConfirmationDialog.Actions, { onClose: closeDialog2, onConfirm: handleConfirm }));
1605
1587
  };
1606
1588
  var useDeleteConfirmation = () => {
1607
1589
  const contextValue = useContext2(context);
@@ -2160,7 +2142,7 @@ function ClassManagerPanel() {
2160
2142
  /* @__PURE__ */ React18.createElement(GlobalClassesList, { disabled: isPublishing })
2161
2143
  )
2162
2144
  ), /* @__PURE__ */ React18.createElement(PanelFooter, null, /* @__PURE__ */ React18.createElement(
2163
- Button3,
2145
+ Button2,
2164
2146
  {
2165
2147
  fullWidth: true,
2166
2148
  size: "small",