@eclass/ui-kit 1.33.0 → 1.33.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.
Files changed (62) hide show
  1. package/dist/atoms/Icons/AcademicRecord.d.ts +1 -2
  2. package/dist/atoms/Icons/AlertInfo.d.ts +1 -2
  3. package/dist/atoms/Icons/Alerts/ErrorWhite.d.ts +1 -2
  4. package/dist/atoms/Icons/Alerts/InfoWhite.d.ts +1 -2
  5. package/dist/atoms/Icons/Alerts/SuccessWhite.d.ts +1 -2
  6. package/dist/atoms/Icons/Alerts/WarningWhite.d.ts +1 -2
  7. package/dist/atoms/Icons/ArrowRight.d.ts +1 -2
  8. package/dist/atoms/Icons/Base.d.ts +2 -2
  9. package/dist/atoms/Icons/Certificate.d.ts +1 -2
  10. package/dist/atoms/Icons/CircularCheck.d.ts +1 -2
  11. package/dist/atoms/Icons/CircularInformation.d.ts +1 -2
  12. package/dist/atoms/Icons/Close.d.ts +1 -2
  13. package/dist/atoms/Icons/Download.d.ts +1 -2
  14. package/dist/atoms/Icons/GoAhead.d.ts +1 -2
  15. package/dist/atoms/Icons/GoBack.d.ts +1 -2
  16. package/dist/atoms/Icons/Loader.d.ts +0 -1
  17. package/dist/atoms/Icons/Multimedia.d.ts +1 -2
  18. package/dist/atoms/Icons/Password.d.ts +1 -2
  19. package/dist/atoms/Icons/Pen.d.ts +1 -2
  20. package/dist/atoms/Icons/PlusSign.d.ts +1 -2
  21. package/dist/atoms/Icons/Profile.d.ts +1 -2
  22. package/dist/atoms/Icons/Schedule.d.ts +1 -2
  23. package/dist/atoms/Icons/TextBubble.d.ts +1 -2
  24. package/dist/atoms/Icons/TinyAlertError.d.ts +1 -2
  25. package/dist/atoms/Icons/TinyAlertInfo.d.ts +1 -2
  26. package/dist/atoms/Icons/TinyAlertSuccess.d.ts +1 -2
  27. package/dist/atoms/Icons/TinyAlertWarning.d.ts +1 -2
  28. package/dist/atoms/Icons/TrashCan.d.ts +1 -2
  29. package/dist/atoms/Progress/Progress.d.ts +0 -1
  30. package/dist/atoms/Ripples/Ripples.d.ts +0 -1
  31. package/dist/atoms/TinyAlert/TinyAlert.d.ts +0 -1
  32. package/dist/eclass-ui-kit.es.js +28529 -36434
  33. package/dist/eclass-ui-kit.es.js.map +1 -1
  34. package/dist/eclass-ui-kit.umd.js +371 -276
  35. package/dist/eclass-ui-kit.umd.js.map +1 -1
  36. package/dist/index.d.ts +4 -4
  37. package/dist/molecules/Buttons/BtnPrimary.d.ts +1 -2
  38. package/dist/molecules/Buttons/BtnSecondary.d.ts +1 -2
  39. package/dist/molecules/Buttons/BtnTertiary.d.ts +1 -2
  40. package/dist/molecules/Tooltip/NewTooltip.d.ts +2 -3
  41. package/dist/organisms/Alerts/Alert.d.ts +2 -3
  42. package/dist/organisms/Alerts/FlashNotification.d.ts +1 -2
  43. package/dist/organisms/Alerts/types.d.ts +70 -0
  44. package/dist/organisms/Alerts/utils/alertStates.d.ts +4 -4
  45. package/dist/organisms/Alerts/utils/useFlashNotification.d.ts +1 -1
  46. package/dist/organisms/CourseList/Boxes/BoxImage.d.ts +1 -2
  47. package/dist/organisms/CourseList/Boxes/BoxTraditional.d.ts +1 -1
  48. package/dist/organisms/CourseList/Boxes/Boxes.d.ts +1 -2
  49. package/dist/organisms/CourseList/CourseList.d.ts +1 -2
  50. package/dist/organisms/CourseList/components/CourseStatus.d.ts +1 -2
  51. package/dist/organisms/CourseList/components/DateStatus.d.ts +0 -1
  52. package/dist/organisms/CourseList/components/Footer.d.ts +1 -2
  53. package/dist/organisms/CourseList/components/Header.d.ts +0 -1
  54. package/dist/organisms/CourseList/components/IconSelection.d.ts +0 -1
  55. package/dist/organisms/CourseList/components/Modal/PaymentModal.d.ts +1 -2
  56. package/dist/organisms/CourseList/components/Section.d.ts +0 -1
  57. package/dist/organisms/CourseList/types.d.ts +37 -0
  58. package/dist/organisms/CourseList/utils/dataFake.d.ts +1 -1
  59. package/dist/theme/index.d.ts +1 -1
  60. package/dist/tsconfig.types.tsbuildinfo +1 -1
  61. package/dist/vite-env.d.ts +2 -0
  62. package/package.json +63 -60
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from '@atoms';
2
- export * from '@molecules';
3
- export * from '@organisms';
4
- export * from '@theme';
1
+ export * from "./atoms";
2
+ export * from "./molecules";
3
+ export * from "./organisms";
4
+ export * from "./theme";
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { type propsBaseBtns } from './Btn';
1
+ import { propsBaseBtns } from './Btn';
3
2
  /**
4
3
  * Componente BtnPrimary
5
4
  *
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { type propsBaseBtns } from './Btn';
1
+ import { propsBaseBtns } from './Btn';
3
2
  /**
4
3
  * Componente BtnSecondary
5
4
  *
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export interface propsTertiaryBtn {
3
3
  iconStatus?: 'answer' | 'ahead' | 'back' | 'edit' | 'delete' | 'more' | 'password' | 'multimedia' | 'record' | 'download' | 'noIcon';
4
- /** Se permite agregar un nuevo icono, para casos en que no sirvan los de la lista definida */
5
- iconCustom?: JSX.Element;
6
4
  children?: React.ReactNode;
