@eclass/ui-kit 1.45.3 → 1.46.1
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/atoms/Icons/Accessibility.d.ts +3 -0
- package/dist/eclass-ui-kit.es.js +85 -1
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +39 -39
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/molecules/UserWay/UserWay.d.ts +14 -0
- package/dist/molecules/index.d.ts +1 -0
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -29915,6 +29915,90 @@ const NewTooltip = ({
|
|
|
29915
29915
|
})
|
|
29916
29916
|
});
|
|
29917
29917
|
};
|
|
29918
|
+
function Accessibility(props) {
|
|
29919
|
+
return /* @__PURE__ */ jsx(Base, {
|
|
29920
|
+
...props,
|
|
29921
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
29922
|
+
width: "16",
|
|
29923
|
+
height: "16",
|
|
29924
|
+
viewBox: "0 0 16 16",
|
|
29925
|
+
fill: "none",
|
|
29926
|
+
stroke: "#60798E",
|
|
29927
|
+
strokeWidth: 0.5,
|
|
29928
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
29929
|
+
fillRule: "evenodd",
|
|
29930
|
+
clipRule: "evenodd",
|
|
29931
|
+
d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 5C8.82843 5 9.5 4.32843 9.5 3.5C9.5 2.67157 8.82843 2 8 2C7.17157 2 6.5 2.67157 6.5 3.5C6.5 4.32843 7.17157 5 8 5ZM2.96967 5.96967C3.11032 5.82902 3.30109 5.75 3.5 5.75H12.5C12.6989 5.75 12.8897 5.82902 13.0303 5.96967C13.171 6.11032 13.25 6.30109 13.25 6.5C13.25 6.69891 13.171 6.88968 13.0303 7.03033C12.8897 7.17098 12.6989 7.25 12.5 7.25H10.25V13.25C10.25 13.4489 10.171 13.6397 10.0303 13.7803C9.88968 13.921 9.69891 14 9.5 14C9.30109 14 9.11032 13.921 8.96967 13.7803C8.82902 13.6397 8.75 13.4489 8.75 13.25V10.25H7.25V13.25C7.25 13.4489 7.17098 13.6397 7.03033 13.7803C6.88968 13.921 6.69891 14 6.5 14C6.30109 14 6.11032 13.921 5.96967 13.7803C5.82902 13.6397 5.75 13.4489 5.75 13.25V7.25H3.5C3.30109 7.25 3.11032 7.17098 2.96967 7.03033C2.82902 6.88968 2.75 6.69891 2.75 6.5C2.75 6.30109 2.82902 6.11032 2.96967 5.96967Z",
|
|
29932
|
+
fill: "white"
|
|
29933
|
+
})
|
|
29934
|
+
})
|
|
29935
|
+
});
|
|
29936
|
+
}
|
|
29937
|
+
const waitForUserWay = async () => {
|
|
29938
|
+
return await new Promise((resolve, reject) => {
|
|
29939
|
+
const checkUserWay = () => {
|
|
29940
|
+
if (window.UserWay) {
|
|
29941
|
+
resolve();
|
|
29942
|
+
} else {
|
|
29943
|
+
requestAnimationFrame(checkUserWay);
|
|
29944
|
+
}
|
|
29945
|
+
};
|
|
29946
|
+
try {
|
|
29947
|
+
checkUserWay();
|
|
29948
|
+
} catch (error) {
|
|
29949
|
+
reject(new Error("UserWay script failed to load"));
|
|
29950
|
+
}
|
|
29951
|
+
});
|
|
29952
|
+
};
|
|
29953
|
+
function UserWay({
|
|
29954
|
+
accountId,
|
|
29955
|
+
color: color2 = "#0189FF"
|
|
29956
|
+
}) {
|
|
29957
|
+
const [isUserWayReady, setIsUserWayReady] = useState(false);
|
|
29958
|
+
useEffect(() => {
|
|
29959
|
+
if (!document.getElementById("userway-script")) {
|
|
29960
|
+
const script = document.createElement("script");
|
|
29961
|
+
script.id = "userway-script";
|
|
29962
|
+
script.src = "https://cdn.userway.org/widget.js";
|
|
29963
|
+
script.async = true;
|
|
29964
|
+
script.setAttribute("data-account", accountId);
|
|
29965
|
+
script.setAttribute("data-color", color2);
|
|
29966
|
+
script.setAttribute("data-trigger", "customTrigger");
|
|
29967
|
+
document.body.appendChild(script);
|
|
29968
|
+
}
|
|
29969
|
+
waitForUserWay().then(() => {
|
|
29970
|
+
setIsUserWayReady(true);
|
|
29971
|
+
return void 0;
|
|
29972
|
+
}).catch((error) => {
|
|
29973
|
+
console.error("Failed to load UserWay:", error);
|
|
29974
|
+
});
|
|
29975
|
+
}, [accountId, color2]);
|
|
29976
|
+
const handleButtonClick = () => {
|
|
29977
|
+
var _a;
|
|
29978
|
+
if (isUserWayReady && ((_a = window == null ? void 0 : window.UserWay) == null ? void 0 : _a.widgetOpen)) {
|
|
29979
|
+
window.UserWay.widgetOpen();
|
|
29980
|
+
} else {
|
|
29981
|
+
console.error("UserWay script not loaded yet.");
|
|
29982
|
+
}
|
|
29983
|
+
};
|
|
29984
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
29985
|
+
as: "button",
|
|
29986
|
+
alignItems: "center",
|
|
29987
|
+
bg: vars("colors-main-blueGrey"),
|
|
29988
|
+
borderRadius: "100%",
|
|
29989
|
+
border: "1px solid transparent",
|
|
29990
|
+
display: "flex",
|
|
29991
|
+
height: "30px",
|
|
29992
|
+
id: "customTrigger",
|
|
29993
|
+
justifyContent: "center",
|
|
29994
|
+
onClick: handleButtonClick,
|
|
29995
|
+
width: "30px",
|
|
29996
|
+
_hover: {
|
|
29997
|
+
background: "rgba(96, 121, 142, 0.8)"
|
|
29998
|
+
},
|
|
29999
|
+
children: /* @__PURE__ */ jsx(Accessibility, {})
|
|
30000
|
+
});
|
|
30001
|
+
}
|
|
29918
30002
|
const STUDENT = 4;
|
|
29919
30003
|
function Header() {
|
|
29920
30004
|
const {
|
|
@@ -33271,5 +33355,5 @@ const Resources = ({
|
|
|
33271
33355
|
})
|
|
33272
33356
|
});
|
|
33273
33357
|
};
|
|
33274
|
-
export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, CourseStatus, Eventos, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
|
|
33358
|
+
export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, CourseStatus, Eventos, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
|
|
33275
33359
|
//# sourceMappingURL=eclass-ui-kit.es.js.map
|