@polastack/design-system 0.1.8 → 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 -35
- package/dist/index.js +70 -76
- 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,53 +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
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
readonly
|
|
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 */
|
|
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.) */
|
|
712
723
|
readonly semantic: {
|
|
713
|
-
readonly positive: "#
|
|
714
|
-
readonly negative: "#
|
|
715
|
-
readonly neutral: "#
|
|
716
|
-
readonly warning: "#
|
|
717
|
-
readonly info: "#60a5fa";
|
|
718
|
-
readonly primary: "#1BA491";
|
|
724
|
+
readonly positive: "#1BA491";
|
|
725
|
+
readonly negative: "#D4687A";
|
|
726
|
+
readonly neutral: "#94939B";
|
|
727
|
+
readonly warning: "#E8A838";
|
|
719
728
|
};
|
|
720
|
-
/**
|
|
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) */
|
|
729
|
+
/** Grid lines and axis strokes */
|
|
725
730
|
readonly grid: {
|
|
726
|
-
readonly light: "#
|
|
727
|
-
readonly dark: "#
|
|
731
|
+
readonly light: "#E4E4E7";
|
|
732
|
+
readonly dark: "#3F3F46";
|
|
728
733
|
};
|
|
729
|
-
/** Text
|
|
734
|
+
/** Text for tick labels, legends, and annotations */
|
|
730
735
|
readonly text: {
|
|
731
|
-
readonly light: "#
|
|
732
|
-
readonly dark: "#
|
|
736
|
+
readonly light: "#71717A";
|
|
737
|
+
readonly dark: "#A1A1AA";
|
|
733
738
|
};
|
|
734
739
|
};
|
|
735
|
-
type
|
|
736
|
-
type ChartStrokeColors = typeof chartColors.stroke;
|
|
740
|
+
type ChartCategoricalColors = typeof chartColors.categorical;
|
|
737
741
|
type ChartSemanticColors = typeof chartColors.semantic;
|
|
738
742
|
|
|
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
|
|
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,85 +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
|
-
//
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
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
|
|
3774
|
+
],
|
|
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
|
|
3782
3793
|
],
|
|
3783
|
-
/**
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
// #146b5f dark teal
|
|
3802
|
-
colors.info[700]
|
|
3803
|
-
// #1d4ed8 dark blue
|
|
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
|
|
3804
3812
|
],
|
|
3805
|
-
/** Semantic colors for status-
|
|
3813
|
+
/** Semantic colors for status-meaning charts (P&L, health scores, etc.) */
|
|
3806
3814
|
semantic: {
|
|
3807
|
-
positive:
|
|
3808
|
-
negative:
|
|
3809
|
-
neutral:
|
|
3810
|
-
warning:
|
|
3811
|
-
info: colors.info[400],
|
|
3812
|
-
primary: colors.primary[500]
|
|
3815
|
+
positive: "#1BA491",
|
|
3816
|
+
negative: "#D4687A",
|
|
3817
|
+
neutral: "#94939B",
|
|
3818
|
+
warning: "#E8A838"
|
|
3813
3819
|
},
|
|
3814
|
-
/**
|
|
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) */
|
|
3820
|
+
/** Grid lines and axis strokes */
|
|
3831
3821
|
grid: {
|
|
3832
|
-
light:
|
|
3833
|
-
|
|
3822
|
+
light: "#E4E4E7",
|
|
3823
|
+
// neutral-200
|
|
3824
|
+
dark: "#3F3F46"
|
|
3825
|
+
// neutral-700
|
|
3834
3826
|
},
|
|
3835
|
-
/** Text
|
|
3827
|
+
/** Text for tick labels, legends, and annotations */
|
|
3836
3828
|
text: {
|
|
3837
|
-
light:
|
|
3838
|
-
|
|
3829
|
+
light: "#71717A",
|
|
3830
|
+
// neutral-500
|
|
3831
|
+
dark: "#A1A1AA"
|
|
3832
|
+
// neutral-400
|
|
3839
3833
|
}
|
|
3840
3834
|
};
|
|
3841
3835
|
export {
|