@eclass/ui-kit 1.51.9 → 1.51.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.
@@ -35221,21 +35221,7 @@ const CalendarButtonIcon = () => /* @__PURE__ */ jsxs("svg", {
35221
35221
  d: "M6 7H4v2h2V7ZM9 7H7v2h2V7ZM6 10H4v2h2v-2ZM9 10H7v2h2v-2ZM12 7h-2v2h2V7ZM12 10h-2v2h2v-2Z"
35222
35222
  })]
35223
35223
  });
35224
- const NotificationIcon = () => /* @__PURE__ */ jsx("svg", {
35225
- xmlns: "http://www.w3.org/2000/svg",
35226
- width: "8px",
35227
- height: "9px",
35228
- fill: "none",
35229
- className: "notification",
35230
- children: /* @__PURE__ */ jsx("circle", {
35231
- cx: "4px",
35232
- cy: "4.5px",
35233
- r: "4px",
35234
- fill: "#FF7A14"
35235
- })
35236
- });
35237
35224
  const GoToCalendar = ({
35238
- hasNew,
35239
35225
  text,
35240
35226
  tooltipDisabled,
35241
35227
  onlyToCalendar,
@@ -35246,7 +35232,7 @@ const GoToCalendar = ({
35246
35232
  label: text != null ? text : "Calendario",
35247
35233
  m: "2px 0 0 0",
35248
35234
  isDisabled: tooltipDisabled,
35249
- children: /* @__PURE__ */ jsxs(MenuButton, {
35235
+ children: /* @__PURE__ */ jsx(MenuButton, {
35250
35236
  onClick: () => onlyToCalendar && onClick && onClick(),
35251
35237
  background: (_a = vars("colors-main-blueGrey")) != null ? _a : "#60798E",
35252
35238
  border: "1px solid transparent",
@@ -35254,19 +35240,17 @@ const GoToCalendar = ({
35254
35240
  height: "30px",
35255
35241
  width: "30px",
35256
35242
  position: "relative",
35243
+ _hover: {
35244
+ bg: "rgba(96, 121, 142, 0.8)"
35245
+ },
35257
35246
  sx: {
35258
35247
  ">span": {
35259
35248
  lineHeight: "0",
35260
35249
  justifyItems: "center",
35261
35250
  alignContent: "center"
35262
- },
35263
- ".notification": {
35264
- position: "absolute",
35265
- top: "-1px",
35266
- right: "-1px"
35267
35251
  }
35268
35252
  },
35269
- children: [/* @__PURE__ */ jsx(CalendarButtonIcon, {}), !onlyToCalendar && hasNew && /* @__PURE__ */ jsx(NotificationIcon, {})]
35253
+ children: /* @__PURE__ */ jsx(CalendarButtonIcon, {})
35270
35254
  })
35271
35255
  });
35272
35256
  };
@@ -35293,7 +35277,7 @@ const Header = ({
35293
35277
  }), /* @__PURE__ */ jsx(Box, {
35294
35278
  className: "arrow",
35295
35279
  "aria-hidden": true,
35296
- borderBottom: (_c = `12px solid ${vars("colors-neutral-davysGrey")}`) != null ? _c : "12px solid #5C5C5C",
35280
+ borderBottom: `12px solid ${(_c = vars("colors-neutral-davysGrey")) != null ? _c : "#5C5C5C"}`,
35297
35281
  borderLeft: "14px solid transparent",
35298
35282
  borderRight: "14px solid transparent",
35299
35283
  display: isMobile ? "none" : "block",
@@ -35459,107 +35443,56 @@ const Empty = ({
35459
35443
  })]
35460
35444
  });
35461
35445
  };
35462
- function Calendar(props) {
35463
- return /* @__PURE__ */ jsx(Base, {
35464
- ...props,
35465
- title: "Calendar",
35466
- children: /* @__PURE__ */ jsxs("g", {
35467
- fill: "#B0CFE0",
35468
- children: [/* @__PURE__ */ jsx("path", {
35469
- fill: "#B0CFE0",
35470
- d: "M15 2h-2V0h-2v2H9V0H7v2H5V0H3v2H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1zm-1 12H2V5h12v9z"
35471
- }), /* @__PURE__ */ jsx("path", {
35472
- d: "M4 7h2v2H4zM7 7h2v2H7zM4 10h2v2H4zM7 10h2v2H7zM10 7h2v2h-2zM10 10h2v2h-2z"
35473
- })]
35474
- })
35475
- });
35476
- }
35477
- Calendar.displayName = "Calendar";
35478
- function Clock(props) {
35479
- return /* @__PURE__ */ jsx(Base, {
35480
- ...props,
35481
- title: "Clock",
35482
- children: /* @__PURE__ */ jsx("path", {
35483
- fill: "#B0CFE0",
35484
- d: "M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H7V4h2v3h3v2z"
35485
- })
35486
- });
35487
- }
35488
- Clock.displayName = "Clock";
35489
- const EventsList = ({
35490
- hasNotification,
35491
- isDropdown,
35492
- name,
35493
- courseName,
35494
- color: color2,
35446
+ const EventsGroup = ({
35447
+ title,
35448
+ events,
35495
35449
  text,
35496
- date,
35497
- hours
35450
+ colors: colors2
35498
35451
  }) => {
35499
- var _a, _b;
35500
- const border2 = (_a = `1px solid ${vars("colors-neutral-platinum")}`) != null ? _a : "1px solid #E8E8E8";
35501
- const bgColor = color2 || "#82504A";
35452
+ var _a;
35453
+ if (!events || events && events.length === 0)
35454
+ return /* @__PURE__ */ jsx(Fragment, {});
35502
35455
  return /* @__PURE__ */ jsx(Box, {
35503
- className: "eventsList",
35504
- borderTop: border2,
35505
- padding: "16px 24px",
35506
- children: /* @__PURE__ */ jsxs(Box, {
35507
- display: "flex",
35508
- flexDirection: "column",
35509
- gap: "8px",
35510
- children: [/* @__PURE__ */ jsxs(Box, {
35511
- lineHeight: "21px",
35512
- display: "flex",
35513
- justifyContent: "space-between",
35514
- alignItems: "center",
35515
- fontSize: "16px",
35516
- children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
35517
- }), /* @__PURE__ */ jsxs(Box, {
35518
- display: "flex",
35519
- lineHeight: "19px",
35520
- fontSize: "14px",
35521
- sx: {
35522
- svg: {
35523
- marginRight: "4px"
35456
+ className: "calendar-events-group",
35457
+ _focus: {
35458
+ background: "none !important",
35459
+ border: `1px solid ${(_a = vars("colors-icon-deepSkyBlue")) != null ? _a : "#0189FF"}`
35460
+ },
35461
+ sx: {
35462
+ ".chakra-menu__menuitem > div": {
35463
+ w: "100%"
35464
+ }
35465
+ },
35466
+ children: /* @__PURE__ */ jsx(MenuGroup, {
35467
+ title,
35468
+ children: events.map((event) => {
35469
+ var _a2;
35470
+ return /* @__PURE__ */ jsx(Box, {
35471
+ bg: (_a2 = vars("colors-neutral-white")) != null ? _a2 : "#FFFFFF",
35472
+ border: "none",
35473
+ cursor: "default",
35474
+ padding: "0",
35475
+ _hover: {
35476
+ boxShadow: "none !important",
35477
+ cursor: "default !important",
35478
+ bg: "none !important"
35524
35479
  },
35525
- span: {
35526
- verticalAlign: "middle"
35527
- }
35528
- },
35529
- children: [/* @__PURE__ */ jsxs(Box, {
35530
- paddingRight: "8px",
35531
- borderRight: border2,
35532
- children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx("span", {
35533
- children: date
35534
- })]
35535
- }), /* @__PURE__ */ jsxs(Box, {
35536
- paddingLeft: "8px",
35537
- children: [/* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx("span", {
35538
- children: hours
35539
- })]
35540
- })]
35541
- }), isDropdown && /* @__PURE__ */ jsxs(Box, {
35542
- display: "flex",
35543
- alignItems: "center",
35544
- gap: "4px",
35545
- lineHeight: "19px",
35546
- children: [/* @__PURE__ */ jsx(Box, {
35547
- h: "10px",
35548
- w: "10px",
35549
- bg: bgColor,
35550
- borderRadius: "50%",
35551
- display: "block",
35552
- alignSelf: "flex-start",
35553
- mt: "4px"
35554
- }), /* @__PURE__ */ jsxs(Box, {
35555
- as: "span",
35556
- color: (_b = vars("colors-neutral-gray")) != null ? _b : "#808080",
35557
- fontSize: "14px",
35558
- children: [/* @__PURE__ */ jsxs("strong", {
35559
- children: [text != null ? text : "Curso", ":"]
35560
- }), " ", courseName]
35561
- })]
35562
- })]
35480
+ _focus: {
35481
+ background: "none !important",
35482
+ boxShadow: "none !important"
35483
+ },
35484
+ children: /* @__PURE__ */ jsx(EventsList, {
35485
+ name: event.associated_resource.name || "",
35486
+ courseName: event.course.name,
35487
+ date: event.formatedDate.start,
35488
+ hours: event.formatedDate.hours,
35489
+ color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]) ? colors2[event.course_id] : "#82504A",
35490
+ text,
35491
+ hasNotification: event.isNew,
35492
+ isDropdown: true
35493
+ }, event.id)
35494
+ }, event.id);
35495
+ })
35563
35496
  })
35564
35497
  });
35565
35498
  };
@@ -35584,7 +35517,7 @@ const Events = ({
35584
35517
  pb: "32px",
35585
35518
  sx: {
35586
35519
  ".calendar-events-group": {
35587
- borderBottom: (_a = `1px solid ${vars("colors-neutral-platinum")}`) != null ? _a : "1px solid #E8E8E8"
35520
+ borderBottom: `1px solid ${(_a = vars("colors-neutral-platinum")) != null ? _a : "#E8E8E8"}`
35588
35521
  }
35589
35522
  },
35590
35523
  children: [redirecToCalendar && /* @__PURE__ */ jsx(Box, {
@@ -35621,74 +35554,17 @@ const Events = ({
35621
35554
  })]
35622
35555
  });
35623
35556
  };
35624
- const EventsGroup = ({
35625
- title,
35626
- events,
35627
- text,
35628
- colors: colors2
35629
- }) => {
35630
- var _a;
35631
- if (!events || events && events.length === 0)
35632
- return /* @__PURE__ */ jsx(Fragment, {});
35633
- return /* @__PURE__ */ jsx(Box, {
35634
- className: "calendar-events-group",
35635
- _focus: {
35636
- background: "none !important",
35637
- border: (_a = `1px solid ${vars("colors-icon-deepSkyBlue")}`) != null ? _a : "1px solid #0189FF"
35638
- },
35639
- sx: {
35640
- ".chakra-menu__menuitem > div": {
35641
- w: "100%"
35642
- }
35643
- },
35644
- children: /* @__PURE__ */ jsx(MenuGroup, {
35645
- title,
35646
- children: events.map((event) => {
35647
- var _a2;
35648
- return /* @__PURE__ */ jsx(
35649
- Box,
35650
- {
35651
- bg: (_a2 = vars("colors-neutral-white")) != null ? _a2 : "#FFFFFF",
35652
- border: "none",
35653
- cursor: "default",
35654
- padding: "0",
35655
- _hover: {
35656
- boxShadow: "none !important",
35657
- cursor: "default !important",
35658
- bg: "none !important"
35659
- },
35660
- _focus: {
35661
- background: "none !important",
35662
- boxShadow: "none !important"
35663
- },
35664
- children: /* @__PURE__ */ jsx(EventsList, {
35665
- name: event.associated_resource.name || "",
35666
- courseName: event.course.name,
35667
- date: event.formatedDate.start,
35668
- hours: event.formatedDate.hours,
35669
- color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]),
35670
- text,
35671
- hasNotification: event.isNew,
35672
- isDropdown: true
35673
- }, event.id)
35674
- },
35675
- event.id
35676
- );
35677
- })
35678
- })
35679
- });
35680
- };
35681
35557
  const CalendarDropdownContainer = ({
35682
35558
  events,
35683
35559
  loading,
35684
35560
  text,
35685
35561
  now,
35686
35562
  redirectToCalendar,
35687
- courseColors: colors2,
35563
+ courseColors,
35688
35564
  onlyToCalendar,
35689
35565
  m: m2
35690
35566
  }) => {
35691
- var _a, _b, _c, _d;
35567
+ var _a, _b, _c, _d, _e;
35692
35568
  const [isMobile] = useMediaQuery("(max-width: 577px)");
35693
35569
  const {
35694
35570
  closeAndMarkSeen,
@@ -35707,6 +35583,8 @@ const CalendarDropdownContainer = ({
35707
35583
  }
35708
35584
  }, [isMenuOpen]);
35709
35585
  useEffect(() => {
35586
+ if (!isMobile || onlyToCalendar)
35587
+ return;
35710
35588
  const viewContainer = document.getElementById("ViewContainer");
35711
35589
  if (viewContainer) {
35712
35590
  viewContainer.style.display = isMenuOpen ? "none" : "";
@@ -35732,10 +35610,22 @@ const CalendarDropdownContainer = ({
35732
35610
  };
35733
35611
  return /* @__PURE__ */ jsx(Box, {
35734
35612
  zIndex: 4,
35735
- className: "calendarDropdown",
35613
+ className: `calendarDropdown ${hasNew && !onlyToCalendar ? "hasNew" : ""}`,
35736
35614
  m: m2,
35737
35615
  position: "relative",
35738
35616
  sx: {
35617
+ "&.hasNew::before": {
35618
+ background: (_a = vars("colors-secondary-pumpkin")) != null ? _a : "#FF7A14",
35619
+ borderRadius: "50%",
35620
+ content: '""',
35621
+ display: "block",
35622
+ height: "8px",
35623
+ width: "8px",
35624
+ position: "absolute",
35625
+ right: "0",
35626
+ top: "0",
35627
+ zIndex: "1"
35628
+ },
35739
35629
  ">div": {
35740
35630
  position: isMobile ? "fixed !important" : "absolute",
35741
35631
  left: isMobile ? "0 !important" : "auto",
@@ -35773,21 +35663,20 @@ const CalendarDropdownContainer = ({
35773
35663
  onClose,
35774
35664
  children: /* @__PURE__ */ jsxs(Fragment, {
35775
35665
  children: [/* @__PURE__ */ jsx(GoToCalendar, {
35776
- hasNew: hasNew != null ? hasNew : false,
35777
- text: (_a = text == null ? void 0 : text.tooltip) != null ? _a : "Ir a Mi Calendario",
35666
+ text: (_b = text == null ? void 0 : text.tooltip) != null ? _b : "Ir a Mi Calendario",
35778
35667
  tooltipDisabled: isTooltipDisabled,
35779
35668
  onlyToCalendar,
35780
35669
  onClick: redirectToCalendar
35781
35670
  }), !onlyToCalendar && /* @__PURE__ */ jsxs(MenuList, {
35782
35671
  children: [/* @__PURE__ */ jsx(Header, {
35783
- text: (_b = text == null ? void 0 : text.header) != null ? _b : "Pr\xF3ximas fechas importantes de tus cursos",
35672
+ text: (_c = text == null ? void 0 : text.header) != null ? _c : "Pr\xF3ximas fechas importantes de tus cursos",
35784
35673
  isMobile
35785
35674
  }), loading ? /* @__PURE__ */ jsx(Loading, {
35786
- text: (_c = text == null ? void 0 : text.loading) != null ? _c : "Cargando"
35675
+ text: (_d = text == null ? void 0 : text.loading) != null ? _d : "Cargando"
35787
35676
  }) : events.length === 0 || empty ? /* @__PURE__ */ jsx(Empty, {
35788
- text: (_d = text == null ? void 0 : text.empty) != null ? _d : "A\xFAn no tienes eventos en tu calendario"
35677
+ text: (_e = text == null ? void 0 : text.empty) != null ? _e : "A\xFAn no tienes eventos en tu calendario"
35789
35678
  }) : /* @__PURE__ */ jsx(Events, {
35790
- colors: colors2,
35679
+ colors: courseColors,
35791
35680
  events: all,
35792
35681
  text,
35793
35682
  redirecToCalendar: redirectToCalendar,
@@ -35828,5 +35717,121 @@ const CalendarDropdown = ({
35828
35717
  onlyToCalendar
35829
35718
  });
35830
35719
  };
35720
+ function Calendar(props) {
35721
+ return /* @__PURE__ */ jsx(Base, {
35722
+ ...props,
35723
+ title: "Calendar",
35724
+ children: /* @__PURE__ */ jsxs("g", {
35725
+ fill: "#B0CFE0",
35726
+ children: [/* @__PURE__ */ jsx("path", {
35727
+ fill: "#B0CFE0",
35728
+ d: "M15 2h-2V0h-2v2H9V0H7v2H5V0H3v2H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1zm-1 12H2V5h12v9z"
35729
+ }), /* @__PURE__ */ jsx("path", {
35730
+ d: "M4 7h2v2H4zM7 7h2v2H7zM4 10h2v2H4zM7 10h2v2H7zM10 7h2v2h-2zM10 10h2v2h-2z"
35731
+ })]
35732
+ })
35733
+ });
35734
+ }
35735
+ Calendar.displayName = "Calendar";
35736
+ function Clock(props) {
35737
+ return /* @__PURE__ */ jsx(Base, {
35738
+ ...props,
35739
+ title: "Clock",
35740
+ children: /* @__PURE__ */ jsx("path", {
35741
+ fill: "#B0CFE0",
35742
+ d: "M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H7V4h2v3h3v2z"
35743
+ })
35744
+ });
35745
+ }
35746
+ Clock.displayName = "Clock";
35747
+ const NotificationIcon = () => /* @__PURE__ */ jsx("svg", {
35748
+ xmlns: "http://www.w3.org/2000/svg",
35749
+ width: "8px",
35750
+ height: "9px",
35751
+ fill: "none",
35752
+ className: "goToCalendarNotification",
35753
+ children: /* @__PURE__ */ jsx("circle", {
35754
+ cx: "4px",
35755
+ cy: "4.5px",
35756
+ r: "4px",
35757
+ fill: "#FF7A14"
35758
+ })
35759
+ });
35760
+ const EventsList = ({
35761
+ hasNotification,
35762
+ isDropdown,
35763
+ name,
35764
+ courseName,
35765
+ color: color2,
35766
+ text,
35767
+ date,
35768
+ hours
35769
+ }) => {
35770
+ var _a, _b;
35771
+ const border2 = `1px solid ${(_a = vars("colors-neutral-platinum")) != null ? _a : "#E8E8E8"}`;
35772
+ return /* @__PURE__ */ jsx(Box, {
35773
+ className: "eventsList",
35774
+ borderTop: border2,
35775
+ padding: "16px 24px",
35776
+ children: /* @__PURE__ */ jsxs(Box, {
35777
+ display: "flex",
35778
+ flexDirection: "column",
35779
+ gap: "8px",
35780
+ children: [/* @__PURE__ */ jsxs(Box, {
35781
+ lineHeight: "21px",
35782
+ display: "flex",
35783
+ justifyContent: "space-between",
35784
+ alignItems: "center",
35785
+ fontSize: "16px",
35786
+ children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
35787
+ }), /* @__PURE__ */ jsxs(Box, {
35788
+ display: "flex",
35789
+ lineHeight: "19px",
35790
+ fontSize: "14px",
35791
+ sx: {
35792
+ svg: {
35793
+ marginRight: "4px"
35794
+ },
35795
+ span: {
35796
+ verticalAlign: "middle"
35797
+ }
35798
+ },
35799
+ children: [/* @__PURE__ */ jsxs(Box, {
35800
+ paddingRight: "8px",
35801
+ borderRight: border2,
35802
+ children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx("span", {
35803
+ children: date
35804
+ })]
35805
+ }), /* @__PURE__ */ jsxs(Box, {
35806
+ paddingLeft: "8px",
35807
+ children: [/* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx("span", {
35808
+ children: hours
35809
+ })]
35810
+ })]
35811
+ }), isDropdown && /* @__PURE__ */ jsxs(Box, {
35812
+ display: "flex",
35813
+ alignItems: "center",
35814
+ gap: "4px",
35815
+ lineHeight: "19px",
35816
+ children: [/* @__PURE__ */ jsx(Box, {
35817
+ h: "10px",
35818
+ w: "10px",
35819
+ bg: color2,
35820
+ borderRadius: "50%",
35821
+ display: "block",
35822
+ alignSelf: "flex-start",
35823
+ mt: "4px"
35824
+ }), /* @__PURE__ */ jsxs(Box, {
35825
+ as: "span",
35826
+ color: (_b = vars("colors-neutral-gray")) != null ? _b : "#808080",
35827
+ fontSize: "14px",
35828
+ children: [/* @__PURE__ */ jsxs("strong", {
35829
+ children: [text != null ? text : "Curso", ":"]
35830
+ }), " ", courseName]
35831
+ })]
35832
+ })]
35833
+ })
35834
+ });
35835
+ };
35831
35836
  export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
35832
35837
  //# sourceMappingURL=eclass-ui-kit.es.js.map