@eclass/ui-kit 1.60.0 → 1.60.1

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,25 @@ 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
+ unavailableLabel = "A\xFAn no disponible",
10545
+ url
10523
10546
  }) => {
10524
- var _a, _b, _c;
10547
+ var _a, _b;
10525
10548
  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;
10549
+ const hasUrl = Boolean(url);
10550
+ const isAvailable = url === void 0 ? true : hasUrl;
10551
+ const disabledOpacity = isAvailable ? 1 : 0.5;
10552
+ const isCpr = type === "cpr";
10553
+ const showEventLocation = !isCpr || Boolean(headquartersAddress);
10554
+ const showEventDuration = ["online", "in-person", "cpr"].includes(type) && duration !== void 0 && duration > 0;
10529
10555
  const initOrEnd = ["end-course", "init-course", "init-course-flexible", "end-course-flexible"].includes(type);
10530
10556
  const dateTextStyle = {
10531
10557
  color: vars("colors-neutral-white"),
@@ -10534,7 +10560,7 @@ const EventsList = ({
10534
10560
  lineHeight: "100%"
10535
10561
  };
10536
10562
  const detailTextStyle = {
10537
- color: (_c = vars("colors-neutral-gray")) != null ? _c : "#808080",
10563
+ color: (_b = vars("colors-neutral-gray")) != null ? _b : "#808080",
10538
10564
  fontSize: "14px",
10539
10565
  alignItems: "center",
10540
10566
  display: "flex",
@@ -10553,13 +10579,11 @@ const EventsList = ({
10553
10579
  borderTop: border,
10554
10580
  display: "flex",
10555
10581
  gap: "12px",
10556
- cursor: isClickable ? "pointer" : "default",
10557
- onClick,
10582
+ cursor: "default",
10583
+ onClick: void 0,
10558
10584
  p: "16px",
10559
10585
  transition: "background-color 0.2s ease",
10560
- _hover: isClickable ? {
10561
- bg: hoverBg
10562
- } : void 0,
10586
+ _hover: void 0,
10563
10587
  children: [/* @__PURE__ */ jsxs(Box, {
10564
10588
  bg: color,
10565
10589
  minW: "88px",
@@ -10571,6 +10595,7 @@ const EventsList = ({
10571
10595
  display: "flex",
10572
10596
  flexDirection: "column",
10573
10597
  justifyContent: "space-around",
10598
+ opacity: disabledOpacity,
10574
10599
  children: [/* @__PURE__ */ jsx(Box, {
10575
10600
  as: "span",
10576
10601
  sx: dateTextStyle,
@@ -10588,67 +10613,84 @@ const EventsList = ({
10588
10613
  flexDirection: "column",
10589
10614
  gap: "8px",
10590
10615
  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",
10616
+ children: [!isAvailable && /* @__PURE__ */ jsx(TinyAlert, {
10617
+ status: "warning",
10618
+ text: unavailableLabel,
10598
10619
  sx: {
10599
- ">span": {
10600
- width: "calc(100% - 12px)"
10601
- },
10602
- ">svg": {
10603
- alignSelf: "flex-start"
10620
+ padding: "4px 6px",
10621
+ "> span": {
10622
+ fontSize: "12px"
10604
10623
  }
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, {
10624
+ }
10625
+ }), /* @__PURE__ */ jsxs(Box, {
10616
10626
  display: "flex",
10617
- flexDirection: "row",
10627
+ flexDirection: "column",
10618
10628
  gap: "8px",
10619
- flexWrap: "wrap",
10629
+ opacity: disabledOpacity,
10620
10630
  children: [/* @__PURE__ */ jsxs(Box, {
10631
+ alignItems: "center",
10632
+ display: "flex",
10633
+ fontSize: "16px",
10634
+ fontWeight: "700",
10635
+ justifyContent: "space-between",
10636
+ lineHeight: "21px",
10637
+ sx: {
10638
+ ">span": {
10639
+ width: "calc(100% - 12px)"
10640
+ },
10641
+ ">svg": {
10642
+ alignSelf: "flex-start"
10643
+ }
10644
+ },
10645
+ children: [/* @__PURE__ */ jsx("span", {
10646
+ children: name
10647
+ }), hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
10648
+ }), showCourse && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
10621
10649
  as: "span",
10622
10650
  sx: detailTextStyle,
10623
- paddingRight: "8px",
10624
- borderRight: `1px solid ${vars("colors-neutral-platinum")}`,
10625
- children: [/* @__PURE__ */ jsx(Box, {
10651
+ children: [type === "cv-events" ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx("strong", {
10652
+ children: text2 ? `${text2}:` : "Curso:"
10653
+ }), " ", courseName]
10654
+ }), showEventDuration && /* @__PURE__ */ jsxs(Box, {
10655
+ display: "flex",
10656
+ flexDirection: "row",
10657
+ gap: "8px",
10658
+ flexWrap: "wrap",
10659
+ children: [showEventLocation && /* @__PURE__ */ jsxs(Box, {
10626
10660
  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, {
10661
+ sx: detailTextStyle,
10662
+ paddingRight: "8px",
10663
+ borderRight: `1px solid ${vars("colors-neutral-platinum")}`,
10664
+ children: [/* @__PURE__ */ jsx(Box, {
10665
+ as: "span",
10666
+ sx: eventIconStyle,
10667
+ children: isCpr ? /* @__PURE__ */ jsx(MapIndicator, {
10668
+ color: vars("colors-main-ziggurat")
10669
+ }) : /* @__PURE__ */ jsx(Remote, {
10670
+ color: vars("colors-main-ziggurat")
10671
+ })
10672
+ }), isCpr ? headquartersAddress : "Link clase online"]
10673
+ }), /* @__PURE__ */ jsxs(Box, {
10636
10674
  as: "span",
10637
- sx: eventIconStyle,
10638
- children: /* @__PURE__ */ jsx(Time, {
10639
- color: vars("colors-main-ziggurat")
10640
- })
10641
- }), duration, " min"]
10675
+ sx: detailTextStyle,
10676
+ children: [/* @__PURE__ */ jsx(Box, {
10677
+ as: "span",
10678
+ sx: eventIconStyle,
10679
+ children: /* @__PURE__ */ jsx(Time, {
10680
+ color: vars("colors-main-ziggurat")
10681
+ })
10682
+ }), duration, " min"]
10683
+ })]
10684
+ }), showUnit && !initOrEnd && /* @__PURE__ */ jsx(Box, {
10685
+ display: "flex",
10686
+ gap: "4px",
10687
+ alignItems: "baseline",
10688
+ children: /* @__PURE__ */ jsx(Box, {
10689
+ as: "span",
10690
+ sx: detailTextStyle,
10691
+ children: unitName
10692
+ })
10642
10693
  })]
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
10694
  })]
10653
10695
  })]
10654
10696
  });