@polastack/design-system 0.1.7 → 0.1.9

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/index.d.ts CHANGED
@@ -687,43 +687,57 @@ declare const ChartContainer: React.ForwardRefExoticComponent<ChartContainerProp
687
687
 
688
688
  /**
689
689
  * Chart theme tokens for integrating charting libraries (Recharts, Chart.js, etc.)
690
- * with the Polastack design system color palette.
690
+ * with the Polastack design system.
691
+ *
692
+ * Design approach:
693
+ * - Categorical palette is hand-curated for perceptual balance (Tableau 10 methodology)
694
+ * - Colors are independent from UI semantic tokens (Primer / shadcn best practice)
695
+ * - Each categorical color has a 1:1 paired subtle variant for area fills (Primer emphasis/muted pattern)
696
+ * - Brand teal anchors position 0; remaining hues span the full wheel for maximum distinction
691
697
  *
692
698
  * Usage with Recharts:
693
- * <Bar fill={chartColors.series[0]} />
699
+ * <Bar fill={chartColors.categorical[0]} />
700
+ * <Area fill={chartColors.subtle[0]} stroke={chartColors.categorical[0]} />
694
701
  *
695
702
  * Usage with Chart.js:
696
- * datasets: [{ backgroundColor: chartColors.series }]
703
+ * datasets: [{ backgroundColor: chartColors.categorical }]
704
+ */
705
+ /**
706
+ * 8-color categorical palette — curated for data visualization.
707
+ *
708
+ * Principles:
709
+ * 1. Moderate saturation ("less Crayola bright") for professional look
710
+ * 2. Balanced perceived lightness across all 8 hues
711
+ * 3. Full hue-circle coverage for maximum distinguishability
712
+ * 4. Warm/cool alternation to aid colorblind accessibility
713
+ * 5. Brand teal as the anchor color at position 0
697
714
  */
698
- /** Ordered color series for chart data — distinct, accessible, brand-consistent. */
699
715
  declare const chartColors: {
700
- /** Primary data series palette (use in order for multi-series charts) */
701
- readonly series: readonly ["#1BA491", "#3b82f6", "#f59e0b", "#ef4444", "#22c55e", "#61ebd0", "#93c5fd", "#fcd34d"];
702
- /** Semantic colors for status-based charts */
716
+ /** Solid colors for bars, lines, dots, and legends */
717
+ readonly categorical: readonly ["#1BA491", "#4E79A7", "#E8A838", "#D4687A", "#7C6BB1", "#6BA368", "#5BA4CF", "#B07A53"];
718
+ /** Subtle tints — 1:1 paired with categorical for area fills and backgrounds */
719
+ readonly subtle: readonly ["#E6F7F4", "#E8EEF4", "#FDF3E0", "#FCEAED", "#EEEBF5", "#EAF3EA", "#E6F1F8", "#F4EDE6"];
720
+ /** Dark-mode subtle tints — 1:1 paired with categorical */
721
+ readonly subtleDark: readonly ["#0C2B26", "#1A2535", "#2C2312", "#2C1A1E", "#1E1A2C", "#1A2C1A", "#1A2535", "#2C2418"];
722
+ /** Semantic colors for status-meaning charts (P&L, health scores, etc.) */
703
723
  readonly semantic: {
704
- readonly positive: "#22c55e";
705
- readonly negative: "#ef4444";
706
- readonly neutral: "#a1a1aa";
707
- readonly warning: "#f59e0b";
708
- readonly info: "#3b82f6";
709
- readonly primary: "#1BA491";
724
+ readonly positive: "#1BA491";
725
+ readonly negative: "#D4687A";
726
+ readonly neutral: "#94939B";
727
+ readonly warning: "#E8A838";
710
728
  };
711
- /** Light fills for area/background (light mode) */
712
- readonly areaLight: readonly ["#cdfbf0", "#dbeafe", "#fef3c7", "#fee2e2", "#dcfce7"];
713
- /** Dark fills for area/background (dark mode) */
714
- readonly areaDark: readonly ["#134841", "#1e3a8a", "#78350f", "#7f1d1d", "#14532d"];
715
- /** Grid and axis colors (use CSS variables for dark mode compatibility) */
729
+ /** Grid lines and axis strokes */
716
730
  readonly grid: {
717
- readonly light: "#e4e4e7";
718
- readonly dark: "#3f3f46";
731
+ readonly light: "#E4E4E7";
732
+ readonly dark: "#3F3F46";
719
733
  };
720
- /** Text colors for labels and legends */
734
+ /** Text for tick labels, legends, and annotations */
721
735
  readonly text: {
722
- readonly light: "#71717a";
723
- readonly dark: "#a1a1aa";
736
+ readonly light: "#71717A";
737
+ readonly dark: "#A1A1AA";
724
738
  };
725
739
  };
726
- type ChartColorSeries = typeof chartColors.series;
740
+ type ChartCategoricalColors = typeof chartColors.categorical;
727
741
  type ChartSemanticColors = typeof chartColors.semantic;
728
742
 
