Add history window controls and expand taxonomy pack support
- add 3Y/5Y/10Y financial history filtering and reorganize normalization details UI - add new fiscal taxonomy surface/income bridge/KPI packs and update Rust taxonomy loading - auto-detect Homebrew SQLite for native `sqlite-vec` in local dev/e2e with docs and env guidance
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type ControlButtonVariant = 'primary' | 'ghost' | 'secondary' | 'danger';
|
||||
type ControlButtonVariant = "primary" | "ghost" | "secondary" | "danger";
|
||||
|
||||
export type FinancialControlOption = {
|
||||
value: string;
|
||||
@@ -34,19 +34,25 @@ type FinancialControlBarProps = {
|
||||
};
|
||||
|
||||
export function FinancialControlBar({
|
||||
title = 'Control Bar',
|
||||
title = "Control Bar",
|
||||
subtitle,
|
||||
sections,
|
||||
actions,
|
||||
className
|
||||
className,
|
||||
}: FinancialControlBarProps) {
|
||||
return (
|
||||
<section className={cn('border-t border-[color:var(--line-weak)] pt-4', className)}>
|
||||
<section
|
||||
className={cn("border-t border-[color:var(--line-weak)] pt-4", className)}
|
||||
>
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="min-w-0">
|
||||
<h3 className="text-base font-semibold text-[color:var(--terminal-bright)]">{title}</h3>
|
||||
<h3 className="text-base font-semibold text-[color:var(--terminal-bright)]">
|
||||
{title}
|
||||
</h3>
|
||||
{subtitle ? (
|
||||
<p className="mt-1 text-sm text-[color:var(--terminal-muted)]">{subtitle}</p>
|
||||
<p className="mt-1 text-sm text-[color:var(--terminal-muted)]">
|
||||
{subtitle}
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -56,7 +62,7 @@ export function FinancialControlBar({
|
||||
<Button
|
||||
key={action.id}
|
||||
type="button"
|
||||
variant={action.variant ?? 'secondary'}
|
||||
variant={action.variant ?? "secondary"}
|
||||
disabled={action.disabled}
|
||||
className="px-2 py-1 text-xs sm:min-h-9"
|
||||
onClick={action.onClick}
|
||||
@@ -70,17 +76,16 @@ export function FinancialControlBar({
|
||||
|
||||
<div className="mt-4 grid grid-cols-1 gap-3">
|
||||
{sections.map((section) => (
|
||||
<div
|
||||
key={section.id}
|
||||
className="data-surface px-3 py-3"
|
||||
>
|
||||
<span className="mb-2 block text-[10px] uppercase tracking-[0.16em] text-[color:var(--terminal-muted)]">{section.label}</span>
|
||||
<div key={section.id} className="data-surface px-3 py-3">
|
||||
<span className="mb-2 block text-[11px] text-[color:var(--terminal-muted)]">
|
||||
{section.label}
|
||||
</span>
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
{section.options.map((option) => (
|
||||
<Button
|
||||
key={`${section.id}-${option.value}`}
|
||||
type="button"
|
||||
variant={option.value === section.value ? 'primary' : 'ghost'}
|
||||
variant={option.value === section.value ? "primary" : "ghost"}
|
||||
disabled={option.disabled}
|
||||
className="px-2 py-1 text-xs sm:min-h-9"
|
||||
onClick={() => section.onChange(option.value)}
|
||||
|
||||
Reference in New Issue
Block a user