@eclass/ui-kit 1.60.0 → 1.60.2

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.
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { BaseProps } from './Base';
3
+ export declare function MapIndicator(props: BaseProps): JSX.Element;
4
+ export declare namespace MapIndicator {
5
+ var displayName: string;
6
+ }
7
+ //# sourceMappingURL=MapIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapIndicator.d.ts","sourceRoot":"","sources":["../../../src/atoms/Icons/MapIndicator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAA;AAExC,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAU1D;yBAVe,YAAY"}
@@ -8,8 +8,9 @@ export * from './CircularInformation';
8
8
  export * from './Download';
9
9
  export * from './GoAhead';
10
10
  export * from './GoBack';
11
- export * from './Multimedia';
12
11
  export * from './Loader';
12
+ export * from './MapIndicator';
13
+ export * from './Multimedia';
13
14
  export * from './Profile';
14
15
  export * from './Remote';
15
16
  export * from './Schedule';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/Icons/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/Icons/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA"}
@@ -719,28 +719,6 @@ function GoBack(props) {
719
719
  });
720
720
  }
721
721
  GoBack.displayName = "GoBack";
722
- function Multimedia(props) {
723
- return /* @__PURE__ */ jsxs(Base, {
724
- ...props,
725
- w: "12px",
726
- viewBox: "0 0 14 14",
727
- title: "multimedia",
728
- children: [/* @__PURE__ */ jsx("path", {
729
- d: "M3 6C4.65685 6 6 4.65685 6 3C6 1.34315 4.65685 0 3 0C1.34315 0 0 1.34315 0 3C0 4.65685 1.34315 6 3 6Z",
730
- fill: "currentColor"
731
- }), /* @__PURE__ */ jsx("path", {
732
- d: "M11 6C12.6569 6 14 4.65685 14 3C14 1.34315 12.6569 0 11 0C9.34315 0 8 1.34315 8 3C8 4.65685 9.34315 6 11 6Z",
733
- fill: "currentColor"
734
- }), /* @__PURE__ */ jsx("path", {
735
- d: "M3 14C4.65685 14 6 12.6569 6 11C6 9.34315 4.65685 8 3 8C1.34315 8 0 9.34315 0 11C0 12.6569 1.34315 14 3 14Z",
736
- fill: "currentColor"
737
- }), /* @__PURE__ */ jsx("path", {
738
- d: "M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z",
739
- fill: "currentColor"
740
- })]
741
- });
742
- }
743
- Multimedia.displayName = "Multimedia";
744
722
  function Loader({
745
723
  fill = "#fff"
746
724
  }) {
@@ -786,6 +764,43 @@ function Loader({
786
764
  })
787
765
  });
788
766
  }
