Skip to content

Commit fcf542e

Browse files
authored
Merge pull request #144 from Gabrielr2508/translation/guide/transitions-list
docs: Translates guide/transitions-list to pt-BR
2 parents 6db34f8 + 4606529 commit fcf542e

File tree

1 file changed

+55
-55
lines changed

1 file changed

+55
-55
lines changed

src/guide/transitions-list.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# List Transitions
1+
# Transições de Listas
22

3-
So far, we've managed transitions for:
3+
Até agora, gerenciamos transições para:
44

5-
- Individual nodes
6-
- Multiple nodes where only 1 is rendered at a time
5+
- Nós individuais
6+
- Multiplos nós onde apenas 1 é renderizado por vez
77

8-
So what about for when we have a whole list of items we want to render simultaneously, for example with `v-for`? In this case, we'll use the `<transition-group>` component. Before we dive into an example though, there are a few things that are important to know about this component:
8+
E quando tivermos toda uma lista de itens que queremos renderizar simultâneamente, com `v-for` por exemplo? Neste caso, usaremos o componente `<transition-group>`. Antes de entramos em um exemplo, existem algumas coisas que são importantes saber sobre esse componente:
99

10-
- Unlike `<transition>`, it renders an actual element: a `<span>` by default. You can change the element that's rendered with the `tag` attribute.
11-
- [Transition modes](/guide/transitions-enterleave#transition-modes) are not available, because we are no longer alternating between mutually exclusive elements.
12-
- Elements inside are **always required** to have a unique `key` attribute.
13-
- CSS transition classes will be applied to inner elements and not to the group/container itself.
10+
- Ao contrário do `<transition>`, ele renderiza um elemento real: um `<span>` por padrão. Você pode alterar o elemento que é renderizado com o atributo `tag`.
11+
- Os [modos de transição](/guide/transitions-enterleave#transition-modes) não estão disponíveis, porque não estamos mais alternando entre elementos mutuamente exclusivos.
12+
- Os elementos internos **sempre precisam** ter um atributo `key` único.
13+
- As classes de transições CSS serão aplicadas aos elementos internos e não ao grupo/contêiner em si.
1414

15-
### List Entering/Leaving Transitions
15+
### Transições de Entrada/Saída em Listas
1616

17-
Now let's dive into an example, transitioning entering and leaving using the same CSS classes we've used previously:
17+
Agora iremos exemplificar, fazendo transições de entrada e saída usando as mesmas classes CSS que usamos anteriormente:
1818

1919
```html
2020
<div id="list-demo">
21-
<button @click="add">Add</button>
22-
<button @click="remove">Remove</button>
21+
<button @click="add">Adicionar</button>
22+
<button @click="remove">Remover</button>
2323
<transition-group name="list" tag="p">
2424
<span v-for="item in items" :key="item" class="list-item">
2525
{{ item }}
@@ -69,25 +69,25 @@ Vue.createApp(Demo).mount('#list-demo')
6969
```
7070

7171
<p class="codepen" data-height="300" data-theme-id="39028" data-default-tab="js,result" data-user="Vue" data-slug-hash="e1cea580e91d6952eb0ae17bfb7c379d" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Transition List">
72-
<span>See the Pen <a href="https://codepen.io/team/Vue/pen/e1cea580e91d6952eb0ae17bfb7c379d">
73-
Transition List</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
74-
on <a href="https://codepen.io">CodePen</a>.</span>
72+
<span>Veja o Pen <a href="https://codepen.io/team/Vue/pen/e1cea580e91d6952eb0ae17bfb7c379d">
73+
Transição de Listas</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
74+
no <a href="https://codepen.io">CodePen</a>.</span>
7575
</p>
7676
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
7777

78-
There's one problem with this example. When you add or remove an item, the ones around it instantly snap into their new place instead of smoothly transitioning. We'll fix that later.
78+
Existe um problema com esse exemplo. Quando você adiciona ou remove um item, os que estão ao redor se encaixam instantaneamente em seu novo lugar, em vez de realizarem uma transição suave. Corrigiremos isso depois.
7979

80-
### List Move Transitions
80+
### Transições de Movimento em Listas
8181

82-
The `<transition-group>` component has another trick up its sleeve. It can not only animate entering and leaving, but also changes in position. The only new concept you need to know to use this feature is the addition of **the `v-move` class**, which is added when items are changing positions. Like the other classes, its prefix will match the value of a provided `name` attribute and you can also manually specify a class with the `move-class` attribute.
82+
O componente `<transition-group>` tem outro truque na manga. Ele não apenas anima entrada e saída, como também anima mudanças nas posições. O único conceito novo que você precisa saber para usar esse recurso é a adição da **classe `v-move`**, que é adicionada quando os items estão mudando de posição. Assim como as outras classes, esse prefixo irá corresponder ao valor do atributo `name` fornecido e você pode especificar manualmente uma classe com o atributo `move-class`.
8383

84-
This class is mostly useful for specifying the transition timing and easing curve, as you'll see below:
84+
Essa classe é útil principalmente para especificar o tempo de transição e a curva de atenuação, como você pode ver abaixo:
8585

8686
```html
8787
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
8888

8989
<div id="flip-list-demo">
90-
<button @click="shuffle">Shuffle</button>
90+
<button @click="shuffle">Misturar</button>
9191
<transition-group name="flip-list" tag="ul">
9292
<li v-for="item in items" :key="item">
9393
{{ item }}
@@ -120,23 +120,23 @@ Vue.createApp(Demo).mount('#flip-list-demo')
120120
```
121121

122122
<p class="codepen" data-height="300" data-theme-id="39028" data-default-tab="html,result" data-user="Vue" data-slug-hash="049211673d3c185fde6b6eceb8baebec" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Transition-group example">
123-
<span>See the Pen <a href="https://codepen.io/team/Vue/pen/049211673d3c185fde6b6eceb8baebec">
124-
Transition-group example</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
125-
on <a href="https://codepen.io">CodePen</a>.</span>
123+
<span>Veja o Pen <a href="https://codepen.io/team/Vue/pen/049211673d3c185fde6b6eceb8baebec">
124+
Exemplo de transition-group</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
125+
no <a href="https://codepen.io">CodePen</a>.</span>
126126
</p>
127127
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
128128

129-
This might seem like magic, but under the hood, Vue is using an animation technique called [FLIP](https://aerotwist.com/blog/flip-your-animations/) to smoothly transition elements from their old position to their new position using transforms.
129+
Isso pode parecer mágica, mas por baixo dos panos, o Vue está usando uma técnica de animação chamada [FLIP](https://aerotwist.com/blog/flip-your-animations/) para transicionar suavemente os elementos de sua antiga posição para a nova posição usando transformações.
130130

131-
We can combine this technique with our previous implementation to animate every possible change to our list!
131+
Podemos combinar essa técnica com nossa implementação anterior para animar qualquer mudança possível em nossa lista!
132132

133133
```html
134134
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.14.1/lodash.min.js"></script>
135135

136136
<div id="list-complete-demo" class="demo">
137-
<button @click="shuffle">Shuffle</button>
138-
<button @click="add">Add</button>
139-
<button @click="remove">Remove</button>
137+
<button @click="shuffle">Misturar</button>
138+
<button @click="add">Adicionar</button>
139+
<button @click="remove">Remover</button>
140140
<transition-group name="list-complete" tag="p">
141141
<span v-for="item in items" :key="item" class="list-complete-item">
142142
{{ item }}
@@ -191,23 +191,23 @@ Vue.createApp(Demo).mount('#list-complete-demo')
191191
```
192192

193193
<p class="codepen" data-height="300" data-theme-id="39028" data-default-tab="js,result" data-user="Vue" data-slug-hash="373b4429eb5769ae2e6d097fd954fd08" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Transition-group example">
194-
<span>See the Pen <a href="https://codepen.io/team/Vue/pen/373b4429eb5769ae2e6d097fd954fd08">
195-
Transition-group example</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
196-
on <a href="https://codepen.io">CodePen</a>.</span>
194+
<span>Veja o Pen <a href="https://codepen.io/team/Vue/pen/373b4429eb5769ae2e6d097fd954fd08">
195+
Exemplo transition-group</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
196+
no <a href="https://codepen.io">CodePen</a>.</span>
197197
</p>
198198
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
199199

200-
::: tip
201-
One important note is that these FLIP transitions do not work with elements set to `display: inline`. As an alternative, you can use `display: inline-block` or place elements in a flex context.
200+
::: tip Nota
201+
É importante notar que essas transições FLIP não funcionam com elementos configurados com `display: inline`. Alternativamente, você pode usar `display: inline-block` ou posicionar os elementos em um contexto _flex_.
202202
:::
203203

204-
These FLIP animations are also not limited to a single axis. Items in a multidimensional grid can be [transitioned too](https://codesandbox.io/s/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-20-list-move-transitions):
204+
Essas animações FLIP não são limitadas à um único eixo. Itens em um _grid_ multidimensional podem ser [transicionados também](https://codesandbox.io/s/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-20-list-move-transitions):
205205

206-
TODO: example
206+
TODO: exemplo
207207

208-
### Staggering List Transitions
208+
### Escalonando Transições de Listas
209209

210-
By communicating with JavaScript transitions through data attributes, it's also possible to stagger transitions in a list:
210+
Comunicando-se com transições JavaScript por meio de atributos de dados, também é possível escalonar as transições em uma lista:
211211

212212
```html
213213
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.4/gsap.min.js"></script>
@@ -283,19 +283,19 @@ Vue.createApp(Demo).mount('#demo')
283283
```
284284

285285
<p class="codepen" data-height="300" data-theme-id="39028" data-default-tab="js,result" data-user="Vue" data-slug-hash="c2fc5107bd3025ceadea049b3ee44ec0" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Staggered Lists">
286-
<span>See the Pen <a href="https://codepen.io/team/Vue/pen/c2fc5107bd3025ceadea049b3ee44ec0">
287-
Staggered Lists</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
288-
on <a href="https://codepen.io">CodePen</a>.</span>
286+
<span>Veja o Pen <a href="https://codepen.io/team/Vue/pen/c2fc5107bd3025ceadea049b3ee44ec0">
287+
Listas Escalonadas</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
288+
no <a href="https://codepen.io">CodePen</a>.</span>
289289
</p>
290290
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
291291

292-
## Reusable Transitions
292+
## Transições Reutilizáveis
293293

294-
Transitions can be reused through Vue's component system. To create a reusable transition, all you have to do is place a `<transition>` or `<transition-group>` component at the root, then pass any children into the transition component.
294+
Transições podem ser reutilizadas através do sistema de componentes do Vue. Para criar uma transição reutilizável tudo o que você precisa fazer é colocar um componente `<transition>` ou `<transition-group>` na raiz, e então passar qualquer filho para o componente de transição.
295295

296-
TODO: refactor to Vue 3
296+
TODO: refatorar para o Vue 3
297297

298-
Here's an example using a template component:
298+
Veja um exemplo usando um componente com _template_:
299299

300300
```js
301301
Vue.component('my-special-transition', {
@@ -320,7 +320,7 @@ Vue.component('my-special-transition', {
320320
})
321321
```
322322

323-
And [functional components](render-function.html#Functional-Components) are especially well-suited to this task:
323+
[Componentes funcionais](render-function.html#Functional-Components) são especialmente adequados para esta tarefa:
324324

325325
```js
326326
Vue.component('my-special-transition', {
@@ -345,19 +345,19 @@ Vue.component('my-special-transition', {
345345
})
346346
```
347347

348-
## Dynamic Transitions
348+
## Transições Dinâmicas
349349

350-
Yes, even transitions in Vue are data-driven! The most basic example of a dynamic transition binds the `name` attribute to a dynamic property.
350+
Sim, até mesmo as transições no Vue são baseadas em dados! O exemplo mais trivial de uma transição dinâmica vincula o atributo `name` à uma propriedade dinâmica.
351351

352352
```html
353353
<transition :name="transitionName">
354354
<!-- ... -->
355355
</transition>
356356
```
357357

358-
This can be useful when you've defined CSS transitions/animations using Vue's transition class conventions and want to switch between them.
358+
Isso pode ser útil quando você definiu transições/animações CSS usando as convenções de classes de transição do Vue e quer alternar entre elas.
359359

360-
Really though, any transition attribute can be dynamically bound. And it's not only attributes. Since event hooks are methods, they have access to any data in the context. That means depending on the state of your component, your JavaScript transitions can behave differently.
360+
Na verdade, qualquer atributo de transição pode ser vinculado dinamicamente. E não somente atributos. Como gatilhos de eventos são métodos, eles possuem acesso à qualquer dado no contexto. Isso significa que, dependendo do estado do seu componente, as transições do JavaScript podem se comportar de maneira diferente.
361361

362362
```html
363363
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.2.3/velocity.min.js"></script>
@@ -378,12 +378,12 @@ Really though, any transition attribute can be dynamically bound. And it's not o
378378
@enter="enter"
379379
@leave="leave"
380380
>
381-
<p v-if="show">hello</p>
381+
<p v-if="show">olá</p>
382382
</transition>
383383
<button v-if="stop" @click="stop = false; show = false">
384-
Start animating
384+
Iniciar animação
385385
</button>
386-
<button v-else @click="stop = true">Stop it!</button>
386+
<button v-else @click="stop = true">Parar!</button>
387387
</div>
388388
```
389389

@@ -439,6 +439,6 @@ const app = Vue.createApp({
439439
app.mount('#dynamic-fade-demo')
440440
```
441441

442-
TODO: example
442+
TODO: exemplo
443443

444-
Finally, the ultimate way of creating dynamic transitions is through components that accept props to change the nature of the transition(s) to be used. It may sound cheesy, but the only limit really is your imagination.
444+
Finalmente, a melhor maneira de criar transições dinâmicas é por meio de componentes que aceitam propriedades para mudar a natureza das transições à serem usadas. Pode soar clichê, mas o único limite realmente é sua imaginação.

0 commit comments

Comments
 (0)