@aurea-uds/react 0.32.0 → 0.33.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 +17 -9
- package/dist/actions.js +30 -9
- package/dist/calendar.js +1 -1
- package/dist/feedback-client.d.ts +3 -1
- package/dist/feedback-client.js +4 -2
- package/dist/identity-client.d.ts +6 -1
- package/dist/identity-client.js +2 -5
- package/dist/index.d.ts +1 -1
- package/dist/inputs-client.d.ts +31 -2
- package/dist/inputs-client.js +40 -9
- package/dist/internal.d.ts +6 -4
- package/dist/internal.js +2 -1
- package/dist/markup.d.ts +46 -6
- package/dist/markup.js +42 -9
- package/dist/navigation-client.d.ts +7 -3
- package/dist/navigation-client.js +26 -14
- package/dist/overlays.js +7 -7
- package/dist/pure.d.ts +7 -0
- package/dist/pure.js +2 -2
- package/dist/system.d.ts +8 -5
- package/dist/system.js +36 -5
- package/package.json +1 -1
package/dist/markup.d.ts
CHANGED
|
@@ -24,12 +24,22 @@ export type CardProps = CardBase & ({
|
|
|
24
24
|
export declare function Card({ variant, padding, orientation, accent, className, render, ...props }: CardProps): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
25
25
|
export declare namespace Card {
|
|
26
26
|
export { CardMedia as Media };
|
|
27
|
+
export { CardHeader as Header };
|
|
28
|
+
export { CardTitle as Title };
|
|
29
|
+
export { CardDescription as Description };
|
|
30
|
+
export { CardContent as Content };
|
|
31
|
+
export { CardFooter as Footer };
|
|
27
32
|
}
|
|
28
33
|
/** A mídia do cartão — a primeira das partes da especificação do `Card` (A-14). No vertical,
|
|
29
34
|
* primeira filha, ela SANGRA até a borda de cima e dos lados; no horizontal, fica à esquerda com a
|
|
30
35
|
* largura de miniatura, dentro do respiro, com o raio que sai da conta da casa (ADR-0033: raio do
|
|
31
36
|
* cartão menos o respiro dele). O que vai dentro — `Image`, vídeo — é do app. */
|
|
32
37
|
declare function CardMedia({ className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
38
|
+
declare function CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
39
|
+
declare function CardTitle({ className, ...props }: HTMLAttributes<HTMLHeadingElement> & RefAttributes<HTMLHeadingElement>): React.JSX.Element;
|
|
40
|
+
declare function CardDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement> & RefAttributes<HTMLParagraphElement>): React.JSX.Element;
|
|
41
|
+
declare function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
42
|
+
declare function CardFooter({ className, ...props }: HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
33
43
|
export type LayoutGap = "tight" | "normal" | "loose";
|
|
34
44
|
export type StackAlign = "start" | "center" | "end" | "stretch";
|
|
35
45
|
export type ClusterAlign = "start" | "center" | "end" | "baseline";
|
|
@@ -132,6 +142,10 @@ export interface SectionProps extends HTMLAttributes<HTMLElement>, RefAttributes
|
|
|
132
142
|
/** Só no `footer`: as colunas de links, cada uma com título. Os itens são `SidebarItem` (`id`, `label`, `href`, `render`). */
|
|
133
143
|
links?: SectionFooterGroup[];
|
|
134
144
|
/** Só no `footer`: a linha de baixo — direitos, termos, privacidade. */
|
|
145
|
+
/** Só no `footer` (15/10/2026): `"columns"` (o padrão, o rodapé de site grande) ou `"inline"` — UMA linha centrada, como
|
|
146
|
+
* o rodapé da página inicial da referência: a frase legal, os links (sem os títulos das colunas) e o que vier dentro
|
|
147
|
+
* (os ícones sociais). A marca não entra. */
|
|
148
|
+
layout?: "columns" | "inline";
|
|
135
149
|
legal?: ReactNode;
|
|
136
150
|
/** Só no `footer`: até onde o miolo cresce, pela escala do `Container`. Padrão: `xl`. */
|
|
137
151
|
maxWidth?: ContainerSize;
|
|
@@ -143,7 +157,7 @@ export interface SectionProps extends HTMLAttributes<HTMLElement>, RefAttributes
|
|
|
143
157
|
* O conteúdo vai dentro de um `Container`. Dê um nome à faixa (`aria-labelledby` no título dela)
|
|
144
158
|
* quando ela for uma região que o leitor de tela deva listar.
|
|
145
159
|
*/
|
|
146
|
-
export declare function Section({ surface, spacing, theme, variant, brand, links, legal, maxWidth, navLabel, children, className, ...props }: SectionProps): React.JSX.Element;
|
|
160
|
+
export declare function Section({ surface, spacing, theme, variant, brand, links, legal, layout, maxWidth, navLabel, children, className, ...props }: SectionProps): React.JSX.Element;
|
|
147
161
|
export type KPIDirection = "up" | "down" | "flat";
|
|
148
162
|
export type KPITone = "success" | "danger" | "neutral";
|
|
149
163
|
export type KPIVariant = "card" | "plain";
|
|
@@ -211,7 +225,7 @@ export declare function Paragraph({ size, align, color, tone, weight, truncate,
|
|
|
211
225
|
export interface CodeProps extends Omit<HTMLAttributes<HTMLElement>, "color">, RefAttributes<HTMLElement>, TypographyBase {
|
|
212
226
|
}
|
|
213
227
|
export declare function Code({ align, color, tone, weight, truncate, className, ...props }: CodeProps): React.JSX.Element;
|
|
214
|
-
export type BadgeEmphasis = "soft" | "solid" | "outline";
|
|
228
|
+
export type BadgeEmphasis = "soft" | "solid" | "outline" | "flat";
|
|
215
229
|
export type BadgeSize = "xs" | "sm" | "md" | "lg";
|
|
216
230
|
export type BadgePlacement = "top-end" | "top-start" | "bottom-end" | "bottom-start";
|
|
217
231
|
export type BadgeFit = "auto" | "content";
|
|
@@ -221,7 +235,8 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, RefAttribut
|
|
|
221
235
|
/** A cor, com o NOME do nativo (DOC-11, 0.32.0: os mesmos nomes na web e no nativo). É o mesmo
|
|
222
236
|
* eixo do `variant`, e vence quando os dois vêm. */
|
|
223
237
|
tone?: BadgeVariant;
|
|
224
|
-
/** `soft` é o tom de sempre; `solid` preenche com o acento; `outline` é só contorno
|
|
238
|
+
/** `soft` é o tom de sempre; `solid` preenche com o acento; `outline` é só contorno; `flat` (15/10/2026) é o tom de
|
|
239
|
+
* sempre SEM a linha em volta, como o selo da referência (que chamava essa forma de `flat`). */
|
|
225
240
|
emphasis?: BadgeEmphasis;
|
|
226
241
|
size?: BadgeSize;
|
|
227
242
|
/** Ponto de estado antes do texto. Sozinho num `anchor`, ele É o badge. */
|
|
@@ -309,6 +324,24 @@ export interface HeaderProps extends HTMLAttributes<HTMLElement>, RefAttributes<
|
|
|
309
324
|
actions?: ReactNode;
|
|
310
325
|
/** Até onde o miolo da barra cresce, pela escala do `Container` (`sm` 640 … `2xl` 1536, `full`). */
|
|
311
326
|
maxWidth?: ContainerSize;
|
|
327
|
+
/**
|
|
328
|
+
* Onde ficam os links (14/10/2026): `"end"` (o padrão) logo antes das ações, na outra ponta da marca; `"start"`
|
|
329
|
+
* colados na marca, com as ações na outra ponta — a página inicial da referência. O nome é o `justify` do
|
|
330
|
+
* conteúdo da barra dela.
|
|
331
|
+
*/
|
|
332
|
+
itemsJustify?: "start" | "end";
|
|
333
|
+
/**
|
|
334
|
+
* A altura (15/10/2026): `"md"` (o padrão, 64 — a do guia de barra da referência) ou `"sm"` (56, a do topo da página
|
|
335
|
+
* inicial dela), com 6 entre as ações em vez de 8.
|
|
336
|
+
*/
|
|
337
|
+
size?: "md" | "sm";
|
|
338
|
+
/**
|
|
339
|
+
* Só na `flush` (15/10/2026): o fundo transparente que EMBAÇA o que passa por baixo, como o topo da página inicial
|
|
340
|
+
* da referência. Quem pede menos transparência no sistema, ou o navegador sem desfoque, recebe o fundo cheio.
|
|
341
|
+
*/
|
|
342
|
+
blurred?: boolean;
|
|
343
|
+
/** O que entra no MENU DO CELULAR, embaixo dos links (15/10/2026): o GitHub, a conta. Na barra larga não aparece. */
|
|
344
|
+
menuActions?: ReactNode;
|
|
312
345
|
/** O nome da navegação para o leitor de tela. Padrão: `"Main"`. */
|
|
313
346
|
navLabel?: string;
|
|
314
347
|
/** O nome do botão de menu do celular. Padrão: `"Menu"`. */
|
|
@@ -316,7 +349,7 @@ export interface HeaderProps extends HTMLAttributes<HTMLElement>, RefAttributes<
|
|
|
316
349
|
/** O `id` do painel do celular. Padrão: `"aurea-header-menu"`. Troque só se a página tiver dois cabeçalhos de site. */
|
|
317
350
|
menuId?: string;
|
|
318
351
|
}
|
|
319
|
-
export declare function Header({ variant, divider, brand, items, current, actions, maxWidth, navLabel, menuLabel, menuId, children, className, ...props }: HeaderProps): React.JSX.Element;
|
|
352
|
+
export declare function Header({ variant, divider, brand, items, current, actions, maxWidth, itemsJustify, size, blurred, menuActions, navLabel, menuLabel, menuId, children, className, ...props }: HeaderProps): React.JSX.Element;
|
|
320
353
|
/** @deprecated `Topbar` é o nome antigo do `Header` (07/10/2026). Continua funcionando, igual; use `Header`. */
|
|
321
354
|
export declare function Topbar(props: HeaderProps): React.JSX.Element;
|
|
322
355
|
export declare function Kbd({ children, className, ...props }: HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>): React.JSX.Element;
|
|
@@ -332,12 +365,17 @@ export declare function Checkbox({ label, labelHidden, description, size, classN
|
|
|
332
365
|
description?: ReactNode;
|
|
333
366
|
size?: Responsive<FieldSize>;
|
|
334
367
|
}): React.JSX.Element;
|
|
335
|
-
export declare function Radio({ label, size, className, ...props }: Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & RefAttributes<HTMLInputElement> & {
|
|
368
|
+
export declare function Radio({ label, labelHidden, description, size, className, ...props }: Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & RefAttributes<HTMLInputElement> & {
|
|
336
369
|
label: ReactNode;
|
|
370
|
+
labelHidden?: boolean;
|
|
371
|
+
description?: ReactNode;
|
|
337
372
|
size?: Responsive<FieldSize>;
|
|
338
373
|
}): React.JSX.Element;
|
|
339
|
-
export declare function Switch({ label, size, className, ...props }: Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & RefAttributes<HTMLInputElement> & {
|
|
374
|
+
export declare function Switch({ label, labelHidden, description, indicatorPlacement, size, className, ...props }: Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & RefAttributes<HTMLInputElement> & {
|
|
340
375
|
label: ReactNode;
|
|
376
|
+
labelHidden?: boolean;
|
|
377
|
+
description?: ReactNode;
|
|
378
|
+
indicatorPlacement?: "start" | "end";
|
|
341
379
|
size?: Responsive<FieldSize>;
|
|
342
380
|
}): React.JSX.Element;
|
|
343
381
|
export type RangeOrientation = "horizontal" | "vertical";
|
|
@@ -401,6 +439,8 @@ export interface ColorSwatchPickerProps {
|
|
|
401
439
|
layout?: "grid" | "stack";
|
|
402
440
|
/** A marca da escolhida, no lugar do "visto" (um `<Icon>`, por exemplo). Ela ganha a tinta que contrasta. */
|
|
403
441
|
indicator?: ReactNode;
|
|
442
|
+
/** O nome de cada cor embaixo dela (o `label` da opção; sem ele, o código), como a escolha de tema da referência. */
|
|
443
|
+
showLabels?: boolean;
|
|
404
444
|
size?: ColorSwatchSize;
|
|
405
445
|
disabled?: boolean;
|
|
406
446
|
id?: string;
|
package/dist/markup.js
CHANGED
|
@@ -48,6 +48,19 @@ export function Card({ variant = "base", padding = "normal", orientation = "vert
|
|
|
48
48
|
* cartão menos o respiro dele). O que vai dentro — `Image`, vídeo — é do app. */
|
|
49
49
|
function CardMedia({ className, ...props }) { return _jsx("div", { className: cx("card-media", className), ...props }); }
|
|
50
50
|
Card.Media = CardMedia;
|
|
51
|
+
// AS PARTES DO CARTÃO (15/10/2026, o Victor: "A, B, C, pode"), como as da referência: o cabeçalho (o título e a
|
|
52
|
+
// descrição, colados), o conteúdo (4 entre os itens) e o rodapé (em linha). 12 entre as partes, o vão dela — por margem,
|
|
53
|
+
// porque o `Card` da Aurea é um bloco e virar coluna mudaria quem já o usa. O título é um `h3`, como lá.
|
|
54
|
+
function CardHeader({ className, ...props }) { return _jsx("div", { className: cx("card-header", className), ...props }); }
|
|
55
|
+
function CardTitle({ className, ...props }) { return _jsx("h3", { className: cx("card-title", className), ...props }); }
|
|
56
|
+
function CardDescription({ className, ...props }) { return _jsx("p", { className: cx("card-description", className), ...props }); }
|
|
57
|
+
function CardContent({ className, ...props }) { return _jsx("div", { className: cx("card-content", className), ...props }); }
|
|
58
|
+
function CardFooter({ className, ...props }) { return _jsx("div", { className: cx("card-footer", className), ...props }); }
|
|
59
|
+
Card.Header = CardHeader;
|
|
60
|
+
Card.Title = CardTitle;
|
|
61
|
+
Card.Description = CardDescription;
|
|
62
|
+
Card.Content = CardContent;
|
|
63
|
+
Card.Footer = CardFooter;
|
|
51
64
|
export function Stack({ gap, align, className, ...props }) { return _jsx("div", { className: cx("stack", gap && gap !== "normal" && `stack-gap-${gap}`, align && align !== "stretch" && `stack-align-${align}`, className), ...props }); }
|
|
52
65
|
export function Cluster({ gap, align, justify, wrap, className, ...props }) { return _jsx("div", { className: cx("cluster", gap && gap !== "normal" && `cluster-gap-${gap}`, align && align !== "center" && `cluster-align-${align}`, justify && justify !== "start" && `cluster-justify-${justify}`, wrap === false && "cluster-nowrap", className), ...props }); }
|
|
53
66
|
const GRID_MIN = new Set(["xs", "sm", "md", "lg"]);
|
|
@@ -82,10 +95,16 @@ export function Container({ size = "xl", className, ...props }) {
|
|
|
82
95
|
// (`spacing`) e o tema próprio (`theme` — rodapé escuro numa página clara). Nenhuma referência da
|
|
83
96
|
// fila tem um rodapé aberto; o desenho é da Aurea, com tokens que já existem. Os links de cada
|
|
84
97
|
// coluna são `SidebarItem`, a mesma forma dos menus, e o `render` leva o link do roteador.
|
|
85
|
-
export function Section({ surface = "background", spacing = "md", theme, variant = "base", brand, links, legal, maxWidth = "xl", navLabel = "Footer", children, className, ...props }) {
|
|
98
|
+
export function Section({ surface = "background", spacing = "md", theme, variant = "base", brand, links, legal, layout = "columns", maxWidth = "xl", navLabel = "Footer", children, className, ...props }) {
|
|
86
99
|
const pele = cx("section", surface !== "background" && `section-${surface}`, spacing !== "md" && `section-spacing-${spacing}`);
|
|
87
100
|
if (variant !== "footer")
|
|
88
101
|
return _jsx("section", { "data-theme": theme, className: cx(pele, className), ...props, children: children });
|
|
102
|
+
if (layout === "inline") {
|
|
103
|
+
const itens = (links ?? []).flatMap((g) => g.items);
|
|
104
|
+
return _jsx("footer", { "data-theme": theme, className: cx(pele, "section-footer", "section-footer-inline", className), ...props, children: _jsxs("div", { className: cx("container", maxWidth !== "xl" && `container-${maxWidth}`, "section-footer-line"), children: [legal != null && _jsx("p", { className: "section-footer-inline-legal", children: legal }), itens.length > 0 && _jsx("nav", { "aria-label": navLabel, children: _jsx("ul", { className: "section-footer-inline-links", children: itens.map(it => _jsx("li", { children: it.render
|
|
105
|
+
? fundirRender(it.render, { className: "section-footer-link", children: it.label }, "a")
|
|
106
|
+
: _jsx("a", { className: "section-footer-link", href: it.href, children: it.label }) }, it.id)) }) }), children] }) });
|
|
107
|
+
}
|
|
89
108
|
return _jsx("footer", { "data-theme": theme, className: cx(pele, "section-footer", className), ...props, children: _jsxs("div", { className: cx("container", maxWidth !== "xl" && `container-${maxWidth}`), children: [_jsxs("div", { className: "section-footer-top", children: [brand != null && _jsx("div", { className: "section-footer-brand", children: brand }), links && links.length > 0 && _jsx("nav", { className: "section-footer-nav", "aria-label": navLabel, children: links.map((g, n) => _jsxs("div", { className: "section-footer-group", children: [_jsx("h2", { className: "section-footer-title", children: g.title }), _jsx("ul", { className: "section-footer-links", children: g.items.map(it => _jsx("li", { children: it.render
|
|
90
109
|
? fundirRender(it.render, { className: "section-footer-link", children: it.label }, "a")
|
|
91
110
|
: _jsx("a", { className: "section-footer-link", href: it.href, children: it.label }) }, it.id)) })] }, n)) }), children] }), legal != null && _jsx("div", { className: "section-footer-legal", children: legal })] }) });
|
|
@@ -177,10 +196,10 @@ function linksDoHeader(items, current) {
|
|
|
177
196
|
return _jsx("li", { children: it.render ? fundirRender(it.render, p, "a") : _jsx("a", { href: it.href, ...p }) }, it.id);
|
|
178
197
|
}) });
|
|
179
198
|
}
|
|
180
|
-
export function Header({ variant = "floating", divider, brand, items, current, actions, maxWidth, navLabel = "Main", menuLabel = "Menu", menuId = "aurea-header-menu", children, className, ...props }) {
|
|
199
|
+
export function Header({ variant = "floating", divider, brand, items, current, actions, maxWidth, itemsJustify = "end", size = "md", blurred, menuActions, navLabel = "Main", menuLabel = "Menu", menuId = "aurea-header-menu", children, className, ...props }) {
|
|
181
200
|
const site = !!items && items.length > 0;
|
|
182
|
-
const miolo = _jsxs(_Fragment, { children: [brand != null && _jsx("div", { className: "brand", children: brand }), site && _jsx("nav", { className: "topbar-nav", "aria-label": navLabel, children: linksDoHeader(items, current) }), children, actions != null && _jsx("div", { className: "topbar-actions", children: actions }), site && _jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "btn btn-ghost btn-icon topbar-menu-toggle", popoverTarget: menuId, "aria-label": menuLabel, children: _jsx("span", { className: "topbar-menu-icon", "aria-hidden": "true" }) }),
|
|
183
|
-
return _jsx("header", { className: cx("topbar", `topbar-${variant}`, divider && variant === "flush" && "topbar-divider", site && "topbar-site", maxWidth && "topbar-contained", className), ...props, children: maxWidth ? _jsx("div", { className: cx("container", maxWidth !== "xl" && `container-${maxWidth}`, "topbar-inner"), children: miolo }) : miolo });
|
|
201
|
+
const miolo = _jsxs(_Fragment, { children: [brand != null && _jsx("div", { className: "brand", children: brand }), site && _jsx("nav", { className: "topbar-nav", "aria-label": navLabel, children: linksDoHeader(items, current) }), children, actions != null && _jsx("div", { className: "topbar-actions", children: actions }), site && _jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "btn btn-ghost btn-icon topbar-menu-toggle", popoverTarget: menuId, "aria-label": menuLabel, children: _jsx("span", { className: "topbar-menu-icon", "aria-hidden": "true" }) }), _jsxs("nav", { id: menuId, popover: "auto", className: "topbar-menu-panel", "aria-label": navLabel, children: [linksDoHeader(items, current), menuActions != null && _jsx("div", { className: "topbar-menu-actions", children: menuActions })] })] })] });
|
|
202
|
+
return _jsx("header", { className: cx("topbar", `topbar-${variant}`, divider && variant === "flush" && "topbar-divider", site && "topbar-site", site && itemsJustify === "start" && "topbar-items-start", size === "sm" && "topbar-sm", blurred && variant === "flush" && "topbar-blurred", maxWidth && "topbar-contained", className), ...props, children: maxWidth ? _jsx("div", { className: cx("container", maxWidth !== "xl" && `container-${maxWidth}`, "topbar-inner"), children: miolo }) : miolo });
|
|
184
203
|
}
|
|
185
204
|
/** @deprecated `Topbar` é o nome antigo do `Header` (07/10/2026). Continua funcionando, igual; use `Header`. */
|
|
186
205
|
export function Topbar(props) { return _jsx(Header, { ...props }); }
|
|
@@ -197,8 +216,16 @@ export const Textarea = forwardRef(function Textarea({ className, size, variant,
|
|
|
197
216
|
// `size` nos três marcáveis pela mesma razão do campo: uma linha de formulário com um campo `sm`
|
|
198
217
|
// e um checkbox de tamanho fixo ao lado desalinha. O degrau vai na MARCA, não no rótulo.
|
|
199
218
|
export function Checkbox({ label, labelHidden, description, size, className, ...props }) { return _jsxs("label", { className: cx("checkbox", labelHidden && "checkbox-bare", className), children: [_jsx("input", { type: "checkbox", ...props }), _jsx("span", { className: cx("control-mark", peleDoEixo("control-mark", size)) }), _jsxs("span", { className: labelHidden ? "sr-only" : undefined, children: [_jsx("strong", { children: label }), description && _jsxs(_Fragment, { children: [_jsx("br", {}), _jsx("span", { className: "muted", children: description })] })] })] }); }
|
|
200
|
-
|
|
201
|
-
|
|
219
|
+
// `description` no `Radio` e no `Switch` (15/10/2026, a referência tem nos dois): a linha apagada embaixo do nome, do
|
|
220
|
+
// mesmo jeito do `Checkbox`. Sem ela, a marcação é a de sempre.
|
|
221
|
+
const comDescricao = (label, description) => description ? _jsxs("span", { children: [_jsx("strong", { children: label }), _jsx("br", {}), _jsx("span", { className: "muted", children: description })] }) : label;
|
|
222
|
+
// `labelHidden` (15/10/2026) no `Radio` e no `Switch`, o mesmo do `Checkbox`: o nome sai da tela e fica para o leitor
|
|
223
|
+
// de tela — a fileira de controles sem rótulo da vitrine da referência.
|
|
224
|
+
export function Radio({ label, labelHidden, description, size, className, ...props }) { return _jsxs("label", { className: cx("radio", labelHidden && "radio-bare", className), children: [_jsx("input", { type: "radio", ...props }), _jsx("span", { className: cx("control-mark", peleDoEixo("control-mark", size)) }), labelHidden ? _jsx("span", { className: "sr-only", children: comDescricao(label, description) }) : comDescricao(label, description)] }); }
|
|
225
|
+
// `indicatorPlacement` (15/10/2026, o Victor: "A sim"): a chave no FIM, como o "Allow notifications" da vitrine da
|
|
226
|
+
// referência — o nome e a descrição à esquerda. O mesmo nome do `RadioGroup` do nativo. Muda só a ordem do DESENHO: o
|
|
227
|
+
// campo escondido continua logo antes da chave (o CSS do estado depende disso), e o rótulo é um só para o leitor.
|
|
228
|
+
export function Switch({ label, labelHidden, description, indicatorPlacement = "start", size, className, ...props }) { return _jsxs("label", { className: cx("switch", labelHidden && "switch-bare", indicatorPlacement === "end" && "switch-end", className), children: [_jsx("input", { type: "checkbox", role: "switch", ...props }), _jsx("span", { className: cx("switch-track", peleDoEixo("switch-track", size)) }), _jsx("span", { className: labelHidden ? "sr-only" : undefined, children: comDescricao(label, description) })] }); }
|
|
202
229
|
export function Range({ orientation, className, ...props }) { return _jsx("input", { className: cx("range", peleDoEixo("range", orientation, "horizontal", "range"), className), type: "range", ...props }); }
|
|
203
230
|
// `md` é a classe base — não existe `.input-md`, como não existe `.btn-md`. O prefixo é escrito
|
|
204
231
|
// literal em cada chamada (`input-${size}`, e não `${base}-${size}`) porque é assim que o check 15
|
|
@@ -248,13 +275,19 @@ export function Link({ external, disabled, href, target, rel, className, childre
|
|
|
248
275
|
const transparente = (cor) => { const c = parseColor(cor); return c !== null && c.a < 1; };
|
|
249
276
|
export function ColorSwatch(props) {
|
|
250
277
|
if ("options" in props) {
|
|
251
|
-
const { options, name, label, value, defaultValue, onChange, layout = "grid", indicator, size = "md", disabled, id, className } = props;
|
|
278
|
+
const { options, name, label, value, defaultValue, onChange, layout = "grid", indicator, showLabels, size = "md", disabled, id, className } = props;
|
|
252
279
|
// O `onChange` é o do CONSUMIDOR, repassado, como no `Checkbox` e no `Radio` desta casa: nenhum manipulador nosso
|
|
253
280
|
// é escrito aqui (a marcação continua de servidor). Vai por espalhamento, como lá.
|
|
254
|
-
|
|
281
|
+
// `showLabels` (14/10/2026): o rótulo passa a ser a amostra E o nome embaixo — o círculo continua o mesmo
|
|
282
|
+
// (`.color-swatch-option`, agora um `span`), e clicar no nome também escolhe. O nome é só para os olhos: o leitor
|
|
283
|
+
// de tela já ouve o `aria-label` do botão de opção.
|
|
284
|
+
return _jsx("div", { role: "radiogroup", "aria-label": label, id: id, "aria-disabled": disabled || undefined, className: cx("color-swatch-picker", size !== "md" && `color-swatch-picker-${size}`, layout === "stack" && "color-swatch-picker-stack", showLabels && "color-swatch-picker-labels", className), children: options.map((o) => {
|
|
255
285
|
const op = typeof o === "string" ? { color: o } : o;
|
|
256
286
|
const cor = parseColor(op.color), rgb = cor && hsbToRgb(cor);
|
|
257
|
-
|
|
287
|
+
const circulo = (Tag, key) => _jsxs(Tag, { className: cx("color-swatch-option", rgb && contrastingInk(rgb) === "dark" && "color-swatch-option-dark"), style: { ["--color-swatch-current"]: op.color }, children: [_jsx("input", { type: "radio", className: "color-swatch-input", name: name, value: op.color, "aria-label": op.label ?? op.color, checked: value === undefined ? undefined : value === op.color, defaultChecked: value === undefined ? defaultValue === op.color : undefined, disabled: disabled || op.disabled, ...(onChange ? { onChange } : {}) }), _jsx("span", { className: cx("color-swatch", cor && cor.a < 1 && "color-swatch-alpha"), "aria-hidden": "true" }), indicator != null && _jsx("span", { className: "color-swatch-indicator", "aria-hidden": "true", children: indicator })] }, key);
|
|
288
|
+
return showLabels
|
|
289
|
+
? _jsxs("label", { className: "color-swatch-item", children: [circulo("span"), _jsx("span", { className: "color-swatch-name", "aria-hidden": "true", children: op.label ?? op.color })] }, op.color)
|
|
290
|
+
: circulo("label", op.color);
|
|
258
291
|
}) });
|
|
259
292
|
}
|
|
260
293
|
const { color, size = "md", label, className, style, ...resto } = props;
|
|
@@ -166,10 +166,14 @@ export declare function CommandPalette({ open, onClose, items, placeholder, labe
|
|
|
166
166
|
label?: string;
|
|
167
167
|
/** 0.32.0 (DOC-07): a linha que ensina as teclas, embaixo — ↑ ↓ mover, Enter abrir, Esc fechar. */
|
|
168
168
|
shortcuts?: boolean;
|
|
169
|
-
}): React.JSX.Element
|
|
170
|
-
export declare function CommandPaletteShell({ open, query, onQueryChange, children }: {
|
|
169
|
+
}): React.JSX.Element;
|
|
170
|
+
export declare function CommandPaletteShell({ open, query, onQueryChange, onClose, label, children }: {
|
|
171
171
|
open: boolean;
|
|
172
172
|
query: string;
|
|
173
173
|
onQueryChange: (v: string) => void;
|
|
174
|
+
/** Quem fecha: a janela avisa pelo Esc e pelo clique fora. */
|
|
175
|
+
onClose?: () => void;
|
|
176
|
+
/** O nome da janela (o padrão é o da paleta, "Command palette"). */
|
|
177
|
+
label?: string;
|
|
174
178
|
children?: ReactNode;
|
|
175
|
-
}): React.JSX.Element
|
|
179
|
+
}): React.JSX.Element;
|
|
@@ -7,8 +7,9 @@ import React, { useRef } from "react";
|
|
|
7
7
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
8
8
|
import { useDirection } from "@base-ui/react/direction-provider";
|
|
9
9
|
import { Autocomplete as BaseAutocomplete } from "@base-ui/react/autocomplete";
|
|
10
|
+
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
10
11
|
import { useValorResponsivo } from "./responsivo-runtime.js";
|
|
11
|
-
import { cx, fundirRender, useAureaStrings } from "./internal.js";
|
|
12
|
+
import { cx, fundirRender, useAureaStrings, usePortalContainer } from "./internal.js";
|
|
12
13
|
import { Kbd } from "./markup.js";
|
|
13
14
|
import { Icon } from "./system.js";
|
|
14
15
|
import { Button } from "./actions.js";
|
|
@@ -331,19 +332,30 @@ export function CommandPalette({ open, onClose, items, placeholder, label, short
|
|
|
331
332
|
}
|
|
332
333
|
return [...mapa].map(([value, itens]) => ({ value, items: itens }));
|
|
333
334
|
}, [items]);
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
const portal = usePortalContainer();
|
|
336
|
+
const campo = useRef(null);
|
|
336
337
|
const executa = (item) => { onClose(); item.run(); };
|
|
337
338
|
const linha = (item) => _jsxs(BaseAutocomplete.Item, { value: item, className: "menu-item command-item", onClick: () => executa(item), children: [item.icon && _jsx(Icon, { name: item.icon }), _jsx("span", { className: "command-item-label", children: item.label }), item.kbd && _jsx(Kbd, { children: item.kbd })] }, item.id);
|
|
338
|
-
//
|
|
339
|
-
//
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
339
|
+
// A JANELA É A DO MOTOR (14/10/2026), como na paleta de exemplo dele (1.6.0): `Dialog` por fora,
|
|
340
|
+
// `Autocomplete` `inline` por dentro. Até aqui a moldura era uma `div` feita à mão, e o Victor achou no site
|
|
341
|
+
// publicado: o clique no fundo não fechava, e depois dele o foco ia para a página — o Esc, que era escutado
|
|
342
|
+
// dentro da caixa, não chegava mais. A janela do motor fecha pelos dois caminhos, prende o Tab, trava a
|
|
343
|
+
// rolagem de trás e devolve o foco a quem abriu. O `open` continua do consumidor: o motor só AVISA
|
|
344
|
+
// (`onOpenChange`), e quem fecha é o `onClose` — mesma regra do Dialog e do Drawer daqui. Os nomes de classe
|
|
345
|
+
// ficaram: a moldura (`Viewport`) é a `.command-overlay`, a caixa (`Popup`) é a `.command-palette`.
|
|
346
|
+
return _jsx(BaseDialog.Root, { open: open, onOpenChange: o => { if (!o)
|
|
347
|
+
onClose(); }, children: _jsx(BaseDialog.Portal, { container: portal, children: _jsx(BaseDialog.Viewport, { className: "command-overlay", children: _jsxs(BaseDialog.Popup, { className: "command-palette", "aria-label": label ?? s.commandLabel, initialFocus: campo, children: [_jsxs(BaseAutocomplete.Root, { items: (grupos ?? items), itemToStringValue: (i) => i.label, mode: "list", open: true, inline: true, autoHighlight: "always", keepHighlight: true, children: [_jsx(BaseAutocomplete.Input, { ref: campo, className: "input", "aria-label": placeholder ?? s.commandPlaceholder, placeholder: placeholder ?? s.commandPlaceholder, "aria-expanded": true, "aria-describedby": shortcuts ? idAtalhos : undefined }), _jsxs("div", { className: "menu command-list", children: [_jsx(BaseAutocomplete.Empty, { className: "combobox-empty", children: s.comboboxEmpty }), _jsx(BaseAutocomplete.List, { children: grupos
|
|
348
|
+
? (g) => _jsxs(BaseAutocomplete.Group, { items: g.items, className: "command-group", children: [g.value && _jsx(BaseAutocomplete.GroupLabel, { className: "command-group-label", children: g.value }), _jsx(BaseAutocomplete.Collection, { children: linha })] }, g.value)
|
|
349
|
+
: _jsx(BaseAutocomplete.Collection, { children: linha }) })] })] }), shortcuts && _jsxs("p", { className: "command-shortcuts", id: idAtalhos, children: [_jsxs("span", { children: [_jsx(Kbd, { children: "\u2191" }), _jsx(Kbd, { children: "\u2193" }), " ", s.commandHintMove] }), _jsxs("span", { children: [_jsx(Kbd, { children: "Enter" }), " ", s.commandHintSelect] }), _jsxs("span", { children: [_jsx(Kbd, { children: "Esc" }), " ", s.commandHintClose] })] })] }) }) }) });
|
|
350
|
+
}
|
|
351
|
+
// A CASCA (15/10/2026, o Victor: "C sim"): a mesma janela do motor da `CommandPalette` acima. Até aqui era uma `div`
|
|
352
|
+
// feita à mão — o mesmo defeito que a busca do site teve: o clique fora e o Esc não fechavam, e o Tab saía da caixa.
|
|
353
|
+
// Agora o motor avisa pelos dois caminhos (`onClose`, novo), prende o Tab e devolve o foco a quem abriu. Sem `onClose`,
|
|
354
|
+
// a janela fica aberta até o `open` do consumidor mudar — como antes. O campo recebe o foco pelo `initialFocus`.
|
|
355
|
+
export function CommandPaletteShell({ open, query, onQueryChange, onClose, label, children }) {
|
|
356
|
+
const s = useAureaStrings();
|
|
357
|
+
const portal = usePortalContainer();
|
|
358
|
+
const campo = useRef(null);
|
|
359
|
+
return _jsx(BaseDialog.Root, { open: open, onOpenChange: o => { if (!o)
|
|
360
|
+
onClose?.(); }, children: _jsx(BaseDialog.Portal, { container: portal, children: _jsx(BaseDialog.Viewport, { className: "command-overlay", children: _jsxs(BaseDialog.Popup, { className: "command-palette", "aria-label": label ?? s.commandLabel, initialFocus: campo, children: [_jsx(SearchField, { ref: campo, "aria-label": s.commandPlaceholder, value: query, onChange: e => onQueryChange(e.target.value), placeholder: s.commandPlaceholder }), children] }) }) }) });
|
|
347
361
|
}
|
|
348
|
-
export function CommandPaletteShell({ open, query, onQueryChange, children }) { const s = useAureaStrings(); if (!open)
|
|
349
|
-
return null; return _jsx("div", { className: "command-overlay", children: _jsxs("div", { className: "command-palette", role: "dialog", "aria-label": s.commandLabel, children: [_jsx(SearchField, { autoFocus: true, "aria-label": s.commandPlaceholder, value: query, onChange: e => onQueryChange(e.target.value), placeholder: s.commandPlaceholder }), children] }) }); }
|
package/dist/overlays.js
CHANGED
|
@@ -126,9 +126,9 @@ export function Tooltip({ children, content, side = "top", arrow = false, delay
|
|
|
126
126
|
const triggerId = children.props.id;
|
|
127
127
|
const portal = usePortalContainer();
|
|
128
128
|
const foco = focavelNaMarcacao(children) === false ? { tabIndex: 0, role: "button" } : {};
|
|
129
|
-
return _jsxs(BaseTooltip.Root, { children: [_jsx(BaseTooltip.Trigger, { ref: garantirFoco, id: triggerId, render: children, "aria-describedby": id, delay: delay, closeDelay: closeDelay, ...foco }), _jsx(BaseTooltip.Portal, { container: portal, children: _jsx(BaseTooltip.Positioner, { side: side, sideOffset: arrow ? 8 : 4, children: _jsxs(BaseTooltip.Popup, { id: id, role: "tooltip", className: "tooltip", children: [arrow && _jsx(BaseTooltip.Arrow, { className: "overlay-arrow", children: _jsx(Seta, {}) }), content] }) }) })] });
|
|
129
|
+
return _jsxs(BaseTooltip.Root, { children: [_jsx(BaseTooltip.Trigger, { ref: garantirFoco, id: triggerId, render: children, "aria-describedby": id, delay: delay, closeDelay: closeDelay, ...foco }), _jsx(BaseTooltip.Portal, { container: portal, children: _jsx(BaseTooltip.Positioner, { className: "positioner", side: side, sideOffset: arrow ? 8 : 4, children: _jsxs(BaseTooltip.Popup, { id: id, role: "tooltip", className: "tooltip", children: [arrow && _jsx(BaseTooltip.Arrow, { className: "overlay-arrow", children: _jsx(Seta, {}) }), content] }) }) })] });
|
|
130
130
|
}
|
|
131
|
-
export function Popover({ trigger, title, children, side = "bottom", arrow = false }) { const portal = usePortalContainer(); return _jsxs(BasePopover.Root, { children: [_jsx(BasePopover.Trigger, { render: trigger }), _jsx(BasePopover.Portal, { container: portal, children: _jsx(BasePopover.Positioner, { side: side, sideOffset: 8, children: _jsxs(BasePopover.Popup, { className: "popover", children: [arrow && _jsx(BasePopover.Arrow, { className: "overlay-arrow", children: _jsx(Seta, {}) }), title && _jsx(BasePopover.Title, { render: _jsx("strong", {}), className: "popover-title", children: title }), children] }) }) })] }); }
|
|
131
|
+
export function Popover({ trigger, title, children, side = "bottom", arrow = false }) { const portal = usePortalContainer(); return _jsxs(BasePopover.Root, { children: [_jsx(BasePopover.Trigger, { render: trigger }), _jsx(BasePopover.Portal, { container: portal, children: _jsx(BasePopover.Positioner, { className: "positioner", side: side, sideOffset: 8, children: _jsxs(BasePopover.Popup, { className: "popover", children: [arrow && _jsx(BasePopover.Arrow, { className: "overlay-arrow", children: _jsx(Seta, {}) }), title && _jsx(BasePopover.Title, { render: _jsx("strong", {}), className: "popover-title", children: title }), children] }) }) })] }); }
|
|
132
132
|
// HoverCard (Lote 1 do BUILDING.md). Não é Tooltip nem Popover, e a diferença é de propósito,
|
|
133
133
|
// não de aparência: a Tooltip é um RÓTULO curto (`role="tooltip"`, some ao mover o mouse); o
|
|
134
134
|
// Popover abre por CLIQUE e pode conter foco; este é uma PRÉVIA rica que aparece ao repousar o
|
|
@@ -138,7 +138,7 @@ export function Popover({ trigger, title, children, side = "bottom", arrow = fal
|
|
|
138
138
|
// um segundo nome criaria duas peles para a mesma coisa.
|
|
139
139
|
// Por depender de repouso do ponteiro, NÃO serve para informação essencial — quem navega só por
|
|
140
140
|
// teclado ou toque não abre um hover card. Conteúdo obrigatório vai em Popover.
|
|
141
|
-
export function HoverCard({ trigger, children, side = "bottom" }) { const portal = usePortalContainer(); return _jsxs(BasePreviewCard.Root, { children: [_jsx(BasePreviewCard.Trigger, { render: trigger }), _jsx(BasePreviewCard.Portal, { container: portal, children: _jsx(BasePreviewCard.Positioner, { side: side, sideOffset: 8, children: _jsx(BasePreviewCard.Popup, { className: "popover hover-card", children: children }) }) })] }); }
|
|
141
|
+
export function HoverCard({ trigger, children, side = "bottom" }) { const portal = usePortalContainer(); return _jsxs(BasePreviewCard.Root, { children: [_jsx(BasePreviewCard.Trigger, { render: trigger }), _jsx(BasePreviewCard.Portal, { container: portal, children: _jsx(BasePreviewCard.Positioner, { className: "positioner", side: side, sideOffset: 8, children: _jsx(BasePreviewCard.Popup, { className: "popover hover-card", children: children }) }) })] }); }
|
|
142
142
|
// A MARCA de um item que alterna fica num slot de largura FIXA, e não condicional: sem ele, um
|
|
143
143
|
// menu com um item marcado e outro não desalinharia os rótulos a cada clique — o texto andaria
|
|
144
144
|
// para o lado sozinho. É a mesma razão de o `leadingIcon` ter lugar próprio.
|
|
@@ -169,7 +169,7 @@ function renderMenuItems(items, portal) {
|
|
|
169
169
|
const sm = it;
|
|
170
170
|
// O submenu é uma RAIZ própria com gatilho próprio — não é um item que "abre outro menu".
|
|
171
171
|
// É o que dá `aria-haspopup`, a seta para a direita e o fechamento em cascata de graça.
|
|
172
|
-
return _jsxs(BaseMenu.SubmenuRoot, { children: [_jsxs(BaseMenu.SubmenuTrigger, { className: "menu-item", disabled: sm.disabled, children: [dentro(sm), _jsx(Icon, { name: "caret-right", size: "sm", className: "menu-seta" })] }), _jsx(BaseMenu.Portal, { container: portal, children: _jsx(BaseMenu.Positioner, { side: "inline-end", sideOffset: 4, children: _jsx(BaseMenu.Popup, { className: "menu", children: renderMenuItems(sm.items, portal) }) }) })] }, i);
|
|
172
|
+
return _jsxs(BaseMenu.SubmenuRoot, { children: [_jsxs(BaseMenu.SubmenuTrigger, { className: "menu-item", disabled: sm.disabled, children: [dentro(sm), _jsx(Icon, { name: "caret-right", size: "sm", className: "menu-seta" })] }), _jsx(BaseMenu.Portal, { container: portal, children: _jsx(BaseMenu.Positioner, { className: "positioner", side: "inline-end", sideOffset: 4, children: _jsx(BaseMenu.Popup, { className: "menu", children: renderMenuItems(sm.items, portal) }) }) })] }, i);
|
|
173
173
|
}
|
|
174
174
|
case "checkbox": {
|
|
175
175
|
const c = it;
|
|
@@ -191,13 +191,13 @@ function renderMenuItems(items, portal) {
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
export function DropdownMenu({ trigger, items, side = "bottom", label }) { const portal = usePortalContainer(); return _jsxs(BaseMenu.Root, { children: [_jsx(BaseMenu.Trigger, { render: trigger }), _jsx(BaseMenu.Portal, { container: portal, children: _jsx(BaseMenu.Positioner, { side: side, sideOffset: 6, children: _jsx(BaseMenu.Popup, { className: "menu", "aria-label": label, children: renderMenuItems(items, portal) }) }) })] }); }
|
|
194
|
+
export function DropdownMenu({ trigger, items, side = "bottom", label }) { const portal = usePortalContainer(); return _jsxs(BaseMenu.Root, { children: [_jsx(BaseMenu.Trigger, { render: trigger }), _jsx(BaseMenu.Portal, { container: portal, children: _jsx(BaseMenu.Positioner, { className: "positioner", side: side, sideOffset: 6, children: _jsx(BaseMenu.Popup, { className: "menu", "aria-label": label, children: renderMenuItems(items, portal) }) }) })] }); }
|
|
195
195
|
// ContextMenu: abre no botão direito e — por teclado — em Shift+F10 / tecla Menu,
|
|
196
196
|
// que o browser só dispara (como evento contextmenu) sobre um elemento FOCADO. Por
|
|
197
197
|
// isso o gatilho é focável (tabIndex 0) e tem nome acessível (auditoria 18/07/2026,
|
|
198
198
|
// MÉDIO 3); sem isso o teclado não alcança o menu. Consumidor pode sobrescrever
|
|
199
199
|
// tabIndex via children se o próprio já for focável.
|
|
200
|
-
export function ContextMenu({ children, items, label, className }) { const portal = usePortalContainer(); return _jsxs(BaseContextMenu.Root, { children: [_jsx(BaseContextMenu.Trigger, { className: className, tabIndex: 0, "aria-label": label, "aria-haspopup": "menu", children: children }), _jsx(BaseContextMenu.Portal, { container: portal, children: _jsx(BaseContextMenu.Positioner, { children: _jsx(BaseContextMenu.Popup, { className: "menu", "aria-label": label, children: renderMenuItems(items, portal) }) }) })] }); }
|
|
200
|
+
export function ContextMenu({ children, items, label, className }) { const portal = usePortalContainer(); return _jsxs(BaseContextMenu.Root, { children: [_jsx(BaseContextMenu.Trigger, { className: className, tabIndex: 0, "aria-label": label, "aria-haspopup": "menu", children: children }), _jsx(BaseContextMenu.Portal, { container: portal, children: _jsx(BaseContextMenu.Positioner, { className: "positioner", children: _jsx(BaseContextMenu.Popup, { className: "menu", "aria-label": label, children: renderMenuItems(items, portal) }) }) })] }); }
|
|
201
201
|
// G-AXIS-06 — o valor responsivo RESOLVIDO é a única fonte de verdade: ele vai para o motor, o
|
|
202
202
|
// motor publica `data-orientation`/`aria-orientation` e ajusta o teclado, e a pele reage ao
|
|
203
203
|
// atributo publicado. Ver `decisions/0047-css-first-para-apresentacao-runtime-para-semantica.md`.
|
|
@@ -206,5 +206,5 @@ export function Menubar({ menus, label, modal, disabled, loopFocus, orientation,
|
|
|
206
206
|
const ancora = useRef(null);
|
|
207
207
|
const resolvida = useValorResponsivo(orientation, "horizontal", ancora);
|
|
208
208
|
const vertical = resolvida === "vertical";
|
|
209
|
-
return _jsx(BaseMenubar, { ref: ancora, modal: modal, disabled: disabled, loopFocus: loopFocus, orientation: resolvida, "aria-label": label, className: cx("menubar", className), children: menus.map((m, i) => _jsxs(BaseMenu.Root, { disabled: m.disabled, children: [_jsx(BaseMenu.Trigger, { className: "menubar-trigger", children: m.label }), _jsx(BaseMenu.Portal, { container: portal, children: _jsx(BaseMenu.Positioner, { side: vertical ? "inline-end" : "bottom", align: "start", sideOffset: 4, children: _jsx(BaseMenu.Popup, { className: "menu", children: renderMenuItems(m.items) }) }) })] }, i)) });
|
|
209
|
+
return _jsx(BaseMenubar, { ref: ancora, modal: modal, disabled: disabled, loopFocus: loopFocus, orientation: resolvida, "aria-label": label, className: cx("menubar", className), children: menus.map((m, i) => _jsxs(BaseMenu.Root, { disabled: m.disabled, children: [_jsx(BaseMenu.Trigger, { className: "menubar-trigger", children: m.label }), _jsx(BaseMenu.Portal, { container: portal, children: _jsx(BaseMenu.Positioner, { className: "positioner", side: vertical ? "inline-end" : "bottom", align: "start", sideOffset: 4, children: _jsx(BaseMenu.Popup, { className: "menu", children: renderMenuItems(m.items) }) }) })] }, i)) });
|
|
210
210
|
}
|
package/dist/pure.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export declare function fundirRender(render: ReactElement | undefined, props: {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
} & Record<string, unknown>, padrao?: string): ReactElement;
|
|
6
6
|
export type AureaTheme = "dark" | "light";
|
|
7
|
+
/** O que se ESCOLHE (15/10/2026): um tema, ou `"system"` — seguir o claro/escuro do sistema, e mudar junto com ele.
|
|
8
|
+
* O tema na tela continua sendo `AureaTheme`; a preferência é o que a chave de três posições guarda. */
|
|
9
|
+
export type AureaThemePreference = AureaTheme | "system";
|
|
7
10
|
export type AureaDensity = "compact" | "comfortable" | "spacious";
|
|
8
11
|
export type UniversalState = "waiting_user" | "waiting_approval" | "waiting_dependency" | "offline" | "stale" | "partial" | "degraded";
|
|
9
12
|
export declare const universalStates: readonly UniversalState[];
|
|
@@ -229,6 +232,10 @@ export interface AureaStrings {
|
|
|
229
232
|
sidebarExpand: string;
|
|
230
233
|
bottomNavLabel: string;
|
|
231
234
|
themeToDark: string;
|
|
235
|
+
themeChoice: string;
|
|
236
|
+
themeLight: string;
|
|
237
|
+
themeDark: string;
|
|
238
|
+
themeSystem: string;
|
|
232
239
|
themeToLight: string;
|
|
233
240
|
datePlaceholder: string;
|
|
234
241
|
dateRangePlaceholder: string;
|
package/dist/pure.js
CHANGED
|
@@ -53,10 +53,10 @@ export const universalStates = ["waiting_user", "waiting_approval", "waiting_dep
|
|
|
53
53
|
// perdeu qualidade é avisado. Um `role="alert"` aqui interromperia o leitor de tela por uma
|
|
54
54
|
// condição que não pede ação imediata, que é o oposto do que o papel serve.
|
|
55
55
|
export const stateSeverity = (state) => state.startsWith("waiting_") ? "info" : "warning";
|
|
56
|
-
export const defaultStrings = { passwordShow: "Show password", passwordHide: "Hide password", skipToContent: "Skip to content", close: "Close", confirmCancel: "Cancel", dataError: "This could not be loaded.", dataCrashed: "Something went wrong here.", dataRetry: "Try again", dataEmpty: "Nothing here yet", confirmProceed: "Continue", paginationLabel: "Pagination", paginationPage: "Page", previous: "Previous", next: "Next", breadcrumbLabel: "Breadcrumb", tabsLabel: "Tabs", optionsLabel: "Options", tableLabel: "Table", commandLabel: "Command palette", commandPlaceholder: "Type a command…", commandHintMove: "move", commandHintSelect: "open", commandHintClose: "close", dismissNotification: "Dismiss notification", toolbarLabel: "Toolbar", loading: "Loading", otpDigit: "Digit", stepperLabel: "Steps", increment: "Increase", decrement: "Decrease", comboboxEmpty: "No results", comboboxClear: "Clear selection", comboboxOpen: "Open list", comboboxRemove: "Remove", comboboxLoading: "Loading…", fileDropPrompt: "Drag files here or click to select", fileAdded: "File added", fileRemoved: "File removed", fileRemove: "Remove", fileTooLarge: "File exceeds the size limit", fileWrongType: "File type not allowed", treeLabel: "Tree", notificationsLabel: "Notifications", notificationMarkAll: "Mark all as read", notificationEmpty: "No notifications", notificationUnread: "Unread", notificationNew: "new notifications", dataGridFilter: "Filter", dataGridEmpty: "No results", dataGridSelectAll: "Select all rows", dataGridSelectRow: "Select row", dataGridSelected: "selected", dataGridClearSelection: "Clear selection", dataGridBulkLabel: "Bulk actions", dataGridColumns: "Columns", dataGridResize: "Resize column", dataGridStale: "Showing data that may be out of date.", dataGridPartial: "Some rows could not be loaded. What you see is incomplete.", dataGridError: "The rows could not be loaded.", dataGridDetails: "Details", dataGridDetailPanel: "Row detail", dataGridExport: "Export", dataGridExportRows: "rows", dataGridExportFiltered: "filtered rows", dataGridExportSelected: "selected rows", mediaPlayer: "Media player", mediaPlay: "Play", mediaPause: "Pause", mediaMute: "Mute", mediaUnmute: "Unmute", mediaSeek: "Seek", mediaVolume: "Volume", mediaCaptionsShow: "Show captions", mediaCaptionsHide: "Hide captions", mediaSkipBack: "Skip back 10 seconds", mediaSkipForward: "Skip forward 10 seconds", mediaFullscreenEnter: "Enter full screen", mediaFullscreenExit: "Exit full screen", mediaEmbedOpen: "Open the video on its own site", carouselLabel: "Carousel", carouselSlide: "Slide", positionOf: "of", carouselPrev: "Previous slide", carouselNext: "Next slide", galleryLabel: "Gallery", galleryVideo: "Video", sortableLabel: "Sortable list", sortableHandle: "Reorder", sortableHelp: "Press Space to pick this up, then Arrow Up and Arrow Down to move it. Space drops it, Escape puts it back.", sortableGrabbed: "Picked up", sortableDropped: "Dropped", sortableMoved: "Moved", sortableCanceled: "Put back", blockEditorLabel: "Content blocks", blockLabel: "Block", blockRemove: "Remove block", uploadSending: "Uploading", uploadCancel: "Cancel upload", uploadRetry: "Retry upload", uploadError: "Upload failed", uploadCanceled: "Upload canceled", uploadComplete: "Upload complete", uploadPause: "Pause upload", uploadResume: "Resume upload", uploadPaused: "Paused", uploadPending: "Waiting", uploadChecksum: "Checksum", uploadChecksumBad: "The server received different bytes than the ones sent.", fileConflict: "A file with this name is already in the queue", fileReplace: "Replace", fileKeepBoth: "Keep both", fileSkip: "Skip", uploadReceipt: "Receipt", uploadReceiptCopy: "Copy receipt", agentInspector: "Agent inspector", invocationLabel: "Invocation", invocationInput: "Input", invocationOutput: "Output", taskQueueLabel: "Task queue", taskState: { queued: "Queued", running: "Running", completed: "Completed", failed: "Failed", blocked: "Blocked", paused: "Paused" }, taskPriority: { low: "Low", medium: "Medium", high: "High" }, approvalLabel: "Approval", approvalApprove: "Approve", approvalDeny: "Deny", approvalApproved: "Approved", approvalDenied: "Denied", approvalDeadline: "Decide by", approvalRisk: { low: "Low risk", medium: "Medium risk", high: "High risk" }, permissionLabel: "Tool permissions", permissionAsk: "Ask", permissionAlways: "Always", permissionNever: "Never", eventStreamLabel: "Events", traceLabel: "Trace", healthLabel: "Health", healthState: { operational: "Operational", degraded: "Degraded", down: "Down", maintenance: "Maintenance", unknown: "Unknown" }, modelUsageLabel: "Model usage", usageMetric: { tokens: "Tokens", cost: "Cost", requests: "Requests" }, costMeterLabel: "Cost", costMeterSpent: "Spent", costMeterRemaining: "left", costMeterExceeded: "Over the limit", costMeterNear: "Spending is past the soft limit.", costMeterOver: "The limit has been reached. Further calls are blocked.", memoryLabel: "Memory ledger", memoryProvenance: "Where this came from", memoryOperation: { added: "Added", updated: "Updated", recalled: "Recalled", forgotten: "Forgotten" }, memoryScope: { episodic: "Episodic", semantic: "Semantic", procedural: "Procedural" }, agentMessageLabel: "Agent messages", agentMessageTo: "to", agentMessageBroadcast: "all agents", agentMessageReason: "Why it went this way", agentMessageKind: { request: "Request", response: "Response", handoff: "Handoff", broadcast: "Broadcast", error: "Error" }, automationWhen: "When", automationThen: "Then", automationEnabled: "Enabled", automationLastRun: "Last run", automationResult: { success: "Succeeded", failure: "Failed" }, graphLabel: "Dependency graph", graphZoomIn: "Zoom in", graphZoomOut: "Zoom out", graphFit: "Fit to screen", graphLegend: "Legend", graphLegendKind: "Link type", graphLegendStatus: "Status", graphOverview: "Overview", graphConnections: "connections", graphShow: "Show", graphJoin: "Join", graphArrange: "Arrange the map", graphUndo: "Undo", graphRedo: "Redo", graphAlignLeft: "Align left", graphAlignCenter: "Align centers", graphAlignRight: "Align right", graphAlignTop: "Align top", graphAlignMiddle: "Align middles", graphAlignBottom: "Align bottom", graphDistributeH: "Distribute horizontally", graphDistributeV: "Distribute vertically", graphPin: "Pin in place", graphPinned: "pinned", graphRelayout: "Rearrange", graphExpand: "Open", graphCollapse: "Close", graphHidden: "hidden", graphEdge: "Connection", graphEdgeHelp: "Enter selects the connection.", graphHandle: "Connection point", graphNodeHelp: "Enter or Space selects the node. Once selected, the arrow keys move it; with Shift, further. Escape releases it.", graphMoved: "Node moved", agentState: { idle: "Idle", thinking: "Thinking", running: "Running", paused: "Paused", error: "Error", completed: "Completed" }, codeEditor: "Code editor", chatLabel: "Conversation", chatMessage: "Message", chatSend: "Send", chatAttach: "Attach file", chatAttachments: "Attachments", chatReplyTo: "Replying to", chatReplyCancel: "Cancel reply", chatEditing: "Editing message", chatEditCancel: "Cancel editing", chatSave: "Save", chatEdited: "edited", chatForwardedFrom: "Forwarded from", qrCode: "QR code", chartLabel: "Chart", copyCode: "Copy code", codeBlockPreview: "Preview", codeBlockCode: "Code", copied: "Copied", linkCopied: "Link copied", linkCopyFailed: "Could not copy. Copy the link below.", tocLabel: "On this page", navigationToggle: "Navigation", sidebarLabel: "Sidebar", sidebarCollapse: "Collapse sidebar", sidebarExpand: "Expand sidebar", bottomNavLabel: "Main", themeToDark: "Switch to dark theme", themeToLight: "Switch to light theme", datePlaceholder: "Pick a date", dateRangePlaceholder: "Pick a date range", colorPicker: "Color picker", colorArea2D: "2D slider", colorChannel: { hue: "Hue", saturation: "Saturation", brightness: "Brightness", lightness: "Lightness", red: "Red", green: "Green", blue: "Blue", alpha: "Alpha" }, colorHue: { red: "red", orange: "orange", yellow: "yellow", green: "green", cyan: "cyan", blue: "blue", purple: "purple", magenta: "magenta", pink: "pink", brown: "brown", gray: "gray", white: "white", black: "black" }, colorTone: { veryDark: "very dark", dark: "dark", light: "light", veryLight: "very light", vivid: "vivid", pale: "pale", grayish: "grayish" }, colorNameFormat: "{lightness} {chroma} {hue}", colorHex: "Hex", colorSwatches: "Swatches", universalState: { waiting_user: "Waiting for someone to act.", waiting_approval: "Waiting for approval.", waiting_dependency: "Waiting for something else to finish.", offline: "No connection. This was loaded earlier.", stale: "This may be out of date.", partial: "Some of this could not be loaded.", degraded: "Working with reduced capability." } };
|
|
56
|
+
export const defaultStrings = { passwordShow: "Show password", passwordHide: "Hide password", skipToContent: "Skip to content", close: "Close", confirmCancel: "Cancel", dataError: "This could not be loaded.", dataCrashed: "Something went wrong here.", dataRetry: "Try again", dataEmpty: "Nothing here yet", confirmProceed: "Continue", paginationLabel: "Pagination", paginationPage: "Page", previous: "Previous", next: "Next", breadcrumbLabel: "Breadcrumb", tabsLabel: "Tabs", optionsLabel: "Options", tableLabel: "Table", commandLabel: "Command palette", commandPlaceholder: "Type a command…", commandHintMove: "move", commandHintSelect: "open", commandHintClose: "close", dismissNotification: "Dismiss notification", toolbarLabel: "Toolbar", loading: "Loading", otpDigit: "Digit", stepperLabel: "Steps", increment: "Increase", decrement: "Decrease", comboboxEmpty: "No results", comboboxClear: "Clear selection", comboboxOpen: "Open list", comboboxRemove: "Remove", comboboxLoading: "Loading…", fileDropPrompt: "Drag files here or click to select", fileAdded: "File added", fileRemoved: "File removed", fileRemove: "Remove", fileTooLarge: "File exceeds the size limit", fileWrongType: "File type not allowed", treeLabel: "Tree", notificationsLabel: "Notifications", notificationMarkAll: "Mark all as read", notificationEmpty: "No notifications", notificationUnread: "Unread", notificationNew: "new notifications", dataGridFilter: "Filter", dataGridEmpty: "No results", dataGridSelectAll: "Select all rows", dataGridSelectRow: "Select row", dataGridSelected: "selected", dataGridClearSelection: "Clear selection", dataGridBulkLabel: "Bulk actions", dataGridColumns: "Columns", dataGridResize: "Resize column", dataGridStale: "Showing data that may be out of date.", dataGridPartial: "Some rows could not be loaded. What you see is incomplete.", dataGridError: "The rows could not be loaded.", dataGridDetails: "Details", dataGridDetailPanel: "Row detail", dataGridExport: "Export", dataGridExportRows: "rows", dataGridExportFiltered: "filtered rows", dataGridExportSelected: "selected rows", mediaPlayer: "Media player", mediaPlay: "Play", mediaPause: "Pause", mediaMute: "Mute", mediaUnmute: "Unmute", mediaSeek: "Seek", mediaVolume: "Volume", mediaCaptionsShow: "Show captions", mediaCaptionsHide: "Hide captions", mediaSkipBack: "Skip back 10 seconds", mediaSkipForward: "Skip forward 10 seconds", mediaFullscreenEnter: "Enter full screen", mediaFullscreenExit: "Exit full screen", mediaEmbedOpen: "Open the video on its own site", carouselLabel: "Carousel", carouselSlide: "Slide", positionOf: "of", carouselPrev: "Previous slide", carouselNext: "Next slide", galleryLabel: "Gallery", galleryVideo: "Video", sortableLabel: "Sortable list", sortableHandle: "Reorder", sortableHelp: "Press Space to pick this up, then Arrow Up and Arrow Down to move it. Space drops it, Escape puts it back.", sortableGrabbed: "Picked up", sortableDropped: "Dropped", sortableMoved: "Moved", sortableCanceled: "Put back", blockEditorLabel: "Content blocks", blockLabel: "Block", blockRemove: "Remove block", uploadSending: "Uploading", uploadCancel: "Cancel upload", uploadRetry: "Retry upload", uploadError: "Upload failed", uploadCanceled: "Upload canceled", uploadComplete: "Upload complete", uploadPause: "Pause upload", uploadResume: "Resume upload", uploadPaused: "Paused", uploadPending: "Waiting", uploadChecksum: "Checksum", uploadChecksumBad: "The server received different bytes than the ones sent.", fileConflict: "A file with this name is already in the queue", fileReplace: "Replace", fileKeepBoth: "Keep both", fileSkip: "Skip", uploadReceipt: "Receipt", uploadReceiptCopy: "Copy receipt", agentInspector: "Agent inspector", invocationLabel: "Invocation", invocationInput: "Input", invocationOutput: "Output", taskQueueLabel: "Task queue", taskState: { queued: "Queued", running: "Running", completed: "Completed", failed: "Failed", blocked: "Blocked", paused: "Paused" }, taskPriority: { low: "Low", medium: "Medium", high: "High" }, approvalLabel: "Approval", approvalApprove: "Approve", approvalDeny: "Deny", approvalApproved: "Approved", approvalDenied: "Denied", approvalDeadline: "Decide by", approvalRisk: { low: "Low risk", medium: "Medium risk", high: "High risk" }, permissionLabel: "Tool permissions", permissionAsk: "Ask", permissionAlways: "Always", permissionNever: "Never", eventStreamLabel: "Events", traceLabel: "Trace", healthLabel: "Health", healthState: { operational: "Operational", degraded: "Degraded", down: "Down", maintenance: "Maintenance", unknown: "Unknown" }, modelUsageLabel: "Model usage", usageMetric: { tokens: "Tokens", cost: "Cost", requests: "Requests" }, costMeterLabel: "Cost", costMeterSpent: "Spent", costMeterRemaining: "left", costMeterExceeded: "Over the limit", costMeterNear: "Spending is past the soft limit.", costMeterOver: "The limit has been reached. Further calls are blocked.", memoryLabel: "Memory ledger", memoryProvenance: "Where this came from", memoryOperation: { added: "Added", updated: "Updated", recalled: "Recalled", forgotten: "Forgotten" }, memoryScope: { episodic: "Episodic", semantic: "Semantic", procedural: "Procedural" }, agentMessageLabel: "Agent messages", agentMessageTo: "to", agentMessageBroadcast: "all agents", agentMessageReason: "Why it went this way", agentMessageKind: { request: "Request", response: "Response", handoff: "Handoff", broadcast: "Broadcast", error: "Error" }, automationWhen: "When", automationThen: "Then", automationEnabled: "Enabled", automationLastRun: "Last run", automationResult: { success: "Succeeded", failure: "Failed" }, graphLabel: "Dependency graph", graphZoomIn: "Zoom in", graphZoomOut: "Zoom out", graphFit: "Fit to screen", graphLegend: "Legend", graphLegendKind: "Link type", graphLegendStatus: "Status", graphOverview: "Overview", graphConnections: "connections", graphShow: "Show", graphJoin: "Join", graphArrange: "Arrange the map", graphUndo: "Undo", graphRedo: "Redo", graphAlignLeft: "Align left", graphAlignCenter: "Align centers", graphAlignRight: "Align right", graphAlignTop: "Align top", graphAlignMiddle: "Align middles", graphAlignBottom: "Align bottom", graphDistributeH: "Distribute horizontally", graphDistributeV: "Distribute vertically", graphPin: "Pin in place", graphPinned: "pinned", graphRelayout: "Rearrange", graphExpand: "Open", graphCollapse: "Close", graphHidden: "hidden", graphEdge: "Connection", graphEdgeHelp: "Enter selects the connection.", graphHandle: "Connection point", graphNodeHelp: "Enter or Space selects the node. Once selected, the arrow keys move it; with Shift, further. Escape releases it.", graphMoved: "Node moved", agentState: { idle: "Idle", thinking: "Thinking", running: "Running", paused: "Paused", error: "Error", completed: "Completed" }, codeEditor: "Code editor", chatLabel: "Conversation", chatMessage: "Message", chatSend: "Send", chatAttach: "Attach file", chatAttachments: "Attachments", chatReplyTo: "Replying to", chatReplyCancel: "Cancel reply", chatEditing: "Editing message", chatEditCancel: "Cancel editing", chatSave: "Save", chatEdited: "edited", chatForwardedFrom: "Forwarded from", qrCode: "QR code", chartLabel: "Chart", copyCode: "Copy code", codeBlockPreview: "Preview", codeBlockCode: "Code", copied: "Copied", linkCopied: "Link copied", linkCopyFailed: "Could not copy. Copy the link below.", tocLabel: "On this page", navigationToggle: "Navigation", sidebarLabel: "Sidebar", sidebarCollapse: "Collapse sidebar", sidebarExpand: "Expand sidebar", bottomNavLabel: "Main", themeToDark: "Switch to dark theme", themeChoice: "Theme", themeLight: "Light", themeDark: "Dark", themeSystem: "System", themeToLight: "Switch to light theme", datePlaceholder: "Pick a date", dateRangePlaceholder: "Pick a date range", colorPicker: "Color picker", colorArea2D: "2D slider", colorChannel: { hue: "Hue", saturation: "Saturation", brightness: "Brightness", lightness: "Lightness", red: "Red", green: "Green", blue: "Blue", alpha: "Alpha" }, colorHue: { red: "red", orange: "orange", yellow: "yellow", green: "green", cyan: "cyan", blue: "blue", purple: "purple", magenta: "magenta", pink: "pink", brown: "brown", gray: "gray", white: "white", black: "black" }, colorTone: { veryDark: "very dark", dark: "dark", light: "light", veryLight: "very light", vivid: "vivid", pale: "pale", grayish: "grayish" }, colorNameFormat: "{lightness} {chroma} {hue}", colorHex: "Hex", colorSwatches: "Swatches", universalState: { waiting_user: "Waiting for someone to act.", waiting_approval: "Waiting for approval.", waiting_dependency: "Waiting for something else to finish.", offline: "No connection. This was loaded earlier.", stale: "This may be out of date.", partial: "Some of this could not be loaded.", degraded: "Working with reduced capability." } };
|
|
57
57
|
// pt-BR preservado como locale (mesmos valores que já eram o default): passe
|
|
58
58
|
// <AureaProvider strings={ptBR}> para restaurar português.
|
|
59
|
-
export const ptBR = { passwordShow: "Mostrar senha", passwordHide: "Ocultar senha", skipToContent: "Pular para o conteúdo", close: "Fechar", confirmCancel: "Cancelar", dataError: "Não foi possível carregar.", dataCrashed: "Algo deu errado aqui.", dataRetry: "Tentar de novo", dataEmpty: "Ainda não há nada aqui", confirmProceed: "Continuar", paginationLabel: "Paginação", paginationPage: "Página", previous: "Anterior", next: "Próxima", breadcrumbLabel: "Breadcrumb", tabsLabel: "Abas", optionsLabel: "Opções", tableLabel: "Tabela", commandLabel: "Paleta de comandos", commandPlaceholder: "Digite um comando…", commandHintMove: "mover", commandHintSelect: "abrir", commandHintClose: "fechar", dismissNotification: "Dispensar notificação", toolbarLabel: "Barra de ferramentas", loading: "Carregando", otpDigit: "Dígito", stepperLabel: "Etapas", increment: "Aumentar", decrement: "Diminuir", comboboxEmpty: "Nenhum resultado", comboboxClear: "Limpar seleção", comboboxOpen: "Abrir lista", comboboxRemove: "Remover", comboboxLoading: "Carregando…", fileDropPrompt: "Arraste arquivos aqui ou clique para selecionar", fileAdded: "Arquivo adicionado", fileRemoved: "Arquivo removido", fileRemove: "Remover", fileTooLarge: "Arquivo maior que o limite", fileWrongType: "Tipo de arquivo não aceito", treeLabel: "Árvore", notificationsLabel: "Notificações", notificationMarkAll: "Marcar todas como lidas", notificationEmpty: "Nenhuma notificação", notificationUnread: "Não lida", notificationNew: "novas notificações", dataGridFilter: "Filtrar", dataGridEmpty: "Nenhum resultado", dataGridSelectAll: "Selecionar todas as linhas", dataGridSelectRow: "Selecionar linha", dataGridSelected: "selecionadas", dataGridClearSelection: "Limpar seleção", dataGridBulkLabel: "Ações em lote", dataGridColumns: "Colunas", dataGridResize: "Redimensionar coluna", dataGridStale: "Mostrando dados que podem estar desatualizados.", dataGridPartial: "Algumas linhas não puderam ser carregadas. O que aparece está incompleto.", dataGridError: "Não foi possível carregar as linhas.", dataGridDetails: "Detalhes", dataGridDetailPanel: "Detalhe da linha", dataGridExport: "Exportar", dataGridExportRows: "linhas", dataGridExportFiltered: "linhas filtradas", dataGridExportSelected: "linhas selecionadas", mediaPlayer: "Reprodutor de mídia", mediaPlay: "Reproduzir", mediaPause: "Pausar", mediaMute: "Silenciar", mediaUnmute: "Ativar som", mediaSeek: "Posição da reprodução", mediaVolume: "Volume", mediaCaptionsShow: "Ativar legendas", mediaCaptionsHide: "Desativar legendas", mediaSkipBack: "Voltar 10 segundos", mediaSkipForward: "Avançar 10 segundos", mediaFullscreenEnter: "Tela cheia", mediaFullscreenExit: "Sair da tela cheia", mediaEmbedOpen: "Abrir o vídeo no site de origem", carouselLabel: "Carrossel", carouselSlide: "Slide", positionOf: "de", carouselPrev: "Slide anterior", carouselNext: "Próximo slide", galleryLabel: "Galeria", galleryVideo: "Vídeo", sortableLabel: "Lista ordenável", sortableHandle: "Reordenar", sortableHelp: "Aperte Espaço para pegar, e as setas para cima e para baixo para mover. Espaço solta, Esc devolve ao lugar.", sortableGrabbed: "Pego", sortableDropped: "Solto", sortableMoved: "Movido", sortableCanceled: "Devolvido", blockEditorLabel: "Blocos de conteúdo", blockLabel: "Bloco", blockRemove: "Remover bloco", uploadSending: "Enviando", uploadCancel: "Cancelar envio", uploadRetry: "Tentar envio novamente", uploadError: "Falha no envio", uploadCanceled: "Envio cancelado", uploadComplete: "Envio concluído", uploadPause: "Pausar envio", uploadResume: "Retomar envio", uploadPaused: "Pausado", uploadPending: "Aguardando", uploadChecksum: "Soma de verificação", uploadChecksumBad: "O servidor recebeu bytes diferentes dos enviados.", fileConflict: "Já existe um arquivo com este nome na fila", fileReplace: "Substituir", fileKeepBoth: "Manter os dois", fileSkip: "Pular", uploadReceipt: "Recibo", uploadReceiptCopy: "Copiar recibo", agentInspector: "Inspetor do agente", invocationLabel: "Invocação", invocationInput: "Entrada", invocationOutput: "Saída", taskQueueLabel: "Fila de tarefas", taskState: { queued: "Na fila", running: "Executando", completed: "Concluída", failed: "Falhou", blocked: "Bloqueada", paused: "Pausada" }, taskPriority: { low: "Baixa", medium: "Média", high: "Alta" }, approvalLabel: "Aprovação", approvalApprove: "Aprovar", approvalDeny: "Negar", approvalApproved: "Aprovado", approvalDenied: "Negado", approvalDeadline: "Decidir até", approvalRisk: { low: "Risco baixo", medium: "Risco médio", high: "Risco alto" }, permissionLabel: "Permissões de ferramenta", permissionAsk: "Perguntar", permissionAlways: "Sempre", permissionNever: "Nunca", eventStreamLabel: "Eventos", traceLabel: "Rastro", healthLabel: "Saúde", healthState: { operational: "Operando", degraded: "Degradado", down: "Fora do ar", maintenance: "Em manutenção", unknown: "Desconhecido" }, modelUsageLabel: "Consumo por modelo", usageMetric: { tokens: "Tokens", cost: "Custo", requests: "Chamadas" }, costMeterLabel: "Custo", costMeterSpent: "Gasto", costMeterRemaining: "restantes", costMeterExceeded: "Acima do limite", costMeterNear: "O gasto passou do limite brando.", costMeterOver: "O limite foi atingido. As próximas chamadas estão bloqueadas.", memoryLabel: "Livro-razão de memória", memoryProvenance: "De onde isto veio", memoryOperation: { added: "Guardada", updated: "Atualizada", recalled: "Lembrada", forgotten: "Esquecida" }, memoryScope: { episodic: "Episódica", semantic: "Semântica", procedural: "Procedural" }, agentMessageLabel: "Recados entre agentes", agentMessageTo: "para", agentMessageBroadcast: "todos os agentes", agentMessageReason: "Por que foi por aqui", agentMessageKind: { request: "Pedido", response: "Resposta", handoff: "Passagem", broadcast: "Difusão", error: "Erro" }, automationWhen: "Quando", automationThen: "Então", automationEnabled: "Ativa", automationLastRun: "Última execução", automationResult: { success: "Concluiu", failure: "Falhou" }, graphLabel: "Grafo de dependências", graphZoomIn: "Aproximar", graphZoomOut: "Afastar", graphFit: "Caber na tela", graphLegend: "Legenda", graphLegendKind: "Tipo de ligação", graphLegendStatus: "Estado", graphOverview: "Visão geral", graphConnections: "conexões", graphShow: "Mostrar", graphJoin: "Juntar", graphArrange: "Arrumar o mapa", graphUndo: "Desfazer", graphRedo: "Refazer", graphAlignLeft: "Alinhar à esquerda", graphAlignCenter: "Alinhar pelo centro", graphAlignRight: "Alinhar à direita", graphAlignTop: "Alinhar em cima", graphAlignMiddle: "Alinhar pelo meio", graphAlignBottom: "Alinhar embaixo", graphDistributeH: "Distribuir na horizontal", graphDistributeV: "Distribuir na vertical", graphPin: "Fixar no lugar", graphPinned: "fixo", graphRelayout: "Reorganizar", graphExpand: "Abrir", graphCollapse: "Fechar", graphHidden: "ocultos", graphEdge: "Ligação", graphEdgeHelp: "Enter escolhe a ligação.", graphHandle: "Ponto de ligação", graphNodeHelp: "Enter ou Espaço escolhe o nó. Escolhido, as setas o movem; com Shift, mais longe. Esc solta.", graphMoved: "Nó movido", agentState: { idle: "Ocioso", thinking: "Pensando", running: "Executando", paused: "Pausado", error: "Erro", completed: "Concluído" }, codeEditor: "Editor de código", chatLabel: "Conversa", chatMessage: "Mensagem", chatSend: "Enviar", chatAttach: "Anexar arquivo", chatAttachments: "Anexos", chatReplyTo: "Respondendo a", chatReplyCancel: "Cancelar resposta", chatEditing: "Editando mensagem", chatEditCancel: "Cancelar edição", chatSave: "Salvar", chatEdited: "editada", chatForwardedFrom: "Encaminhada de", qrCode: "Código QR", chartLabel: "Gráfico", copyCode: "Copiar código", codeBlockPreview: "Prévia", codeBlockCode: "Código", copied: "Copiado", linkCopied: "Link copiado", linkCopyFailed: "Não deu para copiar. Copie o link abaixo.", tocLabel: "Nesta página", navigationToggle: "Navegação", sidebarLabel: "Lateral", sidebarCollapse: "Recolher o menu", sidebarExpand: "Abrir o menu", bottomNavLabel: "Principal", themeToDark: "Mudar para o tema escuro", themeToLight: "Mudar para o tema claro", datePlaceholder: "Escolher data", dateRangePlaceholder: "Escolher período", colorPicker: "Seletor de cor", colorArea2D: "controle 2D", colorChannel: { hue: "Matiz", saturation: "Saturação", brightness: "Brilho", lightness: "Luminosidade", red: "Vermelho", green: "Verde", blue: "Azul", alpha: "Alfa" }, colorHue: { red: "vermelho", orange: "laranja", yellow: "amarelo", green: "verde", cyan: "ciano", blue: "azul", purple: "roxo", magenta: "magenta", pink: "rosa", brown: "marrom", gray: "cinza", white: "branco", black: "preto" }, colorTone: { veryDark: "muito escuro", dark: "escuro", light: "claro", veryLight: "muito claro", vivid: "vivo", pale: "pálido", grayish: "acinzentado" }, colorNameFormat: "{hue} {chroma} {lightness}", colorHex: "Código hex", colorSwatches: "Amostras", universalState: { waiting_user: "Esperando alguém agir.", waiting_approval: "Esperando aprovação.", waiting_dependency: "Esperando outra coisa terminar.", offline: "Sem conexão. Isto foi carregado antes.", stale: "Isto pode estar desatualizado.", partial: "Parte disto não pôde ser carregada.", degraded: "Funcionando com capacidade reduzida." } };
|
|
59
|
+
export const ptBR = { passwordShow: "Mostrar senha", passwordHide: "Ocultar senha", skipToContent: "Pular para o conteúdo", close: "Fechar", confirmCancel: "Cancelar", dataError: "Não foi possível carregar.", dataCrashed: "Algo deu errado aqui.", dataRetry: "Tentar de novo", dataEmpty: "Ainda não há nada aqui", confirmProceed: "Continuar", paginationLabel: "Paginação", paginationPage: "Página", previous: "Anterior", next: "Próxima", breadcrumbLabel: "Breadcrumb", tabsLabel: "Abas", optionsLabel: "Opções", tableLabel: "Tabela", commandLabel: "Paleta de comandos", commandPlaceholder: "Digite um comando…", commandHintMove: "mover", commandHintSelect: "abrir", commandHintClose: "fechar", dismissNotification: "Dispensar notificação", toolbarLabel: "Barra de ferramentas", loading: "Carregando", otpDigit: "Dígito", stepperLabel: "Etapas", increment: "Aumentar", decrement: "Diminuir", comboboxEmpty: "Nenhum resultado", comboboxClear: "Limpar seleção", comboboxOpen: "Abrir lista", comboboxRemove: "Remover", comboboxLoading: "Carregando…", fileDropPrompt: "Arraste arquivos aqui ou clique para selecionar", fileAdded: "Arquivo adicionado", fileRemoved: "Arquivo removido", fileRemove: "Remover", fileTooLarge: "Arquivo maior que o limite", fileWrongType: "Tipo de arquivo não aceito", treeLabel: "Árvore", notificationsLabel: "Notificações", notificationMarkAll: "Marcar todas como lidas", notificationEmpty: "Nenhuma notificação", notificationUnread: "Não lida", notificationNew: "novas notificações", dataGridFilter: "Filtrar", dataGridEmpty: "Nenhum resultado", dataGridSelectAll: "Selecionar todas as linhas", dataGridSelectRow: "Selecionar linha", dataGridSelected: "selecionadas", dataGridClearSelection: "Limpar seleção", dataGridBulkLabel: "Ações em lote", dataGridColumns: "Colunas", dataGridResize: "Redimensionar coluna", dataGridStale: "Mostrando dados que podem estar desatualizados.", dataGridPartial: "Algumas linhas não puderam ser carregadas. O que aparece está incompleto.", dataGridError: "Não foi possível carregar as linhas.", dataGridDetails: "Detalhes", dataGridDetailPanel: "Detalhe da linha", dataGridExport: "Exportar", dataGridExportRows: "linhas", dataGridExportFiltered: "linhas filtradas", dataGridExportSelected: "linhas selecionadas", mediaPlayer: "Reprodutor de mídia", mediaPlay: "Reproduzir", mediaPause: "Pausar", mediaMute: "Silenciar", mediaUnmute: "Ativar som", mediaSeek: "Posição da reprodução", mediaVolume: "Volume", mediaCaptionsShow: "Ativar legendas", mediaCaptionsHide: "Desativar legendas", mediaSkipBack: "Voltar 10 segundos", mediaSkipForward: "Avançar 10 segundos", mediaFullscreenEnter: "Tela cheia", mediaFullscreenExit: "Sair da tela cheia", mediaEmbedOpen: "Abrir o vídeo no site de origem", carouselLabel: "Carrossel", carouselSlide: "Slide", positionOf: "de", carouselPrev: "Slide anterior", carouselNext: "Próximo slide", galleryLabel: "Galeria", galleryVideo: "Vídeo", sortableLabel: "Lista ordenável", sortableHandle: "Reordenar", sortableHelp: "Aperte Espaço para pegar, e as setas para cima e para baixo para mover. Espaço solta, Esc devolve ao lugar.", sortableGrabbed: "Pego", sortableDropped: "Solto", sortableMoved: "Movido", sortableCanceled: "Devolvido", blockEditorLabel: "Blocos de conteúdo", blockLabel: "Bloco", blockRemove: "Remover bloco", uploadSending: "Enviando", uploadCancel: "Cancelar envio", uploadRetry: "Tentar envio novamente", uploadError: "Falha no envio", uploadCanceled: "Envio cancelado", uploadComplete: "Envio concluído", uploadPause: "Pausar envio", uploadResume: "Retomar envio", uploadPaused: "Pausado", uploadPending: "Aguardando", uploadChecksum: "Soma de verificação", uploadChecksumBad: "O servidor recebeu bytes diferentes dos enviados.", fileConflict: "Já existe um arquivo com este nome na fila", fileReplace: "Substituir", fileKeepBoth: "Manter os dois", fileSkip: "Pular", uploadReceipt: "Recibo", uploadReceiptCopy: "Copiar recibo", agentInspector: "Inspetor do agente", invocationLabel: "Invocação", invocationInput: "Entrada", invocationOutput: "Saída", taskQueueLabel: "Fila de tarefas", taskState: { queued: "Na fila", running: "Executando", completed: "Concluída", failed: "Falhou", blocked: "Bloqueada", paused: "Pausada" }, taskPriority: { low: "Baixa", medium: "Média", high: "Alta" }, approvalLabel: "Aprovação", approvalApprove: "Aprovar", approvalDeny: "Negar", approvalApproved: "Aprovado", approvalDenied: "Negado", approvalDeadline: "Decidir até", approvalRisk: { low: "Risco baixo", medium: "Risco médio", high: "Risco alto" }, permissionLabel: "Permissões de ferramenta", permissionAsk: "Perguntar", permissionAlways: "Sempre", permissionNever: "Nunca", eventStreamLabel: "Eventos", traceLabel: "Rastro", healthLabel: "Saúde", healthState: { operational: "Operando", degraded: "Degradado", down: "Fora do ar", maintenance: "Em manutenção", unknown: "Desconhecido" }, modelUsageLabel: "Consumo por modelo", usageMetric: { tokens: "Tokens", cost: "Custo", requests: "Chamadas" }, costMeterLabel: "Custo", costMeterSpent: "Gasto", costMeterRemaining: "restantes", costMeterExceeded: "Acima do limite", costMeterNear: "O gasto passou do limite brando.", costMeterOver: "O limite foi atingido. As próximas chamadas estão bloqueadas.", memoryLabel: "Livro-razão de memória", memoryProvenance: "De onde isto veio", memoryOperation: { added: "Guardada", updated: "Atualizada", recalled: "Lembrada", forgotten: "Esquecida" }, memoryScope: { episodic: "Episódica", semantic: "Semântica", procedural: "Procedural" }, agentMessageLabel: "Recados entre agentes", agentMessageTo: "para", agentMessageBroadcast: "todos os agentes", agentMessageReason: "Por que foi por aqui", agentMessageKind: { request: "Pedido", response: "Resposta", handoff: "Passagem", broadcast: "Difusão", error: "Erro" }, automationWhen: "Quando", automationThen: "Então", automationEnabled: "Ativa", automationLastRun: "Última execução", automationResult: { success: "Concluiu", failure: "Falhou" }, graphLabel: "Grafo de dependências", graphZoomIn: "Aproximar", graphZoomOut: "Afastar", graphFit: "Caber na tela", graphLegend: "Legenda", graphLegendKind: "Tipo de ligação", graphLegendStatus: "Estado", graphOverview: "Visão geral", graphConnections: "conexões", graphShow: "Mostrar", graphJoin: "Juntar", graphArrange: "Arrumar o mapa", graphUndo: "Desfazer", graphRedo: "Refazer", graphAlignLeft: "Alinhar à esquerda", graphAlignCenter: "Alinhar pelo centro", graphAlignRight: "Alinhar à direita", graphAlignTop: "Alinhar em cima", graphAlignMiddle: "Alinhar pelo meio", graphAlignBottom: "Alinhar embaixo", graphDistributeH: "Distribuir na horizontal", graphDistributeV: "Distribuir na vertical", graphPin: "Fixar no lugar", graphPinned: "fixo", graphRelayout: "Reorganizar", graphExpand: "Abrir", graphCollapse: "Fechar", graphHidden: "ocultos", graphEdge: "Ligação", graphEdgeHelp: "Enter escolhe a ligação.", graphHandle: "Ponto de ligação", graphNodeHelp: "Enter ou Espaço escolhe o nó. Escolhido, as setas o movem; com Shift, mais longe. Esc solta.", graphMoved: "Nó movido", agentState: { idle: "Ocioso", thinking: "Pensando", running: "Executando", paused: "Pausado", error: "Erro", completed: "Concluído" }, codeEditor: "Editor de código", chatLabel: "Conversa", chatMessage: "Mensagem", chatSend: "Enviar", chatAttach: "Anexar arquivo", chatAttachments: "Anexos", chatReplyTo: "Respondendo a", chatReplyCancel: "Cancelar resposta", chatEditing: "Editando mensagem", chatEditCancel: "Cancelar edição", chatSave: "Salvar", chatEdited: "editada", chatForwardedFrom: "Encaminhada de", qrCode: "Código QR", chartLabel: "Gráfico", copyCode: "Copiar código", codeBlockPreview: "Prévia", codeBlockCode: "Código", copied: "Copiado", linkCopied: "Link copiado", linkCopyFailed: "Não deu para copiar. Copie o link abaixo.", tocLabel: "Nesta página", navigationToggle: "Navegação", sidebarLabel: "Lateral", sidebarCollapse: "Recolher o menu", sidebarExpand: "Abrir o menu", bottomNavLabel: "Principal", themeToDark: "Mudar para o tema escuro", themeChoice: "Tema", themeLight: "Claro", themeDark: "Escuro", themeSystem: "Sistema", themeToLight: "Mudar para o tema claro", datePlaceholder: "Escolher data", dateRangePlaceholder: "Escolher período", colorPicker: "Seletor de cor", colorArea2D: "controle 2D", colorChannel: { hue: "Matiz", saturation: "Saturação", brightness: "Brilho", lightness: "Luminosidade", red: "Vermelho", green: "Verde", blue: "Azul", alpha: "Alfa" }, colorHue: { red: "vermelho", orange: "laranja", yellow: "amarelo", green: "verde", cyan: "ciano", blue: "azul", purple: "roxo", magenta: "magenta", pink: "rosa", brown: "marrom", gray: "cinza", white: "branco", black: "preto" }, colorTone: { veryDark: "muito escuro", dark: "escuro", light: "claro", veryLight: "muito claro", vivid: "vivo", pale: "pálido", grayish: "acinzentado" }, colorNameFormat: "{hue} {chroma} {lightness}", colorHex: "Código hex", colorSwatches: "Amostras", universalState: { waiting_user: "Esperando alguém agir.", waiting_approval: "Esperando aprovação.", waiting_dependency: "Esperando outra coisa terminar.", offline: "Sem conexão. Isto foi carregado antes.", stale: "Isto pode estar desatualizado.", partial: "Parte disto não pôde ser carregada.", degraded: "Funcionando com capacidade reduzida." } };
|
|
60
60
|
// Sprite de ícones: CONFIGURAÇÃO DE APLICAÇÃO, então entra pelo provider, uma vez.
|
|
61
61
|
// Antes o default absoluto "/aurea-icons.svg" vivia no Icon e 15 componentes declaravam
|
|
62
62
|
// e repassavam `spriteUrl` à mão — 52 sítios de código. Consequência: aplicação servida
|
package/dist/system.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
2
|
import { type Responsive } from "./pure.js";
|
|
3
|
-
import { type AureaStrings, type AureaTheme, type AureaDensity } from "./internal.js";
|
|
4
|
-
export declare function AureaProvider({ children, strings, direction, spriteUrl, portalContainer, theme, defaultTheme, onThemeChange, density, defaultDensity, onDensityChange, toastPlacement }: {
|
|
3
|
+
import { type AureaStrings, type AureaTheme, type AureaThemePreference, type AureaDensity } from "./internal.js";
|
|
4
|
+
export declare function AureaProvider({ children, strings, direction, spriteUrl, portalContainer, theme, defaultTheme, onThemeChange, onThemePreferenceChange, density, defaultDensity, onDensityChange, toastPlacement }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
strings?: Partial<AureaStrings>;
|
|
7
7
|
direction?: "ltr" | "rtl";
|
|
8
8
|
spriteUrl?: string;
|
|
9
9
|
portalContainer?: HTMLElement | null;
|
|
10
|
-
theme?:
|
|
11
|
-
defaultTheme?:
|
|
10
|
+
theme?: AureaThemePreference;
|
|
11
|
+
defaultTheme?: AureaThemePreference;
|
|
12
12
|
onThemeChange?: (theme: AureaTheme) => void;
|
|
13
|
+
onThemePreferenceChange?: (preference: AureaThemePreference) => void;
|
|
13
14
|
density?: AureaDensity;
|
|
14
15
|
defaultDensity?: AureaDensity;
|
|
15
16
|
onDensityChange?: (density: AureaDensity) => void;
|
|
@@ -22,7 +23,9 @@ export type { AureaDensity };
|
|
|
22
23
|
export declare function useAureaTheme(): {
|
|
23
24
|
theme: AureaThemeName | null;
|
|
24
25
|
density: AureaDensity | null;
|
|
25
|
-
|
|
26
|
+
/** O que foi escolhido (15/10/2026): pode ser `"system"`. Fora de um provider, o tema na tela. */
|
|
27
|
+
preference: "system" | AureaThemeName | null;
|
|
28
|
+
setTheme: (t: AureaThemePreference) => void;
|
|
26
29
|
setDensity: (d: AureaDensity) => void;
|
|
27
30
|
toggleTheme: () => void;
|
|
28
31
|
};
|