@polastack/design-system 0.1.27 → 0.1.28
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 +18 -1
- package/dist/index.js +198 -113
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/styles/base.css +10 -0
- package/src/styles/tokens.css +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -666,6 +666,23 @@ declare const AppShellHeader: React.ForwardRefExoticComponent<React.HTMLAttribut
|
|
|
666
666
|
declare const AppShellContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
667
667
|
declare const AppShellFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
668
668
|
|
|
669
|
+
declare const SidebarNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
670
|
+
interface SidebarNavGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
671
|
+
title: string;
|
|
672
|
+
defaultOpen?: boolean;
|
|
673
|
+
open?: boolean;
|
|
674
|
+
onOpenChange?: (open: boolean) => void;
|
|
675
|
+
icon?: React.ReactNode;
|
|
676
|
+
}
|
|
677
|
+
declare const SidebarNavGroup: React.ForwardRefExoticComponent<SidebarNavGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
678
|
+
interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
679
|
+
icon?: React.ReactNode;
|
|
680
|
+
active?: boolean;
|
|
681
|
+
badge?: React.ReactNode;
|
|
682
|
+
href?: string;
|
|
683
|
+
}
|
|
684
|
+
declare const SidebarNavItem: React.ForwardRefExoticComponent<SidebarNavItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
685
|
+
|
|
669
686
|
interface BottomNavigationProps extends React.HTMLAttributes<HTMLElement> {
|
|
670
687
|
}
|
|
671
688
|
declare const BottomNavigation: React.ForwardRefExoticComponent<BottomNavigationProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -904,4 +921,4 @@ interface ChartLegendProps {
|
|
|
904
921
|
}
|
|
905
922
|
declare const ChartLegend: React.FC<ChartLegendProps>;
|
|
906
923
|
|
|
907
|
-
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, ChartLegend, type ChartLegendProps, type ChartSemanticColors, ChartTooltip, type ChartTooltipProps, 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, PrintDivider, type PrintDividerProps, PrintDocument, type PrintDocumentProps, PrintField, PrintFieldGroup, type PrintFieldGroupProps, type PrintFieldProps, PrintFooter, type PrintFooterProps, PrintHeader, type PrintHeaderProps, PrintTable, PrintTableBody, type PrintTableBodyProps, PrintTableCell, type PrintTableCellProps, PrintTableFooter, type PrintTableFooterProps, PrintTableHead, type PrintTableHeadProps, PrintTableHeader, type PrintTableHeaderProps, type PrintTableProps, PrintTableRow, type PrintTableRowProps, Progress, type ProgressProps, 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, type StepItem, type StepStatus, Stepper, type StepperConnector, type StepperProps, 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, getChartColors, getChartSubtleColors, getChartTheme, getFieldComponent, inputVariants, printDocumentVariants, printFieldGroupVariants, progressVariants, spinnerVariants, stepIndicatorVariants, switchVariants, textareaVariants, toast, toastVariants, useAppShell, useBreakpoint, useDisplayMode, useFormField, useInstallPrompt, useOnlineStatus, useTheme$1 as useTheme, useTheme as useThemeContext, useToast, useViewportHeight };
|
|
924
|
+
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, ChartLegend, type ChartLegendProps, type ChartSemanticColors, ChartTooltip, type ChartTooltipProps, 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, PrintDivider, type PrintDividerProps, PrintDocument, type PrintDocumentProps, PrintField, PrintFieldGroup, type PrintFieldGroupProps, type PrintFieldProps, PrintFooter, type PrintFooterProps, PrintHeader, type PrintHeaderProps, PrintTable, PrintTableBody, type PrintTableBodyProps, PrintTableCell, type PrintTableCellProps, PrintTableFooter, type PrintTableFooterProps, PrintTableHead, type PrintTableHeadProps, PrintTableHeader, type PrintTableHeaderProps, type PrintTableProps, PrintTableRow, type PrintTableRowProps, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResolvedTheme, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, SidebarNav, SidebarNavGroup, type SidebarNavGroupProps, SidebarNavItem, type SidebarNavItemProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, StatCard, type StatCardProps, type StepItem, type StepStatus, Stepper, type StepperConnector, type StepperProps, 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, getChartColors, getChartSubtleColors, getChartTheme, getFieldComponent, inputVariants, printDocumentVariants, printFieldGroupVariants, progressVariants, spinnerVariants, stepIndicatorVariants, switchVariants, textareaVariants, toast, toastVariants, useAppShell, useBreakpoint, useDisplayMode, useFormField, useInstallPrompt, useOnlineStatus, useTheme$1 as useTheme, useTheme as useThemeContext, useToast, useViewportHeight };
|
package/dist/index.js
CHANGED
|
@@ -3687,10 +3687,92 @@ var AppShellFooter = React39.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3687
3687
|
));
|
|
3688
3688
|
AppShellFooter.displayName = "AppShellFooter";
|
|
3689
3689
|
|
|
3690
|
-
// src/components/
|
|
3690
|
+
// src/components/sidebar-nav/sidebar-nav.tsx
|
|
3691
3691
|
import * as React40 from "react";
|
|
3692
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
3693
|
+
import { ChevronDown as ChevronDown4 } from "lucide-react";
|
|
3692
3694
|
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3693
|
-
var
|
|
3695
|
+
var SidebarNav = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
3696
|
+
"nav",
|
|
3697
|
+
{
|
|
3698
|
+
ref,
|
|
3699
|
+
className: cn("flex flex-col gap-1 px-3", className),
|
|
3700
|
+
...props
|
|
3701
|
+
}
|
|
3702
|
+
));
|
|
3703
|
+
SidebarNav.displayName = "SidebarNav";
|
|
3704
|
+
var SidebarNavGroup = React40.forwardRef(
|
|
3705
|
+
({
|
|
3706
|
+
className,
|
|
3707
|
+
title,
|
|
3708
|
+
defaultOpen = true,
|
|
3709
|
+
open: controlledOpen,
|
|
3710
|
+
onOpenChange,
|
|
3711
|
+
icon,
|
|
3712
|
+
children,
|
|
3713
|
+
...props
|
|
3714
|
+
}, ref) => {
|
|
3715
|
+
return /* @__PURE__ */ jsxs22(
|
|
3716
|
+
CollapsiblePrimitive.Root,
|
|
3717
|
+
{
|
|
3718
|
+
ref,
|
|
3719
|
+
defaultOpen,
|
|
3720
|
+
open: controlledOpen,
|
|
3721
|
+
onOpenChange,
|
|
3722
|
+
className: cn("flex flex-col", className),
|
|
3723
|
+
...props,
|
|
3724
|
+
children: [
|
|
3725
|
+
/* @__PURE__ */ jsxs22(CollapsiblePrimitive.Trigger, { className: "group flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--color-on-surface-muted)] transition-colors hover:text-[var(--color-on-surface-secondary)] hover:bg-[var(--color-surface-muted)]", children: [
|
|
3726
|
+
icon && /* @__PURE__ */ jsx42("span", { className: "shrink-0 opacity-70", children: icon }),
|
|
3727
|
+
/* @__PURE__ */ jsx42("span", { className: "flex-1 text-left", children: title }),
|
|
3728
|
+
/* @__PURE__ */ jsx42(
|
|
3729
|
+
ChevronDown4,
|
|
3730
|
+
{
|
|
3731
|
+
className: "h-3.5 w-3.5 shrink-0 opacity-60 transition-transform duration-normal group-data-[state=closed]:-rotate-90"
|
|
3732
|
+
}
|
|
3733
|
+
)
|
|
3734
|
+
] }),
|
|
3735
|
+
/* @__PURE__ */ jsx42(CollapsiblePrimitive.Content, { className: "overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up", children: /* @__PURE__ */ jsx42("div", { className: "flex flex-col gap-0.5 pt-0.5", children }) })
|
|
3736
|
+
]
|
|
3737
|
+
}
|
|
3738
|
+
);
|
|
3739
|
+
}
|
|
3740
|
+
);
|
|
3741
|
+
SidebarNavGroup.displayName = "SidebarNavGroup";
|
|
3742
|
+
var SidebarNavItem = React40.forwardRef(({ className, icon, active = false, badge, children, ...props }, ref) => /* @__PURE__ */ jsxs22(
|
|
3743
|
+
"button",
|
|
3744
|
+
{
|
|
3745
|
+
ref,
|
|
3746
|
+
type: "button",
|
|
3747
|
+
className: cn(
|
|
3748
|
+
"flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm transition-colors",
|
|
3749
|
+
active ? "bg-[var(--color-surface-accent)] text-[var(--color-on-surface-accent)] font-medium" : "text-[var(--color-on-surface-secondary)] hover:bg-[var(--color-surface-muted)] hover:text-[var(--color-on-surface)]",
|
|
3750
|
+
className
|
|
3751
|
+
),
|
|
3752
|
+
"aria-current": active ? "page" : void 0,
|
|
3753
|
+
...props,
|
|
3754
|
+
children: [
|
|
3755
|
+
icon && /* @__PURE__ */ jsx42("span", { className: cn("shrink-0", active ? "opacity-100" : "opacity-70"), children: icon }),
|
|
3756
|
+
/* @__PURE__ */ jsx42("span", { className: "flex-1 text-left truncate", children }),
|
|
3757
|
+
badge && /* @__PURE__ */ jsx42(
|
|
3758
|
+
"span",
|
|
3759
|
+
{
|
|
3760
|
+
className: cn(
|
|
3761
|
+
"min-w-[20px] rounded-full px-1.5 py-0.5 text-center text-xs font-medium",
|
|
3762
|
+
active ? "bg-[var(--color-primary-100)] text-[var(--color-primary-700)] dark:bg-[var(--color-primary-950)] dark:text-[var(--color-primary-300)]" : "bg-[var(--color-surface-sunken)] text-[var(--color-on-surface-muted)]"
|
|
3763
|
+
),
|
|
3764
|
+
children: badge
|
|
3765
|
+
}
|
|
3766
|
+
)
|
|
3767
|
+
]
|
|
3768
|
+
}
|
|
3769
|
+
));
|
|
3770
|
+
SidebarNavItem.displayName = "SidebarNavItem";
|
|
3771
|
+
|
|
3772
|
+
// src/components/bottom-navigation/bottom-navigation.tsx
|
|
3773
|
+
import * as React41 from "react";
|
|
3774
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3775
|
+
var BottomNavigation = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
3694
3776
|
"nav",
|
|
3695
3777
|
{
|
|
3696
3778
|
ref,
|
|
@@ -3703,7 +3785,7 @@ var BottomNavigation = React40.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3703
3785
|
}
|
|
3704
3786
|
));
|
|
3705
3787
|
BottomNavigation.displayName = "BottomNavigation";
|
|
3706
|
-
var BottomNavigationItem =
|
|
3788
|
+
var BottomNavigationItem = React41.forwardRef(({ className, icon, label, active = false, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
3707
3789
|
"button",
|
|
3708
3790
|
{
|
|
3709
3791
|
ref,
|
|
@@ -3715,18 +3797,18 @@ var BottomNavigationItem = React40.forwardRef(({ className, icon, label, active
|
|
|
3715
3797
|
"aria-current": active ? "page" : void 0,
|
|
3716
3798
|
...props,
|
|
3717
3799
|
children: [
|
|
3718
|
-
/* @__PURE__ */
|
|
3719
|
-
/* @__PURE__ */
|
|
3800
|
+
/* @__PURE__ */ jsx43("span", { className: "flex h-6 w-6 items-center justify-center", children: icon }),
|
|
3801
|
+
/* @__PURE__ */ jsx43("span", { children: label })
|
|
3720
3802
|
]
|
|
3721
3803
|
}
|
|
3722
3804
|
));
|
|
3723
3805
|
BottomNavigationItem.displayName = "BottomNavigationItem";
|
|
3724
3806
|
|
|
3725
3807
|
// src/components/offline-indicator/offline-indicator.tsx
|
|
3726
|
-
import * as
|
|
3808
|
+
import * as React42 from "react";
|
|
3727
3809
|
import { WifiOff } from "lucide-react";
|
|
3728
|
-
import { jsx as
|
|
3729
|
-
var OfflineIndicator =
|
|
3810
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3811
|
+
var OfflineIndicator = React42.forwardRef(
|
|
3730
3812
|
({
|
|
3731
3813
|
className,
|
|
3732
3814
|
isOffline,
|
|
@@ -3734,7 +3816,7 @@ var OfflineIndicator = React41.forwardRef(
|
|
|
3734
3816
|
...props
|
|
3735
3817
|
}, ref) => {
|
|
3736
3818
|
if (!isOffline) return null;
|
|
3737
|
-
return /* @__PURE__ */
|
|
3819
|
+
return /* @__PURE__ */ jsxs24(
|
|
3738
3820
|
"div",
|
|
3739
3821
|
{
|
|
3740
3822
|
ref,
|
|
@@ -3745,7 +3827,7 @@ var OfflineIndicator = React41.forwardRef(
|
|
|
3745
3827
|
),
|
|
3746
3828
|
...props,
|
|
3747
3829
|
children: [
|
|
3748
|
-
/* @__PURE__ */
|
|
3830
|
+
/* @__PURE__ */ jsx44(WifiOff, { className: "mr-2 h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }),
|
|
3749
3831
|
message
|
|
3750
3832
|
]
|
|
3751
3833
|
}
|
|
@@ -3755,9 +3837,9 @@ var OfflineIndicator = React41.forwardRef(
|
|
|
3755
3837
|
OfflineIndicator.displayName = "OfflineIndicator";
|
|
3756
3838
|
|
|
3757
3839
|
// src/components/install-prompt/install-prompt.tsx
|
|
3758
|
-
import * as
|
|
3759
|
-
import { jsx as
|
|
3760
|
-
var InstallPrompt =
|
|
3840
|
+
import * as React43 from "react";
|
|
3841
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3842
|
+
var InstallPrompt = React43.forwardRef(
|
|
3761
3843
|
({
|
|
3762
3844
|
className,
|
|
3763
3845
|
canInstall,
|
|
@@ -3770,7 +3852,7 @@ var InstallPrompt = React42.forwardRef(
|
|
|
3770
3852
|
...props
|
|
3771
3853
|
}, ref) => {
|
|
3772
3854
|
if (!canInstall) return null;
|
|
3773
|
-
return /* @__PURE__ */
|
|
3855
|
+
return /* @__PURE__ */ jsx45(
|
|
3774
3856
|
"div",
|
|
3775
3857
|
{
|
|
3776
3858
|
ref,
|
|
@@ -3781,12 +3863,12 @@ var InstallPrompt = React42.forwardRef(
|
|
|
3781
3863
|
className
|
|
3782
3864
|
),
|
|
3783
3865
|
...props,
|
|
3784
|
-
children: /* @__PURE__ */
|
|
3785
|
-
/* @__PURE__ */
|
|
3786
|
-
/* @__PURE__ */
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
/* @__PURE__ */
|
|
3789
|
-
/* @__PURE__ */
|
|
3866
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "mx-auto max-w-md", children: [
|
|
3867
|
+
/* @__PURE__ */ jsx45("p", { className: "text-sm font-semibold text-[var(--color-on-surface)]", children: title }),
|
|
3868
|
+
/* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description }),
|
|
3869
|
+
/* @__PURE__ */ jsxs25("div", { className: "mt-3 flex gap-2", children: [
|
|
3870
|
+
/* @__PURE__ */ jsx45(Button, { size: "sm", onClick: onInstall, className: "flex-1", children: installLabel }),
|
|
3871
|
+
/* @__PURE__ */ jsx45(
|
|
3790
3872
|
Button,
|
|
3791
3873
|
{
|
|
3792
3874
|
size: "sm",
|
|
@@ -3805,17 +3887,17 @@ var InstallPrompt = React42.forwardRef(
|
|
|
3805
3887
|
InstallPrompt.displayName = "InstallPrompt";
|
|
3806
3888
|
|
|
3807
3889
|
// src/components/pull-to-refresh/pull-to-refresh.tsx
|
|
3808
|
-
import * as
|
|
3890
|
+
import * as React44 from "react";
|
|
3809
3891
|
import { ArrowDown } from "lucide-react";
|
|
3810
|
-
import { jsx as
|
|
3811
|
-
var PullToRefresh =
|
|
3892
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3893
|
+
var PullToRefresh = React44.forwardRef(
|
|
3812
3894
|
({ className, onRefresh, threshold = 80, disabled = false, children, ...props }, ref) => {
|
|
3813
|
-
const [pullDistance, setPullDistance] =
|
|
3814
|
-
const [isRefreshing, setIsRefreshing] =
|
|
3815
|
-
const startYRef =
|
|
3816
|
-
const containerRef =
|
|
3817
|
-
|
|
3818
|
-
const handleTouchStart =
|
|
3895
|
+
const [pullDistance, setPullDistance] = React44.useState(0);
|
|
3896
|
+
const [isRefreshing, setIsRefreshing] = React44.useState(false);
|
|
3897
|
+
const startYRef = React44.useRef(0);
|
|
3898
|
+
const containerRef = React44.useRef(null);
|
|
3899
|
+
React44.useImperativeHandle(ref, () => containerRef.current);
|
|
3900
|
+
const handleTouchStart = React44.useCallback(
|
|
3819
3901
|
(e) => {
|
|
3820
3902
|
if (disabled || isRefreshing) return;
|
|
3821
3903
|
const container = containerRef.current;
|
|
@@ -3825,7 +3907,7 @@ var PullToRefresh = React43.forwardRef(
|
|
|
3825
3907
|
},
|
|
3826
3908
|
[disabled, isRefreshing]
|
|
3827
3909
|
);
|
|
3828
|
-
const handleTouchMove =
|
|
3910
|
+
const handleTouchMove = React44.useCallback(
|
|
3829
3911
|
(e) => {
|
|
3830
3912
|
if (disabled || isRefreshing || startYRef.current === 0) return;
|
|
3831
3913
|
const distance = Math.max(
|
|
@@ -3838,7 +3920,7 @@ var PullToRefresh = React43.forwardRef(
|
|
|
3838
3920
|
},
|
|
3839
3921
|
[disabled, isRefreshing, threshold]
|
|
3840
3922
|
);
|
|
3841
|
-
const handleTouchEnd =
|
|
3923
|
+
const handleTouchEnd = React44.useCallback(async () => {
|
|
3842
3924
|
if (disabled || isRefreshing) return;
|
|
3843
3925
|
if (pullDistance >= threshold) {
|
|
3844
3926
|
setIsRefreshing(true);
|
|
@@ -3853,7 +3935,7 @@ var PullToRefresh = React43.forwardRef(
|
|
|
3853
3935
|
}, [disabled, isRefreshing, pullDistance, threshold, onRefresh]);
|
|
3854
3936
|
const indicatorOpacity = Math.min(pullDistance / threshold, 1);
|
|
3855
3937
|
const shouldTrigger = pullDistance >= threshold;
|
|
3856
|
-
return /* @__PURE__ */
|
|
3938
|
+
return /* @__PURE__ */ jsxs26(
|
|
3857
3939
|
"div",
|
|
3858
3940
|
{
|
|
3859
3941
|
ref: containerRef,
|
|
@@ -3863,18 +3945,18 @@ var PullToRefresh = React43.forwardRef(
|
|
|
3863
3945
|
onTouchEnd: handleTouchEnd,
|
|
3864
3946
|
...props,
|
|
3865
3947
|
children: [
|
|
3866
|
-
/* @__PURE__ */
|
|
3948
|
+
/* @__PURE__ */ jsx46(
|
|
3867
3949
|
"div",
|
|
3868
3950
|
{
|
|
3869
3951
|
className: "flex items-center justify-center overflow-hidden transition-[height] duration-normal",
|
|
3870
3952
|
style: { height: isRefreshing ? threshold * 0.6 : pullDistance },
|
|
3871
3953
|
"aria-hidden": "true",
|
|
3872
|
-
children: /* @__PURE__ */
|
|
3954
|
+
children: /* @__PURE__ */ jsx46(
|
|
3873
3955
|
"div",
|
|
3874
3956
|
{
|
|
3875
3957
|
className: "transition-opacity",
|
|
3876
3958
|
style: { opacity: isRefreshing ? 1 : indicatorOpacity },
|
|
3877
|
-
children: isRefreshing ? /* @__PURE__ */
|
|
3959
|
+
children: isRefreshing ? /* @__PURE__ */ jsx46(Spinner, { size: "sm" }) : /* @__PURE__ */ jsx46(
|
|
3878
3960
|
ArrowDown,
|
|
3879
3961
|
{
|
|
3880
3962
|
className: cn(
|
|
@@ -3896,9 +3978,9 @@ var PullToRefresh = React43.forwardRef(
|
|
|
3896
3978
|
PullToRefresh.displayName = "PullToRefresh";
|
|
3897
3979
|
|
|
3898
3980
|
// src/components/print/print-document.tsx
|
|
3899
|
-
import * as
|
|
3981
|
+
import * as React45 from "react";
|
|
3900
3982
|
import { cva as cva17 } from "class-variance-authority";
|
|
3901
|
-
import { jsx as
|
|
3983
|
+
import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3902
3984
|
var printDocumentVariants = cva17(
|
|
3903
3985
|
[
|
|
3904
3986
|
"bg-white text-neutral-900",
|
|
@@ -3927,8 +4009,8 @@ var printDocumentVariants = cva17(
|
|
|
3927
4009
|
}
|
|
3928
4010
|
}
|
|
3929
4011
|
);
|
|
3930
|
-
var PrintDocument =
|
|
3931
|
-
({ className, size, orientation, padding = "20mm", style, children, ...props }, ref) => /* @__PURE__ */
|
|
4012
|
+
var PrintDocument = React45.forwardRef(
|
|
4013
|
+
({ className, size, orientation, padding = "20mm", style, children, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3932
4014
|
"div",
|
|
3933
4015
|
{
|
|
3934
4016
|
ref,
|
|
@@ -3947,25 +4029,25 @@ var PrintDocument = React44.forwardRef(
|
|
|
3947
4029
|
)
|
|
3948
4030
|
);
|
|
3949
4031
|
PrintDocument.displayName = "PrintDocument";
|
|
3950
|
-
var PrintHeader =
|
|
3951
|
-
({ className, logo, title, subtitle, meta, children, ...props }, ref) => /* @__PURE__ */
|
|
3952
|
-
/* @__PURE__ */
|
|
3953
|
-
/* @__PURE__ */
|
|
3954
|
-
/* @__PURE__ */
|
|
3955
|
-
logo && /* @__PURE__ */
|
|
3956
|
-
/* @__PURE__ */
|
|
3957
|
-
title && /* @__PURE__ */
|
|
3958
|
-
subtitle && /* @__PURE__ */
|
|
4032
|
+
var PrintHeader = React45.forwardRef(
|
|
4033
|
+
({ className, logo, title, subtitle, meta, children, ...props }, ref) => /* @__PURE__ */ jsxs27("div", { ref, className: cn("mb-6", className), ...props, children: [
|
|
4034
|
+
/* @__PURE__ */ jsx47("div", { className: "h-1 bg-primary-400 rounded-full mb-5" }),
|
|
4035
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-start justify-between pb-4 border-b border-neutral-200", children: [
|
|
4036
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-3", children: [
|
|
4037
|
+
logo && /* @__PURE__ */ jsx47("div", { className: "shrink-0", children: logo }),
|
|
4038
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
4039
|
+
title && /* @__PURE__ */ jsx47("h1", { className: "text-2xl font-bold text-neutral-900 leading-tight", children: title }),
|
|
4040
|
+
subtitle && /* @__PURE__ */ jsx47("p", { className: "text-[8pt] font-medium tracking-widest uppercase text-neutral-400 mt-0.5", children: subtitle })
|
|
3959
4041
|
] })
|
|
3960
4042
|
] }),
|
|
3961
|
-
meta && /* @__PURE__ */
|
|
4043
|
+
meta && /* @__PURE__ */ jsx47("div", { className: "text-right text-[9pt] text-neutral-600 leading-relaxed", children: meta }),
|
|
3962
4044
|
children
|
|
3963
4045
|
] })
|
|
3964
4046
|
] })
|
|
3965
4047
|
);
|
|
3966
4048
|
PrintHeader.displayName = "PrintHeader";
|
|
3967
|
-
var PrintFooter =
|
|
3968
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
4049
|
+
var PrintFooter = React45.forwardRef(
|
|
4050
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3969
4051
|
"div",
|
|
3970
4052
|
{
|
|
3971
4053
|
ref,
|
|
@@ -3978,10 +4060,10 @@ var PrintFooter = React44.forwardRef(
|
|
|
3978
4060
|
PrintFooter.displayName = "PrintFooter";
|
|
3979
4061
|
|
|
3980
4062
|
// src/components/print/print-table.tsx
|
|
3981
|
-
import * as
|
|
3982
|
-
import { jsx as
|
|
3983
|
-
var PrintTable =
|
|
3984
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4063
|
+
import * as React46 from "react";
|
|
4064
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
4065
|
+
var PrintTable = React46.forwardRef(
|
|
4066
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
3985
4067
|
"table",
|
|
3986
4068
|
{
|
|
3987
4069
|
ref,
|
|
@@ -3991,20 +4073,20 @@ var PrintTable = React45.forwardRef(
|
|
|
3991
4073
|
)
|
|
3992
4074
|
);
|
|
3993
4075
|
PrintTable.displayName = "PrintTable";
|
|
3994
|
-
var PrintTableHeader =
|
|
3995
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4076
|
+
var PrintTableHeader = React46.forwardRef(
|
|
4077
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("thead", { ref, className: cn("", className), ...props })
|
|
3996
4078
|
);
|
|
3997
4079
|
PrintTableHeader.displayName = "PrintTableHeader";
|
|
3998
|
-
var PrintTableBody =
|
|
3999
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4080
|
+
var PrintTableBody = React46.forwardRef(
|
|
4081
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("tbody", { ref, className: cn("", className), ...props })
|
|
4000
4082
|
);
|
|
4001
4083
|
PrintTableBody.displayName = "PrintTableBody";
|
|
4002
|
-
var PrintTableFooter =
|
|
4003
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4084
|
+
var PrintTableFooter = React46.forwardRef(
|
|
4085
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("tfoot", { ref, className: cn("", className), ...props })
|
|
4004
4086
|
);
|
|
4005
4087
|
PrintTableFooter.displayName = "PrintTableFooter";
|
|
4006
|
-
var PrintTableRow =
|
|
4007
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4088
|
+
var PrintTableRow = React46.forwardRef(
|
|
4089
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
4008
4090
|
"tr",
|
|
4009
4091
|
{
|
|
4010
4092
|
ref,
|
|
@@ -4014,8 +4096,8 @@ var PrintTableRow = React45.forwardRef(
|
|
|
4014
4096
|
)
|
|
4015
4097
|
);
|
|
4016
4098
|
PrintTableRow.displayName = "PrintTableRow";
|
|
4017
|
-
var PrintTableHead =
|
|
4018
|
-
({ className, align = "left", ...props }, ref) => /* @__PURE__ */
|
|
4099
|
+
var PrintTableHead = React46.forwardRef(
|
|
4100
|
+
({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
4019
4101
|
"th",
|
|
4020
4102
|
{
|
|
4021
4103
|
ref,
|
|
@@ -4031,8 +4113,8 @@ var PrintTableHead = React45.forwardRef(
|
|
|
4031
4113
|
)
|
|
4032
4114
|
);
|
|
4033
4115
|
PrintTableHead.displayName = "PrintTableHead";
|
|
4034
|
-
var PrintTableCell =
|
|
4035
|
-
({ className, align = "left", ...props }, ref) => /* @__PURE__ */
|
|
4116
|
+
var PrintTableCell = React46.forwardRef(
|
|
4117
|
+
({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
4036
4118
|
"td",
|
|
4037
4119
|
{
|
|
4038
4120
|
ref,
|
|
@@ -4050,13 +4132,13 @@ var PrintTableCell = React45.forwardRef(
|
|
|
4050
4132
|
PrintTableCell.displayName = "PrintTableCell";
|
|
4051
4133
|
|
|
4052
4134
|
// src/components/print/print-field.tsx
|
|
4053
|
-
import * as
|
|
4135
|
+
import * as React47 from "react";
|
|
4054
4136
|
import { cva as cva18 } from "class-variance-authority";
|
|
4055
|
-
import { jsx as
|
|
4056
|
-
var PrintField =
|
|
4057
|
-
({ className, label, value, children, ...props }, ref) => /* @__PURE__ */
|
|
4058
|
-
/* @__PURE__ */
|
|
4059
|
-
/* @__PURE__ */
|
|
4137
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4138
|
+
var PrintField = React47.forwardRef(
|
|
4139
|
+
({ className, label, value, children, ...props }, ref) => /* @__PURE__ */ jsxs28("div", { ref, className: cn("", className), ...props, children: [
|
|
4140
|
+
/* @__PURE__ */ jsx49("dt", { className: "text-[8pt] font-medium text-neutral-500 mb-0.5", children: label }),
|
|
4141
|
+
/* @__PURE__ */ jsx49("dd", { className: "text-[9pt] text-neutral-900", children: value ?? children })
|
|
4060
4142
|
] })
|
|
4061
4143
|
);
|
|
4062
4144
|
PrintField.displayName = "PrintField";
|
|
@@ -4073,8 +4155,8 @@ var printFieldGroupVariants = cva18("grid gap-x-6 gap-y-2", {
|
|
|
4073
4155
|
columns: 2
|
|
4074
4156
|
}
|
|
4075
4157
|
});
|
|
4076
|
-
var PrintFieldGroup =
|
|
4077
|
-
({ className, columns, ...props }, ref) => /* @__PURE__ */
|
|
4158
|
+
var PrintFieldGroup = React47.forwardRef(
|
|
4159
|
+
({ className, columns, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
4078
4160
|
"dl",
|
|
4079
4161
|
{
|
|
4080
4162
|
ref,
|
|
@@ -4086,10 +4168,10 @@ var PrintFieldGroup = React46.forwardRef(
|
|
|
4086
4168
|
PrintFieldGroup.displayName = "PrintFieldGroup";
|
|
4087
4169
|
|
|
4088
4170
|
// src/components/print/print-divider.tsx
|
|
4089
|
-
import * as
|
|
4090
|
-
import { jsx as
|
|
4091
|
-
var PrintDivider =
|
|
4092
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4171
|
+
import * as React48 from "react";
|
|
4172
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
4173
|
+
var PrintDivider = React48.forwardRef(
|
|
4174
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
4093
4175
|
"hr",
|
|
4094
4176
|
{
|
|
4095
4177
|
ref,
|
|
@@ -4101,9 +4183,9 @@ var PrintDivider = React47.forwardRef(
|
|
|
4101
4183
|
PrintDivider.displayName = "PrintDivider";
|
|
4102
4184
|
|
|
4103
4185
|
// src/components/stat-card/stat-card.tsx
|
|
4104
|
-
import * as
|
|
4105
|
-
import { ChevronUp as ChevronUp2, ChevronDown as
|
|
4106
|
-
import { jsx as
|
|
4186
|
+
import * as React49 from "react";
|
|
4187
|
+
import { ChevronUp as ChevronUp2, ChevronDown as ChevronDown5 } from "lucide-react";
|
|
4188
|
+
import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4107
4189
|
function inferDirection(trend) {
|
|
4108
4190
|
if (!trend) return "neutral";
|
|
4109
4191
|
if (trend.startsWith("+")) return "up";
|
|
@@ -4117,13 +4199,13 @@ var TREND_STYLES = {
|
|
|
4117
4199
|
};
|
|
4118
4200
|
var TREND_ICON_COMPONENTS = {
|
|
4119
4201
|
up: ChevronUp2,
|
|
4120
|
-
down:
|
|
4202
|
+
down: ChevronDown5,
|
|
4121
4203
|
neutral: null
|
|
4122
4204
|
};
|
|
4123
|
-
var StatCard =
|
|
4205
|
+
var StatCard = React49.forwardRef(
|
|
4124
4206
|
({ className, label, value, trend, trendDirection, icon, ...props }, ref) => {
|
|
4125
4207
|
const direction = trendDirection ?? inferDirection(trend);
|
|
4126
|
-
return /* @__PURE__ */
|
|
4208
|
+
return /* @__PURE__ */ jsxs29(
|
|
4127
4209
|
"div",
|
|
4128
4210
|
{
|
|
4129
4211
|
ref,
|
|
@@ -4133,16 +4215,16 @@ var StatCard = React48.forwardRef(
|
|
|
4133
4215
|
),
|
|
4134
4216
|
...props,
|
|
4135
4217
|
children: [
|
|
4136
|
-
/* @__PURE__ */
|
|
4137
|
-
/* @__PURE__ */
|
|
4138
|
-
icon && /* @__PURE__ */
|
|
4218
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
|
|
4219
|
+
/* @__PURE__ */ jsx51("p", { className: "text-xs font-medium text-[var(--color-on-surface-muted)] uppercase tracking-wider", children: label }),
|
|
4220
|
+
icon && /* @__PURE__ */ jsx51("span", { className: "text-[var(--color-on-surface-muted)]", children: icon })
|
|
4139
4221
|
] }),
|
|
4140
|
-
/* @__PURE__ */
|
|
4141
|
-
/* @__PURE__ */
|
|
4142
|
-
trend && /* @__PURE__ */
|
|
4222
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-baseline gap-2 mt-2", children: [
|
|
4223
|
+
/* @__PURE__ */ jsx51("span", { className: "text-xl sm:text-2xl font-bold tabular-nums", children: value }),
|
|
4224
|
+
trend && /* @__PURE__ */ jsxs29("span", { className: cn("inline-flex items-center gap-0.5 text-xs font-medium", TREND_STYLES[direction]), children: [
|
|
4143
4225
|
(() => {
|
|
4144
4226
|
const TrendIcon = TREND_ICON_COMPONENTS[direction];
|
|
4145
|
-
return TrendIcon ? /* @__PURE__ */
|
|
4227
|
+
return TrendIcon ? /* @__PURE__ */ jsx51(TrendIcon, { className: "h-3 w-3", strokeWidth: 2.5 }) : null;
|
|
4146
4228
|
})(),
|
|
4147
4229
|
trend
|
|
4148
4230
|
] })
|
|
@@ -4155,10 +4237,10 @@ var StatCard = React48.forwardRef(
|
|
|
4155
4237
|
StatCard.displayName = "StatCard";
|
|
4156
4238
|
|
|
4157
4239
|
// src/components/chart-container/chart-container.tsx
|
|
4158
|
-
import * as
|
|
4159
|
-
import { jsx as
|
|
4160
|
-
var ChartContainer =
|
|
4161
|
-
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */
|
|
4240
|
+
import * as React50 from "react";
|
|
4241
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4242
|
+
var ChartContainer = React50.forwardRef(
|
|
4243
|
+
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs30(
|
|
4162
4244
|
"div",
|
|
4163
4245
|
{
|
|
4164
4246
|
ref,
|
|
@@ -4168,14 +4250,14 @@ var ChartContainer = React49.forwardRef(
|
|
|
4168
4250
|
),
|
|
4169
4251
|
...props,
|
|
4170
4252
|
children: [
|
|
4171
|
-
/* @__PURE__ */
|
|
4172
|
-
/* @__PURE__ */
|
|
4173
|
-
/* @__PURE__ */
|
|
4174
|
-
description && /* @__PURE__ */
|
|
4253
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-2 sm:gap-4 p-4 sm:p-5 pb-0", children: [
|
|
4254
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
4255
|
+
/* @__PURE__ */ jsx52("h3", { className: "text-sm font-semibold leading-none tracking-tight", children: title }),
|
|
4256
|
+
description && /* @__PURE__ */ jsx52("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description })
|
|
4175
4257
|
] }),
|
|
4176
|
-
actions && /* @__PURE__ */
|
|
4258
|
+
actions && /* @__PURE__ */ jsx52("div", { className: "flex items-center gap-2 shrink-0", children: actions })
|
|
4177
4259
|
] }),
|
|
4178
|
-
/* @__PURE__ */
|
|
4260
|
+
/* @__PURE__ */ jsx52("div", { className: "p-4 sm:p-5", children })
|
|
4179
4261
|
]
|
|
4180
4262
|
}
|
|
4181
4263
|
)
|
|
@@ -4288,7 +4370,7 @@ function getChartTheme() {
|
|
|
4288
4370
|
}
|
|
4289
4371
|
|
|
4290
4372
|
// src/components/chart/chart-tooltip.tsx
|
|
4291
|
-
import { jsx as
|
|
4373
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4292
4374
|
var ChartTooltip = ({
|
|
4293
4375
|
active,
|
|
4294
4376
|
payload,
|
|
@@ -4299,7 +4381,7 @@ var ChartTooltip = ({
|
|
|
4299
4381
|
}) => {
|
|
4300
4382
|
if (!active || !payload?.length) return null;
|
|
4301
4383
|
const displayLabel = labelFormatter ? labelFormatter(String(label)) : label;
|
|
4302
|
-
return /* @__PURE__ */
|
|
4384
|
+
return /* @__PURE__ */ jsxs31(
|
|
4303
4385
|
"div",
|
|
4304
4386
|
{
|
|
4305
4387
|
className: cn(
|
|
@@ -4308,17 +4390,17 @@ var ChartTooltip = ({
|
|
|
4308
4390
|
className
|
|
4309
4391
|
),
|
|
4310
4392
|
children: [
|
|
4311
|
-
displayLabel && /* @__PURE__ */
|
|
4312
|
-
/* @__PURE__ */
|
|
4313
|
-
/* @__PURE__ */
|
|
4393
|
+
displayLabel && /* @__PURE__ */ jsx53("p", { className: "font-medium text-[var(--color-on-surface)] mb-1", children: displayLabel }),
|
|
4394
|
+
/* @__PURE__ */ jsx53("div", { className: "flex flex-col gap-0.5", children: payload.map((entry, i) => /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
4395
|
+
/* @__PURE__ */ jsx53(
|
|
4314
4396
|
"span",
|
|
4315
4397
|
{
|
|
4316
4398
|
className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
|
|
4317
4399
|
style: { backgroundColor: entry.color }
|
|
4318
4400
|
}
|
|
4319
4401
|
),
|
|
4320
|
-
/* @__PURE__ */
|
|
4321
|
-
/* @__PURE__ */
|
|
4402
|
+
/* @__PURE__ */ jsx53("span", { className: "text-[var(--color-on-surface-muted)]", children: entry.name }),
|
|
4403
|
+
/* @__PURE__ */ jsx53("span", { className: "ml-auto font-medium tabular-nums text-[var(--color-on-surface)]", children: formatter ? formatter(entry.value, entry.name) : entry.value.toLocaleString() })
|
|
4322
4404
|
] }, i)) })
|
|
4323
4405
|
]
|
|
4324
4406
|
}
|
|
@@ -4327,21 +4409,21 @@ var ChartTooltip = ({
|
|
|
4327
4409
|
ChartTooltip.displayName = "ChartTooltip";
|
|
4328
4410
|
|
|
4329
4411
|
// src/components/chart/chart-legend.tsx
|
|
4330
|
-
import { jsx as
|
|
4412
|
+
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4331
4413
|
var ChartLegend = ({
|
|
4332
4414
|
payload,
|
|
4333
4415
|
className
|
|
4334
4416
|
}) => {
|
|
4335
4417
|
if (!payload?.length) return null;
|
|
4336
|
-
return /* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4418
|
+
return /* @__PURE__ */ jsx54("div", { className: cn("flex flex-wrap items-center justify-center gap-x-4 gap-y-1 pt-3", className), children: payload.map((entry, i) => /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1.5 text-xs text-[var(--color-on-surface-muted)]", children: [
|
|
4419
|
+
/* @__PURE__ */ jsx54(
|
|
4338
4420
|
"span",
|
|
4339
4421
|
{
|
|
4340
4422
|
className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
|
|
4341
4423
|
style: { backgroundColor: entry.color }
|
|
4342
4424
|
}
|
|
4343
4425
|
),
|
|
4344
|
-
/* @__PURE__ */
|
|
4426
|
+
/* @__PURE__ */ jsx54("span", { children: entry.value })
|
|
4345
4427
|
] }, i)) });
|
|
4346
4428
|
};
|
|
4347
4429
|
ChartLegend.displayName = "ChartLegend";
|
|
@@ -4470,6 +4552,9 @@ export {
|
|
|
4470
4552
|
SelectTrigger,
|
|
4471
4553
|
SelectValue,
|
|
4472
4554
|
Separator,
|
|
4555
|
+
SidebarNav,
|
|
4556
|
+
SidebarNavGroup,
|
|
4557
|
+
SidebarNavItem,
|
|
4473
4558
|
Skeleton,
|
|
4474
4559
|
Spinner,
|
|
4475
4560
|
StatCard,
|