@juninmd/sonido 0.0.0-stage → 1.0.1
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 +21 -0
- package/README.md +164 -2
- package/dist/components/Accordion/Accordion.d.ts +16 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/AgendaRail/AgendaRail.d.ts +38 -0
- package/dist/components/AgendaRail/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +12 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/AlertCard/AlertCard.d.ts +126 -0
- package/dist/components/AlertCard/index.d.ts +1 -0
- package/dist/components/AlertCard/scenes.d.ts +33 -0
- package/dist/components/AmbientBackdrop/AmbientBackdrop.d.ts +12 -0
- package/dist/components/AmbientBackdrop/index.d.ts +1 -0
- package/dist/components/Artwork/Artwork.d.ts +13 -0
- package/dist/components/Artwork/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +23 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/BarChart/BarChart.d.ts +17 -0
- package/dist/components/BarChart/index.d.ts +1 -0
- package/dist/components/BatteryMeter/BatteryMeter.d.ts +13 -0
- package/dist/components/BatteryMeter/index.d.ts +1 -0
- package/dist/components/Bento/Bento.d.ts +11 -0
- package/dist/components/Bento/index.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +17 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +17 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Carousel/Carousel.d.ts +14 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +23 -0
- package/dist/components/CommandPalette/index.d.ts +1 -0
- package/dist/components/ConfirmButton/ConfirmButton.d.ts +15 -0
- package/dist/components/ConfirmButton/index.d.ts +1 -0
- package/dist/components/CountUp/CountUp.d.ts +11 -0
- package/dist/components/CountUp/index.d.ts +1 -0
- package/dist/components/DataTable/DataTable.d.ts +21 -0
- package/dist/components/DataTable/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +16 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dock/Dock.d.ts +23 -0
- package/dist/components/Dock/index.d.ts +1 -0
- package/dist/components/Duel/Duel.d.ts +19 -0
- package/dist/components/Duel/index.d.ts +1 -0
- package/dist/components/EmojiBurst/EmojiBurst.d.ts +11 -0
- package/dist/components/EmojiBurst/index.d.ts +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +12 -0
- package/dist/components/EmptyState/index.d.ts +1 -0
- package/dist/components/FilterChips/FilterChips.d.ts +20 -0
- package/dist/components/FilterChips/index.d.ts +1 -0
- package/dist/components/Heatmap/Heatmap.d.ts +16 -0
- package/dist/components/Heatmap/index.d.ts +1 -0
- package/dist/components/Hero/Hero.d.ts +18 -0
- package/dist/components/Hero/index.d.ts +1 -0
- package/dist/components/HourlyForecast/HourlyForecast.d.ts +19 -0
- package/dist/components/HourlyForecast/index.d.ts +1 -0
- package/dist/components/Island/Island.d.ts +52 -0
- package/dist/components/Island/IslandWidgets.d.ts +110 -0
- package/dist/components/Island/icons.d.ts +18 -0
- package/dist/components/Island/index.d.ts +3 -0
- package/dist/components/Kbd/Kbd.d.ts +4 -0
- package/dist/components/Kbd/index.d.ts +1 -0
- package/dist/components/LiveBadge/LiveBadge.d.ts +20 -0
- package/dist/components/LiveBadge/index.d.ts +1 -0
- package/dist/components/Menu/Menu.d.ts +24 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/MeterCard/MeterCard.d.ts +32 -0
- package/dist/components/MeterCard/index.d.ts +1 -0
- package/dist/components/Motion/Motion.d.ts +13 -0
- package/dist/components/Motion/index.d.ts +1 -0
- package/dist/components/NavRail/NavRail.d.ts +25 -0
- package/dist/components/NavRail/index.d.ts +1 -0
- package/dist/components/Odometer/Odometer.d.ts +9 -0
- package/dist/components/Odometer/index.d.ts +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +22 -0
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +14 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/PresenceOrb/PresenceOrb.d.ts +18 -0
- package/dist/components/PresenceOrb/index.d.ts +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +13 -0
- package/dist/components/ProgressBar/index.d.ts +1 -0
- package/dist/components/ProgressRing/ProgressRing.d.ts +14 -0
- package/dist/components/ProgressRing/index.d.ts +1 -0
- package/dist/components/RadialClock/RadialClock.d.ts +12 -0
- package/dist/components/RadialClock/index.d.ts +1 -0
- package/dist/components/RadialMenu/RadialMenu.d.ts +25 -0
- package/dist/components/RadialMenu/index.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +19 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/Rating/Rating.d.ts +12 -0
- package/dist/components/Rating/index.d.ts +1 -0
- package/dist/components/RouteMap/RouteMap.d.ts +42 -0
- package/dist/components/RouteMap/index.d.ts +1 -0
- package/dist/components/SaveIndicator/SaveIndicator.d.ts +12 -0
- package/dist/components/SaveIndicator/index.d.ts +1 -0
- package/dist/components/SearchField/SearchField.d.ts +15 -0
- package/dist/components/SearchField/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +11 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Slider/Slider.d.ts +14 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Sparkline/Sparkline.d.ts +14 -0
- package/dist/components/Sparkline/index.d.ts +1 -0
- package/dist/components/SpeechBubble/SpeechBubble.d.ts +18 -0
- package/dist/components/SpeechBubble/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +9 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Stamp/Stamp.d.ts +12 -0
- package/dist/components/Stamp/index.d.ts +1 -0
- package/dist/components/Stat/Stat.d.ts +16 -0
- package/dist/components/Stat/index.d.ts +1 -0
- package/dist/components/StatTile/StatTile.d.ts +14 -0
- package/dist/components/StatTile/index.d.ts +1 -0
- package/dist/components/Stepper/Stepper.d.ts +14 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +24 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/TextField/TextField.d.ts +18 -0
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +22 -0
- package/dist/components/ThemeSwitcher/index.d.ts +1 -0
- package/dist/components/Thinking/Thinking.d.ts +30 -0
- package/dist/components/Thinking/index.d.ts +1 -0
- package/dist/components/Timeline/Timeline.d.ts +20 -0
- package/dist/components/Timeline/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +19 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/ToggleCard/ToggleCard.d.ts +17 -0
- package/dist/components/ToggleCard/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/WeatherIcon/WeatherIcon.d.ts +12 -0
- package/dist/components/WeatherIcon/index.d.ts +1 -0
- package/dist/components/WeatherSky/WeatherSky.d.ts +15 -0
- package/dist/components/WeatherSky/index.d.ts +1 -0
- package/dist/components/WeatherSky/sky.d.ts +36 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +4600 -0
- package/dist/index.js.map +1 -0
- package/dist/sonido.css +2 -0
- package/dist/tokens/index.d.ts +65 -0
- package/dist/tokens.css +397 -0
- package/dist/tokens.js +61 -0
- package/dist/tokens.js.map +1 -0
- package/dist/utils/accent.d.ts +6 -0
- package/dist/utils/confetti.d.ts +5 -0
- package/dist/utils/cx.d.ts +2 -0
- package/dist/utils/hue.d.ts +4 -0
- package/dist/utils/useCanvasLoop.d.ts +25 -0
- package/dist/utils/useReducedMotion.d.ts +2 -0
- package/package.json +100 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
import "./Checkbox.css";
|
|
3
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange: (checked: boolean) => void;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Estado misto (ex.: "selecionar todos" parcial). */
|
|
9
|
+
indeterminate?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Caixa de seleção com traço animado. Use quando a escolha precisa de "Salvar". */
|
|
12
|
+
export declare function Checkbox({ checked, onChange, label, description, indeterminate, className, id, ...rest }: CheckboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Checkbox";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./CommandPalette.css";
|
|
3
|
+
export interface Command {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
hint?: string;
|
|
9
|
+
/** Palavras extras para a busca. */
|
|
10
|
+
keywords?: string;
|
|
11
|
+
run: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface CommandPaletteProps {
|
|
14
|
+
open: boolean;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
commands: Command[];
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
/** Abre com Ctrl/⌘+K chamando `onOpen`. */
|
|
20
|
+
onOpen?: () => void;
|
|
21
|
+
}
|
|
22
|
+
/** Paleta de comandos (Ctrl+K) do nerd-watch: busca sem acento, grupos, ↑↓ e Enter. */
|
|
23
|
+
export declare function CommandPalette({ open, onClose, commands, placeholder, emptyText, onOpen, }: CommandPaletteProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CommandPalette";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button";
|
|
3
|
+
import "./ConfirmButton.css";
|
|
4
|
+
export interface ConfirmButtonProps extends Omit<ButtonProps, "onClick"> {
|
|
5
|
+
/** Pergunta exibida no segundo passo. */
|
|
6
|
+
ask: ReactNode;
|
|
7
|
+
confirmLabel?: string;
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Ação destrutiva em dois passos, inline (canto-widget).
|
|
13
|
+
* Esc cancela, o foco vai para "Cancelar" e volta ao gatilho ao fechar.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ConfirmButton({ ask, confirmLabel, cancelLabel, onConfirm, variant, children, ...rest }: ConfirmButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ConfirmButton";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CountUpProps {
|
|
2
|
+
value: number;
|
|
3
|
+
/** Duração em ms. */
|
|
4
|
+
duration?: number;
|
|
5
|
+
/** Formatação final (padrão: Intl pt-BR). */
|
|
6
|
+
format?: (n: number) => string;
|
|
7
|
+
locale?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Número que anima até o valor (rAF, easeOutExpo). Instantâneo com reduced-motion. */
|
|
11
|
+
export declare function CountUp({ value, duration, format, locale, className }: CountUpProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CountUp";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./DataTable.css";
|
|
3
|
+
export interface Column<T> {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
align?: "start" | "end" | "center";
|
|
7
|
+
render: (row: T) => ReactNode;
|
|
8
|
+
/** Valor para ordenação. Ausente = coluna não ordenável. */
|
|
9
|
+
sort?: (row: T) => string | number;
|
|
10
|
+
}
|
|
11
|
+
export interface DataTableProps<T> {
|
|
12
|
+
/** Legenda acessível da tabela. */
|
|
13
|
+
label: string;
|
|
14
|
+
columns: Column<T>[];
|
|
15
|
+
rows: T[];
|
|
16
|
+
rowKey: (row: T) => string;
|
|
17
|
+
onRowClick?: (row: T) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Tabela com cabeçalho fixo e ordenação por coluna (`aria-sort`). */
|
|
21
|
+
export declare function DataTable<T>({ label, columns, rows, rowKey, onRowClick, className }: DataTableProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataTable";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./Dialog.css";
|
|
3
|
+
export interface DialogProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/** Rodapé, normalmente botões. */
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
/** `modal` centralizado ou `drawer` lateral (games-gallery). */
|
|
12
|
+
variant?: "modal" | "drawer";
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Diálogo sobre `<dialog>` nativo: foco preso, Esc e clique no fundo fecham. */
|
|
16
|
+
export declare function Dialog({ open, onClose, title, description, children, footer, variant, className, }: DialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Dialog";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./Dock.css";
|
|
3
|
+
export interface DockItem<K extends string> {
|
|
4
|
+
key: K;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
count?: number;
|
|
8
|
+
/** Inicia um novo grupo (separador antes). */
|
|
9
|
+
group?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface DockProps<K extends string> {
|
|
12
|
+
items: DockItem<K>[];
|
|
13
|
+
value: K;
|
|
14
|
+
onChange: (value: K) => void;
|
|
15
|
+
label?: string;
|
|
16
|
+
/** Teclas 1–9 trocam de item (fora de campos de texto). */
|
|
17
|
+
shortcuts?: boolean;
|
|
18
|
+
/** `fixed` flutua no rodapé da viewport; `inline` fica no fluxo. */
|
|
19
|
+
position?: "fixed" | "inline";
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Dock flutuante que amplia sob o ponteiro, estilo macOS (games-gallery). */
|
|
23
|
+
export declare function Dock<K extends string>({ items, value, onChange, label, shortcuts, position, className, }: DockProps<K>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Dock";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./Duel.css";
|
|
3
|
+
export interface Duelist {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
score: number;
|
|
7
|
+
avatar?: string;
|
|
8
|
+
detail?: ReactNode;
|
|
9
|
+
color?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DuelProps {
|
|
12
|
+
a: Duelist;
|
|
13
|
+
b: Duelist;
|
|
14
|
+
/** Texto do placar quando há líder. */
|
|
15
|
+
leadLabel?: (margin: number) => string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Placar de duelo (treta-aovivo / eleicoes-radar): VS, coroa que cai e balança no líder, anel dourado que brilha. */
|
|
19
|
+
export declare function Duel({ a, b, leadLabel, className }: DuelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Duel";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./EmojiBurst.css";
|
|
3
|
+
export interface EmojiBurstProps {
|
|
4
|
+
/** Emojis sorteados a cada toque. */
|
|
5
|
+
emojis?: string[];
|
|
6
|
+
count?: number;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Área que solta emojis e um anel de onda no ponto do toque (EmojiReaction do mika). Máx. 12 rajadas vivas. */
|
|
11
|
+
export declare function EmojiBurst({ emojis, count, children, className, }: EmojiBurstProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./EmojiBurst";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./EmptyState.css";
|
|
3
|
+
export interface EmptyStateProps {
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** Ação principal, ex.: `<Button>Tentar de novo</Button>`. */
|
|
8
|
+
action?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Estado vazio ou de erro recuperável, com ação opcional. */
|
|
12
|
+
export declare function EmptyState({ icon, title, description, action, className }: EmptyStateProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./EmptyState";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./FilterChips.css";
|
|
2
|
+
export interface Chip<K extends string> {
|
|
3
|
+
key: K;
|
|
4
|
+
label: string;
|
|
5
|
+
count?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface FilterChipsProps<K extends string> {
|
|
8
|
+
chips: Chip<K>[];
|
|
9
|
+
/** Chave ativa; `null` = todos. */
|
|
10
|
+
value: K | null;
|
|
11
|
+
onChange: (value: K | null) => void;
|
|
12
|
+
/** Rótulo acessível do grupo. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Texto do chip "todos". Omitido = sem chip "todos". */
|
|
15
|
+
allLabel?: string;
|
|
16
|
+
allCount?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Grupo de filtros com `aria-pressed`. Clicar no ativo desliga o filtro. */
|
|
20
|
+
export declare function FilterChips<K extends string>({ chips, value, onChange, label, allLabel, allCount, className, }: FilterChipsProps<K>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FilterChips";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./Heatmap.css";
|
|
2
|
+
/** Quatro cortes por quantil: um dia extremo não achata a escala (franca-segura). */
|
|
3
|
+
export declare function quantileThresholds(values: number[]): number[];
|
|
4
|
+
export interface HeatmapProps {
|
|
5
|
+
/** Linhas × colunas (ex.: 7 dias × 24 horas). */
|
|
6
|
+
data: number[][];
|
|
7
|
+
rowLabels?: string[];
|
|
8
|
+
colLabels?: string[];
|
|
9
|
+
/** Mostra rótulo a cada N colunas. */
|
|
10
|
+
colEvery?: number;
|
|
11
|
+
label: string;
|
|
12
|
+
format?: (v: number, row: number, col: number) => string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Mapa de calor em cinco faixas de uma matiz, com entrada escalonada (franca-segura + canto-heat). */
|
|
16
|
+
export declare function Heatmap({ data, rowLabels, colLabels, colEvery, label, format, className, }: HeatmapProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Heatmap";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./Hero.css";
|
|
3
|
+
export interface HeroProps {
|
|
4
|
+
/** Rótulo pequeno acima do título. */
|
|
5
|
+
eyebrow?: ReactNode;
|
|
6
|
+
title: string;
|
|
7
|
+
/** Linha de metadados (gênero, ano, horas…). */
|
|
8
|
+
meta?: ReactNode;
|
|
9
|
+
/** Botões de ação. */
|
|
10
|
+
actions?: ReactNode;
|
|
11
|
+
/** Imagem de fundo desfocada; sem ela, usa o ambiente do tema. */
|
|
12
|
+
backdrop?: string;
|
|
13
|
+
/** Conteúdo à direita (capa, anel de progresso). */
|
|
14
|
+
aside?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Destaque de página com título que sobe palavra por palavra (games-gallery). */
|
|
18
|
+
export declare function Hero({ eyebrow, title, meta, actions, backdrop, aside, className }: HeroProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Hero";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { WeatherCondition } from "../WeatherSky/sky";
|
|
3
|
+
import "./HourlyForecast.css";
|
|
4
|
+
export interface HourlyItem {
|
|
5
|
+
/** Rótulo da hora, ex.: "Agora", "13h". */
|
|
6
|
+
time: ReactNode;
|
|
7
|
+
condition: WeatherCondition;
|
|
8
|
+
temp: number;
|
|
9
|
+
night?: boolean;
|
|
10
|
+
/** Chance de chuva 0–1 (aparece abaixo do ícone quando ≥ 0,2). */
|
|
11
|
+
rain?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface HourlyForecastProps {
|
|
14
|
+
items: HourlyItem[];
|
|
15
|
+
label?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Linha de previsão por hora com ícones animados. A primeira coluna fica destacada. */
|
|
19
|
+
export declare function HourlyForecast({ items, label, className }: HourlyForecastProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./HourlyForecast";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./Island.css";
|
|
3
|
+
export type IslandTone = "accent" | "violet" | "aqua" | "gold" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
4
|
+
/** Estilo inline que define a cor de destaque da ilha. */
|
|
5
|
+
export declare const islandTone: (tone: IslandTone) => CSSProperties;
|
|
6
|
+
export interface IslandProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
7
|
+
/** `chip` = mini pílula (ícone + valor); `pill` = uma linha; `card` = expandida, com corpo. */
|
|
8
|
+
size?: "chip" | "pill" | "card";
|
|
9
|
+
/** Cor de destaque (valores, ícone, anéis). */
|
|
10
|
+
tone?: IslandTone;
|
|
11
|
+
/** Ícone, avatar ou capa à esquerda. */
|
|
12
|
+
leading?: ReactNode;
|
|
13
|
+
/** Linha pequena acima do título (ex.: "celular", "BTC"). */
|
|
14
|
+
eyebrow?: ReactNode;
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
/** Linha abaixo do título (ex.: artista). */
|
|
17
|
+
subtitle?: ReactNode;
|
|
18
|
+
/** Valor, ações ou indicador à direita. */
|
|
19
|
+
trailing?: ReactNode;
|
|
20
|
+
/** Atualizações são anunciadas por leitor de tela (`role="status"`). */
|
|
21
|
+
live?: boolean;
|
|
22
|
+
/** Corpo da ilha expandida. */
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Ilha viva: pílula escura que mostra uma atividade em andamento (chamada, timer, música, rota).
|
|
27
|
+
* É sempre escura, em qualquer tema, e herda a cor de destaque do tema dentro dela.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Island({ size, tone, leading, eyebrow, title, subtitle, trailing, live, children, className, style, ...rest }: IslandProps): import("react").JSX.Element;
|
|
30
|
+
export interface IslandActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
31
|
+
/** Obrigatório: o botão só tem ícone. */
|
|
32
|
+
"aria-label": string;
|
|
33
|
+
tone?: IslandTone;
|
|
34
|
+
/** `solid` = cor cheia (atender); `soft` = cor translúcida (pausar); `plain` = cinza. */
|
|
35
|
+
appearance?: "solid" | "soft" | "plain";
|
|
36
|
+
/** Anel pulsante para chamar atenção (chamada recebida). */
|
|
37
|
+
pulse?: boolean;
|
|
38
|
+
size?: number;
|
|
39
|
+
}
|
|
40
|
+
/** Botão redondo das ilhas (atender, recusar, pausar, parar). Alvo mínimo de 44px. */
|
|
41
|
+
export declare function IslandAction({ tone, appearance, pulse, size, className, style, type, ...rest }: IslandActionProps): import("react").JSX.Element;
|
|
42
|
+
export interface IslandChipProps extends HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
icon: ReactNode;
|
|
44
|
+
value: ReactNode;
|
|
45
|
+
tone?: IslandTone;
|
|
46
|
+
/** Texto para leitor de tela, ex.: "Voo em 46 minutos". */
|
|
47
|
+
label: string;
|
|
48
|
+
}
|
|
49
|
+
/** Mini ilha: ícone + valor na cor do tom. */
|
|
50
|
+
export declare function IslandChip({ icon, value, tone, label, className, ...rest }: IslandChipProps): import("react").JSX.Element;
|
|
51
|
+
/** mm:ss (ou h:mm:ss) para tempos das ilhas. */
|
|
52
|
+
export declare function clock(totalSeconds: number): string;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type HourlyItem } from "../HourlyForecast";
|
|
3
|
+
import type { WeatherCondition } from "../WeatherSky/sky";
|
|
4
|
+
import { type IslandTone } from "./Island";
|
|
5
|
+
import { type Maneuver } from "./icons";
|
|
6
|
+
export interface IslandTimerProps {
|
|
7
|
+
/** Duração em segundos. */
|
|
8
|
+
duration: number;
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
tone?: IslandTone;
|
|
11
|
+
/** Começa rodando. */
|
|
12
|
+
autoStart?: boolean;
|
|
13
|
+
onDone?: () => void;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Contagem regressiva com pausar e cancelar (timer de cozinha, pomodoro). */
|
|
18
|
+
export declare function IslandTimer({ duration, label, tone, autoStart, onDone, onCancel, className, }: IslandTimerProps): import("react").JSX.Element;
|
|
19
|
+
export interface IslandCallProps {
|
|
20
|
+
name: string;
|
|
21
|
+
/** Linha pequena acima do nome (ex.: "celular", "FaceTime"). */
|
|
22
|
+
subtitle?: ReactNode;
|
|
23
|
+
avatar?: string;
|
|
24
|
+
/** `incoming` = recusar/atender; `joined` = alguém entrou na chamada. */
|
|
25
|
+
variant?: "incoming" | "joined";
|
|
26
|
+
onAccept?: () => void;
|
|
27
|
+
onDecline?: () => void;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Chamada recebida (recusar/atender) ou aviso de que alguém entrou na call. */
|
|
31
|
+
export declare function IslandCall({ name, subtitle, avatar, variant, onAccept, onDecline, className, }: IslandCallProps): import("react").JSX.Element;
|
|
32
|
+
export interface IslandMediaProps {
|
|
33
|
+
title: string;
|
|
34
|
+
artist: string;
|
|
35
|
+
/** Capa; sem ela, um gradiente derivado do título. */
|
|
36
|
+
cover?: string;
|
|
37
|
+
/** Duração em segundos. */
|
|
38
|
+
duration: number;
|
|
39
|
+
/** Posição inicial em segundos. */
|
|
40
|
+
defaultPosition?: number;
|
|
41
|
+
defaultPlaying?: boolean;
|
|
42
|
+
onPrev?: () => void;
|
|
43
|
+
onNext?: () => void;
|
|
44
|
+
onPlayingChange?: (playing: boolean) => void;
|
|
45
|
+
/** Mostra o botão de transmitir. */
|
|
46
|
+
onCast?: () => void;
|
|
47
|
+
tone?: IslandTone;
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Player expandido: capa, equalizador, barra de progresso arrastável e controles. */
|
|
51
|
+
export declare function IslandMedia({ title, artist, cover, duration, defaultPosition, defaultPlaying, onPrev, onNext, onPlayingChange, onCast, tone, className, }: IslandMediaProps): import("react").JSX.Element;
|
|
52
|
+
export interface IslandRecordingProps {
|
|
53
|
+
label?: ReactNode;
|
|
54
|
+
/** `button` = tempo + botão de parar; `wave` = onda de áudio + tempo. */
|
|
55
|
+
variant?: "button" | "wave";
|
|
56
|
+
/** Nível de áudio 0–1, lido a cada quadro (microfone). Sem ele, uma onda simulada. */
|
|
57
|
+
level?: () => number;
|
|
58
|
+
/** Segundos já gravados ao montar. */
|
|
59
|
+
startAt?: number;
|
|
60
|
+
onStop?: () => void;
|
|
61
|
+
tone?: IslandTone;
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
/** Gravação em andamento: tempo correndo e botão de parar, ou onda de áudio ao vivo. */
|
|
65
|
+
export declare function IslandRecording({ label, variant, level, startAt, onStop, tone, className, }: IslandRecordingProps): import("react").JSX.Element;
|
|
66
|
+
export interface IslandNavProps {
|
|
67
|
+
maneuver: Maneuver;
|
|
68
|
+
/** Distância até a manobra, ex.: "312 m". */
|
|
69
|
+
distance: ReactNode;
|
|
70
|
+
street: ReactNode;
|
|
71
|
+
/** Hora de chegada, ex.: "12:08". */
|
|
72
|
+
arrival: ReactNode;
|
|
73
|
+
/** Ex.: "6 min". */
|
|
74
|
+
remaining?: ReactNode;
|
|
75
|
+
tone?: IslandTone;
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Navegação passo a passo: seta da manobra, distância, rua e chegada. */
|
|
79
|
+
export declare function IslandNav({ maneuver, distance, street, arrival, remaining, tone, className, }: IslandNavProps): import("react").JSX.Element;
|
|
80
|
+
export interface IslandTickerProps {
|
|
81
|
+
symbol: string;
|
|
82
|
+
name: string;
|
|
83
|
+
/** Preço já formatado. */
|
|
84
|
+
price: ReactNode;
|
|
85
|
+
/** Variação absoluta formatada, ex.: "+$641,40". */
|
|
86
|
+
change?: ReactNode;
|
|
87
|
+
/** Variação percentual (número): define verde/vermelho e a seta. */
|
|
88
|
+
changePct: number;
|
|
89
|
+
data: number[];
|
|
90
|
+
/** Ex.: "há 2 min". */
|
|
91
|
+
updated?: ReactNode;
|
|
92
|
+
icon?: ReactNode;
|
|
93
|
+
className?: string;
|
|
94
|
+
}
|
|
95
|
+
/** Cotação ao vivo (cripto, ação): preço, variação e minigráfico. */
|
|
96
|
+
export declare function IslandTicker({ symbol, name, price, change, changePct, data, updated, icon, className, }: IslandTickerProps): import("react").JSX.Element;
|
|
97
|
+
export interface IslandWeatherProps {
|
|
98
|
+
place: ReactNode;
|
|
99
|
+
temp: number;
|
|
100
|
+
condition: WeatherCondition;
|
|
101
|
+
night?: boolean;
|
|
102
|
+
summary?: ReactNode;
|
|
103
|
+
high?: number;
|
|
104
|
+
low?: number;
|
|
105
|
+
hours?: HourlyItem[];
|
|
106
|
+
className?: string;
|
|
107
|
+
}
|
|
108
|
+
/** Clima agora + próximas horas. */
|
|
109
|
+
export declare function IslandWeather({ place, temp, condition, night, summary, high, low, hours, className, }: IslandWeatherProps): import("react").JSX.Element;
|
|
110
|
+
export type { Maneuver };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Ícones internos das ilhas (traço cheio, legíveis em 20px). */
|
|
2
|
+
export declare const IslandIcons: {
|
|
3
|
+
play: (s?: number) => import("react").JSX.Element;
|
|
4
|
+
pause: (s?: number) => import("react").JSX.Element;
|
|
5
|
+
prev: (s?: number) => import("react").JSX.Element;
|
|
6
|
+
next: (s?: number) => import("react").JSX.Element;
|
|
7
|
+
close: (s?: number) => import("react").JSX.Element;
|
|
8
|
+
phone: (s?: number) => import("react").JSX.Element;
|
|
9
|
+
hangup: (s?: number) => import("react").JSX.Element;
|
|
10
|
+
video: (s?: number) => import("react").JSX.Element;
|
|
11
|
+
stop: (s?: number) => import("react").JSX.Element;
|
|
12
|
+
cast: (s?: number) => import("react").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export type Maneuver = "straight" | "left" | "right" | "slight-left" | "slight-right" | "uturn";
|
|
15
|
+
export declare function TurnArrow({ maneuver, size }: {
|
|
16
|
+
maneuver: Maneuver;
|
|
17
|
+
size?: number;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Kbd";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./LiveBadge.css";
|
|
2
|
+
export interface LiveBadgeProps {
|
|
3
|
+
/** Ao vivo: ponto vermelho pulsando. */
|
|
4
|
+
live?: boolean;
|
|
5
|
+
label?: string;
|
|
6
|
+
offLabel?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Selo "AO VIVO" com o ponto de tally (treta-aovivo / eleicoes-radar). */
|
|
10
|
+
export declare function LiveBadge({ live, label, offLabel, className }: LiveBadgeProps): import("react").JSX.Element;
|
|
11
|
+
export interface EqualizerProps {
|
|
12
|
+
/** Cor das barras (ex.: cor de quem fala). */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Ativo = barras dançando; parado = barras baixas visíveis. */
|
|
15
|
+
active?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Indicador de fala (onda de 4 barras) do treta-aovivo; com reduced-motion as barras ficam paradas, não somem. */
|
|
20
|
+
export declare function Equalizer({ color, active, label, className }: EqualizerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LiveBadge";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./Menu.css";
|
|
3
|
+
export interface MenuItem {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
danger?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Separador antes deste item. */
|
|
11
|
+
separator?: boolean;
|
|
12
|
+
onSelect: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface MenuProps {
|
|
15
|
+
/** Conteúdo do botão gatilho. */
|
|
16
|
+
trigger: ReactNode;
|
|
17
|
+
/** Rótulo acessível do gatilho, se ele for só ícone. */
|
|
18
|
+
triggerLabel?: string;
|
|
19
|
+
items: MenuItem[];
|
|
20
|
+
align?: "start" | "end";
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Menu suspenso (padrão WAI-ARIA menu button): setas, Home/End, Esc e clique fora fecham. */
|
|
24
|
+
export declare function Menu({ trigger, triggerLabel, items, align, className }: MenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Menu";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./MeterCard.css";
|
|
3
|
+
export type MeterStatus = "ok" | "warn" | "crit" | "none";
|
|
4
|
+
export interface MeterRow {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** 0 a 100. */
|
|
8
|
+
pct: number;
|
|
9
|
+
/** Texto de renovação, ex.: "renova em 2h". */
|
|
10
|
+
renew?: string;
|
|
11
|
+
/** Renovação próxima: o selo "respira" e o raio pisca. */
|
|
12
|
+
soon?: boolean;
|
|
13
|
+
/** Texto opcional abaixo, ex.: "41 de 50 mensagens". */
|
|
14
|
+
detail?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MeterCardProps {
|
|
17
|
+
title: string;
|
|
18
|
+
logo?: ReactNode;
|
|
19
|
+
/** Leitura principal (0–100) desenhada no anel. */
|
|
20
|
+
pct: number;
|
|
21
|
+
rows?: MeterRow[];
|
|
22
|
+
/** Nota de status com ponto; `crit` emite um pulso. */
|
|
23
|
+
note?: string;
|
|
24
|
+
/** Posição na grade: entra em cascata. */
|
|
25
|
+
index?: number;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Status pelo uso: 75% vira aviso, 90% vira crítico. */
|
|
30
|
+
export declare const meterStatus: (pct: number) => MeterStatus;
|
|
31
|
+
/** Cartão de consumo/cota (ai-session-monitor): anel, barras por janela, selo de renovação e alerta pulsante. */
|
|
32
|
+
export declare function MeterCard({ title, logo, pct, rows, note, index, onClick, className }: MeterCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MeterCard";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties, ElementType, ReactNode } from "react";
|
|
2
|
+
export type MotionEffect = "rise" | "pop" | "stack" | "drop" | "slide" | "unfold" | "roll" | "grow-x" | "grow-y" | "draw" | "fade" | "ping" | "blink" | "glow" | "halo" | "float" | "wiggle" | "spin" | "shake" | "pass" | "star" | "bump" | "flash" | "tick-up" | "tick-down" | "exit-swipe" | "exit-archive" | "exit-trash" | "raise" | "lift" | "tilt" | "shimmer";
|
|
3
|
+
export interface MotionProps {
|
|
4
|
+
effect: MotionEffect;
|
|
5
|
+
/** Posição na sequência: atrasa a entrada (`--i`). */
|
|
6
|
+
index?: number;
|
|
7
|
+
as?: ElementType;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/** Atalho para as classes `sn-m-*` de motion.css. Troque a `key` para tocar de novo. */
|
|
13
|
+
export declare function Motion({ effect, index, as: Tag, children, className, style }: MotionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Motion";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "./NavRail.css";
|
|
3
|
+
export interface NavItem<K extends string> {
|
|
4
|
+
key: K;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
badge?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface NavGroup<K extends string> {
|
|
10
|
+
title?: string;
|
|
11
|
+
items: NavItem<K>[];
|
|
12
|
+
}
|
|
13
|
+
export interface NavRailProps<K extends string> {
|
|
14
|
+
groups: NavGroup<K>[];
|
|
15
|
+
value: K;
|
|
16
|
+
onChange: (value: K) => void;
|
|
17
|
+
/** Marca no topo. */
|
|
18
|
+
brand?: ReactNode;
|
|
19
|
+
/** Só ícones (88px). */
|
|
20
|
+
compact?: boolean;
|
|
21
|
+
label?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/** Menu lateral agrupado por intenção, com indicador em gradiente (nerd-watch). */
|
|
25
|
+
export declare function NavRail<K extends string>({ groups, value, onChange, brand, compact, label, className, }: NavRailProps<K>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NavRail";
|