@eclass/ui-kit 1.8.1 → 1.9.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,6 @@
1
+ /// <reference types="react" />
2
+ import { BaseProps } from './Base';
3
+ export declare function TinyAlertError(props: BaseProps): JSX.Element;
4
+ export declare namespace TinyAlertError {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { BaseProps } from './Base';
3
+ export declare function TinyAlertInfo(props: BaseProps): JSX.Element;
4
+ export declare namespace TinyAlertInfo {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { BaseProps } from './Base';
3
+ export declare function TinyAlertSuccess(props: BaseProps): JSX.Element;
4
+ export declare namespace TinyAlertSuccess {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { BaseProps } from './Base';
3
+ export declare function TinyAlertWarning(props: BaseProps): JSX.Element;
4
+ export declare namespace TinyAlertWarning {
5
+ var displayName: string;
6
+ }
@@ -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
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './Label/Label';
2
2
  export * from './Progress/Progress';
3
3
  export * from './Ripples/Ripples';
4
+ export * from './TinyAlert/TinyAlert';
@@ -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 {
@@ -27594,12 +27787,15 @@ function Footer({
27594
27787
  _focus: cssButton,
27595
27788
  _active: cssButton,
27596
27789
  onClick: () => handleClick(),
27790
+ fontSize: "1rem !important",
27597
27791
  children: action.text
27598
27792
  }) : /* @__PURE__ */ jsx(Text, {
27599
27793
  color: vars("colors-main-deepSkyBlue"),
27600
27794
  fontWeight: "500",
27601
27795
  mr: action.hasIcon ? "1.5rem" : "0",
27602
27796
  lineHeight: "1.172rem",
27797
+ mt: "0",
27798
+ mb: "0",
27603
27799
  children: action.text
27604
27800
  }), action.hasIcon && /* @__PURE__ */ jsx(ArrowRight, {
27605
27801
  color: vars("colors-main-deepSkyBlue")
@@ -27695,5 +27891,5 @@ function CourseList({
27695
27891
  });
27696
27892
  }
27697
27893
  CourseList.displayName = "CourseList";
27698
- export { CourseList, Label, Progress, Ripples, dataFake, maxWidthCoursesList, theme, vars };
27894
+ export { CourseList, Label, Progress, Ripples, TinyAlert, dataFake, maxWidthCoursesList, theme, vars };
27699
27895
  //# sourceMappingURL=eclass-ui-kit.es.js.map