@eclass/ui-kit 1.18.3 → 1.19.0
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 +107 -8
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +32 -32
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/organisms/CourseList/Boxes/BoxImage.d.ts +14 -0
- package/dist/organisms/CourseList/Boxes/BoxTraditional.d.ts +12 -0
- package/dist/organisms/CourseList/Boxes/Boxes.d.ts +9 -0
- package/dist/organisms/CourseList/Boxes/index.d.ts +1 -0
- package/dist/organisms/CourseList/CourseList.d.ts +1 -1
- package/dist/organisms/CourseList/types.d.ts +3 -2
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/organisms/CourseList/CourseBox.d.ts +0 -12
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -30294,7 +30294,7 @@ function Footer({
|
|
|
30294
30294
|
borderTop: "1px solid",
|
|
30295
30295
|
borderTopColor: vars("colors-neutral-platinum"),
|
|
30296
30296
|
children: [isCourseActive(action.enabled, Profile2 == null ? void 0 : Profile2.id) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
30297
|
-
children: [hasFinanzeFreezed ? /* @__PURE__ */ jsx(Box, {
|
|
30297
|
+
children: [hasFinanzeFreezed && modalPaymentText ? /* @__PURE__ */ jsx(Box, {
|
|
30298
30298
|
color: vars("colors-main-deepSkyBlue"),
|
|
30299
30299
|
backgroundColor: "transparent",
|
|
30300
30300
|
fontWeight: "500",
|
|
@@ -30326,7 +30326,7 @@ function Footer({
|
|
|
30326
30326
|
color: vars("colors-neutral-spanishGrey"),
|
|
30327
30327
|
m: "0",
|
|
30328
30328
|
children: action.text
|
|
30329
|
-
}), /* @__PURE__ */ jsx(PaymentModal, {
|
|
30329
|
+
}), modalPaymentText && /* @__PURE__ */ jsx(PaymentModal, {
|
|
30330
30330
|
isOpen,
|
|
30331
30331
|
onClose,
|
|
30332
30332
|
showOverlay: overlay,
|
|
@@ -30337,7 +30337,7 @@ function Footer({
|
|
|
30337
30337
|
}
|
|
30338
30338
|
Footer.displayName = "Footer";
|
|
30339
30339
|
const CourseBoxContext = React.createContext({});
|
|
30340
|
-
function WithRipples({
|
|
30340
|
+
function WithRipples$1({
|
|
30341
30341
|
enabled,
|
|
30342
30342
|
children
|
|
30343
30343
|
}) {
|
|
@@ -30347,7 +30347,7 @@ function WithRipples({
|
|
|
30347
30347
|
children
|
|
30348
30348
|
});
|
|
30349
30349
|
}
|
|
30350
|
-
function
|
|
30350
|
+
function BoxTraditional({
|
|
30351
30351
|
data,
|
|
30352
30352
|
modalPaymentText
|
|
30353
30353
|
}) {
|
|
@@ -30367,13 +30367,14 @@ function CourseBox({
|
|
|
30367
30367
|
_hover: cssActive,
|
|
30368
30368
|
_focus: cssActive,
|
|
30369
30369
|
overflow: "hidden",
|
|
30370
|
-
children: /* @__PURE__ */ jsx(WithRipples, {
|
|
30370
|
+
children: /* @__PURE__ */ jsx(WithRipples$1, {
|
|
30371
30371
|
enabled: isCourseActive((_b = (_a = data.action) == null ? void 0 : _a.enabled) != null ? _b : false, (_c = data.Profile) == null ? void 0 : _c.id),
|
|
30372
30372
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
30373
30373
|
direction: "column",
|
|
30374
30374
|
justify: "space-between",
|
|
30375
30375
|
h: "100%",
|
|
30376
30376
|
children: [/* @__PURE__ */ jsxs(Box, {
|
|
30377
|
+
className: "CourseList-TraditionalBox",
|
|
30377
30378
|
children: [!data.hasFinanzeFreezed && isCourseActive((_e = (_d = data.action) == null ? void 0 : _d.enabled) != null ? _e : false, (_f = data.Profile) == null ? void 0 : _f.id) && /* @__PURE__ */ jsx(LinkOverlay, {
|
|
30378
30379
|
href: (_g = data.action) == null ? void 0 : _g.href,
|
|
30379
30380
|
isExternal: (_h = data.action) == null ? void 0 : _h.targetBlank
|
|
@@ -30386,13 +30387,110 @@ function CourseBox({
|
|
|
30386
30387
|
})
|
|
30387
30388
|
});
|
|
30388
30389
|
}
|
|
30389
|
-
|
|
30390
|
+
BoxTraditional.displayName = "BoxTraditional";
|
|
30391
|
+
function WithRipples({
|
|
30392
|
+
enabled,
|
|
30393
|
+
children
|
|
30394
|
+
}) {
|
|
30395
|
+
return enabled ? /* @__PURE__ */ jsx(Ripples, {
|
|
30396
|
+
children
|
|
30397
|
+
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
30398
|
+
children
|
|
30399
|
+
});
|
|
30400
|
+
}
|
|
30401
|
+
function BoxImage({
|
|
30402
|
+
backgroundImg,
|
|
30403
|
+
title,
|
|
30404
|
+
data,
|
|
30405
|
+
size: size2 = "large",
|
|
30406
|
+
m: m2
|
|
30407
|
+
}) {
|
|
30408
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
30409
|
+
const boxHeight = {
|
|
30410
|
+
large: "286px",
|
|
30411
|
+
small: "197px"
|
|
30412
|
+
};
|
|
30413
|
+
return /* @__PURE__ */ jsx(WithRipples, {
|
|
30414
|
+
enabled: isCourseActive((_b = (_a = data == null ? void 0 : data.action) == null ? void 0 : _a.enabled) != null ? _b : false, (_c = data == null ? void 0 : data.Profile) == null ? void 0 : _c.id),
|
|
30415
|
+
children: /* @__PURE__ */ jsxs(Box, {
|
|
30416
|
+
className: "CourseList-ImageBox",
|
|
30417
|
+
sx: {
|
|
30418
|
+
backgroundImage: `linear-gradient(to bottom, rgba(0,0,0,0) 35%, rgba(0,0,0,1) 100%), url(${backgroundImg})`,
|
|
30419
|
+
color: vars("colors-neutral-white"),
|
|
30420
|
+
cursor: "pointer",
|
|
30421
|
+
height: boxHeight[size2],
|
|
30422
|
+
backgroundSize: "cover",
|
|
30423
|
+
backgroundPosition: "center",
|
|
30424
|
+
borderRadius: "10px",
|
|
30425
|
+
padding: "16px",
|
|
30426
|
+
display: "flex",
|
|
30427
|
+
font: "Roboto",
|
|
30428
|
+
flexDirection: "column",
|
|
30429
|
+
margin: m2,
|
|
30430
|
+
justifyContent: "end",
|
|
30431
|
+
textAlign: "left"
|
|
30432
|
+
},
|
|
30433
|
+
children: [!(data == null ? void 0 : data.hasFinanzeFreezed) && isCourseActive((_e = (_d = data == null ? void 0 : data.action) == null ? void 0 : _d.enabled) != null ? _e : false, (_f = data == null ? void 0 : data.Profile) == null ? void 0 : _f.id) && /* @__PURE__ */ jsx(LinkOverlay, {
|
|
30434
|
+
href: (_g = data == null ? void 0 : data.action) == null ? void 0 : _g.href,
|
|
30435
|
+
isExternal: (_h = data == null ? void 0 : data.action) == null ? void 0 : _h.targetBlank
|
|
30436
|
+
}), /* @__PURE__ */ jsxs(Box, {
|
|
30437
|
+
className: "textBox",
|
|
30438
|
+
bottom: "20px",
|
|
30439
|
+
display: "flex",
|
|
30440
|
+
flexDirection: "column",
|
|
30441
|
+
gap: "8px",
|
|
30442
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
30443
|
+
as: "h2",
|
|
30444
|
+
className: "courseName",
|
|
30445
|
+
fontWeight: "700",
|
|
30446
|
+
fontSize: "16px",
|
|
30447
|
+
lineHeight: "21px",
|
|
30448
|
+
children: title
|
|
30449
|
+
}), (_i = data == null ? void 0 : data.information) == null ? void 0 : _i.map((item, index2) => item.icon === "certificate" ? /* @__PURE__ */ jsx(Box, {
|
|
30450
|
+
as: "p",
|
|
30451
|
+
className: "certificateText",
|
|
30452
|
+
fontSize: "14px",
|
|
30453
|
+
fontWeight: "400",
|
|
30454
|
+
lineHeight: "12px",
|
|
30455
|
+
children: item.text
|
|
30456
|
+
}, index2) : /* @__PURE__ */ jsx(Fragment, {}))]
|
|
30457
|
+
})]
|
|
30458
|
+
})
|
|
30459
|
+
});
|
|
30460
|
+
}
|
|
30461
|
+
BoxImage.displayName = "BoxImage";
|
|
30462
|
+
const Boxes = ({
|
|
30463
|
+
type = "TRADITIONAL",
|
|
30464
|
+
data,
|
|
30465
|
+
modalPaymentText
|
|
30466
|
+
}) => {
|
|
30467
|
+
var _a, _b;
|
|
30468
|
+
const common = {
|
|
30469
|
+
data,
|
|
30470
|
+
modalPaymentText
|
|
30471
|
+
};
|
|
30472
|
+
const commonImg = {
|
|
30473
|
+
data,
|
|
30474
|
+
backgroundImg: (_a = data.background) != null ? _a : "",
|
|
30475
|
+
title: (_b = data.name) != null ? _b : ""
|
|
30476
|
+
};
|
|
30477
|
+
const typeBox = {
|
|
30478
|
+
TRADITIONAL: /* @__PURE__ */ jsx(BoxTraditional, __spreadValues({}, common)),
|
|
30479
|
+
TRADITIONAL_LANDSCAPE: /* @__PURE__ */ jsx(BoxTraditional, __spreadValues({}, common)),
|
|
30480
|
+
IMAGE_LARGE: /* @__PURE__ */ jsx(BoxImage, __spreadValues({}, commonImg)),
|
|
30481
|
+
IMAGE_SMALL: /* @__PURE__ */ jsx(BoxImage, __spreadProps(__spreadValues({}, commonImg), {
|
|
30482
|
+
size: "small"
|
|
30483
|
+
}))
|
|
30484
|
+
};
|
|
30485
|
+
return typeBox[type];
|
|
30486
|
+
};
|
|
30390
30487
|
const columnGap = 1.25;
|
|
30391
30488
|
const wCourse = 17.8125;
|
|
30392
30489
|
function CourseList({
|
|
30393
30490
|
courses,
|
|
30394
30491
|
modalPaymentText,
|
|
30395
|
-
m: m2 = "0 auto"
|
|
30492
|
+
m: m2 = "0 auto",
|
|
30493
|
+
typeBox = "TRADITIONAL"
|
|
30396
30494
|
}) {
|
|
30397
30495
|
if (courses === void 0) {
|
|
30398
30496
|
return null;
|
|
@@ -30404,8 +30502,9 @@ function CourseList({
|
|
|
30404
30502
|
gridTemplateColumns: `repeat(auto-fill, minmax(${wCourse}rem, 1fr))`,
|
|
30405
30503
|
m: m2,
|
|
30406
30504
|
w: "100%",
|
|
30407
|
-
children: courses == null ? void 0 : courses.map((course) => /* @__PURE__ */ jsx(
|
|
30505
|
+
children: courses == null ? void 0 : courses.map((course) => /* @__PURE__ */ jsx(Boxes, {
|
|
30408
30506
|
data: course,
|
|
30507
|
+
type: typeBox,
|
|
30409
30508
|
modalPaymentText
|
|
30410
30509
|
}, course.id))
|
|
30411
30510
|
});
|