@aurea-uds/react 0.47.0 → 0.48.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 CHANGED
@@ -66,6 +66,13 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Re
66
66
  * Só vale no `<button>`: com `href` ou `render`, é ignorado.
67
67
  */
68
68
  share?: ButtonShareData;
69
+ /** O brilho (ADR-0086, 28/10/2026): no botão principal (`primary`), uma sombra difusa embaixo, na cor dele a 40%. É
70
+ * acabamento que o app escolhe; o foco continua o anel. Escreve `data-glow` — o mesmo atributo num contêiner vale para
71
+ * os botões de dentro, e `glow={false}` tira um deles. Nos outros botões, não desenha nada. */
72
+ glow?: boolean;
73
+ /** O fio (ADR-0086): em volta do botão de fundo suave (`soft` e de contorno), o tom a 30%, por dentro. É linha — a
74
+ * exceção nomeada à ADR-0072, só quando o app escolhe. Escreve `data-ring`, com a mesma regra do contêiner. */
75
+ ring?: boolean;
69
76
  }
70
77
  /** O que o `Button share` compartilha (GAR-14). Os nomes são os do `navigator.share` da web. */
71
78
  export interface ButtonShareData {
@@ -109,12 +116,12 @@ export interface IconButtonProps extends Omit<ButtonProps, "children"> {
109
116
  icon: AureaIcon;
110
117
  }
111
118
  export declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
112
- export interface CloseButtonProps extends Omit<ButtonProps, "quiet" | "variant" | "appearance" | "tone" | "size" | "loading" | "leadingIcon" | "trailingIcon" | "href" | "target" | "rel" | "download" | "render" | "kbd" | "fullWidth" | "grow" | "pressed" | "share"> {
119
+ export interface CloseButtonProps extends Omit<ButtonProps, "quiet" | "variant" | "appearance" | "tone" | "size" | "loading" | "leadingIcon" | "trailingIcon" | "href" | "target" | "rel" | "download" | "render" | "kbd" | "fullWidth" | "grow" | "pressed" | "share" | "glow" | "ring"> {
113
120
  /** O nome que o leitor de tela anuncia. Padrão: a frase `close` ("Close"/"Fechar"). */
114
121
  label?: string;
115
122
  }
116
123
  export declare const CloseButton: React.ForwardRefExoticComponent<Omit<CloseButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
117
- export interface ThemeToggleProps extends Omit<IconButtonProps, "quiet" | "icon" | "label" | "onClick" | "variant" | "appearance" | "tone" | "href" | "target" | "rel" | "download" | "render" | "kbd" | "loading" | "leadingIcon" | "trailingIcon" | "fullWidth" | "share"> {
124
+ export interface ThemeToggleProps extends Omit<IconButtonProps, "quiet" | "icon" | "label" | "onClick" | "variant" | "appearance" | "tone" | "href" | "target" | "rel" | "download" | "render" | "kbd" | "loading" | "leadingIcon" | "trailingIcon" | "fullWidth" | "share" | "glow" | "ring"> {
118
125
  /** `"light-dark"` (o padrão): o botão que alterna. `"light-dark-system"` (15/10/2026): a chave de três posições do
119
126
  * topo da referência — claro, escuro e sistema (seguir o do computador, e mudar junto). */
120
127
  mode?: "light-dark" | "light-dark-system";
package/dist/actions.js CHANGED
@@ -109,7 +109,7 @@ const NOME_DA_TECLA = { ctrl: "Control", control: "Control", "⌃": "Control", c
109
109
  shift: "Shift", "⇧": "Shift", alt: "Alt", option: "Alt", "⌥": "Alt", enter: "Enter", "↵": "Enter", esc: "Escape", escape: "Escape" };
110
110
  const atalhoAnunciado = (kbd) => typeof kbd === "string" ? (kbd || undefined)
111
111
  : kbd && kbd.length > 0 ? kbd.map(k => NOME_DA_TECLA[k.toLowerCase()] ?? k).join("+") : undefined;
112
- export const Button = forwardRef(function Button({ variant: variantPedida, appearance, tone, size: sizePedido, quiet, loading, leadingIcon, trailingIcon, className, children, disabled: disabledPedido, type = "button", href, fullWidth, grow, target, rel, download, pressed, kbd, onClick, onClickCapture, "aria-disabled": ariaDisabled, render, share, ...props }, ref) {
112
+ export const Button = forwardRef(function Button({ variant: variantPedida, appearance, tone, size: sizePedido, quiet, loading, leadingIcon, trailingIcon, className, children, disabled: disabledPedido, type = "button", href, fullWidth, grow, target, rel, download, pressed, kbd, onClick, onClickCapture, "aria-disabled": ariaDisabled, render, share, glow, ring, ...props }, ref) {
113
113
  const grupo = React.useContext(GrupoDeBotoesContext);
114
114
  const variant = variantPedida ?? grupo?.variant;
115
115
  const size = sizePedido ?? grupo?.size ?? "md";
@@ -141,7 +141,8 @@ export const Button = forwardRef(function Button({ variant: variantPedida, appea
141
141
  // Mesmo remendo do AUD-0004, que já barrava o link desabilitado; aqui ele alcança o <button>.
142
142
  const inerte = ariaDisabled === true || ariaDisabled === "true";
143
143
  const off = disabled || loading;
144
- const shared = { "aria-keyshortcuts": atalhoAnunciado(kbd), "aria-busy": loading || undefined };
144
+ const shared = { "aria-keyshortcuts": atalhoAnunciado(kbd), "aria-busy": loading || undefined,
145
+ "data-glow": glow === undefined ? undefined : String(glow), "data-ring": ring === undefined ? undefined : String(ring) };
145
146
  // GAR-14: o `share` emite a mesma marcação que o `aurea.js` lê ([data-aurea-share]) — o catálogo
146
147
  // estático não hidrata, e é ela que faz o botão funcionar lá. Os textos vão junto, na língua do app.
147
148
  const s = useAureaStrings();
package/dist/markup.d.ts CHANGED
@@ -277,8 +277,12 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, RefAttribut
277
277
  /** Conteúdo do badge no modo sobreposto (no modo chip, quem manda é `children`).
278
278
  * Chama-se assim, e não `content`, porque este colide com o atributo HTML de mesmo nome. */
279
279
  badgeContent?: ReactNode;
280
+ /** O fio (ADR-0086, 28/10/2026): em volta do selo que não é cheio, o tom a 30%, por dentro. É linha — a exceção
281
+ * nomeada à ADR-0072, só quando o app escolhe. Escreve `data-ring`; o mesmo atributo num contêiner vale para os selos
282
+ * de dentro, e `ring={false}` tira um deles. No `solid`, não desenha nada. */
283
+ ring?: boolean;
280
284
  }
281
- export declare function Badge({ variant: variantProp, tone, emphasis, size, dot, leading, trailing, image, imageAlt, count, max, showZero, fit, anchor, anchorShape, invisible, badgeContent, children, className, ...props }: BadgeProps): React.JSX.Element;
285
+ export declare function Badge({ variant: variantProp, tone, emphasis, size, dot, leading, trailing, image, imageAlt, count, max, showZero, fit, anchor, anchorShape, invisible, badgeContent, ring, children, className, ...props }: BadgeProps): React.JSX.Element;
282
286
  /** `Chip` é outro nome do `Badge` (GAR-20, 19/10/2026): o nome que a referência dá à mesma peça. Igual em tudo. */
283
287
  export type ChipProps = BadgeProps;
284
288
  /** `Chip` é outro nome do `Badge` (GAR-20, 19/10/2026): o nome que a referência dá à mesma peça. Igual em tudo. */
package/dist/markup.js CHANGED
@@ -142,13 +142,13 @@ export function Code({ align, color, tone, weight, truncate, className, ...props
142
142
  // `max` com `+` é o idioma universal do contador (três das referências o usam). Exportada porque quem
143
143
  // escreve o nome acessível precisa do MESMO texto — "99+ unread" tem de bater com o que se vê.
144
144
  export function formatBadgeCount(count, max = 99) { return count > max ? `${max}+` : String(count); }
145
- export function Badge({ variant: variantProp = "neutral", tone, emphasis = "soft", size = "md", dot, leading, trailing, image, imageAlt, count, max = 99, showZero, fit = "auto", anchor, anchorShape = "square", invisible, badgeContent, children, className, ...props }) {
145
+ export function Badge({ variant: variantProp = "neutral", tone, emphasis = "soft", size = "md", dot, leading, trailing, image, imageAlt, count, max = 99, showZero, fit = "auto", anchor, anchorShape = "square", invisible, badgeContent, ring, children, className, ...props }) {
146
146
  const variant = tone ?? variantProp;
147
147
  const numero = count != null ? formatBadgeCount(count, max) : undefined;
148
148
  const miolo = anchor ? (numero ?? badgeContent) : (numero ?? children);
149
149
  // Ponto puro: `dot` sem nada para mostrar. Aí o badge não tem conteúdo, e ganha medida própria.
150
150
  const soPonto = !!dot && miolo == null;
151
- const chip = _jsxs("span", { className: cx("badge", variant !== "neutral" && `badge-${variant}`, emphasis !== "soft" && `badge-${emphasis}`, size !== "md" && `badge-${size}`, fit === "content" && !anchor && "badge-fit", anchor && `badge-overlay badge-at-${anchor}`, anchor && anchorShape === "circle" && "badge-on-circle", anchor && soPonto && "badge-is-dot", className), ...props, children: [dot && !soPonto && _jsx("span", { className: "badge-dot" }), image && _jsx("img", { className: "badge-image", src: image, alt: imageAlt ?? "" }), leading, miolo, trailing] });
151
+ const chip = _jsxs("span", { className: cx("badge", variant !== "neutral" && `badge-${variant}`, emphasis !== "soft" && `badge-${emphasis}`, size !== "md" && `badge-${size}`, fit === "content" && !anchor && "badge-fit", anchor && `badge-overlay badge-at-${anchor}`, anchor && anchorShape === "circle" && "badge-on-circle", anchor && soPonto && "badge-is-dot", className), "data-ring": ring === undefined ? undefined : String(ring), ...props, children: [dot && !soPonto && _jsx("span", { className: "badge-dot" }), image && _jsx("img", { className: "badge-image", src: image, alt: imageAlt ?? "" }), leading, miolo, trailing] });
152
152
  if (!anchor)
153
153
  return chip;
154
154
  // Some em zero por padrão, como na referência: caixa de entrada zerada não merece um "0" no canto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurea-uds/react",
3
- "version": "0.47.0",
3
+ "version": "0.48.0",
4
4
  "description": "Os componentes React da Aurea UDS. Importe @aurea-uds/fonts/css e @aurea-uds/core/css junto.",
5
5
  "keywords": [
6
6
  "aurea",