@polastack/design-system 0.1.12 → 0.1.14
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/README.md +4 -1
- package/dist/index.d.ts +67 -1
- package/dist/index.js +261 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/globals.css +23 -0
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ function App() {
|
|
|
63
63
|
## コンポーネント一覧
|
|
64
64
|
|
|
65
65
|
### コアアトム
|
|
66
|
-
Button, Badge, Avatar, Separator, Skeleton, Spinner, Card, Tooltip, Toast
|
|
66
|
+
Button, Badge, Avatar, AvatarGroup, Separator, Skeleton, Spinner, Card, Tooltip, Toast
|
|
67
67
|
|
|
68
68
|
### フォーム
|
|
69
69
|
Label, Input, Textarea, Checkbox, RadioGroup, Switch, Select, Combobox, DatePicker, NumberInput, FormField, DynamicFormField, FormLayout
|
|
@@ -77,6 +77,9 @@ Popover, DropdownMenu, Dialog, CommandPalette, Drawer, AppShell
|
|
|
77
77
|
### PWA
|
|
78
78
|
BottomNavigation, OfflineIndicator, InstallPrompt, PullToRefresh
|
|
79
79
|
|
|
80
|
+
### チャート / ダッシュボード
|
|
81
|
+
StatCard, ChartContainer, chartColors (tokens)
|
|
82
|
+
|
|
80
83
|
### テーマ
|
|
81
84
|
ThemeProvider, useTheme
|
|
82
85
|
|
package/dist/index.d.ts
CHANGED
|
@@ -661,6 +661,72 @@ interface PullToRefreshProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
661
661
|
}
|
|
662
662
|
declare const PullToRefresh: React.ForwardRefExoticComponent<PullToRefreshProps & React.RefAttributes<HTMLDivElement>>;
|
|
663
663
|
|
|
664
|
+
declare const printDocumentVariants: (props?: ({
|
|
665
|
+
size?: "A4" | "Letter" | null | undefined;
|
|
666
|
+
orientation?: "portrait" | "landscape" | null | undefined;
|
|
667
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
668
|
+
interface PrintDocumentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof printDocumentVariants> {
|
|
669
|
+
/** Padding inside the document. Default: "20mm" */
|
|
670
|
+
padding?: string;
|
|
671
|
+
}
|
|
672
|
+
declare const PrintDocument: React.ForwardRefExoticComponent<PrintDocumentProps & React.RefAttributes<HTMLDivElement>>;
|
|
673
|
+
interface PrintHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
674
|
+
/** Logo element (img or SVG) */
|
|
675
|
+
logo?: React.ReactNode;
|
|
676
|
+
/** Main title (e.g., "請求書") */
|
|
677
|
+
title?: string;
|
|
678
|
+
/** Subtitle (e.g., "Invoice") */
|
|
679
|
+
subtitle?: string;
|
|
680
|
+
/** Right-aligned meta info (e.g., invoice number, date) */
|
|
681
|
+
meta?: React.ReactNode;
|
|
682
|
+
}
|
|
683
|
+
declare const PrintHeader: React.ForwardRefExoticComponent<PrintHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
684
|
+
interface PrintFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
685
|
+
}
|
|
686
|
+
declare const PrintFooter: React.ForwardRefExoticComponent<PrintFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
687
|
+
|
|
688
|
+
interface PrintTableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
689
|
+
}
|
|
690
|
+
declare const PrintTable: React.ForwardRefExoticComponent<PrintTableProps & React.RefAttributes<HTMLTableElement>>;
|
|
691
|
+
interface PrintTableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
692
|
+
}
|
|
693
|
+
declare const PrintTableHeader: React.ForwardRefExoticComponent<PrintTableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
694
|
+
interface PrintTableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
695
|
+
}
|
|
696
|
+
declare const PrintTableBody: React.ForwardRefExoticComponent<PrintTableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
697
|
+
interface PrintTableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
698
|
+
}
|
|
699
|
+
declare const PrintTableFooter: React.ForwardRefExoticComponent<PrintTableFooterProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
700
|
+
interface PrintTableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
701
|
+
}
|
|
702
|
+
declare const PrintTableRow: React.ForwardRefExoticComponent<PrintTableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
703
|
+
interface PrintTableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
704
|
+
align?: 'left' | 'center' | 'right';
|
|
705
|
+
}
|
|
706
|
+
declare const PrintTableHead: React.ForwardRefExoticComponent<PrintTableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
707
|
+
interface PrintTableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
708
|
+
align?: 'left' | 'center' | 'right';
|
|
709
|
+
}
|
|
710
|
+
declare const PrintTableCell: React.ForwardRefExoticComponent<PrintTableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
711
|
+
|
|
712
|
+
interface PrintFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
713
|
+
/** Field label */
|
|
714
|
+
label: string;
|
|
715
|
+
/** Field value (string or ReactNode for rich content) */
|
|
716
|
+
value?: React.ReactNode;
|
|
717
|
+
}
|
|
718
|
+
declare const PrintField: React.ForwardRefExoticComponent<PrintFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
719
|
+
declare const printFieldGroupVariants: (props?: ({
|
|
720
|
+
columns?: 2 | 1 | 3 | null | undefined;
|
|
721
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
722
|
+
interface PrintFieldGroupProps extends React.HTMLAttributes<HTMLDListElement>, VariantProps<typeof printFieldGroupVariants> {
|
|
723
|
+
}
|
|
724
|
+
declare const PrintFieldGroup: React.ForwardRefExoticComponent<PrintFieldGroupProps & React.RefAttributes<HTMLDListElement>>;
|
|
725
|
+
|
|
726
|
+
interface PrintDividerProps extends React.HTMLAttributes<HTMLHRElement> {
|
|
727
|
+
}
|
|
728
|
+
declare const PrintDivider: React.ForwardRefExoticComponent<PrintDividerProps & React.RefAttributes<HTMLHRElement>>;
|
|
729
|
+
|
|
664
730
|
interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
665
731
|
/** Metric label (e.g. "Total Revenue") */
|
|
666
732
|
label: string;
|
|
@@ -740,4 +806,4 @@ declare const chartColors: {
|
|
|
740
806
|
type ChartCategoricalColors = typeof chartColors.categorical;
|
|
741
807
|
type ChartSemanticColors = typeof chartColors.semantic;
|
|
742
808
|
|
|
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 };
|
|
809
|
+
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, 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, 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, printDocumentVariants, printFieldGroupVariants, 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
|
@@ -572,11 +572,11 @@ Skeleton.displayName = "Skeleton";
|
|
|
572
572
|
import * as React9 from "react";
|
|
573
573
|
import { cva as cva4 } from "class-variance-authority";
|
|
574
574
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
575
|
-
var spinnerVariants = cva4("
|
|
575
|
+
var spinnerVariants = cva4("", {
|
|
576
576
|
variants: {
|
|
577
577
|
size: {
|
|
578
578
|
sm: "h-4 w-4",
|
|
579
|
-
md: "h-
|
|
579
|
+
md: "h-5 w-5",
|
|
580
580
|
lg: "h-8 w-8"
|
|
581
581
|
}
|
|
582
582
|
},
|
|
@@ -584,36 +584,33 @@ var spinnerVariants = cva4("animate-spin", {
|
|
|
584
584
|
size: "md"
|
|
585
585
|
}
|
|
586
586
|
});
|
|
587
|
+
var BARS = 8;
|
|
587
588
|
var Spinner = React9.forwardRef(
|
|
588
589
|
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxs2("div", { ref, role: "status", "aria-label": "Loading", ...props, children: [
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ jsx8(
|
|
590
591
|
"svg",
|
|
591
592
|
{
|
|
592
593
|
className: cn(spinnerVariants({ size }), className),
|
|
593
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
594
|
-
fill: "none",
|
|
595
594
|
viewBox: "0 0 24 24",
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
className: "opacity-75",
|
|
612
|
-
fill: "currentColor",
|
|
613
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
595
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
596
|
+
fill: "currentColor",
|
|
597
|
+
children: Array.from({ length: BARS }, (_, i) => /* @__PURE__ */ jsx8(
|
|
598
|
+
"rect",
|
|
599
|
+
{
|
|
600
|
+
x: "11",
|
|
601
|
+
y: "2",
|
|
602
|
+
width: "2",
|
|
603
|
+
height: "6",
|
|
604
|
+
rx: "1",
|
|
605
|
+
opacity: 1 - i * (0.85 / BARS),
|
|
606
|
+
transform: `rotate(${i * (360 / BARS)} 12 12)`,
|
|
607
|
+
style: {
|
|
608
|
+
animation: "spinner-fade 0.8s ease-in-out infinite",
|
|
609
|
+
animationDelay: `${-i * 0.1}s`
|
|
614
610
|
}
|
|
615
|
-
|
|
616
|
-
|
|
611
|
+
},
|
|
612
|
+
i
|
|
613
|
+
))
|
|
617
614
|
}
|
|
618
615
|
),
|
|
619
616
|
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Loading..." })
|
|
@@ -3673,9 +3670,213 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3673
3670
|
);
|
|
3674
3671
|
PullToRefresh.displayName = "PullToRefresh";
|
|
3675
3672
|
|
|
3676
|
-
// src/components/
|
|
3673
|
+
// src/components/print/print-document.tsx
|
|
3677
3674
|
import * as React42 from "react";
|
|
3675
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
3678
3676
|
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3677
|
+
var printDocumentVariants = cva15(
|
|
3678
|
+
[
|
|
3679
|
+
"bg-white text-neutral-900",
|
|
3680
|
+
"flex flex-col",
|
|
3681
|
+
// Screen preview: paper-on-desk effect
|
|
3682
|
+
"screen:shadow-lg screen:border screen:border-neutral-200"
|
|
3683
|
+
].join(" "),
|
|
3684
|
+
{
|
|
3685
|
+
variants: {
|
|
3686
|
+
size: {
|
|
3687
|
+
A4: "w-[210mm] min-h-[297mm]",
|
|
3688
|
+
Letter: "w-[8.5in] min-h-[11in]"
|
|
3689
|
+
},
|
|
3690
|
+
orientation: {
|
|
3691
|
+
portrait: "",
|
|
3692
|
+
landscape: ""
|
|
3693
|
+
}
|
|
3694
|
+
},
|
|
3695
|
+
compoundVariants: [
|
|
3696
|
+
{ size: "A4", orientation: "landscape", className: "w-[297mm] min-h-[210mm]" },
|
|
3697
|
+
{ size: "Letter", orientation: "landscape", className: "w-[11in] min-h-[8.5in]" }
|
|
3698
|
+
],
|
|
3699
|
+
defaultVariants: {
|
|
3700
|
+
size: "A4",
|
|
3701
|
+
orientation: "portrait"
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
);
|
|
3705
|
+
var PrintDocument = React42.forwardRef(
|
|
3706
|
+
({ className, size, orientation, padding = "20mm", style, children, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
3707
|
+
"div",
|
|
3708
|
+
{
|
|
3709
|
+
ref,
|
|
3710
|
+
className: cn(printDocumentVariants({ size, orientation }), className),
|
|
3711
|
+
style: {
|
|
3712
|
+
padding,
|
|
3713
|
+
boxSizing: "border-box",
|
|
3714
|
+
fontFamily: 'Inter, "Noto Sans JP", sans-serif',
|
|
3715
|
+
fontSize: "10pt",
|
|
3716
|
+
lineHeight: "1.6",
|
|
3717
|
+
...style
|
|
3718
|
+
},
|
|
3719
|
+
...props,
|
|
3720
|
+
children
|
|
3721
|
+
}
|
|
3722
|
+
)
|
|
3723
|
+
);
|
|
3724
|
+
PrintDocument.displayName = "PrintDocument";
|
|
3725
|
+
var PrintHeader = React42.forwardRef(
|
|
3726
|
+
({ className, logo, title, subtitle, meta, children, ...props }, ref) => /* @__PURE__ */ jsxs25("div", { ref, className: cn("mb-6", className), ...props, children: [
|
|
3727
|
+
/* @__PURE__ */ jsx44("div", { className: "h-1 bg-primary-500 rounded-full mb-5" }),
|
|
3728
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between pb-4 border-b border-neutral-200", children: [
|
|
3729
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
3730
|
+
logo && /* @__PURE__ */ jsx44("div", { className: "shrink-0", children: logo }),
|
|
3731
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
3732
|
+
title && /* @__PURE__ */ jsx44("h1", { className: "text-xl font-bold text-neutral-900 leading-tight", children: title }),
|
|
3733
|
+
subtitle && /* @__PURE__ */ jsx44("p", { className: "text-[8pt] font-medium tracking-widest uppercase text-neutral-400 mt-0.5", children: subtitle })
|
|
3734
|
+
] })
|
|
3735
|
+
] }),
|
|
3736
|
+
meta && /* @__PURE__ */ jsx44("div", { className: "text-right text-[9pt] text-neutral-600 leading-relaxed", children: meta }),
|
|
3737
|
+
children
|
|
3738
|
+
] })
|
|
3739
|
+
] })
|
|
3740
|
+
);
|
|
3741
|
+
PrintHeader.displayName = "PrintHeader";
|
|
3742
|
+
var PrintFooter = React42.forwardRef(
|
|
3743
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
3744
|
+
"div",
|
|
3745
|
+
{
|
|
3746
|
+
ref,
|
|
3747
|
+
className: cn("mt-auto pt-4 border-t border-neutral-200 text-[8pt] text-neutral-400 text-center leading-relaxed", className),
|
|
3748
|
+
...props,
|
|
3749
|
+
children
|
|
3750
|
+
}
|
|
3751
|
+
)
|
|
3752
|
+
);
|
|
3753
|
+
PrintFooter.displayName = "PrintFooter";
|
|
3754
|
+
|
|
3755
|
+
// src/components/print/print-table.tsx
|
|
3756
|
+
import * as React43 from "react";
|
|
3757
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3758
|
+
var PrintTable = React43.forwardRef(
|
|
3759
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3760
|
+
"table",
|
|
3761
|
+
{
|
|
3762
|
+
ref,
|
|
3763
|
+
className: cn("w-full border-collapse text-[9pt]", className),
|
|
3764
|
+
...props
|
|
3765
|
+
}
|
|
3766
|
+
)
|
|
3767
|
+
);
|
|
3768
|
+
PrintTable.displayName = "PrintTable";
|
|
3769
|
+
var PrintTableHeader = React43.forwardRef(
|
|
3770
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("thead", { ref, className: cn("", className), ...props })
|
|
3771
|
+
);
|
|
3772
|
+
PrintTableHeader.displayName = "PrintTableHeader";
|
|
3773
|
+
var PrintTableBody = React43.forwardRef(
|
|
3774
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tbody", { ref, className: cn("", className), ...props })
|
|
3775
|
+
);
|
|
3776
|
+
PrintTableBody.displayName = "PrintTableBody";
|
|
3777
|
+
var PrintTableFooter = React43.forwardRef(
|
|
3778
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tfoot", { ref, className: cn("", className), ...props })
|
|
3779
|
+
);
|
|
3780
|
+
PrintTableFooter.displayName = "PrintTableFooter";
|
|
3781
|
+
var PrintTableRow = React43.forwardRef(
|
|
3782
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3783
|
+
"tr",
|
|
3784
|
+
{
|
|
3785
|
+
ref,
|
|
3786
|
+
className: cn("[break-inside:avoid]", className),
|
|
3787
|
+
...props
|
|
3788
|
+
}
|
|
3789
|
+
)
|
|
3790
|
+
);
|
|
3791
|
+
PrintTableRow.displayName = "PrintTableRow";
|
|
3792
|
+
var PrintTableHead = React43.forwardRef(
|
|
3793
|
+
({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3794
|
+
"th",
|
|
3795
|
+
{
|
|
3796
|
+
ref,
|
|
3797
|
+
className: cn(
|
|
3798
|
+
"py-1.5 px-2 font-semibold text-neutral-700 bg-neutral-50 border-b-2 border-neutral-300 text-[8pt]",
|
|
3799
|
+
align === "right" && "text-right",
|
|
3800
|
+
align === "center" && "text-center",
|
|
3801
|
+
align === "left" && "text-left",
|
|
3802
|
+
className
|
|
3803
|
+
),
|
|
3804
|
+
...props
|
|
3805
|
+
}
|
|
3806
|
+
)
|
|
3807
|
+
);
|
|
3808
|
+
PrintTableHead.displayName = "PrintTableHead";
|
|
3809
|
+
var PrintTableCell = React43.forwardRef(
|
|
3810
|
+
({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3811
|
+
"td",
|
|
3812
|
+
{
|
|
3813
|
+
ref,
|
|
3814
|
+
className: cn(
|
|
3815
|
+
"py-1.5 px-2 border-b border-neutral-200",
|
|
3816
|
+
align === "right" && "text-right",
|
|
3817
|
+
align === "center" && "text-center",
|
|
3818
|
+
align === "left" && "text-left",
|
|
3819
|
+
className
|
|
3820
|
+
),
|
|
3821
|
+
...props
|
|
3822
|
+
}
|
|
3823
|
+
)
|
|
3824
|
+
);
|
|
3825
|
+
PrintTableCell.displayName = "PrintTableCell";
|
|
3826
|
+
|
|
3827
|
+
// src/components/print/print-field.tsx
|
|
3828
|
+
import * as React44 from "react";
|
|
3829
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
3830
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3831
|
+
var PrintField = React44.forwardRef(
|
|
3832
|
+
({ className, label, value, children, ...props }, ref) => /* @__PURE__ */ jsxs26("div", { ref, className: cn("", className), ...props, children: [
|
|
3833
|
+
/* @__PURE__ */ jsx46("dt", { className: "text-[8pt] font-medium text-neutral-500 mb-0.5", children: label }),
|
|
3834
|
+
/* @__PURE__ */ jsx46("dd", { className: "text-[9pt] text-neutral-900", children: value ?? children })
|
|
3835
|
+
] })
|
|
3836
|
+
);
|
|
3837
|
+
PrintField.displayName = "PrintField";
|
|
3838
|
+
var printFieldGroupVariants = cva16("grid gap-x-6 gap-y-2", {
|
|
3839
|
+
variants: {
|
|
3840
|
+
columns: {
|
|
3841
|
+
1: "grid-cols-1",
|
|
3842
|
+
2: "grid-cols-2",
|
|
3843
|
+
3: "grid-cols-3"
|
|
3844
|
+
}
|
|
3845
|
+
},
|
|
3846
|
+
defaultVariants: {
|
|
3847
|
+
columns: 2
|
|
3848
|
+
}
|
|
3849
|
+
});
|
|
3850
|
+
var PrintFieldGroup = React44.forwardRef(
|
|
3851
|
+
({ className, columns, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3852
|
+
"dl",
|
|
3853
|
+
{
|
|
3854
|
+
ref,
|
|
3855
|
+
className: cn(printFieldGroupVariants({ columns }), className),
|
|
3856
|
+
...props
|
|
3857
|
+
}
|
|
3858
|
+
)
|
|
3859
|
+
);
|
|
3860
|
+
PrintFieldGroup.displayName = "PrintFieldGroup";
|
|
3861
|
+
|
|
3862
|
+
// src/components/print/print-divider.tsx
|
|
3863
|
+
import * as React45 from "react";
|
|
3864
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3865
|
+
var PrintDivider = React45.forwardRef(
|
|
3866
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3867
|
+
"hr",
|
|
3868
|
+
{
|
|
3869
|
+
ref,
|
|
3870
|
+
className: cn("border-neutral-200 my-4", className),
|
|
3871
|
+
...props
|
|
3872
|
+
}
|
|
3873
|
+
)
|
|
3874
|
+
);
|
|
3875
|
+
PrintDivider.displayName = "PrintDivider";
|
|
3876
|
+
|
|
3877
|
+
// src/components/stat-card/stat-card.tsx
|
|
3878
|
+
import * as React46 from "react";
|
|
3879
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3679
3880
|
function inferDirection(trend) {
|
|
3680
3881
|
if (!trend) return "neutral";
|
|
3681
3882
|
if (trend.startsWith("+")) return "up";
|
|
@@ -3692,10 +3893,10 @@ var TREND_ICONS = {
|
|
|
3692
3893
|
down: "M7 7l5 5 5-5",
|
|
3693
3894
|
neutral: ""
|
|
3694
3895
|
};
|
|
3695
|
-
var StatCard =
|
|
3896
|
+
var StatCard = React46.forwardRef(
|
|
3696
3897
|
({ className, label, value, trend, trendDirection, icon, ...props }, ref) => {
|
|
3697
3898
|
const direction = trendDirection ?? inferDirection(trend);
|
|
3698
|
-
return /* @__PURE__ */
|
|
3899
|
+
return /* @__PURE__ */ jsxs27(
|
|
3699
3900
|
"div",
|
|
3700
3901
|
{
|
|
3701
3902
|
ref,
|
|
@@ -3705,14 +3906,14 @@ var StatCard = React42.forwardRef(
|
|
|
3705
3906
|
),
|
|
3706
3907
|
...props,
|
|
3707
3908
|
children: [
|
|
3708
|
-
/* @__PURE__ */
|
|
3709
|
-
/* @__PURE__ */
|
|
3710
|
-
icon && /* @__PURE__ */
|
|
3909
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between", children: [
|
|
3910
|
+
/* @__PURE__ */ jsx48("p", { className: "text-xs font-medium text-[var(--color-on-surface-muted)] uppercase tracking-wider", children: label }),
|
|
3911
|
+
icon && /* @__PURE__ */ jsx48("span", { className: "text-[var(--color-on-surface-muted)]", children: icon })
|
|
3711
3912
|
] }),
|
|
3712
|
-
/* @__PURE__ */
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
trend && /* @__PURE__ */
|
|
3715
|
-
direction !== "neutral" && /* @__PURE__ */
|
|
3913
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-baseline gap-2 mt-2", children: [
|
|
3914
|
+
/* @__PURE__ */ jsx48("span", { className: "text-2xl font-bold tabular-nums", children: value }),
|
|
3915
|
+
trend && /* @__PURE__ */ jsxs27("span", { className: cn("inline-flex items-center gap-0.5 text-xs font-medium", TREND_STYLES[direction]), children: [
|
|
3916
|
+
direction !== "neutral" && /* @__PURE__ */ jsx48("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx48("path", { d: TREND_ICONS[direction] }) }),
|
|
3716
3917
|
trend
|
|
3717
3918
|
] })
|
|
3718
3919
|
] })
|
|
@@ -3724,10 +3925,10 @@ var StatCard = React42.forwardRef(
|
|
|
3724
3925
|
StatCard.displayName = "StatCard";
|
|
3725
3926
|
|
|
3726
3927
|
// src/components/chart-container/chart-container.tsx
|
|
3727
|
-
import * as
|
|
3728
|
-
import { jsx as
|
|
3729
|
-
var ChartContainer =
|
|
3730
|
-
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */
|
|
3928
|
+
import * as React47 from "react";
|
|
3929
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3930
|
+
var ChartContainer = React47.forwardRef(
|
|
3931
|
+
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs28(
|
|
3731
3932
|
"div",
|
|
3732
3933
|
{
|
|
3733
3934
|
ref,
|
|
@@ -3737,14 +3938,14 @@ var ChartContainer = React43.forwardRef(
|
|
|
3737
3938
|
),
|
|
3738
3939
|
...props,
|
|
3739
3940
|
children: [
|
|
3740
|
-
/* @__PURE__ */
|
|
3741
|
-
/* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3743
|
-
description && /* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-start justify-between gap-4 p-5 pb-0", children: [
|
|
3942
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
3943
|
+
/* @__PURE__ */ jsx49("h3", { className: "text-sm font-semibold leading-none tracking-tight", children: title }),
|
|
3944
|
+
description && /* @__PURE__ */ jsx49("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description })
|
|
3744
3945
|
] }),
|
|
3745
|
-
actions && /* @__PURE__ */
|
|
3946
|
+
actions && /* @__PURE__ */ jsx49("div", { className: "flex items-center gap-2 shrink-0", children: actions })
|
|
3746
3947
|
] }),
|
|
3747
|
-
/* @__PURE__ */
|
|
3948
|
+
/* @__PURE__ */ jsx49("div", { className: "p-5", children })
|
|
3748
3949
|
]
|
|
3749
3950
|
}
|
|
3750
3951
|
)
|
|
@@ -3929,6 +4130,19 @@ export {
|
|
|
3929
4130
|
PopoverAnchor,
|
|
3930
4131
|
PopoverContent,
|
|
3931
4132
|
PopoverTrigger,
|
|
4133
|
+
PrintDivider,
|
|
4134
|
+
PrintDocument,
|
|
4135
|
+
PrintField,
|
|
4136
|
+
PrintFieldGroup,
|
|
4137
|
+
PrintFooter,
|
|
4138
|
+
PrintHeader,
|
|
4139
|
+
PrintTable,
|
|
4140
|
+
PrintTableBody,
|
|
4141
|
+
PrintTableCell,
|
|
4142
|
+
PrintTableFooter,
|
|
4143
|
+
PrintTableHead,
|
|
4144
|
+
PrintTableHeader,
|
|
4145
|
+
PrintTableRow,
|
|
3932
4146
|
PullToRefresh,
|
|
3933
4147
|
RadioGroup,
|
|
3934
4148
|
RadioGroupItem,
|
|
@@ -3980,6 +4194,8 @@ export {
|
|
|
3980
4194
|
formLayoutVariants,
|
|
3981
4195
|
getFieldComponent,
|
|
3982
4196
|
inputVariants,
|
|
4197
|
+
printDocumentVariants,
|
|
4198
|
+
printFieldGroupVariants,
|
|
3983
4199
|
spinnerVariants,
|
|
3984
4200
|
switchVariants,
|
|
3985
4201
|
textareaVariants,
|