@eclass/ui-kit 1.51.21 → 1.52.0

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.
@@ -35444,11 +35444,15 @@ const EventsGroup = ({
35444
35444
  title,
35445
35445
  events,
35446
35446
  text,
35447
- colors: colors2
35447
+ colors: colors2,
35448
+ clickEvent
35448
35449
  }) => {
35449
35450
  var _a;
35450
35451
  if (!events || events && events.length === 0)
35451
35452
  return /* @__PURE__ */ jsx(Fragment, {});
35453
+ const handleClick = (event) => {
35454
+ clickEvent == null ? void 0 : clickEvent(event);
35455
+ };
35452
35456
  return /* @__PURE__ */ jsx(Box, {
35453
35457
  className: "calendar-events-group",
35454
35458
  _focus: {
@@ -35486,7 +35490,8 @@ const EventsGroup = ({
35486
35490
  color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]) ? colors2[event.course_id] : "#82504A",
35487
35491
  text,
35488
35492
  hasNotification: event.isNew,
35489
- isDropdown: true
35493
+ isDropdown: true,
35494
+ clickEvent: () => handleClick(event)
35490
35495
  }, event.id)
35491
35496
  }, event.id);
35492
35497
  })
@@ -35498,7 +35503,8 @@ const Events = ({
35498
35503
  text,
35499
35504
  redirecToCalendar,
35500
35505
  isMobile,
35501
- colors: colors2
35506
+ colors: colors2,
35507
+ clickEvent
35502
35508
  }) => {
35503
35509
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
35504
35510
  const {
@@ -35537,17 +35543,20 @@ const Events = ({
35537
35543
  colors: colors2,
35538
35544
  text: (_c = text == null ? void 0 : text.course) != null ? _c : "",
35539
35545
  title: (_e = (_d = text == null ? void 0 : text.events) == null ? void 0 : _d.today) != null ? _e : "Hoy",
35540
- events: today
35546
+ events: today,
35547
+ clickEvent
35541
35548
  }), /* @__PURE__ */ jsx(EventsGroup, {
35542
35549
  colors: colors2,
35543
35550
  text: (_f = text == null ? void 0 : text.course) != null ? _f : "",
35544
35551
  title: (_h = (_g = text == null ? void 0 : text.events) == null ? void 0 : _g.tomorrow) != null ? _h : "Ma\xF1ana",
35545
- events: tomorrow
35552
+ events: tomorrow,
35553
+ clickEvent
35546
35554
  }), /* @__PURE__ */ jsx(EventsGroup, {
35547
35555
  colors: colors2,
35548
35556
  text: (_i = text == null ? void 0 : text.course) != null ? _i : "",
35549
35557
  title: (_k = (_j = text == null ? void 0 : text.events) == null ? void 0 : _j.next) != null ? _k : "Pr\xF3ximos",
35550
- events: next2
35558
+ events: next2,
35559
+ clickEvent
35551
35560
  })]
35552
35561
  });
35553
35562
  };
@@ -35559,7 +35568,8 @@ const CalendarDropdownContainer = ({
35559
35568
  redirectToCalendar,
35560
35569
  courseColors,
35561
35570
  onlyToCalendar,
35562
- m: m2
35571
+ m: m2,
35572
+ clickEvent
35563
35573
  }) => {
35564
35574
  var _a, _b, _c, _d, _e, _f, _g;
35565
35575
  const [isMobile] = useMediaQuery("(max-width: 577px)");
@@ -35697,7 +35707,8 @@ const CalendarDropdownContainer = ({
35697
35707
  events: all,
35698
35708
  text,
35699
35709
  redirecToCalendar: redirectToCalendar,
35700
- isMobile
35710
+ isMobile,
35711
+ clickEvent
35701
35712
  })
35702
35713
  })]
35703
35714
  })]
@@ -35720,7 +35731,8 @@ const CalendarDropdown = ({
35720
35731
  events,
35721
35732
  loading,
35722
35733
  onlyToCalendar = false,
35723
- m: m2
35734
+ m: m2,
35735
+ clickEvent
35724
35736
  }) => {
35725
35737
  const date = new Date(now);
35726
35738
  const isoDate = date.toISOString();
@@ -35732,7 +35744,8 @@ const CalendarDropdown = ({
35732
35744
  courseColors,
35733
35745
  redirectToCalendar,
35734
35746
  text,
35735
- onlyToCalendar
35747
+ onlyToCalendar,
35748
+ clickEvent
35736
35749
  });
35737
35750
  };
