@aurea-uds/react 0.45.0 → 0.47.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 +14 -3
- package/dist/actions.js +8 -7
- package/dist/data-display.d.ts +1 -1
- package/dist/inputs-client.d.ts +3 -1
- package/dist/inputs-client.js +3 -39
- package/dist/markup.d.ts +3 -1
- package/dist/markup.js +1 -1
- package/dist/navigation-client.d.ts +3 -1
- package/dist/navigation-client.js +2 -2
- package/package.json +1 -1
package/dist/actions.d.ts
CHANGED
|
@@ -88,8 +88,13 @@ interface ToggleBase {
|
|
|
88
88
|
/** 0.32.0, o `ToggleButton` da referência: `default` com o fundo neutro (o padrão), `ghost` sem fundo
|
|
89
89
|
* (o desenho de até a 0.31.0). O ligado é o idioma "selecionado" da Aurea nos dois. */
|
|
90
90
|
variant?: ToggleVariant;
|
|
91
|
+
/** A cor do LIGADO (ADR-0084, 27/10/2026): `brand` — o amarelo do botão primário, o padrão —, `neutral` (o cinza) ou
|
|
92
|
+
* `contrast` (o grafite, invertido). Dentro de um `ToggleGroup` ou de um `Toolbar` com `pressedStyle`, o do botão vale. */
|
|
93
|
+
pressedStyle?: TogglePressedStyle;
|
|
91
94
|
}
|
|
92
95
|
export type ToggleVariant = "default" | "ghost";
|
|
96
|
+
/** As três cores do ligado aprovadas pelo Victor em 26/10/2026 (A cinza, B grafite, C amarelo — o padrão). */
|
|
97
|
+
export type TogglePressedStyle = "neutral" | "contrast" | "brand";
|
|
93
98
|
type ToggleChildren = Exclude<React.ReactNode, boolean | null | undefined>;
|
|
94
99
|
export type ToggleProps = ToggleBase & ({
|
|
95
100
|
children: ToggleChildren;
|
|
@@ -98,7 +103,7 @@ export type ToggleProps = ToggleBase & ({
|
|
|
98
103
|
children?: never;
|
|
99
104
|
label: string;
|
|
100
105
|
});
|
|
101
|
-
export declare function Toggle({ pressed, defaultPressed, onPressedChange, value, icon, label, size: sizePedido, disabled, id, className, children, variant }: ToggleProps): React.JSX.Element;
|
|
106
|
+
export declare function Toggle({ pressed, defaultPressed, onPressedChange, value, icon, label, size: sizePedido, disabled, id, className, children, variant, pressedStyle }: ToggleProps): React.JSX.Element;
|
|
102
107
|
export interface IconButtonProps extends Omit<ButtonProps, "children"> {
|
|
103
108
|
label: string;
|
|
104
109
|
icon: AureaIcon;
|
|
@@ -130,15 +135,18 @@ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement>, RefAtt
|
|
|
130
135
|
detached?: boolean;
|
|
131
136
|
}
|
|
132
137
|
export declare function ButtonGroup({ label, orientation, variant, size, fullWidth, disabled, detached, className, ...props }: ButtonGroupProps): React.JSX.Element;
|
|
133
|
-
export declare function Toolbar({ orientation, label, className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement> & {
|
|
138
|
+
export declare function Toolbar({ orientation, label, className, pressedStyle, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement> & {
|
|
134
139
|
orientation?: Responsive<Orientation>;
|
|
135
140
|
label?: string;
|
|
141
|
+
pressedStyle?: TogglePressedStyle;
|
|
136
142
|
}): React.JSX.Element;
|
|
137
143
|
export declare function ToolbarGroup({ label, className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement> & {
|
|
138
144
|
label?: string;
|
|
139
145
|
}): React.JSX.Element;
|
|
140
146
|
export declare function ToolbarSeparator({ className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
141
147
|
export interface ToolbarButtonProps extends Omit<ButtonProps, "share"> {
|
|
148
|
+
/** A cor do ligado (ADR-0084): `brand` (o padrão), `neutral` ou `contrast`. Vale quando o botão está ligado (`aria-pressed`). */
|
|
149
|
+
pressedStyle?: TogglePressedStyle;
|
|
142
150
|
}
|
|
143
151
|
export declare const ToolbarButton: React.ForwardRefExoticComponent<Omit<ToolbarButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
144
152
|
export interface ToggleGroupProps {
|
|
@@ -157,6 +165,9 @@ export interface ToggleGroupProps {
|
|
|
157
165
|
fullWidth?: boolean;
|
|
158
166
|
/** Botões soltos (vão de 4), em vez de colados. */
|
|
159
167
|
detached?: boolean;
|
|
168
|
+
/** A cor do ligado de todos os botões de dentro (ADR-0084): `brand` (o padrão), `neutral` ou `contrast`; cada um pode
|
|
169
|
+
* trocar a sua. */
|
|
170
|
+
pressedStyle?: TogglePressedStyle;
|
|
160
171
|
}
|
|
161
|
-
export declare function ToggleGroup({ value, defaultValue, onValueChange, multiple, orientation, disabled, label, className, children, size, fullWidth, detached }: ToggleGroupProps): React.JSX.Element;
|
|
172
|
+
export declare function ToggleGroup({ value, defaultValue, onValueChange, multiple, orientation, disabled, label, className, children, size, fullWidth, detached, pressedStyle }: ToggleGroupProps): React.JSX.Element;
|
|
162
173
|
export {};
|
package/dist/actions.js
CHANGED
|
@@ -205,7 +205,7 @@ function temConteudoVisivel(children) {
|
|
|
205
205
|
// entre os estados**. Se o texto vira "Mute"/"Unmute" ou "Play"/"Pause", não é toggle — é
|
|
206
206
|
// botão de ação, porque quem lê tela ouve o rótulo NOVO e o estado ao mesmo tempo e não sabe
|
|
207
207
|
// se o botão descreve o que é ou o que fará.
|
|
208
|
-
export function Toggle({ pressed, defaultPressed, onPressedChange, value, icon, label, size: sizePedido, disabled, id, className, children, variant = "default" }) {
|
|
208
|
+
export function Toggle({ pressed, defaultPressed, onPressedChange, value, icon, label, size: sizePedido, disabled, id, className, children, variant = "default", pressedStyle }) {
|
|
209
209
|
const grupo = React.useContext(GrupoDeBotoesContext);
|
|
210
210
|
const size = sizePedido ?? grupo?.size;
|
|
211
211
|
// O tipo barra o consumidor TypeScript; este aviso barra o de JavaScript, que não tem tipo nenhum.
|
|
@@ -222,7 +222,7 @@ export function Toggle({ pressed, defaultPressed, onPressedChange, value, icon,
|
|
|
222
222
|
// sem `size` saía a classe `btn-undefined` (medido no catálogo, nos três botões do `ToggleGroup`); com
|
|
223
223
|
// valor responsivo sairia `btn-[object Object]`.
|
|
224
224
|
const tamanho = ehResponsivo(size) ? classesResponsivas("size", size) : ((valorBase(size) ?? "md") !== "md" && `btn-${valorBase(size)}`);
|
|
225
|
-
return _jsxs(BaseToggle, { id: id, value: value, disabled: disabled, pressed: pressed, defaultPressed: defaultPressed, onPressedChange: soOValor(onPressedChange), "aria-label": textoVisivel ? undefined : (rotuloVisivel ? label : undefined), className: cx("btn", variant === "ghost" ? "btn-ghost" : "btn-tertiary", tamanho, !textoVisivel && "btn-icon", "toggle", className), children: [icon && _jsx(Icon, { name: icon }), children] });
|
|
225
|
+
return _jsxs(BaseToggle, { id: id, value: value, disabled: disabled, pressed: pressed, defaultPressed: defaultPressed, onPressedChange: soOValor(onPressedChange), "aria-label": textoVisivel ? undefined : (rotuloVisivel ? label : undefined), "data-pressed-style": pressedStyle, className: cx("btn", variant === "ghost" ? "btn-ghost" : "btn-tertiary", tamanho, !textoVisivel && "btn-icon", "toggle", className), children: [icon && _jsx(Icon, { name: icon }), children] });
|
|
226
226
|
}
|
|
227
227
|
// default ghost (não secondary): um ícone-ação solto — hambúrguer, tema, fechar — é sem
|
|
228
228
|
// caixa por convenção (pedido do Victor: hambúrguer sem borda). Quem quer a caixa passa
|
|
@@ -266,18 +266,19 @@ export function ButtonGroup({ label, orientation, variant, size, fullWidth, disa
|
|
|
266
266
|
// atributo publicado. Nada de o CSS decidir a orientação por breakpoint enquanto o atributo
|
|
267
267
|
// diz outra coisa — seriam duas fontes de verdade e uma janela em que visual e comportamento
|
|
268
268
|
// divergem. Ver `decisions/0047-css-first-para-apresentacao-runtime-para-semantica.md`.
|
|
269
|
-
|
|
269
|
+
// `pressedStyle` (ADR-0084): a cor do ligado de todos os botões de dentro; cada um pode trocar a sua.
|
|
270
|
+
export function Toolbar({ orientation, label, className, pressedStyle, ...props }) {
|
|
270
271
|
const s = useAureaStrings();
|
|
271
272
|
const ancora = useRef(null);
|
|
272
273
|
const resolvida = useValorResponsivo(orientation, "horizontal", ancora);
|
|
273
|
-
return _jsx(BaseToolbar.Root, { ref: ancora, orientation: resolvida, "aria-label": label ?? s.toolbarLabel, className: cx("toolbar", className), ...props });
|
|
274
|
+
return _jsx(BaseToolbar.Root, { ref: ancora, orientation: resolvida, "aria-label": label ?? s.toolbarLabel, "data-pressed-style": pressedStyle, className: cx("toolbar", className), ...props });
|
|
274
275
|
}
|
|
275
276
|
export function ToolbarGroup({ label, className, ...props }) { return _jsx(BaseToolbar.Group, { "aria-label": label, className: cx("toolbar-group", className), ...props }); }
|
|
276
277
|
export function ToolbarSeparator({ className, ...props }) { return _jsx(BaseToolbar.Separator, { className: cx("toolbar-sep", className), ...props }); }
|
|
277
|
-
export const ToolbarButton = forwardRef(function ToolbarButton({ variant = "ghost", ...props }, ref) { return _jsx(BaseToolbar.Button, { ref: ref, disabled: props.disabled, render: _jsx(Button, { variant: variant, ...props }) }); });
|
|
278
|
-
export function ToggleGroup({ value, defaultValue, onValueChange, multiple, orientation, disabled, label, className, children, size, fullWidth, detached }) {
|
|
278
|
+
export const ToolbarButton = forwardRef(function ToolbarButton({ variant = "ghost", pressedStyle, ...props }, ref) { return _jsx(BaseToolbar.Button, { ref: ref, disabled: props.disabled, render: _jsx(Button, { variant: variant, "data-pressed-style": pressedStyle, ...props }) }); });
|
|
279
|
+
export function ToggleGroup({ value, defaultValue, onValueChange, multiple, orientation, disabled, label, className, children, size, fullWidth, detached, pressedStyle }) {
|
|
279
280
|
const ancora = useRef(null);
|
|
280
281
|
const resolvida = useValorResponsivo(orientation, "horizontal", ancora);
|
|
281
282
|
const grupo = React.useMemo(() => ({ size }), [size]);
|
|
282
|
-
return _jsx(GrupoDeBotoesContext.Provider, { value: grupo, children: _jsx(BaseToggleGroup, { ref: ancora, value: value, defaultValue: defaultValue, onValueChange: soOValor(onValueChange), multiple: multiple, orientation: resolvida, disabled: disabled, "aria-label": label, className: cx("toggle-group", detached && "toggle-group-detached", fullWidth && "toggle-group-full", className), children: children }) });
|
|
283
|
+
return _jsx(GrupoDeBotoesContext.Provider, { value: grupo, children: _jsx(BaseToggleGroup, { ref: ancora, value: value, defaultValue: defaultValue, onValueChange: soOValor(onValueChange), multiple: multiple, orientation: resolvida, disabled: disabled, "aria-label": label, "data-pressed-style": pressedStyle, className: cx("toggle-group", detached && "toggle-group-detached", fullWidth && "toggle-group-full", className), children: children }) });
|
|
283
284
|
}
|
package/dist/data-display.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./data-display-client.js";
|
|
2
|
-
export { Kbd, KPI, DataList, Timeline, Prose, Text, Heading, Paragraph, Code, type KPIProps, type KPIDirection, type KPITone, type KPIVariant, type TextProps, type HeadingProps, type ParagraphProps, type CodeProps, type TypographyType, type TypographyColor, type TypographyWeight, type TypographyAlign, type HeadingLevel, type ParagraphSize } from "./markup.js";
|
|
2
|
+
export { Kbd, KPI, DataList, Timeline, Prose, Text, Heading, Paragraph, Code, type KPIProps, type KPIDirection, type KPITone, type KPIVariant, type TimelineVariant, type TextProps, type HeadingProps, type ParagraphProps, type CodeProps, type TypographyType, type TypographyColor, type TypographyWeight, type TypographyAlign, type HeadingLevel, type ParagraphSize } from "./markup.js";
|
package/dist/inputs-client.d.ts
CHANGED
|
@@ -310,7 +310,8 @@ export declare function OTPField({ length, value, defaultValue, onValueChange, m
|
|
|
310
310
|
/** `secondary`: o fundo neutro do `Input` secundário, para o campo dentro de um cartão. */
|
|
311
311
|
variant?: "primary" | "secondary";
|
|
312
312
|
}): React.JSX.Element;
|
|
313
|
-
export
|
|
313
|
+
export type SegmentedControlSelectedStyle = "current" | "neutral" | "contrast" | "brand" | "ring" | "dot";
|
|
314
|
+
export declare function SegmentedControl({ items, value, onChange, label, fullWidth, size, selectedStyle }: {
|
|
314
315
|
items: Array<{
|
|
315
316
|
value: string;
|
|
316
317
|
label: ReactNode;
|
|
@@ -321,6 +322,7 @@ export declare function SegmentedControl({ items, value, onChange, label, fullWi
|
|
|
321
322
|
label?: string;
|
|
322
323
|
fullWidth?: boolean;
|
|
323
324
|
size?: "sm" | "md";
|
|
325
|
+
selectedStyle?: SegmentedControlSelectedStyle;
|
|
324
326
|
}): React.JSX.Element;
|
|
325
327
|
export interface ComboboxOption {
|
|
326
328
|
value: string;
|
package/dist/inputs-client.js
CHANGED
|
@@ -730,48 +730,12 @@ export function OTPField({ length, value, defaultValue, onValueChange, mask, dis
|
|
|
730
730
|
const s = useAureaStrings();
|
|
731
731
|
return _jsx(BaseOTPField.Root, { id: id, length: length, value: value, defaultValue: defaultValue, onValueChange: soOValor(onValueChange), mask: mask, disabled: disabled, required: required, role: "group", "aria-label": label, className: cx("otp-field", className), children: Array.from({ length }, (_, i) => _jsxs(React.Fragment, { children: [_jsx(BaseOTPField.Input, { render: _jsx("input", { "aria-label": `${s.otpDigit} ${i + 1}` }), className: cx("input otp-slot", variant === "secondary" && "input-secondary") }), groupSize && groupSize > 0 && (i + 1) % groupSize === 0 && i < length - 1 ? _jsx(BaseOTPField.Separator, { className: "otp-separator" }) : null] }, i)) });
|
|
732
732
|
}
|
|
733
|
-
|
|
734
|
-
//
|
|
735
|
-
// O DEFEITO: era `role="group"` com N botões de `aria-pressed`. Isso descreve N alternâncias
|
|
736
|
-
// INDEPENDENTES — cada botão anuncia "pressionado/não pressionado", nada diz que só um pode
|
|
737
|
-
// valer, e nunca se ouve "1 de 2". Para escolha única entre poucas opções o padrão APG é
|
|
738
|
-
// `radiogroup`, e a diferença é o que o leitor de tela consegue prometer.
|
|
739
|
-
// A troca mudou a semântica de um componente publicado, então foi registrada: ADR-0016.
|
|
740
|
-
//
|
|
741
|
-
// O MOTOR ENTREGA, ENTÃO NÃO ESCREVEMOS (BUILDING.md §1). O `RadioGroup` do Base UI 1.6 traz o
|
|
742
|
-
// padrão inteiro: roving tabindex, setas que movem E selecionam, Home/End, e `aria-checked`.
|
|
743
|
-
// Escrever isso à mão seria reimplementar um composite que já está testado.
|
|
744
|
-
//
|
|
745
|
-
// `render={<button type="button"/>}` não é enfeite, e a medição de 07/08 é que disse: o
|
|
746
|
-
// `Radio.Root` renderiza um `<span>` por padrão, e a pele da Aurea é `.segmented button`. Sem
|
|
747
|
-
// isso o componente perderia a pele inteira — e o check 18 não veria, porque ele olha CLASSE.
|
|
748
|
-
// O motor também emite um `<input type="radio">` escondido por item (para envio de formulário);
|
|
749
|
-
// ele é `position:fixed` e `aria-hidden`, então não entra no flex nem na árvore de acessibilidade.
|
|
750
|
-
//
|
|
751
|
-
// E `nativeButton` é o par obrigatório do `render` acima — medido em 11/08/2026. O `Radio.Root`
|
|
752
|
-
// declara `nativeButton = false` por padrão (é o valor certo para o `<span>` que ele renderiza
|
|
753
|
-
// sozinho), e o `useButton` do motor CONFERE isso no DOM montado, dentro de um efeito: sem esta
|
|
754
|
-
// palavra sai um `console.error` do Base UI a cada montagem de CLIENTE. Não no catálogo, que é
|
|
755
|
-
// HTML estático — no console de quem INSTALA.
|
|
756
|
-
// O DOM foi medido nos dois lados antes da troca. O `role="button"` que a mensagem ameaça NÃO
|
|
757
|
-
// aparecia (o `role="radio"` do motor já vencia a fusão); o que muda de fato é o `<input>`
|
|
758
|
-
// escondido perder o `id`, que migra para este botão — e migra para o lado certo, porque o botão
|
|
759
|
-
// é o rádio e o input é `aria-hidden`. Comportamento idêntico: Enter não seleciona, Espaço
|
|
760
|
-
// seleciona, a seta move E seleciona. O que sai é a camada sintética que o motor punha por cima
|
|
761
|
-
// da ativação nativa do `<button>`.
|
|
762
|
-
//
|
|
763
|
-
// `fullWidth` (A5, 06/10/2026): o mesmo nome e o mesmo desenho do nativo — o controle ocupa a
|
|
764
|
-
// linha e cada segmento CRESCE a partir do rótulo, sem encolher abaixo dele. É como o grupo
|
|
765
|
-
// de botões alternáveis da referência ocupa a linha.
|
|
766
|
-
// NAVEGAÇÃO (bloco 1, o 5-A — 23/10/2026): com `href` em TODOS os itens, a cápsula é um <nav> de links — o atual leva
|
|
767
|
-
// `aria-current="page"` —, e não um grupo de escolha: ir para outra página é navegação, e o leitor de tela tem de ouvir
|
|
768
|
-
// "link", não "opção". É a chave Web | Native do site. `size="sm"`: a cápsula baixa da referência (abas de 24).
|
|
769
|
-
export function SegmentedControl({ items, value, onChange, label, fullWidth, size = "md" }) {
|
|
733
|
+
export function SegmentedControl({ items, value, onChange, label, fullWidth, size = "md", selectedStyle }) {
|
|
770
734
|
const s = useAureaStrings();
|
|
771
735
|
const classe = cx("segmented", fullWidth && "segmented-full", size === "sm" && "segmented-sm");
|
|
772
736
|
if (items.length > 0 && items.every(i => i.href != null))
|
|
773
|
-
return _jsx("nav", { className: classe, "aria-label": label ?? s.optionsLabel, children: items.map(i => _jsx("a", { href: i.href, className: i.value === value ? "active" : undefined, "aria-current": i.value === value ? "page" : undefined, children: i.label }, i.value)) });
|
|
774
|
-
return _jsx(BaseRadioGroup, { className: classe, "aria-label": label ?? s.optionsLabel, value: value, onValueChange: v => onChange?.(String(v)), children: items.map(i => _jsx(BaseRadio.Root, { value: i.value, className: i.value === value ? "active" : undefined, nativeButton: true, render: _jsx("button", { type: "button" }), children: i.label }, i.value)) });
|
|
737
|
+
return _jsx("nav", { className: classe, "data-segment-style": selectedStyle, "aria-label": label ?? s.optionsLabel, children: items.map(i => _jsx("a", { href: i.href, className: i.value === value ? "active" : undefined, "aria-current": i.value === value ? "page" : undefined, children: i.label }, i.value)) });
|
|
738
|
+
return _jsx(BaseRadioGroup, { className: classe, "data-segment-style": selectedStyle, "aria-label": label ?? s.optionsLabel, value: value, onValueChange: v => onChange?.(String(v)), children: items.map(i => _jsx(BaseRadio.Root, { value: i.value, className: i.value === value ? "active" : undefined, nativeButton: true, render: _jsx("button", { type: "button" }), children: i.label }, i.value)) });
|
|
775
739
|
}
|
|
776
740
|
const ehAgrupado = (items) => items != null && items.length > 0 && typeof items[0] === "object" && items[0] != null && "items" in items[0];
|
|
777
741
|
// UM renderizador e UMA lista para os dois combobox: duas cópias da mesma árvore é como a
|
package/dist/markup.d.ts
CHANGED
|
@@ -196,12 +196,14 @@ export declare function DataList({ items }: {
|
|
|
196
196
|
value: ReactNode;
|
|
197
197
|
}>;
|
|
198
198
|
}): React.JSX.Element;
|
|
199
|
-
export
|
|
199
|
+
export type TimelineVariant = "default" | "ring" | "latest" | "time" | "contrast";
|
|
200
|
+
export declare function Timeline({ items, variant }: {
|
|
200
201
|
items: Array<{
|
|
201
202
|
title: ReactNode;
|
|
202
203
|
description?: ReactNode;
|
|
203
204
|
time?: ReactNode;
|
|
204
205
|
}>;
|
|
206
|
+
variant?: TimelineVariant;
|
|
205
207
|
}): React.JSX.Element;
|
|
206
208
|
export declare function Prose({ className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
207
209
|
export type TypographyType = "body" | "body-sm" | "body-xs" | "code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
package/dist/markup.js
CHANGED
|
@@ -126,7 +126,7 @@ export function KPI({ label, value, trend, direction, tone, directionLabel, vari
|
|
|
126
126
|
: _jsx(Card, { className: cx("kpi", className), ...props, children: miolo });
|
|
127
127
|
}
|
|
128
128
|
export function DataList({ items }) { return _jsx("dl", { className: "data-list", children: items.map((i, n) => _jsxs(React.Fragment, { children: [_jsx("dt", { children: i.term }), _jsx("dd", { children: i.value })] }, n)) }); }
|
|
129
|
-
export function Timeline({ items }) { return _jsx("ol", { className: "timeline", children: items.map((i, n) => _jsxs("li", { children: [_jsx("span", { className: "timeline-dot" }), _jsxs("div", { children: [_jsx("strong", { children: i.title }), i.description && _jsx("p", { children: i.description }), i.time && _jsx("small", { className: "muted", children: i.time })] })] }, n)) }); }
|
|
129
|
+
export function Timeline({ items, variant }) { return _jsx("ol", { className: "timeline", "data-timeline-style": variant, children: items.map((i, n) => _jsxs("li", { children: [_jsx("span", { className: "timeline-dot" }), _jsxs("div", { children: [_jsx("strong", { children: i.title }), i.description && _jsx("p", { children: i.description }), i.time && _jsx("small", { className: "muted", children: i.time })] })] }, n)) }); }
|
|
130
130
|
// Prose (item L5): UMA LINHA, e é para ser mesmo — quem transforma Markdown em elementos é o
|
|
131
131
|
// consumidor. A trava do item é no CSS, escopada em `.prose`, e há prova dela no `skin.spec`.
|
|
132
132
|
// Segurança, porque é o caminho de uso mais provável: quem entrega HTML de terceiro por
|
|
@@ -206,16 +206,18 @@ declare function SidebarShow({ when, children }: {
|
|
|
206
206
|
export type BottomNavVariant = "floating" | "edge";
|
|
207
207
|
export type BottomNavIndicator = "none" | "subtle" | "pill" | "circle" | "circle-raised" | "circle-bold" | "circle-outline" | "capsule" | "expand";
|
|
208
208
|
export type BottomNavWidth = "full" | "content";
|
|
209
|
+
export type BottomNavCurrentStyle = "current" | "neutral" | "contrast" | "brand" | "ring" | "plain" | "brand-white" | "white-ring" | "brand-gradient" | "bar-ink" | "bar-ring" | "bar-plain" | "bar-light";
|
|
209
210
|
/** @deprecated Os quatro nomes de 17/08/2026. Use `variant` + `indicator`. */
|
|
210
211
|
export type BottomNavVariantLegacy = "flat" | "surface" | "pill" | "dock";
|
|
211
212
|
export type BottomNavVariantAny = BottomNavVariant | BottomNavVariantLegacy;
|
|
212
|
-
export declare function BottomNav({ items, current, variant, indicator, width, label, className, ...props }: HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement> & {
|
|
213
|
+
export declare function BottomNav({ items, current, variant, indicator, width, label, currentStyle, className, ...props }: HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement> & {
|
|
213
214
|
items: SidebarEntry[];
|
|
214
215
|
current?: string;
|
|
215
216
|
variant?: BottomNavVariantAny;
|
|
216
217
|
indicator?: BottomNavIndicator;
|
|
217
218
|
width?: BottomNavWidth;
|
|
218
219
|
label?: string;
|
|
220
|
+
currentStyle?: BottomNavCurrentStyle;
|
|
219
221
|
}): React.JSX.Element;
|
|
220
222
|
export interface NavListIndicator {
|
|
221
223
|
icon: IconName;
|
|
@@ -434,12 +434,12 @@ function SidebarShow({ when, children }) {
|
|
|
434
434
|
const LEGADO = {
|
|
435
435
|
flat: ["edge", "none"], surface: ["floating", "circle"], pill: ["floating", "pill"], dock: ["floating", "circle"]
|
|
436
436
|
};
|
|
437
|
-
export function BottomNav({ items, current, variant = "floating", indicator = "none", width = "full", label, className, ...props }) {
|
|
437
|
+
export function BottomNav({ items, current, variant = "floating", indicator = "none", width = "full", label, currentStyle, className, ...props }) {
|
|
438
438
|
const s = useAureaStrings();
|
|
439
439
|
const [layout, marca0] = variant in LEGADO ? LEGADO[variant] : [variant, indicator];
|
|
440
440
|
// O indicador explícito ganha do que o nome legado implica: quem escreveu os dois quis os dois.
|
|
441
441
|
const ind = indicator !== "none" ? indicator : marca0;
|
|
442
|
-
return _jsx("nav", { className: cx("bottom-nav", layout === "edge" && "bottom-nav-edge", layout !== "edge" && width === "content" && "bottom-nav-content", `bottom-nav-ind-${ind}`, className), "aria-label": label ?? s.bottomNavLabel, ...props, children: items.filter((it) => it !== "separator").map(it => {
|
|
442
|
+
return _jsx("nav", { className: cx("bottom-nav", layout === "edge" && "bottom-nav-edge", layout !== "edge" && width === "content" && "bottom-nav-content", `bottom-nav-ind-${ind}`, className), "data-current-style": currentStyle, "aria-label": label ?? s.bottomNavLabel, ...props, children: items.filter((it) => it !== "separator").map(it => {
|
|
443
443
|
const ativo = it.id === current;
|
|
444
444
|
// O CONTADOR PENDURA NO ÍCONE, e é por isso que existe esta caixa. Pendurado no ITEM (a
|
|
445
445
|
// primeira versão), `50%` cai no meio do RÓTULO quando o item é linha — o Victor viu o número
|