@eclass/ui-kit 1.52.9 → 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.
- package/dist/eclass-ui-kit.es.js +99 -134
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +28 -28
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/CalendarDropdownContainer.d.ts.map +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/Events.d.ts +2 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/Events.d.ts.map +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/EventsGroup.d.ts +5 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/EventsGroup.d.ts.map +1 -1
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/services/parseEvents.d.ts +1 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/services/parseEvents.d.ts.map +1 -1
- package/dist/organisms/Calendar/Dropdown/types.d.ts +4 -0
- package/dist/organisms/Calendar/EventsList/EventsList.d.ts.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/atoms/Icons/Calendar.d.ts +0 -7
- package/dist/atoms/Icons/Calendar.d.ts.map +0 -1
- package/dist/atoms/Icons/Clock.d.ts +0 -7
- package/dist/atoms/Icons/Clock.d.ts.map +0 -1
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -4091,7 +4091,7 @@ function ModalAlert({
|
|
|
4091
4091
|
});
|
|
4092
4092
|
}
|
|
4093
4093
|
ModalAlert.displayName = "ModalAlert";
|
|
4094
|
-
const Calendar
|
|
4094
|
+
const Calendar = ({
|
|
4095
4095
|
color = "white"
|
|
4096
4096
|
}) => {
|
|
4097
4097
|
return /* @__PURE__ */ jsxs(Icon, {
|
|
@@ -4124,7 +4124,7 @@ const Calendar$1 = ({
|
|
|
4124
4124
|
})]
|
|
4125
4125
|
});
|
|
4126
4126
|
};
|
|
4127
|
-
const Clock
|
|
4127
|
+
const Clock = ({
|
|
4128
4128
|
color = "white"
|
|
4129
4129
|
}) => {
|
|
4130
4130
|
return /* @__PURE__ */ jsx(Icon, {
|
|
@@ -4201,7 +4201,7 @@ const LargeBox = ({
|
|
|
4201
4201
|
display: "flex",
|
|
4202
4202
|
alignItems: "center",
|
|
4203
4203
|
gap: "4px",
|
|
4204
|
-
children: [/* @__PURE__ */ jsx(Calendar
|
|
4204
|
+
children: [/* @__PURE__ */ jsx(Calendar, {
|
|
4205
4205
|
color: vars("colors-main-ziggurat")
|
|
4206
4206
|
}), /* @__PURE__ */ jsx(Text, {
|
|
4207
4207
|
fontWeight: "400",
|
|
@@ -4213,7 +4213,7 @@ const LargeBox = ({
|
|
|
4213
4213
|
m: "0px",
|
|
4214
4214
|
p: "0px",
|
|
4215
4215
|
children: "|"
|
|
4216
|
-
}), /* @__PURE__ */ jsx(Clock
|
|
4216
|
+
}), /* @__PURE__ */ jsx(Clock, {
|
|
4217
4217
|
color: vars("colors-main-ziggurat")
|
|
4218
4218
|
}), /* @__PURE__ */ jsx(Text, {
|
|
4219
4219
|
m: "0px",
|
|
@@ -4302,14 +4302,14 @@ const SmallBox = ({
|
|
|
4302
4302
|
display: "flex",
|
|
4303
4303
|
alignItems: "center",
|
|
4304
4304
|
gap: "4px",
|
|
4305
|
-
children: [/* @__PURE__ */ jsx(Calendar
|
|
4305
|
+
children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx(Text, {
|
|
4306
4306
|
fontWeight: "400",
|
|
4307
4307
|
m: "0px",
|
|
4308
4308
|
children: startDate
|
|
4309
4309
|
}), /* @__PURE__ */ jsx(Text, {
|
|
4310
4310
|
m: "0px",
|
|
4311
4311
|
children: "|"
|
|
4312
|
-
}), /* @__PURE__ */ jsx(Clock
|
|
4312
|
+
}), /* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx(Text, {
|
|
4313
4313
|
m: "0px",
|
|
4314
4314
|
children: startTime
|
|
4315
4315
|
})]
|
|
@@ -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
|
-
|
|
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__ */
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
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,
|
|
@@ -6144,9 +6166,9 @@ const Events = ({
|
|
|
6144
6166
|
minH: "fit-content"
|
|
6145
6167
|
}
|
|
6146
6168
|
},
|
|
6147
|
-
children: /* @__PURE__ */ jsx(
|
|
6169
|
+
children: /* @__PURE__ */ jsx(BtnPrimary, {
|
|
6148
6170
|
onClick: redirecToCalendar,
|
|
6149
|
-
m: "72px 0 0
|
|
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
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
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
|
|
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,
|
|
@@ -6352,33 +6380,6 @@ const CalendarDropdown = ({
|
|
|
6352
6380
|
onlyToCalendar
|
|
6353
6381
|
});
|
|
6354
6382
|
};
|
|
6355
|
-
function Calendar(props) {
|
|
6356
|
-
return /* @__PURE__ */ jsx(Base, {
|
|
6357
|
-
...props,
|
|
6358
|
-
title: "Calendar",
|
|
6359
|
-
children: /* @__PURE__ */ jsxs("g", {
|
|
6360
|
-
fill: "#B0CFE0",
|
|
6361
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
6362
|
-
fill: "#B0CFE0",
|
|
6363
|
-
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"
|
|
6364
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
6365
|
-
d: "M4 7h2v2H4zM7 7h2v2H7zM4 10h2v2H4zM7 10h2v2H7zM10 7h2v2h-2zM10 10h2v2h-2z"
|
|
6366
|
-
})]
|
|
6367
|
-
})
|
|
6368
|
-
});
|
|
6369
|
-
}
|
|
6370
|
-
Calendar.displayName = "Calendar";
|
|
6371
|
-
function Clock(props) {
|
|
6372
|
-
return /* @__PURE__ */ jsx(Base, {
|
|
6373
|
-
...props,
|
|
6374
|
-
title: "Clock",
|
|
6375
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
6376
|
-
fill: "#B0CFE0",
|
|
6377
|
-
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"
|
|
6378
|
-
})
|
|
6379
|
-
});
|
|
6380
|
-
}
|
|
6381
|
-
Clock.displayName = "Clock";
|
|
6382
6383
|
const NotificationIcon = () => /* @__PURE__ */ jsx("svg", {
|
|
6383
6384
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6384
6385
|
width: "8px",
|
|
@@ -6407,7 +6408,6 @@ const EventsList = ({
|
|
|
6407
6408
|
unitName
|
|
6408
6409
|
}) => {
|
|
6409
6410
|
var _a, _b;
|
|
6410
|
-
const [isMobile] = useMediaQuery("(max-width: 580px)");
|
|
6411
6411
|
const border = `1px solid ${(_a = vars("colors-neutral-platinum")) != null ? _a : "#E8E8E8"}`;
|
|
6412
6412
|
const initOrEnd = ["end-course", "init-course", "init-course-flexible", "end-course-flexible"].includes(type);
|
|
6413
6413
|
const dateTextStyle = {
|
|
@@ -6426,10 +6426,10 @@ const EventsList = ({
|
|
|
6426
6426
|
return /* @__PURE__ */ jsxs(Box, {
|
|
6427
6427
|
className: "eventsList",
|
|
6428
6428
|
borderTop: border,
|
|
6429
|
-
p: "16px
|
|
6429
|
+
p: "16px",
|
|
6430
6430
|
display: "flex",
|
|
6431
6431
|
gap: "12px",
|
|
6432
|
-
children: [
|
|
6432
|
+
children: [/* @__PURE__ */ jsxs(Box, {
|
|
6433
6433
|
bg: color,
|
|
6434
6434
|
minW: "80px",
|
|
6435
6435
|
minH: "80px",
|
|
@@ -6453,6 +6453,7 @@ const EventsList = ({
|
|
|
6453
6453
|
fontSize: "14px",
|
|
6454
6454
|
fontWeight: "700",
|
|
6455
6455
|
color: vars("colors-neutral-white"),
|
|
6456
|
+
lineHeight: "normal",
|
|
6456
6457
|
children: time
|
|
6457
6458
|
})]
|
|
6458
6459
|
}), /* @__PURE__ */ jsxs(Box, {
|
|
@@ -6466,59 +6467,23 @@ const EventsList = ({
|
|
|
6466
6467
|
justifyContent: "space-between",
|
|
6467
6468
|
alignItems: "center",
|
|
6468
6469
|
fontSize: "16px",
|
|
6469
|
-
fontWeight:
|
|
6470
|
+
fontWeight: "700",
|
|
6470
6471
|
children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
|
|
6471
|
-
}), isMobile && /* @__PURE__ */ jsxs(Box, {
|
|
6472
|
-
lineHeight: "normal",
|
|
6473
|
-
sx: {
|
|
6474
|
-
">svg": {
|
|
6475
|
-
marginRight: "4px"
|
|
6476
|
-
}
|
|
6477
|
-
},
|
|
6478
|
-
children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsxs(Box, {
|
|
6479
|
-
as: "span",
|
|
6480
|
-
verticalAlign: "middle",
|
|
6481
|
-
p: "0 8px 0 0",
|
|
6482
|
-
borderRight: `1px solid ${vars("colors-neutral-platinum")}`,
|
|
6483
|
-
mr: "8px",
|
|
6484
|
-
children: [day, " ", date]
|
|
6485
|
-
}), /* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx(Box, {
|
|
6486
|
-
as: "span",
|
|
6487
|
-
verticalAlign: "middle",
|
|
6488
|
-
children: time
|
|
6489
|
-
})]
|
|
6490
6472
|
}), showCourse && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
|
|
6473
|
+
as: "span",
|
|
6474
|
+
sx: detailTextStyle,
|
|
6475
|
+
children: [/* @__PURE__ */ jsx("strong", {
|
|
6476
|
+
children: text ? `${text}:` : "Curso:"
|
|
6477
|
+
}), " ", courseName]
|
|
6478
|
+
}), showUnit && !initOrEnd && /* @__PURE__ */ jsx(Box, {
|
|
6491
6479
|
display: "flex",
|
|
6492
6480
|
gap: "4px",
|
|
6493
6481
|
alignItems: "baseline",
|
|
6494
|
-
children:
|
|
6495
|
-
minH: "10px",
|
|
6496
|
-
minW: "10px",
|
|
6497
|
-
maxH: "10px",
|
|
6498
|
-
maxW: "10px",
|
|
6499
|
-
bg: color,
|
|
6500
|
-
borderRadius: "50%"
|
|
6501
|
-
}), /* @__PURE__ */ jsxs(Box, {
|
|
6502
|
-
as: "span",
|
|
6503
|
-
sx: detailTextStyle,
|
|
6504
|
-
children: [/* @__PURE__ */ jsx("strong", {
|
|
6505
|
-
children: text ? `${text}:` : "Curso:"
|
|
6506
|
-
}), " ", courseName]
|
|
6507
|
-
})]
|
|
6508
|
-
}), showUnit && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
|
|
6509
|
-
display: "flex",
|
|
6510
|
-
gap: "4px",
|
|
6511
|
-
alignItems: "baseline",
|
|
6512
|
-
children: [isMobile && /* @__PURE__ */ jsx(Box, {
|
|
6513
|
-
height: "10px",
|
|
6514
|
-
width: "10px",
|
|
6515
|
-
bg: color,
|
|
6516
|
-
borderRadius: "50%"
|
|
6517
|
-
}), /* @__PURE__ */ jsx(Box, {
|
|
6482
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
6518
6483
|
as: "span",
|
|
6519
6484
|
sx: detailTextStyle,
|
|
6520
6485
|
children: unitName
|
|
6521
|
-
})
|
|
6486
|
+
})
|
|
6522
6487
|
})]
|
|
6523
6488
|
})]
|
|
6524
6489
|
});
|