@eclass/ui-kit 1.51.7 → 1.51.8
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/AcademicRecord.d.ts +6 -0
- package/dist/atoms/Icons/Accessibility.d.ts +3 -0
- package/dist/atoms/Icons/AlertInfo.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/ErrorColor.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/ErrorWhite.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/InfoColor.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/InfoWhite.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/SuccessColor.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/SuccessWhite.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/WarningColor.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/WarningWhite.d.ts +6 -0
- package/dist/atoms/Icons/Alerts/index.d.ts +8 -0
- package/dist/atoms/Icons/ArrowRight.d.ts +6 -0
- package/dist/atoms/Icons/Base.d.ts +15 -0
- package/dist/atoms/Icons/Calendar.d.ts +6 -0
- package/dist/atoms/Icons/Certificate.d.ts +6 -0
- package/dist/atoms/Icons/CircularCheck.d.ts +6 -0
- package/dist/atoms/Icons/CircularInformation.d.ts +6 -0
- package/dist/atoms/Icons/Clock.d.ts +6 -0
- package/dist/atoms/Icons/Close.d.ts +6 -0
- package/dist/atoms/Icons/DiagonalArrow.d.ts +6 -0
- package/dist/atoms/Icons/Download.d.ts +6 -0
- package/dist/atoms/Icons/GoAhead.d.ts +6 -0
- package/dist/atoms/Icons/GoBack.d.ts +6 -0
- package/dist/atoms/Icons/Loader.d.ts +6 -0
- package/dist/atoms/Icons/Multimedia.d.ts +6 -0
- package/dist/atoms/Icons/Password.d.ts +6 -0
- package/dist/atoms/Icons/Pen.d.ts +6 -0
- package/dist/atoms/Icons/PlusSign.d.ts +6 -0
- package/dist/atoms/Icons/Profile.d.ts +6 -0
- package/dist/atoms/Icons/Schedule.d.ts +6 -0
- package/dist/atoms/Icons/TextBubble.d.ts +6 -0
- 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/TrashCan.d.ts +6 -0
- package/dist/atoms/Icons/index.d.ts +25 -0
- package/dist/atoms/Label/Label.d.ts +13 -0
- package/dist/atoms/Progress/Progress.d.ts +10 -0
- package/dist/atoms/Ripples/Ripples.d.ts +11 -0
- package/dist/atoms/TinyAlert/TinyAlert.d.ts +16 -0
- package/dist/atoms/index.d.ts +5 -0
- package/dist/eclass-ui-kit.es.js +35823 -0
- package/dist/eclass-ui-kit.es.js.map +1 -0
- package/dist/eclass-ui-kit.umd.js +563 -0
- package/dist/eclass-ui-kit.umd.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/molecules/Buttons/Btn.d.ts +43 -0
- package/dist/molecules/Buttons/BtnLink.d.ts +18 -0
- package/dist/molecules/Buttons/BtnPrimary.d.ts +24 -0
- package/dist/molecules/Buttons/BtnSecondary.d.ts +24 -0
- package/dist/molecules/Buttons/BtnTertiary.d.ts +31 -0
- package/dist/molecules/Tooltip/NewTooltip.d.ts +14 -0
- package/dist/molecules/UserWay/UserWay.d.ts +2 -0
- package/dist/molecules/UserWay/UserWayCookie.d.ts +1 -0
- package/dist/molecules/index.d.ts +8 -0
- package/dist/organisms/Alerts/Alert.d.ts +17 -0
- package/dist/organisms/Alerts/FlashNotification.d.ts +16 -0
- package/dist/organisms/Alerts/index.d.ts +3 -0
- package/dist/organisms/Alerts/types.d.ts +74 -0
- package/dist/organisms/Alerts/utils/alertStates.d.ts +45 -0
- package/dist/organisms/Alerts/utils/handleTime.d.ts +1 -0
- package/dist/organisms/Alerts/utils/useFlashNotification.d.ts +18 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/CalendarDropdownContainer.d.ts +3 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/Empty.d.ts +4 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/Events.d.ts +30 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/GoToCalendar.d.ts +8 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Components/Header.d.ts +5 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Icons/CalendarButtonIcon.d.ts +2 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/Icons/NoEventsIcon.d.ts +2 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown/services/parseEvents.d.ts +8 -0
- package/dist/organisms/Calendar/Dropdown/CalendarDropdown.d.ts +3 -0
- package/dist/organisms/Calendar/Dropdown/types.d.ts +49 -0
- package/dist/organisms/Calendar/EventsList/EventsList.d.ts +12 -0
- package/dist/organisms/Calendar/EventsList/NotificationIcon.d.ts +2 -0
- package/dist/organisms/Calendar/index.d.ts +2 -0
- 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 +16 -0
- package/dist/organisms/CourseList/components/CourseStatus.d.ts +15 -0
- package/dist/organisms/CourseList/components/DateStatus.d.ts +9 -0
- package/dist/organisms/CourseList/components/Footer.d.ts +6 -0
- package/dist/organisms/CourseList/components/Header.d.ts +5 -0
- package/dist/organisms/CourseList/components/IconSelection.d.ts +7 -0
- package/dist/organisms/CourseList/components/Modal/PaymentModal.d.ts +11 -0
- package/dist/organisms/CourseList/components/Modal/index.d.ts +1 -0
- package/dist/organisms/CourseList/components/Section.d.ts +5 -0
- package/dist/organisms/CourseList/components/index.d.ts +3 -0
- package/dist/organisms/CourseList/index.d.ts +3 -0
- package/dist/organisms/CourseList/types.d.ts +42 -0
- package/dist/organisms/CourseList/utils/dataFake.d.ts +47 -0
- package/dist/organisms/CourseList/utils/index.d.ts +3 -0
- package/dist/organisms/CourseList/utils/isCourseActive.d.ts +10 -0
- package/dist/organisms/CourseList/utils/maxWidthCoursesList.d.ts +13 -0
- package/dist/organisms/Events/Eventos.d.ts +3 -0
- package/dist/organisms/Events/EventsTypes.d.ts +17 -0
- package/dist/organisms/Events/Icons/Calendar.d.ts +6 -0
- package/dist/organisms/Events/Icons/Clock.d.ts +6 -0
- package/dist/organisms/Events/Icons/index.d.ts +2 -0
- package/dist/organisms/Events/TypeBox/LargeBox.d.ts +3 -0
- package/dist/organisms/Events/TypeBox/SmallBox.d.ts +3 -0
- package/dist/organisms/Events/TypeBox/index.d.ts +2 -0
- package/dist/organisms/Events/index.d.ts +1 -0
- package/dist/organisms/ModalAlert/ModalAlert.d.ts +6 -0
- package/dist/organisms/ModalAlert/index.d.ts +1 -0
- package/dist/organisms/ModalAlert/types.d.ts +25 -0
- package/dist/organisms/Resources/Icons/Avi.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Csv.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Doc.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Docx.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Gif.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Icons.d.ts +6 -0
- package/dist/organisms/Resources/Icons/Jpeg.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Jpg.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Mkv.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Mp3.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Mp4.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Pdf.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Png.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Ppt.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Pptx.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Url.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Wav.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Xls.d.ts +2 -0
- package/dist/organisms/Resources/Icons/Xlsx.d.ts +2 -0
- package/dist/organisms/Resources/Icons/index.d.ts +19 -0
- package/dist/organisms/Resources/Resources.d.ts +12 -0
- package/dist/organisms/Resources/StandardBackground.d.ts +6 -0
- package/dist/organisms/Resources/index.d.ts +1 -0
- package/dist/organisms/index.d.ts +6 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/uniqueId.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/theme/colors.d.ts +48 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/styles.d.ts +48 -0
- package/dist/theme/typography.d.ts +11 -0
- package/dist/theme/utils.d.ts +68 -0
- package/dist/tsconfig.types.tsbuildinfo +1 -0
- package/dist/vite-env.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface colorScheme {
|
|
3
|
+
main: string;
|
|
4
|
+
hover: string;
|
|
5
|
+
}
|
|
6
|
+
export interface propsBaseBtns {
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
isFullWidth?: boolean;
|
|
11
|
+
leftIcon?: React.ReactElement;
|
|
12
|
+
m?: string;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
15
|
+
rightIcon?: React.ReactElement;
|
|
16
|
+
role?: 'button' | 'link';
|
|
17
|
+
size?: 'regular' | 'small';
|
|
18
|
+
type?: 'button' | 'submit' | 'reset';
|
|
19
|
+
tabIndex?: number;
|
|
20
|
+
id?: string;
|
|
21
|
+
}
|
|
22
|
+
interface props extends propsBaseBtns {
|
|
23
|
+
bg?: colorScheme;
|
|
24
|
+
/** Colores para el efecto del :active son necesarios dos */
|
|
25
|
+
borderColorActive?: string[];
|
|
26
|
+
color?: string;
|
|
27
|
+
fillLoader?: string;
|
|
28
|
+
rounded?: boolean;
|
|
29
|
+
touchDark?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Componente Btn
|
|
33
|
+
*
|
|
34
|
+
* Dibuja un boton base que posee todo lo estipulado en
|
|
35
|
+
* @see https://zeroheight.com/15698077d/p/358e93-buttons
|
|
36
|
+
*
|
|
37
|
+
* @example <Btn>Lorem</Btn>
|
|
38
|
+
*/
|
|
39
|
+
export declare function Btn({ ariaLabel, bg, borderColorActive, children, color, disabled, fillLoader, id, isFullWidth, isLoading, leftIcon, m, onClick, rightIcon, role, rounded, size, touchDark, type, tabIndex, }: props): JSX.Element;
|
|
40
|
+
export declare namespace Btn {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface props {
|
|
3
|
+
as?: 'button' | 'a';
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
fontSize?: string | '0.875rem';
|
|
7
|
+
href?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
m?: string;
|
|
10
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
role?: 'button' | 'link';
|
|
12
|
+
tabIndex?: number;
|
|
13
|
+
textDecorationLine?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function BtnLink({ as, ariaLabel, children, fontSize, href, id, m, onClick, role, tabIndex, textDecorationLine, }: props): JSX.Element;
|
|
16
|
+
export declare namespace BtnLink {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { propsBaseBtns } from './Btn';
|
|
3
|
+
/**
|
|
4
|
+
* Componente BtnPrimary
|
|
5
|
+
*
|
|
6
|
+
* @see https://zeroheight.com/15698077d/p/358e93-buttons
|
|
7
|
+
*
|
|
8
|
+
* @example <BtnPrimary>Lorem</BtnPrimary>
|
|
9
|
+
*/
|
|
10
|
+
type XOR<T, U> = T | U extends object ? (T extends U ? never : T) | (U extends T ? never : U) : T | U;
|
|
11
|
+
interface ButtonWithTextProps extends propsBaseBtns {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ButtonWithoutTextProps extends propsBaseBtns {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
}
|
|
19
|
+
type PrimaryButtonProps = XOR<ButtonWithTextProps, ButtonWithoutTextProps>;
|
|
20
|
+
export declare function BtnPrimary({ ariaLabel, children, disabled, isFullWidth, leftIcon, m, isLoading, onClick, rightIcon, role, size, type, tabIndex, id, }: PrimaryButtonProps): JSX.Element;
|
|
21
|
+
export declare namespace BtnPrimary {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { propsBaseBtns } from './Btn';
|
|
3
|
+
/**
|
|
4
|
+
* Componente BtnSecondary
|
|
5
|
+
*
|
|
6
|
+
* @see https://zeroheight.com/15698077d/p/358e93-buttons
|
|
7
|
+
*
|
|
8
|
+
* @example <BtnSecondary>Lorem</BtnSecondary>
|
|
9
|
+
*/
|
|
10
|
+
type XOR<T, U> = T | U extends object ? (T extends U ? never : T) | (U extends T ? never : U) : T | U;
|
|
11
|
+
interface ButtonWithTextProps extends propsBaseBtns {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ButtonWithoutTextProps extends propsBaseBtns {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
}
|
|
19
|
+
type SecondaryButtonProps = XOR<ButtonWithTextProps, ButtonWithoutTextProps>;
|
|
20
|
+
export declare function BtnSecondary({ ariaLabel, children, disabled, isFullWidth, leftIcon, m, isLoading, onClick, rightIcon, role, size, type, tabIndex, id, }: SecondaryButtonProps): JSX.Element;
|
|
21
|
+
export declare namespace BtnSecondary {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type XOR<T, U> = T | U extends object ? (T extends U ? never : T) | (U extends T ? never : U) : T | U;
|
|
3
|
+
export interface propsTertiaryBtn {
|
|
4
|
+
activeWhenPress?: boolean;
|
|
5
|
+
id?: string;
|
|
6
|
+
iconCustom?: JSX.Element;
|
|
7
|
+
iconStatus?: 'answer' | 'ahead' | 'back' | 'edit' | 'delete' | 'more' | 'password' | 'multimedia' | 'record' | 'download' | 'noIcon';
|
|
8
|
+
m?: string;
|
|
9
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
+
onMouseEnter?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
onMouseLeave?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
12
|
+
rightIcon?: boolean;
|
|
13
|
+
role?: 'button' | 'link';
|
|
14
|
+
type?: 'button' | 'submit' | 'reset';
|
|
15
|
+
tabIndex?: number;
|
|
16
|
+
withoutColor?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface ButtonWithTextProps extends propsTertiaryBtn {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
interface ButtonWithoutTextProps extends propsTertiaryBtn {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
ariaLabel: string;
|
|
25
|
+
}
|
|
26
|
+
type ButtonProps = XOR<ButtonWithTextProps, ButtonWithoutTextProps>;
|
|
27
|
+
export declare function BtnTertiary({ ariaLabel, activeWhenPress, children, id, iconStatus, iconCustom, m, onClick, onMouseEnter, onMouseLeave, rightIcon, role, type, tabIndex, withoutColor, }: ButtonProps): JSX.Element;
|
|
28
|
+
export declare namespace BtnTertiary {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PlacementWithLogical, CSSObject } from '@chakra-ui/react';
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
m?: string;
|
|
8
|
+
maxWidth?: string;
|
|
9
|
+
placement?: PlacementWithLogical;
|
|
10
|
+
isOpen?: boolean | undefined;
|
|
11
|
+
sx?: CSSObject | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const NewTooltip: FC<TooltipProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function UserWayCookie(): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Btn } from './Buttons/Btn';
|
|
2
|
+
export { BtnPrimary } from './Buttons/BtnPrimary';
|
|
3
|
+
export { BtnSecondary } from './Buttons/BtnSecondary';
|
|
4
|
+
export { BtnTertiary } from './Buttons/BtnTertiary';
|
|
5
|
+
export { BtnLink } from './Buttons/BtnLink';
|
|
6
|
+
export { NewTooltip } from './Tooltip/NewTooltip';
|
|
7
|
+
export { UserWay } from './UserWay/UserWay';
|
|
8
|
+
export { UserWayCookie } from './UserWay/UserWayCookie';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IAlertProps } from './types.d';
|
|
3
|
+
/**
|
|
4
|
+
* Componente de alerta embebida que puede tener 4 estados diferentes.
|
|
5
|
+
* Opcionalmente puede llevar un botón. El botón puede mostrar sólo un texto
|
|
6
|
+
* o un texto junto a un ícono.
|
|
7
|
+
* @example Implementación de alerta con botón y margen
|
|
8
|
+
* <Alert
|
|
9
|
+
* state='info'
|
|
10
|
+
* buttonName='Texto botón'
|
|
11
|
+
* buttonIcon={<Multimedia />}
|
|
12
|
+
* onClick={() => alert('hola')}
|
|
13
|
+
* m='0 20px'>
|
|
14
|
+
* Mensaje
|
|
15
|
+
* </Alert>
|
|
16
|
+
*/
|
|
17
|
+
export declare function Alert({ children, canDismiss, buttonText, buttonIcon, buttonLink, fullWidth, isFlash, onClick, state, m, endTextLink, onClickLink, }: IAlertProps): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IFlashNotificationProps } from './types.d';
|
|
3
|
+
/**
|
|
4
|
+
* Componente de notificación flash que se muestra centrada en la parte superior de la pantalla.
|
|
5
|
+
* Para implementarlo, se usa en conjunto con el hook useFlashNotification.
|
|
6
|
+
* @example Llamado useFlashNotification y asignación de props
|
|
7
|
+
* const { show, active, config } = useFlashNotification({
|
|
8
|
+
* state: 'info',
|
|
9
|
+
* message: 'Respuesta guardada',
|
|
10
|
+
*})
|
|
11
|
+
* @example Definición de trigger que activa la notificación
|
|
12
|
+
* <button onClick={() => { active()}}> Activar notificación </button>
|
|
13
|
+
* @example Componente FlashNotification recibiendo argumentos
|
|
14
|
+
* <FlashNotification {...config} show={show} />
|
|
15
|
+
*/
|
|
16
|
+
export declare function FlashNotification({ message, state, show, m, }: IFlashNotificationProps): JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
// agrega el link al final del texto
|
|
50
|
+
endTextLink?: string
|
|
51
|
+
onClickLink?: () => void
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IFlashNotificationProps {
|
|
55
|
+
/**
|
|
56
|
+
* Margen
|
|
57
|
+
*/
|
|
58
|
+
m?: string
|
|
59
|
+
/**
|
|
60
|
+
* Mensaje que muestra la notificación
|
|
61
|
+
*/
|
|
62
|
+
message: string
|
|
63
|
+
/**
|
|
64
|
+
* Estado que define color e ícono de la alerta
|
|
65
|
+
* @exampe
|
|
66
|
+
* 'error'
|
|
67
|
+
* 'info'
|
|
68
|
+
* 'success'
|
|
69
|
+
* 'warning'
|
|
70
|
+
* @
|
|
71
|
+
*/
|
|
72
|
+
state: TState
|
|
73
|
+
show?: boolean
|
|
74
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const alertStates: {
|
|
3
|
+
success: {
|
|
4
|
+
icon: JSX.Element;
|
|
5
|
+
bg: string;
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
error: {
|
|
9
|
+
icon: JSX.Element;
|
|
10
|
+
bg: string;
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
info: {
|
|
14
|
+
icon: JSX.Element;
|
|
15
|
+
bg: string;
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
warning: {
|
|
19
|
+
icon: JSX.Element;
|
|
20
|
+
bg: string;
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const alertColorStates: {
|
|
25
|
+
success: {
|
|
26
|
+
icon: JSX.Element;
|
|
27
|
+
bg: string;
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
error: {
|
|
31
|
+
icon: JSX.Element;
|
|
32
|
+
bg: string;
|
|
33
|
+
id: string;
|
|
34
|
+
};
|
|
35
|
+
info: {
|
|
36
|
+
icon: JSX.Element;
|
|
37
|
+
bg: string;
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
warning: {
|
|
41
|
+
icon: JSX.Element;
|
|
42
|
+
bg: string;
|
|
43
|
+
id: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleTime: (message: string) => number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IFlashNotificationProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook que actúa como trigger del componente FlashNotification,
|
|
4
|
+
* usando los siguientes parámetros:
|
|
5
|
+
* show: boolean que indica si la notificación se está mostrando o no,
|
|
6
|
+
* active: función que modifica el estado de show,
|
|
7
|
+
* config: contiene los valores de 'state' y message'
|
|
8
|
+
* @example Llamado useFlashNotification y asignación de props
|
|
9
|
+
* const { show, active, config } = useFlashNotification({
|
|
10
|
+
* state: 'info',
|
|
11
|
+
* message: 'Respuesta guardada',
|
|
12
|
+
*})
|
|
13
|
+
* @example Definición de trigger que activa la notificación
|
|
14
|
+
* <button onClick={() => { active()}}> Activar notificación </button>
|
|
15
|
+
* @example Componente FlashNotification recibiendo argumentos
|
|
16
|
+
* <FlashNotification {...config} show={show} />
|
|
17
|
+
*/
|
|
18
|
+
export declare const useFlashNotification: ({ state, message }: IFlashNotificationProps) => any;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Key } from 'react';
|
|
2
|
+
import { Text } from '../../types';
|
|
3
|
+
interface EventsProps {
|
|
4
|
+
events: {
|
|
5
|
+
today: Event[];
|
|
6
|
+
tomorrow: Event[];
|
|
7
|
+
next: Event[];
|
|
8
|
+
};
|
|
9
|
+
text: Text;
|
|
10
|
+
redirecToCalendar: () => void;
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
colors: any;
|
|
13
|
+
}
|
|
14
|
+
export declare const Events: ({ events, text, redirecToCalendar, isMobile, colors, }: EventsProps) => JSX.Element;
|
|
15
|
+
interface Event {
|
|
16
|
+
id: Key | null | undefined;
|
|
17
|
+
associated_resource: {
|
|
18
|
+
name: any;
|
|
19
|
+
};
|
|
20
|
+
course: {
|
|
21
|
+
name: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
formatedDate: {
|
|
24
|
+
start: string;
|
|
25
|
+
hours: string;
|
|
26
|
+
};
|
|
27
|
+
course_id: string | number;
|
|
28
|
+
isNew: boolean | undefined;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
interface AssociatedResource {
|
|
2
|
+
id: number
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Course {
|
|
6
|
+
id: number
|
|
7
|
+
name: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface FormattedDate {
|
|
11
|
+
start: string
|
|
12
|
+
hours: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Event {
|
|
16
|
+
id: number
|
|
17
|
+
course_id: number
|
|
18
|
+
start: string
|
|
19
|
+
end: string
|
|
20
|
+
associated_resource: AssociatedResource
|
|
21
|
+
course: Course
|
|
22
|
+
formatedDate: FormattedDate
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type Events = Event[]
|
|
26
|
+
|
|
27
|
+
export interface Text {
|
|
28
|
+
buttonCalendar: string
|
|
29
|
+
course: string
|
|
30
|
+
empty: string
|
|
31
|
+
events: {
|
|
32
|
+
today: string
|
|
33
|
+
tomorrow: string
|
|
34
|
+
next: string
|
|
35
|
+
}
|
|
36
|
+
header: string
|
|
37
|
+
loading: string
|
|
38
|
+
tooltip: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface ICalendarDropdown {
|
|
42
|
+
m?: string
|
|
43
|
+
courseColors?: Record<string, string>
|
|
44
|
+
events: any
|
|
45
|
+
loading?: boolean
|
|
46
|
+
now: string
|
|
47
|
+
redirectToCalendar: () => void
|
|
48
|
+
text: Text
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IEventList {
|
|
3
|
+
hasNotification?: boolean;
|
|
4
|
+
isDropdown?: boolean;
|
|
5
|
+
name: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
courseName?: string;
|
|
8
|
+
text: string;
|
|
9
|
+
date: string;
|
|
10
|
+
hours: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const EventsList: ({ hasNotification, isDropdown, name, courseName, color, text, date, hours, }: IEventList) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Type from '../types';
|
|
3
|
+
interface ImageBoxProps {
|
|
4
|
+
backgroundImg: string;
|
|
5
|
+
title: string;
|
|
6
|
+
data?: Type.ExtendAcademicList;
|
|
7
|
+
size?: 'large' | 'small';
|
|
8
|
+
m?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function BoxImage({ backgroundImg, title, data, size, m, }: ImageBoxProps): JSX.Element;
|
|
11
|
+
export declare namespace BoxImage {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Type from '../types';
|
|
3
|
+
export declare const CourseBoxContext: React.Context<Partial<Type.ExtendAcademicList>>;
|
|
4
|
+
interface IBoxTraditional {
|
|
5
|
+
data: Type.ExtendAcademicList;
|
|
6
|
+
modalPaymentText?: Type.PaymentText;
|
|
7
|
+
}
|
|
8
|
+
export declare function BoxTraditional({ data, modalPaymentText }: IBoxTraditional): JSX.Element;
|
|
9
|
+
export declare namespace BoxTraditional {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ExtendAcademicList, WrapperCoursesProps } from '../types';
|
|
3
|
+
interface IBoxes {
|
|
4
|
+
type: WrapperCoursesProps['typeBox'];
|
|
5
|
+
modalPaymentText: WrapperCoursesProps['modalPaymentText'];
|
|
6
|
+
data: ExtendAcademicList;
|
|
7
|
+
}
|
|
8
|
+
export declare const Boxes: ({ type, data, modalPaymentText }: IBoxes) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Boxes';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Type from './types';
|
|
3
|
+
export declare const columnGap = 1.25;
|
|
4
|
+
export declare const wCourse = 17.8125;
|
|
5
|
+
/**
|
|
6
|
+
* Retorna listado de cursos.
|
|
7
|
+
* @example
|
|
8
|
+
* <CourseList courses={courses} />
|
|
9
|
+
*
|
|
10
|
+
* Tener en cuenta el width del padre donde se pondra este componente, utilizar método maxWidthCoursesList
|
|
11
|
+
* @see src/organisms/CourseList/maxWidthCoursesList.ts
|
|
12
|
+
*/
|
|
13
|
+
export declare function CourseList({ courses, modalPaymentText, m, typeBox, }: Type.WrapperCoursesProps): JSX.Element | null;
|
|
14
|
+
export declare namespace CourseList {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProgressCourse, StatusCourse } from '@eclass/api';
|
|
3
|
+
interface props {
|
|
4
|
+
/** import { ProgressCourse } from '@eclass/api' */
|
|
5
|
+
progress: ProgressCourse;
|
|
6
|
+
/** import { StatusCourse } from '@eclass/api' */
|
|
7
|
+
status?: StatusCourse;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Devuelve estado en el que se encuentra el curso, por ejemplo:
|
|
11
|
+
*
|
|
12
|
+
* avance, inicio, curso aprovado, reprovado, finalizado
|
|
13
|
+
*/
|
|
14
|
+
export declare function CourseStatus({ progress, status }: props): JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Type from '../../types';
|
|
3
|
+
interface PaymentModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onOpen: () => void;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
showOverlay: boolean;
|
|
8
|
+
modalPaymentText: Type.PaymentText;
|
|
9
|
+
}
|
|
10
|
+
export declare function PaymentModal({ isOpen, onOpen, onClose, showOverlay, modalPaymentText, }: PaymentModalProps): JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PaymentModal } from './PaymentModal';
|