@aurea-uds/native 0.61.0 → 0.62.1

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/README.md CHANGED
@@ -1,81 +1,52 @@
1
1
  # @aurea-uds/native
2
2
 
3
- O alvo **React Native** da Aurea UDS.
3
+ The **React Native** target of Aurea UDS.
4
4
 
5
- Pacote **irmão** do `@aurea-uds/react`, não um wrapper dele: componentes próprios sobre
6
- `View`/`Text`/`Pressable`, consumindo `@aurea-uds/tokens`. Só os tokens atravessam — decisão de
7
- 18/07/2026, registrada no `ROADMAP.md` Fase 7.
5
+ A **sibling** package of `@aurea-uds/react`, not a wrapper around it: its own components on top of
6
+ `View`/`Text`/`Pressable`, consuming `@aurea-uds/tokens`. Only the tokens are shared between the two.
8
7
 
9
- > **Estado: 51 componentes.** O **Lote 7** entrou em 11/09/2026 e é o primeiro que **não sai do
10
- > plano** — ele saiu do APP. O consumidor mediu três lacunas na primeira tela que a pessoa toca, e
11
- > elas viraram cinco componentes: **`Combobox`, `SearchField`, `NumberField`, `Image` e
12
- > `Gallery`**, mais a prop `formatOnBlur` no `Input`. **Zero dependência nova.**
13
- > Ver a seção **Buscar, número e mídia** abaixo, e o `NATIVE.md` §8.
8
+ > ⚠ **The `Combobox` differs from the web one on purpose**: it accepts REMOTE search with single selection,
9
+ > which does not exist on the web.
10
+ > ⚠ **`Combobox`, `SearchField`, `NumberField`, `Image` and `Gallery` have not run on a device yet** — only
11
+ > in tests.
14
12
  >
15
- > ⚠ **O `Combobox` DIVERGE da web de propósito** — ele aceita busca REMOTA em seleção única, que
16
- > lá não existe ([ADR-0043](../../decisions/0043-o-combobox-nativo-diverge-da-web-e-a-presenca-da-prop-e-a-chave.md)).
17
- > ⚠ **Os cinco do Lote 7 ainda não rodaram em aparelho** — só em teste.
13
+ > ⚠ **`Chart` is the only component in this package whose GEOMETRY is ours.** On the web it is 79 lines
14
+ > of skin over `recharts`; here there is no engine, so scale, axis and path are code in this
15
+ > repository. **No new dependency.** See the **Chart** section below.
18
16
  >
19
- > **O PLANO fechou no Lote 6**, em 09/09/2026 (`Timeline`, `DataList`, `Table`), e o **`Chart`** —
20
- > a única peça que tinha ficado de fora — entrou no mesmo dia pela
21
- > [ADR-0041](../../decisions/0041-o-motor-de-grafico-do-nativo-e-nosso-sobre-react-native-svg.md).
17
+ > ⚠ **The native `Table` is NOT a table**: each row becomes a card, and each cell carries the column
18
+ > name with it. **The API is different** — `columns` + `rows`, because there is no `<thead>` to write.
19
+ > See the **Data** section below, which has the full measurement.
22
20
  >
23
- > ⚠ **O `Chart` é o único componente deste pacote cuja GEOMETRIA é nossa.** Na web ele é 79 linhas
24
- > de pele sobre o `recharts`; aqui não há motor, então escala, eixo e caminho são código do
25
- > repositório. **Zero dependência nova.** Ver a seção **Gráfico** abaixo.
21
+ > ⚠ **One accessibility finding applies to the whole package:** React Native
22
+ > **accepts** `role="dialog"` and `role="alertdialog"` — it compiles, passes `tsc`, goes through Fabric —
23
+ > and **maps them on neither platform.** See the **Confirm and notify** section below.
26
24
  >
27
- > ⚠ **A `Table` do nativo NÃO é uma tabela**: cada linha vira um cartão e cada célula leva o nome
28
- > da coluna junto. **A API é outra** — `columns` + `rows`, porque não há `<thead>` para escrever.
29
- > Ver a seção **Dados** abaixo, que tem a medição inteira.
25
+ > **`DatePicker` and `PhotoInput`** need extra dependencies. They **are not exported from the main entry
26
+ > point**: they live in `@aurea-uds/native/system` — see the **Date and camera** section below.
30
27
  >
31
- > **Lote 5 COMPLETO.** Os overlays entraram em 08/09/2026:
32
- > `Dialog`, `ConfirmDialog`, `Drawer`, `BottomSheet` e o par `ToastHost`/`useToast`.
28
+ > ⚠ **Aurea does not provide routing:** `expo-router`/`react-navigation` is the app's choice; this package
29
+ > provides the skin. Pull-to-refresh is `onRefresh`/`refreshing` on the `Screen`.
33
30
  >
34
- > ⚠ **O achado do lote é de ACESSIBILIDADE, e ele vale para todo o pacote:** o React Native
35
- > **aceita** `role="dialog"` e `role="alertdialog"` — compila, passa o `tsc`, atravessa o Fabric —
36
- > e **não os mapeia em nenhuma das duas plataformas.** Ver a seção **Confirmar e avisar** abaixo.
37
- >
38
- > **Lote 4 COMPLETO.** Os formulários entraram em 08/09/2026:
39
- > `Field`, `Label`, `Input`, `Textarea`, `Select`, `Switch`, `Checkbox`, `Radio`,
40
- > `SegmentedControl`, `Form`, `KeyboardAvoiding`. Os dois últimos — **`DatePicker` e
41
- > `PhotoInput`** — exigiram dependência nova, pararam o lote e voltaram para o Victor
42
- > (`BUILDING.md` §3); ele autorizou os dois. Eles **não saem pelo barril**: moram em
43
- > `@aurea-uds/native/system` — ver a seção **Data e câmera** abaixo.
44
- >
45
- > **Lote 3 COMPLETO — a moldura.** A moldura entrou em 08/09/2026:
46
- > `BottomNav`, `Topbar`, `NavList`, `Stepper` — e o **puxar-para-atualizar**, que virou
47
- > `onRefresh`/`refreshing` no `Screen`. ⚠ **A Aurea não entrega roteamento:**
48
- > `expo-router`/`react-navigation` é escolha do app; daqui sai a pele.
49
- >
50
- > **Lote 2 COMPLETO — o painel de leitura.** O painel de leitura entrou em 08/09/2026: `KPI`,
51
- > `Progress`, `Status`, `Badge`, `Alert`, `Skeleton`, `Spinner`, `EmptyState`, `DataState` e
52
- > `Avatar`. Com ele vieram duas coisas que valem saber antes de usar: a tabela de **frases**
53
- > (`<AureaProvider strings>`) e o hook **`useReduceMotion`** — ver as seções abaixo.
54
- >
55
- > **Lote 1 COMPLETO — os dez.** O chão (Lote 0) foi provado num Android em 03/09/2026 —
56
- > as quatro perguntas do `NATIVE.md` §7 passaram — e sobre ele entraram `Text`, `Screen`, `Stack`,
57
- > `Cluster`, `Grid`, `Card`, `Icon`, `Button` e `IconButton`.
58
- >
59
- > O `Screen` chegou por último e sozinho: ele foi o único que precisou de dependência nova, então
60
- > parou o lote e voltou para o Victor (`BUILDING.md` §3). Ele autorizou o peer —
61
- > [ADR-0040](../../decisions/0040-o-screen-adota-o-safe-area-context-como-peer.md).
31
+ > Two things worth knowing before use: the **strings** table (`<AureaProvider strings>`) and the
32
+ > **`useReduceMotion`** hook — see the sections below.
62
33
 
63
- ## Instalação
34
+ ## Installation
64
35
 
65
36
  ```sh
66
37
  pnpm add @aurea-uds/native react-native-svg react-native-safe-area-context
67
38
  ```
68
39
 
69
- Quatro **peers obrigatórios**: `react` (≥19), `react-native` (≥0.76, pela Nova Arquitetura),
70
- `react-native-svg` (≥15, pelos ícones) e `react-native-safe-area-context` (≥5, pelo `Screen`).
71
- Para o texto sair nas fontes da Aurea (Inter, Sora nos títulos e IBM Plex Mono no código — ADR-0077), some
40
+ Four **required peers**: `react` (≥19), `react-native` (≥0.76, for the New Architecture),
41
+ `react-native-svg` (≥15, for the icons) and `react-native-safe-area-context` (≥5, for `Screen`).
42
+ For text to render in the Aurea fonts (Inter, Sora for headings and IBM Plex Mono for code), add
72
43
  `@aurea-uds/fonts`.
73
44
 
74
- O último costuma **já estar instalado**: `react-navigation` e `expo-router` o arrastam. Declará-lo
75
- como peer não adiciona peso ao app — só diz o que já ia estar lá.
45
+ The last one is usually **already installed**: `react-navigation` and `expo-router` pull it in. Declaring
46
+ it as a peer adds no weight to the app — it only states what was going to be there anyway.
76
47
 
77
- E **três peers OPCIONAIS**, marcados como tal em `peerDependenciesMeta` — quem não usa data,
78
- câmera nem arquivo não instala nada e não vê aviso. Instale só o da peça que usar:
48
+ And **three OPTIONAL peers**, marked as such in `peerDependenciesMeta` — if you do not use date,
49
+ camera or file, you install nothing and see no warning. Install only the one for the component you use:
79
50
 
80
51
  ```sh
81
52
  pnpm add @react-native-community/datetimepicker expo-image-picker
@@ -84,17 +55,16 @@ pnpm add expo-document-picker
84
55
 
85
56
  | | | |
86
57
  |---|---|---|
87
- | `@react-native-community/datetimepicker` | ≥8 | MIT · só para o `DatePicker` |
88
- | `expo-image-picker` | ≥16 | MIT · só para o `PhotoInput` |
89
- | `expo-document-picker` | ≥12 | MIT · só para o `FileInput`, que sai por `@aurea-uds/native/system/file` |
58
+ | `@react-native-community/datetimepicker` | ≥8 | MIT · only for `DatePicker` |
59
+ | `expo-image-picker` | ≥16 | MIT · only for `PhotoInput` |
60
+ | `expo-document-picker` | ≥12 | MIT · only for `FileInput`, which comes from `@aurea-uds/native/system/file` |
90
61
 
91
- ## Tema × densidade
62
+ ## Theme × density
92
63
 
93
- Dois eixos, como na web: tema (`dark`/`light`) × densidade
94
- (`compact`/`comfortable`/`spacious`). No React Native **não há cascata**, então alguém tem de
95
- resolver os dois num valor — é o que o provider faz, e é a razão de ele existir
96
- ([ADR-0037](../../decisions/0037-stylesheet-puro-no-nativo-e-o-provider-e-nosso.md): o motor é o
97
- `StyleSheet` puro e a camada de tema é nossa).
64
+ Two axes, as on the web: theme (`dark`/`light`) × density
65
+ (`compact`/`comfortable`/`spacious`). In React Native **there is no cascade**, so something has to
66
+ resolve both into one value — that is what the provider does, and why it exists (the engine is plain
67
+ `StyleSheet` and the theme layer is ours).
98
68
 
99
69
  ```tsx
100
70
  import {AureaProvider, Button, Card, Cluster, Screen, Stack, Text} from "@aurea-uds/native";
