@wellingtonhlc/shared-ui 0.24.19 → 0.24.21
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 +4 -104
- package/dist/components/Page.d.ts.map +1 -1
- package/dist/components/Page.js +12 -4
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,19 +43,6 @@ Este pacote foi desenhado para oferecer infraestrutura visual generica:
|
|
|
43
43
|
- helpers sem dependencia de dominio;
|
|
44
44
|
- composicao por slots quando o componente possui partes internas.
|
|
45
45
|
|
|
46
|
-
## Scripts
|
|
47
|
-
|
|
48
|
-
| Comando | Uso |
|
|
49
|
-
|---------|-----|
|
|
50
|
-
| `npm run typecheck` | Valida tipos sem emitir arquivos. |
|
|
51
|
-
| `npm run test` | Executa testes de contrato e acessibilidade com Vitest, Testing Library e axe. |
|
|
52
|
-
| `npm run check:storybook-static` | Confere se o Storybook estatico gerado possui artefatos e stories publicas. |
|
|
53
|
-
| `npm run check` | Gate local completo: typecheck, testes, build, Storybook, smoke do Storybook estatico e `npm pack --dry-run`. |
|
|
54
|
-
| `npm run build` | Compila TypeScript e copia assets para `dist`. |
|
|
55
|
-
| `npm run prepack` | Executado automaticamente antes de empacotar/publicar. |
|
|
56
|
-
| `npm run storybook` | Sobe o Storybook local. |
|
|
57
|
-
| `npm run build-storybook` | Gera build estatico do Storybook. |
|
|
58
|
-
|
|
59
46
|
## Validacao de Page Actions
|
|
60
47
|
|
|
61
48
|
O pacote publica o CLI `shared-ui-check-page-actions` para validar o contrato de actions em uma aplicacao.
|
|
@@ -157,22 +144,10 @@ Telas podem limitar o contrato localmente:
|
|
|
157
144
|
</Page.Actions>
|
|
158
145
|
```
|
|
159
146
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
Use o Storybook para validar estados visuais antes de publicar mudancas no pacote:
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
npm run storybook
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Antes de publicar ou consumir localmente uma alteracao visual, gere tambem a build estatica:
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
npm run build-storybook
|
|
174
|
-
npm run check:storybook-static
|
|
175
|
-
```
|
|
147
|
+
Acoes auxiliares podem ser passadas por `helpContent`, `metaActions` ou por componentes
|
|
148
|
+
marcados como meta. Em barras verticais, o grupo meta e renderizado em modo compacto
|
|
149
|
+
e alinhado na borda externa da barra para preservar leitura visual; as labels continuam
|
|
150
|
+
obrigatorias no contrato e sao usadas para acessibilidade e tooltip.
|
|
176
151
|
|
|
177
152
|
## Exportacoes
|
|
178
153
|
|
|
@@ -308,78 +283,3 @@ Exports removidos:
|
|
|
308
283
|
- `SearchFilter`: use `Filter`.
|
|
309
284
|
- `SearchWorkspace`: componha layout no consumidor ou com componentes genéricos.
|
|
310
285
|
- `TabsUnderline` e `UnderlinedTabs`: use `TabsUnderlined`.
|
|
311
|
-
|
|
312
|
-
## Versionamento
|
|
313
|
-
|
|
314
|
-
Este pacote segue SemVer, mesmo antes da v1:
|
|
315
|
-
|
|
316
|
-
- `patch`: correcoes internas sem alteracao de contrato.
|
|
317
|
-
- `minor`: novos componentes, novas props opcionais ou novas variantes compativeis.
|
|
318
|
-
- `major` ou `minor` com destaque pre-v1: remocao/renomeacao de API publica ou mudanca que exige migracao nos consumidores.
|
|
319
|
-
|
|
320
|
-
Tabela de historico:
|
|
321
|
-
|
|
322
|
-
| Versao | Data | Tipo | Resumo | Validacao |
|
|
323
|
-
|--------|------|------|--------|-----------|
|
|
324
|
-
| `0.24.11` | 2026-06-20 | Patch | Mantem o botao de ajuda antes das acoes da pagina para evitar que fique oculto em barras horizontais com overflow. | `npm run check`. |
|
|
325
|
-
| `0.24.10` | 2026-06-20 | Patch | Documenta o uso de `Page.ActionsProvider`, preferencias de posicao, slots e consumo pos-publicacao com `@latest`. | `npm run check`. |
|
|
326
|
-
| `0.24.9` | 2026-06-20 | Patch | Estabiliza o pacote publicado de `Page.Actions` movel para consumo em aplicacoes React. | `npm run typecheck`; `npm run build`; builds de consumidores. |
|
|
327
|
-
| `0.24.8` | 2026-06-20 | Patch | Corrige a renderizacao de `Page.Actions` em slots clonando o componente com marcador interno de slot. | `npm run typecheck`; `npm run test`; `npm run build`. |
|
|
328
|
-
| `0.24.7` | 2026-06-20 | Minor pre-v1 | Adiciona `Page.ActionsProvider`, `Page.ActionsSlot`, posicoes `left/top/right/bottom`, ajuda contextual e movimentacao de acoes por preferencia do consumidor. | `npm run check`. |
|
|
329
|
-
| `0.24.3` | 2026-06-18 | Patch | Amplia testes de contrato para exports publicos, adiciona gate axe e smoke do Storybook estatico ao `check`. | `npm run test`; `npm run check`. |
|
|
330
|
-
| `0.24.2` | 2026-06-18 | Patch | Alinha metadados e documentacao do pacote npm publico, mantendo o contrato generico e sem regra de negocio. | `npm run build`; `npm run build-storybook`; `npm pack --dry-run`. |
|
|
331
|
-
| `0.24.0` | 2026-06-17 | Minor pre-v1 | Adiciona `Workspace` e corrige a composicao de `Filter` para consultas com painel de filtros e area de resultados. | `npm run build`; build de consumidor. |
|
|
332
|
-
| `0.21.0` | 2026-06-17 | Minor pre-v1 | Adiciona stories para `Modal`, `Card`, `PageMessage`, `EmptyState`, `StatCard`, `SelectField`, `TextareaField`, `DateField`, `DecimalField`, `RadioGroup`, `MultiSelectField`, `TabsUnderlined`, `Tooltip`, `CopyableField`, `FieldGroup`, `FieldSkeleton`, `FieldValidationError`, `NavCard`, `Sidebar` e `AppShell`. | `npm run build`; `npm run build-storybook`. |
|
|
333
|
-
| `0.1.17` | 2026-06-16 | Minor pre-v1 | Remove a variante ambigua `default` de `Button`; adiciona variants semanticas `information` e `warning`; `ConfirmationDialog` usa `information`, `question`, `warning` e `destructive` com botao principal na cor da variant; Storybook passou a gerar tokens semanticos de tema. | `npm run build`; `npm run build-storybook`; builds de consumidores. |
|
|
334
|
-
| `0.1.16` | 2026-06-16 | Patch | Consolida ajustes visuais recentes do pacote para consumo em aplicacoes React. | `npm run build`; `npm run build-storybook`; validacao em consumidor. |
|
|
335
|
-
| `0.1.15` | 2026-06-16 | Patch | Corrige a hierarquia de z-index de `Modal` e `ConfirmationDialog` para o overlay cobrir sidebar e flyouts. | `npm run build`; `npm run build-storybook`. |
|
|
336
|
-
| `0.1.14` | 2026-06-16 | Minor pre-v1 | Adiciona `icon` e `iconPosition` ao `TextField` e ajusta o offset lateral dos icones internos. | `npm run build`; `npm run build-storybook`. |
|
|
337
|
-
| `0.1.13` | 2026-06-16 | Minor pre-v1 | Refina o visual do `Pagination`, remove botoes circulares e adiciona `size="sm" | "md" | "lg"`. | `npm run build`; `npm run build-storybook`. |
|
|
338
|
-
| `0.1.12` | 2026-06-16 | Minor pre-v1 | Adiciona variantes explicitas ao `TextField` e corrige alinhamento de icones internos com `startAdornment` e `endAdornment`. | `npm run build`; `npm run build-storybook`. |
|
|
339
|
-
| `0.1.11` | 2026-06-16 | Patch | Reequilibra variantes de `Button`, separando `default` de `primary` e usando cores explicitas para estados de marca e semanticos. | `npm run build`; `npm run build-storybook`. |
|
|
340
|
-
| `0.1.10` | 2026-06-16 | Patch | Reequilibra `Badge` `default`, `primary` e `muted` com estilos distintos e cor de texto explicita para `primary`. | `npm run build`; `npm run build-storybook`. |
|
|
341
|
-
| `0.1.9` | 2026-06-16 | Patch | Garante estilos distintos para `Badge` `default`, `primary` e `muted`, e normaliza alias legado `active` para `success`. | `npm run build`; `npm run build-storybook`. |
|
|
342
|
-
| `0.1.8` | 2026-06-16 | Minor pre-v1 | Adiciona `Switch display="inline"` para linhas compactas com label integrado e alinhamento previsivel. | `npm run build`; `npm run build-storybook`; build de consumidor. |
|
|
343
|
-
| `0.1.7` | 2026-06-16 | Minor pre-v1 | Adiciona props de customizacao dos botoes de aparencia em `ThemePreferencesSelector`. | `npm run build`; build de consumidor. |
|
|
344
|
-
| `0.1.6` | 2026-06-16 | Patch | Forca o destaque da aparencia selecionada por CSS explicito em `[aria-pressed='true']`. | `npm run build`; `npm run build-storybook`; build de consumidor. |
|
|
345
|
-
| `0.1.5` | 2026-06-16 | Patch | Aplica o destaque da aparencia selecionada por estilo inline para evitar perda por ordem/geracao de CSS nos consumidores. | `npm run build`; `npm run build-storybook`; build de consumidor. |
|
|
346
|
-
| `0.1.4` | 2026-06-16 | Patch | Usa estado `data-selected` no `ThemePreferencesSelector` para manter o destaque da aparencia selecionada nos consumidores. | `npm run build`; `npm run build-storybook`. |
|
|
347
|
-
| `0.1.3` | 2026-06-16 | Patch | Atualiza Storybook para `10.4.6`, documenta `ThemePreferencesSelector` e reforca o destaque visual da aparencia selecionada. | `npm run build`; `npm run build-storybook`. |
|
|
348
|
-
| `0.1.0` | 2026-06-15 | Breaking pre-v1 | Define `Filter.Root`/`Filter.Footer` como contrato final de filtros e remove aliases públicos provisórios. | `npm run build`; builds de consumidores. |
|
|
349
|
-
| `0.0.7` | 2026-06-14 | Breaking pre-v1 | Publica API composicional `SearchWorkspace.Root` e `SearchFilter.Root`/`SearchFilter.Footer` para consultas com filtros compactos. | Pendente antes da publicacao. |
|
|
350
|
-
| `0.0.5` | 2026-06-14 | Minor pre-v1 | Adiciona `Table.Root isFramed`, `fill`, `viewportClassName` e `wrapperProps` para controlar frame e ocupacao de espaco sem classes ad-hoc. | `npm run build`. |
|
|
351
|
-
| `0.0.4` | 2026-06-14 | Minor pre-v1 | Adiciona `Table.Row isInteractive` para controlar cursor de linhas interativas, com padrao `true`. | `npm run build`. |
|
|
352
|
-
| `0.0.3` | 2026-06-14 | Breaking pre-v1 | Define API final de `Card` por slots explicitos; remove `<Card>` chamavel, `Card.Content` e `CardContentProps`. | `npm run build`; builds de consumidores. |
|
|
353
|
-
| `0.0.2` | 2026-06-14 | Minor pre-v1 | Publica pacote no npm publico com novos slots de `Card` ainda retrocompativeis. | `npm run build`. |
|
|
354
|
-
| `0.0.0` | 2026-06-14 | Inicial | Publicacao inicial do pacote `@wellingtonhlc/shared-ui`. | Build do pacote. |
|
|
355
|
-
|
|
356
|
-
## Publicacao
|
|
357
|
-
|
|
358
|
-
Validacao e publicacao npm:
|
|
359
|
-
|
|
360
|
-
```bash
|
|
361
|
-
npm run build
|
|
362
|
-
npm run check
|
|
363
|
-
npm pack --dry-run
|
|
364
|
-
npm publish --access public --registry=https://registry.npmjs.org/
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
Quando o npm exigir OTP:
|
|
368
|
-
|
|
369
|
-
```bash
|
|
370
|
-
npm publish --access public --registry=https://registry.npmjs.org/ --otp CODIGO_OTP
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
Depois de publicar, atualize a aplicacao consumidora:
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
npm install @wellingtonhlc/shared-ui@latest
|
|
377
|
-
npm run build
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
Se o consumidor estiver com dev server Vite em execucao, reinicie com cache limpo:
|
|
381
|
-
|
|
382
|
-
```powershell
|
|
383
|
-
Remove-Item -Recurse -Force node_modules\.vite -ErrorAction SilentlyContinue
|
|
384
|
-
npm run dev -- --force
|
|
385
|
-
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../src/components/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAIL,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,6BAA6B,EACnC,MAAM,oBAAoB,CAAC;AAI5B,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAChD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAA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ED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAExE,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAM/D;AAED,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAM3E;AAED,iBAAS,MAAM,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,eAAe,+BAexE;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;CAWhB,CAAC"}
|
package/dist/components/Page.js
CHANGED
|
@@ -73,6 +73,12 @@ function resolvePageActionsShowLabels(props, preferences) {
|
|
|
73
73
|
function resolvePageActionsShowLabelsChange(props, preferences) {
|
|
74
74
|
return props.onShowLabelsChange ?? preferences?.onShowLabelsChange;
|
|
75
75
|
}
|
|
76
|
+
function getVerticalMetaAlignment(position) {
|
|
77
|
+
return position === 'left' ? 'items-start' : 'items-end';
|
|
78
|
+
}
|
|
79
|
+
function getVerticalMetaJustification(position) {
|
|
80
|
+
return position === 'left' ? 'justify-start' : 'justify-end';
|
|
81
|
+
}
|
|
76
82
|
function useIsMobile() {
|
|
77
83
|
const [isMobile, setIsMobile] = useState(false);
|
|
78
84
|
useEffect(() => {
|
|
@@ -247,14 +253,16 @@ function Actions({ align = 'start', __fromSlot = false, children, className, def
|
|
|
247
253
|
function handleToggleLabels() {
|
|
248
254
|
effectiveOnShowLabelsChange?.(!effectiveShowLabels);
|
|
249
255
|
}
|
|
250
|
-
const
|
|
256
|
+
const verticalMetaAlignment = getVerticalMetaAlignment(effectivePosition);
|
|
257
|
+
const verticalMetaJustification = getVerticalMetaJustification(effectivePosition);
|
|
258
|
+
const helpButton = helpVisible ? (_jsx("div", { className: cn('flex shrink-0', isVertical && 'w-full', isVertical && verticalMetaJustification), children: _jsx(Tooltip, { className: cn('max-w-[22rem] px-3 py-2', helpClassName), content: helpContent, delayDuration: 120, openOnClick: true, side: getHelpSide(effectivePosition), children: _jsx(ActionButtonPrimitive, { "aria-label": helpLabel, icon: _jsx(CircleHelpIcon, { "aria-hidden": "true" }), tooltip: helpLabel }) }) })) : null;
|
|
251
259
|
const labelToggleButton = canToggleLabels ? (_jsx(ActionButtonPrimitive, { "aria-pressed": effectiveShowLabels, "aria-label": effectiveShowLabels ? 'Ocultar labels das acoes' : 'Mostrar labels das acoes', icon: effectiveShowLabels ? _jsx(CaptionsOffIcon, { "aria-hidden": "true" }) : _jsx(CaptionsIcon, { "aria-hidden": "true" }), tooltip: effectiveShowLabels ? 'Ocultar labels das acoes' : 'Mostrar labels das acoes', onClick: handleToggleLabels })) : null;
|
|
252
|
-
const moveButton = canMove ? (_jsxs("div", { className: cn('relative flex shrink-0', isVertical && 'w-full
|
|
253
|
-
const actions = (
|
|
260
|
+
const moveButton = canMove ? (_jsxs("div", { className: cn('relative flex shrink-0', isVertical && 'w-full', isVertical && verticalMetaJustification), children: [_jsx(ActionButtonPrimitive, { "aria-haspopup": "menu", "aria-label": "Mover barra de acoes", "aria-expanded": isMenuOpen, className: cn('touch-none [&]:cursor-grab [&_*]:cursor-grab active:[&]:cursor-grabbing active:[&_*]:cursor-grabbing', isDragging && '[&]:cursor-grabbing [&_*]:cursor-grabbing'), icon: _jsx(GripVerticalIcon, { "aria-hidden": "true" }), tooltip: "Mover barra de acoes", onClick: handleMoveMenuToggle, onKeyDown: handleMoveKeyDown, onPointerCancel: handleMovePointerCancel, onPointerDown: handleMovePointerDown, onPointerMove: handleMovePointerMove, onPointerUp: handleMovePointerUp }), isMenuOpen ? (_jsx("div", { role: "menu", className: cn('border-app-border bg-surface text-foreground absolute z-40 min-w-36 rounded-md border p-1 text-xs shadow-lg', isVertical && effectivePosition === 'left' && 'left-full top-0 ml-2', isVertical && effectivePosition === 'right' && 'right-full top-0 mr-2', !isVertical && 'right-0 top-full mt-2'), children: effectiveAllowedPositions.map((nextPosition) => (_jsx(PageActionsMoveOption, { active: nextPosition === effectivePosition, label: positionLabels[nextPosition], onSelect: handleSelectPosition, position: nextPosition }, nextPosition))) })) : null] })) : null;
|
|
261
|
+
const actions = (_jsxs("div", { className: cn('flex min-h-0 min-w-0 gap-2', isVertical ? 'h-full w-full flex-col' : 'w-full items-center'), children: [_jsx(PageActionsRenderContext.Provider, { value: { showLabels: effectiveShowLabels }, children: _jsx(ActionGroupPrimitive, { align: align, size: size, className: cn('min-w-0 flex-1', isVertical
|
|
254
262
|
? cn('min-h-0 flex-col content-start [&>[data-action-separator=true]]:h-px [&>[data-action-separator=true]]:min-h-0 [&>[data-action-separator=true]]:w-full [&>[data-action-separator=true]]:self-auto', effectiveShowLabels
|
|
255
263
|
? 'w-full items-stretch [&>button]:w-full [&>button]:justify-start [&>div]:w-full [&>div>button]:w-full [&>div>button]:justify-start'
|
|
256
264
|
: 'w-auto items-center')
|
|
257
|
-
: 'overflow-x-auto overflow-y-hidden', alignClasses[align]), children: mainChildren }), _jsxs("div", { className: cn('flex shrink-0 gap-2', isVertical ? 'w-full flex-col
|
|
265
|
+
: 'overflow-x-auto overflow-y-hidden', alignClasses[align]), children: mainChildren }) }), _jsx(PageActionsRenderContext.Provider, { value: { showLabels: !isVertical && effectiveShowLabels }, children: _jsxs("div", { className: cn('flex shrink-0 gap-2', isVertical ? cn('w-full flex-col', verticalMetaAlignment) : 'ml-auto items-center'), children: [helpButton, metaActions, metaChildren, labelToggleButton, moveButton] }) })] }));
|
|
258
266
|
return (_jsxs("div", { className: cn('flex min-w-0', positionClasses[effectivePosition], isVertical ? 'flex-col' : 'items-center', className), children: [actions, isDragging ? _jsx(PageActionsDropZones, { activePosition: dragTarget ?? effectivePosition, allowedPositions: effectiveAllowedPositions }) : null] }));
|
|
259
267
|
}
|
|
260
268
|
function PageActionsDropZones({ activePosition, allowedPositions }) {
|
package/dist/styles.css
CHANGED