@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.
- package/dist/eclass-ui-kit.es.js +41 -11
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +30 -30
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/organisms/Modals/ModalAlert/ModalAlertContent.d.ts.map +1 -1
- package/dist/organisms/Resources/Icons/Url.d.ts.map +1 -1
- package/dist/organisms/Resources/Resources.d.ts.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -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(
|
|
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
|
-
|
|
9163
|
-
|
|
9181
|
+
stroke: "#fff",
|
|
9182
|
+
strokeWidth: 4,
|
|
9183
|
+
d: "M58.625 29.067 38.341 49.35"
|
|
9164
9184
|
}), /* @__PURE__ */ jsx("path", {
|
|
9165
|
-
|
|
9166
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
9351
|
+
children: /* @__PURE__ */ jsxs(StyledText, {
|
|
9322
9352
|
fontFamily: "Roboto",
|
|
9323
9353
|
fontWeight: "500",
|
|
9324
9354
|
fontSize: "14px",
|