@raulaguila/maat-ui 0.3.0 → 0.4.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/README.md +3 -1
- package/dist/layout.d.ts +8 -0
- package/dist/layout.js +4 -0
- package/package.json +1 -1
- package/styles.css +46 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ O pacote **@raulaguila/maat-ui** é a biblioteca de componentes da família Maat
|
|
|
7
7
|
O pacote público requer React 19, React DOM 19 e Tailwind CSS 4. Escolha a versão em cada frontend:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
pnpm add --save-exact @raulaguila/maat-ui@0.
|
|
10
|
+
pnpm add --save-exact @raulaguila/maat-ui@0.4.0
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Inclua o `package.json` e o `pnpm-lock.yaml` no mesmo commit.
|
|
@@ -44,6 +44,8 @@ O Seshat é a referência de apresentação. Quando o Thoth precisa de um contro
|
|
|
44
44
|
|
|
45
45
|
Os módulos opcionais `@raulaguila/maat-ui/chart` (Recharts) e `@raulaguila/maat-ui/sonner` (Sonner e next-themes) têm entradas próprias. Instale os respectivos peers no produto que os utiliza.
|
|
46
46
|
|
|
47
|
+
`ApplicationShell`, disponível em `@raulaguila/maat-ui/layout`, organiza a navegação lateral, o cabeçalho e a região principal rolável. Passe `sidebar` (incluindo o drawer), `header`, `skipLabel` traduzido e o conteúdo como filho. A biblioteca define margens, alturas e link de salto para o conteúdo nas três plataformas. O produto continua responsável por rotas, permissões e estado da navegação.
|
|
48
|
+
|
|
47
49
|
Botões, campos, seleção, checkbox, switch, badges, avatares, abas, cartões, tabelas, paginação, menus, diálogos, painéis, tooltips e skeletons compartilham tamanhos e estados. `Sidebar`, `SidebarBody` e `SidebarFooter` mantêm um centro rolável e o rodapé na base. A aplicação fornece a marca e os itens do menu. `ManagementGroup` e `ManagementRow` agrupam itens com um título acessível. Use o contêiner `family-management` e as áreas `family-open`, `family-roles`, `family-stats` e `family-actions` para reorganizar as linhas pela largura disponível.
|
|
48
50
|
|
|
49
51
|
## Desenvolver e distribuir
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
/** The product supplies its navigation and actions; Maat owns viewport geometry and landmarks. */
|
|
3
|
+
export declare function ApplicationShell({ sidebar, header, children, skipLabel, mainId }: {
|
|
4
|
+
sidebar: ReactNode;
|
|
5
|
+
header: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
skipLabel: string;
|
|
8
|
+
mainId?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
2
10
|
export declare function PageHeader({ title, description, action, badge, }: {
|
|
3
11
|
title: string;
|
|
4
12
|
description?: React.ReactNode;
|
package/dist/layout.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
3
|
import { cn } from "./cn.js";
|
|
4
|
+
/** The product supplies its navigation and actions; Maat owns viewport geometry and landmarks. */
|
|
5
|
+
export function ApplicationShell({ sidebar, header, children, skipLabel, mainId = "main-content" }) {
|
|
6
|
+
return (_jsxs("div", { "data-ui-app-shell": "", children: [_jsx("a", { href: `#${mainId}`, className: "sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[100] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-foreground focus:shadow-lg focus:outline-none focus:ring-2 focus:ring-ring", children: skipLabel }), sidebar, _jsxs("div", { "data-ui-app-column": "", children: [_jsx("header", { "data-ui-app-header": "", children: header }), _jsx("main", { "data-ui-app-content": "", id: mainId, tabIndex: -1, children: children })] })] }));
|
|
7
|
+
}
|
|
4
8
|
export function PageHeader({ title, description, action, badge, }) {
|
|
5
9
|
return (_jsx("div", { "data-ui-page-header": true, className: "px-[var(--space-page)] py-3 md:pb-5", children: _jsxs("div", { className: "flex w-full flex-col gap-[var(--space-row)] sm:flex-row sm:flex-wrap sm:items-start sm:justify-between", children: [_jsxs("div", { className: "min-w-0 max-w-full flex-1 wrap-anywhere sm:basis-64", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("h1", { className: "font-heading text-xl font-semibold tracking-tight md:text-2xl", children: title }), badge] }), description && _jsx("p", { className: "mt-1 max-w-[75ch] text-sm text-muted-foreground", children: description })] }), action && _jsx("div", { className: "flex max-w-full flex-wrap items-center gap-2 [&>*]:max-w-full [&>*]:flex-wrap", children: action })] }) }));
|
|
6
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raulaguila/maat-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"publishConfig": { "registry": "https://registry.npmjs.org", "access": "public" },
|
|
5
5
|
"repository": { "type": "git", "url": "git+https://github.com/raulaguila/maat-ui.git" },
|
|
6
6
|
"description": "Maat UI — componentes React e estilos de Seshat, Thoth e Khnum",
|
package/styles.css
CHANGED
|
@@ -384,3 +384,49 @@ html[data-density="compact"] {
|
|
|
384
384
|
@media (max-width: 767px), (pointer: coarse) {
|
|
385
385
|
.profile-content [role="tablist"] [role="tab"][aria-selected] { min-height: 44px; }
|
|
386
386
|
}
|
|
387
|
+
|
|
388
|
+
/* Application viewport shared by all three products. The main landmark owns scrolling. */
|
|
389
|
+
[data-ui-app-shell] {
|
|
390
|
+
display: flex;
|
|
391
|
+
width: 100%;
|
|
392
|
+
height: 100dvh;
|
|
393
|
+
min-width: 0;
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
padding: 16px;
|
|
396
|
+
gap: 20px;
|
|
397
|
+
background: var(--background);
|
|
398
|
+
}
|
|
399
|
+
[data-ui-app-column] {
|
|
400
|
+
display: flex;
|
|
401
|
+
flex: 1;
|
|
402
|
+
flex-direction: column;
|
|
403
|
+
min-width: 0;
|
|
404
|
+
}
|
|
405
|
+
[data-ui-app-header] {
|
|
406
|
+
position: sticky;
|
|
407
|
+
top: 0;
|
|
408
|
+
z-index: 20;
|
|
409
|
+
display: flex;
|
|
410
|
+
align-items: center;
|
|
411
|
+
justify-content: space-between;
|
|
412
|
+
flex-shrink: 0;
|
|
413
|
+
height: 48px;
|
|
414
|
+
min-width: 0;
|
|
415
|
+
gap: 8px;
|
|
416
|
+
padding-inline: 4px;
|
|
417
|
+
margin-bottom: 12px;
|
|
418
|
+
background: var(--background);
|
|
419
|
+
}
|
|
420
|
+
[data-ui-app-content] {
|
|
421
|
+
position: relative;
|
|
422
|
+
flex: 1;
|
|
423
|
+
min-height: 0;
|
|
424
|
+
overflow: auto;
|
|
425
|
+
outline: none;
|
|
426
|
+
scrollbar-gutter: stable;
|
|
427
|
+
background: var(--content);
|
|
428
|
+
}
|
|
429
|
+
@media (max-width: 767px) {
|
|
430
|
+
[data-ui-app-shell] { gap: 0; }
|
|
431
|
+
[data-ui-app-header] { height: 56px; padding-inline: 0; margin-bottom: 8px; }
|
|
432
|
+
}
|