-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from uxshop/feat/index-table
[4.x] - IndexTable novo componente de listagem de itens
- Loading branch information
Showing
72 changed files
with
3,096 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# Files | ||
*.md | ||
*.mdx | ||
|
||
# Folders | ||
.husky/* | ||
.vscode/* | ||
|
||
*.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ const preview: Preview = { | |
schema, | ||
brand, | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"recommendations": [ | ||
"Vue.volar", | ||
"Vue.volar", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"EditorConfig.EditorConfig" | ||
] | ||
"EditorConfig.EditorConfig", | ||
"Tobermory.es6-string-html" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3'; | ||
import Table from './Table.vue'; | ||
import TableBody from './TableBody.vue'; | ||
import TableCell from './TableCell.vue'; | ||
import TableHeadCell from './TableHeadCell.vue'; | ||
import TableRow from './TableRow.vue'; | ||
|
||
const meta: Meta<typeof Table> = { | ||
title: 'Components/Table', | ||
component: Table, | ||
render: (args) => ({ | ||
components: { Table, TableHeadCell, TableBody, TableRow, TableCell }, | ||
setup() { | ||
const products = [ | ||
{ id: 1, name: 'Product 1', price: '$10' }, | ||
{ id: 2, name: 'Product 2', price: '$20' }, | ||
{ id: 3, name: 'Product 3', price: '$30' }, | ||
]; | ||
return { args, products }; | ||
}, | ||
template: ` | ||
<Table v-bind="args"> | ||
<template #header> | ||
<TableHeadCell>ID</TableHeadCell> | ||
<TableHeadCell>Name</TableHeadCell> | ||
<TableHeadCell>Price</TableHeadCell> | ||
</template> | ||
<TableBody> | ||
<TableRow v-for="product in products" :key="product.id"> | ||
<TableCell>{{ product.id }}</TableCell> | ||
<TableCell>{{ product.name }}</TableCell> | ||
<TableCell>{{ product.price }}</TableCell> | ||
</TableRow> | ||
</TableBody> | ||
</Table> | ||
`, | ||
}), | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const minimum: Story = { | ||
args: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Controls, Canvas, Meta } from '@storybook/blocks'; | ||
|
||
import * as FeedbackMessageStories from './FeedbackMessage.stories'; | ||
|
||
<Meta of={FeedbackMessageStories} /> | ||
|
||
# FeedbackMessage | ||
|
||
O **FeedbackMessage** é um componente utilizado para exibir mensagens de feedback para o usuário. Ele é composto por um ícone, um texto e um botão de ação. É opcional exibir o botão de ação e o ícone. | ||
|
||
A sua finalidade é a de fornecer um bloco visual e textual padronizado, que ajude a guiar o usuário sobre o que está acontecendo (por exemplo, não há dados disponíveis ou ocorreu um problema que precisa ser resolvido) e quais próximos passos podem ser tomados. Assim garantimos que o usuário tenha uma experiência familiar e coerente, independentemente de qual produto ou seção esteja utilizando. | ||
|
||
<Canvas of={FeedbackMessageStories.minimum} /> | ||
|
||
<Controls /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.ui-feedback-message { | ||
display: grid; | ||
text-align: center; | ||
justify-content: center; | ||
height: 100%; | ||
gap: var(--s-spacing-small); | ||
transition: all var(--s-motion-ease-linear) var(--s-motion-duration-fast); | ||
|
||
&-content { | ||
display: grid; | ||
gap: var(--s-spacing-quark); | ||
} | ||
|
||
&-icon { | ||
color: var(--s-color-content-default); | ||
} | ||
|
||
&-title { | ||
font: var(--s-typography-heading-medium); | ||
color: var(--s-color-content-default); | ||
font-weight: var(--s-font-weight-semibold); | ||
margin-bottom: 0px; | ||
} | ||
|
||
&-text { | ||
font: var(--s-typography-paragraph-regular); | ||
color: var(--s-color-content-light); | ||
margin-bottom: 0px; | ||
} | ||
|
||
&-action { | ||
width: fit-content; | ||
justify-self: center; | ||
align-self: center; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/components/ui/feedback-message/FeedbackMessage.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3'; | ||
import FeeedbackMessage from './FeedbackMessage.vue'; | ||
import { fn } from '@storybook/test'; | ||
|
||
const meta: Meta<typeof FeeedbackMessage> = { | ||
title: 'ui/FeeedbackMessage', | ||
component: FeeedbackMessage, | ||
render: (args) => ({ | ||
components: { FeeedbackMessage }, | ||
setup() { | ||
return { args }; | ||
}, | ||
template: '<FeeedbackMessage v-bind="args" />', | ||
}), | ||
argTypes: {}, | ||
parameters: { | ||
controls: { expanded: true }, | ||
docs: { | ||
controls: { exclude: '^on.*' }, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const minimum: Story = { | ||
args: { | ||
title: 'Nenhum resultado encontrado', | ||
subtitle: | ||
'Não encontramos nenhum item que corresponda à sua pesquisa.<br>Verifique o termo digitado ou tente um filtro diferente.', | ||
button: { | ||
label: 'Limpar filtros', | ||
variant: 'primary', | ||
}, | ||
showIcon: true, | ||
showButton: true, | ||
onAction: fn(), | ||
}, | ||
}; |
Oops, something went wrong.