@eclass/ui-kit 1.59.0 → 1.59.2
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 +31 -15
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +4 -4
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/molecules/Avatar/Avatar.d.ts.map +1 -1
- package/dist/organisms/User/Dropdown/hooks/useHideBackgroundOnMobile.d.ts.map +1 -1
- package/dist/organisms/User/Dropdown/utils/getIconToRender.d.ts +1 -1
- package/dist/organisms/User/Dropdown/utils/getIconToRender.d.ts.map +1 -1
- package/dist/organisms/User/{UserDropdownMenu.d.ts → UserDropdown.d.ts} +3 -4
- package/dist/organisms/User/UserDropdown.d.ts.map +1 -0
- package/dist/organisms/User/index.d.ts +1 -1
- package/dist/organisms/User/index.d.ts.map +1 -1
- package/dist/organisms/User/menuProfileStyle.d.ts +1 -0
- package/dist/organisms/User/menuProfileStyle.d.ts.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/organisms/User/UserDropdownMenu.d.ts.map +0 -1
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -6794,7 +6794,8 @@ const Avatar = ({
|
|
|
6794
6794
|
justifyContent: "center",
|
|
6795
6795
|
margin: 0,
|
|
6796
6796
|
overflow: "hidden",
|
|
6797
|
-
width: `${size}px
|
|
6797
|
+
width: `${size}px`,
|
|
6798
|
+
boxSizing: "border-box"
|
|
6798
6799
|
};
|
|
6799
6800
|
const initialsStyle = {
|
|
6800
6801
|
color: "#fff",
|
|
@@ -6805,8 +6806,10 @@ const Avatar = ({
|
|
|
6805
6806
|
textTransform: "uppercase"
|
|
6806
6807
|
};
|
|
6807
6808
|
const imgStyle = {
|
|
6808
|
-
height: "
|
|
6809
|
-
|
|
6809
|
+
height: "100%",
|
|
6810
|
+
width: "100%",
|
|
6811
|
+
objectFit: "cover",
|
|
6812
|
+
display: "block"
|
|
6810
6813
|
};
|
|
6811
6814
|
if (!fullName || fullName.length === 0) {
|
|
6812
6815
|
return /* @__PURE__ */ jsx("figure", {
|
|
@@ -10502,7 +10505,8 @@ const profileStyle = {
|
|
|
10502
10505
|
_hover: {
|
|
10503
10506
|
background: vars("colors-neutral-cultured"),
|
|
10504
10507
|
MenuItemShadow: "none",
|
|
10505
|
-
boxShadow: "none"
|
|
10508
|
+
boxShadow: "none",
|
|
10509
|
+
textDecoration: "none"
|
|
10506
10510
|
},
|
|
10507
10511
|
_focus: {
|
|
10508
10512
|
boxShadow: `0 0 0 3px ${vars("colors-icon-deepSkyBlue")} inset`
|
|
@@ -10578,6 +10582,11 @@ const useHideBackgroundOnMobile = (isOpen) => {
|
|
|
10578
10582
|
useEffect(() => {
|
|
10579
10583
|
if (!isMobile)
|
|
10580
10584
|
return;
|
|
10585
|
+
if (isOpen) {
|
|
10586
|
+
document.body.style.overflow = "hidden";
|
|
10587
|
+
} else {
|
|
10588
|
+
document.body.style.overflow = "";
|
|
10589
|
+
}
|
|
10581
10590
|
const viewContainer = document.getElementById("ViewContainer");
|
|
10582
10591
|
if (viewContainer) {
|
|
10583
10592
|
viewContainer.style.display = isOpen ? "none" : "";
|
|
@@ -10597,6 +10606,7 @@ const useHideBackgroundOnMobile = (isOpen) => {
|
|
|
10597
10606
|
targetElement.style.display = isOpen ? "none" : "";
|
|
10598
10607
|
}
|
|
10599
10608
|
return () => {
|
|
10609
|
+
document.body.style.overflow = "";
|
|
10600
10610
|
const viewContainer2 = document.getElementById("ViewContainer");
|
|
10601
10611
|
if (viewContainer2) {
|
|
10602
10612
|
viewContainer2.style.display = "";
|
|
@@ -10810,9 +10820,7 @@ const CalendarIcon = () => {
|
|
|
10810
10820
|
})]
|
|
10811
10821
|
});
|
|
10812
10822
|
};
|
|
10813
|
-
const getMenuItemIcon = (type
|
|
10814
|
-
if (customIcon)
|
|
10815
|
-
return customIcon;
|
|
10823
|
+
const getMenuItemIcon = (type) => {
|
|
10816
10824
|
switch (type) {
|
|
10817
10825
|
case "courses":
|
|
10818
10826
|
return /* @__PURE__ */ jsx(CoursesIcon, {});
|
|
@@ -10832,7 +10840,7 @@ const StyledMenuButton = MenuButton;
|
|
|
10832
10840
|
const StyledMenuList = MenuList;
|
|
10833
10841
|
const StyledHeading = Heading;
|
|
10834
10842
|
const StyledMenuItem = MenuItem;
|
|
10835
|
-
const
|
|
10843
|
+
const UserDropdown = ({
|
|
10836
10844
|
userInfo,
|
|
10837
10845
|
menuItems,
|
|
10838
10846
|
isOpen: controlledIsOpen,
|
|
@@ -10868,24 +10876,33 @@ const UserDropdownMenu = ({
|
|
|
10868
10876
|
top: "30px",
|
|
10869
10877
|
width: "0"
|
|
10870
10878
|
},
|
|
10879
|
+
">div": {
|
|
10880
|
+
left: isMobile ? "0 !important" : "auto",
|
|
10881
|
+
position: isMobile ? "fixed !important" : "absolute",
|
|
10882
|
+
top: isMobile ? "52px !important" : "auto",
|
|
10883
|
+
transform: isMobile ? "none !important" : "auto"
|
|
10884
|
+
},
|
|
10871
10885
|
".chakra-menu__menu-list": {
|
|
10872
10886
|
animation: "none !important",
|
|
10873
10887
|
background: vars("colors-neutral-davysGrey"),
|
|
10874
10888
|
borderRadius: isMobile ? "0" : "10px",
|
|
10875
10889
|
boxShadow: isMobile ? "none" : "rgba(47, 47, 47, 0.2) -1px 6px 40px 0px",
|
|
10890
|
+
maxHeight: isMobile ? "calc(100vh - 62px)" : "auto",
|
|
10876
10891
|
opacity: "1 !important",
|
|
10892
|
+
overflowY: isMobile ? "auto" : "hidden",
|
|
10877
10893
|
padding: "15px 0 0",
|
|
10878
10894
|
position: "absolute",
|
|
10879
|
-
right: isMobile ? "
|
|
10895
|
+
right: isMobile ? "auto" : "-8px",
|
|
10896
|
+
top: isMobile ? "3px !important" : "auto",
|
|
10880
10897
|
transform: "none !important",
|
|
10881
10898
|
transition: "none !important",
|
|
10882
10899
|
width: isMobile ? "100vw" : "290px"
|
|
10883
10900
|
},
|
|
10884
10901
|
".content": {
|
|
10885
|
-
height: isMobile ? "
|
|
10902
|
+
height: isMobile ? "100%" : "auto",
|
|
10886
10903
|
borderRadius: !isMobile ? "10px" : "0",
|
|
10887
10904
|
bg: vars("colors-neutral-white"),
|
|
10888
|
-
">button": {
|
|
10905
|
+
">button, >chakra-link": {
|
|
10889
10906
|
borderBottom: isMobile ? `solid 1px ${vars("colors-neutral-platinum")}` : "none"
|
|
10890
10907
|
}
|
|
10891
10908
|
},
|
|
@@ -10903,11 +10920,11 @@ const UserDropdownMenu = ({
|
|
|
10903
10920
|
children: [/* @__PURE__ */ jsx(NewTooltip, {
|
|
10904
10921
|
label: "Mi perfil",
|
|
10905
10922
|
isDisabled: isTooltipDisabled,
|
|
10906
|
-
m: "7px 0 0 0",
|
|
10907
10923
|
children: /* @__PURE__ */ jsx(StyledMenuButton, {
|
|
10908
10924
|
background: "transparent",
|
|
10909
10925
|
border: "transparent",
|
|
10910
10926
|
height: "30px",
|
|
10927
|
+
lineHeight: "0",
|
|
10911
10928
|
p: "0",
|
|
10912
10929
|
_focusVisible: {
|
|
10913
10930
|
boxShadow: `0 0 0 3px ${vars("colors-alert-deepSkyBlue")}`,
|
|
@@ -10937,12 +10954,11 @@ const UserDropdownMenu = ({
|
|
|
10937
10954
|
children: menuItems.map((item) => {
|
|
10938
10955
|
const {
|
|
10939
10956
|
label,
|
|
10940
|
-
icon,
|
|
10941
10957
|
type,
|
|
10942
10958
|
href,
|
|
10943
10959
|
onClick
|
|
10944
10960
|
} = item;
|
|
10945
|
-
const view = getMenuItemIcon(type
|
|
10961
|
+
const view = getMenuItemIcon(type);
|
|
10946
10962
|
const isLogout = type === "logout";
|
|
10947
10963
|
return /* @__PURE__ */ jsx(StyledMenuItem, {
|
|
10948
10964
|
"aria-label": onClick ? "Bot\xF3n" : `V\xEDnculo, ${label}`,
|
|
@@ -10965,5 +10981,5 @@ const UserDropdownMenu = ({
|
|
|
10965
10981
|
})
|
|
10966
10982
|
});
|
|
10967
10983
|
};
|
|
10968
|
-
export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index$1 as Icons, Label, Modal, ModalAlert, ModalAlertButtons, ModalAlertNew, ModalButtons, ModalContent, ModalMultiple, NavBarButton, NewTooltip, Progress, Resources, Ripples, TinyAlert,
|
|
10984
|
+
export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index$1 as Icons, Label, Modal, ModalAlert, ModalAlertButtons, ModalAlertNew, ModalButtons, ModalContent, ModalMultiple, NavBarButton, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserDropdown, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
|
|
10969
10985
|
//# sourceMappingURL=eclass-ui-kit.es.js.map
|