@eclass/ui-kit 1.57.8 → 1.57.10

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.
@@ -7331,7 +7331,7 @@ function FlashNotification({
7331
7331
  duration: ["success", "info"].includes(state) ? handleTime(message) : Infinity,
7332
7332
  id: alertStates[state].id
7333
7333
  });
7334
- }, [message, state, m2]);
7334
+ }, [message, state, m2, isMobile]);
7335
7335
  useEffect(() => {
7336
7336
  if (show) {
7337
7337
  showToast();
@@ -7622,6 +7622,25 @@ const Loading$1 = ({
7622
7622
  })]
7623
7623
  });
7624
7624
  };
7625
+ const sanitizeModalDescription = (description) => {
7626
+ const sanitizedDescription = purify.sanitize(description, {
7627
+ ADD_ATTR: ["target", "rel"]
7628
+ });
7629
+ const parsedDocument = new window.DOMParser().parseFromString(sanitizedDescription, "text/html");
7630
+ parsedDocument.querySelectorAll('a[target="_blank"]').forEach((anchor) => {
7631
+ var _a;
7632
+ const currentRel = (_a = anchor.getAttribute("rel")) != null ? _a : "";
7633
+ const relTokens = currentRel.split(/\s+/).filter(Boolean);
7634
+ if (!relTokens.includes("noopener")) {
7635
+ relTokens.push("noopener");
7636
+ }
7637
+ if (!relTokens.includes("noreferrer")) {
7638
+ relTokens.push("noreferrer");
7639
+ }
7640
+ anchor.setAttribute("rel", relTokens.join(" "));
7641
+ });
7642
+ return parsedDocument.body.innerHTML;
7643
+ };
7625
7644
  const ModalAlertContent = ({
7626
7645
  type,
7627
7646
  title,
@@ -7630,7 +7649,7 @@ const ModalAlertContent = ({
7630
7649
  children
7631
7650
  }) => {
7632
7651
  const [isDesktop] = useMediaQuery("(min-width: 641px)");
7633
- const descriptionParsed = typeof description === "string" ? ReactParser(purify.sanitize(description)) : description;
7652
+ const descriptionParsed = typeof description === "string" ? ReactParser(sanitizeModalDescription(description)) : description;
7634
7653
  return /* @__PURE__ */ jsxs(Fragment, {
7635
7654
  children: [/* @__PURE__ */ jsxs(ModalBody, {
7636
7655
  p: "32px",
@@ -9159,11 +9178,21 @@ const Url = () => {
9159
9178
  fill: "none",
9160
9179
  xmlns: "http://www.w3.org/2000/svg",
9161
9180
  children: [/* @__PURE__ */ jsx("path", {
9162
- d: "M38.5416 22.1768L33.6394 27.0768C33.5081 27.2102 33.4206 27.3611 33.2938 27.4989C35.6231 27.8201 37.785 28.8895 39.4537 30.5461C41.5013 32.5997 42.6511 35.3812 42.6511 38.2811C42.6511 41.181 41.5013 43.9626 39.4537 46.0161L27.4225 58.0474C25.3711 60.0988 22.5887 61.2513 19.6875 61.2513C16.7863 61.2513 14.004 60.0988 11.9525 58.0474C9.90105 55.9959 8.74856 53.2136 8.74856 50.3124C8.74856 47.4112 9.90105 44.6288 11.9525 42.5774L17.1697 37.3602C16.4134 34.4991 16.2423 31.5149 16.6666 28.5861L7.31281 37.9377C4.03084 41.2197 2.18705 45.671 2.18705 50.3124C2.18705 54.9538 4.03084 59.4051 7.31281 62.6871C10.5948 65.969 15.0461 67.8128 19.6875 67.8128C24.3289 67.8128 28.7802 65.969 32.0622 62.6871L44.0934 50.6558C46.1231 48.6313 47.6235 46.1386 48.4627 43.3975C49.3018 40.6563 49.4538 37.7508 48.9052 34.9371C48.3567 32.1233 47.1245 29.4877 45.3172 27.2625C43.5099 25.0372 41.183 23.2907 38.5416 22.1768Z",
9163
- fill: "white"
9181
+ stroke: "#fff",
9182
+ strokeWidth: 4,
9183
+ d: "M58.625 29.067 38.341 49.35"
9164
9184
  }), /* @__PURE__ */ jsx("path", {
9165
- d: "M37.9378 7.31274L25.9066 19.344C23.8769 21.3685 22.3765 23.8612 21.5373 26.6023C20.6982 29.3435 20.5462 32.249 21.0948 35.0627C21.6433 37.8765 22.8755 40.5121 24.6828 42.7373C26.4901 44.9626 28.817 46.7091 31.4584 47.8231L36.3606 42.9231C36.4919 42.7896 36.5947 42.6409 36.715 42.5009C34.3823 42.1823 32.2168 41.1127 30.5462 39.4537C28.4987 37.4001 27.3489 34.6186 27.3489 31.7187C27.3489 28.8188 28.4987 26.0372 30.5462 23.9837L42.5775 11.9524C44.629 9.90098 47.4113 8.74848 50.3125 8.74848C51.749 8.74848 53.1715 9.03143 54.4987 9.58116C55.8258 10.1309 57.0317 10.9367 58.0475 11.9524C59.0633 12.9682 59.869 14.1741 60.4188 15.5013C60.9685 16.8284 61.2514 18.2509 61.2514 19.6874C61.2514 21.1239 60.9685 22.5464 60.4188 23.8736C59.869 25.2008 59.0633 26.4067 58.0475 27.4224L52.8347 32.6331C53.5939 35.4851 53.7732 38.4605 53.3619 41.3831L62.6872 32.0577C65.9081 28.7633 67.6999 24.3316 67.6737 19.7243C67.6476 15.117 65.8055 10.7059 62.5473 7.44827C59.2891 4.19066 54.8777 2.34937 50.2704 2.324C45.6631 2.29862 41.2317 4.09121 37.9378 7.31274Z",
9166
- fill: "white"
9185
+ stroke: "#fff",
9186
+ strokeLinecap: "round",
9187
+ strokeWidth: 4,
9188
+ d: "M67.64 7.657H2.281V64H67.64V7.657ZM2.281 20.052H67.64"
9189
+ }), /* @__PURE__ */ jsx("path", {
9190
+ stroke: "#fff",
9191
+ strokeWidth: 4,
9192
+ d: "M40.59 29.067h18.03v18.03"
9193
+ }), /* @__PURE__ */ jsx("path", {
9194
+ fill: "#fff",
9195
+ d: "M8.48 15.544a1.69 1.69 0 1 0 0-3.38 1.69 1.69 0 0 0 0 3.38ZM15.24 15.544a1.69 1.69 0 1 0 0-3.38 1.69 1.69 0 0 0 0 3.38Z"
9167
9196
  })]
9168
9197
  });
9169
9198
  };
@@ -9214,6 +9243,8 @@ const StandardBackground = ({
9214
9243
  })]
9215
9244
  });
9216
9245
  };
9246
+ const StyledText = Text$1;
9247
+ const StyledLink = Link;
9217
9248
  const Resources = ({
9218
9249
  id,
9219
9250
  resourceType,
@@ -9249,7 +9280,7 @@ const Resources = ({
9249
9280
  };
9250
9281
  return colorMap[resourceType] || "#FFBC27";
9251
9282
  };
9252
- return /* @__PURE__ */ jsx(Link, {
9283
+ return /* @__PURE__ */ jsx(StyledLink, {
9253
9284
  href: resourceLink,
9254
9285
  target: targetBlank ? "_blank" : "_self",
9255
9286
  rel: targetBlank ? "noopener noreferrer" : void 0,
@@ -9271,7 +9302,6 @@ const Resources = ({
9271
9302
  textAlign: "center",
9272
9303
  alignItems: "center",
9273
9304
  display: "grid",
9274
- padding: "1rem",
9275
9305
  children: [/* @__PURE__ */ jsx(Icons, {
9276
9306
  type: resourceType
9277
9307
  }), /* @__PURE__ */ jsx(Box, {
@@ -9295,7 +9325,7 @@ const Resources = ({
9295
9325
  gap: "8px",
9296
9326
  padding: "1rem",
9297
9327
  children: [/* @__PURE__ */ jsx(Box, {
9298
- children: /* @__PURE__ */ jsx(Text$1, {
9328
+ children: /* @__PURE__ */ jsx(StyledText, {
9299
9329
  fontFamily: "Roboto",
9300
9330
  fontWeight: "700",
9301
9331
  lineHeight: "21px",
@@ -9305,7 +9335,7 @@ const Resources = ({
9305
9335
  children: resourceTitle
9306
9336
  })
9307
9337
  }), /* @__PURE__ */ jsx(Box, {
9308
- children: /* @__PURE__ */ jsx(Text$1, {
9338
+ children: /* @__PURE__ */ jsx(StyledText, {
9309
9339
  fontFamily: "Roboto",
9310
9340
  fontWeight: "400",
9311
9341
  lineHeight: "14px",
@@ -9318,7 +9348,7 @@ const Resources = ({
9318
9348
  display: "flex",
9319
9349
  alignItems: "center",
9320
9350
  justifyContent: "center",
9321
- children: /* @__PURE__ */ jsxs(Text$1, {
9351
+ children: /* @__PURE__ */ jsxs(StyledText, {
9322
9352
  fontFamily: "Roboto",
9323
9353
  fontWeight: "500",
9324
9354
  fontSize: "14px",