@eclass/ui-kit 1.52.10 → 1.52.11

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.
@@ -5762,6 +5762,7 @@ const useParseEvents = (events, now) => {
5762
5762
  const [tomorrowEvents, setTomorrowEvents] = useState([]);
5763
5763
  const [nextEvents, setNextEvents] = useState([]);
5764
5764
  const [hasNew, setHasNew] = useState(false);
5765
+ const [hasMoreNext, setHasMoreNext] = useState(false);
5765
5766
  useEffect(() => {
5766
5767
  var _a, _b;
5767
5768
  const parseNow = parseISO(now);
@@ -5794,6 +5795,7 @@ const useParseEvents = (events, now) => {
5794
5795
  setTomorrowEvents(tomorrowList);
5795
5796
  let next = [...nextList];
5796
5797
  if (nextList.length > 5) {
5798
+ setHasMoreNext(true);
5797
5799
  next = next.slice(0, 5);
5798
5800
  }
5799
5801
  setNextEvents(next);
@@ -5821,7 +5823,8 @@ const useParseEvents = (events, now) => {
5821
5823
  next: nextEvents,
5822
5824
  hasNew,
5823
5825
  closeAndMarkSeen,
5824
- empty
5826
+ empty,
5827
+ hasMoreNext
5825
5828
  };
5826
5829
  };
5827
5830
  const CalendarButtonIcon = () => /* @__PURE__ */ jsxs("svg", {
@@ -6059,55 +6062,73 @@ const EventsGroup = ({
6059
6062
  title,
6060
6063
  events,
6061
6064
  text,
6062
- colors: colors2
6065
+ textSeeMore,
6066
+ textLinkMore,
6067
+ colors: colors2,
6068
+ redirect,
6069
+ hasMoreNext
6063
6070
  }) => {
6064
6071
  var _a;
6065
6072
  if (!events || events && events.length === 0)
6066
6073
  return /* @__PURE__ */ jsx(Fragment, {});
6067
- return /* @__PURE__ */ jsx(Box, {
6068
- className: "calendar-events-group",
6069
- _focus: {
6070
- background: "none !important",
6071
- border: `1px solid ${(_a = vars("colors-icon-deepSkyBlue")) != null ? _a : "#0189FF"}`
6072
- },
6073
- sx: {
6074
- ".chakra-menu__menuitem > div": {
6075
- w: "100%"
6076
- }
6077
- },
6078
- children: /* @__PURE__ */ jsx(MenuGroup, {
6079
- title,
6080
- children: events.map((event) => {
6081
- var _a2;
6082
- return /* @__PURE__ */ jsx(Box, {
6083
- bg: (_a2 = vars("colors-neutral-white")) != null ? _a2 : "#FFFFFF",
6084
- border: "none",
6085
- cursor: "default",
6086
- padding: "0",
6087
- _hover: {
6088
- boxShadow: "none !important",
6089
- cursor: "default !important",
6090
- bg: "none !important"
6091
- },
6092
- _focus: {
6093
- background: "none !important",
6094
- boxShadow: "none !important"
6095
- },
6096
- children: /* @__PURE__ */ jsx(EventsList, {
6097
- name: event.associated_resource.name || "",
6098
- courseName: event.course.name,
6099
- day: event.formatedDate.day,
6100
- date: event.formatedDate.date,
6101
- time: event.formatedDate.time,
6102
- color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]) ? colors2[event.course_id] : "#82504A",
6103
- text,
6104
- type: event.type,
6105
- hasNotification: event.isNew,
6106
- showCourse: true
6107
- }, event.id)
6108
- }, event.id);
6074
+ return /* @__PURE__ */ jsxs(Fragment, {
6075
+ children: [/* @__PURE__ */ jsx(Box, {
6076
+ className: "calendar-events-group",
6077
+ _focus: {
6078
+ background: "none !important",
6079
+ border: `1px solid ${(_a = vars("colors-icon-deepSkyBlue")) != null ? _a : "#0189FF"}`
6080
+ },
6081
+ sx: {
6082
+ ".chakra-menu__menuitem > div": {
6083
+ w: "100%"
6084
+ }
6085
+ },
6086
+ children: /* @__PURE__ */ jsx(MenuGroup, {
6087
+ title,
6088
+ children: events.map((event) => {
6089
+ var _a2;
6090
+ return /* @__PURE__ */ jsx(Box, {
6091
+ bg: (_a2 = vars("colors-neutral-white")) != null ? _a2 : "#FFFFFF",
6092
+ border: "none",
6093
+ cursor: "default",
6094
+ padding: "0",
6095
+ _hover: {
6096
+ boxShadow: "none !important",
6097
+ cursor: "default !important",
6098
+ bg: "none !important"
6099
+ },
6100
+ _focus: {
6101
+ background: "none !important",
6102
+ boxShadow: "none !important"
6103
+ },
6104
+ children: /* @__PURE__ */ jsx(EventsList, {
6105
+ name: event.associated_resource.name || "",
6106
+ courseName: event.course.name,
6107
+ day: event.formatedDate.day,
6108
+ date: event.formatedDate.date,
6109
+ time: event.formatedDate.time,
6110
+ color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]) ? colors2[event.course_id] : "#82504A",
6111
+ text,
6112
+ type: event.type,
6113
+ hasNotification: event.isNew,
6114
+ showCourse: true
6115
+ }, event.id)
6116
+ }, event.id);
6117
+ })
6109
6118
  })
6110
- })
6119
+ }), hasMoreNext && /* @__PURE__ */ jsxs(Box, {
6120
+ display: "flex",
6121
+ alignItems: "center",
6122
+ padding: "16px 0 0 16px",
6123
+ children: [/* @__PURE__ */ jsx(Box, {
6124
+ as: "span",
6125
+ fontSize: "14px",
6126
+ children: textSeeMore
6127
+ }), " ", /* @__PURE__ */ jsx(BtnLink, {
6128
+ onClick: redirect,
6129
+ children: textLinkMore
6130
+ })]
6131
+ })]
6111
6132
  });
6112
6133
  };
6113
6134
  const Events = ({
@@ -6115,9 +6136,10 @@ const Events = ({
6115
6136
  text,
6116
6137
  redirecToCalendar,
6117
6138
  isMobile,
6118
- colors: colors2
6139
+ colors: colors2,
6140
+ hasMoreNext
6119
6141
  }) => {
6120
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
6142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
6121
6143
  const {
6122
6144
  today,
6123
6145
  tomorrow,
@@ -6146,7 +6168,7 @@ const Events = ({
6146
6168
  },
6147
6169
  children: /* @__PURE__ */ jsx(BtnPrimary, {
6148
6170
  onClick: redirecToCalendar,
6149
- m: "72px 0 0 24px",
6171
+ m: "72px 0 0 16px",
6150
6172
  id: "RedirectButton",
6151
6173
  children: (_b = text == null ? void 0 : text.buttonCalendar) != null ? _b : "Ir a Mi Calendario"
6152
6174
  })
@@ -6161,10 +6183,14 @@ const Events = ({
6161
6183
  title: (_h = (_g = text == null ? void 0 : text.events) == null ? void 0 : _g.tomorrow) != null ? _h : "Ma\xF1ana",
6162
6184
  events: tomorrow
6163
6185
  }), /* @__PURE__ */ jsx(EventsGroup, {
6186
+ hasMoreNext,
6164
6187
  colors: colors2,
6165
- text: (_i = text == null ? void 0 : text.course) != null ? _i : "",
6166
- title: (_k = (_j = text == null ? void 0 : text.events) == null ? void 0 : _j.next) != null ? _k : "Pr\xF3ximos",
6167
- events: next
6188
+ textSeeMore: (_i = text == null ? void 0 : text.seeMore.see) != null ? _i : "Ver m\xE1s fechas en",
6189
+ textLinkMore: (_j = text == null ? void 0 : text.seeMore.link) != null ? _j : "Mi calendario",
6190
+ text: (_k = text == null ? void 0 : text.course) != null ? _k : "",
6191
+ title: (_m = (_l = text == null ? void 0 : text.events) == null ? void 0 : _l.next) != null ? _m : "Pr\xF3ximos",
6192
+ events: next,
6193
+ redirect: redirecToCalendar
6168
6194
  })]
6169
6195
  });
6170
6196
  };
@@ -6184,6 +6210,7 @@ const CalendarDropdownContainer = ({
6184
6210
  closeAndMarkSeen,
6185
6211
  empty,
6186
6212
  hasNew,
6213
+ hasMoreNext,
6187
6214
  ...all
6188
6215
  } = useParseEvents(events, now);
6189
6216
  const [isTooltipDisabled, setTooltipDisabled] = useState(false);
@@ -6283,7 +6310,7 @@ const CalendarDropdownContainer = ({
6283
6310
  fontWeight: "700",
6284
6311
  lineHeight: "31px",
6285
6312
  margin: "32px 0 0",
6286
- padding: "0 0 8px 24px"
6313
+ padding: "0 0 8px 16px"
6287
6314
  },
6288
6315
  ".react-ripples": {
6289
6316
  width: "inherit"
@@ -6310,6 +6337,7 @@ const CalendarDropdownContainer = ({
6310
6337
  }) : events.length === 0 || empty ? /* @__PURE__ */ jsx(Empty, {
6311
6338
  text: (_g = text == null ? void 0 : text.empty) != null ? _g : "A\xFAn no tienes eventos en tu calendario"
6312
6339
  }) : /* @__PURE__ */ jsx(Events, {
6340
+ hasMoreNext,
6313
6341
  colors: courseColors,
6314
6342
  events: all,
6315
6343
  text,
@@ -6398,7 +6426,7 @@ const EventsList = ({
6398
6426
  return /* @__PURE__ */ jsxs(Box, {
6399
6427
  className: "eventsList",
6400
6428
  borderTop: border,
6401
- p: "16px 24px",
6429
+ p: "16px",
6402
6430
  display: "flex",
6403
6431
  gap: "12px",
6404
6432
  children: [/* @__PURE__ */ jsxs(Box, {