729
- 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, 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 };
743
+ 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 ChartCategoricalColors, ChartContainer, type ChartContainerProps, type ChartSemanticColors, 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,7 +1,3 @@
1
- import {
2
- colors
3
- } from "./chunk-Q6XRSLLQ.js";
4
-
5
1
  // src/lib/cn.ts
6
2
  import { clsx } from "clsx";
7
3
  import { twMerge } from "tailwind-merge";
@@ -3757,59 +3753,83 @@ ChartContainer.displayName = "ChartContainer";
3757
3753
 
3758
3754
  // src/tokens/chart-theme.ts
3759
3755
  var chartColors = {
3760
- /** Primary data series palette (use in order for multi-series charts) */
3761
- series: [
3762
- colors.primary[500],
3763
- // #1BA491 teal
3764
- colors.info[500],
3765
- // #3b82f6 blue
3766
- colors.warning[500],
3767
- // #f59e0b amber
3768
- colors.error[500],
3769
- // #ef4444 red
3770
- colors.success[500],
3771
- // #22c55e green
3772
- colors.primary[300],
3773
- // #61ebd0 light teal
3774
- colors.info[300],
3775
- // #93c5fd light blue
3776
- colors.warning[300]
3777
- // #fcd34d light amber
3756
+ /** Solid colors for bars, lines, dots, and legends */
3757
+ categorical: [
3758
+ "#1BA491",
3759
+ // teal — brand anchor
3760
+ "#4E79A7",
3761
+ // slate — classic dataviz blue
3762
+ "#E8A838",
3763
+ // amber — warm gold
3764
+ "#D4687A",
3765
+ // rose — dusty pink-red
3766
+ "#7C6BB1",
3767
+ // violet — soft purple
3768
+ "#6BA368",
3769
+ // sage — muted green
3770
+ "#5BA4CF",
3771
+ // sky — lighter blue
3772
+ "#B07A53"
3773
+ // sienna — warm brown
3778
3774
  ],
3779
- /** Semantic colors for status-based charts */
3780
- semantic: {
3781
- positive: colors.success[500],
3782
- negative: colors.error[500],
3783
- neutral: colors.neutral[400],
3784
- warning: colors.warning[500],
3785
- info: colors.info[500],
3786
- primary: colors.primary[500]
3787
- },
3788
- /** Light fills for area/background (light mode) */
3789
- areaLight: [
3790
- colors.primary[100],
3791
- colors.info[100],
3792
- colors.warning[100],
3793
- colors.error[100],
3794
- colors.success[100]
3775
+ /** Subtle tints — 1:1 paired with categorical for area fills and backgrounds */
3776
+ subtle: [
3777
+ "#E6F7F4",
3778
+ // teal
3779
+ "#E8EEF4",
3780
+ // slate
3781
+ "#FDF3E0",
3782
+ // amber
3783
+ "#FCEAED",
3784
+ // rose
3785
+ "#EEEBF5",
3786
+ // violet
3787
+ "#EAF3EA",
3788
+ // sage
3789
+ "#E6F1F8",
3790
+ // sky
3791
+ "#F4EDE6"
3792
+ // sienna
3795
3793
  ],
3796
- /** Dark fills for area/background (dark mode) */
3797
- areaDark: [
3798
- colors.primary[900],
3799
- colors.info[900],
3800
- colors.warning[900],
3801
- colors.error[900],
3802
- colors.success[900]
3794
+ /** Dark-mode subtle tints 1:1 paired with categorical */
3795
+ subtleDark: [
3796
+ "#0C2B26",
3797
+ // teal
3798
+ "#1A2535",
3799
+ // slate
3800
+ "#2C2312",
3801
+ // amber
3802
+ "#2C1A1E",
3803
+ // rose
3804
+ "#1E1A2C",
3805
+ // violet
3806
+ "#1A2C1A",
3807
+ // sage
3808
+ "#1A2535",
3809
+ // sky
3810
+ "#2C2418"
3811
+ // sienna
3803
3812
  ],
3804
- /** Grid and axis colors (use CSS variables for dark mode compatibility) */
3813
+ /** Semantic colors for status-meaning charts (P&L, health scores, etc.) */
3814
+ semantic: {
3815
+ positive: "#1BA491",
3816
+ negative: "#D4687A",
3817
+ neutral: "#94939B",
3818
+ warning: "#E8A838"
3819
+ },
3820
+ /** Grid lines and axis strokes */
3805
3821
  grid: {
3806
- light: colors.neutral[200],
3807
- dark: colors.neutral[700]
3822
+ light: "#E4E4E7",
3823
+ // neutral-200
3824
+ dark: "#3F3F46"
3825
+ // neutral-700
3808
3826
  },
3809
- /** Text colors for labels and legends */
3827
+ /** Text for tick labels, legends, and annotations */
3810
3828
  text: {
3811
- light: colors.neutral[500],
3812
- dark: colors.neutral[400]
3829
+ light: "#71717A",
3830
+ // neutral-500
3831
+ dark: "#A1A1AA"
3832
+ // neutral-400
3813
3833
  }
3814
3834
  };
3815
3835
  export {