@eclass/ui-kit 1.62.0 → 1.63.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 Star(props: BaseProps): JSX.Element;
4
+ export declare namespace Star {
5
+ var displayName: string;
6
+ }
7
+ //# sourceMappingURL=Star.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Star.d.ts","sourceRoot":"","sources":["../../../src/atoms/Icons/Star.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAA;AAExC,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAWlD;yBAXe,IAAI"}
@@ -14,6 +14,7 @@ export * from './Multimedia';
14
14
  export * from './Profile';
15
15
  export * from './Remote';
16
16
  export * from './Schedule';
17
+ export * from './Star';
17
18
  export * from './Time';
18
19
  export * from './TinyAlertInfo';
19
20
  export * from './TinyAlertError';
@@ -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,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"}
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,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,4 +1,4 @@
1
- import { extendTheme, Box, CircularProgress, Icon, Button, useMediaQuery, Tooltip, Flex, Stack, Center, Image, Text as Text$1, HStack, Heading, List, ListItem, Link, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, ModalOverlay, useDisclosure, LinkBox, LinkOverlay, MenuButton, MenuGroup, Menu, MenuList, MenuItem } from "@chakra-ui/react";
1
+ import { extendTheme, Box, CircularProgress, Icon, Button, useMediaQuery, Tooltip, Flex, Stack, Center, Image, Text as Text$1, HStack, Heading, List, ListItem, Link, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, ModalOverlay, useDisclosure, LinkBox, LinkOverlay, MenuButton, MenuGroup, Menu, MenuList, MenuItem, Divider, IconButton } from "@chakra-ui/react";
2
2
  import * as React$1 from "react";
3
3
  import React__default, { useEffect, useState, useCallback, useRef } from "react";
4
4
  const main = {
@@ -858,6 +858,19 @@ function Schedule(props) {
858
858
  });
859
859
  }
860
860
  Schedule.displayName = "Schedule";
861
+ function Star(props) {
862
+ return /* @__PURE__ */ jsx(Base, {
863
+ viewBox: "0 0 16px 16px",
864
+ ...props,
865
+ children: /* @__PURE__ */ jsx("path", {
866
+ fill: "currentColor",
867
+ fillRule: "evenodd",
868
+ d: "M8.464 12.255a1 1 0 0 0-.927 0l-2.452 1.282a1 1 0 0 1-1.45-1.053l.462-2.729a1 1 0 0 0-.286-.881L1.833 6.938a1 1 0 0 1 .554-1.704l2.738-.404a1 1 0 0 0 .75-.545l1.23-2.48a1 1 0 0 1 1.792 0l1.23 2.48a1 1 0 0 0 .75.545l2.738.404a1 1 0 0 1 .553 1.704l-1.977 1.936a1 1 0 0 0-.287.881l.462 2.73a1 1 0 0 1-1.45 1.053l-2.452-1.284Z",
869
+ clipRule: "evenodd"
870
+ })
871
+ });
872
+ }
873
+ Star.displayName = "Star";
861
874
  function Time(props) {
862
875
  return /* @__PURE__ */ jsx(Base, {
863
876
  ...props,
@@ -1395,6 +1408,7 @@ var index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
1395
1408
  Profile,
1396
1409
  Remote,
1397
1410
  Schedule,
1411
+ Star,
1398
1412
  Time,
1399
1413
  TinyAlertInfo,
1400
1414
  TinyAlertError,
@@ -9554,8 +9568,8 @@ const StandardBackground = ({
9554
9568
  })]
9555
9569
  });
9556
9570
  };
