@eclass/ui-kit 1.52.4 → 1.52.7

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.
@@ -6059,15 +6059,11 @@ const EventsGroup = ({
6059
6059
  title,
6060
6060
  events,
6061
6061
  text,
6062
- colors: colors2,
6063
- clickEvent
6062
+ colors: colors2
6064
6063
  }) => {
6065
6064
  var _a;
6066
6065
  if (!events || events && events.length === 0)
6067
6066
  return /* @__PURE__ */ jsx(Fragment, {});
6068
- const handleClick = (event) => {
6069
- clickEvent == null ? void 0 : clickEvent(event);
6070
- };
6071
6067
  return /* @__PURE__ */ jsx(Box, {
6072
6068
  className: "calendar-events-group",
6073
6069
  _focus: {
@@ -6100,13 +6096,14 @@ const EventsGroup = ({
6100
6096
  children: /* @__PURE__ */ jsx(EventsList, {
6101
6097
  name: event.associated_resource.name || "",
6102
6098
  courseName: event.course.name,
6103
- date: event.formatedDate.start,
6104
- hours: event.formatedDate.hours,
6099
+ day: event.formatedDate.day,
6100
+ date: event.formatedDate.date,
6101
+ time: event.formatedDate.time,
6105
6102
  color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]) ? colors2[event.course_id] : "#82504A",
6106
6103
  text,
6104
+ type: event.type,
6107
6105
  hasNotification: event.isNew,
6108
- isDropdown: true,
6109
- clickEvent: () => handleClick(event)
6106
+ showsCourseName: true
6110
6107
  }, event.id)
6111
6108
  }, event.id);
6112
6109
  })
@@ -6118,8 +6115,7 @@ const Events = ({
6118
6115
  text,
6119
6116
  redirecToCalendar,
6120
6117
  isMobile,
6121
- colors: colors2,
6122
- clickEvent
6118
+ colors: colors2
6123
6119
  }) => {
6124
6120
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
6125
6121
  const {
@@ -6158,20 +6154,17 @@ const Events = ({
6158
6154
  colors: colors2,
6159
6155
  text: (_c = text == null ? void 0 : text.course) != null ? _c : "",
6160
6156
  title: (_e = (_d = text == null ? void 0 : text.events) == null ? void 0 : _d.today) != null ? _e : "Hoy",
6161
- events: today,
6162
- clickEvent
6157
+ events: today
6163
6158
  }), /* @__PURE__ */ jsx(EventsGroup, {
6164
6159
  colors: colors2,
6165
6160
  text: (_f = text == null ? void 0 : text.course) != null ? _f : "",
6166
6161
  title: (_h = (_g = text == null ? void 0 : text.events) == null ? void 0 : _g.tomorrow) != null ? _h : "Ma\xF1ana",
6167
- events: tomorrow,
6168
- clickEvent
6162
+ events: tomorrow
6169
6163
  }), /* @__PURE__ */ jsx(EventsGroup, {
6170
6164
  colors: colors2,
6171
6165
  text: (_i = text == null ? void 0 : text.course) != null ? _i : "",
6172
6166
  title: (_k = (_j = text == null ? void 0 : text.events) == null ? void 0 : _j.next) != null ? _k : "Pr\xF3ximos",
6173
- events: next,
6174
- clickEvent
6167
+ events: next
6175
6168
  })]
6176
6169
  });
6177
6170
  };
@@ -6183,8 +6176,7 @@ const CalendarDropdownContainer = ({
6183
6176
  redirectToCalendar,
6184
6177
  courseColors,
6185
6178
  onlyToCalendar,
6186
- m: m2,
6187
- clickEvent
6179
+ m: m2
6188
6180
  }) => {
6189
6181
  var _a, _b, _c, _d, _e, _f, _g;
6190
6182
  const [isMobile] = useMediaQuery("(max-width: 577px)");
@@ -6322,8 +6314,7 @@ const CalendarDropdownContainer = ({
6322
6314
  events: all,
6323
6315
  text,
6324
6316
  redirecToCalendar: redirectToCalendar,
6325
- isMobile,
6326
- clickEvent
6317
+ isMobile
6327
6318
  })
6328
6319
  })]
