@aurea-uds/native 0.42.0 → 0.44.0
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/dist/actions.d.ts +1 -1
- package/dist/actions.js +3 -1
- package/dist/busca.js +9 -5
- package/dist/chart.js +2 -2
- package/dist/data.js +7 -4
- package/dist/escolha.js +3 -3
- package/dist/estilos.d.ts +27 -1
- package/dist/estilos.js +48 -23
- package/dist/exibicao.js +4 -1
- package/dist/inputs.d.ts +1 -1
- package/dist/inputs.js +47 -35
- package/dist/layout.js +6 -2
- package/dist/menu.js +4 -2
- package/dist/midia.js +11 -8
- package/dist/navigation.d.ts +5 -0
- package/dist/navigation.js +34 -14
- package/dist/screen.d.ts +7 -6
- package/dist/screen.js +27 -5
- package/dist/sistema.d.ts +1 -1
- package/dist/sistema.js +11 -4
- package/dist/strings.d.ts +4 -0
- package/dist/strings.js +4 -0
- package/dist/text.js +11 -6
- package/package.json +2 -2
package/dist/actions.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export interface LinkButtonProps extends Omit<ButtonProps, "appearance" | "fullW
|
|
|
68
68
|
}
|
|
69
69
|
/** Botão-texto sem recuo nem caixa, alinhado com o texto em volta. O `LinkButton` da referência. */
|
|
70
70
|
export declare function LinkButton(props: LinkButtonProps): React.JSX.Element;
|
|
71
|
-
export interface IconButtonProps extends Omit<ButtonProps, "children" | "leadingIcon" | "trailingIcon" | "fullWidth"> {
|
|
71
|
+
export interface IconButtonProps extends Omit<ButtonProps, "children" | "leadingIcon" | "trailingIcon" | "leading" | "trailing" | "fullWidth"> {
|
|
72
72
|
name: AureaIcon;
|
|
73
73
|
/** **Obrigatório**: um botão que só tem glifo não tem texto para o leitor de tela anunciar. */
|
|
74
74
|
label: string;
|
package/dist/actions.js
CHANGED
|
@@ -292,7 +292,9 @@ export function folgaDoToque(t, size = "md") {
|
|
|
292
292
|
}
|
|
293
293
|
/** O corpo do `IconButton`. A cor própria do ícone (`corDoIcone`) é só do `ThemeToggle`: o
|
|
294
294
|
* `IconButton` público não tem cor solta, e dentro do cartão da marca ela não vale (a tinta vence). */
|
|
295
|
-
function BotaoDeIcone({ name, label, appearance = "ghost", tone = "neutral", size = "md", icons, pressed, disabled, corDoIcone, pesoDoIcone, share, onPress, ...
|
|
295
|
+
function BotaoDeIcone({ name, label, appearance = "ghost", tone = "neutral", size = "md", icons, pressed, disabled, corDoIcone, pesoDoIcone, share, onPress, ...comSobras }) {
|
|
296
|
+
// Quem chama de JavaScript, sem o tipo, ainda pode mandar `leading`/`trailing`: elas não descem ao `Pressable`.
|
|
297
|
+
const { leading: _antes, trailing: _depois, ...rest } = comSobras;
|
|
296
298
|
const t = useAureaTokens();
|
|
297
299
|
const aoTocar = useToqueComShare(share, onPress);
|
|
298
300
|
const s = folha(t);
|
package/dist/busca.js
CHANGED
|
@@ -67,7 +67,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
67
67
|
// aceita digitação, então `button` é o que ele É nos dois sistemas. Quem digita é o campo da
|
|
68
68
|
// folha, e ele leva `search` — que mapeia nos dois.
|
|
69
69
|
import * as React from "react";
|
|
70
|
-
import { Animated, Easing, FlatList, Modal, PanResponder, Pressable, TextInput, View, } from "react-native";
|
|
70
|
+
import { Animated, Easing, FlatList, Modal, PanResponder, Platform, Pressable, TextInput, View, } from "react-native";
|
|
71
71
|
import { IconButton } from "./actions.js";
|
|
72
72
|
import { canto, cantosDeCima, criarFolha, estadoAcessivel, preenchimento, fundoDeCampo } from "./estilos.js";
|
|
73
73
|
import { useNaSuperficie } from "./superficie.js";
|
|
@@ -316,13 +316,14 @@ export function Combobox({ items, value, onValueChange, onSearchChange, searchDe
|
|
|
316
316
|
peleDaMarca,
|
|
317
317
|
inativo && s.desabilitado,
|
|
318
318
|
style,
|
|
319
|
-
], children: [_jsx(Pressable, { testID: testID, onPress: inativo ? undefined : () => setAberto(true), disabled: inativo, accessibilityRole: "button", accessibilityLabel: campo?.label, accessibilityHint: campo?.hint, accessibilityValue: { text: value?.label }, ...estadoAcessivel({ disabled: !!inativo, expanded: aberto }), style: s.gatilho, children: _jsx(Text, { size: tam === "sm" ? "xs" : tam === "lg" ? "base" : "md", tone: value ? "default" : "subtle", numberOfLines: 1, style: { flex: 1, minWidth: 0 }, children: value?.label ?? placeholder ?? "" }) }), _jsxs(View, { style: s.acoes, children: [clearable && value != null && !inativo && (_jsx(IconButton, { name: "x", label: strings.comboboxClear, appearance: "ghost", size: "sm", onPress: () => onValueChange?.(null), testID: testID ? `${testID}-limpar` : undefined })), chevron && (_jsx(Pressable, { accessible:
|
|
319
|
+
], children: [_jsx(Pressable, { testID: testID, onPress: inativo ? undefined : () => setAberto(true), disabled: inativo, accessibilityRole: "button", accessibilityLabel: campo?.label, accessibilityHint: campo?.hint, accessibilityValue: { text: value?.label }, ...estadoAcessivel({ disabled: !!inativo, expanded: aberto }), style: s.gatilho, children: _jsx(Text, { size: tam === "sm" ? "xs" : tam === "lg" ? "base" : "md", tone: value ? "default" : "subtle", numberOfLines: 1, style: { flex: 1, minWidth: 0 }, children: value?.label ?? placeholder ?? "" }) }), _jsxs(View, { style: s.acoes, children: [clearable && value != null && !inativo && (_jsx(IconButton, { name: "x", label: strings.comboboxClear, appearance: "ghost", size: "sm", onPress: () => onValueChange?.(null), testID: testID ? `${testID}-limpar` : undefined })), chevron && (_jsx(Pressable, { accessible: Platform.OS === "web", role: Platform.OS === "web" ? "button" : undefined, accessibilityLabel: Platform.OS === "web" ? strings.comboboxOpen : undefined, disabled: inativo, style: s.setaToque, onPress: inativo ? undefined : () => setAberto(true), testID: testID ? `${testID}-seta` : undefined, children: _jsx(Icon, { name: chevron, size: "sm", color: t.color.subtleForeground }) }))] })] }), _jsx(ForaDaMarca, { children: _jsx(Modal, { visible: aberto, transparent: true, animationType: reduzir !== false ? "none" : "slide", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: fechar, children: _jsxs(KeyboardAvoiding, { style: sf.fundoDaLista, children: [_jsx(Pressable, { style: sf.fundoDeToque, onPress: fechar, accessible: false, testID: testID ? `${testID}-fundo` : undefined }), _jsxs(Animated.View, { style: [sf.lista, { transform: [{ translateY: arrasto }] }], onLayout: (e) => { altura.current = e.nativeEvent.layout.height; }, children: [_jsx(View, { style: sf.puxadorArea, ...(draggable ? gestos.panHandlers : null), accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: _jsx(View, { style: sf.puxador }) }), _jsxs(View, { style: [sf.grupo, { height: alturaDoTamanho(t, tam) }], ...(draggable ? gestos.panHandlers : null), children: [searchIcon && _jsx(Icon, { name: searchIcon, size: "sm", color: tf.color.subtleForeground }), _jsx(TextInput, { testID: testID ? `${testID}-busca` : undefined, value: texto, onChangeText: digitar, placeholder: searchPlaceholder ?? strings.comboboxSearch, placeholderTextColor: tf.color.subtleForeground,
|
|
320
320
|
// ⚠ `autoFocus` é o que faz a folha valer a pena: abrir um campo de busca e
|
|
321
321
|
// exigir um segundo toque para o teclado subir é um toque a mais em cada
|
|
322
322
|
// cadastro. O foco entra com a folha; o teclado vem junto.
|
|
323
323
|
autoFocus: true, autoCorrect: false, autoCapitalize: "none",
|
|
324
|
-
// Mapeia nos dois sistemas — conferido no fonte do RN, tabela no topo do módulo.
|
|
325
|
-
|
|
324
|
+
// Mapeia nos dois sistemas — conferido no fonte do RN, tabela no topo do módulo. No navegador, `search` num
|
|
325
|
+
// `<input>` não vale (é papel de região); o campo é `searchbox` (bloco 1, 24/10/2026).
|
|
326
|
+
accessibilityRole: "search", role: Platform.OS === "web" ? "searchbox" : undefined, accessibilityLabel: searchPlaceholder ?? strings.comboboxSearch,
|
|
326
327
|
// `returnKeyType="search"` troca o "enter" do teclado pela lupa. É pista de
|
|
327
328
|
// plataforma, não decoração: diz à pessoa que aquele campo é de busca antes de
|
|
328
329
|
// ela digitar a primeira letra.
|
|
@@ -431,7 +432,10 @@ export function SearchField({ value, onChangeText, onSearchChange, searchDelay =
|
|
|
431
432
|
peleDaMarca && focado && { borderWidth: t.size.borderWidth * 2 },
|
|
432
433
|
inativo && s.desabilitado,
|
|
433
434
|
style,
|
|
434
|
-
], children: [icon && _jsx(Icon, { name: icon, size: "sm", color: peleDaMarca?.color ?? t.color.subtleForeground }), _jsx(TextInput, { testID: testID ? `${testID}-campo` : undefined,
|
|
435
|
+
], children: [icon && _jsx(Icon, { name: icon, size: "sm", color: peleDaMarca?.color ?? t.color.subtleForeground }), _jsx(TextInput, { testID: testID ? `${testID}-campo` : undefined,
|
|
436
|
+
// O texto interno também comanda o campo (bloco 1, 24/10/2026): com `value={value}`, sem `value` o campo era livre
|
|
437
|
+
// e o X apagava o texto interno — o X sumia e o que estava escrito ficava.
|
|
438
|
+
value: texto, onChangeText: digitar, placeholder: placeholder, placeholderTextColor: peleDaMarca?.color ?? t.color.subtleForeground, editable: !inativo, autoCorrect: false, autoCapitalize: "none", returnKeyType: "search", onSubmitEditing: onSubmit, onFocus: () => setFocado(true), onBlur: () => setFocado(false), accessibilityRole: "search", role: Platform.OS === "web" ? "searchbox" : undefined, accessibilityLabel: campo?.label ?? placeholder, accessibilityHint: campo?.hint, ...estadoAcessivel({ disabled: !!inativo }), style: [
|
|
435
439
|
s.campoDeTexto,
|
|
436
440
|
{ fontSize: fonteDoTamanho(t, tam), fontFamily: t.font.ui[400],
|
|
437
441
|
color: t.color.foreground },
|
package/dist/chart.js
CHANGED
|
@@ -187,7 +187,7 @@ export function Chart({ labels, series, label, mark = "line", height = ALTURA, y
|
|
|
187
187
|
const v = serie.data[selecionado];
|
|
188
188
|
return v == null ? null : (_jsx(Circle, { cx: x(selecionado), cy: y(v), r: 4, fill: cores[n], stroke: t.color.card, strokeWidth: 2 }, n));
|
|
189
189
|
})] })) : null] }) })) : null, largura > 0 ? (_jsx(View, { style: { position: "absolute", left: CALHA.esquerda, top: CALHA.topo,
|
|
190
|
-
width: areaL, height: areaA, flexDirection: "row" }, children: labels.map((rotulo, i) => (_jsx(Pressable, { onPress: () => tocar(i), accessibilityRole: "button", ...estadoAcessivel({ selected: selecionado === i }), accessibilityLabel: [
|
|
190
|
+
width: areaL, height: areaA, flexDirection: "row" }, children: labels.map((rotulo, i) => (_jsx(Pressable, { onPress: () => tocar(i), accessibilityRole: "button", ...estadoAcessivel({ selected: selecionado === i }, "button"), accessibilityLabel: [
|
|
191
191
|
rotulo,
|
|
192
192
|
...series.map((serie) => {
|
|
193
193
|
const v = serie.data[i];
|
|
@@ -210,7 +210,7 @@ export function Chart({ labels, series, label, mark = "line", height = ALTURA, y
|
|
|
210
210
|
export function ChartLegend({ series, colors, style, testID }) {
|
|
211
211
|
const t = useAureaTokens();
|
|
212
212
|
const s = folha(t);
|
|
213
|
-
return (_jsx(View, { accessibilityRole: "list", style: [s.legenda, style], testID: testID, children: series.map((serie, n) => (_jsxs(View, { accessible: true, accessibilityLabel: serie.name, style: s.chave, children: [_jsx(View, { style: [s.amostra, {
|
|
213
|
+
return (_jsx(View, { accessibilityRole: "list", style: [s.legenda, style], testID: testID, children: series.map((serie, n) => (_jsxs(View, { role: "listitem", accessible: true, accessibilityLabel: serie.name, style: s.chave, children: [_jsx(View, { style: [s.amostra, {
|
|
214
214
|
backgroundColor: serie.color ?? colors?.[n]
|
|
215
215
|
?? t.color[ORDEM[n % ORDEM.length]] ?? t.color.primary,
|
|
216
216
|
}] }), _jsx(Text, { size: "xs", tone: "muted", children: serie.name })] }, n))) }));
|
package/dist/data.js
CHANGED
|
@@ -63,6 +63,7 @@ import { useAureaStrings, useAureaTokens } from "./theme.js";
|
|
|
63
63
|
const folha = criarFolha((t) => ({
|
|
64
64
|
// ── Timeline ──
|
|
65
65
|
trilha: { gap: t.size.space5 },
|
|
66
|
+
itemDaTrilha: { gap: t.size.space5 },
|
|
66
67
|
trilho: {
|
|
67
68
|
position: "absolute", top: t.size.space2, bottom: t.size.space2,
|
|
68
69
|
// A MEIO DIÂMETRO do ponto, derivado do mesmo token — igual ao CSS, que faz
|
|
@@ -145,7 +146,8 @@ export function Timeline({ items, virtualized = false, style, testID }) {
|
|
|
145
146
|
: _jsx(View, { style: s.ponto });
|
|
146
147
|
const entre = item.between != null && n < items.length - 1 ? (_jsx(View, { style: [s.entre, { paddingLeft: marcador + t.size.space3 }], children: typeof item.between === "string"
|
|
147
148
|
? _jsx(Text, { size: "xs", tone: "muted", children: item.between }) : item.between })) : null;
|
|
148
|
-
|
|
149
|
+
// O evento e o texto "entre" ele e o próximo são UM item da lista; o vão entre os dois é o mesmo da trilha.
|
|
150
|
+
return (_jsxs(View, { role: "listitem", style: s.itemDaTrilha, children: [_jsxs(View, { style: s.evento, children: [ponto, _jsxs(View, { style: s.colunaDoEvento, children: [item.trailing != null ? (_jsxs(View, { style: s.linhaDoTitulo, children: [titulo, typeof item.trailing === "string"
|
|
149
151
|
? _jsx(Text, { size: "md", weight: 600, children: item.trailing }) : item.trailing] })) : titulo, item.description != null
|
|
150
152
|
? (typeof item.description === "string"
|
|
151
153
|
? _jsx(Text, { size: "sm", tone: "muted", children: item.description }) : item.description)
|
|
@@ -191,7 +193,7 @@ export function DataList({ items, layout = "auto", style, testID }) {
|
|
|
191
193
|
const nome = typeof item.term === "string" && typeof item.value === "string"
|
|
192
194
|
? `${item.term}: ${item.value}`
|
|
193
195
|
: undefined;
|
|
194
|
-
return (_jsxs(View, { accessible: true, accessibilityLabel: nome, style: ladoALado ? s.parLadoALado : s.parEmpilhado, children: [typeof item.term === "string"
|
|
196
|
+
return (_jsxs(View, { role: "listitem", accessible: true, accessibilityLabel: nome, style: ladoALado ? s.parLadoALado : s.parEmpilhado, children: [typeof item.term === "string"
|
|
195
197
|
? _jsx(Text, { size: "sm", tone: "muted", style: ladoALado ? s.termoLadoALado : undefined, children: item.term })
|
|
196
198
|
: item.term, typeof item.value === "string"
|
|
197
199
|
? _jsx(Text, { size: "sm", style: s.valor, children: item.value })
|
|
@@ -246,9 +248,10 @@ export function Table({ caption, columns, rows, keyExtractor, onRowPress, empty,
|
|
|
246
248
|
})] }));
|
|
247
249
|
// Só vira alvo se houver o que tocar. Uma linha `Pressable` sem ação é um botão que não faz
|
|
248
250
|
// nada — e o leitor de tela a anunciaria como botão.
|
|
251
|
+
// A linha é o item da lista; a tocável é um botão DENTRO dele (o papel de item não pode ir no botão).
|
|
249
252
|
return onRowPress
|
|
250
|
-
? _jsx(Pressable, { accessibilityRole: "button", onPress: () => onRowPress(linha), style: [s.linha, s.linhaTocavel], children: corpo })
|
|
251
|
-
: _jsx(View, { style: s.linha, children: corpo });
|
|
253
|
+
? _jsx(View, { role: "listitem", children: _jsx(Pressable, { accessibilityRole: "button", onPress: () => onRowPress(linha), style: [s.linha, s.linhaTocavel], children: corpo }) })
|
|
254
|
+
: _jsx(View, { role: "listitem", style: s.linha, children: corpo });
|
|
252
255
|
}, [principal, secundarias, conteudo, onRowPress, s]);
|
|
253
256
|
const chave = React.useCallback((linha, n) => keyExtractor ? keyExtractor(linha, n) : String(n), [keyExtractor]);
|
|
254
257
|
const nomeDaLista = typeof caption === "string" ? caption : strings.tableLabel;
|
package/dist/escolha.js
CHANGED
|
@@ -284,7 +284,7 @@ function AlcaDoDeslizante({ indice, ctl, vertical, deslocamento, arrastando, ina
|
|
|
284
284
|
// O motor do aparelho converte min, max e now para INTEIRO, e um valor fracionário (0,75)
|
|
285
285
|
// derruba a ponte — por isso a escala de 0 a 100, como na referência; quem fala o valor é o
|
|
286
286
|
// `text`, já formatado.
|
|
287
|
-
accessibilityValue: { min: 0, max: 100, now: porcento, text: valorEscrito }, accessibilityActions: [{ name: "increment", label: rotulosDasAcoes[0] }, { name: "decrement", label: rotulosDasAcoes[1] }], onAccessibilityAction: (e) => {
|
|
287
|
+
accessibilityValue: { min: 0, max: 100, now: porcento, text: valorEscrito }, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": porcento, "aria-valuetext": valorEscrito, accessibilityActions: [{ name: "increment", label: rotulosDasAcoes[0] }, { name: "decrement", label: rotulosDasAcoes[1] }], onAccessibilityAction: (e) => {
|
|
288
288
|
const nomeDaAcao = e.nativeEvent.actionName;
|
|
289
289
|
if (nomeDaAcao === "increment")
|
|
290
290
|
ctl.current.passo(indice, 1);
|
|
@@ -459,13 +459,13 @@ export function TagGroup({ label, labelHidden, description, errorMessage, items,
|
|
|
459
459
|
const cor = escolhida ? t.color.primaryEmphasis : letra;
|
|
460
460
|
const conteudo = (_jsxs(_Fragment, { children: [it.icon != null && _jsx(Icon, { name: it.icon, size: "sm", color: cor, icons: icons }), _jsx(Text, { weight: 500, numberOfLines: 1, style: { fontSize: m.letra, lineHeight: m.linha, color: cor }, children: it.label })] }));
|
|
461
461
|
const estiloPrincipal = [s.principal, { gap: m.vao }];
|
|
462
|
-
return (_jsxs(View, { testID: testID ? `${testID}-${it.id}` : undefined, style: [
|
|
462
|
+
return (_jsxs(View, { role: "listitem", testID: testID ? `${testID}-${it.id}` : undefined, style: [
|
|
463
463
|
s.etiqueta,
|
|
464
464
|
{ gap: m.vao, paddingVertical: m.vertical, paddingHorizontal: m.lados,
|
|
465
465
|
// O fundo existe desde a montagem; escolher só troca a cor (a regra do raio no Android).
|
|
466
466
|
backgroundColor: escolhida ? misturar(t.color.primary, t.color.secondary, 0.1) : fundo },
|
|
467
467
|
it.disabled && s.desabilitado,
|
|
468
|
-
], children: [escolhe ? (_jsx(Pressable, { onPress: it.disabled ? undefined : () => escolher(it), disabled: it.disabled, accessibilityRole: "button", accessibilityLabel: textoDaEtiqueta(it) || undefined, ...estadoAcessivel({ selected: escolhida, disabled: !!it.disabled }), hitSlop: { top: folgaDoTexto, bottom: folgaDoTexto, left: m.lados, right: onRemove ? 0 : m.lados }, testID: testID ? `${testID}-${it.id}-escolher` : undefined, style: estiloPrincipal, children: conteudo })) : (_jsx(View, { style: estiloPrincipal, children: conteudo })), onRemove && (_jsx(Pressable, { onPress: it.disabled ? undefined : () => onRemove([it.id]), disabled: it.disabled, accessibilityRole: "button", accessibilityLabel: `${strings.fileRemove} ${textoDaEtiqueta(it)}`.trim(), ...estadoAcessivel({ disabled: !!it.disabled }), hitSlop: folgaDoX, testID: testID ? `${testID}-${it.id}-remover` : undefined, style: s.remover, children: _jsx(Icon, { name: "x", weight: "bold", size: t.size.space3, color: cor, icons: icons }) }))] }, it.id));
|
|
468
|
+
], children: [escolhe ? (_jsx(Pressable, { onPress: it.disabled ? undefined : () => escolher(it), disabled: it.disabled, accessibilityRole: "button", accessibilityLabel: textoDaEtiqueta(it) || undefined, ...estadoAcessivel({ selected: escolhida, disabled: !!it.disabled }, "button"), hitSlop: { top: folgaDoTexto, bottom: folgaDoTexto, left: m.lados, right: onRemove ? 0 : m.lados }, testID: testID ? `${testID}-${it.id}-escolher` : undefined, style: estiloPrincipal, children: conteudo })) : (_jsx(View, { style: estiloPrincipal, children: conteudo })), onRemove && (_jsx(Pressable, { onPress: it.disabled ? undefined : () => onRemove([it.id]), disabled: it.disabled, accessibilityRole: "button", accessibilityLabel: `${strings.fileRemove} ${textoDaEtiqueta(it)}`.trim(), ...estadoAcessivel({ disabled: !!it.disabled }), hitSlop: folgaDoX, testID: testID ? `${testID}-${it.id}-remover` : undefined, style: s.remover, children: _jsx(Icon, { name: "x", weight: "bold", size: t.size.space3, color: cor, icons: icons }) }))] }, it.id));
|
|
469
469
|
}) }), description != null && (typeof description === "string"
|
|
470
470
|
? _jsx(Text, { size: "xs", tone: "muted", children: description }) : description), errorMessage != null && (typeof errorMessage === "string"
|
|
471
471
|
? _jsx(Text, { size: "xs", tone: "danger", children: errorMessage }) : errorMessage)] }));
|
package/dist/estilos.d.ts
CHANGED
|
@@ -53,6 +53,22 @@ export declare const fundoDeCampo: (t: AureaTokens, naSuperficie: boolean) => Vi
|
|
|
53
53
|
* `comOpacidade`; fora disso devolve a cor da frente.
|
|
54
54
|
*/
|
|
55
55
|
export declare const misturaOpaca: (frente: string, fundo: string, pct: number) => string;
|
|
56
|
+
export declare const misturaNoOklab: (frente: string, fundo: string, pct: number) => string;
|
|
57
|
+
/**
|
|
58
|
+
* A COR DO ESCOLHIDO, a mesma da web (bloco 1, 23/10/2026): no claro, a marca a 45% sobre a cor do texto, no oklab — o
|
|
59
|
+
* `.is-selected`, o `.segmented .active` e o botão pressionado da web; no escuro, o destaque (o amarelo). Era o
|
|
60
|
+
* `primaryEmphasis`, que no claro é o AZUL (ADR-0076): o Victor viu a aba "Mês" azul no app (*"pq ficou azul se na web
|
|
61
|
+
* não é azul?"*) e pediu o conserto, 23/10/2026.
|
|
62
|
+
*/
|
|
63
|
+
export declare const corDoEscolhido: (t: AureaTokens) => string;
|
|
64
|
+
/**
|
|
65
|
+
* A LETRA DO AMARELO, a do texto com `tone="primary"` (decisão do Victor, 24/10/2026, vendo a referência ao lado: *"fica
|
|
66
|
+
* como a referência: o nosso amarelo misturado com a cor do texto"*). No claro, o amarelo da marca misturado com a cor do
|
|
67
|
+
* texto do jeito que a referência mistura a letra do amarelo dela — `color-mix(in oklab, amarelo 80%, texto 70%)`: os
|
|
68
|
+
* pesos somam 150 e viram 80/150 —, que passa na leitura no branco e no cinza da página (o amarelo puro media 1,92). No
|
|
69
|
+
* escuro, o amarelo da marca, que já se lê.
|
|
70
|
+
*/
|
|
71
|
+
export declare const letraDoAmarelo: (t: AureaTokens) => string;
|
|
56
72
|
/**
|
|
57
73
|
* 🍎 O CANTO DO iOS — HER-01, 06/10/2026: todo canto arredondado do nativo passa por aqui.
|
|
58
74
|
*
|
|
@@ -190,10 +206,19 @@ export type EstadoAcessivel = {
|
|
|
190
206
|
* Uso: `<Pressable {...estadoAcessivel({checked, disabled})} />`. Ferramenta de dentro: **não
|
|
191
207
|
* sai pela porta da frente do pacote.**
|
|
192
208
|
*/
|
|
193
|
-
|
|
209
|
+
/**
|
|
210
|
+
* `papel` (bloco 1, 24/10/2026): o "escolhido" na web depende de QUEM é escolhido. O `aria-selected` só vale em aba,
|
|
211
|
+
* opção, linha e célula — num link ou num botão o axe o recusa e o leitor de tela o ignora (o site, rodando o nativo no
|
|
212
|
+
* navegador, mediu 112 no `BottomNav`, 30 no `TagGroup`, 16 na `Gallery`, 32 no `Stepper`, 75 no `Chart`). Então, só na
|
|
213
|
+
* web: link escolhido é `aria-current="page"` (o par que a ficha do `BottomNav` já escreve), botão escolhido é
|
|
214
|
+
* `aria-pressed`, passo atual é `aria-current="step"`. No aparelho, o `accessibilityState` continua com o `selected`.
|
|
215
|
+
*/
|
|
216
|
+
export type PapelDoEscolhido = "link" | "button" | "step";
|
|
217
|
+
export declare function estadoAcessivel(estado: EstadoAcessivel | undefined, papel?: PapelDoEscolhido): {
|
|
194
218
|
accessibilityState: undefined;
|
|
195
219
|
"aria-checked"?: undefined;
|
|
196
220
|
"aria-selected"?: undefined;
|
|
221
|
+
"aria-current"?: undefined;
|
|
197
222
|
"aria-disabled"?: undefined;
|
|
198
223
|
"aria-expanded"?: undefined;
|
|
199
224
|
"aria-busy"?: undefined;
|
|
@@ -208,6 +233,7 @@ export declare function estadoAcessivel(estado: EstadoAcessivel | undefined): {
|
|
|
208
233
|
};
|
|
209
234
|
"aria-checked": "mixed" | boolean | undefined;
|
|
210
235
|
"aria-selected": boolean | undefined;
|
|
236
|
+
"aria-current": string | undefined;
|
|
211
237
|
"aria-disabled": boolean | undefined;
|
|
212
238
|
"aria-expanded": boolean | undefined;
|
|
213
239
|
"aria-busy": boolean | undefined;
|
package/dist/estilos.js
CHANGED
|
@@ -79,6 +79,49 @@ export const misturaOpaca = (frente, fundo, pct) => {
|
|
|
79
79
|
return "#" + [0, 2, 4].map((i) => Math.round(canal(a[1], i) * pct + canal(b[1], i) * (1 - pct))
|
|
80
80
|
.toString(16).padStart(2, "0")).join("");
|
|
81
81
|
};
|
|
82
|
+
// A mistura no OKLAB, a do `color-mix(in oklab, …)` da web (bloco 1, 23/10/2026). O `misturaOpaca` acima mistura canal
|
|
83
|
+
// a canal, e a cor do meio sai outra: para a cor do escolhido, `#806314` por canal contra `#79602f` no oklab — este o mais
|
|
84
|
+
// perto do que o navegador pinta na web (medido). Hex de seis; fora disso devolve a cor da frente.
|
|
85
|
+
const linear = (c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
|
|
86
|
+
const tela = (c) => (c <= 0.0031308 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - 0.055);
|
|
87
|
+
const paraOklab = (hex) => {
|
|
88
|
+
const [r, g, b] = [1, 3, 5].map((i) => linear(parseInt(hex.slice(i, i + 2), 16) / 255));
|
|
89
|
+
const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
|
|
90
|
+
const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
|
|
91
|
+
const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
|
|
92
|
+
return [0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s, 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
|
|
93
|
+
0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s];
|
|
94
|
+
};
|
|
95
|
+
const doOklab = ([L, a, b]) => {
|
|
96
|
+
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
97
|
+
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
98
|
+
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
99
|
+
return "#" + [4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s, -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
|
100
|
+
-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s]
|
|
101
|
+
.map((c) => Math.round(Math.min(1, Math.max(0, tela(c))) * 255).toString(16).padStart(2, "0")).join("");
|
|
102
|
+
};
|
|
103
|
+
export const misturaNoOklab = (frente, fundo, pct) => {
|
|
104
|
+
const hex = /^#[0-9a-fA-F]{6}$/;
|
|
105
|
+
if (!hex.test(frente) || !hex.test(fundo))
|
|
106
|
+
return frente;
|
|
107
|
+
const a = paraOklab(frente), b = paraOklab(fundo);
|
|
108
|
+
return doOklab([0, 1, 2].map((i) => a[i] * pct + b[i] * (1 - pct)));
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* A COR DO ESCOLHIDO, a mesma da web (bloco 1, 23/10/2026): no claro, a marca a 45% sobre a cor do texto, no oklab — o
|
|
112
|
+
* `.is-selected`, o `.segmented .active` e o botão pressionado da web; no escuro, o destaque (o amarelo). Era o
|
|
113
|
+
* `primaryEmphasis`, que no claro é o AZUL (ADR-0076): o Victor viu a aba "Mês" azul no app (*"pq ficou azul se na web
|
|
114
|
+
* não é azul?"*) e pediu o conserto, 23/10/2026.
|
|
115
|
+
*/
|
|
116
|
+
export const corDoEscolhido = (t) => t.theme === "light" ? misturaNoOklab(t.color.primary, t.color.foreground, 0.45) : t.color.primaryEmphasis;
|
|
117
|
+
/**
|
|
118
|
+
* A LETRA DO AMARELO, a do texto com `tone="primary"` (decisão do Victor, 24/10/2026, vendo a referência ao lado: *"fica
|
|
119
|
+
* como a referência: o nosso amarelo misturado com a cor do texto"*). No claro, o amarelo da marca misturado com a cor do
|
|
120
|
+
* texto do jeito que a referência mistura a letra do amarelo dela — `color-mix(in oklab, amarelo 80%, texto 70%)`: os
|
|
121
|
+
* pesos somam 150 e viram 80/150 —, que passa na leitura no branco e no cinza da página (o amarelo puro media 1,92). No
|
|
122
|
+
* escuro, o amarelo da marca, que já se lê.
|
|
123
|
+
*/
|
|
124
|
+
export const letraDoAmarelo = (t) => t.theme === "light" ? misturaNoOklab(t.color.primary, t.color.foreground, 80 / 150) : t.color.primary;
|
|
82
125
|
/**
|
|
83
126
|
* 🍎 O CANTO DO iOS — HER-01, 06/10/2026: todo canto arredondado do nativo passa por aqui.
|
|
84
127
|
*
|
|
@@ -195,38 +238,20 @@ export const REACAO_AO_TOQUE = {
|
|
|
195
238
|
pressionado: { opacity: 0.9, transform: [{ scale: 0.97 }] },
|
|
196
239
|
inerte: { opacity: 0.45 },
|
|
197
240
|
};
|
|
198
|
-
|
|
199
|
-
* O estado para o leitor de tela, dito **duas vezes**: em `accessibilityState` (o aparelho) e em
|
|
200
|
-
* `aria-*` (a web).
|
|
201
|
-
*
|
|
202
|
-
* EXISTE POR UMA MEDIÇÃO (R-20, 01/10/2026). O `react-native-web` 0.21.3 **não lê**
|
|
203
|
-
* `accessibilityState`: o `createDOMProps` dele só conhece `aria-checked`, `aria-selected`,
|
|
204
|
-
* `aria-disabled`, `aria-expanded` e `aria-busy` (e os `accessibilityChecked` e afins, que estão
|
|
205
|
-
* para sair). Com só o `accessibilityState`, o `RadioGroup` aberto no navegador saía sem
|
|
206
|
-
* `aria-checked`, e o leitor de tela não dizia qual opção estava marcada.
|
|
207
|
-
*
|
|
208
|
-
* O React Native 0.87 aceita as mesmas `aria-*` e as junta ao `accessibilityState` com o mesmo
|
|
209
|
-
* valor, então o aparelho não muda.
|
|
210
|
-
*
|
|
211
|
-
* ⚠ `pressed` (o botão de ligar e desligar) é a exceção: no aparelho continua `checked`, como
|
|
212
|
-
* sempre foi; na web vira `aria-pressed`, porque `aria-checked` num `button` o leitor ignora. Os
|
|
213
|
-
* tipos do React Native não têm `aria-pressed`; o aparelho descarta a propriedade que não conhece.
|
|
214
|
-
*
|
|
215
|
-
* Uso: `<Pressable {...estadoAcessivel({checked, disabled})} />`. Ferramenta de dentro: **não
|
|
216
|
-
* sai pela porta da frente do pacote.**
|
|
217
|
-
*/
|
|
218
|
-
export function estadoAcessivel(estado) {
|
|
241
|
+
export function estadoAcessivel(estado, papel) {
|
|
219
242
|
if (!estado)
|
|
220
243
|
return { accessibilityState: undefined };
|
|
221
244
|
const { pressed, ...resto } = estado;
|
|
222
245
|
const doAparelho = pressed === undefined ? resto : { ...resto, checked: pressed };
|
|
246
|
+
const escolhido = resto.selected;
|
|
223
247
|
return {
|
|
224
248
|
accessibilityState: doAparelho,
|
|
225
249
|
"aria-checked": resto.checked,
|
|
226
|
-
"aria-selected":
|
|
250
|
+
"aria-selected": papel ? undefined : escolhido,
|
|
251
|
+
"aria-current": escolhido ? (papel === "link" ? "page" : papel === "step" ? "step" : undefined) : undefined,
|
|
227
252
|
"aria-disabled": resto.disabled,
|
|
228
253
|
"aria-expanded": resto.expanded,
|
|
229
254
|
"aria-busy": resto.busy,
|
|
230
|
-
"aria-pressed": pressed,
|
|
255
|
+
"aria-pressed": pressed ?? (papel === "button" ? escolhido : undefined),
|
|
231
256
|
};
|
|
232
257
|
}
|
package/dist/exibicao.js
CHANGED
|
@@ -144,6 +144,9 @@ export function Accordion({ items, variant = "default", multiple = false, defaul
|
|
|
144
144
|
// ADR-0078: o `surface` é um cartão — o campo de dentro fica cinza. O comum herda o que está em volta.
|
|
145
145
|
return surface ? _jsx(NaSuperficie.Provider, { value: true, children: corpo }) : corpo;
|
|
146
146
|
}
|
|
147
|
+
// O cabeçalho do item tem nível 3, o padrão do cabeçalho de acordeão: no navegador (`react-native-web`) o título sem nível
|
|
148
|
+
// vira `<h1>` (26 na página do Accordion, bloco 1, 23/10/2026); no aparelho a prop é ignorada.
|
|
149
|
+
const NIVEL_DO_ITEM = { "aria-level": 3 };
|
|
147
150
|
function ItemDoAccordion({ item, aberto, surface, onAlternar, testID }) {
|
|
148
151
|
const t = useAureaTokens();
|
|
149
152
|
const s = folha(t);
|
|
@@ -173,7 +176,7 @@ function ItemDoAccordion({ item, aberto, surface, onAlternar, testID }) {
|
|
|
173
176
|
// fechado, como lá (`:not([open])`).
|
|
174
177
|
const realce = surface ? t.color.secondary : comOpacidade(t.color.foreground, 0.03);
|
|
175
178
|
const emTexto = (n) => typeof n === "string" || typeof n === "number";
|
|
176
|
-
return (_jsxs(View, { children: [_jsx(View, { accessibilityRole: "header", children: _jsxs(Pressable, { testID: testID, disabled: inativo,
|
|
179
|
+
return (_jsxs(View, { children: [_jsx(View, { accessibilityRole: "header", ...NIVEL_DO_ITEM, children: _jsxs(Pressable, { testID: testID, disabled: inativo,
|
|
177
180
|
// A guarda repete o `disabled` de propósito, como o gatilho da referência: o toque que chega
|
|
178
181
|
// por outro caminho (o leitor de tela, um teste) também não abre o item desligado.
|
|
179
182
|
onPress: () => { if (!inativo)
|
package/dist/inputs.d.ts
CHANGED
|
@@ -355,7 +355,7 @@ export interface SwitchProps extends ControleProps {
|
|
|
355
355
|
* ⚠ **E ele respeita "menos movimento"**: com a preferência ligada, o polegar salta em vez de
|
|
356
356
|
* deslizar. O estado continua o mesmo — o que some é a animação, não a informação.
|
|
357
357
|
*/
|
|
358
|
-
export declare function Switch({ label, description, checked, onChange, disabled, size, style, testID, accessibilityLabel, }: SwitchProps): React.JSX.Element;
|
|
358
|
+
export declare function Switch({ label, description, checked, onChange, disabled, size, style, testID, accessibilityLabel, align, }: SwitchProps): React.JSX.Element;
|
|
359
359
|
export interface SegmentedControlProps extends ViewProps {
|
|
360
360
|
items: Array<{
|
|
361
361
|
value: string;
|
package/dist/inputs.js
CHANGED
|
@@ -45,7 +45,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
45
45
|
import * as React from "react";
|
|
46
46
|
import { Animated, KeyboardAvoidingView as KeyboardAvoidingViewRN, Modal, Platform, Pressable, ScrollView, TextInput, View, } from "react-native";
|
|
47
47
|
import Svg, { Path } from "react-native-svg";
|
|
48
|
-
import { canto, cantosDeCima, criarFolha, estadoAcessivel,
|
|
48
|
+
import { canto, cantosDeCima, criarFolha, estadoAcessivel, peleDoCartao, peleDoCartaoEscolhido, preenchimento, fundoDeCampo } from "./estilos.js";
|
|
49
49
|
import { useNaSuperficie } from "./superficie.js";
|
|
50
50
|
import { FilaRolante } from "./rolagem.js";
|
|
51
51
|
import { IconButton } from "./actions.js";
|
|
@@ -138,14 +138,12 @@ const folha = criarFolha((t) => ({
|
|
|
138
138
|
// ficam de larguras parecidas, não iguais. Simulado no Yoga: 343 de 343, sem quebrar.
|
|
139
139
|
segmentoCheio: { flexGrow: 1, flexShrink: 0, flexBasis: "auto" },
|
|
140
140
|
segmentadaCheia: { flexGrow: 1 },
|
|
141
|
-
// A CÁPSULA ESCOLHIDA
|
|
142
|
-
//
|
|
143
|
-
// `
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// e a razão moram no `fioDoEscolhido` (`estilos.ts`), que a aba do `Tabs` secundário também usa.
|
|
148
|
-
fioDoSegmento: fioDoEscolhido(t),
|
|
141
|
+
// A CÁPSULA ESCOLHIDA é o AMARELO DA MARCA, como o botão primário (decisão do Victor, 24/10/2026, vendo as duas formas
|
|
142
|
+
// desenhadas: *"O amarelo por trás, como o botão, na barra de baixo e na aba escolhida."*) — o nome vai na tinta do botão
|
|
143
|
+
// (`primaryForeground`), e saem a sombra e o fio amarelo de baixo, que no amarelo não se veriam. ~~Era o `segment` com a
|
|
144
|
+
// sombra pequena (ADR-0059) e o fio amarelo, com o nome na mistura marrom da web.~~ É um `Pressable`, que existe desde a
|
|
145
|
+
// montagem: a regra do canto no Android (`native-capsula-android.test.tsx`) não o pega.
|
|
146
|
+
segmentoAtivo: { backgroundColor: t.color.primary },
|
|
149
147
|
formulario: { gap: t.size.space5 },
|
|
150
148
|
// A folha do `Select`: no RN não existe `<select>`, então a lista é um `Modal` — que é
|
|
151
149
|
// exatamente o "motor novo sobre `Modal`" que a §5.2.4 previu.
|
|
@@ -376,6 +374,8 @@ export function PasswordField({ defaultVisible = false, size, disabled, autoCapi
|
|
|
376
374
|
const inativo = disabled ?? campo?.disabled;
|
|
377
375
|
return (_jsxs(InputGroup, { size: tam, disabled: inativo, testID: testID, children: [leading ? _jsx(InputGroupAddon, { children: leading }) : null, _jsx(Input, { ...rest, size: tam, disabled: inativo, autoCapitalize: autoCapitalize, secureTextEntry: !visivel, style: style, testID: testID ? `${testID}-campo` : undefined }), _jsx(InputGroupAddon, { children: _jsx(IconButton, { name: visivel ? "eye-slash" : "eye", label: visivel ? strings.passwordHide : strings.passwordShow, appearance: "ghost", size: tam === "lg" ? "md" : "sm", disabled: inativo, icons: icons, onPress: () => setVisivel(v => !v), testID: testID ? `${testID}-olho` : undefined }) })] }));
|
|
378
376
|
}
|
|
377
|
+
// O `hitSlop` padrão da caixa e do rádio do nativo da referência: 6, a soma de dois tokens (4 + 2).
|
|
378
|
+
const FOLGA_DO_TOQUE = (t) => t.size.space1 + t.size.space05;
|
|
379
379
|
function ControleMarcado({ papel, label, description, checked, onChange, disabled, size, style, testID, accessibilityLabel, align = "center", }) {
|
|
380
380
|
const t = useAureaTokens();
|
|
381
381
|
const s = folha(t);
|
|
@@ -397,7 +397,13 @@ function ControleMarcado({ papel, label, description, checked, onChange, disable
|
|
|
397
397
|
// ⚠ O `accessibilityLabel` de fora vence o `label` escrito, e existe para o caso em que o
|
|
398
398
|
// nome JÁ está na tela ao lado — uma linha de `NavList`, por exemplo. Sem ele, ou o nome
|
|
399
399
|
// aparece escrito duas vezes, ou o controle sobe MUDO para quem usa leitor de tela.
|
|
400
|
-
accessibilityLabel: accessibilityLabel ?? (typeof label === "string" ? label : campo?.label), accessibilityHint: typeof description === "string" ? description : campo?.hint,
|
|
400
|
+
accessibilityLabel: accessibilityLabel ?? (typeof label === "string" ? label : campo?.label), accessibilityHint: typeof description === "string" ? description : campo?.hint,
|
|
401
|
+
// O TOQUE A MAIS DA REFERÊNCIA: 6 em volta, invisível, o `hitSlop` padrão da caixa e do rádio do nativo dela —
|
|
402
|
+
// decisão do Victor, 24/10/2026, depois de ver a bancada do celular: *"Fica igual à referência: o desenho de antes e
|
|
403
|
+
// o mesmo toque a mais invisível que ela usa (6 em volta)"*. Substitui a linha com altura de 44, do mesmo dia, que
|
|
404
|
+
// afastava a lista. O desenho e a medida da linha não mudam. ⚠ O leitor de tela do Android não enxerga essa folga
|
|
405
|
+
// (ver "O ALVO DE TOQUE", no `actions.tsx`); a referência aceita isso, e a Aurea segue a referência aqui.
|
|
406
|
+
hitSlop: FOLGA_DO_TOQUE(t), style: [s.linhaDeControle, align === "start" && s.linhaNoTopo, inativo && s.desabilitado, style], children: [_jsx(View, { style: [
|
|
401
407
|
s.marcaBase, noTopo,
|
|
402
408
|
// 0.32.0: o canto da caixa é o `radiusXs` (6), o mesmo do `.checkbox .control-mark` da
|
|
403
409
|
// web; era 5 cru.
|
|
@@ -496,7 +502,7 @@ export const RadioGroup = Object.assign(RaizDoGrupoDeRadio, { Item: ItemDoGrupoD
|
|
|
496
502
|
* ⚠ **E ele respeita "menos movimento"**: com a preferência ligada, o polegar salta em vez de
|
|
497
503
|
* deslizar. O estado continua o mesmo — o que some é a animação, não a informação.
|
|
498
504
|
*/
|
|
499
|
-
export function Switch({ label, description, checked, onChange, disabled, size, style, testID, accessibilityLabel, }) {
|
|
505
|
+
export function Switch({ label, description, checked, onChange, disabled, size, style, testID, accessibilityLabel, align = "center", }) {
|
|
500
506
|
const t = useAureaTokens();
|
|
501
507
|
const s = folha(t);
|
|
502
508
|
const campo = useCampo();
|
|
@@ -515,6 +521,10 @@ export function Switch({ label, description, checked, onChange, disabled, size,
|
|
|
515
521
|
const larguraDoPolegar = alturaDoPolegar + t.size.space2;
|
|
516
522
|
// O curso deixa os mesmos 2 da borda de fora na outra ponta (a conta do `--switch-x` da web).
|
|
517
523
|
const curso = larguraDoTrilho - larguraDoPolegar - 2 * t.size.space05;
|
|
524
|
+
// O `align` (bloco 1, 24/10/2026): o tipo vem do `ControleProps` e o `Switch` não lia — com `start`, o trilho ficava no
|
|
525
|
+
// meio do bloco do rótulo longo. A mesma conta do `ControleMarcado`: o meio do trilho no meio da PRIMEIRA linha.
|
|
526
|
+
const linha = t.size.textBase * t.size.leadingNormal;
|
|
527
|
+
const noTopo = align === "start" ? { marginTop: Math.max(0, (linha - alturaDoTrilho) / 2) } : null;
|
|
518
528
|
const pos = React.useRef(new Animated.Value(checked ? 1 : 0)).current;
|
|
519
529
|
React.useEffect(() => {
|
|
520
530
|
const destino = checked ? 1 : 0;
|
|
@@ -546,12 +556,13 @@ export function Switch({ label, description, checked, onChange, disabled, size,
|
|
|
546
556
|
// irmãos com `flex:1` parte da largura do conteúdo. É a mesma família do `padding-block` do
|
|
547
557
|
// `Input`: o que a cascata resolve de graça, aqui é conta explícita.
|
|
548
558
|
style: [
|
|
549
|
-
|
|
559
|
+
// Sem toque a mais: o interruptor do nativo da referência não tem `hitSlop` (a caixa e o rádio têm 6).
|
|
560
|
+
{ flexDirection: "row", alignItems: align === "start" ? "flex-start" : "center" },
|
|
550
561
|
// 0.32.0: 12 até o texto, o vão do campo de controle da referência e o do `Checkbox` (era 10).
|
|
551
562
|
temTexto && { gap: t.size.space3 },
|
|
552
563
|
inativo && s.desabilitado, style,
|
|
553
564
|
], children: [_jsx(View, { style: [
|
|
554
|
-
s.trilho,
|
|
565
|
+
s.trilho, noTopo,
|
|
555
566
|
{ width: larguraDoTrilho, height: alturaDoTrilho },
|
|
556
567
|
checked && { backgroundColor: t.color.controlSelected, borderColor: "transparent" },
|
|
557
568
|
], children: _jsx(Animated.View, { style: [
|
|
@@ -577,27 +588,28 @@ export function SegmentedControl({ items, value, onChange, label, disabled, just
|
|
|
577
588
|
const inativo = disabled ?? campo?.disabled;
|
|
578
589
|
return (_jsx(FilaRolante, { justify: justify, fill: fullWidth, children: _jsx(View, { accessibilityRole: "radiogroup", accessibilityLabel: label ?? campo?.label, style: [s.segmentada, fullWidth && s.segmentadaCheia, inativo && s.desabilitado, style], ...rest, children: items.map((it) => {
|
|
579
590
|
const ativo = it.value === value;
|
|
580
|
-
return (
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
:
|
|
591
|
+
return (_jsx(Pressable, { onPress: inativo ? undefined : () => onChange?.(it.value), disabled: inativo, accessibilityRole: "radio", ...estadoAcessivel({ checked: ativo, disabled: !!inativo }), accessibilityLabel: typeof it.label === "string" ? it.label : undefined, style: [s.segmento, fullWidth && s.segmentoCheio, ativo && s.segmentoAtivo], children: typeof it.label === "string"
|
|
592
|
+
? _jsx(Text, { size: "sm", weight: ativo ? 600 : 400,
|
|
593
|
+
// 🔴 ERA `foreground`, E ISSO QUEBRAVA A LINGUAGEM DE SELECIONADO.
|
|
594
|
+
// Achado pelo consumidor em 17/09/2026. A web pinta o escolhido com a
|
|
595
|
+
// MARCA (`aurea.css:937-938`), e o comentário de cima daquela regra diz
|
|
596
|
+
// que nav ativo, aba ativa, item de lista e botão ligado mostram o mesmo
|
|
597
|
+
// sinal — ordem do Victor, 24/07. O `SegmentedControl` daqui discordava
|
|
598
|
+
// da web **e do `BottomNav` deste mesmo pacote**, que já usa este token.
|
|
599
|
+
//
|
|
600
|
+
// ⚠ **`primaryEmphasis` e NÃO `primary`, e a razão está no CSS:** *"sem
|
|
601
|
+
// fundo, a marca vira TEXTO, e o amarelo puro"* não se lê no claro
|
|
602
|
+
// (`aurea.css:358`). É a mesma lição que a `0.8.3` pagou no `Button`.
|
|
603
|
+
// No escuro os dois valem o mesmo amarelo; no claro este aprofunda.
|
|
604
|
+
//
|
|
605
|
+
// ~~⚠ Uma divergência declarada: o token, e não a mistura da web.~~ → A COR
|
|
606
|
+
// DA WEB (bloco 1, 23/10/2026): desde a ADR-0076 o token é o AZUL no claro,
|
|
607
|
+
// e o Victor viu a aba "Mês" azul no app (*"pq ficou azul se na web não é
|
|
608
|
+
// azul?"*). ~~A aba escolhida é a mistura da web, `corDoEscolhido`.~~ → Desde
|
|
609
|
+
// 24/10/2026 a cápsula escolhida é o amarelo do botão (ver `segmentoAtivo`), e
|
|
610
|
+
// o nome vai na tinta do botão.
|
|
611
|
+
style: { color: ativo ? t.color.primaryForeground : t.color.mutedForeground }, children: it.label })
|
|
612
|
+
: it.label }, it.value));
|
|
601
613
|
}) }) }));
|
|
602
614
|
}
|
|
603
615
|
// ─────────────────────────────────────────────────────────────────────────────────────────────
|
|
@@ -610,7 +622,7 @@ export function SegmentedControl({ items, value, onChange, label, disabled, just
|
|
|
610
622
|
* arquivo, não do pacote — e é função, não componente, para não contar como peça nova. ⚠ Pede o
|
|
611
623
|
* `check` no registro de ícones do app; sem ele, o aviso de desenvolvimento do `Icon` diz o import.
|
|
612
624
|
*/
|
|
613
|
-
export const indicadorDaEscolhida = (t) => (_jsx(View, { style: folha(t).indicador, children: _jsx(Icon, { name: "check", size: "sm", color: t.color.
|
|
625
|
+
export const indicadorDaEscolhida = (t) => (_jsx(View, { style: folha(t).indicador, children: _jsx(Icon, { name: "check", size: "sm", color: t.color.primary }) }));
|
|
614
626
|
/**
|
|
615
627
|
* A escolha de um de muitos.
|
|
616
628
|
*
|
package/dist/layout.js
CHANGED
|
@@ -236,6 +236,10 @@ export function Card(props) {
|
|
|
236
236
|
const COR_DO_TRACO = {
|
|
237
237
|
brand: "primary", success: "success", info: "info", warning: "warning", danger: "destructive",
|
|
238
238
|
};
|
|
239
|
+
// O cartão de contorno é a ÚNICA peça com linha (ADR-0072). No navegador (`react-native-web`), a marca `data-aurea-card`
|
|
240
|
+
// diz isso à varredura "nenhuma peça desenha linha" do site, como a classe `.card-outline` diz na web; no aparelho a prop
|
|
241
|
+
// `dataSet` não existe e é ignorada (bloco 1, 23/10/2026).
|
|
242
|
+
const MARCA_DO_CONTORNO = { dataSet: { aureaCard: "outline" } };
|
|
239
243
|
function CorpoDoCartao({ variant, accent, style, ...rest }) {
|
|
240
244
|
const t = useAureaTokens();
|
|
241
245
|
const { theme: temaDoApp } = useAureaTheme();
|
|
@@ -250,10 +254,10 @@ function CorpoDoCartao({ variant, accent, style, ...rest }) {
|
|
|
250
254
|
s.cardBase, s[`card_${pele}`], contorno, traco != null && s.comTraco,
|
|
251
255
|
tocando && REACAO_AO_TOQUE.pressionado, disabled && REACAO_AO_TOQUE.inerte,
|
|
252
256
|
style,
|
|
253
|
-
], ...resto, children: [traco, children] }));
|
|
257
|
+
], ...(pele === "outline" ? MARCA_DO_CONTORNO : null), ...resto, children: [traco, children] }));
|
|
254
258
|
}
|
|
255
259
|
const corpo = (_jsxs(_Fragment, { children: [traco, children, action != null && _jsx(View, { style: s.acaoDaMarca, children: action })] }));
|
|
256
|
-
const pele = (_jsx(View, { style: [s.cardBase, s[`card_${variant ?? "base"}`], contorno, traco != null && s.comTraco, style], ...resto, children: corpo }));
|
|
260
|
+
const pele = (_jsx(View, { style: [s.cardBase, s[`card_${variant ?? "base"}`], contorno, traco != null && s.comTraco, style], ...(variant === "outline" ? MARCA_DO_CONTORNO : null), ...resto, children: corpo }));
|
|
257
261
|
// 🔴 SOBRE O AMARELO A COR DO TEXTO NÃO É ESCOLHA, É OBRIGAÇÃO — e os números decidiram isto.
|
|
258
262
|
// Medido nos dois temas, texto contra o `primary`:
|
|
259
263
|
// texto comum ........ 10,34 no claro · **1,83 no escuro** 🔴 ilegível
|
package/dist/menu.js
CHANGED
|
@@ -81,7 +81,9 @@ const folha = criarFolha((t) => ({
|
|
|
81
81
|
// O ponto do rádio: 8, o da referência e o `.menu-ponto` da web. Forma, não ícone.
|
|
82
82
|
ponto: {
|
|
83
83
|
width: t.size.space2, height: t.size.space2, ...canto(t.size.radiusFull),
|
|
84
|
-
|
|
84
|
+
// A cor do ponto é a do TEXTO da linha, como na web (`.menu-ponto` pinta com `currentColor`) — era o destaque, azul
|
|
85
|
+
// no claro e amarelo no escuro (bloco 1, 23/10/2026).
|
|
86
|
+
backgroundColor: t.color.foreground,
|
|
85
87
|
},
|
|
86
88
|
// O rótulo de seção: 14 em peso médio e esmaecido (no componente), alinhado ao texto dos itens.
|
|
87
89
|
rotuloDoGrupo: { paddingHorizontal: t.size.space3, paddingTop: t.size.space2, paddingBottom: t.size.space1 },
|
|
@@ -379,7 +381,7 @@ function renderizar(items, prefixo, paiSub, ctx) {
|
|
|
379
381
|
case "checkbox": {
|
|
380
382
|
const cb = it;
|
|
381
383
|
const ligado = cb.checked ?? ctx.marcado[k] ?? cb.defaultChecked ?? false;
|
|
382
|
-
return (_jsx(Linha, { ctx: ctx, papel: "checkbox", rotulo: cb.label, icone: cb.leadingIcon, estado: { checked: ligado }, inativo: !!cb.disabled || apagado(k, subAberto), marca: ligado ? _jsx(Icon, { name: "check", size: "sm", color: ctx.tf.color.
|
|
384
|
+
return (_jsx(Linha, { ctx: ctx, papel: "checkbox", rotulo: cb.label, icone: cb.leadingIcon, estado: { checked: ligado }, inativo: !!cb.disabled || apagado(k, subAberto), marca: ligado ? _jsx(Icon, { name: "check", size: "sm", color: ctx.tf.color.foreground }) : null, aoTocar: () => {
|
|
383
385
|
// Alterna e FICA aberto — a escolha múltipla da referência e o item da web.
|
|
384
386
|
if (cb.checked === undefined)
|
|
385
387
|
ctx.marcar(k, !ligado);
|
package/dist/midia.js
CHANGED
|
@@ -37,7 +37,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
37
37
|
// `render` a web troca o elemento pelo `useRender` do Base UI. Aqui é `cloneElement`,
|
|
38
38
|
// e serve ao mesmo caso real: o consumidor que já usa `expo-image`.
|
|
39
39
|
import * as React from "react";
|
|
40
|
-
import { Image as ImageRN, Pressable, View, } from "react-native";
|
|
40
|
+
import { Image as ImageRN, Platform, Pressable, View, } from "react-native";
|
|
41
41
|
import { canto, criarFolha, estadoAcessivel } from "./estilos.js";
|
|
42
42
|
import { Icon } from "./icon.js";
|
|
43
43
|
import { Grid } from "./layout.js";
|
|
@@ -184,14 +184,17 @@ export function Gallery({ items, label, selected, onSelect, zoom, ratio = 1, min
|
|
|
184
184
|
? _jsx(Text, { size: "sm", numberOfLines: 2, children: item.caption })
|
|
185
185
|
: item.caption)] }));
|
|
186
186
|
if (!interativo) {
|
|
187
|
-
return _jsx(View, { style: s.ladrilho, children: miolo }, item.id);
|
|
187
|
+
return _jsx(View, { role: "listitem", style: s.ladrilho, children: miolo }, item.id);
|
|
188
188
|
}
|
|
189
|
-
return (_jsx(Pressable, { testID: testID ? `${testID}-${item.id}` : undefined, onPress: () => { onSelect?.(item.id); if (zoom)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
return (_jsx(View, { role: "listitem", children: _jsx(Pressable, { testID: testID ? `${testID}-${item.id}` : undefined, onPress: () => { onSelect?.(item.id); if (zoom)
|
|
190
|
+
setAmpliado(item.id); },
|
|
191
|
+
// `imagebutton` é o papel do aparelho (botão com imagem); o `react-native-web` não o traduz e jogava o
|
|
192
|
+
// papel fora — no navegador é `button` (bloco 1, 24/10/2026).
|
|
193
|
+
accessibilityRole: "imagebutton", role: Platform.OS === "web" ? "button" : undefined,
|
|
194
|
+
// Com legenda, o nome do ladrilho é a legenda e a imagem já saiu da árvore (o
|
|
195
|
+
// `alt=""` acima). Sem legenda, o nome é o `alt`.
|
|
196
|
+
accessibilityLabel: temLegenda && typeof item.caption === "string"
|
|
197
|
+
? item.caption : item.alt, ...estadoAcessivel({ selected: item.id === selected }, "button"), style: [s.ladrilho, item.id === selected && s.ladrilhoEscolhido], children: miolo }) }, item.id));
|
|
195
198
|
}) }), zoom && (_jsx(FotoAmpliada, { source: aberto?.source, title: aberto ? (typeof aberto.caption === "string" ? aberto.caption : aberto.alt) : "", alt: aberto?.alt ?? "", ratio: ratio, onClose: () => setAmpliado(null), testID: testID ? `${testID}-ampliada` : undefined }))] }));
|
|
196
199
|
}
|
|
197
200
|
/**
|
package/dist/navigation.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export interface BottomNavProps extends ViewProps {
|
|
|
20
20
|
/** O `id` do item corrente. */
|
|
21
21
|
current?: string;
|
|
22
22
|
variant?: AureaBottomNavVariant;
|
|
23
|
+
/**
|
|
24
|
+
* Como a aba escolhida se marca. Padrão: `capsule` — o amarelo da marca POR TRÁS do ícone, como o botão primário
|
|
25
|
+
* (decisão do Victor, 24/10/2026: *"O amarelo por trás, como o botão, na barra de baixo e na aba escolhida."*). ~~Era
|
|
26
|
+
* `none`: só a cor no ícone e no nome — no tema claro, o azul da letra de destaque.~~
|
|
27
|
+
*/
|
|
23
28
|
indicator?: AureaBottomNavIndicator;
|
|
24
29
|
/**
|
|
25
30
|
* `content` põe a pílula do tamanho das abas, no centro, em vez de ir de uma borda à outra.
|
package/dist/navigation.js
CHANGED
|
@@ -50,19 +50,27 @@ const folha = criarFolha((t) => ({
|
|
|
50
50
|
// a faixa comeria o toque em silêncio.
|
|
51
51
|
//
|
|
52
52
|
// `zSticky` é token (20), o mesmo `--z-sticky` que a web usa na mesma peça.
|
|
53
|
+
//
|
|
54
|
+
// 🔴 O QUE É SÓ DA `floating` MORA FORA DA `barra` (bloco 1, 24/10/2026). O `edge` desfazia a flutuação escrevendo
|
|
55
|
+
// `undefined` por cima (`zIndex`, `boxShadow`, `bottom`), e `undefined` não apaga: o `react-native-web` pula a chave e
|
|
56
|
+
// fica a de baixo — no navegador a barra encostada saía com a sombra e o `zIndex` da flutuante —, e no aparelho apaga
|
|
57
|
+
// só na montagem (ver `barra_content`, abaixo). Agora cada variação recebe só o que é dela.
|
|
53
58
|
barra: {
|
|
54
|
-
|
|
55
|
-
flexDirection: "row", gap: t.size.space1, margin: t.size.space4, padding: t.size.space1,
|
|
59
|
+
flexDirection: "row", gap: t.size.space1, padding: t.size.space1,
|
|
56
60
|
borderWidth: t.size.borderWidth, borderColor: "transparent",
|
|
61
|
+
},
|
|
62
|
+
barra_flutuante: {
|
|
63
|
+
position: "absolute", bottom: 0, zIndex: t.size.zSticky, margin: t.size.space4,
|
|
57
64
|
...canto(t.size.radiusControl), backgroundColor: t.color.card,
|
|
58
65
|
boxShadow: [t.shadow.shadowMd],
|
|
59
66
|
},
|
|
60
67
|
// `edge` encosta na borda: sem margem, sem raio, só a linha de cima — e continua NO FLUXO,
|
|
61
68
|
// porque uma barra encostada que flutuasse esconderia o fim da tela sem nada reservar.
|
|
69
|
+
// A posição, a margem e o canto vão escritos mesmo sendo o padrão: trocar `variant` com a tela aberta passa a escrever o
|
|
70
|
+
// valor da `edge` por cima do da `floating`, em vez de depender da chave que sumiu.
|
|
62
71
|
barra_edge: {
|
|
63
|
-
position: "relative",
|
|
64
|
-
|
|
65
|
-
borderWidth: 0, borderTopWidth: t.size.borderWidth, boxShadow: undefined,
|
|
72
|
+
position: "relative", margin: 0, paddingHorizontal: 0, ...canto(0), backgroundColor: t.color.background,
|
|
73
|
+
borderWidth: 0, borderTopWidth: t.size.borderWidth,
|
|
66
74
|
},
|
|
67
75
|
// A pílula CHEIA, de uma borda à outra menos a margem — o de sempre. Mora fora da `barra` para
|
|
68
76
|
// o `content` nunca precisar DESFAZER estes dois (ver abaixo).
|
|
@@ -212,8 +220,10 @@ const folha = criarFolha((t) => ({
|
|
|
212
220
|
paddingHorizontal: t.size.space3, paddingVertical: t.size.space1 + t.size.space05,
|
|
213
221
|
...canto(t.size.radiusControl),
|
|
214
222
|
},
|
|
215
|
-
// A aba escolhida: a mesma cápsula do `segmentoAtivo` (`inputs.tsx`),
|
|
216
|
-
|
|
223
|
+
// A aba escolhida: a mesma cápsula do `segmentoAtivo` (`inputs.tsx`) — desde 24/10/2026, o AMARELO do botão primário,
|
|
224
|
+
// sem sombra, com o nome na tinta do botão (decisão do Victor: *"as abas do Tabs deixe como a aba escolhida amarelo
|
|
225
|
+
// tudo"*). ~~Era o `segment` com a sombra pequena (ADR-0059).~~
|
|
226
|
+
abaDeTabAtiva: { backgroundColor: t.color.primary },
|
|
217
227
|
// `variant="secondary"` (R-12, 01/10/2026): a variante secundária da referência,
|
|
218
228
|
// com o fio da casa no lugar do indicador azul dela.
|
|
219
229
|
// fila (secundária) padding 0 · border-bottom 1px, cor da borda
|
|
@@ -238,6 +248,9 @@ const folha = criarFolha((t) => ({
|
|
|
238
248
|
// ── Stepper ────────────────────────────────────────────────────────────────────────────────
|
|
239
249
|
trilha: { flexDirection: "row" },
|
|
240
250
|
passo: { flex: 1, alignItems: "center" },
|
|
251
|
+
// O passo tocável: o item da lista leva o `flex: 1`, e o botão dentro dele, a largura toda — o alvo do toque não muda.
|
|
252
|
+
passoItem: { flex: 1 },
|
|
253
|
+
passoDentro: { alignItems: "center" },
|
|
241
254
|
bolinha: {
|
|
242
255
|
width: 32, height: 32, marginBottom: t.size.space2,
|
|
243
256
|
alignItems: "center", justifyContent: "center", ...canto(t.size.radiusFull),
|
|
@@ -318,7 +331,7 @@ const folha = criarFolha((t) => ({
|
|
|
318
331
|
* usa `Screen` (uma fileira de botões presa no pé, por exemplo), o número está em
|
|
319
332
|
* `useBottomNavSpace()`. Fora de um provedor os dois valem zero, e nada muda.
|
|
320
333
|
*/
|
|
321
|
-
export function BottomNav({ items, current, variant = "floating", indicator = "
|
|
334
|
+
export function BottomNav({ items, current, variant = "floating", indicator = "capsule", width = "full", label, style, ...rest }) {
|
|
322
335
|
const t = useAureaTokens();
|
|
323
336
|
const s = folha(t);
|
|
324
337
|
const strings = useAureaStrings();
|
|
@@ -335,7 +348,7 @@ export function BottomNav({ items, current, variant = "floating", indicator = "n
|
|
|
335
348
|
// sem o app calcular nada. A conta é a pílula (o que o layout mede) mais as DUAS margens
|
|
336
349
|
// mais a folga do sistema; `edge` conta zero, porque ela fica no fluxo e já encurta a tela.
|
|
337
350
|
onLayout: anotar == null ? undefined : (e) => anotar(flutua ? e.nativeEvent.layout.height + t.size.space4 * 2 + inset.bottom : 0), style: [
|
|
338
|
-
s.barra, justa ? s.barra_content : s.barra_cheia
|
|
351
|
+
s.barra, flutua ? [s.barra_flutuante, justa ? s.barra_content : s.barra_cheia] : s.barra_edge,
|
|
339
352
|
// 🔴 NO `floating` A FOLGA DO SISTEMA VAI POR FORA — conserto de 19/09/2026, visto em
|
|
340
353
|
// aparelho Samsung com os três botões (|||, ○, <).
|
|
341
354
|
//
|
|
@@ -421,7 +434,7 @@ export function BottomNav({ items, current, variant = "floating", indicator = "n
|
|
|
421
434
|
: (nomeVisivel ? it.label : _jsx(View, { style: s.rotuloEscondido, children: it.label }));
|
|
422
435
|
return (_jsx(Pressable, { onPress: it.onPress, disabled: it.disabled,
|
|
423
436
|
// `link` e não `tab`: uma aba troca um painel DESTA tela; isto troca de tela.
|
|
424
|
-
accessibilityRole: "link", accessibilityLabel: !nomeVisivel && typeof it.label === "string" ? it.label : undefined, ...estadoAcessivel({ selected: ativo, disabled: !!it.disabled }), style: [
|
|
437
|
+
accessibilityRole: "link", accessibilityLabel: !nomeVisivel && typeof it.label === "string" ? it.label : undefined, ...estadoAcessivel({ selected: ativo, disabled: !!it.disabled }, "link"), style: [
|
|
425
438
|
s.aba, justa && s.aba_content,
|
|
426
439
|
indicator === "subtle" && { ...canto(t.size.radiusCard - t.size.space1) },
|
|
427
440
|
ativo && (indicator === "subtle" || indicator === "pill")
|
|
@@ -513,7 +526,7 @@ export function NavList({ items, chevron = "caret-right", style, ...rest }) {
|
|
|
513
526
|
? _jsx(Text, { size: "xs", tone: "muted", numberOfLines: 1, children: it.description })
|
|
514
527
|
: it.description)] }), it.indicators && it.indicators.length > 0 && (_jsx(View, { style: s.sinais, children: it.indicators.map((x) => (_jsx(View, { accessibilityLabel: x.label, children: _jsx(Icon, { name: x.icon, size: "sm", color: t.color.mutedForeground }) }, x.label))) })), valorEhTexto && _jsx(Text, { size: "sm", tone: "muted", children: it.value }), temAcao && chevron
|
|
515
528
|
&& _jsx(Icon, { name: chevron, size: "sm", color: t.color.mutedForeground })] }));
|
|
516
|
-
return (_jsxs(View, { style: [s.linha, it.disabled && { opacity: t.size.opacityDisabled }], children: [temAcao ? (_jsx(Pressable, { onPress: it.onPress, disabled: it.disabled, accessibilityRole: "link", ...estadoAcessivel({ disabled: !!it.disabled }), style: s.linhaMiolo, children: miolo })) : (_jsx(View, { accessible: true, ...estadoAcessivel({ disabled: !!it.disabled }), style: s.linhaMiolo, children: miolo })), !valorEhTexto && it.value != null ? it.value : null] }, it.id));
|
|
529
|
+
return (_jsxs(View, { role: "listitem", style: [s.linha, it.disabled && { opacity: t.size.opacityDisabled }], children: [temAcao ? (_jsx(Pressable, { onPress: it.onPress, disabled: it.disabled, accessibilityRole: "link", ...estadoAcessivel({ disabled: !!it.disabled }), style: s.linhaMiolo, children: miolo })) : (_jsx(View, { accessible: true, ...estadoAcessivel({ disabled: !!it.disabled }), style: s.linhaMiolo, children: miolo })), !valorEhTexto && it.value != null ? it.value : null] }, it.id));
|
|
517
530
|
}) }));
|
|
518
531
|
}
|
|
519
532
|
/**
|
|
@@ -530,7 +543,8 @@ export function Stepper({ items, label, doneIcon = "check", errorIcon = "x-circl
|
|
|
530
543
|
return (_jsx(View, { accessibilityRole: "list", accessibilityLabel: label ?? strings.stepperLabel, style: [s.trilha, style], ...rest, children: items.map((it, n) => {
|
|
531
544
|
const st = it.state ?? "default";
|
|
532
545
|
const cor = st === "error" ? (t.color.danger400 ?? t.color.destructive)
|
|
533
|
-
|
|
546
|
+
// o passo atual na cor do TEXTO, como na web (`.step-active`) — era o destaque, azul no claro (23/10/2026)
|
|
547
|
+
: st === "active" ? t.color.foreground
|
|
534
548
|
: t.color.foreground;
|
|
535
549
|
const miolo = (_jsxs(_Fragment, { children: [_jsx(View, { style: [
|
|
536
550
|
s.bolinha,
|
|
@@ -545,7 +559,9 @@ export function Stepper({ items, label, doneIcon = "check", errorIcon = "x-circl
|
|
|
545
559
|
: it.label, it.optional != null && (typeof it.optional === "string"
|
|
546
560
|
? _jsx(Text, { size: "xs", tone: "muted", align: "center", children: it.optional })
|
|
547
561
|
: it.optional)] }));
|
|
548
|
-
|
|
562
|
+
// O item da lista é o passo; o tocável fica DENTRO dele (o papel de item não pode ir no botão). Na web, o passo
|
|
563
|
+
// atual é `aria-current="step"` (bloco 1, 24/10/2026).
|
|
564
|
+
return it.onPress ? (_jsx(View, { role: "listitem", style: s.passoItem, children: _jsx(Pressable, { onPress: it.onPress, accessibilityRole: "button", ...estadoAcessivel({ selected: st === "active" }, "step"), style: s.passoDentro, children: miolo }) }, n)) : (_jsx(View, { role: "listitem", accessible: true, ...estadoAcessivel({ selected: st === "active" }, "step"), style: s.passo, children: miolo }, n));
|
|
549
565
|
}) }));
|
|
550
566
|
}
|
|
551
567
|
/**
|
|
@@ -594,7 +610,11 @@ export function Tabs({ tabs, value, onChange, label, justify, variant = "primary
|
|
|
594
610
|
ativa && !secundaria && s.abaDeTabAtiva,
|
|
595
611
|
it.disabled && { opacity: t.size.opacityDisabled },
|
|
596
612
|
], children: [typeof it.label === "string"
|
|
597
|
-
? _jsx(Text, { size: "sm", weight: secundaria ? (ativa ? 600 : 400) : 500,
|
|
613
|
+
? _jsx(Text, { size: "sm", weight: secundaria ? (ativa ? 600 : 400) : 500,
|
|
614
|
+
// Na cápsula escolhida (amarela, 24/10/2026), o nome vai na tinta do botão; na secundária, a
|
|
615
|
+
// cor do texto de sempre, sobre o fio amarelo.
|
|
616
|
+
style: { color: !ativa ? t.color.mutedForeground
|
|
617
|
+
: secundaria ? t.color.foreground : t.color.primaryForeground }, children: it.label })
|
|
598
618
|
: it.label, ativa && secundaria && _jsx(View, { style: s.fioDaAba })] }, it.id));
|
|
599
619
|
}) }) }), aberta && panel === "plain" ? (_jsx(View, { accessibilityLabel: typeof aberta.label === "string" ? aberta.label : undefined, style: s.painel, children: aberta.content })) : aberta ? (_jsx(Card, { variant: "inset", accessibilityLabel: typeof aberta.label === "string" ? aberta.label : undefined, style: s.painel, children: aberta.content })) : null] }));
|
|
600
620
|
}
|
package/dist/screen.d.ts
CHANGED
|
@@ -40,8 +40,8 @@ export interface ScreenProps extends ViewProps {
|
|
|
40
40
|
* A borda de baixo dele fica `space4` acima do topo da área do sistema, a mesma conta do
|
|
41
41
|
* `BottomNav` flutuante. Dentro de um `BottomNavProvider`, ele sobe acima da barra de abas.
|
|
42
42
|
*
|
|
43
|
-
* ⚠ **Sem gancho de inset, de propósito.** A `Screen` não exige `SafeAreaProvider` acima
|
|
44
|
-
* `useSafeAreaInsets` exige. Quando a tela não pega a borda de baixo (`edges` sem `"bottom"`), o
|
|
43
|
+
* ⚠ **Sem gancho de inset, de propósito.** A `Screen` não exige `SafeAreaProvider` acima (no
|
|
44
|
+
* navegador ela leva o próprio), e `useSafeAreaInsets` exige. Quando a tela não pega a borda de baixo (`edges` sem `"bottom"`), o
|
|
45
45
|
* rodapé ganha a própria `SafeAreaView` só nessa borda — a mesma peça nativa que a raiz já usa.
|
|
46
46
|
*/
|
|
47
47
|
footer?: React.ReactNode;
|
|
@@ -61,11 +61,12 @@ export interface ScreenProps extends ViewProps {
|
|
|
61
61
|
* Com ele, o padding vai para o `contentContainerStyle` — que é o certo, porque padding no
|
|
62
62
|
* `ScrollView` em si recorta a área rolável e deixa a barra de rolagem para dentro.
|
|
63
63
|
*
|
|
64
|
-
* ⚠ **Não precisa de `SafeAreaProvider` acima.**
|
|
65
|
-
* nativa e lê o inset do sistema sozinha (medido no fonte da 5.9.1: ela não consome
|
|
66
|
-
* nenhum). Quem exige o provider são os HOOKS — e quem usa `react-navigation` já o tem.
|
|
64
|
+
* ⚠ **Não precisa de `SafeAreaProvider` acima.** No aparelho, o `SafeAreaView` da biblioteca é
|
|
65
|
+
* uma view nativa e lê o inset do sistema sozinha (medido no fonte da 5.9.1: ela não consome
|
|
66
|
+
* contexto nenhum). Quem exige o provider são os HOOKS — e quem usa `react-navigation` já o tem.
|
|
67
|
+
* No navegador é diferente, e a `Screen` resolve sozinha (ver abaixo).
|
|
67
68
|
*/
|
|
68
|
-
export declare function Screen(
|
|
69
|
+
export declare function Screen(props: ScreenProps): React.JSX.Element;
|
|
69
70
|
/** O recuo de baixo do sistema (barra de botões ou de gestos), em dp. */
|
|
70
71
|
export declare function useRecuoDoSistema(): number;
|
|
71
72
|
/**
|
package/dist/screen.js
CHANGED
|
@@ -38,7 +38,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
38
38
|
// suportado** na soma. Os tokens da Aurea são todos numéricos (dp), então isto não morde aqui —
|
|
39
39
|
// mas morde quem passar `padding: "5%"` no `style`.
|
|
40
40
|
import * as React from "react";
|
|
41
|
-
import { Keyboard, RefreshControl, ScrollView, View } from "react-native";
|
|
41
|
+
import { Keyboard, Platform, RefreshControl, ScrollView, View } from "react-native";
|
|
42
42
|
import { SafeAreaInsetsContext, SafeAreaView, initialWindowMetrics } from "react-native-safe-area-context";
|
|
43
43
|
import { useBottomNavSpace } from "./barranav.js";
|
|
44
44
|
import { criarFolha } from "./estilos.js";
|
|
@@ -80,11 +80,31 @@ const TODAS_AS_BORDAS = ["top", "right", "bottom", "left"];
|
|
|
80
80
|
* Com ele, o padding vai para o `contentContainerStyle` — que é o certo, porque padding no
|
|
81
81
|
* `ScrollView` em si recorta a área rolável e deixa a barra de rolagem para dentro.
|
|
82
82
|
*
|
|
83
|
-
* ⚠ **Não precisa de `SafeAreaProvider` acima.**
|
|
84
|
-
* nativa e lê o inset do sistema sozinha (medido no fonte da 5.9.1: ela não consome
|
|
85
|
-
* nenhum). Quem exige o provider são os HOOKS — e quem usa `react-navigation` já o tem.
|
|
83
|
+
* ⚠ **Não precisa de `SafeAreaProvider` acima.** No aparelho, o `SafeAreaView` da biblioteca é
|
|
84
|
+
* uma view nativa e lê o inset do sistema sozinha (medido no fonte da 5.9.1: ela não consome
|
|
85
|
+
* contexto nenhum). Quem exige o provider são os HOOKS — e quem usa `react-navigation` já o tem.
|
|
86
|
+
* No navegador é diferente, e a `Screen` resolve sozinha (ver abaixo).
|
|
86
87
|
*/
|
|
87
|
-
export function Screen(
|
|
88
|
+
export function Screen(props) {
|
|
89
|
+
// 🔴 NO NAVEGADOR, A `SafeAreaView` DA BIBLIOTECA É O GANCHO — bloco 1, 24/10/2026. A versão web
|
|
90
|
+
// dela (`SafeAreaView.web.tsx`, 5.9.1) chama `useSafeAreaInsets`, que LEVANTA ERRO sem
|
|
91
|
+
// `SafeAreaProvider` acima: a `Screen` quebrava num app do Expo aberto no navegador, e o
|
|
92
|
+
// comentário acima prometia o contrário. Sem provedor, a `Screen` põe a folga ZERADA no contexto —
|
|
93
|
+
// só no navegador; no aparelho nada muda.
|
|
94
|
+
// ⚠ Zerada, e não o `SafeAreaProvider` da biblioteca: o do navegador mede a caixa contra a JANELA e
|
|
95
|
+
// dá folga de baixo errada a toda tela que não começa no topo dela — medido na bancada (2.573) e
|
|
96
|
+
// na página do site (93 a 2.054), com o rodapé fora do pé. Decisão do Victor, 24/10/2026, vendo as
|
|
97
|
+
// duas lado a lado ("a alternativa: a folga zerada, sem medir"). O que se perde: a tela não se
|
|
98
|
+
// afasta sozinha do entalhe quando o app instalado no iPhone pelo navegador cobre a tela inteira —
|
|
99
|
+
// quem precisa disso põe o `SafeAreaProvider` na raiz, e ele vale.
|
|
100
|
+
const temProvedor = React.useContext(SafeAreaInsetsContext) != null;
|
|
101
|
+
if (Platform.OS === "web" && !temProvedor) {
|
|
102
|
+
return _jsx(SafeAreaInsetsContext.Provider, { value: SEM_FOLGA, children: _jsx(CascaDaTela, { ...props }) });
|
|
103
|
+
}
|
|
104
|
+
return _jsx(CascaDaTela, { ...props });
|
|
105
|
+
}
|
|
106
|
+
const SEM_FOLGA = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
107
|
+
function CascaDaTela({ edges = TODAS_AS_BORDAS, padded = true, scroll = false, background = "background", onRefresh, refreshing, footer, style, children, ...rest }) {
|
|
88
108
|
const t = useAureaTokens();
|
|
89
109
|
const s = folha(t);
|
|
90
110
|
const fundo = s[`fundo_${background}`];
|
|
@@ -92,6 +112,8 @@ export function Screen({ edges = TODAS_AS_BORDAS, padded = true, scroll = false,
|
|
|
92
112
|
// **Zero** fora de um `BottomNavProvider`, que é o caso de toda tela cheia: sem abas, nada muda.
|
|
93
113
|
const respiroDaBarra = useBottomNavSpace();
|
|
94
114
|
return (_jsxs(SafeAreaView, { style: [s.raiz, fundo, !scroll && padded && s.respiro, style], edges: edges, ...rest, children: [scroll ? (_jsx(ScrollView, { style: s.raiz,
|
|
115
|
+
// No navegador, a área que rola precisa de uma parada de Tab para quem usa o teclado (bloco 1, 24/10/2026).
|
|
116
|
+
focusable: Platform.OS === "web",
|
|
95
117
|
// ⚠ O respiro da barra SOMA ao do tema em vez de substituí-lo: escrever
|
|
96
118
|
// `paddingBottom` depois de `s.respiro` apagaria os 16 do tema e colaria o último
|
|
97
119
|
// item na pílula. A conta é explícita porque a folha não soma sozinha.
|
package/dist/sistema.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface DatePickerProps {
|
|
|
11
11
|
maximumDate?: Date;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
size?: AureaFieldSize;
|
|
14
|
-
/** Como a data vira texto no gatilho. Padrão: o formato do aparelho
|
|
14
|
+
/** Como a data vira texto no gatilho. Padrão: o formato do aparelho — a data, ou a hora e os minutos no `mode="time"`. */
|
|
15
15
|
format?: (d: Date) => string;
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
icon?: AureaIcon | false;
|
package/dist/sistema.js
CHANGED
|
@@ -149,9 +149,14 @@ export function DatePicker({ value, onChange, mode = "date", minimumDate, maximu
|
|
|
149
149
|
const inativo = disabled ?? campo?.disabled;
|
|
150
150
|
// Só o iOS precisa manter o seletor na árvore; no Android o diálogo é do sistema e some sozinho.
|
|
151
151
|
const [abertoNoIOS, setAbertoNoIOS] = React.useState(false);
|
|
152
|
+
// No `mode="time"` o gatilho escreve a HORA, e o vazio pede um horário (bloco 1, 24/10/2026): sem `format`, ele
|
|
153
|
+
// escrevia a data do dia e dizia "Pick a date" — a pessoa escolhia 14:30 e via 24/10/2026.
|
|
154
|
+
const vazio = placeholder ?? (mode === "time" ? strings.timePlaceholder : strings.datePlaceholder);
|
|
152
155
|
const texto = value
|
|
153
|
-
? (format ? format(value)
|
|
154
|
-
|
|
156
|
+
? (format ? format(value)
|
|
157
|
+
: mode === "time" ? value.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" })
|
|
158
|
+
: value.toLocaleDateString())
|
|
159
|
+
: vazio;
|
|
155
160
|
const receber = React.useCallback((evento, data) => {
|
|
156
161
|
setAbertoNoIOS(false);
|
|
157
162
|
// `dismissed` é a pessoa cancelando. Chamar `onChange` aí gravaria uma data que ninguém
|
|
@@ -189,7 +194,7 @@ export function DatePicker({ value, onChange, mode = "date", minimumDate, maximu
|
|
|
189
194
|
min: minimumDate && mode === "date" ? paraCampoWeb(minimumDate, mode) : undefined,
|
|
190
195
|
max: maximumDate && mode === "date" ? paraCampoWeb(maximumDate, mode) : undefined,
|
|
191
196
|
disabled: inativo,
|
|
192
|
-
"aria-label": campo?.label ?? (value ? texto :
|
|
197
|
+
"aria-label": campo?.label ?? (value ? texto : vazio),
|
|
193
198
|
"aria-invalid": campo?.invalido || undefined,
|
|
194
199
|
"aria-description": campo?.hint,
|
|
195
200
|
"data-testid": testID ? `${testID}-campo` : undefined,
|
|
@@ -328,7 +333,9 @@ export function PhotoInput({ value = [], onChange, max = 1, source = "camera", d
|
|
|
328
333
|
});
|
|
329
334
|
onChange?.([...value, ...novas]);
|
|
330
335
|
}, [source, max, value, onChange, onPermissionDenied, exif]);
|
|
331
|
-
return (_jsxs(View, { testID: testID, style: style, children: [negadoDeVez && (_jsx(Alert, { variant: "warning", children: _jsxs(View, { style: { gap: t.size.space2 }, children: [_jsx(Text, { size: "sm", tone: "muted", children: strings.cameraDenied }), offerSettings && (_jsx(Pressable, { onPress: () => Linking.openSettings(), accessibilityRole: "button", accessibilityLabel: strings.openSettings, children: _jsx(Text, { size: "sm", weight: 600, tone: "primary", children: strings.openSettings }) }))] }) })), _jsxs(View, { style: [s.galeria, value.length > 0 && s.comX], children: [value.map((foto, n) => (_jsxs(View, { style: s.miniatura, children: [_jsx(Pressable, { onPress: () => setAberta(n),
|
|
336
|
+
return (_jsxs(View, { testID: testID, style: style, children: [negadoDeVez && (_jsx(Alert, { variant: "warning", children: _jsxs(View, { style: { gap: t.size.space2 }, children: [_jsx(Text, { size: "sm", tone: "muted", children: strings.cameraDenied }), offerSettings && (_jsx(Pressable, { onPress: () => Linking.openSettings(), accessibilityRole: "button", accessibilityLabel: strings.openSettings, children: _jsx(Text, { size: "sm", weight: 600, tone: "primary", children: strings.openSettings }) }))] }) })), _jsxs(View, { style: [s.galeria, value.length > 0 && s.comX], children: [value.map((foto, n) => (_jsxs(View, { style: s.miniatura, children: [_jsx(Pressable, { onPress: () => setAberta(n),
|
|
337
|
+
// No navegador o `react-native-web` não traduz `imagebutton` e joga o papel fora (bloco 1, 24/10/2026).
|
|
338
|
+
accessibilityRole: "imagebutton", role: Platform.OS === "web" ? "button" : undefined, accessibilityLabel: nomeDa(n), accessibilityHint: strings.photoOpen, children: _jsx(Image, { source: foto.uri, alt: "", ratio: 1 }) }), _jsx(View, { style: s.remover, children: _jsx(IconButton, { appearance: "solid", size: "sm", name: removeIcon, label: `${strings.photoRemove} ${n + 1}`, disabled: inativo, onPress: () => onChange?.(value.filter((_, i) => i !== n)) }) })] }, `${foto.uri}-${n}`))), !cheio && (_jsx(Pressable, { onPress: inativo ? undefined : escolher, disabled: inativo, accessibilityRole: "button", accessibilityLabel: campo?.label ?? strings.photoAdd, ...estadoAcessivel({ disabled: !!inativo }), style: [s.adicionar, inativo && s.desabilitado], children: addIcon && _jsx(Icon, { name: addIcon, size: "lg", color: t.color.subtleForeground }) }))] }), _jsx(FotoAmpliada, { source: fotoAberta?.uri, title: aberta != null ? nomeDa(aberta) : "", alt: aberta != null ? nomeDa(aberta) : "",
|
|
332
339
|
// A proporção da foto, quando a câmera a deu: a grande aparece inteira, sem tarja à toa.
|
|
333
340
|
ratio: fotoAberta?.width && fotoAberta.height ? fotoAberta.width / fotoAberta.height : 1, onClose: () => setAberta(null) })] }));
|
|
334
341
|
}
|
package/dist/strings.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export interface AureaStrings {
|
|
|
32
32
|
stepperLabel: string;
|
|
33
33
|
/** O que o `DatePicker` mostra quando não há data escolhida. */
|
|
34
34
|
datePlaceholder: string;
|
|
35
|
+
/** O que o `DatePicker` com `mode="time"` mostra quando não há hora escolhida. */
|
|
36
|
+
timePlaceholder: string;
|
|
35
37
|
/** O que o `PhotoInput` diz quando a pessoa negou a câmera e o sistema não vai perguntar de novo. */
|
|
36
38
|
cameraDenied: string;
|
|
37
39
|
/** O botão que leva às configurações do app. */
|
|
@@ -93,6 +95,8 @@ export interface AureaStrings {
|
|
|
93
95
|
* campo próprio, que precisa de nome mesmo quando ninguém passou um.
|
|
94
96
|
*/
|
|
95
97
|
comboboxSearch: string;
|
|
98
|
+
/** O nome do botão da setinha do `Combobox`, no navegador (a mesma frase da web — ADR-0081, 24/10/2026). */
|
|
99
|
+
comboboxOpen: string;
|
|
96
100
|
/**
|
|
97
101
|
* O botão que apaga o que foi digitado numa busca — no `SearchField` e no campo da folha do
|
|
98
102
|
* `Combobox`. **Não existe na web** pela mesma razão: lá o `type="search"` do navegador desenha
|
package/dist/strings.js
CHANGED
|
@@ -37,6 +37,7 @@ export const defaultStrings = {
|
|
|
37
37
|
tabsLabel: "Tabs",
|
|
38
38
|
stepperLabel: "Steps",
|
|
39
39
|
datePlaceholder: "Pick a date",
|
|
40
|
+
timePlaceholder: "Pick a time",
|
|
40
41
|
cameraDenied: "Camera access is off. Turn it on in Settings to attach a photo.",
|
|
41
42
|
openSettings: "Open Settings",
|
|
42
43
|
photoRemove: "Remove photo",
|
|
@@ -62,6 +63,7 @@ export const defaultStrings = {
|
|
|
62
63
|
themeToLight: "Switch to light theme",
|
|
63
64
|
comboboxLoading: "Loading…",
|
|
64
65
|
comboboxSearch: "Search",
|
|
66
|
+
comboboxOpen: "Open list",
|
|
65
67
|
searchClear: "Clear search",
|
|
66
68
|
galleryLabel: "Gallery",
|
|
67
69
|
fileChoose: "Choose file",
|
|
@@ -89,6 +91,7 @@ export const ptBR = {
|
|
|
89
91
|
tabsLabel: "Abas",
|
|
90
92
|
stepperLabel: "Etapas",
|
|
91
93
|
datePlaceholder: "Escolher data",
|
|
94
|
+
timePlaceholder: "Escolher horário",
|
|
92
95
|
cameraDenied: "O acesso à câmera está desligado. Ligue nas configurações para anexar uma foto.",
|
|
93
96
|
openSettings: "Abrir configurações",
|
|
94
97
|
photoRemove: "Remover foto",
|
|
@@ -114,6 +117,7 @@ export const ptBR = {
|
|
|
114
117
|
themeToLight: "Mudar para o tema claro",
|
|
115
118
|
comboboxLoading: "Carregando…",
|
|
116
119
|
comboboxSearch: "Buscar",
|
|
120
|
+
comboboxOpen: "Abrir lista",
|
|
117
121
|
searchClear: "Limpar busca",
|
|
118
122
|
galleryLabel: "Galeria",
|
|
119
123
|
fileChoose: "Escolher arquivo",
|
package/dist/text.js
CHANGED
|
@@ -21,7 +21,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
21
21
|
// que os tokens já publicam seria uma segunda verdade sobre tipografia.
|
|
22
22
|
import * as React from "react";
|
|
23
23
|
import { Text as TextRN } from "react-native";
|
|
24
|
-
import { canto, criarFolha, letraDoToken } from "./estilos.js";
|
|
24
|
+
import { canto, criarFolha, letraDoAmarelo, letraDoToken } from "./estilos.js";
|
|
25
25
|
import { useAureaTokens, useSobreAMarca } from "./theme.js";
|
|
26
26
|
// 🔴 A ESCALA TEM CINCO DEGRAUS QUE SE ENXERGAM, E DEZ NOMES — ordem do Victor, 19/09/2026,
|
|
27
27
|
// olhando o app no aparelho: *"o tamanho das fontes: existem variações demais, fica muito
|
|
@@ -84,10 +84,10 @@ const PAPEL = {
|
|
|
84
84
|
};
|
|
85
85
|
const COR = {
|
|
86
86
|
default: "foreground", muted: "mutedForeground", subtle: "subtleForeground",
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
87
|
+
// `primary` escreve com a LETRA do amarelo (`letraDoAmarelo`, logo abaixo, na folha): no claro, o amarelo da marca
|
|
88
|
+
// misturado com a cor do texto, como a referência faz com a letra do amarelo dela; no escuro, o amarelo. Decisão do
|
|
89
|
+
// Victor, 24/10/2026, vendo a referência ao lado (~~o amarelo de PREENCHER puro, 1,73:1 no claro~~; ~~a letra de
|
|
90
|
+
// destaque da ADR-0081, o azul no claro~~, que ficou só na web).
|
|
91
91
|
primary: "primary", link: "link", danger: "destructive", success: "success",
|
|
92
92
|
warning: "warning", info: "info",
|
|
93
93
|
};
|
|
@@ -102,6 +102,8 @@ const folha = criarFolha((t) => {
|
|
|
102
102
|
// fundo — no escuro, ~2,5:1. Achado na 0.28.0; `paleta-adr0061.test.tsx` cobra.
|
|
103
103
|
tons[tom] = { color: letraDoToken(t, token) ?? t.color.foreground };
|
|
104
104
|
}
|
|
105
|
+
// O `primary` escreve com a LETRA do amarelo (24/10/2026): no claro, o amarelo misturado com o texto, como a referência.
|
|
106
|
+
tons.primary = { color: letraDoAmarelo(t) };
|
|
105
107
|
return tons;
|
|
106
108
|
});
|
|
107
109
|
/**
|
|
@@ -171,7 +173,10 @@ function papelDe(type, { color, weight, align, truncate, style, ...rest }) {
|
|
|
171
173
|
}
|
|
172
174
|
/** Título. Marca `accessibilityRole="header"` sozinho, como a referência. */
|
|
173
175
|
export function Heading({ type = "h1", accessibilityRole = "header", ...rest }) {
|
|
174
|
-
|
|
176
|
+
// O nível vai junto: no aparelho o leitor de tela não usa nível, e a prop é ignorada; no navegador (`react-native-web`)
|
|
177
|
+
// o título sem `aria-level` vira sempre `<h1>` — medido no site: 28 `h1` na página do Heading (bloco 1, 23/10/2026).
|
|
178
|
+
const nivel = { "aria-level": Number(type.slice(1)) };
|
|
179
|
+
return papelDe(type, { accessibilityRole, ...nivel, ...rest });
|
|
175
180
|
}
|
|
176
181
|
/** Parágrafo de texto corrido, em três tamanhos: 16, 14 e 12. */
|
|
177
182
|
export function Paragraph({ type = "body", ...rest }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurea-uds/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "A Aurea UDS para React Native: o provider de tema e densidade, os componentes e os ícones do Phosphor sobre react-native-svg.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aurea",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"NOTICE"
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@aurea-uds/tokens": "^0.
|
|
58
|
+
"@aurea-uds/tokens": "^0.44.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@react-native-community/datetimepicker": ">=8",
|