Skip to content

Commit

Permalink
Merge pull request #435 from eduzz/develop
Browse files Browse the repository at this point in the history
Versão 0.63.0
  • Loading branch information
ffernandomoraes authored Sep 6, 2022
2 parents 6d8fb72 + e194f8a commit 457aae1
Show file tree
Hide file tree
Showing 17 changed files with 690 additions and 31 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@eduzz/houston-workspaces",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"workspaces": [
"src/pages/*",
"src/dev",
Expand Down
10 changes: 5 additions & 5 deletions src/dev/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@eduzz/houston-dev",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"private": true,
"dependencies": {
"@eduzz/houston-forms": "0.63.1-beta.0",
"@eduzz/houston-hooks": "0.63.1-beta.0",
"@eduzz/houston-icons": "0.63.1-beta.0",
"@eduzz/houston-ui": "0.63.1-beta.0",
"@eduzz/houston-forms": "0.63.0",
"@eduzz/houston-hooks": "0.63.0",
"@eduzz/houston-icons": "0.63.0",
"@eduzz/houston-ui": "0.63.0",
"react-dom": "^18",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
Expand Down
10 changes: 5 additions & 5 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@eduzz/docs",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"private": true,
"scripts": {
"start": "next dev",
"build": "next build && next export"
},
"dependencies": {
"@chakra-ui/react": "^1.8.8",
"@eduzz/houston-forms": "0.63.1-beta.0",
"@eduzz/houston-hooks": "0.63.1-beta.0",
"@eduzz/houston-icons": "0.63.1-beta.0",
"@eduzz/houston-ui": "0.63.1-beta.0",
"@eduzz/houston-forms": "0.63.0",
"@eduzz/houston-hooks": "0.63.0",
"@eduzz/houston-icons": "0.63.0",
"@eduzz/houston-ui": "0.63.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"dokz": "2.0.9",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eduzz/eslint-config-houston",
"private": false,
"version": "0.63.1-beta.0",
"version": "0.63.0",
"description": "Eduzz Houston Eslint Config",
"author": "Eduzz Team",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eduzz/houston-forms",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"description": "Houston Forms",
"main": "index.js",
"types": "./index.d.ts",
Expand All @@ -19,7 +19,7 @@
"check-update-deps": "yarn ncu -u"
},
"dependencies": {
"@eduzz/houston-hooks": "0.63.1-beta.0",
"@eduzz/houston-hooks": "0.63.0",
"@hookform/error-message": "^2.0.0",
"@hookform/resolvers": "^2",
"formik": "^2.2.9",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eduzz/houston-hooks",
"description": "Eduzz Houston Hooks",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"main": "./index.js",
"types": "./index.d.ts",
"author": "Eduzz Team",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/icons/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eduzz/houston-icons",
"description": "Eduzz Houston Icons",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"main": "./index.js",
"types": "./index.d.ts",
"author": "Eduzz Team",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/styles/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eduzz/houston-styles",
"description": "Eduzz Houston Style",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"main": "./index.js",
"types": "./index.d.ts",
"author": "Eduzz Team",
Expand All @@ -19,7 +19,7 @@
"check-update-deps": "yarn ncu -u"
},
"dependencies": {
"@eduzz/houston-tokens": "0.63.1-beta.0",
"@eduzz/houston-tokens": "0.63.0",
"@emotion/cache": "^11",
"@emotion/css": "^11",
"@emotion/react": "^11",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eduzz/houston-tokens",
"description": "Eduzz Houston Tokens",
"version": "0.63.1-beta.0",
"version": "0.63.0",
"main": "./index.js",
"types": "./index.d.ts",
"author": "Eduzz Team",
Expand Down
207 changes: 207 additions & 0 deletions src/pages/ui-components/Card/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
---
name: Card
---

import { Playground } from 'dokz';

import Box from '../Box';
import Button from '../Button';
import Grid from '../Grid';
import Typography from '../Typography';
import Card from './';

# Card

Cards são componentes da interface usados para agrupar informações relacionadas dentro de um container/bloco. Os cards funcionam como um contentor para algumas informações curtas e relacionadas. Os cards não possuem uma configuração de estilos para o conteúdo que é apresentado neles.

### Importação

```js
import Card from '@eduzz/houston-ui/Card';
```

### Exemplo

<Playground>
<Grid.Row>
<Grid.Column>
<Card>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Houston
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
<Grid.Column>
<Card>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Houston
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
<Grid.Column>
<Card>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Houston
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
</Grid.Row>
</Playground>

### Espaçamento

Você pode alterar o espaçamento interno conforme sua necessidade.

<Playground>
{() => {
const spacing = ['xxxs', 'xxs', 'sm'];
return (
<>
{spacing.map((s, index) => (
<Grid.Row key={index}>
<Grid.Column>
<Card padding={s}>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Padding {s}
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
<Grid.Column>
<Card padding={s}>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Padding {s}
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
<Grid.Column>
<Card padding={s}>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Padding {s}
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
</Grid.Row>
))}
</>
);
}}
</Playground>

### Card clicável

Quando passado a prop `onClick` para o componente, ele ativa alguns comportamentos no `hover`, `focus` e etc...

<Playground>
<Grid.Row>
<Grid.Column>
<Card onClick={() => alert('Houston Design System')}>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Houston
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
<Grid.Column>
<Card disabled onClick={() => console.log('Houston Design System')}>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Houston
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button onClick={() => alert('Houston Button')}>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
<Grid.Column>
<Card onClick={() => console.log('Houston Design System')}>
<Box xs={{ margin: '0 0 1rem 0' }}>
<img src='/houston/img/welcome.png' width='100%' />
</Box>
<Typography.Heading as='h3' weight='bold' size='sm' marginBottom>
Houston
</Typography.Heading>
<Typography.Paragraph size='md'>
Houston é uma grande metrópole situada no Texas que se estende até a Baía de Galveston.
</Typography.Paragraph>
<Box xs={{ margin: '1rem 0 0 0' }}>
<Button>Ver mais</Button>
</Box>
</Card>
</Grid.Column>
</Grid.Row>
</Playground>

### Props

| prop | tipo | obrigatório | padrão | descrição |
| -------- | ----------------- | ----------- | ------ | ------------------------------ |
| children | `React.ReactNode` | `false` | - | - |
| disabled | `boolean` | `false` | - | - |
| padding | `CardPadding` | `false` | `xs` | Padding interno do componente. |
Loading

0 comments on commit 457aae1

Please sign in to comment.