767
+ function MapIndicator(props) {
768
+ return /* @__PURE__ */ jsx(Base, {
769
+ ...props,
770
+ w: "16px",
771
+ h: "16px",
772
+ viewBox: "0 0 16 16",
773
+ title: "mapIndicator",
774
+ children: /* @__PURE__ */ jsx("path", {
775
+ fill: "currentColor",
776
+ fillRule: "nonzero",
777
+ d: "M7 0C3.1 0 0 3.1 0 7c0 1.9.7 3.7 2.1 5 .1.1 4.1 3.7 4.2 3.8.4.3 1 .3 1.3 0 .1-.1 4.2-3.7 4.2-3.8 1.4-1.3 2.1-3.1 2.1-5 .1-3.9-3-7-6.9-7zm0 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"
778
+ })
779
+ });
780
+ }
781
+ MapIndicator.displayName = "MapIndicator";
782
+ function Multimedia(props) {
783
+ return /* @__PURE__ */ jsxs(Base, {
784
+ ...props,
785
+ w: "12px",
786
+ viewBox: "0 0 14 14",
787
+ title: "multimedia",
788
+ children: [/* @__PURE__ */ jsx("path", {
789
+ d: "M3 6C4.65685 6 6 4.65685 6 3C6 1.34315 4.65685 0 3 0C1.34315 0 0 1.34315 0 3C0 4.65685 1.34315 6 3 6Z",
790
+ fill: "currentColor"
791
+ }), /* @__PURE__ */ jsx("path", {
792
+ d: "M11 6C12.6569 6 14 4.65685 14 3C14 1.34315 12.6569 0 11 0C9.34315 0 8 1.34315 8 3C8 4.65685 9.34315 6 11 6Z",
793
+ fill: "currentColor"
794
+ }), /* @__PURE__ */ jsx("path", {
795
+ d: "M3 14C4.65685 14 6 12.6569 6 11C6 9.34315 4.65685 8 3 8C1.34315 8 0 9.34315 0 11C0 12.6569 1.34315 14 3 14Z",
796
+ fill: "currentColor"
797
+ }), /* @__PURE__ */ jsx("path", {
798
+ d: "M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z",
799
+ fill: "currentColor"
800
+ })]
801
+ });
802
+ }
803
+ Multimedia.displayName = "Multimedia";
789
804
  function Profile(props) {
790
805
  return /* @__PURE__ */ jsx(Base, {
791
806
  ...props,
@@ -1374,8 +1389,9 @@ var index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
1374
1389
  Download,
1375
1390
  GoAhead,
1376
1391
  GoBack,
1377
- Multimedia,
1378
1392
  Loader,
1393
+ MapIndicator,
1394
+ Multimedia,
1379
1395
  Profile,
1380
1396
  Remote,
1381
1397
  Schedule,
@@ -10194,15 +10210,17 @@ const EventsGroup = ({
10194
10210
  children: /* @__PURE__ */ jsx(MenuGroup, {
10195
10211
  title,
10196
10212
  children: events.map((event) => {
10197
- var _a2;
10213
+ var _a2, _b;
10214
+ const hasUrl = Boolean(event.url);
10215
+ const eventOnClick = onClickEvent && hasUrl ? () => onClickEvent(event) : void 0;
10198
10216
  return /* @__PURE__ */ jsx(Box, {
10199
10217
  bg: (_a2 = vars("colors-neutral-white")) != null ? _a2 : "#FFFFFF",
10200
10218
  border: "none",
10201
- cursor: onClickEvent ? "pointer" : "default",
10219
+ cursor: "default",
10202
10220
  padding: "0",
10203
10221
  _hover: {
10204
10222
  boxShadow: "none !important",
10205
- cursor: onClickEvent ? "pointer !important" : "default !important",
10223
+ cursor: "default !important",
10206
10224
  bg: "none !important"
10207
10225
  },
10208
10226
  _focus: {
@@ -10220,8 +10238,10 @@ const EventsGroup = ({
10220
10238
  text: text2,
10221
10239
  type: event.type,
10222
10240
  hasNotification: event.isNew,
10223
- onClick: onClickEvent ? () => onClickEvent(event) : void 0,
10224
- showCourse: true
10241
+ headquartersAddress: event.headquarters_address,
10242
+ onClick: eventOnClick,
10243
+ showCourse: true,
10244
+ url: (_b = event.url) != null ? _b : ""
10225
10245
  }, event.id)
10226
10246
  }, event.id);
10227
10247
  })
@@ -10513,19 +10533,21 @@ const EventsList = ({
10513
10533
  duration,
10514
10534
  name,
10515
10535
  hasNotification,
10536
+ headquartersAddress,
10516
10537
  onClick,
10517
10538
  showCourse,
10518
10539
  showUnit,
10519
10540
  time,
10520
10541
  text: text2,
10521
10542
  type,
10522
- unitName
10543
+ unitName,
10544
+ url
10523
10545
  }) => {
10524
- var _a, _b, _c;
10546
+ var _a, _b;
10525
10547
  const border = `1px solid ${(_a = vars("colors-neutral-platinum")) != null ? _a : "#E8E8E8"}`;
10526
- const hoverBg = (_b = vars("colors-neutral-cultured2")) != null ? _b : "#F8F8F8";
10527
- const isClickable = Boolean(onClick);
10528
- const showEventDuration = ["online", "in-person"].includes(type) && duration !== void 0 && duration > 0;
10548
+ const isCpr = type === "cpr";
10549
+ const showEventLocation = !isCpr || Boolean(headquartersAddress);
10550
+ const showEventDuration = ["online", "in-person", "cpr"].includes(type) && duration !== void 0 && duration > 0;
10529
10551
  const initOrEnd = ["end-course", "init-course", "init-course-flexible", "end-course-flexible"].includes(type);
10530
10552
  const dateTextStyle = {
10531
10553
  color: vars("colors-neutral-white"),
@@ -10534,7 +10556,7 @@ const EventsList = ({
10534
10556
  lineHeight: "100%"
10535
10557
  };
10536
10558
  const detailTextStyle = {
10537
- color: (_c = vars("colors-neutral-gray")) != null ? _c : "#808080",
10559
+ color: (_b = vars("colors-neutral-gray")) != null ? _b : "#808080",
10538
10560
  fontSize: "14px",
10539
10561
  alignItems: "center",
10540
10562
  display: "flex",
@@ -10553,13 +10575,11 @@ const EventsList = ({
10553
10575
  borderTop: border,
10554
10576
  display: "flex",
10555
10577
  gap: "12px",
10556
- cursor: isClickable ? "pointer" : "default",
10557
- onClick,
10578
+ cursor: "default",
10579
+ onClick: void 0,
10558
10580
  p: "16px",
10559
10581
  transition: "background-color 0.2s ease",
10560
- _hover: isClickable ? {
10561
- bg: hoverBg
10562
- } : void 0,
10582
+ _hover: void 0,
10563
10583
  children: [/* @__PURE__ */ jsxs(Box, {
10564
10584
  bg: color,
10565
10585
  minW: "88px",
@@ -10583,73 +10603,80 @@ const EventsList = ({
10583
10603
  sx: dateTextStyle,
10584
10604
  children: time
10585
10605
  })]
10586
- }), /* @__PURE__ */ jsxs(Box, {
10606
+ }), /* @__PURE__ */ jsx(Box, {
10587
10607
  display: "flex",
10588
10608
  flexDirection: "column",
10589
10609
  gap: "8px",
10590
10610
  w: "100%",
10591
- children: [/* @__PURE__ */ jsxs(Box, {
10592
- alignItems: "center",
10593
- display: "flex",
10594
- fontSize: "16px",
10595
- fontWeight: "700",
10596
- justifyContent: "space-between",
10597
- lineHeight: "21px",
10598
- sx: {
10599
- ">span": {
10600
- width: "calc(100% - 12px)"
10601
- },
10602
- ">svg": {
10603
- alignSelf: "flex-start"
10604
- }
10605
- },
10606
- children: [/* @__PURE__ */ jsx("span", {
10607
- children: name
10608
- }), hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
10609
- }), showCourse && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
10610
- as: "span",
10611
- sx: detailTextStyle,
10612
- children: [type === "cv-events" ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx("strong", {
10613
- children: text2 ? `${text2}:` : "Curso:"
10614
- }), " ", courseName]
10615
- }), showEventDuration && /* @__PURE__ */ jsxs(Box, {
10611
+ children: /* @__PURE__ */ jsxs(Box, {
10616
10612
  display: "flex",
10617
- flexDirection: "row",
10613
+ flexDirection: "column",
10618
10614
  gap: "8px",
10619
- flexWrap: "wrap",
10620
10615
  children: [/* @__PURE__ */ jsxs(Box, {
10616
+ alignItems: "center",
10617
+ display: "flex",
10618
+ fontSize: "16px",
10619
+ fontWeight: "700",
10620
+ justifyContent: "space-between",
10621
+ lineHeight: "21px",
10622
+ sx: {
10623
+ ">span": {
10624
+ width: "calc(100% - 12px)"
10625
+ },
10626
+ ">svg": {
10627
+ alignSelf: "flex-start"
10628
+ }
10629
+ },
10630
+ children: [/* @__PURE__ */ jsx("span", {
10631
+ children: name
10632
+ }), hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
10633
+ }), showCourse && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
10621
10634
  as: "span",
10622
10635
  sx: detailTextStyle,
10623
- paddingRight: "8px",
10624
- borderRight: `1px solid ${vars("colors-neutral-platinum")}`,
10625
- children: [/* @__PURE__ */ jsx(Box, {
10636
+ children: [type === "cv-events" ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx("strong", {
10637
+ children: text2 ? `${text2}:` : "Curso:"
10638
+ }), " ", courseName]
10639
+ }), showEventDuration && /* @__PURE__ */ jsxs(Box, {
10640
+ display: "flex",
10641
+ flexDirection: "row",
10642
+ gap: "8px",
10643
+ flexWrap: "wrap",
10644
+ children: [showEventLocation && /* @__PURE__ */ jsxs(Box, {
10626
10645
  as: "span",
10627
- sx: eventIconStyle,
10628
- children: /* @__PURE__ */ jsx(Remote, {
10629
- color: vars("colors-main-ziggurat")
10630
- })
10631
- }), "Link clase online"]
10632
- }), /* @__PURE__ */ jsxs(Box, {
10633
- as: "span",
10634
- sx: detailTextStyle,
10635
- children: [/* @__PURE__ */ jsx(Box, {
10646
+ sx: detailTextStyle,
10647
+ paddingRight: "8px",
10648
+ borderRight: `1px solid ${vars("colors-neutral-platinum")}`,
10649
+ children: [/* @__PURE__ */ jsx(Box, {
10650
+ as: "span",
10651
+ sx: eventIconStyle,
10652
+ children: isCpr ? /* @__PURE__ */ jsx(MapIndicator, {
10653
+ color: vars("colors-main-ziggurat")
10654
+ }) : /* @__PURE__ */ jsx(Remote, {
10655
+ color: vars("colors-main-ziggurat")
10656
+ })
10657
+ }), isCpr ? headquartersAddress : "Link clase online"]
10658
+ }), /* @__PURE__ */ jsxs(Box, {
10636
10659
  as: "span",
10637
- sx: eventIconStyle,
10638
- children: /* @__PURE__ */ jsx(Time, {
10639
- color: vars("colors-main-ziggurat")
10640
- })
10641
- }), duration, " min"]
10660
+ sx: detailTextStyle,
10661
+ children: [/* @__PURE__ */ jsx(Box, {
10662
+ as: "span",
10663
+ sx: eventIconStyle,
10664
+ children: /* @__PURE__ */ jsx(Time, {
10665
+ color: vars("colors-main-ziggurat")
10666
+ })
10667
+ }), duration, " min"]
10668
+ })]
10669
+ }), showUnit && !initOrEnd && /* @__PURE__ */ jsx(Box, {
10670
+ display: "flex",
10671
+ gap: "4px",
10672
+ alignItems: "baseline",
10673
+ children: /* @__PURE__ */ jsx(Box, {
10674
+ as: "span",
10675
+ sx: detailTextStyle,
10676
+ children: unitName
10677
+ })
10642
10678
  })]
10643
- }), showUnit && !initOrEnd && /* @__PURE__ */ jsx(Box, {
10644
- display: "flex",
10645
- gap: "4px",
10646
- alignItems: "baseline",
10647
- children: /* @__PURE__ */ jsx(Box, {
10648
- as: "span",
10649
- sx: detailTextStyle,
10650
- children: unitName
10651
- })
10652
- })]
10679
+ })
10653
10680
  })]
10654
10681
  });
10655
10682
  };