@eclass/ui-kit 1.8.0 → 1.9.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.
- package/dist/atoms/Icons/TinyAlertError.d.ts +6 -0
- package/dist/atoms/Icons/TinyAlertInfo.d.ts +6 -0
- package/dist/atoms/Icons/TinyAlertSuccess.d.ts +6 -0
- package/dist/atoms/Icons/TinyAlertWarning.d.ts +6 -0
- package/dist/atoms/Icons/index.d.ts +4 -0
- package/dist/atoms/TinyAlert/TinyAlert.d.ts +16 -0
- package/dist/atoms/index.d.ts +1 -0
- package/dist/eclass-ui-kit.es.js +203 -7
- package/dist/eclass-ui-kit.es.js.map +1 -1
- package/dist/eclass-ui-kit.umd.js +21 -21
- package/dist/eclass-ui-kit.umd.js.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -5,3 +5,7 @@ export * from './CircularCheck';
|
|
|
5
5
|
export * from './CircularInformation';
|
|
6
6
|
export * from './Profile';
|
|
7
7
|
export * from './Schedule';
|
|
8
|
+
export * from './TinyAlertInfo';
|
|
9
|
+
export * from './TinyAlertError';
|
|
10
|
+
export * from './TinyAlertWarning';
|
|
11
|
+
export * from './TinyAlertSuccess';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface props {
|
|
3
|
+
status: 'success' | 'error' | 'info' | 'warning' | 'answered' | 'pending' | 'omitted' | 'new';
|
|
4
|
+
text?: string;
|
|
5
|
+
margin?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Componente que retorna un label con distintos tipos de estado y muestra un texto por defecto en caso de que el mensaje no se especifique.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <TinyAlert status="info" />
|
|
12
|
+
*/
|
|
13
|
+
export declare function TinyAlert({ status, text, margin }: props): JSX.Element | null;
|
|
14
|
+
export declare namespace TinyAlert {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
package/dist/atoms/index.d.ts
CHANGED
package/dist/eclass-ui-kit.es.js
CHANGED
|
@@ -26527,6 +26527,199 @@ function Schedule(props) {
|
|
|
26527
26527
|
}));
|
|
26528
26528
|
}
|
|
26529
26529
|
Schedule.displayName = "Schedule";
|
|
26530
|
+
function TinyAlertInfo(props) {
|
|
26531
|
+
return /* @__PURE__ */ jsxs(Base, __spreadProps(__spreadValues({}, props), {
|
|
26532
|
+
w: "12px",
|
|
26533
|
+
h: "12px",
|
|
26534
|
+
viewBox: "0 0 12 12",
|
|
26535
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
26536
|
+
cx: "6",
|
|
26537
|
+
cy: "6",
|
|
26538
|
+
r: "6",
|
|
26539
|
+
fill: "#0189FF"
|
|
26540
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26541
|
+
d: "M7 6H5V10H7V6Z",
|
|
26542
|
+
fill: "white"
|
|
26543
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26544
|
+
d: "M6 4C6.55228 4 7 3.55228 7 3C7 2.44772 6.55228 2 6 2C5.44772 2 5 2.44772 5 3C5 3.55228 5.44772 4 6 4Z",
|
|
26545
|
+
fill: "white"
|
|
26546
|
+
})]
|
|
26547
|
+
}));
|
|
26548
|
+
}
|
|
26549
|
+
TinyAlertInfo.displayName = "TinyAlertInfo";
|
|
26550
|
+
function TinyAlertError(props) {
|
|
26551
|
+
return /* @__PURE__ */ jsxs(Base, __spreadProps(__spreadValues({}, props), {
|
|
26552
|
+
w: "12px",
|
|
26553
|
+
h: "12px",
|
|
26554
|
+
viewBox: "0 0 12 12",
|
|
26555
|
+
children: [/* @__PURE__ */ jsxs("g", {
|
|
26556
|
+
clipPath: "url(#clip0_2165_6683)",
|
|
26557
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
26558
|
+
cx: "6",
|
|
26559
|
+
cy: "6",
|
|
26560
|
+
r: "6",
|
|
26561
|
+
fill: "#CC0000"
|
|
26562
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26563
|
+
fillRule: "evenodd",
|
|
26564
|
+
clipRule: "evenodd",
|
|
26565
|
+
d: "M3.87867 2.46447L2.46446 3.87868L4.58578 6L2.46446 8.12132L3.87867 9.53553L5.99999 7.41421L8.12131 9.53553L9.53553 8.12132L7.41421 6L9.53553 3.87868L8.12131 2.46447L5.99999 4.58579L3.87867 2.46447Z",
|
|
26566
|
+
fill: "white"
|
|
26567
|
+
})]
|
|
26568
|
+
}), /* @__PURE__ */ jsx("defs", {
|
|
26569
|
+
children: /* @__PURE__ */ jsx("clipPath", {
|
|
26570
|
+
id: "clip0_2165_6683",
|
|
26571
|
+
children: /* @__PURE__ */ jsx("rect", {
|
|
26572
|
+
width: "12px",
|
|
26573
|
+
height: "12px",
|
|
26574
|
+
fill: "white"
|
|
26575
|
+
})
|
|
26576
|
+
})
|
|
26577
|
+
})]
|
|
26578
|
+
}));
|
|
26579
|
+
}
|
|
26580
|
+
TinyAlertError.displayName = "TinyAlertError";
|
|
26581
|
+
function TinyAlertWarning(props) {
|
|
26582
|
+
return /* @__PURE__ */ jsxs(Base, __spreadProps(__spreadValues({}, props), {
|
|
26583
|
+
w: "12px",
|
|
26584
|
+
h: "12px",
|
|
26585
|
+
viewBox: "0 0 12 12",
|
|
26586
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
26587
|
+
cx: "6",
|
|
26588
|
+
cy: "6",
|
|
26589
|
+
r: "6",
|
|
26590
|
+
fill: "#F5A623"
|
|
26591
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26592
|
+
d: "M5 6L7 6L7 2L5 2L5 6Z",
|
|
26593
|
+
fill: "white"
|
|
26594
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26595
|
+
d: "M6 8C5.44771 8 5 8.44772 5 9C5 9.55228 5.44772 10 6 10C6.55228 10 7 9.55228 7 9C7 8.44772 6.55228 8 6 8Z",
|
|
26596
|
+
fill: "white"
|
|
26597
|
+
})]
|
|
26598
|
+
}));
|
|
26599
|
+
}
|
|
26600
|
+
TinyAlertWarning.displayName = "TinyAlertWarning";
|
|
26601
|
+
function TinyAlertSuccess(props) {
|
|
26602
|
+
return /* @__PURE__ */ jsxs(Base, __spreadProps(__spreadValues({}, props), {
|
|
26603
|
+
w: "12px",
|
|
26604
|
+
h: "12px",
|
|
26605
|
+
viewBox: "0 0 12 12",
|
|
26606
|
+
children: [/* @__PURE__ */ jsxs("g", {
|
|
26607
|
+
clipPath: "url(#clip0_2191_1138)",
|
|
26608
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
26609
|
+
cx: "6",
|
|
26610
|
+
cy: "6",
|
|
26611
|
+
r: "6",
|
|
26612
|
+
fill: "#28A745"
|
|
26613
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26614
|
+
fillRule: "evenodd",
|
|
26615
|
+
clipRule: "evenodd",
|
|
26616
|
+
d: "M3.41421 5.53549L2 6.94971L3.41421 8.36392L4.82843 9.77813L9.77817 4.82839L8.36396 3.41417L4.82843 6.94971L3.41421 5.53549Z",
|
|
26617
|
+
fill: "white"
|
|
26618
|
+
})]
|
|
26619
|
+
}), /* @__PURE__ */ jsx("defs", {
|
|
26620
|
+
children: /* @__PURE__ */ jsx("clipPath", {
|
|
26621
|
+
id: "clip0_2191_1138",
|
|
26622
|
+
children: /* @__PURE__ */ jsx("rect", {
|
|
26623
|
+
width: "12",
|
|
26624
|
+
height: "12",
|
|
26625
|
+
fill: "white"
|
|
26626
|
+
})
|
|
26627
|
+
})
|
|
26628
|
+
})]
|
|
26629
|
+
}));
|
|
26630
|
+
}
|
|
26631
|
+
TinyAlertSuccess.displayName = "TinyAlertSuccess";
|
|
26632
|
+
function TinyAlert({
|
|
26633
|
+
status,
|
|
26634
|
+
text,
|
|
26635
|
+
margin = "0"
|
|
26636
|
+
}) {
|
|
26637
|
+
const alerts = {
|
|
26638
|
+
success: {
|
|
26639
|
+
icon: /* @__PURE__ */ jsx(TinyAlertSuccess, {}),
|
|
26640
|
+
text: "Success",
|
|
26641
|
+
bg: vars("colors-alert-ice"),
|
|
26642
|
+
color: vars("colors-neutral-darkCharcoal")
|
|
26643
|
+
},
|
|
26644
|
+
error: {
|
|
26645
|
+
icon: /* @__PURE__ */ jsx(TinyAlertError, {}),
|
|
26646
|
+
text: "Error",
|
|
26647
|
+
bg: vars("colors-alert-veryLightPinkThree"),
|
|
26648
|
+
color: vars("colors-neutral-darkCharcoal")
|
|
26649
|
+
},
|
|
26650
|
+
info: {
|
|
26651
|
+
icon: /* @__PURE__ */ jsx(TinyAlertInfo, {}),
|
|
26652
|
+
text: "Info",
|
|
26653
|
+
bg: vars("colors-alert-veryLightBlue"),
|
|
26654
|
+
color: vars("colors-neutral-darkCharcoal")
|
|
26655
|
+
},
|
|
26656
|
+
warning: {
|
|
26657
|
+
icon: /* @__PURE__ */ jsx(TinyAlertWarning, {}),
|
|
26658
|
+
text: "Warning",
|
|
26659
|
+
bg: vars("colors-alert-pale"),
|
|
26660
|
+
color: vars("colors-neutral-darkCharcoal")
|
|
26661
|
+
},
|
|
26662
|
+
answered: {
|
|
26663
|
+
icon: void 0,
|
|
26664
|
+
text: "Answered",
|
|
26665
|
+
bg: vars("colors-main-blueGrey"),
|
|
26666
|
+
color: vars("colors-neutral-white")
|
|
26667
|
+
},
|
|
26668
|
+
omitted: {
|
|
26669
|
+
icon: void 0,
|
|
26670
|
+
text: "Omitted",
|
|
26671
|
+
bg: vars("colors-main-ziggurat"),
|
|
26672
|
+
color: vars("colors-neutral-darkCharcoal")
|
|
26673
|
+
},
|
|
26674
|
+
pending: {
|
|
26675
|
+
icon: void 0,
|
|
26676
|
+
text: "Pending",
|
|
26677
|
+
bg: vars("colors-neutral-cultured"),
|
|
26678
|
+
color: vars("colors-neutral-darkCharcoal")
|
|
26679
|
+
},
|
|
26680
|
+
new: {
|
|
26681
|
+
icon: void 0,
|
|
26682
|
+
text: "New answer",
|
|
26683
|
+
bg: "#FF7A14",
|
|
26684
|
+
color: vars("colors-neutral-white")
|
|
26685
|
+
}
|
|
26686
|
+
};
|
|
26687
|
+
if (!alerts[status]) {
|
|
26688
|
+
return null;
|
|
26689
|
+
}
|
|
26690
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
26691
|
+
margin,
|
|
26692
|
+
"data-testid": "TinyAlert-Box",
|
|
26693
|
+
backgroundColor: alerts[status].bg,
|
|
26694
|
+
display: "flex",
|
|
26695
|
+
flexDirection: "row",
|
|
26696
|
+
alignItems: "center",
|
|
26697
|
+
padding: ".125em .25em",
|
|
26698
|
+
gap: ".25rem",
|
|
26699
|
+
width: "fit-content",
|
|
26700
|
+
borderRadius: ".25rem",
|
|
26701
|
+
children: [alerts[status].icon && /* @__PURE__ */ jsx(Box, {
|
|
26702
|
+
lineHeight: 0,
|
|
26703
|
+
sx: {
|
|
26704
|
+
">svg": {
|
|
26705
|
+
margin: 0
|
|
26706
|
+
}
|
|
26707
|
+
},
|
|
26708
|
+
children: alerts[status].icon
|
|
26709
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
26710
|
+
as: "span",
|
|
26711
|
+
color: alerts[status].color,
|
|
26712
|
+
fontSize: ".75rem",
|
|
26713
|
+
fontStyle: "normal",
|
|
26714
|
+
fontWeight: "400",
|
|
26715
|
+
fontFamily: "Roboto",
|
|
26716
|
+
lineHeight: ".875rem",
|
|
26717
|
+
margin: "0",
|
|
26718
|
+
children: text != null ? text : alerts[status].text
|
|
26719
|
+
})]
|
|
26720
|
+
});
|
|
26721
|
+
}
|
|
26722
|
+
TinyAlert.displayName = "TinyAlert";
|
|
26530
26723
|
const STUDENT = 4;
|
|
26531
26724
|
function Header() {
|
|
26532
26725
|
const {
|
|
@@ -27581,7 +27774,7 @@ function Footer({
|
|
|
27581
27774
|
borderTop: "1px solid",
|
|
27582
27775
|
borderTopColor: vars("colors-neutral-platinum"),
|
|
27583
27776
|
children: [isCourseActive(action.enabled, Profile2 == null ? void 0 : Profile2.id) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
27584
|
-
children: [hasFinanzeFreezed ? /* @__PURE__ */ jsx(
|
|
27777
|
+
children: [hasFinanzeFreezed ? /* @__PURE__ */ jsx(Box, {
|
|
27585
27778
|
color: vars("colors-main-deepSkyBlue"),
|
|
27586
27779
|
backgroundColor: "transparent",
|
|
27587
27780
|
fontWeight: "500",
|
|
@@ -27595,13 +27788,13 @@ function Footer({
|
|
|
27595
27788
|
_active: cssButton,
|
|
27596
27789
|
onClick: () => handleClick(),
|
|
27597
27790
|
children: action.text
|
|
27598
|
-
}) : /* @__PURE__ */ jsx(
|
|
27599
|
-
href: action.href,
|
|
27791
|
+
}) : /* @__PURE__ */ jsx(Text, {
|
|
27600
27792
|
color: vars("colors-main-deepSkyBlue"),
|
|
27601
27793
|
fontWeight: "500",
|
|
27602
27794
|
mr: action.hasIcon ? "1.5rem" : "0",
|
|
27603
27795
|
lineHeight: "1.172rem",
|
|
27604
|
-
|
|
27796
|
+
mt: "0",
|
|
27797
|
+
mb: "0",
|
|
27605
27798
|
children: action.text
|
|
27606
27799
|
}), action.hasIcon && /* @__PURE__ */ jsx(ArrowRight, {
|
|
27607
27800
|
color: vars("colors-main-deepSkyBlue")
|
|
@@ -27637,7 +27830,7 @@ function CourseBox({
|
|
|
27637
27830
|
data,
|
|
27638
27831
|
modalPaymentText
|
|
27639
27832
|
}) {
|
|
27640
|
-
var _a, _b, _c;
|
|
27833
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
27641
27834
|
const cssActive = {
|
|
27642
27835
|
boxShadow: `0 2px 7px 0 ${vars("colors-neutral-silverSand")}`
|
|
27643
27836
|
};
|
|
@@ -27660,7 +27853,10 @@ function CourseBox({
|
|
|
27660
27853
|
justify: "space-between",
|
|
27661
27854
|
h: "100%",
|
|
27662
27855
|
children: [/* @__PURE__ */ jsxs(Box, {
|
|
27663
|
-
children: [
|
|
27856
|
+
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, {
|
|
27857
|
+
href: (_g = data.action) == null ? void 0 : _g.href,
|
|
27858
|
+
isExternal: (_h = data.action) == null ? void 0 : _h.targetBlank
|
|
27859
|
+
}), /* @__PURE__ */ jsx(Header, {}), /* @__PURE__ */ jsx(Section, {})]
|
|
27664
27860
|
}), /* @__PURE__ */ jsx(Footer, {
|
|
27665
27861
|
modalPaymentText
|
|
27666
27862
|
})]
|
|
@@ -27694,5 +27890,5 @@ function CourseList({
|
|
|
27694
27890
|
});
|
|
27695
27891
|
}
|
|
27696
27892
|
CourseList.displayName = "CourseList";
|
|
27697
|
-
export { CourseList, Label, Progress, Ripples, dataFake, maxWidthCoursesList, theme, vars };
|
|
27893
|
+
export { CourseList, Label, Progress, Ripples, TinyAlert, dataFake, maxWidthCoursesList, theme, vars };
|
|
27698
27894
|
//# sourceMappingURL=eclass-ui-kit.es.js.map
|