@vowt-tech/ui 0.177.0 → 0.177.3
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/LICENSE +9 -0
- package/guia/LEIA-PRIMEIRO.md +1 -1
- package/guia/VERSAO +1 -1
- package/guia/componentes.md +1 -1
- package/package.json +1 -1
- package/src/components/date-picker.tsx +11 -7
- package/src/components/heatmap.tsx +2 -0
- package/src/components/slider.tsx +9 -0
- package/src/components/table.tsx +17 -1
- package/src/styles/theme.css +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Copyright (c) 2026 VOWT. Todos os direitos reservados à VOWT.
|
|
2
|
+
|
|
3
|
+
Este repositório e o pacote @vowt-tech/ui, com o código, o tema, as logos, as imagens e a
|
|
4
|
+
documentação, são propriedade da VOWT. O código fica visível no GitHub e no npm, mas nenhum
|
|
5
|
+
direito de uso, cópia, modificação ou distribuição é concedido a quem não tiver autorização
|
|
6
|
+
por escrito da VOWT.
|
|
7
|
+
|
|
8
|
+
All rights reserved. No license is granted to use, copy, modify or distribute this software
|
|
9
|
+
or its assets without written permission from VOWT.
|
package/guia/LEIA-PRIMEIRO.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Design system VOWT, guia para este app
|
|
2
2
|
|
|
3
|
-
> Pasta gerada pelo pacote @vowt-tech/ui 0.177.
|
|
3
|
+
> Pasta gerada pelo pacote @vowt-tech/ui 0.177.3. Não edite: ela é refeita a cada atualização
|
|
4
4
|
> do pacote pelo comando `vowt-ux-ui-design sync`. Regra própria deste app fica fora daqui.
|
|
5
5
|
|
|
6
6
|
Este app usa o design system da VOWT. Do pacote @vowt-tech/ui, o app importa os fundamentos,
|
package/guia/VERSAO
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.177.
|
|
1
|
+
0.177.3
|
package/guia/componentes.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Componentes
|
|
2
2
|
|
|
3
|
-
> Gerado do pacote @vowt-tech/ui 0.177.
|
|
3
|
+
> Gerado do pacote @vowt-tech/ui 0.177.3. Cada linha traz o nome da peça, o import do pacote e
|
|
4
4
|
> a página com o exemplo.
|
|
5
5
|
|
|
6
6
|
Antes de montar uma tela, procure aqui. Cada peça é importada do pacote, como
|
package/package.json
CHANGED
|
@@ -404,16 +404,20 @@ export function DateRangePicker({
|
|
|
404
404
|
<DropdownMenu>
|
|
405
405
|
<DropdownMenuTrigger
|
|
406
406
|
render={
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
size={size}
|
|
411
|
-
aria-label="Período de comparação"
|
|
412
|
-
/>
|
|
407
|
+
// O nome do botão é o texto visível, "Comparado a" e as datas, para quem vê e para o
|
|
408
|
+
// leitor de tela, sem um nome escondido diferente do que aparece.
|
|
409
|
+
<Button variant="outline" disabled={disabled} size={size} />
|
|
413
410
|
}
|
|
414
411
|
>
|
|
415
412
|
<CalendarIcon data-icon="inline-start" className="text-muted-foreground" />
|
|
416
|
-
{versus ?
|
|
413
|
+
{versus ? (
|
|
414
|
+
<>
|
|
415
|
+
{/* O espaço separa as palavras no nome lido pelo leitor de tela. */}
|
|
416
|
+
<span className="text-muted-foreground">Comparado a</span> {rangeText(versus)}
|
|
417
|
+
</>
|
|
418
|
+
) : (
|
|
419
|
+
'Sem comparação'
|
|
420
|
+
)}
|
|
417
421
|
<ChevronDownIcon data-icon="inline-end" className="text-muted-foreground" />
|
|
418
422
|
</DropdownMenuTrigger>
|
|
419
423
|
<DropdownMenuContent align="start" className="min-w-52">
|
|
@@ -52,6 +52,8 @@ function Heatmap({
|
|
|
52
52
|
<TooltipTrigger
|
|
53
53
|
render={
|
|
54
54
|
<span
|
|
55
|
+
// D-860: com o papel de imagem, o nome da célula vale para o leitor de tela.
|
|
56
|
+
role="img"
|
|
55
57
|
aria-label={`${r}, ${c}: ${format(v)}`}
|
|
56
58
|
// Sem altura mínima: no celular, ela passava da coluna e colava nas vizinhas.
|
|
57
59
|
className={cn(
|
|
@@ -5,6 +5,8 @@ import { cn } from '../lib/utils';
|
|
|
5
5
|
|
|
6
6
|
// Escolha de um valor ou de uma faixa arrastando, como a faixa de preço de um filtro ou o desconto
|
|
7
7
|
// de um cupom. Com dois valores, vira faixa. O valor aparece ao lado, escrito pelo app (D-309).
|
|
8
|
+
// D-860: o aria-label vai para o controle que a pessoa arrasta, onde o leitor de tela lê; na faixa,
|
|
9
|
+
// cada ponta ganha o nome com "mínimo" e "máximo".
|
|
8
10
|
|
|
9
11
|
function Slider({
|
|
10
12
|
className,
|
|
@@ -12,6 +14,7 @@ function Slider({
|
|
|
12
14
|
value,
|
|
13
15
|
min = 0,
|
|
14
16
|
max = 100,
|
|
17
|
+
'aria-label': ariaLabel,
|
|
15
18
|
...props
|
|
16
19
|
}: SliderPrimitive.Root.Props) {
|
|
17
20
|
const values = Array.isArray(value)
|
|
@@ -36,6 +39,12 @@ function Slider({
|
|
|
36
39
|
{values.map((_, i) => (
|
|
37
40
|
<SliderPrimitive.Thumb
|
|
38
41
|
key={i}
|
|
42
|
+
index={i}
|
|
43
|
+
aria-label={
|
|
44
|
+
ariaLabel && values.length > 1
|
|
45
|
+
? `${ariaLabel}, ${i === 0 ? 'mínimo' : 'máximo'}`
|
|
46
|
+
: ariaLabel
|
|
47
|
+
}
|
|
39
48
|
className="block size-4 rounded-full border-2 border-selected-strong bg-card shadow-raised transition-[box-shadow] outline-none hover:ring-4 hover:ring-ring/30 focus-visible:focus-ring data-dragging:ring-4 data-dragging:ring-ring/50"
|
|
40
49
|
/>
|
|
41
50
|
))}
|
package/src/components/table.tsx
CHANGED
|
@@ -22,10 +22,26 @@ function Table({
|
|
|
22
22
|
borderless?: boolean;
|
|
23
23
|
compact?: boolean;
|
|
24
24
|
}) {
|
|
25
|
+
// D-860: quando a tabela é mais larga que o espaço e rola de lado, o contêiner entra na ordem
|
|
26
|
+
// do Tab, para quem usa só o teclado rolar com as setas. Sem rolagem, fica fora do Tab.
|
|
27
|
+
const ref = React.useRef<HTMLDivElement>(null);
|
|
28
|
+
const [scrolls, setScrolls] = React.useState(false);
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
const el = ref.current;
|
|
31
|
+
if (!el || typeof ResizeObserver === 'undefined') return;
|
|
32
|
+
const check = () => setScrolls(el.scrollWidth > el.clientWidth + 1);
|
|
33
|
+
check();
|
|
34
|
+
const observer = new ResizeObserver(check);
|
|
35
|
+
observer.observe(el);
|
|
36
|
+
if (el.firstElementChild) observer.observe(el.firstElementChild);
|
|
37
|
+
return () => observer.disconnect();
|
|
38
|
+
}, []);
|
|
25
39
|
return (
|
|
26
40
|
<div
|
|
41
|
+
ref={ref}
|
|
27
42
|
data-slot="table-container"
|
|
28
|
-
|
|
43
|
+
tabIndex={scrolls ? 0 : undefined}
|
|
44
|
+
className="relative w-full overflow-x-auto outline-none focus-visible:focus-ring scroll-fade-x [--scroll-fade-size:--spacing(6)] not-supports-[animation-timeline:scroll()]:[--scroll-fade-size:0px]"
|
|
29
45
|
>
|
|
30
46
|
<table
|
|
31
47
|
data-slot="table"
|
package/src/styles/theme.css
CHANGED
|
@@ -972,7 +972,7 @@
|
|
|
972
972
|
--doc-blue-1: oklch(0.95 0.035 255);
|
|
973
973
|
--doc-blue-2: oklch(0.86 0.08 255);
|
|
974
974
|
--doc-blue-3: oklch(0.73 0.13 255);
|
|
975
|
-
--doc-blue-4: oklch(0.
|
|
975
|
+
--doc-blue-4: oklch(0.54 0.15 255);
|
|
976
976
|
--doc-blue-5: oklch(0.4 0.11 255);
|
|
977
977
|
--doc-purple-1: oklch(0.95 0.035 300);
|
|
978
978
|
--doc-purple-2: oklch(0.86 0.08 300);
|