@aurea-uds/native 0.70.0 → 0.72.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.js +7 -1
- package/dist/feedback.d.ts +2 -1
- package/dist/feedback.js +6 -4
- package/dist/navigation.js +5 -1
- package/dist/theme.js +2 -1
- package/dist/toast.d.ts +1 -1
- package/package.json +2 -2
package/dist/actions.js
CHANGED
|
@@ -237,7 +237,13 @@ function acabamentoDoBotao(t, glow, ring, appearance, tone, disabled, corDoTexto
|
|
|
237
237
|
return { acabamento, marcaDoAcabamento };
|
|
238
238
|
}
|
|
239
239
|
/** O corpo do `Button`. `semRecuo` é só do `LinkButton`: sem recuo, sem borda e sem altura. */
|
|
240
|
-
function CorpoDoBotao({ children, appearance
|
|
240
|
+
function CorpoDoBotao({ children, appearance: aparenciaPedida, tone: tomPedido, size = "md", leadingIcon, trailingIcon, leading, trailing, icons, fullWidth = false, pressed, disabled, accessibilityLabel, semRecuo = false, share, glow, ring, onPress, ...rest }) {
|
|
241
|
+
// 0.71.0 (o D3, como a web e a referência): sem `appearance` nem `tone`, o botão é o principal (cheio, na marca). Quem
|
|
242
|
+
// pede um dos eixos continua com o outro no de antes (cheio, neutro) — `appearance="ghost"` sozinho não vira amarelo.
|
|
243
|
+
const appearance = aparenciaPedida ?? "solid";
|
|
244
|
+
// O botão de ligar (`pressed`) sem tom continua neutro, como na web: o estado não pinta o botão aqui, e o principal
|
|
245
|
+
// ligado e desligado seriam iguais.
|
|
246
|
+
const tone = tomPedido ?? (aparenciaPedida === undefined && pressed === undefined ? "brand" : "neutral");
|
|
241
247
|
const t = useAureaTokens();
|
|
242
248
|
const aoTocar = useToqueComShare(share, onPress);
|
|
243
249
|
const s = folha(t);
|
package/dist/feedback.d.ts
CHANGED
|
@@ -115,7 +115,8 @@ export interface ProgressProps {
|
|
|
115
115
|
* ele não corre: a barra inteira, apagada, e nunca um pedaço parado, que leria como 40% feito.
|
|
116
116
|
*/
|
|
117
117
|
export declare function Progress({ value, label, detail, tone, style, testID }: ProgressProps): React.JSX.Element;
|
|
118
|
-
|
|
118
|
+
/** `neutral` (0.71.0, o D3, como a web e a referência): o ícone na cor do texto. É o padrão sem `variant` nem `state`. */
|
|
119
|
+
export type AureaAlertVariant = "neutral" | "info" | "success" | "warning" | "danger";
|
|
119
120
|
/** Mesmos quatro glifos do `feedback-client.tsx:43`. */
|
|
120
121
|
export declare const ICONE_DA_VARIANTE: Readonly<Record<AureaAlertVariant, IconName>>;
|
|
121
122
|
export interface AlertProps extends ViewProps {
|
package/dist/feedback.js
CHANGED
|
@@ -279,6 +279,7 @@ export function Progress({ value, label, detail, tone = "brand", style, testID }
|
|
|
279
279
|
}
|
|
280
280
|
/** Mesmos quatro glifos do `feedback-client.tsx:43`. */
|
|
281
281
|
export const ICONE_DA_VARIANTE = {
|
|
282
|
+
neutral: "info",
|
|
282
283
|
info: "info",
|
|
283
284
|
success: "check-circle",
|
|
284
285
|
warning: "warning",
|
|
@@ -307,18 +308,19 @@ accessibilityLabel, accessibilityHint, ...rest }) {
|
|
|
307
308
|
const t = useAureaTokens();
|
|
308
309
|
const s = folha(t);
|
|
309
310
|
const strings = useAureaStrings();
|
|
310
|
-
const v = variant ?? (state ? gravidadeDoEstado(state) : "
|
|
311
|
+
const v = variant ?? (state ? gravidadeDoEstado(state) : "neutral");
|
|
311
312
|
const corDoIcone = v === "success" ? (t.color.success400 ?? t.color.success)
|
|
312
313
|
: v === "warning" ? (t.color.warning400 ?? t.color.warning)
|
|
313
314
|
: v === "danger" ? (t.color.danger400 ?? t.color.destructive)
|
|
314
|
-
:
|
|
315
|
+
: v === "neutral" ? t.color.foreground
|
|
316
|
+
: (t.color.info400 ?? t.color.info);
|
|
315
317
|
return (_jsxs(View
|
|
316
318
|
// Android: a região viva é o que faz o leitor falar sem foco, e ela cobre a moldura
|
|
317
319
|
// inteira de propósito — o que muda é o conteúdo, e o "X" some junto quando o aviso fecha.
|
|
318
320
|
, {
|
|
319
321
|
// Android: a região viva é o que faz o leitor falar sem foco, e ela cobre a moldura
|
|
320
322
|
// inteira de propósito — o que muda é o conteúdo, e o "X" some junto quando o aviso fecha.
|
|
321
|
-
accessibilityLiveRegion: v === "danger" ? "assertive" : "polite", style: [s.alerta, style], ...rest, children: [_jsxs(View, { accessible: true, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, ...(v === "danger" ? { accessibilityRole: "alert" } : null), style: s.grupoDoAlerta, children: [_jsx(Icon, { name: icon ?? ICONE_DA_VARIANTE[v], size: "md", color: corDoIcone, weight: icon ? undefined : "fill" }), _jsxs(View, { style: s.corpoDoAlerta, children: [title != null && _jsx(Text, { size: "base", weight: 500, tone: v, children: title }), children != null
|
|
323
|
+
accessibilityLiveRegion: v === "danger" ? "assertive" : "polite", style: [s.alerta, style], ...rest, children: [_jsxs(View, { accessible: true, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, ...(v === "danger" ? { accessibilityRole: "alert" } : null), style: s.grupoDoAlerta, children: [_jsx(Icon, { name: icon ?? ICONE_DA_VARIANTE[v], size: "md", color: corDoIcone, weight: icon ? undefined : "fill" }), _jsxs(View, { style: s.corpoDoAlerta, children: [title != null && _jsx(Text, { size: "base", weight: 500, tone: v === "neutral" ? undefined : v, children: title }), children != null
|
|
322
324
|
? (typeof children === "string" ? _jsx(Text, { size: "xs", tone: "muted", children: children }) : children)
|
|
323
325
|
: state ? _jsx(Text, { size: "xs", tone: "muted", children: strings.universalState[state] }) : null] })] }), onDismiss ? _jsx(CloseButton, { label: strings.close, onPress: onDismiss }) : null] }));
|
|
324
326
|
}
|
|
@@ -366,7 +368,7 @@ export function DataState({ catchErrors, onCatch, ...props }) {
|
|
|
366
368
|
const strings = useAureaStrings();
|
|
367
369
|
if (!catchErrors)
|
|
368
370
|
return _jsx(CorpoDoDataState, { ...props });
|
|
369
|
-
return (_jsx(BarreiraDeErro, { onCatch: onCatch, falha: (tentar) => (_jsxs(View, { style: [s.regiao, props.style], children: [_jsx(Alert, { variant: "danger", children: props.message ?? strings.dataCrashed }), _jsx(View, { style: { alignSelf: "flex-start" }, children: _jsx(Button, { size: "sm", onPress: tentar, children: strings.dataRetry }) })] })), children: _jsx(CorpoDoDataState, { ...props }) }));
|
|
371
|
+
return (_jsx(BarreiraDeErro, { onCatch: onCatch, falha: (tentar) => (_jsxs(View, { style: [s.regiao, props.style], children: [_jsx(Alert, { variant: "danger", children: props.message ?? strings.dataCrashed }), _jsx(View, { style: { alignSelf: "flex-start" }, children: _jsx(Button, { tone: "neutral", size: "sm", onPress: tentar, children: strings.dataRetry }) })] })), children: _jsx(CorpoDoDataState, { ...props }) }));
|
|
370
372
|
}
|
|
371
373
|
function CorpoDoDataState({ state, message, skeleton, emptyTitle, emptyIcon, action, children, style, ...rest }) {
|
|
372
374
|
const t = useAureaTokens();
|
package/dist/navigation.js
CHANGED
|
@@ -292,7 +292,11 @@ const folha = criarFolha((t) => ({
|
|
|
292
292
|
// linha da tabela. (14/11/2026: vale também para a Ember.)
|
|
293
293
|
filaSecundariaComFio: { borderBottomWidth: t.size.borderWidth, borderColor: preenchimento(t, 2) },
|
|
294
294
|
abasSecundariasSemBorda: { borderBottomWidth: 0 },
|
|
295
|
+
// AS ABAS ENCHEM A FILA (2-C b, a 0.71.0, como a web): cada aba cresce e a fila ocupa a linha (`fill` na `FilaRolante`).
|
|
296
|
+
// A sobra se reparte por igual a partir do rótulo — no Yoga não existe o "mínimo do conteúdo" da web, e a base 0
|
|
297
|
+
// espremeria o rótulo quando não cabe; com a base do rótulo, quando não cabe, a fila rola, como antes.
|
|
295
298
|
abaSecundaria: {
|
|
299
|
+
flexGrow: 1,
|
|
296
300
|
alignItems: "center", justifyContent: "center", minHeight: t.size.controlHMd,
|
|
297
301
|
paddingHorizontal: t.size.space3, paddingVertical: t.size.space1 + t.size.space05,
|
|
298
302
|
},
|
|
@@ -705,7 +709,7 @@ export function Tabs({ tabs, value, onChange, label, justify, variant = "primary
|
|
|
705
709
|
const comFio = secundaria;
|
|
706
710
|
// S-04 (05/11/2026): a aba escolhida DESLIZA (`deslize.tsx`) — a cápsula amarela, e na secundária o fio de baixo.
|
|
707
711
|
const fila = useFilaQueDesliza(value);
|
|
708
|
-
return (_jsxs(View, { style: style, ...rest, children: [_jsx(FilaRolante, { justify: justify, style: comFio ? s.filaSecundariaComFio : undefined, marca: comFio ? { dataSet: { aureaLine: "tabs" } } : undefined, children: _jsxs(View, { accessibilityRole: "tablist", accessibilityLabel: label ?? strings.tabsLabel, style: secundaria ? [s.abasSecundarias, comFio && s.abasSecundariasSemBorda] : s.abas, children: [_jsx(IndicadorQueDesliza, { alvo: fila.alvo, aoFicarPronto: fila.aoFicarPronto, style: secundaria ? undefined : [canto(t.size.radiusControl), s.abaDeTabAtiva], children: secundaria ? _jsx(View, { style: s.fioDaAba }) : null }), tabs.map((it) => {
|
|
712
|
+
return (_jsxs(View, { style: style, ...rest, children: [_jsx(FilaRolante, { justify: justify, fill: secundaria || undefined, style: comFio ? s.filaSecundariaComFio : undefined, marca: comFio ? { dataSet: { aureaLine: "tabs" } } : undefined, children: _jsxs(View, { accessibilityRole: "tablist", accessibilityLabel: label ?? strings.tabsLabel, style: secundaria ? [s.abasSecundarias, { flexGrow: 1 }, comFio && s.abasSecundariasSemBorda] : s.abas, children: [_jsx(IndicadorQueDesliza, { alvo: fila.alvo, aoFicarPronto: fila.aoFicarPronto, style: secundaria ? undefined : [canto(t.size.radiusControl), s.abaDeTabAtiva], children: secundaria ? _jsx(View, { style: s.fioDaAba }) : null }), tabs.map((it) => {
|
|
709
713
|
const ativa = it.id === value;
|
|
710
714
|
return (_jsxs(Pressable, { onLayout: fila.medir(it.id), onPress: it.disabled ? undefined : () => onChange?.(it.id), disabled: it.disabled, accessibilityRole: "tab", ...estadoAcessivel({ selected: ativa, disabled: !!it.disabled }), accessibilityLabel: typeof it.label === "string" ? it.label : undefined, style: [
|
|
711
715
|
secundaria ? s.abaSecundaria : s.abaDeTab,
|
package/dist/theme.js
CHANGED
|
@@ -32,7 +32,8 @@ function aplicarModos(t, m) {
|
|
|
32
32
|
// CSS já assume quando ninguém declara `data-density`.
|
|
33
33
|
const DENSIDADE_PADRAO = "comfortable";
|
|
34
34
|
// `dark` é o que o catálogo inteiro declara no `<html>`, e o que a identidade da Aurea assume.
|
|
35
|
-
|
|
35
|
+
// O D16 (0.72.0, como a web): quando o aparelho não diz o tema, o claro. Era o escuro.
|
|
36
|
+
const TEMA_PADRAO = "light";
|
|
36
37
|
const Contexto = React.createContext(null);
|
|
37
38
|
export function AureaProvider({ children, theme, density, brand, defaultTheme, defaultDensity, fontFamilies, icons, strings, direction, highContrast, textSize, onThemeChange, onDensityChange, }) {
|
|
38
39
|
// Os modos de leitura herdam do provedor de fora quando este não diz (o tema num pedaço continua com eles).
|
package/dist/toast.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type StyleProp, type ViewStyle } from "react-native";
|
|
|
3
3
|
import { type AureaIcon } from "./icon.js";
|
|
4
4
|
import { type AureaAlertVariant } from "./feedback.js";
|
|
5
5
|
/** As mesmas quatro faces do `AureaToastType` da web (`system.tsx:65`). */
|
|
6
|
-
export type AureaToastType = AureaAlertVariant
|
|
6
|
+
export type AureaToastType = Exclude<AureaAlertVariant, "neutral">;
|
|
7
7
|
export interface AureaToastInput {
|
|
8
8
|
title: React.ReactNode;
|
|
9
9
|
description?: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurea-uds/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.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.72.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@react-native-community/datetimepicker": ">=8",
|