@aurea-uds/react 0.8.11 → 0.8.13
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.
|
@@ -81,14 +81,16 @@ export declare function Sidebar({ items, current, collapsed, variant, label, chi
|
|
|
81
81
|
}): React.JSX.Element;
|
|
82
82
|
export type BottomNavVariant = "floating" | "edge";
|
|
83
83
|
export type BottomNavIndicator = "none" | "subtle" | "pill" | "circle" | "circle-raised" | "circle-bold" | "circle-outline";
|
|
84
|
+
export type BottomNavWidth = "full" | "content";
|
|
84
85
|
/** @deprecated Os quatro nomes de 17/08/2026. Use `variant` + `indicator`. */
|
|
85
86
|
export type BottomNavVariantLegacy = "flat" | "surface" | "pill" | "dock";
|
|
86
87
|
export type BottomNavVariantAny = BottomNavVariant | BottomNavVariantLegacy;
|
|
87
|
-
export declare function BottomNav({ items, current, variant, indicator, label, className, ...props }: HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement> & {
|
|
88
|
+
export declare function BottomNav({ items, current, variant, indicator, width, label, className, ...props }: HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement> & {
|
|
88
89
|
items: SidebarItem[];
|
|
89
90
|
current?: string;
|
|
90
91
|
variant?: BottomNavVariantAny;
|
|
91
92
|
indicator?: BottomNavIndicator;
|
|
93
|
+
width?: BottomNavWidth;
|
|
92
94
|
label?: string;
|
|
93
95
|
}): React.JSX.Element;
|
|
94
96
|
export interface NavListItem {
|
|
@@ -222,12 +222,12 @@ export function Sidebar({ items, current, collapsed, variant = "floating", label
|
|
|
222
222
|
const LEGADO = {
|
|
223
223
|
flat: ["edge", "none"], surface: ["floating", "circle"], pill: ["floating", "pill"], dock: ["floating", "circle"]
|
|
224
224
|
};
|
|
225
|
-
export function BottomNav({ items, current, variant = "floating", indicator = "none", label, className, ...props }) {
|
|
225
|
+
export function BottomNav({ items, current, variant = "floating", indicator = "none", width = "full", label, className, ...props }) {
|
|
226
226
|
const s = useAureaStrings();
|
|
227
227
|
const [layout, marca0] = variant in LEGADO ? LEGADO[variant] : [variant, indicator];
|
|
228
228
|
// O indicador explícito ganha do que o nome legado implica: quem escreveu os dois quis os dois.
|
|
229
229
|
const ind = indicator !== "none" ? indicator : marca0;
|
|
230
|
-
return _jsx("nav", { className: cx("bottom-nav", layout === "edge" && "bottom-nav-edge", `bottom-nav-ind-${ind}`, className), "aria-label": label ?? s.bottomNavLabel, ...props, children: items.map(it => {
|
|
230
|
+
return _jsx("nav", { className: cx("bottom-nav", layout === "edge" && "bottom-nav-edge", layout !== "edge" && width === "content" && "bottom-nav-content", `bottom-nav-ind-${ind}`, className), "aria-label": label ?? s.bottomNavLabel, ...props, children: items.map(it => {
|
|
231
231
|
const ativo = it.id === current;
|
|
232
232
|
// O CONTADOR PENDURA NO ÍCONE, e é por isso que existe esta caixa. Pendurado no ITEM (a
|
|
233
233
|
// primeira versão), `50%` cai no meio do RÓTULO quando o item é linha — o Victor viu o número
|