7
5
  rightIcon?: boolean;
6
+ iconCustom?: JSX.Element;
8
7
  withoutColor?: boolean;
9
8
  m?: string;
10
9
  type?: 'button' | 'submit' | 'reset';
@@ -1,5 +1,5 @@
1
- import { type FC, type ReactElement } from 'react';
2
- import { type PlacementWithLogical } from '@chakra-ui/react';
1
+ import { FC } from 'react';
2
+ import { PlacementWithLogical } from '@chakra-ui/react';
3
3
  interface TooltipProps {
4
4
  className?: string;
5
5
  label?: React.ReactNode;
@@ -7,7 +7,6 @@ interface TooltipProps {
7
7
  m?: string;
8
8
  maxWidth?: string;
9
9
  placement?: PlacementWithLogical;
10
- children?: ReactElement;
11
10
  }
12
11
  export declare const NewTooltip: FC<TooltipProps>;
13
12
  export {};
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { type IAlertProps } from './types.d';
1
+ import { IAlertProps } from './types.d';
3
2
  /**
4
3
  * Componente de alerta embebida que puede tener 4 estados diferentes.
5
4
  * Opcionalmente puede llevar un botón. El botón puede mostrar sólo un texto
@@ -14,4 +13,4 @@ import { type IAlertProps } from './types.d';
14
13
  * Mensaje
15
14
  * </Alert>
16
15
  */
17
- export declare function Alert({ children, canDismiss, buttonText, buttonIcon, buttonLink, isFlash, onClick, state, m, }: IAlertProps): JSX.Element;
16
+ export declare function Alert({ children, canDismiss, buttonText, buttonIcon, buttonLink, fullWidth, isFlash, onClick, state, m, }: IAlertProps): JSX.Element;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { type IFlashNotificationProps } from './types.d';
1
+ import { IFlashNotificationProps } from './types.d';
3
2
  /**
4
3
  * Componente de notificación flash que se muestra centrada en la parte superior de la pantalla.
5
4
  * Para implementarlo, se usa en conjunto con el hook useFlashNotification.
@@ -0,0 +1,70 @@
1
+ type TState = 'error' | 'info' | 'success' | 'warning'
2
+ export interface IAlertProps {
3
+ /**
4
+ * Mensaje de alerta
5
+ */
6
+ children?: React.ReactChild | React.ReactChild[]
7
+ /**
8
+ * Muestra el botón para cerrar
9
+ */
10
+ canDismiss?: boolean
11
+ /**
12
+ * Texto del botón
13
+ */
14
+ buttonText?: string
15
+ /**
16
+ * Ícono del botón
17
+ */
18
+ buttonIcon?: React.ReactElement
19
+ /**
20
+ * Boolean que determina si el botón es tipo link
21
+ */
22
+ buttonLink?: boolean
23
+ /**
24
+ * Ancho al 100% del contenedot
25
+ */
26
+ fullWidth?: boolean
27
+ /**
28
+ * Para notificación flash
29
+ */
30
+ isFlash?: boolean
31
+ /**
32
+ * Función del botón
33
+ */
34
+ onClick?: () => void
35
+ /**
36
+ * Estado que define color e ícono de la alerta
37
+ * @exampe
38
+ * 'error'
39
+ * 'info'
40
+ * 'success'
41
+ * 'warning'
42
+ */
43
+ state: TState
44
+ /**
45
+ * Margen
46
+ */
47
+ m?: string
48
+ }
49
+
50
+ export interface IFlashNotificationProps {
51
+ /**
52
+ * Margen
53
+ */
54
+ m?: string
55
+ /**
56
+ * Mensaje que muestra la notificación
57
+ */
58
+ message: string
59
+ /**
60
+ * Estado que define color e ícono de la alerta
61
+ * @exampe
62
+ * 'error'
63
+ * 'info'
64
+ * 'success'
65
+ * 'warning'
66
+ * @
67
+ */
68
+ state: TState
69
+ show?: boolean
70
+ }
@@ -1,21 +1,21 @@
1
1
  export declare const alertStates: {
2
2
  success: {
3
- icon: import("react/jsx-runtime").JSX.Element;
3
+ icon: JSX.Element;
4
4
  bg: string;
5
5
  id: string;
6
6
  };
7
7
  error: {
8
- icon: import("react/jsx-runtime").JSX.Element;
8
+ icon: JSX.Element;
9
9
  bg: string;
10
10
  id: string;
11
11
  };
12
12
  info: {
13
- icon: import("react/jsx-runtime").JSX.Element;
13
+ icon: JSX.Element;
14
14
  bg: string;
15
15
  id: string;
16
16
  };
17
17
  warning: {
18
- icon: import("react/jsx-runtime").JSX.Element;
18
+ icon: JSX.Element;
19
19
  bg: string;
20
20
  id: string;
21
21
  };
@@ -1,4 +1,4 @@
1
- import { type IFlashNotificationProps } from '../types';
1
+ import { IFlashNotificationProps } from '../types';
2
2
  /**
3
3
  * Hook que actúa como trigger del componente FlashNotification,
4
4
  * usando los siguientes parámetros:
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type * as Type from '../types';
1
+ import * as Type from '../types';
3
2
  interface ImageBoxProps {
4
3
  backgroundImg: string;
5
4
  title: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type * as Type from '../types';
2
+ import * as Type from '../types';
3
3
  export declare const CourseBoxContext: React.Context<Partial<import("@eclass/api").AcademicBox>>;
4
4
  interface IBoxTraditional {
5
5
  data: Type.AcademicList;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { type AcademicList, type WrapperCoursesProps } from '../types';
1
+ import { AcademicList, WrapperCoursesProps } from '../types';
3
2
  interface IBoxes {
4
3
  type: WrapperCoursesProps['typeBox'];
5
4
  modalPaymentText: WrapperCoursesProps['modalPaymentText'];
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type * as Type from './types';
1
+ import * as Type from './types';
3
2
  export declare const columnGap = 1.25;
4
3
  export declare const wCourse = 17.8125;
5
4
  /**
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { type ProgressCourse, type StatusCourse } from '@eclass/api';
1
+ import { ProgressCourse, StatusCourse } from '@eclass/api';
3
2
  interface props {
4
3
  /** import { ProgressCourse } from '@eclass/api' */
5
4
  progress: ProgressCourse;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface DateStatusProps {
3
2
  date?: string;
4
3
  }
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type * as Type from '../types';
1
+ import * as Type from '../types';
3
2
  export declare function Footer({ modalPaymentText }: Type.FooterProps): JSX.Element | null;
4
3
  export declare namespace Footer {
5
4
  var displayName: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function Header(): JSX.Element;
3
2
  export declare namespace Header {
4
3
  var displayName: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface IconSelectionProps {
3
2
  type: string;
4
3
  progressValue?: number;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type * as Type from '../../types';
1
+ import * as Type from '../../types';
3
2
  interface PaymentModalProps {
4
3
  isOpen: boolean;
5
4
  onOpen: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function Section(): JSX.Element | null;
3
2
  export declare namespace Section {
4
3
  var displayName: string;
@@ -0,0 +1,37 @@
1
+ import { AcademicBox } from '@eclass/api'
2
+
3
+ export type AcademicList = AcademicBox
4
+
5
+ interface PaymentText {
6
+ title: string
7
+ body: string
8
+ buttonName: string
9
+ }
10
+
11
+ export interface WrapperCoursesProps {
12
+ /** Array de cursos a desplegar */
13
+ courses: AcademicList[]
14
+
15
+ /** Especificación de margen
16
+ * @example m: '0 0 0 16px'
17
+ */
18
+ m?: string
19
+
20
+ /** Objeto con información acerca del estado de pago del curso, que incluye 'title', 'body' y 'buttonName'.
21
+ * @example
22
+ *
23
+ * modalPaymentTextArg = {
24
+ * title: 'Curso congelado por pagos pendientes'
25
+ * body: 'Para regularizar esta situación, comúnicate con ___'
26
+ * buttonName: 'Entendido'
27
+ * }
28
+ */
29
+ modalPaymentText?: PaymentText
30
+
31
+ /** Especificación de tipo de caja curso a mostrar. Por default se muestra el tipo TRADITIONAL */
32
+ typeBox?: 'TRADITIONAL' | 'TRADITIONAL_LANDSCAPE' | 'IMAGE_LARGE' | 'IMAGE_SMALL'
33
+ }
34
+
35
+ export interface FooterProps {
36
+ modalPaymentText?: PaymentText
37
+ }
@@ -1,4 +1,4 @@
1
- export type icon = 'schedule' | 'certificate' | 'circularCheck' | 'progress' | 'circularInformation';
1
+ export declare type icon = 'schedule' | 'certificate' | 'circularCheck' | 'progress' | 'circularInformation';
2
2
  export declare const dataBase: {
3
3
  name: string;
4
4
  background: string;
@@ -1,2 +1,2 @@
1
- export declare const theme: Record<string, any>;
1
+ export declare const theme: import("@chakra-ui/utils").Dict<any>;
2
2
  export declare const vars: (value: string) => string;