35738
35751
  function Calendar(props) {
@@ -35783,75 +35796,85 @@ const EventsList = ({
35783
35796
  color: color2,
35784
35797
  text,
35785
35798
  date,
35786
- hours
35799
+ hours,
35800
+ clickEvent
35787
35801
  }) => {
35788
- var _a, _b;
35802
+ var _a, _b, _c, _d;
35789
35803
  const border2 = `1px solid ${(_a = vars("colors-neutral-platinum")) != null ? _a : "#E8E8E8"}`;
35790
- return /* @__PURE__ */ jsx(Box, {
35791
- className: "eventsList",
35792
- borderTop: border2,
35793
- padding: "16px 24px",
35794
- children: /* @__PURE__ */ jsxs(Box, {
35795
- display: "flex",
35796
- flexDirection: "column",
35797
- gap: "8px",
35798
- children: [/* @__PURE__ */ jsxs(Box, {
35799
- lineHeight: "21px",
35800
- display: "flex",
35801
- justifyContent: "space-between",
35802
- alignItems: "center",
35803
- fontSize: "16px",
35804
- children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
35805
- }), /* @__PURE__ */ jsxs(Box, {
35804
+ const handleClick = () => clickEvent == null ? void 0 : clickEvent();
35805
+ return /* @__PURE__ */ jsx(Ripples, {
35806
+ children: /* @__PURE__ */ jsx(Box, {
35807
+ className: "eventsList",
35808
+ borderTop: border2,
35809
+ padding: "16px 24px",
35810
+ onClick: handleClick,
35811
+ cursor: "pointer",
35812
+ bg: (_b = vars("colors-neutral-white")) != null ? _b : "#fff",
35813
+ _hover: {
35814
+ bg: (_c = vars("colors-neutral-cultured2")) != null ? _c : "#F8F8F8"
35815
+ },
35816
+ children: /* @__PURE__ */ jsxs(Box, {
35806
35817
  display: "flex",
35807
- lineHeight: "19px",
35808
- fontSize: "14px",
35809
- sx: {
35810
- svg: {
35811
- marginRight: "4px"
35812
- },
35813
- span: {
35814
- verticalAlign: "middle"
35815
- }
35816
- },
35818
+ flexDirection: "column",
35819
+ gap: "8px",
35817
35820
  children: [/* @__PURE__ */ jsxs(Box, {
35818
- paddingRight: "8px",
35819
- borderRight: border2,
35820
- children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx("span", {
35821
- children: date
35822
- })]
35823
- }), /* @__PURE__ */ jsxs(Box, {
35824
- paddingLeft: "8px",
35825
- children: [/* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx("span", {
35826
- children: hours
35827
- })]
35828
- })]
35829
- }), isDropdown && /* @__PURE__ */ jsxs(Box, {
35830
- display: "flex",
35831
- alignItems: "center",
35832
- gap: "4px",
35833
- lineHeight: "19px",
35834
- children: [/* @__PURE__ */ jsx(Box, {
35835
- alignSelf: "flex-start",
35836
- bg: color2,
35837
- borderRadius: "50%",
35838
- display: "block",
35839
- h: "10px",
35840
- mt: "4px",
35841
- maxH: "10px",
35842
- maxW: "10px",
35843
- minH: "10px",
35844
- minW: "10px",
35845
- w: "10px"
35821
+ lineHeight: "21px",
35822
+ display: "flex",
35823
+ justifyContent: "space-between",
35824
+ alignItems: "center",
35825
+ fontSize: "16px",
35826
+ children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
35846
35827
  }), /* @__PURE__ */ jsxs(Box, {
35847
- as: "span",
35848
- color: (_b = vars("colors-neutral-gray")) != null ? _b : "#808080",
35828
+ display: "flex",
35829
+ lineHeight: "19px",
35849
35830
  fontSize: "14px",
35850
- children: [/* @__PURE__ */ jsxs("strong", {
35851
- children: [text != null ? text : "Curso", ":"]
35852
- }), " ", courseName]
35831
+ sx: {
35832
+ svg: {
35833
+ marginRight: "4px"
35834
+ },
35835
+ span: {
35836
+ verticalAlign: "middle"
35837
+ }
35838
+ },
35839
+ children: [/* @__PURE__ */ jsxs(Box, {
35840
+ paddingRight: "8px",
35841
+ borderRight: border2,
35842
+ children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx("span", {
35843
+ children: date
35844
+ })]
35845
+ }), /* @__PURE__ */ jsxs(Box, {
35846
+ paddingLeft: "8px",
35847
+ children: [/* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx("span", {
35848
+ children: hours
35849
+ })]
35850
+ })]
35851
+ }), isDropdown && /* @__PURE__ */ jsxs(Box, {
35852
+ display: "flex",
35853
+ alignItems: "center",
35854
+ gap: "4px",
35855
+ lineHeight: "19px",
35856
+ children: [/* @__PURE__ */ jsx(Box, {
35857
+ alignSelf: "flex-start",
35858
+ bg: color2,
35859
+ borderRadius: "50%",
35860
+ display: "block",
35861
+ h: "10px",
35862
+ mt: "4px",
35863
+ maxH: "10px",
35864
+ maxW: "10px",
35865
+ minH: "10px",
35866
+ minW: "10px",
35867
+ w: "10px"
35868
+ }), /* @__PURE__ */ jsxs(Box, {
35869
+ as: "span",
35870
+ color: (_d = vars("colors-neutral-gray")) != null ? _d : "#808080",
35871
+ fontSize: "14px",
35872
+ children: [/* @__PURE__ */ jsxs("strong", {
35873
+ children: [text != null ? text : "Curso", ":"]
35874
+ }), " ", courseName]
35875
+ })]
35853
35876
  })]
35854
- })]
35877
+ })
35855
35878
  })
35856
35879
  });
35857
35880
  };