@elementor/editor-controls 4.4.0-1143 → 4.4.0-1145

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
@@ -558,24 +558,37 @@ var NoticeControl = createControl(
558
558
  });
559
559
  };
560
560
  const handleActionClick = () => {
561
- setIsDismissed(true);
562
- if (dismissible) {
563
- markNoticeAsDismissedInSession(dismissible);
561
+ if (!dismissible) {
562
+ return;
564
563
  }
564
+ setIsDismissed(true);
565
+ markNoticeAsDismissedInSession(dismissible);
565
566
  };
566
- return /* @__PURE__ */ React13.createElement(Alert, { variant: "outlined", severity, icon, size: "small", onClose: handleDismiss }, heading && /* @__PURE__ */ React13.createElement(NoticeTitle, null, heading), /* @__PURE__ */ React13.createElement(Typography, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content), buttonText && buttonUrl && /* @__PURE__ */ React13.createElement(
567
- AlertAction,
567
+ return /* @__PURE__ */ React13.createElement(
568
+ Alert,
568
569
  {
569
- variant: "contained",
570
- color: severity,
571
- target: "_blank",
572
- rel: "noopener noreferrer",
573
- href: buttonUrl,
574
- onClick: handleActionClick,
575
- sx: { mt: 2 }
570
+ variant: "outlined",
571
+ severity,
572
+ icon,
573
+ size: "small",
574
+ onClose: dismissible ? handleDismiss : void 0
576
575
  },
577
- buttonText
578
- ));
576
+ heading && /* @__PURE__ */ React13.createElement(NoticeTitle, null, heading),
577
+ /* @__PURE__ */ React13.createElement(Typography, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content),
578
+ buttonText && buttonUrl && /* @__PURE__ */ React13.createElement(
579
+ AlertAction,
580
+ {
581
+ variant: "contained",
582
+ color: severity,
583
+ target: "_blank",
584
+ rel: "noopener noreferrer",
585
+ href: buttonUrl,
586
+ onClick: handleActionClick,
587
+ sx: { mt: 2 }
588
+ },
589
+ buttonText
590
+ )
591
+ );
579
592
  }
580
593
  );
581
594
 
@@ -7983,7 +7996,11 @@ var getGradientValue = (value) => {
7983
7996
  ({ value: { color, offset } }) => offset ? `${color.value} ${offset.value ?? 0}%` : `${color.value}`
7984
7997
  )?.join(",");
7985
7998
  if (gradient.type.value === "linear") {
7986
- return `linear-gradient(${gradient.angle.value}deg, ${stops})`;
7999
+ const angle = gradient.angle?.value;
8000
+ if (typeof angle !== "number") {
8001
+ return `linear-gradient(${stops})`;
8002
+ }
8003
+ return `linear-gradient(${angle}deg, ${stops})`;
7987
8004
  }
7988
8005
  return `radial-gradient(circle at ${gradient.positions.value}, ${stops})`;
7989
8006
  };