@polastack/design-system 0.1.6 → 0.1.8
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/dist/chunk-Q6XRSLLQ.js +86 -0
- package/dist/chunk-Q6XRSLLQ.js.map +1 -0
- package/dist/index.d.ts +76 -1
- package/dist/index.js +169 -0
- package/dist/index.js.map +1 -1
- package/dist/tokens/index.js +3 -81
- package/dist/tokens/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// src/tokens/colors.ts
|
|
2
|
+
var colors = {
|
|
3
|
+
primary: {
|
|
4
|
+
50: "#f0fdfb",
|
|
5
|
+
100: "#cdfbf0",
|
|
6
|
+
200: "#9bf7e2",
|
|
7
|
+
300: "#61ebd0",
|
|
8
|
+
400: "#2fd4ba",
|
|
9
|
+
500: "#1BA491",
|
|
10
|
+
600: "#138575",
|
|
11
|
+
700: "#146b5f",
|
|
12
|
+
800: "#15564e",
|
|
13
|
+
900: "#134841",
|
|
14
|
+
950: "#042c28"
|
|
15
|
+
},
|
|
16
|
+
neutral: {
|
|
17
|
+
50: "#fafafa",
|
|
18
|
+
100: "#f4f4f5",
|
|
19
|
+
200: "#e4e4e7",
|
|
20
|
+
300: "#d4d4d8",
|
|
21
|
+
400: "#a1a1aa",
|
|
22
|
+
500: "#71717a",
|
|
23
|
+
600: "#52525b",
|
|
24
|
+
700: "#3f3f46",
|
|
25
|
+
800: "#27272a",
|
|
26
|
+
900: "#18181b",
|
|
27
|
+
950: "#09090b"
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
50: "#f0fdf4",
|
|
31
|
+
100: "#dcfce7",
|
|
32
|
+
200: "#bbf7d0",
|
|
33
|
+
300: "#86efac",
|
|
34
|
+
400: "#4ade80",
|
|
35
|
+
500: "#22c55e",
|
|
36
|
+
600: "#16a34a",
|
|
37
|
+
700: "#15803d",
|
|
38
|
+
800: "#166534",
|
|
39
|
+
900: "#14532d",
|
|
40
|
+
950: "#052e16"
|
|
41
|
+
},
|
|
42
|
+
warning: {
|
|
43
|
+
50: "#fffbeb",
|
|
44
|
+
100: "#fef3c7",
|
|
45
|
+
200: "#fde68a",
|
|
46
|
+
300: "#fcd34d",
|
|
47
|
+
400: "#fbbf24",
|
|
48
|
+
500: "#f59e0b",
|
|
49
|
+
600: "#d97706",
|
|
50
|
+
700: "#b45309",
|
|
51
|
+
800: "#92400e",
|
|
52
|
+
900: "#78350f",
|
|
53
|
+
950: "#451a03"
|
|
54
|
+
},
|
|
55
|
+
error: {
|
|
56
|
+
50: "#fef2f2",
|
|
57
|
+
100: "#fee2e2",
|
|
58
|
+
200: "#fecaca",
|
|
59
|
+
300: "#fca5a5",
|
|
60
|
+
400: "#f87171",
|
|
61
|
+
500: "#ef4444",
|
|
62
|
+
600: "#dc2626",
|
|
63
|
+
700: "#b91c1c",
|
|
64
|
+
800: "#991b1b",
|
|
65
|
+
900: "#7f1d1d",
|
|
66
|
+
950: "#450a0a"
|
|
67
|
+
},
|
|
68
|
+
info: {
|
|
69
|
+
50: "#eff6ff",
|
|
70
|
+
100: "#dbeafe",
|
|
71
|
+
200: "#bfdbfe",
|
|
72
|
+
300: "#93c5fd",
|
|
73
|
+
400: "#60a5fa",
|
|
74
|
+
500: "#3b82f6",
|
|
75
|
+
600: "#2563eb",
|
|
76
|
+
700: "#1d4ed8",
|
|
77
|
+
800: "#1e40af",
|
|
78
|
+
900: "#1e3a8a",
|
|
79
|
+
950: "#172554"
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
colors
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=chunk-Q6XRSLLQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tokens/colors.ts"],"sourcesContent":["/**\n * カラートークン定数\n * CSS変数(globals.css @theme)と同期。プログラム的アクセス用。\n * スタイリングにはTailwindユーティリティクラス(bg-primary-500等)を推奨。\n */\n\nexport const colors = {\n primary: {\n 50: '#f0fdfb',\n 100: '#cdfbf0',\n 200: '#9bf7e2',\n 300: '#61ebd0',\n 400: '#2fd4ba',\n 500: '#1BA491',\n 600: '#138575',\n 700: '#146b5f',\n 800: '#15564e',\n 900: '#134841',\n 950: '#042c28',\n },\n neutral: {\n 50: '#fafafa',\n 100: '#f4f4f5',\n 200: '#e4e4e7',\n 300: '#d4d4d8',\n 400: '#a1a1aa',\n 500: '#71717a',\n 600: '#52525b',\n 700: '#3f3f46',\n 800: '#27272a',\n 900: '#18181b',\n 950: '#09090b',\n },\n success: {\n 50: '#f0fdf4',\n 100: '#dcfce7',\n 200: '#bbf7d0',\n 300: '#86efac',\n 400: '#4ade80',\n 500: '#22c55e',\n 600: '#16a34a',\n 700: '#15803d',\n 800: '#166534',\n 900: '#14532d',\n 950: '#052e16',\n },\n warning: {\n 50: '#fffbeb',\n 100: '#fef3c7',\n 200: '#fde68a',\n 300: '#fcd34d',\n 400: '#fbbf24',\n 500: '#f59e0b',\n 600: '#d97706',\n 700: '#b45309',\n 800: '#92400e',\n 900: '#78350f',\n 950: '#451a03',\n },\n error: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n info: {\n 50: '#eff6ff',\n 100: '#dbeafe',\n 200: '#bfdbfe',\n 300: '#93c5fd',\n 400: '#60a5fa',\n 500: '#3b82f6',\n 600: '#2563eb',\n 700: '#1d4ed8',\n 800: '#1e40af',\n 900: '#1e3a8a',\n 950: '#172554',\n },\n} as const;\n\nexport type ColorScale = keyof typeof colors;\nexport type ColorShade = keyof (typeof colors)['primary'];\n"],"mappings":";AAMO,IAAM,SAAS;AAAA,EACpB,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACL,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AACF;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -661,4 +661,79 @@ interface PullToRefreshProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
661
661
|
}
|
|
662
662
|
declare const PullToRefresh: React.ForwardRefExoticComponent<PullToRefreshProps & React.RefAttributes<HTMLDivElement>>;
|
|
663
663
|
|
|
664
|
-
|
|
664
|
+
interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
665
|
+
/** Metric label (e.g. "Total Revenue") */
|
|
666
|
+
label: string;
|
|
667
|
+
/** Formatted value (e.g. "¥1,234,567") */
|
|
668
|
+
value: string;
|
|
669
|
+
/** Trend text (e.g. "+12.5%", "-3") */
|
|
670
|
+
trend?: string;
|
|
671
|
+
/** Trend direction — controls color. Default: inferred from trend string. */
|
|
672
|
+
trendDirection?: 'up' | 'down' | 'neutral';
|
|
673
|
+
/** Optional icon rendered left of the value */
|
|
674
|
+
icon?: React.ReactNode;
|
|
675
|
+
}
|
|
676
|
+
declare const StatCard: React.ForwardRefExoticComponent<StatCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
677
|
+
|
|
678
|
+
interface ChartContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
679
|
+
/** Chart title */
|
|
680
|
+
title: string;
|
|
681
|
+
/** Optional description below the title */
|
|
682
|
+
description?: string;
|
|
683
|
+
/** Actions rendered in the header (e.g. period selector, export button) */
|
|
684
|
+
actions?: React.ReactNode;
|
|
685
|
+
}
|
|
686
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<ChartContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Chart theme tokens for integrating charting libraries (Recharts, Chart.js, etc.)
|
|
690
|
+
* with the Polastack design system color palette.
|
|
691
|
+
*
|
|
692
|
+
* Usage with Recharts:
|
|
693
|
+
* <Bar fill={chartColors.series[0]} />
|
|
694
|
+
*
|
|
695
|
+
* Usage with Chart.js:
|
|
696
|
+
* datasets: [{ backgroundColor: chartColors.series }]
|
|
697
|
+
*/
|
|
698
|
+
/** Ordered color series for chart data — distinct, accessible, brand-consistent. */
|
|
699
|
+
declare const chartColors: {
|
|
700
|
+
/**
|
|
701
|
+
* Primary data series palette (use in order for multi-series charts).
|
|
702
|
+
* Uses 400-level tones for a softer, more cohesive look in filled areas
|
|
703
|
+
* (bars, pie slices, etc.). Brand teal stays at 500 as the anchor.
|
|
704
|
+
*/
|
|
705
|
+
readonly series: readonly ["#1BA491", "#60a5fa", "#a1a1aa", "#fbbf24", "#4ade80", "#fca5a5", "#61ebd0", "#93c5fd"];
|
|
706
|
+
/**
|
|
707
|
+
* Stronger series — for line charts and small marks (dots, strokes)
|
|
708
|
+
* where higher contrast is needed against the background.
|
|
709
|
+
*/
|
|
710
|
+
readonly stroke: readonly ["#138575", "#2563eb", "#71717a", "#d97706", "#16a34a", "#ef4444", "#146b5f", "#1d4ed8"];
|
|
711
|
+
/** Semantic colors for status-based charts */
|
|
712
|
+
readonly semantic: {
|
|
713
|
+
readonly positive: "#4ade80";
|
|
714
|
+
readonly negative: "#f87171";
|
|
715
|
+
readonly neutral: "#a1a1aa";
|
|
716
|
+
readonly warning: "#fbbf24";
|
|
717
|
+
readonly info: "#60a5fa";
|
|
718
|
+
readonly primary: "#1BA491";
|
|
719
|
+
};
|
|
720
|
+
/** Light fills for area/background (light mode) — very subtle */
|
|
721
|
+
readonly areaLight: readonly ["#f0fdfb", "#eff6ff", "#f4f4f5", "#fffbeb", "#f0fdf4"];
|
|
722
|
+
/** Dark fills for area/background (dark mode) */
|
|
723
|
+
readonly areaDark: readonly ["#042c28", "#172554", "#27272a", "#451a03", "#052e16"];
|
|
724
|
+
/** Grid and axis colors (use CSS variables for dark mode compatibility) */
|
|
725
|
+
readonly grid: {
|
|
726
|
+
readonly light: "#e4e4e7";
|
|
727
|
+
readonly dark: "#3f3f46";
|
|
728
|
+
};
|
|
729
|
+
/** Text colors for labels and legends */
|
|
730
|
+
readonly text: {
|
|
731
|
+
readonly light: "#71717a";
|
|
732
|
+
readonly dark: "#a1a1aa";
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
type ChartColorSeries = typeof chartColors.series;
|
|
736
|
+
type ChartStrokeColors = typeof chartColors.stroke;
|
|
737
|
+
type ChartSemanticColors = typeof chartColors.semantic;
|
|
738
|
+
|
|
739
|
+
export { ActiveFilters, type ActiveFiltersProps, AppShell, AppShellContent, AppShellFooter, AppShellHeader, type AppShellProps, AppShellSidebar, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarStatus, type AvatarStatusProps, type AvatarStatusType, BREAKPOINTS, Badge, type BadgeProps, BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, type Breakpoint, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartColorSeries, ChartContainer, type ChartContainerProps, type ChartSemanticColors, type ChartStrokeColors, Checkbox, type CheckboxProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, CommandPaletteEmpty, CommandPaletteGroup, type CommandPaletteGroupProps, CommandPaletteItem, type CommandPaletteItemProps, type CommandPaletteProps, CommandPaletteSeparator, CommandPaletteShortcut, DataTable, DataTableColumnHeader, DataTablePagination, type DataTableProps, DataTableToolbar, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, type DisplayMode, Drawer, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, DrawerProvider, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicFormField, type DynamicFormFieldProps, EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIcon, type EmptyStateProps, EmptyStateTitle, type FieldOption, type FieldType, FilterBar, FilterBarActions, FilterBarGroup, FilterChip, type FilterChipProps, FormActions, type FormActionsProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, type FormFieldProps, FormLabel, type FormLabelProps, FormLayout, type FormLayoutProps, FormMessage, type FormMessageProps, FormSection, type FormSectionProps, Input, type InputProps, InstallPrompt, type InstallPromptProps, Label, type LabelProps, NumberInput, type NumberInputProps, OfflineIndicator, type OfflineIndicatorProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PullToRefresh, type PullToRefreshProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResolvedTheme, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, StatCard, type StatCardProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, Textarea, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseThemeOptions, type UseThemeReturn, avatarVariants, badgeVariants, buttonVariants, chartColors, cn, createContext, formLayoutVariants, getFieldComponent, inputVariants, spinnerVariants, switchVariants, textareaVariants, toast, toastVariants, useAppShell, useBreakpoint, useDisplayMode, useFormField, useInstallPrompt, useOnlineStatus, useTheme$1 as useTheme, useTheme as useThemeContext, useToast, useViewportHeight };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colors
|
|
3
|
+
} from "./chunk-Q6XRSLLQ.js";
|
|
4
|
+
|
|
1
5
|
// src/lib/cn.ts
|
|
2
6
|
import { clsx } from "clsx";
|
|
3
7
|
import { twMerge } from "tailwind-merge";
|
|
@@ -3672,6 +3676,168 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3672
3676
|
}
|
|
3673
3677
|
);
|
|
3674
3678
|
PullToRefresh.displayName = "PullToRefresh";
|
|
3679
|
+
|
|
3680
|
+
// src/components/stat-card/stat-card.tsx
|
|
3681
|
+
import * as React42 from "react";
|
|
3682
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3683
|
+
function inferDirection(trend) {
|
|
3684
|
+
if (!trend) return "neutral";
|
|
3685
|
+
if (trend.startsWith("+")) return "up";
|
|
3686
|
+
if (trend.startsWith("-")) return "down";
|
|
3687
|
+
return "neutral";
|
|
3688
|
+
}
|
|
3689
|
+
var TREND_STYLES = {
|
|
3690
|
+
up: "text-success-600 dark:text-success-400",
|
|
3691
|
+
down: "text-error-600 dark:text-error-400",
|
|
3692
|
+
neutral: "text-[var(--color-on-surface-muted)]"
|
|
3693
|
+
};
|
|
3694
|
+
var TREND_ICONS = {
|
|
3695
|
+
up: "M7 17l5-5 5 5",
|
|
3696
|
+
down: "M7 7l5 5 5-5",
|
|
3697
|
+
neutral: ""
|
|
3698
|
+
};
|
|
3699
|
+
var StatCard = React42.forwardRef(
|
|
3700
|
+
({ className, label, value, trend, trendDirection, icon, ...props }, ref) => {
|
|
3701
|
+
const direction = trendDirection ?? inferDirection(trend);
|
|
3702
|
+
return /* @__PURE__ */ jsxs25(
|
|
3703
|
+
"div",
|
|
3704
|
+
{
|
|
3705
|
+
ref,
|
|
3706
|
+
className: cn(
|
|
3707
|
+
"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface-raised)] p-5",
|
|
3708
|
+
className
|
|
3709
|
+
),
|
|
3710
|
+
...props,
|
|
3711
|
+
children: [
|
|
3712
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
3713
|
+
/* @__PURE__ */ jsx44("p", { className: "text-xs font-medium text-[var(--color-on-surface-muted)] uppercase tracking-wider", children: label }),
|
|
3714
|
+
icon && /* @__PURE__ */ jsx44("span", { className: "text-[var(--color-on-surface-muted)]", children: icon })
|
|
3715
|
+
] }),
|
|
3716
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-baseline gap-2 mt-2", children: [
|
|
3717
|
+
/* @__PURE__ */ jsx44("span", { className: "text-2xl font-bold tabular-nums", children: value }),
|
|
3718
|
+
trend && /* @__PURE__ */ jsxs25("span", { className: cn("inline-flex items-center gap-0.5 text-xs font-medium", TREND_STYLES[direction]), children: [
|
|
3719
|
+
direction !== "neutral" && /* @__PURE__ */ jsx44("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx44("path", { d: TREND_ICONS[direction] }) }),
|
|
3720
|
+
trend
|
|
3721
|
+
] })
|
|
3722
|
+
] })
|
|
3723
|
+
]
|
|
3724
|
+
}
|
|
3725
|
+
);
|
|
3726
|
+
}
|
|
3727
|
+
);
|
|
3728
|
+
StatCard.displayName = "StatCard";
|
|
3729
|
+
|
|
3730
|
+
// src/components/chart-container/chart-container.tsx
|
|
3731
|
+
import * as React43 from "react";
|
|
3732
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3733
|
+
var ChartContainer = React43.forwardRef(
|
|
3734
|
+
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3735
|
+
"div",
|
|
3736
|
+
{
|
|
3737
|
+
ref,
|
|
3738
|
+
className: cn(
|
|
3739
|
+
"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface-raised)] shadow-sm",
|
|
3740
|
+
className
|
|
3741
|
+
),
|
|
3742
|
+
...props,
|
|
3743
|
+
children: [
|
|
3744
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-start justify-between gap-4 p-5 pb-0", children: [
|
|
3745
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
3746
|
+
/* @__PURE__ */ jsx45("h3", { className: "text-sm font-semibold leading-none tracking-tight", children: title }),
|
|
3747
|
+
description && /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description })
|
|
3748
|
+
] }),
|
|
3749
|
+
actions && /* @__PURE__ */ jsx45("div", { className: "flex items-center gap-2 shrink-0", children: actions })
|
|
3750
|
+
] }),
|
|
3751
|
+
/* @__PURE__ */ jsx45("div", { className: "p-5", children })
|
|
3752
|
+
]
|
|
3753
|
+
}
|
|
3754
|
+
)
|
|
3755
|
+
);
|
|
3756
|
+
ChartContainer.displayName = "ChartContainer";
|
|
3757
|
+
|
|
3758
|
+
// src/tokens/chart-theme.ts
|
|
3759
|
+
var chartColors = {
|
|
3760
|
+
/**
|
|
3761
|
+
* Primary data series palette (use in order for multi-series charts).
|
|
3762
|
+
* Uses 400-level tones for a softer, more cohesive look in filled areas
|
|
3763
|
+
* (bars, pie slices, etc.). Brand teal stays at 500 as the anchor.
|
|
3764
|
+
*/
|
|
3765
|
+
series: [
|
|
3766
|
+
colors.primary[500],
|
|
3767
|
+
// #1BA491 brand teal (anchor)
|
|
3768
|
+
colors.info[400],
|
|
3769
|
+
// #60a5fa soft blue
|
|
3770
|
+
colors.neutral[400],
|
|
3771
|
+
// #a1a1aa muted gray
|
|
3772
|
+
colors.warning[400],
|
|
3773
|
+
// #fbbf24 soft amber
|
|
3774
|
+
colors.success[400],
|
|
3775
|
+
// #4ade80 soft green
|
|
3776
|
+
colors.error[300],
|
|
3777
|
+
// #fca5a5 soft coral
|
|
3778
|
+
colors.primary[300],
|
|
3779
|
+
// #61ebd0 light teal
|
|
3780
|
+
colors.info[300]
|
|
3781
|
+
// #93c5fd light blue
|
|
3782
|
+
],
|
|
3783
|
+
/**
|
|
3784
|
+
* Stronger series — for line charts and small marks (dots, strokes)
|
|
3785
|
+
* where higher contrast is needed against the background.
|
|
3786
|
+
*/
|
|
3787
|
+
stroke: [
|
|
3788
|
+
colors.primary[600],
|
|
3789
|
+
// #138575 deep teal
|
|
3790
|
+
colors.info[600],
|
|
3791
|
+
// #2563eb deep blue
|
|
3792
|
+
colors.neutral[500],
|
|
3793
|
+
// #71717a medium gray
|
|
3794
|
+
colors.warning[600],
|
|
3795
|
+
// #d97706 deep amber
|
|
3796
|
+
colors.success[600],
|
|
3797
|
+
// #16a34a deep green
|
|
3798
|
+
colors.error[500],
|
|
3799
|
+
// #ef4444 red
|
|
3800
|
+
colors.primary[700],
|
|
3801
|
+
// #146b5f dark teal
|
|
3802
|
+
colors.info[700]
|
|
3803
|
+
// #1d4ed8 dark blue
|
|
3804
|
+
],
|
|
3805
|
+
/** Semantic colors for status-based charts */
|
|
3806
|
+
semantic: {
|
|
3807
|
+
positive: colors.success[400],
|
|
3808
|
+
negative: colors.error[400],
|
|
3809
|
+
neutral: colors.neutral[400],
|
|
3810
|
+
warning: colors.warning[400],
|
|
3811
|
+
info: colors.info[400],
|
|
3812
|
+
primary: colors.primary[500]
|
|
3813
|
+
},
|
|
3814
|
+
/** Light fills for area/background (light mode) — very subtle */
|
|
3815
|
+
areaLight: [
|
|
3816
|
+
colors.primary[50],
|
|
3817
|
+
colors.info[50],
|
|
3818
|
+
colors.neutral[100],
|
|
3819
|
+
colors.warning[50],
|
|
3820
|
+
colors.success[50]
|
|
3821
|
+
],
|
|
3822
|
+
/** Dark fills for area/background (dark mode) */
|
|
3823
|
+
areaDark: [
|
|
3824
|
+
colors.primary[950],
|
|
3825
|
+
colors.info[950],
|
|
3826
|
+
colors.neutral[800],
|
|
3827
|
+
colors.warning[950],
|
|
3828
|
+
colors.success[950]
|
|
3829
|
+
],
|
|
3830
|
+
/** Grid and axis colors (use CSS variables for dark mode compatibility) */
|
|
3831
|
+
grid: {
|
|
3832
|
+
light: colors.neutral[200],
|
|
3833
|
+
dark: colors.neutral[700]
|
|
3834
|
+
},
|
|
3835
|
+
/** Text colors for labels and legends */
|
|
3836
|
+
text: {
|
|
3837
|
+
light: colors.neutral[500],
|
|
3838
|
+
dark: colors.neutral[400]
|
|
3839
|
+
}
|
|
3840
|
+
};
|
|
3675
3841
|
export {
|
|
3676
3842
|
ActiveFilters,
|
|
3677
3843
|
AppShell,
|
|
@@ -3695,6 +3861,7 @@ export {
|
|
|
3695
3861
|
CardFooter,
|
|
3696
3862
|
CardHeader,
|
|
3697
3863
|
CardTitle,
|
|
3864
|
+
ChartContainer,
|
|
3698
3865
|
Checkbox,
|
|
3699
3866
|
Combobox,
|
|
3700
3867
|
CommandPalette,
|
|
@@ -3782,6 +3949,7 @@ export {
|
|
|
3782
3949
|
Separator,
|
|
3783
3950
|
Skeleton,
|
|
3784
3951
|
Spinner,
|
|
3952
|
+
StatCard,
|
|
3785
3953
|
Switch,
|
|
3786
3954
|
Table,
|
|
3787
3955
|
TableBody,
|
|
@@ -3812,6 +3980,7 @@ export {
|
|
|
3812
3980
|
avatarVariants,
|
|
3813
3981
|
badgeVariants,
|
|
3814
3982
|
buttonVariants,
|
|
3983
|
+
chartColors,
|
|
3815
3984
|
cn,
|
|
3816
3985
|
createContext2 as createContext,
|
|
3817
3986
|
formLayoutVariants,
|