@@ -116,10 +86,10 @@ function Cartao() {
116
86
  <Card variant="raised">
117
87
  <Stack>
118
88
  <Text size="lg" weight={600}>Aurea</Text>
119
- <Text tone="muted">O `Card` já traz raio, superfície e sombra do tema.</Text>
89
+ <Text tone="muted">The `Card` already brings the theme's radius, surface and shadow.</Text>
120
90
  <Cluster>
121
- <Button tone="brand" leadingIcon="plus">Novo</Button>
122
- <Button appearance="outline">Cancelar</Button>
91
+ <Button tone="brand" leadingIcon="plus">New</Button>
92
+ <Button appearance="outline">Cancel</Button>
123
93
  </Cluster>
124
94
  </Stack>
125
95
  </Card>
@@ -127,10 +97,10 @@ function Cartao() {
127
97
  }
128
98
  ```
129
99
 
130
- ### Escrevendo estilo próprio
100
+ ### Writing your own styles
131
101
 
132
- Use `criarFolha`, não `StyleSheet.create` direto — ela memoiza por par (tema, densidade), então
133
- vinte instâncias do mesmo componente produzem **uma** folha, não vinte:
102
+ Use `criarFolha`, not `StyleSheet.create` directly — it memoizes per (theme, density) pair, so
103
+ twenty instances of the same component produce **one** stylesheet, not twenty:
134
104
 
135
105
  ```tsx
136
106
  import {criarFolha, useAureaTokens} from "@aurea-uds/native";
@@ -145,82 +115,84 @@ function Meu() {
145
115
  }
146
116
  ```
147
117
 
148
- Isso não é preciosismo: o smoke test no Android mediu **182 ms** de troca de tema com o app
149
- recriando a folha a cada render de propósito, para medir o pior caso.
118
+ This is not fussiness: the Android smoke test measured **182 ms** for a theme switch with the app
119
+ recreating the stylesheet on every render on purpose, to measure the worst case.
150
120
 
151
- ### A casca de uma tela
121
+ ### The shell of a screen
152
122
 
153
123
  ```tsx
154
124
  <Screen scroll>
155
- <Text size="xl" weight={600}>Painel</Text>
125
+ <Text size="xl" weight={600}>Dashboard</Text>
156
126
  <Card>…</Card>
157
127
  </Screen>
158
128
  ```
159
129
 
160
- Preenche, pinta com o fundo do tema e afasta do entalhe e da barra de gestos. **As quatro bordas
161
- por padrão** — em paisagem o entalhe fica de lado, e uma tela só com `top` quebra ao girar.
130
+ It fills the screen, paints the theme background and keeps clear of the notch and the gesture bar. **All
131
+ four edges by default** — in landscape the notch is on the side, and a screen with only `top` breaks on
132
+ rotation.
162
133
 
163
- `padded={false}` para lista de borda a borda. `scroll` embrulha num `ScrollView` e **muda onde o
164
- respiro cai**: ele vai para o `contentContainerStyle`, porque padding no próprio `ScrollView`
165
- recorta a área rolável.
134
+ `padded={false}` for an edge-to-edge list. `scroll` wraps it in a `ScrollView` and **changes where the
135
+ padding goes**: it moves to `contentContainerStyle`, because padding on the `ScrollView` itself
136
+ clips the scrollable area.
166
137
 
167
- Não precisa de `SafeAreaProvider` acima: o `SafeAreaView` da biblioteca é view nativa e lê o inset
168
- sozinha. Quem exige o provider são os **hooks** — e quem usa `react-navigation` já o tem.
138
+ No `SafeAreaProvider` is needed above it: the library's `SafeAreaView` is a native view and reads the
139
+ inset on its own. The **hooks** are what require the provider — and if you use `react-navigation` you
140
+ already have it.
169
141
 
170
- ### Alvo de toque
142
+ ### Touch target
171
143
 
172
- Três das cinco alturas de controle (26, 30, 36 dp) são menores que `--target-min` (44). O `Button`
173
- resolve isso **sem mexer no desenho**: o `Pressable` tem `minHeight: 44` e a caixa pintada mantém
174
- a altura do token.
144
+ Three of the five control heights (26, 30, 36 dp) are smaller than `--target-min` (44). The `Button`
145
+ solves this **without changing the drawing**: the `Pressable` has `minHeight: 44` and the painted box keeps
146
+ the token's height.
175
147
 
176
- Não é `hitSlop` de propósito — ele **não é lido pelo TalkBack**, e deixaria o alvo pequeno
177
- justamente para quem usa leitor de tela.
148
+ It is not `hitSlop`, on purpose — `hitSlop` **is not read by TalkBack**, and would leave the target small
149
+ exactly for people who use a screen reader.
178
150
 
179
- `useAureaTheme()` devolve `{theme, density, setTheme, setDensity, toggleTheme}` — a mesma forma do
180
- hook homônimo de `@aurea-uds/react`. `useAureaTokens()` devolve os valores já resolvidos, e **não
181
- tem par na web** porque lá o CSS os resolve no uso.
151
+ `useAureaTheme()` returns `{theme, density, setTheme, setDensity, toggleTheme}` — the same shape as the
152
+ hook of the same name in `@aurea-uds/react`. `useAureaTokens()` returns the resolved values, and **has
153
+ no web counterpart** because there the CSS resolves them where they are used.
182
154
 
183
- Sem `<AureaProvider>` acima, os dois hooks **levantam**. É decisão: um padrão silencioso
184
- desenharia o app inteiro no tema errado sem nada acusar.
155
+ Without an `<AureaProvider>` above, both hooks **throw**. This is deliberate: a silent default
156
+ would draw the whole app in the wrong theme without anything reporting it.
185
157
 
186
- ## Os formulários
158
+ ## Forms
187
159
 
188
160
  ```tsx
189
161
  <Form>
190
- <Field label="Quilometragem" hint="Só números" error={erros.km}>
162
+ <Field label="Mileage" hint="Numbers only" error={erros.km}>
191
163
  <Input keyboardType="numeric" value={km} onChangeText={setKm} />
192
164
  </Field>
193
- <Field label="Combustível">
194
- <Select items={[{value: "g", label: "Gasolina"}, {value: "e", label: "Etanol"}]}
165
+ <Field label="Fuel">
166
+ <Select items={[{value: "g", label: "Gasoline"}, {value: "e", label: "Ethanol"}]}
195
167
  value={comb} onChange={setComb} />
196
168
  </Field>
197
- <Switch label="Lembrar deste veículo" checked={lembrar} onChange={setLembrar} />
169
+ <Switch label="Remember this vehicle" checked={lembrar} onChange={setLembrar} />
198
170
  </Form>
199
171
  ```
200
172
 
201
- ⚠ **O `Field` é o que dá NOME ao controle**, e isso é a diferença mais importante em relação à
202
- web. Lá o `<label for>` aponta para um `id`; **no React Native não há `id` nem `htmlFor`** — o
203
- nome é uma string no próprio controle. O `Field` empurra `label`, `hint` e o estado de inválido
204
- por contexto, e é por isso que um `Input` solto, fora de um `Field`, **não tem nome** para quem
205
- usa leitor de tela.
173
+ ⚠ **The `Field` is what gives the control its NAME**, and this is the most important difference from
174
+ the web. There, `<label for>` points to an `id`; **in React Native there is no `id` and no `htmlFor`** — the
175
+ name is a string on the control itself. The `Field` passes `label`, `hint` and the invalid state down
176
+ through context, which is why an `Input` on its own, outside a `Field`, **has no name** for people
177
+ who use a screen reader.
206
178
 
207
- ⚠ **`error` não é só texto vermelho:** ele marca o controle como inválido e vira a dica que o
208
- leitor anuncia.
179
+ ⚠ **`error` is not just red text:** it marks the control as invalid and becomes the hint the
180
+ screen reader announces.
209
181
 
210
- ⚠ **`keyboardType="numeric"`** é o que faz digitar `12,4` custar dois toques em vez de oito.
182
+ ⚠ **`keyboardType="numeric"`** is what makes typing `12,4` cost two taps instead of eight.
211
183
 
212
- ### O que é diferente da web, e por quê
184
+ ### What is different from the web, and why
213
185
 
214
186
  | | |
215
187
  |---|---|
216
- | `Switch` | **não é o do React Native** — aquele traz o interruptor de cada sistema. Medidas do CSS |
217
- | `Select` | não existe `<select>` no RN: é `Modal` + folha que sobe. O papel é `button`, não `combobox` — `combobox` promete um campo em que se digita |
218
- | `Form` | é só o respiro. Não há `<form>`, `submit` nem validação de plataforma; o erro de cada campo vai no `Field` |
219
- | `Field` | sem `orientation="horizontal"` — numa tela de 360dp a grade de `12rem` deixa o controle com menos de metade da largura |
220
- | `Radio` | sem `name` — o agrupamento é do estado do app, não do DOM |
221
- | `:hover` | não há ponteiro. O foco continua, e é a única pista de qual campo o teclado alimenta |
188
+ | `Switch` | **is not React Native's** — that one brings each system's own switch. Measurements from the CSS |
189
+ | `Select` | there is no `<select>` in RN: it is a `Modal` + a sheet that slides up. The role is `button`, not `combobox` — `combobox` promises a field you type in |
190
+ | `Form` | is only the spacing. There is no `<form>`, no `submit` and no platform validation; each field's error goes on its `Field` |
191
+ | `Field` | no `orientation="horizontal"` — on a 360dp screen the `12rem` grid leaves the control with less than half the width |
192
+ | `Radio` | no `name` — grouping belongs to the app state, not to the DOM |
193
+ | `:hover` | there is no pointer. Focus remains, and it is the only cue to which field the keyboard is filling |
222
194
 
223
- ### Teclado
195
+ ### Keyboard
224
196
 
225
197
  ```tsx
226
198
  <KeyboardAvoiding offset={alturaDaTopbar}>
@@ -228,522 +200,515 @@ leitor anuncia.
228
200
  </KeyboardAvoiding>
229
201
  ```
230
202
 
231
- O `behavior` muda com a plataforma — `padding` no iOS, `height` no Android — e a Aurea escolhe
232
- por você. Um só nos dois lados deixa metade dos aparelhos com o botão de salvar sob o teclado.
233
-
234
- ## Buscar, número e mídia
203
+ The `behavior` changes with the platform — `padding` on iOS, `height` on Android — and Aurea picks it
204
+ for you. A single one on both sides leaves half the devices with the save button under the keyboard.
235
205
 
236
- O **Lote 7** (11/09/2026). Três lacunas que o app mediu, e não o plano — `NATIVE.md` §8.
206
+ ## Search, numbers and media
237
207
 
238
- ### `Combobox` — digitar para achar um item
208
+ ### `Combobox` — type to find an item
239
209
 
240
- ⚠ **Não confunda com o `Select`.** A escolha entre os dois é de TAMANHO DE LISTA, e a linha é
241
- dura: o `Select` monta todos os itens num `ScrollView` — serve para unidades, estados e tipos.
242
- **Um catálogo de milhares de linhas ali trava.** O `Combobox` usa `FlatList` e aceita busca remota.
210
+ ⚠ **Do not confuse it with `Select`.** The choice between the two is about LIST SIZE, and the line is
211
+ firm: `Select` mounts every item in a `ScrollView` — it is for units, states and types.
212
+ **A catalog of thousands of rows freezes there.** `Combobox` uses `FlatList` and accepts remote search.
243
213
 
244
214
  ```tsx
245
215
  import {Combobox, Field} from "@aurea-uds/native";
246
216
 
247
- // ① catálogo REMOTO — a Aurea não filtra, o app busca
217
+ // ① REMOTE catalog — Aurea does not filter, the app searches
248
218
  <Field label="Item">
249
219
  <Combobox
250
- items={resultados} // a lista JÁ BUSCADA
251
- value={escolhido} // o ITEM inteiro, não o id
220
+ items={resultados} // the list ALREADY FETCHED
221
+ value={escolhido} // the WHOLE item, not the id
252
222
  onValueChange={setEscolhido}
253
- onSearchChange={buscar} // ← a presença desta prop DESLIGA o filtro da Aurea
223
+ onSearchChange={buscar} // ← the presence of this prop TURNS OFF Aurea's filter
254
224
  loading={buscando}
255
225
  onEndReached={proximaPagina}
256
226
  />
257
227
  </Field>
258
228
 
259
- // ② lista NA MÃO — a Aurea filtra, ignorando acento e caixa
229
+ // ② LOCAL list — Aurea filters, ignoring accents and case
260
230
  <Combobox items={unidades} value={unidade} onValueChange={setUnidade} />
261
231
  ```
262
232
 
263
- **A regra em uma linha: `onSearchChange` presente = a Aurea não filtra.** É presença de prop, não
264
- configuração — e ela existe porque filtrar de novo o que o servidor devolveu esconde resultado.
233
+ **The rule in one line: `onSearchChange` present = Aurea does not filter.** It is the presence of a prop,
234
+ not a setting — and it exists because filtering again what the server returned hides results.
265
235
 
266
236
  | | |
267
237
  |---|---|
268
- | espera antes de chamar `onSearchChange` | **250 ms**. `searchDelay={0}` desliga |
269
- | onde se digita | **dentro da folha**, não no gatilho — o teclado ocupa metade da tela |
270
- | `value` | o **item inteiro**: numa busca remota a lista some debaixo da escolha |
271
- | ícones a registrar | `caret-down`, `search`, `close` |
238
+ | wait before calling `onSearchChange` | **250 ms**. `searchDelay={0}` turns it off |
239
+ | where you type | **inside the sheet**, not in the trigger — the keyboard takes half the screen |
240
+ | `value` | the **whole item**: in a remote search the list disappears under the selection |
241
+ | icons to register | `caret-down`, `search`, `close` |
272
242
 
273
- ### `SearchField` — filtrar o que já está na tela
243
+ ### `SearchField` — filter what is already on screen
274
244
 
275
- Outro papel: o `Combobox` **escolhe** de um catálogo e devolve a escolha; este **filtra** e
276
- devolve texto.
245
+ A different role: `Combobox` **picks** from a catalog and returns the choice; this one **filters** and
246
+ returns text.
277
247
 
278
248
  ```tsx
279
- <SearchField placeholder="Filtrar" onSearchChange={setFiltro} />
249
+ <SearchField placeholder="Filter" onSearchChange={setFiltro} />
280
250
  ```
281
251
 
282
- ### `NumberField` — moeda, medida e contador
252
+ ### `NumberField` — currency, measurement and counter
283
253
 
284
254
  ```tsx
285
- <Field label="Valor">
255
+ <Field label="Amount">
286
256
  <NumberField value={valor} onValueChange={setValor}
287
257
  format={{style: "currency", currency: "BRL"}} locale="pt-BR" />
288
258
  </Field>
289
259
 
290
- <Field label="Litros">
260
+ <Field label="Liters">
291
261
  <NumberField value={litros} onValueChange={setLitros}
292
262
  format={{maximumFractionDigits: 1}} locale="pt-BR" min={0} />
293
263
  </Field>
294
264
 
295
- <Field label="Quantidade">
265
+ <Field label="Quantity">
296
266
  <NumberField value={qtd} onValueChange={setQtd} min={0} step={1} />
297
267
  </Field>
298
268
  ```
299
269
 
300
- ⚠ **O que sai por `onValueChange` é `number`, sempre** — `1234.5`, nunca `"R$ 1.234,50"`.
270
+ ⚠ **What comes out of `onValueChange` is always a `number`** — `1234.5`, never `"R$ 1.234,50"`.
301
271
 
302
- ⚠ **Formata no BLUR, e só no blur** ([ADR-0024](../../decisions/0024-mascara-de-campo-e-o-momento-nao-o-formato.md)
303
- e [ADR-0042](../../decisions/0042-o-intl-e-o-formatador-do-nativo-e-a-volta-e-nossa.md)). Enquanto
304
- o campo tem foco, ele mostra exatamente o que foi digitado. Máscara ao vivo é o defeito que
305
- outro design system publicou com reprovação WCAG registrada e que uma das bibliotecas de referência abandonou.
272
+ ⚠ **It formats on BLUR, and only on blur.** While the field has focus, it shows exactly what was typed.
273
+ Live masking is a known defect: it has shipped elsewhere with a recorded WCAG failure, and libraries that
274
+ tried it abandoned it.
306
275
 
307
- ⚠ **`notation: "compact"` é recusado** — quebrado no motor JS do RN nos dois sistemas. Sai aviso em
308
- `__DEV__` e a opção é ignorada; o resto do formato sobrevive.
276
+ ⚠ **`notation: "compact"` is rejected** — it is broken in RN's JS engine on both systems. A warning is
277
+ logged in `__DEV__` and the option is ignored; the rest of the format survives.
309
278
 
310
- Os três auxiliares são públicos, porque o app tem o mesmo problema fora do campo:
279
+ The three helpers are public, because the app has the same problem outside the field:
311
280
 
312
281
  ```tsx
313
282
  import {formatarNumero, lerNumero, separadoresDoLocale} from "@aurea-uds/native";
314
283
 
315
284
  formatarNumero(1234.5, "pt-BR", {style: "currency", currency: "BRL"}); // "R$ 1.234,50"
316
285
  lerNumero("R$ 1.234,50", "pt-BR"); // 1234.5
317
- lerNumero("", "pt-BR"); // null ← não é 0
286
+ lerNumero("", "pt-BR"); // null ← not 0
318
287
  ```
319
288
 
320
- Para **texto** (placa, documento, telefone) o momento é o mesmo e o formato é seu:
289
+ For **text** (licence plate, ID document, phone number) the moment is the same and the format is yours:
321
290
 
322
291
  ```tsx
323
292
  <Input value={placa} onChangeText={setPlaca} formatOnBlur={(v) => v.toUpperCase()} />
324
293
  ```
325
294
 
326
- ⚠ `formatOnBlur` exige o campo **controlado** — o valor formatado sai por `onChangeText`.
295
+ ⚠ `formatOnBlur` requires a **controlled** field — the formatted value comes out through `onChangeText`.
327
296
 
328
- ### `Image` e `Gallery` — mostrar foto
297
+ ### `Image` and `Gallery` — showing photos
329
298
 
330
- ⚠ **`Image` NÃO é o `Image` do React Native com outra pele.** Ele faz as duas coisas que o
331
- primitivo cru não faz: **reserva a caixa** antes dos bytes (sem isso o layout salta) e **cai para
332
- um substituto** quando eles não vêm (sem isso uma URL quebrada deixa buraco).
299
+ ⚠ **`Image` is NOT React Native's `Image` with another skin.** It does the two things the raw
300
+ primitive does not: it **reserves the box** before the bytes arrive (without that the layout jumps) and it
301
+ **falls back to a placeholder** when they do not arrive (without that a broken URL leaves a hole).
333
302
 
334
303
  ```tsx
335
- <Image source={foto.uri} alt="Frente do item" ratio="4/3" />
304
+ <Image source={foto.uri} alt="Front of the item" ratio="4/3" />
336
305
 
337
306
  <Gallery items={fotos} zoom selected={atual} onSelect={setAtual} />
338
307
  ```
339
308
 
340
309
  | | |
341
310
  |---|---|
342
- | `ratio` | aceita `4/3`, `"4/3"`, `"16:9"` ou o número. A web usa string; o RN quer número |
343
- | `alt` | **obrigatório**. Decorativa de verdade se escreve `alt=""`, explícito |
344
- | ampliar | é o **`Dialog`** que já existe, não uma superfície nova |
345
- | legenda | com legenda, o nome vai para o LADRILHO e a imagem sai da árvore de acessibilidade |
346
- | ícone a registrar | `image` (o substituto) |
311
+ | `ratio` | accepts `4/3`, `"4/3"`, `"16:9"` or the number. The web uses a string; RN wants a number |
312
+ | `alt` | **required**. A truly decorative image is written `alt=""`, explicitly |
313
+ | zoom | it is the existing **`Dialog`**, not a new surface |
314
+ | caption | with a caption, the name goes to the TILE and the image leaves the accessibility tree |
315
+ | icon to register | `image` (the placeholder) |
347
316
 
348
- Quem já usa `expo-image` por cache de disco troca o elemento sem perder a pele:
317
+ If you already use `expo-image` for its disk cache, swap the element without losing the skin:
349
318
 
350
319
  ```tsx
351
320
  <Image render={<ExpoImage contentFit="cover" transition={150} />} source={u} alt="…" />
352
321
  ```
353
322
 
354
- ⚠ `fit` **não** é traduzido para o elemento passado — `resizeMode` é do `Image` do RN e o
355
- `expo-image` chama a mesma coisa de `contentFit`. Quem passa o elemento escreve a prop dele.
323
+ ⚠ `fit` is **not** translated for the element you pass — `resizeMode` belongs to RN's `Image`, and
324
+ `expo-image` calls the same thing `contentFit`. If you pass the element, write its own prop.
356
325
 
357
- ## Data e câmera
326
+ ## Date and camera
358
327
 
359
- Estes dois **não saem do barril** — são o único ponto do pacote com importação própria:
328
+ These two **are not exported from the main entry point** — they are the only part of the package with its
329
+ own import path:
360
330
 
361
331
  ```tsx
362
332
  import {DatePicker, PhotoInput} from "@aurea-uds/native/system";
363
333
  ```
364
334
 
365
- ⚠ **E o caminho profundo é a forma documentada, pelo mesmo motivo dos ícones**
366
- ([ADR-0038](../../decisions/0038-um-componente-por-icone-sobre-react-native-svg.md)): um módulo
367
- que ninguém importa **não entra no grafo do Metro**. Se eles saíssem por `@aurea-uds/native`, todo
368
- app que importasse um `Button` arrastaria o seletor de data e a câmera para o bundle — e falharia
369
- na resolução se os peers opcionais não estivessem instalados. Preguiça por construção, não por
370
- poda.
335
+ ⚠ **And the deep path is the documented form, for the same reason as the icons:** a module
336
+ nobody imports **does not enter the Metro graph**. If they came from `@aurea-uds/native`, every
337
+ app that imported a `Button` would drag the date picker and the camera into the bundle — and would fail
338
+ to resolve if the optional peers were not installed. Lazy by construction, not by
339
+ tree-shaking.
371
340
 
372
341
  ```tsx
373
- <Field label="Data do lançamento">
342
+ <Field label="Entry date">
374
343
  <DatePicker value={data} onChange={setData} maximumDate={new Date()} />
375
344
  </Field>
376
345
 
377
- <Field label="Comprovante">
346
+ <Field label="Receipt">
378
347
  <PhotoInput value={fotos} onChange={setFotos} max={3} />
379
348
  </Field>
380
349
  ```
381
350
 
382
- ### `DatePicker` — a nossa pele, o calendário deles
351
+ ### `DatePicker` — our skin, their calendar
383
352
 
384
- A Aurea desenha o **gatilho** (mesma altura, mesma borda e o mesmo raio do `Input`); o que abre é
385
- o **diálogo do sistema**. Data é um controle que o Android e o iOS fazem melhor e que a pessoa já
386
- sabe usar — reimplementá-lo daria um calendário com a nossa cor e o comportamento errado em nove
387
- casos de borda (fuso, calendário não gregoriano, entrada por teclado, TalkBack).
353
+ Aurea draws the **trigger** (same height, same border and same radius as `Input`); what opens is
354
+ the **system dialog**. Date is a control that Android and iOS do better and that people already
355
+ know how to use — reimplementing it would give a calendar in our colour with the wrong behaviour in nine
356
+ edge cases (time zone, non-Gregorian calendar, keyboard input, TalkBack).
388
357
 
389
- ⚠ **As duas plataformas têm APIs diferentes, e é isso que o componente esconde:**
358
+ ⚠ **The two platforms have different APIs, and that is what the component hides:**
390
359
 
391
360
  | | |
392
361
  |---|---|
393
- | Android | `DateTimePickerAndroid.open({…})` — **imperativo**, o diálogo é do sistema |
394
- | iOS | `<RNDateTimePicker>` — **declarativo**, vira um nó na árvore |
362
+ | Android | `DateTimePickerAndroid.open({…})` — **imperative**, the dialog belongs to the system |
363
+ | iOS | `<RNDateTimePicker>` — **declarative**, it becomes a node in the tree |
395
364
 
396
- Um app que não soubesse disso escreveria o caminho do Android e veria **nada acontecer** no
365
+ An app that did not know this would write the Android path and see **nothing happen** on the
397
366
  iPhone.
398
367
 
399
- ⚠ **Cancelar não escreve data.** No Android o evento volta com `type: "dismissed"`, e só
400
- `type === "set"` chama o `onChange`. É o caso de borda mais fácil de errar, e há um teste cujo
401
- único trabalho é reprová-lo.
368
+ ⚠ **Cancelling does not write a date.** On Android the event comes back with `type: "dismissed"`, and only
369
+ `type === "set"` calls `onChange`. It is the easiest edge case to get wrong, and there is a test whose
370
+ only job is to fail on it.
402
371
 
403
- ### `PhotoInput` — as decisões de fluxo, declaradas
372
+ ### `PhotoInput` — the flow decisions, stated
404
373
 
405
- ⚠ **Câmera não é componente, é fluxo** — permissão, intent, prévia, e o que fazer quando a pessoa
406
- nega. Cada pergunta ficou com um padrão, e **cada padrão tem uma saída**:
374
+ ⚠ **The camera is not a component, it is a flow** — permission, intent, preview, and what to do when the
375
+ person denies. Each question got a default, and **each default has a way out**:
407
376
 
408
- | a pergunta | o que ficou | como mudar |
377
+ | the question | the default | how to change it |
409
378
  |---|---|---|
410
- | o que mostrar **sem** permissão? | o gatilho aparece normal; tocar é que pergunta | — |
411
- | e se a pessoa **negar**? | pergunta de novo na próxima vez, enquanto o sistema deixar | `onPermissionDenied` |
412
- | e se negar **de vez** (`canAskAgain: false`)? | um `Alert` de aviso + botão para as configurações | `offerSettings={false}` |
413
- | câmera ou galeria? | **câmera** | `source="library"` |
414
- | como remover? | um X com fundo, **todo fora** da foto, no canto de cima à direita (R-22) | `removeIcon` |
415
- | quantas cabem? | **uma** | `max` |
416
- | como **olhar** a foto? | tocar na miniatura abre a foto grande, no mesmo zoom da `Gallery` (R-22) | — |
379
+ | what to show **without** permission? | the trigger appears as usual; tapping it is what asks | — |
380
+ | what if the person **denies**? | it asks again next time, as long as the system allows | `onPermissionDenied` |
381
+ | what if they deny **for good** (`canAskAgain: false`)? | a warning `Alert` + a button to the settings | `offerSettings={false}` |
382
+ | camera or library? | **camera** | `source="library"` |
383
+ | how to remove? | an X with a background, **fully outside** the photo, at the top right corner | `removeIcon` |
384
+ | how many fit? | **one** | `max` |
385
+ | how to **view** the photo? | tapping the thumbnail opens the large photo, with the same zoom as `Gallery` | — |
417
386
 
418
- **Desde a `0.15.0` (R-22)**, a miniatura é quadrada de 64 (o `Avatar` `lg` da referência), do
419
- tamanho do botão de pôr foto. O leitor de tela ouve *"Foto 2 de 3"* e *"Abre a foto"*; o X,
420
- *"Remover foto 2"*. Com o campo inativo, a foto ainda abre e o X não remove.
387
+ **Since `0.15.0`**, the thumbnail is a 64 square, the size of the add-photo button. The screen reader
388
+ hears *"Photo 2 of 3"* and *"Opens the photo"*; the X, *"Remove photo 2"*. With the field disabled, the
389
+ photo still opens and the X does not remove.
421
390
 
422
- ⚠ **O gatilho some ao atingir o limite**, em vez de ficar aceso e não fazer nada — botão que
423
- existe e não responde é o defeito, não a proteção.
391
+ ⚠ **The trigger disappears when the limit is reached**, instead of staying enabled and doing nothing — a
392
+ button that exists and does not respond is the defect, not the protection.
424
393
 
425
- ⚠ **`source="library"` NÃO pede a permissão de câmera.** São permissões diferentes, e pedir a
426
- errada é um diálogo assustador que o app não precisava mostrar.
394
+ ⚠ **`source="library"` does NOT request the camera permission.** They are different permissions, and asking
395
+ for the wrong one is a scary dialog the app did not need to show.
427
396
 
428
- As frases (`cameraDenied`, `openSettings`, `photoRemove`, `datePlaceholder`) saem da tabela de
429
- **Frases** — ver a seção abaixo.
397
+ The strings (`cameraDenied`, `openSettings`, `photoRemove`, `datePlaceholder`) come from the
398
+ **Strings** table — see the section below.
430
399
 
431
- ### `FileInput` — escolher arquivo (R-21, `0.15.0`)
400
+ ### `FileInput` — choosing a file (since `0.15.0`)
432
401
 
433
- Ele mora num caminho **só dele**, e não no `/system`:
402
+ It lives on a path **of its own**, not in `/system`:
434
403
 
435
404
  ```tsx
436
405
  import {FileInput} from "@aurea-uds/native/system/file";
437
406
 
438
- <Field label="Documento">
407
+ <Field label="Document">
439
408
  <FileInput value={arquivos} onChange={setArquivos} accept="application/pdf"
440
409
  maxSize={10 * 1024 * 1024} />
441
410
  </Field>
442
411
  ```
443
412
 
444
- ⚠ **O caminho próprio é o que faz "opcional" ser verdade.** Se ele morasse no `/system`, todo app
445
- que usa o `DatePicker` teria de instalar o `expo-document-picker`, ou a montagem falharia. Só quem
446
- importa `/system/file` precisa dele.
413
+ ⚠ **The separate path is what makes "optional" true.** If it lived in `/system`, every app
414
+ that uses `DatePicker` would have to install `expo-document-picker`, or the build would fail. Only those
415
+ who import `/system/file` need it.
447
416
 
448
- | a pergunta | o que ficou | como mudar |
417
+ | the question | the default | how to change it |
449
418
  |---|---|---|
450
- | o que volta? | `{uri, name, size, mimeType}` — o endereço local, **não o conteúdo** | — |
451
- | a pessoa **cancelou**? | nada muda | — |
452
- | passou do **tamanho**? | recusado, com *"Arquivo maior que o limite: nome"* em vermelho embaixo | `maxSize` |
453
- | **tipo** errado? | o seletor filtra; a peça confere de novo e recusa | `accept` |
454
- | o tamanho **não veio**? | aceito: não há o que medir, e o servidor confere | — |
455
- | **quantos** cabem? | um; no limite o gatilho some, como no `PhotoInput` | `max` |
456
- | **nome comprido**? | corta no meio (`relat…2026.pdf`): a extensão continua à vista | — |
419
+ | what comes back? | `{uri, name, size, mimeType}` — the local address, **not the content** | — |
420
+ | the person **cancelled**? | nothing changes | — |
421
+ | over the **size** limit? | rejected, with *"File larger than the limit: name"* in red below | `maxSize` |
422
+ | wrong **type**? | the picker filters; the component checks again and rejects | `accept` |
423
+ | the size **did not come**? | accepted: there is nothing to measure, and the server checks | — |
424
+ | **how many** fit? | one; at the limit the trigger disappears, as in `PhotoInput` | `max` |
425
+ | **long name**? | cut in the middle (`relat…2026.pdf`): the extension stays visible | — |
457
426
 
458
- Para o leitor de tela: o gatilho é um botão com o nome do `Field` e o texto *"Escolher arquivo"*;
459
- cada arquivo lê *"nome, tamanho"*; o X lê *"Remover nome"*; a recusa é anunciada.
427
+ For the screen reader: the trigger is a button with the `Field` name and the text *"Choose file"*;
428
+ each file reads *"name, size"*; the X reads *"Remove name"*; the rejection is announced.
460
429
 
461
- As frases `fileChoose`, `fileRemove`, `fileTooLarge` e `fileWrongType` saem da tabela de **Frases**;
462
- as três últimas são as mesmas da web.
430
+ The strings `fileChoose`, `fileRemove`, `fileTooLarge` and `fileWrongType` come from the **Strings** table;
431
+ the last three are the same as on the web.
463
432
 
464
- ## Gráfico
433
+ ## Chart
465
434
 
466
435
  ```tsx
467
436
  import {Chart} from "@aurea-uds/native";
468
437
 
469
438
  <Chart
470
- label="Custo por mês"
471
- labels={["jan", "fev", "mar", "abr"]}
472
- series={[{name: "Custo", data: [210, 198, 240, 187]}]}
439
+ label="Cost per month"
440
+ labels={["jan", "feb", "mar", "apr"]}
441
+ series={[{name: "Cost", data: [210, 198, 240, 187]}]}
473
442
  mark="area"
474
443
  formatValue={(v) => `R$ ${v}`} />
475
444
  ```
476
445
 
477
- ### ⚠ Ele é o único cuja geometria é nossa
446
+ ### ⚠ It is the only one whose geometry is ours
478
447
 
479
- Na web o `Chart` **não desenha**: a ficha diz *"Aurea does not wrap the chart types: the engine
480
- draws, this component holds"*, e o arquivo tem 79 linhas de pele sobre o `recharts`. **Aqui não há
481
- motor.** Escala, régua, caminho e eixo são código deste repositório.
448
+ On the web, `Chart` **does not draw**: its documentation says *"Aurea does not wrap the chart types: the
449
+ engine draws, this component holds"*, and the file is 79 lines of skin over `recharts`. **Here there is no
450
+ engine.** Scale, ruler, path and axis are code in this repository.
482
451
 
483
- As quatro bibliotecas de gráfico do React Native foram medidas no registro e recusadas — a razão
484
- de cada uma está na [ADR-0041](../../decisions/0041-o-motor-de-grafico-do-nativo-e-nosso-sobre-react-native-svg.md).
485
- A que mais importa: `react-native-chart-kit` não traz peer novo nenhum, e mesmo assim não serve,
486
- porque é `data` entra / gráfico sai. O `recharts` é **marca composta** — adotá-la inverteria a
487
- relação em que a Aurea segura e o motor desenha com as props dela.
452
+ The React Native chart libraries available on the registry were evaluated and rejected. The main reason:
453
+ a library where data goes in and a finished chart comes out does not fit, even when it brings no new peer.
454
+ `recharts`, on the web, works with composed marks — adopting a data-in, chart-out library would invert the
455
+ relation in which Aurea holds and the engine draws with Aurea's props.
488
456
 
489
- **Zero dependência nova:** `react-native-svg` já é peer desde os ícones.
457
+ **No new dependency:** `react-native-svg` has been a peer since the icons.
490
458
 
491
- ### O escopo, declarado
459
+ ### The scope, stated
492
460
 
493
- | entra | fica de fora |
461
+ | in | out |
494
462
  |---|---|
495
- | `line`, `area`, `bar` (e misturar as três) | pizza/rosca · **dois eixos Y** (é o erro nº 1 de gráfico) · empilhado · animação · zoom |
463
+ | `line`, `area`, `bar` (and mixing the three) | pie/donut · **two Y axes** (the number one chart mistake) · stacked · animation · zoom |
496
464
 
497
- ### ⚠ A legenda NÃO desliga com duas ou mais séries
465
+ ### ⚠ The legend does NOT turn off with two or more series
498
466
 
499
- Não é conselho — é medição. A paleta `--chart-1..5` é **o mesmo azul do claro ao escuro**: uma
500
- rampa de magnitude, não um conjunto de identidade. Rodado o validador:
467
+ This is not advice — it is measurement. The `--chart-1..5` palette is **the same blue from light to dark**:
468
+ a magnitude ramp, not an identity set. Measured:
501
469
 
502
470
  ```
503
- os cinco, pares vizinhos ΔE 5.9 (visão normal) · 5.2 (daltonismo) FALHA
504
- --chart-2 + --chart-4 ΔE 13.7 · 10.6 passa no daltonismo
471
+ all five, neighbouring pairs ΔE 5.9 (normal vision) · 5.2 (colour blindness) FAIL
472
+ --chart-2 + --chart-4 ΔE 13.7 · 10.6 passes for colour blindness
505
473
  ```
506
474
 
507
- Por isso a ordem padrão de cores **pula um degrau** e começa pelo par medido. E por isso a legenda
508
- é obrigatória: num telefone a marca é mais fina que na web, e a cor sozinha não separa as séries
509
- desta rampa.
475
+ That is why the default colour order **skips a step** and starts with the measured pair. And that is why the
476
+ legend is required: on a phone the mark is thinner than on the web, and colour alone does not separate the
477
+ series of this ramp.
510
478
 
511
- ### ⚠ Não há tooltip — o toque seleciona
479
+ ### ⚠ There is no tooltip — touch selects
512
480
 
513
- A ficha da web diz que o tooltip *"segue o ponteiro e não é focável"*. **As duas metades caem no
514
- toque.** No lugar: cada rótulo é um alvo, e o nome dele carrega os valores —
515
- `"jan, Custo: 210, Meta: 200"`.
481
+ The web documentation says the tooltip *"follows the pointer and is not focusable"*. **Both halves fail
482
+ on touch.** Instead: each label is a target, and its name carries the values —
483
+ `"jan, Cost: 210, Target: 200"`.
516
484
 
517
- ### ⚠ A lista de valores é a camada de acessibilidade, e vem LIGADA
485
+ ### ⚠ The list of values is the accessibility layer, and it is ON
518
486
 
519
- A web delega a acessibilidade ao teclado do `recharts` (*"navegação por seta entre os pontos,
520
- ligada por padrão"*). **Não há motor e não há setas.** O que substitui é `showValues`: ao
521
- selecionar um ponto, os valores saem em texto. Desligue só se já resolveu o mesmo problema por
522
- outro caminho.
487
+ The web delegates accessibility to the `recharts` keyboard support (*"arrow navigation between the points,
488
+ on by default"*). **There is no engine and there are no arrows.** What replaces it is `showValues`: when a
489
+ point is selected, the values come out as text. Turn it off only if you have already solved the same problem
490
+ another way.
523
491
 
524
- ### O que mais é diferente
492
+ ### What else is different
525
493
 
526
494
  | | |
527
495
  |---|---|
528
- | `role="group"` | **não mapeia** — cai em `else -> null` no Android, como `dialog` (Lote 5) e `table` (Lote 6). Aqui é `accessible` + `accessibilityLabel`, que é o que agrupa de verdade |
529
- | altura | a web recusa uma prop de propósito (*"a caixa mede pelo CSS"*). **Aqui não há CSS**, então `height` existe — com o mesmo padrão de lá, 220 |
530
- | buraco na série | `null` **PULA**: não vira zero e não liga os vizinhos por cima. Ligar inventaria um dado que não existe |
531
- | a base da barra | o zero entra na régua sempre que os dados são positivos. **Barra que não nasce no zero mente sobre a proporção** |
496
+ | `role="group"` | **does not map** — it falls into `else -> null` on Android, like `dialog` and `table`. Here it is `accessible` + `accessibilityLabel`, which is what really groups |
497
+ | height | the web refuses a prop on purpose (*"the box is sized by the CSS"*). **Here there is no CSS**, so `height` exists — with the same default as there, 220 |
498
+ | gap in a series | `null` **SKIPS**: it does not become zero and does not join the neighbours across. Joining would invent data that does not exist |
499
+ | the base of the bar | zero is included in the ruler whenever the data is positive. **A bar that does not start at zero lies about proportion** |
532
500
 
533
- ⚠ **A régua do eixo Y divide o intervalo em partes iguais e não procura números redondos** — um
534
- eixo de 0 a 97 sai `0 · 24,25 · 48,5 · …`, não `0 · 25 · 50 · …`. Está registrado na ADR-0041
535
- **como melhoria, não como defeito**: o que existe é correto, só não é bonito.
501
+ ⚠ **The Y-axis ruler divides the range into equal parts and does not look for round numbers** — an
502
+ axis from 0 to 97 comes out `0 · 24.25 · 48.5 · …`, not `0 · 25 · 50 · …`. This is a known
503
+ **improvement to make, not a defect**: what exists is correct, just not pretty.
536
504
 
537
- ## Dados
505
+ ## Data
538
506
 
539
507
  ```tsx
540
508
  import {DataList, Table, Timeline} from "@aurea-uds/native";
541
509
  ```
542
510
 
543
- ### ⚠ A `Table` não é uma tabela aqui — e isso não é um recuo
511
+ ### ⚠ `Table` is not a table here — and that is not a step back
544
512
 
545
- Duas medições decidem o desenho, e elas apontam para o mesmo lugar:
513
+ Two measurements decide the design, and they point to the same place:
546
514
 
547
515
  | | |
548
516
  |---|---|
549
- | **o papel não mapeia** | `accessibilityRole` não tem `table`; o `role` tem, e cai em `else -> null` no Android e sem trait no iOS — a mesma armadilha que o Lote 5 mediu no `dialog`. **Uma grade de verdade não se anunciaria como tabela em plataforma nenhuma** |
550
- | **a grade não cabe** | `.table` tem `min-width: 720px` (aurea.css:1183). Num telefone de 360dp isso é rolagem horizontal de 2× — e a própria ficha da web só a aceita porque a região é focável pelo teclado. **No toque não há teclado**: sobra o arrastar, que a web já considerava a metade insuficiente |
517
+ | **the role does not map** | `accessibilityRole` has no `table`; `role` has it, and it falls into `else -> null` on Android and has no trait on iOS — the same trap as `dialog` (see **Confirm and notify**). **A real grid would announce itself as a table on no platform** |
518
+ | **the grid does not fit** | `.table` has `min-width: 720px` in `aurea.css`. On a 360dp phone that is 2× horizontal scrolling — and the web documentation itself only accepts it because the region is keyboard-focusable. **On touch there is no keyboard**: what is left is dragging, which the web already considered the insufficient half |
551
519
 
552
520
  ```
553
- manter a grade -> perde a leitura E não ganha a semântica
554
- virar lista -> ganha a leitura E ganha `accessibilityRole="list"`, que MAPEIA
521
+ keep the grid -> loses readability AND gains no semantics
522
+ become a list -> gains readability AND gains `accessibilityRole="list"`, which MAPS
555
523
  ```
556
524
 
557
- **Só a lista tem as duas.**
525
+ **Only the list has both.**
558
526
 
559
- ⚠ **O modo GRADE não foi construído**, de propósito: ele só faria sentido em tablet, e não há
560
- tablet medido. No nativo vale **demanda antes de cobertura** (o inverso da ADR-0015, que vale para
561
- a web) — meia-grade entregue seria pior que grade nenhuma. Ele volta como prop quando existir uma
562
- tela de tablet medida.
527
+ ⚠ **The GRID mode was not built**, on purpose: it would only make sense on a tablet, and no
528
+ tablet has been measured. On native, **demand comes before coverage** (the opposite of the rule for the
529
+ web) — a half-grid would be worse than no grid. It will come back as a prop when there is a measured
530
+ tablet screen.
563
531
 
564
532
  ### `Table`
565
533
 
566
534
  ```tsx
567
535
  <Table
568
- caption="Lançamentos"
536
+ caption="Entries"
569
537
  columns={[
570
- {key: "data", header: "Data", primary: true},
571
- {key: "km", header: "Quilometragem"},
572
- {key: "custo", header: "Custo", cell: (l) => moeda(l.custo)},
538
+ {key: "data", header: "Date", primary: true},
539
+ {key: "km", header: "Mileage"},
540
+ {key: "custo", header: "Cost", cell: (l) => moeda(l.custo)},
573
541
  ]}
574
542
  rows={lancamentos}
575
543
  keyExtractor={(l) => l.id}
576
544
  onRowPress={abrir} />
577
545
  ```
578
546
 
579
- ⚠ **A API é OUTRA que a da web, e tinha de ser.** Lá você escreve `<thead>`/`<tbody>` como
580
- `children`. Aqui não existem elementos de tabela para escrever, então a peça recebe **dados**.
581
- Não é a mesma prop com outro nome — é uma superfície diferente, dita aqui em vez de descoberta no
582
- erro de tipo.
547
+ ⚠ **The API is DIFFERENT from the web one, and it had to be.** There you write `<thead>`/`<tbody>` as
548
+ `children`. Here there are no table elements to write, so the component takes **data**.
549
+ It is not the same prop with another name — it is a different surface, stated here instead of discovered
550
+ through a type error.
583
551
 
584
- ⚠ **O cabeçalho não some: ele se muda.** Cada `header` passa a nomear a sua célula dentro do
585
- cartão. É o que impede o defeito clássico da tabela virada em lista — quatro números soltos, um
586
- embaixo do outro, sem dizer o que cada um é.
552
+ ⚠ **The header does not disappear: it moves.** Each `header` names its own cell inside the
553
+ card. That is what prevents the classic defect of a table turned into a list — four loose numbers, one
554
+ below the other, without saying what each one is.
587
555
 
588
- ⚠ **`primary` marca a coluna que identifica a linha** (numa lista de lançamentos, a data). Ela
589
- vira o título do cartão e **não repete o próprio nome**.
556
+ ⚠ **`primary` marks the column that identifies the row** (in a list of entries, the date). It
557
+ becomes the card title and **does not repeat its own name**.
590
558
 
591
- ⚠ **A linha só vira alvo com `onRowPress`.** Uma linha tocável sem ação seria anunciada como
592
- botão e não faria nada.
559
+ ⚠ **A row only becomes a target with `onRowPress`.** A tappable row with no action would be announced as a
560
+ button and do nothing.
593
561
 
594
- ### `Timeline` e `DataList`
562
+ ### `Timeline` and `DataList`
595
563
 
596
564
  ```tsx
597
- <Timeline items={[{title: "Criado", description: "pelo app", time: "08/09 14:20"}]} />
565
+ <Timeline items={[{title: "Created", description: "by the app", time: "08/09 14:20"}]} />
598
566
 
599
- // R-18 (0.15.0): ícone em moldura, cor por tom, valor à direita e o que houve entre dois itens.
567
+ // Since 0.15.0: icon in a frame, colour by tone, value on the right and what happened between two items.
600
568
  <Timeline items={[
601
- {title: "Pedido enviado", description: "28/09", icon: "truck", tone: "success",
602
- trailing: "R$ 216,00", between: "6 dias depois"},
603
- {title: "Pagamento", description: "22/09", icon: "storefront", tone: "primary",
569
+ {title: "Order shipped", description: "28/09", icon: "truck", tone: "success",
570
+ trailing: "R$ 216,00", between: "6 days later"},
571
+ {title: "Payment", description: "22/09", icon: "storefront", tone: "primary",
604
572
  trailing: "R$ 460,00"},
605
573
  ]} />
606
574
 
607
- <DataList items={[{term: "Quilometragem", value: "12,4 km/l"}]} />
575
+ <DataList items={[{term: "Mileage", value: "12,4 km/l"}]} />
608
576
  ```
609
577
 
610
- ⚠ **No `DataList`, cada par é UM nó acessível** com o nome `"termo: valor"`. Na web o `<dl>`
611
- garante o par de graça; aqui não há `<dl>` nem papel de lista de definição, então a ligação tem de
612
- ser dita. Sem isso, quem varre com o dedo ouve "Quilometragem", dá um passo, ouve "12,4 km/l" — e
613
- num painel de oito pares perde qual valor era de qual termo.
578
+ ⚠ **In `DataList`, each pair is ONE accessible node** named `"term: value"`. On the web, `<dl>`
579
+ guarantees the pair for free; here there is no `<dl>` and no definition-list role, so the link has to be
580
+ stated. Without it, someone swiping with a finger hears "Mileage", takes a step, hears "12,4 km/l" — and
581
+ on a panel of eight pairs loses which value belonged to which term.
614
582
 
615
- ⚠ **Ele empilha abaixo de 640dp, no mesmo ponto da web.** O comentário do CSS registra o defeito
616
- que a regra evita: a 320px a coluna do valor resolvia em **0px** e jogava o texto para fora da
617
- página. `layout="inline"` / `"stacked"` força, contra a largura.
583
+ ⚠ **It stacks below 640dp, at the same breakpoint as the web.** A comment in the CSS records the defect
584
+ the rule avoids: at 320px the value column resolved to **0px** and pushed the text off the
585
+ page. `layout="inline"` / `"stacked"` forces one, regardless of width.
618
586
 
619
- ⚠ **Basta um item com `icon` para a coluna inteira ter a largura da moldura** (40): os itens sem
620
- ícone ficam com o ponto, no centro dela, e a linha passa pelo centro das molduras. O `between` não
621
- aparece depois do último item, porque não há próximo.
587
+ ⚠ **One item with `icon` is enough for the whole column to take the frame's width** (40): items without
588
+ an icon keep the dot, centred in it, and the line goes through the centre of the frames. `between` does not
589
+ appear after the last item, because there is no next one.
622
590
 
623
- ⚠ **No `Timeline` a contagem e a posição NÃO são anunciadas**, e é escolha. Na web ele é um
624
- `<ol>`, e a ficha diz que o leitor anuncia "1 de 40" de graça; aqui esse "de graça" não existe e
625
- teria de ser escrito item a item. Pendurar isso em cada evento de um histórico é ruído a cada
626
- parada do leitor — e a ordem cronológica já está no `time`, que é a informação de verdade. **Quem
627
- precisa de posição precisa é da data.**
591
+ ⚠ **In `Timeline`, count and position are NOT announced**, and that is a choice. On the web it is an
592
+ `<ol>`, and its documentation says the screen reader announces "1 of 40" for free; here that "for free" does
593
+ not exist and would have to be written item by item. Attaching it to every event of a history is noise at
594
+ every stop of the reader — and the chronological order is already in `time`, which is the real information.
595
+ **Whoever needs position actually needs the date.**
628
596
 
629
- ### Lista longa: `virtualized`
597
+ ### Long list: `virtualized`
630
598
 
631
599
  ```tsx
632
- <Screen> {/* SEM `scroll` */}
600
+ <Screen> {/* NO `scroll` */}
633
601
  <Table … rows={mil} virtualized />
634
602
  </Screen>
635
603
  ```
636
604
 
637
- `virtualized` troca o `map` por um `FlatList`, que só monta o que está na tela. É a resposta à
638
- pendência que a [ADR-0038](../../decisions/0038-um-componente-por-icone-sobre-react-native-svg.md)
639
- deixou aberta em 31/08/2026 — *"o desempenho em lista longa volta a importar quando existir tela
640
- de lista"*. **Esta é a tela de lista.**
605
+ `virtualized` replaces the `map` with a `FlatList`, which only mounts what is on screen.
641
606
 
642
- ⚠ **Com `virtualized`, o componente É o rolador — não o ponha dentro de `<Screen scroll>`.** Dois
643
- roladores no mesmo eixo é erro conhecido do RN: o de fora dá altura infinita ao de dentro, a
644
- virtualização desliga, e o console avisa *"VirtualizedLists should never be nested inside plain
607
+ ⚠ **With `virtualized`, the component IS the scroller — do not put it inside `<Screen scroll>`.** Two
608
+ scrollers on the same axis is a known RN error: the outer one gives the inner one infinite height, the
609
+ virtualization turns off, and the console warns *"VirtualizedLists should never be nested inside plain
645
610
  ScrollViews"*.
646
611
 
647
- ⚠ **E o trilho do `Timeline` não é desenhado no modo virtualizado** — honestidade, não defeito.
648
- Ele é uma linha do topo ao pé da lista INTEIRA, e no `FlatList` a lista inteira não existe: só a
649
- janela. Desenhá-lo daria um trilho que começa e termina no lugar errado conforme se rola. Os
650
- pontos continuam.
612
+ ⚠ **And the `Timeline` rail is not drawn in virtualized mode** — honesty, not a defect.
613
+ It is a line from the top to the bottom of the WHOLE list, and in a `FlatList` the whole list does not exist:
614
+ only the window. Drawing it would give a rail that starts and ends in the wrong place as you scroll. The
615
+ dots remain.
651
616
 
652
- ## Confirmar e avisar
617
+ ## Confirm and notify
653
618
 
654
619
  ```tsx
655
620
  import {BottomSheet, ConfirmDialog, Dialog, Drawer, ToastHost, useToast} from "@aurea-uds/native";
656
621
  ```
657
622
 
658
- ### ⚠ Primeiro, o que NÃO funciona — e passa em tudo
623
+ ### ⚠ First, what does NOT work — and passes everything
659
624
 
660
- O React Native aceita `role="dialog"` e `role="alertdialog"`. Eles estão no tipo, compilam, e
661
- atravessam o C++ do Fabric. **E não fazem nada no aparelho.** Medido em 08/09/2026, nas duas
662
- pontas, no fonte do `react-native@0.87.1`:
625
+ React Native accepts `role="dialog"` and `role="alertdialog"`. They are in the type, they compile, and
626
+ they go through Fabric's C++. **And they do nothing on the device.** Measured on both platforms, in the
627
+ `react-native@0.87.1` source:
663
628
 
664
- | plataforma | onde morre |
629
+ | platform | where it dies |
665
630
  |---|---|
666
- | Android | `ReactAccessibilityDelegate.kt:515`, `fromRole()` cai em `else -> null` — com o comentário do próprio RN: *"No mapping from ARIA role to AccessibilityRole"* |
667
- | iOS | a lista de traits (`accessibilityPropsConversions.h:24-104`) **não tem** `dialog` nem `alertdialog`; a string de `role` só desempata `checkbox` e `radio` |
631
+ | Android | `ReactAccessibilityDelegate.kt:515`, `fromRole()` falls into `else -> null` — with RN's own comment: *"No mapping from ARIA role to AccessibilityRole"* |
632
+ | iOS | the trait list (`accessibilityPropsConversions.h:24-104`) **has neither** `dialog` nor `alertdialog`; the `role` string only disambiguates `checkbox` and `radio` |
668
633
 
669
- **Isto é pior do que o papel não existir.** Um componente que os usasse passaria na revisão de
670
- código, passaria no `tsc`, passaria em qualquer teste que perguntasse "a prop está lá?" — e seria
671
- inútil para quem usa leitor de tela. Há um teste neste repositório cujo único trabalho é reprovar
672
- essas duas palavras.
634
+ **This is worse than the role not existing.** A component that used them would pass code review, pass
635
+ `tsc`, pass any test that asked "is the prop there?" — and be useless to people who use a screen reader.
636
+ There is a test in this repository whose only job is to reject those two words.
673
637
 
674
- **O que a Aurea faz em vez disso:**
638
+ **What Aurea does instead:**
675
639
 
676
- | a web | aqui |
640
+ | the web | here |
677
641
  |---|---|
678
- | `role="dialog"` + foco preso | o **`Modal`** do RN. Ele é uma **janela do sistema**, e tanto o TalkBack quanto o VoiceOver já se limitam à janela de cima — o confinamento vem do sistema operacional, não de um laço de `Tab` em JavaScript |
679
- | `Escape` fecha | **`onRequestClose`** — o botão VOLTAR do Android. O RN documenta a prop como obrigatória; sem ela a caixa fica **presa** |
680
- | `aria-labelledby` | o título é um `Text` com `accessibilityRole="header"` — o único papel desta família que o Android mapeia |
681
- | `aria-describedby` | não existe. A frase é lida por **estar na ordem**, e é por isso que ela vem antes dos botões na árvore |
682
- | `backdrop-filter: blur(5px)` | **não atravessa.** Não há filtro de fundo no RN, e o que existe (`expo-blur`) é dependência nova. O `--overlay` já é preto a 74% e separa sozinho |
642
+ | `role="dialog"` + trapped focus | RN's **`Modal`**. It is a **system window**, and both TalkBack and VoiceOver already limit themselves to the top window — the confinement comes from the operating system, not from a `Tab` loop in JavaScript |
643
+ | `Escape` closes | **`onRequestClose`** — the Android BACK button. RN documents the prop as required; without it the box gets **stuck** |
644
+ | `aria-labelledby` | the title is a `Text` with `accessibilityRole="header"` — the only role in this family that Android maps |
645
+ | `aria-describedby` | does not exist. The sentence is read because it is **in order**, which is why it comes before the buttons in the tree |
646
+ | `backdrop-filter: blur(5px)` | **does not carry over.** There is no backdrop filter in RN, and what exists (`expo-blur`) is a new dependency. `--overlay` is already black at 74% and separates on its own |
683
647
 
684
- ### `Dialog` e `ConfirmDialog`
648
+ ### `Dialog` and `ConfirmDialog`
685
649
 
686
650
  ```tsx
687
- <Dialog open={aberto} title="Editar lançamento" onClose={fechar}
688
- footer={<><Button appearance="outline" onPress={fechar}>Cancelar</Button>
689
- <Button onPress={salvar}>Salvar</Button></>}>
690
- <Field label="Quilometragem"><Input value={km} onChangeText={setKm} /></Field>
651
+ <Dialog open={aberto} title="Edit entry" onClose={fechar}
652
+ footer={<><Button appearance="outline" onPress={fechar}>Cancel</Button>
653
+ <Button onPress={salvar}>Save</Button></>}>
654
+ <Field label="Mileage"><Input value={km} onChangeText={setKm} /></Field>
691
655
  </Dialog>
692
656
 
693
657
  <ConfirmDialog open={perguntando} destructive
694
- title="Apagar este lançamento?"
695
- description="Ele sai do histórico e do custo/km. Isto não volta."
696
- confirmLabel="Apagar" onConfirm={apagar} onCancel={desistir} />
658
+ title="Delete this entry?"
659
+ description="It leaves the history and the cost per km. This cannot be undone."
660
+ confirmLabel="Delete" onConfirm={apagar} onCancel={desistir} />
697
661
  ```
698
662
 
699
- ⚠ **O `ConfirmDialog` NÃO é um `Dialog` com dois botões.** A diferença é de comportamento e ela
700
- atravessou inteira da web: **tocar fora não fecha.** Um toque fora virando "cancelei" é o acidente
701
- que o componente existe para impedir.
663
+ ⚠ **`ConfirmDialog` is NOT a `Dialog` with two buttons.** The difference is behaviour, and it
664
+ carried over whole from the web: **tapping outside does not close it.** A tap outside turning into "I
665
+ cancelled" is the accident the component exists to prevent.
702
666
 
703
- ⚠ **O que não atravessou, e é honesto dizer:** na web o foco nasce no botão seguro, porque quem
704
- abre um "isto apaga" e aperta Enter por reflexo tem de cancelar. **No toque não há esse reflexo** —
705
- não há foco de teclado nem Enter. Mover o foco do *leitor de tela* para o Cancelar traduziria o
706
- mecanismo e perderia a intenção: pularia justamente a frase que diz o que se perde. Então o foco
707
- não é movido, e o que sobra é o que vale aqui: o fundo não fecha, e a **ordem** é cancelar →
708
- confirmar.
667
+ ⚠ **What did not carry over, and it is fair to say so:** on the web, focus starts on the safe button,
668
+ because someone who opens a "this deletes" and presses Enter by reflex has to cancel. **On touch there is no
669
+ such reflex** — there is no keyboard focus and no Enter. Moving the *screen reader* focus to Cancel would
670
+ translate the mechanism and lose the intent: it would skip exactly the sentence that says what is lost. So
671
+ focus is not moved, and what remains is what matters here: the backdrop does not close it, and the **order**
672
+ is cancel → confirm.
709
673
 
710
- ⚠ **`description` é obrigatória**, e diz o que se perde e se volta.
674
+ ⚠ **`description` is required**, and says what is lost and whether it comes back.
711
675
 
712
676
  ### `Drawer`
713
677
 
714
678
  ```tsx
715
- <Drawer open={aberto} title="Filtros" side="right" onClose={fechar}>…</Drawer>
679
+ <Drawer open={aberto} title="Filters" side="right" onClose={fechar}>…</Drawer>
716
680
  ```
717
681
 
718
- ⚠ **O lado é FÍSICO, não lógico.** A razão vem da ficha da web e vale igual: um painel preso à
719
- direção da escrita mudaria de lado ao trocar o idioma, e um painel de navegação não deve andar.
682
+ ⚠ **The side is PHYSICAL, not logical.** The reason comes from the web documentation and applies the
683
+ same: a panel tied to the writing direction would switch sides when the language changes, and a navigation
684
+ panel should not move.
720
685
 
721
- ⚠ **A animação é nossa, e a do `Modal` fica desligada** — o `animationType="slide"` do RN sobe de
722
- **baixo**, sempre. Deixá-lo ligado faria o painel lateral entrar pelo chão.
686
+ ⚠ **The animation is ours, and the `Modal` one is turned off** — RN's `animationType="slide"` comes up from
687
+ the **bottom**, always. Leaving it on would make the side panel enter through the floor.
723
688
 
724
- ### `BottomSheet` — o único sem ficha na web
689
+ ### `BottomSheet` — the only one without a web counterpart
725
690
 
726
691
  ```tsx
727
- <BottomSheet open={aberto} title="Novo lançamento" onClose={fechar}>…</BottomSheet>
692
+ <BottomSheet open={aberto} title="New entry" onClose={fechar}>…</BottomSheet>
728
693
  ```
729
694
 
730
- ⚠ **Ele responde ao mesmo problema que a caixa centralizada, e responde diferente porque a mão é
731
- diferente:** num telefone segurado numa mão só, o alto da tela é o lugar mais difícil de alcançar.
732
- A caixa centralizada põe as escolhas exatamente lá; a folha põe onde o polegar está.
695
+ ⚠ **It answers the same problem as the centred dialog, and answers differently because the hand is
696
+ different:** on a phone held in one hand, the top of the screen is the hardest place to reach.
697
+ The centred dialog puts the choices exactly there; the sheet puts them where the thumb is.
733
698
 
734
- ⚠ **O arrastar é `PanResponder`, que é do próprio React Native — não é dependência nova.** Foi
735
- escolha deliberada contra `@gorhom/bottom-sheet`, que arrastaria **duas** peças novas
736
- (`gesture-handler` + `reanimated`) para um gesto de um eixo.
699
+ ⚠ **Dragging is `PanResponder`, which is part of React Native itself — not a new dependency.** This was
700
+ a deliberate choice over a bottom-sheet library that would bring **two** new pieces
701
+ (`gesture-handler` + `reanimated`) for a one-axis gesture.
737
702
 
738
- **O que a escolha compra e o que custa, dito em vez de escondido:** compra zero dependência e um
739
- componente que roda no Expo Go. Custa o gesto rodar na ponte de JS, não na thread de UI — numa
740
- lista longa dentro da folha, arrastar pode engasgar. Se isso aparecer em aparelho, a troca é uma
741
- ADR, não um remendo.
703
+ **What the choice buys and what it costs, stated instead of hidden:** it buys zero dependencies and a
704
+ component that runs in Expo Go. It costs the gesture running on the JS bridge, not on the UI thread — with a
705
+ long list inside the sheet, dragging may stutter. If that shows up on a device, the switch will be a
706
+ deliberate decision, not a patch.
742
707
 
743
- ⚠ **Soltar no meio do caminho VOLTA**, não fecha: só passa quem arrastou mais de um terço da
744
- altura, ou deu um lance rápido. Fechar cedo demais transforma um toque trêmulo em perda de dado.
708
+ ⚠ **Releasing halfway SNAPS BACK**, it does not close: it only goes through if you dragged more than a third
709
+ of the height, or flicked quickly. Closing too early turns a shaky tap into lost data.
745
710
 
746
- ### `useToast` — e por que o hospedeiro é explícito
711
+ ### `useToast` — and why the host is explicit
747
712
 
748
713
  ```tsx
749
714
  <AureaProvider>
@@ -752,38 +717,38 @@ altura, ou deu um lance rápido. Fechar cedo demais transforma um toque trêmulo
752
717
  </ToastHost>
753
718
  </AureaProvider>
754
719
 
755
- // em qualquer lugar dentro:
720
+ // anywhere inside:
756
721
  const {add} = useToast();
757
- add({title: "Lançamento salvo", type: "success"});
722
+ add({title: "Entry saved", type: "success"});
758
723
  ```
759
724
 
760
- ⚠ **Não há portal no React Native.** Na web o `AureaProvider` pendura a pilha no fim do `<body>` e
761
- o app não precisa saber. Aqui um componente só desenha onde está na árvore.
725
+ ⚠ **There is no portal in React Native.** On the web, `AureaProvider` hangs the stack at the end of `<body>`
726
+ and the app does not need to know. Here a component only draws where it is in the tree.
762
727
 
763
- ⚠ **A saída óbvia seria o `AureaProvider` desenhar a pilha, e ela está errada.** Medido: hoje ele
764
- devolve **só contextos**, nenhum `View`. Pôr um `View` lá mudaria o layout de **todo app que já
765
- usa a Aurea**, em silêncio — um contêiner novo entre a raiz e o primeiro filho é exatamente o que
766
- quebra um `flex: 1` e aparece como *"por que minha tela encolheu?"* três dias depois.
728
+ ⚠ **The obvious way out would be for `AureaProvider` to draw the stack, and it is wrong.** Measured: today it
729
+ returns **only contexts**, no `View`. Putting a `View` there would change the layout of **every app that
730
+ already uses Aurea**, silently — a new container between the root and the first child is exactly what
731
+ breaks a `flex: 1` and shows up as *"why did my screen shrink?"* three days later.
767
732
 
768
- Então o hospedeiro é próprio e está à vista. Quem não chama `useToast` não põe o `ToastHost`, não
769
- paga o `View`, e nada muda.
733
+ So the host is its own component and in plain sight. If you do not call `useToast`, you do not add
734
+ `ToastHost`, you do not pay for the `View`, and nothing changes.
770
735
 
771
- ⚠ **`useToast()` sem hospedeiro LEVANTA**, com a frase que diz o que fazer. Devolver um `add()`
772
- mudo seria o defeito mais caro possível: o aviso de "salvo" que nunca aparece não quebra nada, não
773
- levanta, e some no meio de um fluxo que parecia certo.
736
+ ⚠ **`useToast()` without a host THROWS**, with a message that says what to do. Returning a silent `add()`
737
+ would be the most expensive defect possible: the "saved" notice that never appears breaks nothing, does not
738
+ throw, and vanishes in the middle of a flow that looked right.
774
739
 
775
- ⚠ **`duration: 0` nunca fecha sozinho, e é o que um aviso com `action` tem de usar.** Um botão
776
- "Desfazer" que foge da mão em cinco segundos é um botão que não existe para quem lê devagar, para
777
- quem usa leitor de tela, ou para quem só olhou para o lado.
740
+ ⚠ **`duration: 0` never closes on its own, and it is what a toast with `action` must use.** An
741
+ "Undo" button that slips away in five seconds is a button that does not exist for someone who reads slowly,
742
+ for someone who uses a screen reader, or for someone who just looked away.
778
743
 
779
- ⚠ **`offset` existe por causa da `BottomNav`:** sem ele o aviso nasce em cima da barra e tapa
780
- justamente o que a pessoa ia tocar. O respiro da barra de gestos é `Math.max`, **não soma** — a
781
- mesma conta do Lote 3.
744
+ ⚠ **`offset` exists because of `BottomNav`:** without it the toast appears on top of the bar and covers
745
+ exactly what the person was about to tap. The gesture bar spacing is `Math.max`, **not a sum** — the
746
+ same calculation as `BottomNav`.
782
747
 
783
- ⚠ **Tempo não é movimento:** com «remover animações» ligado o aviso não desliza, mas o relógio
784
- continua. Quem pediu menos movimento não pediu que o aviso ficasse para sempre.
748
+ ⚠ **Time is not motion:** with «remove animations» on, the toast does not slide, but the clock
749
+ keeps running. Someone who asked for less motion did not ask for the toast to stay forever.
785
750
 
786
- ## A moldura
751
+ ## The frame
787
752
 
788
753
  ```tsx
789
754
  <Screen padded={false} scroll onRefresh={buscar} refreshing={carregando}>
@@ -793,33 +758,33 @@ continua. Quem pediu menos movimento não pediu que o aviso ficasse para sempre.
793
758
  <BottomNav
794
759
  current={aba}
795
760
  items={[
796
- {id: "painel", label: "Painel", icon: "squares-four", onPress: () => ir("painel")},
797
- {id: "avisos", label: "Avisos", icon: "bell", badge: 8, onPress: () => ir("avisos")},
761
+ {id: "painel", label: "Dashboard", icon: "squares-four", onPress: () => ir("painel")},
762
+ {id: "avisos", label: "Alerts", icon: "bell", badge: 8, onPress: () => ir("avisos")},
798
763
  ]} />
799
764
  ```
800
765
 
801
- ⚠ **A Aurea não entrega roteamento.** Estes componentes recebem `items` e `current` e avisam por
802
- `onPress`. Quem troca de tela é o app.
766
+ ⚠ **Aurea does not provide routing.** These components take `items` and `current` and report through
767
+ `onPress`. The app is what changes screens.
803
768
 
804
- ⚠ **O `BottomNav` não é `Tabs`, e não é distração de nomenclatura:** uma aba troca um painel
805
- *desta* tela; a barra troca de tela. Por isso os itens são `link` e não `tab` — dar `tablist` a um
806
- menu faz o leitor de tela prometer setas que não levam a lugar nenhum.
769
+ ⚠ **`BottomNav` is not `Tabs`, and this is not a naming detail:** a tab switches a panel of
770
+ *this* screen; the bar switches screens. That is why the items are `link` and not `tab` — giving `tablist`
771
+ to a menu makes the screen reader promise arrow keys that lead nowhere.
807
772
 
808
- ⚠ **Ele respeita a barra de gestos sozinho**, pelo máximo entre o respiro do tema e o inset do
809
- sistema.
773
+ ⚠ **It respects the gesture bar on its own**, using the larger of the theme spacing and the system
774
+ inset.
810
775
 
811
- ⚠ **O `Topbar` não gruda sozinho** — `position: sticky` não existe no RN. A barra fica parada
812
- porque a tela a põe **fora** do `ScrollView`, como no exemplo acima.
776
+ ⚠ **`Topbar` does not stick on its own** — `position: sticky` does not exist in RN. The bar stays put
777
+ because the screen places it **outside** the `ScrollView`, as in the example above.
813
778
 
814
- ### Puxar para atualizar
779
+ ### Pull to refresh
815
780
 
816
- `onRefresh` + `refreshing` no `Screen`, e só com `scroll` — não há o que puxar numa tela que não
817
- rola. `refreshing` é do app: o componente não adivinha quando a busca terminou.
781
+ `onRefresh` + `refreshing` on the `Screen`, and only with `scroll` — there is nothing to pull on a screen that
782
+ does not scroll. `refreshing` belongs to the app: the component does not guess when the fetch has finished.
818
783
 
819
- ## Frases
784
+ ## Strings
820
785
 
821
- `Alert`, `Status`, `EmptyState` e `DataState` falam sozinhos: os sete estados universais, o vazio,
822
- o erro, o rótulo do `Spinner`. O padrão é **inglês**, como na web.
786
+ `Alert`, `Status`, `EmptyState` and `DataState` speak on their own: the seven universal states, the empty
787
+ state, the error, the `Spinner` label. The default is **English**, as on the web.
823
788
 
824
789
  ```tsx
825
790
  import {AureaProvider, ptBR} from "@aurea-uds/native";
@@ -827,68 +792,66 @@ import {AureaProvider, ptBR} from "@aurea-uds/native";
827
792
  <AureaProvider strings={ptBR}>…</AureaProvider>
828
793
  ```
829
794
 
830
- A tabela tem **quatro chaves**, contra as mais de 200 do `@aurea-uds/react` — ela é do tamanho do
831
- que o alvo nativo desenha, e cada chave nova nasce com um componente que a usa. `useAureaStrings()`
832
- lê o que estiver valendo.
795
+ The table has **far fewer keys** than the one in `@aurea-uds/react` — it is the size of what the
796
+ native target draws, and each new key is born with a component that uses it. `useAureaStrings()`
797
+ reads whatever is in effect.
833
798
 
834
- ## Movimento
799
+ ## Motion
835
800
 
836
801
  ```tsx
837
- const reduzir = useReduceMotion(); // true · false · null (ainda não se sabe)
802
+ const reduzir = useReduceMotion(); // true · false · null (not known yet)
838
803
  ```
839
804
 
840
- ⚠ **Na web isso é de graça e aqui não é.** O `aurea.css` tem uma regra global de
841
- `prefers-reduced-motion` que zera toda animação; **o React Native não tem cascata**, então quem
842
- anima pergunta. O `Spinner` e o `Skeleton` já perguntam — este hook é para o seu código fazer o
843
- mesmo.
805
+ ⚠ **On the web this comes for free, and here it does not.** `aurea.css` has a global
806
+ `prefers-reduced-motion` rule that zeroes every animation; **React Native has no cascade**, so whoever
807
+ animates has to ask. `Spinner` and `Skeleton` already ask — this hook is for your code to do the
808
+ same.
844
809
 
845
- O `null` é a resposta honesta enquanto o sistema não respondeu: a leitura é assíncrona, e começar
846
- em `false` tocaria um quadro de animação na cara de quem pediu que não tocasse. Quem anima escreve
810
+ `null` is the honest answer while the system has not answered: the read is asynchronous, and starting
811
+ at `false` would play an animation frame in the face of someone who asked for none. If you animate, write
847
812
  `if (reduzir !== false) return;`.
848
813
 
849
- ## O painel de leitura
814
+ ## The reading panel
850
815
 
851
816
  ```tsx
852
817
  <DataState state={carregando ? "loading" : erro ? "error" : vazio ? "empty" : undefined}>
853
818
  {() => (
854
819
  <Stack>
855
- <KPI label="Custo por km" value="R$ 1,20" trend="+3% no mês" />
856
- <Progress value={score} label="Saúde" />
857
- <Status variant="online">Sincronizado</Status>
820
+ <KPI label="Cost per km" value="R$ 1,20" trend="+3% this month" />
821
+ <Progress value={score} label="Health" />
822
+ <Status variant="online">Synced</Status>
858
823
  </Stack>
859
824
  )}
860
825
  </DataState>
861
826
  ```
862
827
 
863
- ⚠ **Os sete estados universais ACOMPANHAM o conteúdo**, não o substituem: `stale`, `partial` e
864
- `offline` dizem que o dado está aí e tem ressalva. Só `loading`, `error` e `empty` tomam o lugar.
828
+ ⚠ **The seven universal states ACCOMPANY the content**, they do not replace it: `stale`, `partial` and
829
+ `offline` say the data is there with a caveat. Only `loading`, `error` and `empty` take its place.
865
830
 
866
- ⚠ **`children` como FUNÇÃO** existe para o conteúdo caro não ser construído atrás de um esqueleto.
831
+ ⚠ **`children` as a FUNCTION** exists so expensive content is not built behind a skeleton.
867
832
 
868
- ⚠ **O `Alert` precisa dos glifos de variante no registro** (`info`,
869
- `check-circle`, `warning`, `x-circle`). Este pacote não os importa por
870
- você — seria trazer ícone ao grafo do bundler pelas suas costas (ADR-0038, cláusula 4).
833
+ ⚠ **`Alert` needs the variant glyphs in the registry** (`info`,
834
+ `check-circle`, `warning`, `x-circle`). This package does not import them for
835
+ you — that would bring icons into the bundler graph behind your back.
871
836
 
872
- ### O selo ancorado, e o rótulo que ele exige
837
+ ### The anchored badge, and the label it requires
873
838
 
874
839
  ```tsx
875
840
  <Badge count={8} anchor="top-end">
876
- <IconButton name="bell" label="Avisos, 8 não lidos" onPress={abrir} />
841
+ <IconButton name="bell" label="Alerts, 8 unread" onPress={abrir} />
877
842
  </Badge>
878
843
  ```
879
844
 
880
- ⚠ **Ancorado, o número some da árvore de acessibilidade** — quem carrega a informação é o rótulo
881
- de quem foi decorado. Sem isso o leitor de tela anuncia *"sino, 8"* e ninguém sabe o que é o 8.
845
+ ⚠ **When anchored, the number leaves the accessibility tree** — the information is carried by the label
846
+ of what was decorated. Without it the screen reader announces *"bell, 8"* and nobody knows what the 8 is.
882
847
 
883
- ## Ícones
848
+ ## Icons
884
849
 
885
- Um componente por ícone e por peso, gerado do SVG do `@phosphor-icons/core` sobre
886
- `react-native-svg` ([ADR-0038](../../decisions/0038-um-componente-por-icone-sobre-react-native-svg.md),
887
- [ADR-0053](../../decisions/0053-a-fonte-e-a-atkinson-e-os-icones-sao-o-phosphor.md)). Cada ícone tem
888
- duas formas: a regular (`icons/house`) e a cheia (`icons/house-fill`), que é a do item escolhido e
889
- a dos avisos.
850
+ One component per icon and per weight, generated from the `@phosphor-icons/core` SVG on top of
851
+ `react-native-svg`. Each icon has two shapes: the regular one (`icons/house`) and the filled one
852
+ (`icons/house-fill`), which is used for the selected item and for notices.
890
853
 
891
- **A forma documentada é o caminho profundo:**
854
+ **The documented form is the deep path:**
892
855
 
893
856
  ```tsx
894
857
  import Plus from "@aurea-uds/native/icons/plus";
@@ -897,28 +860,27 @@ import CaretDown from "@aurea-uds/native/icons/caret-down";
897
860
  <Plus size={size.iconMd} color={color.foreground} />
898
861
  ```
899
862
 
900
- Importar 40 ícones carrega 40. **O barril (`@aurea-uds/native/icons`) existe, mas não é a forma
901
- documentada:** ele traz todos os ícones ao grafo do bundler a menos que o tree-shaking do Metro
902
- — experimental, três flags, só em produção — esteja ligado. O caminho profundo não depende de
903
- poda nenhuma: módulo que não é importado não entra no grafo.
863
+ Importing 40 icons loads 40. **The barrel (`@aurea-uds/native/icons`) exists, but it is not the documented
864
+ form:** it brings every icon into the bundler graph unless Metro's tree-shaking
865
+ — experimental, three flags, production only — is on. The deep path does not depend on any
866
+ tree-shaking: a module that is not imported does not enter the graph.
904
867
 
905
- `color` **não herda**: `currentColor` não existe no React Native, e o desenho do Phosphor pinta com
906
- `currentColor`. O padrão é preto explícito — passe a cor do tema.
868
+ `color` **is not inherited**: `currentColor` does not exist in React Native, and the Phosphor drawing paints
869
+ with `currentColor`. The default is explicit black — pass the theme colour.
907
870
 
908
- **A forma cheia entra no registro com o sufixo `-fill`**, como o arquivo:
909
- `criarRegistroDeIcones({house: House, "house-fill": HouseFill})`. Os componentes pedem a cheia no
910
- item escolhido (`BottomNav`), nos avisos (`Alert`, `Toast`) e no `ThemeToggle`; se ela não estiver
911
- no registro, sai a regular.
871
+ **The filled shape goes into the registry with the `-fill` suffix**, like the file:
872
+ `criarRegistroDeIcones({house: House, "house-fill": HouseFill})`. Components ask for the filled one on the
873
+ selected item (`BottomNav`), on notices (`Alert`, `Toast`) and on `ThemeToggle`; if it is not in the
874
+ registry, the regular one is used.
912
875
 
913
- **Vindo do Carbon:** os nomes mudaram todos. A tabela `@aurea-uds/icons/carbon-para-phosphor.json`
914
- traz os nomes antigos com os novos.
876
+ **Coming from the icons used until `0.12.4`:** every name changed. The table
877
+ `@aurea-uds/icons/carbon-para-phosphor.json` maps the old names to the new ones.
915
878
 
916
- Os nomes são **os mesmos do sprite da web**, e um gate cobra isso (check 38): o que `<Icon name>`
917
- desenha lá, `icons/<nome>` desenha aqui.
879
+ The names are **the same as in the web sprite**: what `<Icon name>` draws there, `icons/<name>` draws here.
918
880
 
919
- **Um glifo próprio** (o logotipo do app) sai de `criarGlifo`, sem o app importar o
920
- `react-native-svg`: retângulos, círculos e caminhos, preenchidos ou a traço. A tinta usa os nomes
921
- do SVG, e `"currentColor"` é a cor do `Icon`:
881
+ **A custom glyph** (the app logo) comes from `criarGlifo`, without the app importing
882
+ `react-native-svg`: rectangles, circles and paths, filled or stroked. The paint uses the SVG names,
883
+ and `"currentColor"` is the `Icon` colour:
922
884
 
923
885
  ```tsx
924
886
  const Logo = criarGlifo({fill: "none", stroke: "currentColor", strokeWidth: 2,
@@ -926,9 +888,9 @@ const Logo = criarGlifo({fill: "none", stroke: "currentColor", strokeWidth: 2,
926
888
  const ICONES = criarRegistroDeIcones({...OS_DO_APP, logo: Logo});
927
889
  ```
928
890
 
929
- **O nome é checado pelo TypeScript** (desde a A-04): `<Icon name="chevron-down">`, com um traço
930
- só, não compila, e a chave do registro também é conferida. Um glifo próprio entra declarando o
931
- nome **uma vez**:
891
+ **The name is checked by TypeScript**: `<Icon name="chevron-down">`, with a single hyphen, does not
892
+ compile, and the registry key is checked too. A custom glyph is added by declaring its name
893
+ **once**:
932
894
 
933
895
  ```tsx
934
896
  declare module "@aurea-uds/native" {
@@ -936,24 +898,23 @@ declare module "@aurea-uds/native" {
936
898
  }
937
899
  ```
938
900
 
939
- ## O que este pacote não faz
901
+ ## What this package does not do
940
902
 
941
- - **Não promete paridade** com a web. O React Native não tem `<p>`, cascata de tipografia,
942
- `<input type=file>` nem hover — a lista do nativo é **outra**, não a mesma com menos itens.
943
- - **Não entrega roteamento.** `expo-router`/`react-navigation` é escolha do app.
944
- - **Não força framework.** Expo não é peer: o pacote é biblioteca.
903
+ - **It does not promise parity** with the web. React Native has no `<p>`, no type cascade,
904
+ no `<input type=file>` and no hover — the native list is **its own**, not the same one with fewer items.
905
+ - **It does not provide routing.** `expo-router`/`react-navigation` is the app's choice.
906
+ - **It does not force a framework.** Expo is not a peer: the package is a library.
945
907
 
946
- ## Cor: um limite da plataforma, declarado
908
+ ## Colour: a platform limit, stated
947
909
 
948
- As cores saem em **hex**, e não por escolha nossa. O interpretador de cor do React Native
949
- **recusa** `oklch()`, `lab()`, `color(display-p3 …)` e até `color(srgb …)` — medido nas versões
950
- 0.81.5 e 0.87.0, e é JavaScript compartilhado entre iOS e Android. Passar gamute largo a um
951
- `style` faz a cor ser **descartada em silêncio**.
910
+ Colours come out in **hex**, and not by our choice. React Native's colour parser
911
+ **rejects** `oklch()`, `lab()`, `color(display-p3 …)` and even `color(srgb …)` — measured on versions
912
+ 0.81.5 and 0.87.0, and it is JavaScript shared between iOS and Android. Passing a wide gamut to a
913
+ `style` makes the colour **silently discarded**.
952
914
 
953
- Consequência: em tela de gamute largo o amarelo da marca perde **ΔEok 0,0225**, que cai em cima do
954
- limiar do perceptível. Não é evitável hoje — é teto de plataforma, e está registrado na
955
- [ADR-0027](../../decisions/0027-a-cor-no-alvo-nativo.md).
915
+ Consequence: on a wide-gamut screen the brand yellow loses **ΔEok 0.0225**, which sits right on the
916
+ threshold of what is perceptible. It cannot be avoided today — it is a platform ceiling.
956
917
 
957
- ## Licença
918
+ ## License
958
919
 
959
- Apache-2.0. Os glifos são do `@phosphor-icons/core` (Phosphor Icons, MIT) — ver `NOTICE`.
920
+ Apache-2.0. The glyphs are from `@phosphor-icons/core` (Phosphor Icons, MIT) — see `NOTICE`.