@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 +39 -25
- package/dist/index.js +71 -51
- package/dist/index.js.map +1 -1
- package/dist/tokens/index.js +81 -3
- package/dist/tokens/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-Q6XRSLLQ.js +0 -86
- package/dist/chunk-Q6XRSLLQ.js.map +0 -1
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
|
|
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.
|
|
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.
|
|
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
|
-
/**
|
|
701
|
-
readonly
|
|
702
|
-
/**
|
|
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: "#
|
|
705
|
-
readonly negative: "#
|
|
706
|
-
readonly neutral: "#
|
|
707
|
-
readonly warning: "#
|
|
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
|
-
/**
|
|
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: "#
|
|
718
|
-
readonly dark: "#
|
|
731
|
+
readonly light: "#E4E4E7";
|
|
732
|
+
readonly dark: "#3F3F46";
|
|
719
733
|
};
|
|
720
|
-
/** Text
|
|
734
|
+
/** Text for tick labels, legends, and annotations */
|
|
721
735
|
readonly text: {
|
|
722
|
-
readonly light: "#
|
|
723
|
-
readonly dark: "#
|
|
736
|
+
readonly light: "#71717A";
|
|
737
|
+
readonly dark: "#A1A1AA";
|
|
724
738
|
};
|
|
725
739
|
};
|
|
726
|
-
type
|
|
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
|
|
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
|
-
/**
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
//
|
|
3764
|
-
|
|
3765
|
-
//
|
|
3766
|
-
|
|
3767
|
-
//
|
|
3768
|
-
|
|
3769
|
-
//
|
|
3770
|
-
|
|
3771
|
-
//
|
|
3772
|
-
|
|
3773
|
-
//
|
|
3774
|
-
|
|
3775
|
-
//
|
|
3776
|
-
|
|
3777
|
-
//
|
|
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
|
-
/**
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
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
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
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
|
-
/**
|
|
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:
|
|
3807
|
-
|
|
3822
|
+
light: "#E4E4E7",
|
|
3823
|
+
// neutral-200
|
|
3824
|
+
dark: "#3F3F46"
|
|
3825
|
+
// neutral-700
|
|
3808
3826
|
},
|
|
3809
|
-
/** Text
|
|
3827
|
+
/** Text for tick labels, legends, and annotations */
|
|
3810
3828
|
text: {
|
|
3811
|
-
light:
|
|
3812
|
-
|
|
3829
|
+
light: "#71717A",
|
|
3830
|
+
// neutral-500
|
|
3831
|
+
dark: "#A1A1AA"
|
|
3832
|
+
// neutral-400
|
|
3813
3833
|
}
|
|
3814
3834
|
};
|
|
3815
3835
|
export {
|