Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: proposed input file #151

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fa3f4f5
ci: se agrega la rama dev al workflow
alan199912 Mar 6, 2023
696dbcf
fix: se corrige espaciado de icono en boton (#136)
victorianastasi Mar 13, 2023
bbcd007
feat: tooltip (#137)
Jesus1397 Mar 13, 2023
edf59ff
fix: se modifica visualizacion de breadcrumb en storybook, se reempla…
victorianastasi Mar 28, 2023
369da51
feat: alert dismissible (#135)
alan199912 Mar 29, 2023
0ec710f
fix: pagination (#141)
victorianastasi Mar 31, 2023
e991777
Merge branch 'master' into dev
lautarorodriguez96 Apr 4, 2023
bc5e398
feat: Alerta - Tooltip - Paginador - Breadcrumb
lautarorodriguez96 Apr 4, 2023
e4015d7
fix: version actual de manera dinamica
alan199912 Apr 10, 2023
a853d58
feat: navegacion por pestañas (#138)
davisLjr Apr 14, 2023
8c7f677
fix: se modifican nombres, se reemplaza textos secundarios por epigra…
victorianastasi Apr 14, 2023
e014658
Merge branch 'master' dev
lautarorodriguez96 Apr 20, 2023
7b26553
fix: spinner y boton con spinner (#142)
victorianastasi Apr 21, 2023
243573c
fix: barra de progreso (#146)
Jesus1397 Apr 21, 2023
752c852
fix: accesos (#134)
matilope Apr 24, 2023
3abb2f8
fix: se genera propuesta para el componente adjuntar archivo
davisLjr Apr 24, 2023
05c7cc1
fix: se formatea el archivo
davisLjr Apr 25, 2023
4bc7450
fix: se cambian nombres de español a ingles
davisLjr Apr 25, 2023
b994f93
fix: se elimina variable de texto
davisLjr Apr 25, 2023
e94f039
fix: se elimina clase container dentro del contenido
davisLjr Apr 25, 2023
8b65b18
fix: se elimina clase label
davisLjr Apr 25, 2023
1d56139
fix: se elimina props label
davisLjr Apr 25, 2023
f2ba95a
fix: se agregan nuevos espaciados segun comentarios en pr
davisLjr Apr 25, 2023
abc6d5f
fix: se elimina el interface
davisLjr Apr 25, 2023
396a04c
fix: Merge branch 'master' into fix_proposed_input_file
davisLjr May 8, 2023
e332963
fix: actualizacion de componente maquetado y estilos
davisLjr May 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ addDecorator(withHTML);

const headers = [
'Comenzar|Inicio',
'Componentes|Accesos/Horizontal',
'Componentes|Accesos/Lista de accesos',
'Componentes|Accesos/Vertical',
'Componentes|Accesos',
'Componentes|Alerta',
'Componentes|Alerta/Listas',
'Componentes|Audio',
Expand Down Expand Up @@ -57,6 +55,7 @@ const headers = [
'Formulario|Texto',
'Formulario|Validación',
'Plantillas|Plantilla',
'Organismos|Accesos',
'Organismos|Footer (pie de página)',
'Organismos|Header (encabezado)/Con buscador',
'Organismos|Header (encabezado)/Sin buscador',
Expand Down
58 changes: 36 additions & 22 deletions src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import './Button.stories.scss';
import { withA11y } from '@storybook/addon-a11y';

// Components
import { buttonTypes, sizes, sizesButton } from '../utils';
import { buttonTypes, sizes, sizesButton, buttonSpinnerTypes, buttonOutlineSpinnerTypes } from '../utils';
import { Button } from '.';

// Configuración general del componente
Expand All @@ -16,7 +16,7 @@ export default {
decorators: [withA11y]
};

export const Colores = (): JSX.Element => {
export const ButtonSolid = (): JSX.Element => {
return (
<div className="btn-wrapper">
{buttonTypes.map((item) => (
Expand All @@ -30,8 +30,9 @@ export const Colores = (): JSX.Element => {
</div>
);
};
ButtonSolid.story = { name: 'Colores' };

export const ConFoco = (): JSX.Element => {
export const ButtonFocus = (): JSX.Element => {
return (
<div className="btn-wrapper">
{buttonTypes.map((item) => (
Expand All @@ -45,12 +46,9 @@ export const ConFoco = (): JSX.Element => {
</div>
);
};
ButtonFocus.story = { name: 'Con foco' };

ConFoco.story = {
name: 'Con foco'
};

export const Activos = (): JSX.Element => {
export const ButtonActive = (): JSX.Element => {
return (
<div className="btn-wrapper">
{buttonTypes.map((item) => (
Expand All @@ -64,8 +62,9 @@ export const Activos = (): JSX.Element => {
</div>
);
};
ButtonActive.story = { name: 'Activos' };

export const Tamanos = (): JSX.Element => {
export const ButtonSizes = (): JSX.Element => {
return (
<div className="btn-wrapper">
{sizesButton.map((item) => (
Expand All @@ -79,10 +78,9 @@ export const Tamanos = (): JSX.Element => {
</div>
);
};
ButtonSizes.story = { name: 'Tamaños' };

Tamanos.story = { name: 'Tamaños' };

export const Deshabilitados = (): JSX.Element => {
export const ButtonDisabled = (): JSX.Element => {
return (
<div className="btn-wrapper">
{sizesButton.map((item) => (
Expand All @@ -93,8 +91,9 @@ export const Deshabilitados = (): JSX.Element => {
</div>
);
};
ButtonDisabled.story = { name: 'Deshabilitados' };

export const Expandible = (): JSX.Element => {
export const ButtonBlock = (): JSX.Element => {
return (
<div className="btn-block-wrapper">
<Button type="secondary" block={true}>
Expand All @@ -103,8 +102,9 @@ export const Expandible = (): JSX.Element => {
</div>
);
};
ButtonBlock.story = { name: 'Expandible' };

export const ConBordes = (): JSX.Element => {
export const ButtonOutline = (): JSX.Element => {
return (
<div className="btn-wrapper">
{buttonTypes.map((item) => (
Expand All @@ -118,12 +118,9 @@ export const ConBordes = (): JSX.Element => {
</div>
);
};
ButtonOutline.story = { name: 'Con bordes' };

ConBordes.story = {
name: 'Con bordes'
};

export const ConIconos = (): JSX.Element => {
export const ButtonWithIcon = (): JSX.Element => {
return (
<>
<div className="btn-wrapper">
Expand All @@ -141,7 +138,24 @@ export const ConIconos = (): JSX.Element => {
</>
);
};
ButtonWithIcon.story = { name: 'Con ícono' };

ConIconos.story = {
name: 'Con íconos'
};
export const ButtonWithSpinner = (): JSX.Element => (
<>
<div className="btn-wrapper">
{buttonSpinnerTypes.map((item) => (
<Button key={item.type} type={item.type} spinner={item.spinner}>
Botón
</Button>
))}
</div>
<div className="btn-wrapper">
{buttonOutlineSpinnerTypes.map((item) => (
<Button key={item.type} type={item.type} outline={true} spinner={item.spinner}>
Botón
</Button>
))}
</div>
</>
);
ButtonWithSpinner.story = { name: 'Con spinner' };
9 changes: 6 additions & 3 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import { ButtonType, Size, sizeToClass } from '../utils';
import { ButtonType, Size, SpinnerType, sizeToClass } from '../utils';
import { Spinner } from '../Spinner';

export interface ButtonProps {
type: ButtonType;
Expand All @@ -10,20 +11,22 @@ export interface ButtonProps {
outline?: boolean;
iconBx?: string;
iconMaterial?: string;
spinner?: SpinnerType;
}

export const Button: React.FC<ButtonProps> = (props: React.PropsWithChildren<ButtonProps>) => {
const { type, size, block, disabled, children, outline, iconBx, iconMaterial } = props;
const { type, size, block, disabled, children, outline, iconBx, iconMaterial, spinner } = props;

let className = `btn btn-${type}`;
if (outline) className = `btn btn-outline-${type}`;
if (!!size && size !== 'default') className += ` btn-${sizeToClass(size)}`;
if (block) className += ` btn-block`;
if (props.className) className += ` ${props.className}`;
if (iconBx || iconMaterial) className += ` btn-icon`;
if (iconBx || iconMaterial || spinner) className += ` btn-icon`;

return (
<button type="button" className={className} disabled={disabled}>
{spinner && <Spinner type={spinner} size="small"></Spinner>}
{iconBx && <i className={`bx ${iconBx}`}></i>}
{iconMaterial && <span className="material-icons-round">{`${iconMaterial}`}</span>}
{children}
Expand Down
88 changes: 88 additions & 0 deletions src/components/List-group/Access.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// Base
import React from 'react';
import './List-group.stories.scss';

// Addons
import { withA11y } from '@storybook/addon-a11y';

// Components
import {
AccessDescriptionComponent,
AccessBorderComponent,
AccessIconComponent,
AccessTypes,
AccessListVertical,
AccessListHorizontal,
AccessSizesComponent,
AccessSizes
} from '.';

// Configuración general del componente
export default {
title: 'Componentes|Accesos',
decorators: [withA11y]
};

export const AccessBorder = (): JSX.Element => (
<div className="list-group-container">
<div className="list-group">
{AccessTypes.map((item, index) => (
<AccessBorderComponent key={index} type={item.type} />
))}
</div>
</div>
);

AccessBorder.story = {
name: 'Con borde'
};

export const AccessDescription = (): JSX.Element => (
<div className="list-group-container">
<div className="list-group">
{AccessTypes.map((item, index) => (
<AccessDescriptionComponent key={index} type={item.type} />
))}
</div>
</div>
);

AccessDescription.story = {
name: 'Con descripción'
};

export const AccessIcon = (): JSX.Element => (
<div className="list-group-container">
<div className="list-group">
{AccessTypes.map((item, index) => (
<AccessIconComponent key={index} type={item.type} />
))}
</div>
</div>
);

AccessIcon.story = {
name: 'Con ícono'
};

export const AccessSizesStory = (): JSX.Element => (
<div className="list-group-container-sizes">
<div className="list-group">
{AccessSizes.map((item, index) => (
<AccessSizesComponent key={index} type={item.type} name={item.name} />
))}
</div>
</div>
);

AccessSizesStory.story = {
name: 'Tamaños'
};

export const Horizontal = (): JSX.Element => <AccessListHorizontal />;

export const Vertical = (): JSX.Element => (
<div className="list-group-container">
<AccessListVertical />
</div>
);
98 changes: 0 additions & 98 deletions src/components/List-group/AccessList.stories.tsx

This file was deleted.