6329
6320
  })]
@@ -6346,8 +6337,7 @@ const CalendarDropdown = ({
6346
6337
  events,
6347
6338
  loading,
6348
6339
  onlyToCalendar = false,
6349
- m: m2,
6350
- clickEvent
6340
+ m: m2
6351
6341
  }) => {
6352
6342
  const date = new Date(now);
6353
6343
  const isoDate = date.toISOString();
@@ -6359,8 +6349,7 @@ const CalendarDropdown = ({
6359
6349
  courseColors,
6360
6350
  redirectToCalendar,
6361
6351
  text,
6362
- onlyToCalendar,
6363
- clickEvent
6352
+ onlyToCalendar
6364
6353
  });
6365
6354
  };
6366
6355
  function Calendar(props) {
@@ -6404,93 +6393,113 @@ const NotificationIcon = () => /* @__PURE__ */ jsx("svg", {
6404
6393
  })
6405
6394
  });
6406
6395
  const EventsList = ({
6407
- hasNotification,
6408
- isDropdown,
6409
- name,
6410
6396
  courseName,
6411
6397
  color,
6412
- text,
6398
+ day,
6413
6399
  date,
6414
- hours,
6415
- clickEvent
6400
+ hasNotification,
6401
+ showsCourseName,
6402
+ time,
6403
+ name,
6404
+ text,
6405
+ type
6416
6406
  }) => {
6417
- var _a, _b, _c, _d;
6407
+ var _a, _b;
6408
+ const [isMobile] = useMediaQuery("(max-width: 580px)");
6418
6409
  const border = `1px solid ${(_a = vars("colors-neutral-platinum")) != null ? _a : "#E8E8E8"}`;
6419
- const handleClick = () => clickEvent == null ? void 0 : clickEvent();
6420
- return /* @__PURE__ */ jsx(Ripples, {
6421
- children: /* @__PURE__ */ jsx(Box, {
6422
- className: "eventsList",
6423
- borderTop: border,
6424
- padding: "16px 24px",
6425
- onClick: handleClick,
6426
- cursor: "pointer",
6427
- bg: (_b = vars("colors-neutral-white")) != null ? _b : "#fff",
6428
- _hover: {
6429
- bg: (_c = vars("colors-neutral-cultured2")) != null ? _c : "#F8F8F8"
6430
- },
6431
- children: /* @__PURE__ */ jsxs(Box, {
6410
+ const initOrEnd = ["end-course", "init-course", "init-course-flexible", "end-course-flexible"].includes(type);
6411
+ const dateTextStyle = {
6412
+ fontSize: "18px",
6413
+ fontWeight: "700",
6414
+ color: vars("colors-neutral-white"),
6415
+ lineHeight: "100%"
6416
+ };
6417
+ return /* @__PURE__ */ jsxs(Box, {
6418
+ className: "eventsList",
6419
+ borderTop: border,
6420
+ p: "16px 24px",
6421
+ display: "flex",
6422
+ gap: "12px",
6423
+ children: [!isMobile && /* @__PURE__ */ jsxs(Box, {
6424
+ bg: color,
6425
+ minW: "80px",
6426
+ minH: "80px",
6427
+ maxW: "80px",
6428
+ maxH: "80px",
6429
+ borderRadius: "4px",
6430
+ p: "8px",
6431
+ display: "flex",
6432
+ flexDirection: "column",
6433
+ justifyContent: "space-around",
6434
+ children: [/* @__PURE__ */ jsx(Box, {
6435
+ as: "span",
6436
+ sx: dateTextStyle,
6437
+ children: day
6438
+ }), /* @__PURE__ */ jsx(Box, {
6439
+ as: "span",
6440
+ sx: dateTextStyle,
6441
+ children: date
6442
+ }), /* @__PURE__ */ jsx(Box, {
6443
+ as: "span",
6444
+ fontSize: "14px",
6445
+ fontWeight: "700",
6446
+ color: vars("colors-neutral-white"),
6447
+ children: time
6448
+ })]
6449
+ }), /* @__PURE__ */ jsxs(Box, {
6450
+ display: "flex",
6451
+ flexDirection: "column",
6452
+ gap: "8px",
6453
+ children: [/* @__PURE__ */ jsxs(Box, {
6454
+ lineHeight: "21px",
6432
6455
  display: "flex",
6433
- flexDirection: "column",
6434
- gap: "8px",
6435
- children: [/* @__PURE__ */ jsxs(Box, {
6436
- lineHeight: "21px",
6437
- display: "flex",
6438
- justifyContent: "space-between",
6439
- alignItems: "center",
6440
- fontSize: "16px",
6441
- children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
6456
+ justifyContent: "space-between",
6457
+ alignItems: "center",
6458
+ fontSize: "16px",
6459
+ fontWeight: isMobile ? "400" : "700",
6460
+ children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
6461
+ }), isMobile && /* @__PURE__ */ jsxs(Box, {
6462
+ lineHeight: "normal",
6463
+ sx: {
6464
+ ">svg": {
6465
+ marginRight: "4px"
6466
+ }
6467
+ },
6468
+ children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsxs(Box, {
6469
+ as: "span",
6470
+ verticalAlign: "middle",
6471
+ p: "0 8px 0 0",
6472
+ borderRight: `1px solid ${vars("colors-neutral-platinum")}`,
6473
+ mr: "8px",
6474
+ children: [day, " ", date]
6475
+ }), /* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx(Box, {
6476
+ as: "span",
6477
+ verticalAlign: "middle",
6478
+ children: time
6479
+ })]
6480
+ }), showsCourseName && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
6481
+ display: "flex",
6482
+ gap: "4px",
6483
+ alignItems: "center",
6484
+ children: [isMobile && /* @__PURE__ */ jsx(Box, {
6485
+ height: "10px",
6486
+ width: "10px",
6487
+ bg: color,
6488
+ borderRadius: "50%"
6442
6489
  }), /* @__PURE__ */ jsxs(Box, {
6443
- display: "flex",
6444
- lineHeight: "19px",
6490
+ as: "span",
6491
+ color: (_b = vars("colors-neutral-gray")) != null ? _b : "#808080",
6445
6492
  fontSize: "14px",
6446
- sx: {
6447
- svg: {
6448
- marginRight: "4px"
6449
- },
6450
- span: {
6451
- verticalAlign: "middle"
6452
- }
6453
- },
6454
- children: [/* @__PURE__ */ jsxs(Box, {
6455
- paddingRight: "8px",
6456
- borderRight: border,
6457
- children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx("span", {
6458
- children: date
6459
- })]
6460
- }), /* @__PURE__ */ jsxs(Box, {
6461
- paddingLeft: "8px",
6462
- children: [/* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx("span", {
6463
- children: hours
6464
- })]
6465
- })]
6466
- }), isDropdown && /* @__PURE__ */ jsxs(Box, {
6467
6493
  display: "flex",
6468
6494
  alignItems: "center",
6469
6495
  gap: "4px",
6470
- lineHeight: "19px",
6471
- children: [/* @__PURE__ */ jsx(Box, {
6472
- alignSelf: "flex-start",
6473
- bg: color,
6474
- borderRadius: "50%",
6475
- display: "block",
6476
- h: "10px",
6477
- mt: "4px",
6478
- maxH: "10px",
6479
- maxW: "10px",
6480
- minH: "10px",
6481
- minW: "10px",
6482
- w: "10px"
6483
- }), /* @__PURE__ */ jsxs(Box, {
6484
- as: "span",
6485
- color: (_d = vars("colors-neutral-gray")) != null ? _d : "#808080",
6486
- fontSize: "14px",
6487
- children: [/* @__PURE__ */ jsxs("strong", {
6488
- children: [text != null ? text : "Curso", ":"]
6489
- }), " ", courseName]
6490
- })]
6496
+ lineHeight: "normal",
6497
+ children: [/* @__PURE__ */ jsx("strong", {
6498
+ children: text ? `${text}:` : "Curso:"
6499
+ }), " ", courseName]
6491
6500
  })]
6492
- })
6493
- })
6501
+ })]
6502
+ })]
6494
6503
  });
6495
6504
  };
6496
6505
  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 };