9557
- const StyledText = Text$1;
9558
- const StyledLink = Link;
9571
+ const StyledText$2 = Text$1;
9572
+ const StyledLink$1 = Link;
9559
9573
  const Resources = ({
9560
9574
  id,
9561
9575
  resourceType,
@@ -9591,7 +9605,7 @@ const Resources = ({
9591
9605
  };
9592
9606
  return colorMap[resourceType] || "#FFBC27";
9593
9607
  };
9594
- return /* @__PURE__ */ jsx(StyledLink, {
9608
+ return /* @__PURE__ */ jsx(StyledLink$1, {
9595
9609
  href: resourceLink,
9596
9610
  target: targetBlank ? "_blank" : "_self",
9597
9611
  rel: targetBlank ? "noopener noreferrer" : void 0,
@@ -9636,7 +9650,7 @@ const Resources = ({
9636
9650
  gap: "8px",
9637
9651
  padding: "1rem",
9638
9652
  children: [/* @__PURE__ */ jsx(Box, {
9639
- children: /* @__PURE__ */ jsx(StyledText, {
9653
+ children: /* @__PURE__ */ jsx(StyledText$2, {
9640
9654
  fontFamily: "Roboto",
9641
9655
  fontWeight: "700",
9642
9656
  lineHeight: "21px",
@@ -9646,7 +9660,7 @@ const Resources = ({
9646
9660
  children: resourceTitle
9647
9661
  })
9648
9662
  }), /* @__PURE__ */ jsx(Box, {
9649
- children: /* @__PURE__ */ jsx(StyledText, {
9663
+ children: /* @__PURE__ */ jsx(StyledText$2, {
9650
9664
  fontFamily: "Roboto",
9651
9665
  fontWeight: "400",
9652
9666
  lineHeight: "14px",
@@ -9659,7 +9673,7 @@ const Resources = ({
9659
9673
  display: "flex",
9660
9674
  alignItems: "center",
9661
9675
  justifyContent: "center",
9662
- children: /* @__PURE__ */ jsxs(StyledText, {
9676
+ children: /* @__PURE__ */ jsxs(StyledText$2, {
9663
9677
  fontFamily: "Roboto",
9664
9678
  fontWeight: "500",
9665
9679
  fontSize: "14px",
@@ -10594,6 +10608,9 @@ const EventsList = ({
10594
10608
  const hoverBg = (_b = vars("colors-neutral-cultured2")) != null ? _b : "#F8F8F8";
10595
10609
  const isCpr = type === "cpr";
10596
10610
  const showEventLocation = !isCpr || Boolean(headquartersAddress);
10611
+ const courseLabel = text2 || "Curso";
10612
+ const showCourseLabel = type !== "cv-events";
10613
+ const isCourse = showCourseLabel && courseLabel === "Curso";
10597
10614
  const showEventDuration = ["online", "in-person", "cpr"].includes(type) && duration !== void 0 && duration > 0;
10598
10615
  const initOrEnd = ["end-course", "init-course", "init-course-flexible", "end-course-flexible"].includes(type);
10599
10616
  const dateTextStyle = {
@@ -10608,7 +10625,10 @@ const EventsList = ({
10608
10625
  alignItems: "center",
10609
10626
  display: "flex",
10610
10627
  gap: "4px",
10611
- lineHeight: "normal"
10628
+ lineHeight: "normal",
10629
+ "&.isCourse": {
10630
+ alignItems: "self-start"
10631
+ }
10612
10632
  };
10613
10633
  const eventIconStyle = {
10614
10634
  alignItems: "center",
@@ -10681,9 +10701,11 @@ const EventsList = ({
10681
10701
  }), hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
10682
10702
  }), showCourse && !initOrEnd && /* @__PURE__ */ jsxs(Box, {
10683
10703
  as: "span",
10704
+ className: isCourse ? "isCourse" : void 0,
10705
+ "data-testid": "event-course",
10684
10706
  sx: detailTextStyle,
10685
- children: [type === "cv-events" ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx("strong", {
10686
- children: text2 ? `${text2}:` : "Curso:"
10707
+ children: [showCourseLabel && /* @__PURE__ */ jsxs("strong", {
10708
+ children: [courseLabel, ":"]
10687
10709
  }), " ", courseName]
10688
10710
  }), showEventDuration && /* @__PURE__ */ jsxs(Box, {
10689
10711
  display: "flex",
@@ -11251,5 +11273,234 @@ const UserDropdown = ({
11251
11273
  })
11252
11274
  });
11253
11275
  };
11254
- export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index$1 as Icons, Label, Modal, ModalAlert, ModalAlertButtons, ModalAlertNew, ModalButtons, ModalCard, ModalCardContent, ModalContent, ModalMultiple, ModalSimple, NavBarButton, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserDropdown, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
11276
+ function CustomCloseIcon(props) {
11277
+ return /* @__PURE__ */ jsx(Base, {
11278
+ w: "16px",
11279
+ h: "16px",
11280
+ viewBox: "0 0 16 16",
11281
+ color: "none",
11282
+ ...props,
11283
+ children: /* @__PURE__ */ jsx("path", {
11284
+ fill: "#60798E",
11285
+ fillRule: "evenodd",
11286
+ d: "M13.694 0 7.876 5.818 2.057 0 0 2.057l5.818 5.819L0 13.694l2.057 2.057 5.819-5.818 5.818 5.818 2.057-2.057-5.818-5.818 5.818-5.819L13.694 0Z",
11287
+ clipRule: "evenodd"
11288
+ })
11289
+ });
11290
+ }
11291
+ const StyledImage$1 = Image;
11292
+ const StyledFlex$2 = Flex;
11293
+ const StyledText$1 = Text$1;
11294
+ const StyledDivider = Divider;
11295
+ const StyledLink = Link;
11296
+ const InitialShareContent = ({
11297
+ handleLinkedinClick,
11298
+ onLeaveReview
11299
+ }) => {
11300
+ return /* @__PURE__ */ jsxs(Fragment, {
11301
+ children: [/* @__PURE__ */ jsxs(StyledFlex$2, {
11302
+ direction: "column",
11303
+ gap: "16px",
11304
+ alignItems: "center",
11305
+ children: [/* @__PURE__ */ jsx(StyledImage$1, {
11306
+ w: "70px",
11307
+ h: "70px",
11308
+ alt: "cotill\xF3n de celebraci\xF3n",
11309
+ src: "https://cdn.eclass.com/vendors/apps/front_v8/assets/Common/celebration.webp"
11310
+ }), /* @__PURE__ */ jsxs(StyledFlex$2, {
11311
+ flexDir: "column",
11312
+ gap: "8px",
11313
+ children: [/* @__PURE__ */ jsx(StyledText$1, {
11314
+ as: "h6",
11315
+ fontSize: "xl",
11316
+ fontWeight: "bold",
11317
+ color: vars("colors-neutral-darkCharcoal"),
11318
+ m: "0",
11319
+ children: "\xA1Qu\xE9 bueno que quieras compartirlo!"
11320
+ }), /* @__PURE__ */ jsx(StyledText$1, {
11321
+ fontSize: "md",
11322
+ color: vars("colors-neutral-darkCharcoal"),
11323
+ mb: "0",
11324
+ children: "Aprobaste tu curso. Vamos a mostrarlo en tu LinkedIn."
11325
+ })]
11326
+ })]
11327
+ }), /* @__PURE__ */ jsx(BtnPrimary, {
11328
+ onClick: handleLinkedinClick,
11329
+ children: "Continuar a LinkedIn"
11330
+ }), /* @__PURE__ */ jsxs(StyledFlex$2, {
11331
+ align: "center",
11332
+ width: "100%",
11333
+ gap: "16px",
11334
+ children: [/* @__PURE__ */ jsx(StyledDivider, {
11335
+ borderColor: vars("colors-neutral-platinum"),
11336
+ m: "0"
11337
+ }), /* @__PURE__ */ jsx(StyledText$1, {
11338
+ fontSize: "sm",
11339
+ color: vars("colors-neutral-gray"),
11340
+ whiteSpace: "nowrap",
11341
+ m: "0",
11342
+ children: "Ya que est\xE1s aqu\xED"
11343
+ }), /* @__PURE__ */ jsx(StyledDivider, {
11344
+ borderColor: vars("colors-neutral-platinum"),
11345
+ m: "0"
11346
+ })]
11347
+ }), /* @__PURE__ */ jsx(StyledText$1, {
11348
+ as: "p",
11349
+ fontSize: "md",
11350
+ fontWeight: "700",
11351
+ color: vars("colors-neutral-darkCharcoal"),
11352
+ mb: "0",
11353
+ children: "\xBFQu\xE9 tal fue aprender con nosotros?"
11354
+ }), /* @__PURE__ */ jsxs(StyledFlex$2, {
11355
+ align: "center",
11356
+ justify: "center",
11357
+ gap: "8px",
11358
+ sx: {
11359
+ svg: {
11360
+ m: "0"
11361
+ }
11362
+ },
11363
+ children: [/* @__PURE__ */ jsx(Star, {
11364
+ color: vars("colors-icon-ripeMango")
11365
+ }), /* @__PURE__ */ jsx(StyledLink, {
11366
+ fontSize: "sm",
11367
+ fontWeight: "500",
11368
+ color: vars("colors-neutral-gray"),
11369
+ textDecoration: "underline",
11370
+ onClick: onLeaveReview,
11371
+ children: "Dejar mi opini\xF3n"
11372
+ })]
11373
+ })]
11374
+ });
11375
+ };
11376
+ const StyledImage = Image;
11377
+ const StyledFlex$1 = Flex;
11378
+ const StyledText = Text$1;
11379
+ const AfterShareContent = ({
11380
+ onClose,
11381
+ onLeaveReview
11382
+ }) => {
11383
+ return /* @__PURE__ */ jsxs(StyledFlex$1, {
11384
+ flexDir: "column",
11385
+ alignItems: "center",
11386
+ gap: "16px",
11387
+ sx: {
11388
+ button: {
11389
+ svg: {
11390
+ m: "0"
11391
+ }
11392
+ },
11393
+ ".linkButton": {
11394
+ p: "0"
11395
+ }
11396
+ },
11397
+ children: [/* @__PURE__ */ jsx(StyledImage, {
11398
+ w: "70px",
11399
+ h: "70px",
11400
+ alt: "cotill\xF3n de celebraci\xF3n",
11401
+ src: "https://cdn.eclass.com/vendors/apps/front_v8/assets/Common/celebration.webp"
11402
+ }), /* @__PURE__ */ jsx(StyledText, {
11403
+ as: "h6",
11404
+ fontSize: "xl",
11405
+ fontWeight: "bold",
11406
+ color: vars("colors-neutral-darkCharcoal"),
11407
+ m: "0",
11408
+ children: "\xBFYa lo compartiste en LinkedIn?"
11409
+ }), /* @__PURE__ */ jsxs(StyledText, {
11410
+ fontSize: "md",
11411
+ fontWeight: "400",
11412
+ color: vars("colors-neutral-darkCharcoal"),
11413
+ p: "0",
11414
+ m: "0",
11415
+ children: [/* @__PURE__ */ jsx("strong", {
11416
+ children: "Ahora cu\xE9ntanos qu\xE9 tal fue aprender con nosotros."
11417
+ }), " Tu opini\xF3n ayuda a otros como t\xFA a dar el primer paso."]
11418
+ }), /* @__PURE__ */ jsx(BtnPrimary, {
11419
+ onClick: onLeaveReview,
11420
+ leftIcon: /* @__PURE__ */ jsx(Star, {
11421
+ color: vars("colors-neutral-white")
11422
+ }),
11423
+ children: "Dejar mi opini\xF3n"
11424
+ }), /* @__PURE__ */ jsx(BtnLink, {
11425
+ as: "button",
11426
+ onClick: onClose,
11427
+ children: "Quiz\xE1s m\xE1s tarde"
11428
+ })]
11429
+ });
11430
+ };
11431
+ const StyledModalContent = ModalContent$1;
11432
+ const StyledIconButton = IconButton;
11433
+ const StyledFlex = Flex;
11434
+ const ShareAndReviewModal = ({
11435
+ isOpen,
11436
+ onClose,
11437
+ onContinue,
11438
+ onLeaveReview
11439
+ }) => {
11440
+ const [hasClickedLinkedin, setHasClickedLinkedin] = useState(false);
11441
+ useEffect(() => {
11442
+ if (!isOpen) {
11443
+ setHasClickedLinkedin(false);
11444
+ }
11445
+ }, [isOpen]);
11446
+ const handleLinkedinClick = () => {
11447
+ if (onContinue) {
11448
+ onContinue();
11449
+ }
11450
+ setTimeout(() => {
11451
+ setHasClickedLinkedin(true);
11452
+ }, 400);
11453
+ };
11454
+ return /* @__PURE__ */ jsxs(Modal$1, {
11455
+ isOpen,
11456
+ onClose,
11457
+ blockScrollOnMount: false,
11458
+ isCentered: true,
11459
+ children: [/* @__PURE__ */ jsx(ModalOverlay, {}), /* @__PURE__ */ jsxs(StyledModalContent, {
11460
+ alignSelf: "center",
11461
+ maxW: "471px",
11462
+ marginInline: "16px",
11463
+ borderRadius: "8px",
11464
+ p: "32px 16px",
11465
+ position: "relative",
11466
+ alignItems: "center",
11467
+ children: [/* @__PURE__ */ jsx(StyledIconButton, {
11468
+ "aria-label": "Cerrar",
11469
+ autoFocus: false,
11470
+ bg: "transparent",
11471
+ icon: /* @__PURE__ */ jsx(CustomCloseIcon, {}),
11472
+ onClick: onClose,
11473
+ variant: "ghost",
11474
+ size: "sm",
11475
+ h: "auto",
11476
+ minW: "16px",
11477
+ position: "absolute",
11478
+ top: "16px",
11479
+ right: "16px",
11480
+ _hover: {
11481
+ background: "none"
11482
+ },
11483
+ _focus: {
11484
+ boxShadow: "none"
11485
+ },
11486
+ _focusVisible: {
11487
+ boxShadow: `0 0 0 3px ${vars("colors-alert-deepSkyBlue")} inset`
11488
+ }
11489
+ }), /* @__PURE__ */ jsx(StyledFlex, {
11490
+ direction: "column",
11491
+ align: "center",
11492
+ textAlign: "center",
11493
+ gap: "16px",
11494
+ children: !hasClickedLinkedin ? /* @__PURE__ */ jsx(InitialShareContent, {
11495
+ handleLinkedinClick,
11496
+ onLeaveReview
11497
+ }) : /* @__PURE__ */ jsx(AfterShareContent, {
11498
+ onClose,
11499
+ onLeaveReview
11500
+ })
11501
+ })]
11502
+ })]
11503
+ });
11504
+ };
11505
+ export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index$1 as Icons, Label, Modal, ModalAlert, ModalAlertButtons, ModalAlertNew, ModalButtons, ModalCard, ModalCardContent, ModalContent, ModalMultiple, ModalSimple, NavBarButton, NewTooltip, Progress, Resources, Ripples, ShareAndReviewModal, TinyAlert, UserDropdown, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
11255
11506
  //# sourceMappingURL=eclass-ui-kit.es.js.map