@polastack/design-system 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -370,7 +370,7 @@ declare const formLayoutVariants: (props?: ({
370
370
  size?: "sm" | "md" | "lg" | null | undefined;
371
371
  } & class_variance_authority_types.ClassProp) | undefined) => string;
372
372
  interface FormLayoutProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof formLayoutVariants> {
373
- columns?: number;
373
+ columns?: number | 'responsive';
374
374
  }
375
375
  declare const FormLayout: React.ForwardRefExoticComponent<FormLayoutProps & React.RefAttributes<HTMLDivElement>>;
376
376
  interface FormSectionProps extends React.HTMLAttributes<HTMLFieldSetElement> {
@@ -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 | "responsive" | 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
@@ -302,7 +302,7 @@ import * as React4 from "react";
302
302
  import { cva as cva2 } from "class-variance-authority";
303
303
  import { jsx as jsx3 } from "react/jsx-runtime";
304
304
  var badgeVariants = cva2(
305
- "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",
305
+ "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors touch:px-3 touch:py-1 touch:text-sm",
306
306
  {
307
307
  variants: {
308
308
  variant: {
@@ -637,7 +637,7 @@ var CardHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE
637
637
  "div",
638
638
  {
639
639
  ref,
640
- className: cn("flex flex-col gap-1.5 p-6", className),
640
+ className: cn("flex flex-col gap-1.5 p-4 sm:p-6", className),
641
641
  ...props
642
642
  }
643
643
  ));
@@ -646,7 +646,7 @@ var CardTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE_
646
646
  "h3",
647
647
  {
648
648
  ref,
649
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
649
+ className: cn("text-base sm:text-lg font-semibold leading-none tracking-tight", className),
650
650
  ...props
651
651
  }
652
652
  ));
@@ -660,13 +660,13 @@ var CardDescription = React10.forwardRef(({ className, ...props }, ref) => /* @_
660
660
  }
661
661
  ));
662
662
  CardDescription.displayName = "CardDescription";
663
- var CardContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("p-6 pt-0", className), ...props }));
663
+ var CardContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("p-4 pt-0 sm:p-6 sm:pt-0", className), ...props }));
664
664
  CardContent.displayName = "CardContent";
665
665
  var CardFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
666
666
  "div",
667
667
  {
668
668
  ref,
669
- className: cn("flex items-center p-6 pt-0", className),
669
+ className: cn("flex items-center p-4 pt-0 sm:p-6 sm:pt-0", className),
670
670
  ...props
671
671
  }
672
672
  ));
@@ -715,7 +715,7 @@ var ToastViewport = React12.forwardRef(({ className, ...props }, ref) => /* @__P
715
715
  ));
716
716
  ToastViewport.displayName = "ToastViewport";
717
717
  var toastVariants = cva5(
718
- "group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=open]:slide-in-from-right-full data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full",
718
+ "group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-lg border p-3 sm:p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom-full sm:data-[state=open]:slide-in-from-right-full data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full sm:data-[state=closed]:slide-out-to-right-full",
719
719
  {
720
720
  variants: {
721
721
  variant: {
@@ -1865,15 +1865,22 @@ var formLayoutVariants = cva10("", {
1865
1865
  }
1866
1866
  });
1867
1867
  var FormLayout = React26.forwardRef(
1868
- ({ className, layout, size, columns = 2, style, ...props }, ref) => /* @__PURE__ */ jsx25(
1869
- "div",
1870
- {
1871
- ref,
1872
- className: cn(formLayoutVariants({ layout, size }), className),
1873
- style: layout === "grid" ? { gridTemplateColumns: `repeat(${columns}, 1fr)`, ...style } : style,
1874
- ...props
1875
- }
1876
- )
1868
+ ({ className, layout, size, columns = 2, style, ...props }, ref) => {
1869
+ const isResponsive = columns === "responsive";
1870
+ return /* @__PURE__ */ jsx25(
1871
+ "div",
1872
+ {
1873
+ ref,
1874
+ className: cn(
1875
+ formLayoutVariants({ layout, size }),
1876
+ isResponsive && layout === "grid" && "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1877
+ className
1878
+ ),
1879
+ style: layout === "grid" && !isResponsive ? { gridTemplateColumns: `repeat(${columns}, 1fr)`, ...style } : style,
1880
+ ...props
1881
+ }
1882
+ );
1883
+ }
1877
1884
  );
1878
1885
  FormLayout.displayName = "FormLayout";
1879
1886
  var FormSection = React26.forwardRef(({ className, title, description, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
@@ -1920,7 +1927,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
1920
1927
  var [TabsVariantProvider, useTabsVariant] = createContext2("TabsVariant");
1921
1928
  var Tabs = TabsPrimitive.Root;
1922
1929
  var tabsListVariants = cva11(
1923
- "inline-flex items-center justify-center",
1930
+ "inline-flex items-center justify-center overflow-x-auto max-w-full",
1924
1931
  {
1925
1932
  variants: {
1926
1933
  variant: {
@@ -1940,7 +1947,7 @@ var TabsList = React27.forwardRef(({ className, variant = "default", ...props },
1940
1947
  }
1941
1948
  ) }));
1942
1949
  TabsList.displayName = "TabsList";
1943
- var tabsTriggerBase = "inline-flex items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 touch:min-h-[--touch-target-min]";
1950
+ var tabsTriggerBase = "inline-flex items-center justify-center whitespace-nowrap shrink-0 px-3 py-1.5 text-sm font-medium transition-all duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 touch:min-h-[--touch-target-min]";
1944
1951
  var tabsTriggerVariantStyles = {
1945
1952
  default: "rounded-md data-[state=active]:bg-[var(--color-surface-raised)] data-[state=active]:shadow-sm data-[state=active]:text-[var(--color-on-surface)] text-[var(--color-on-surface-secondary)]",
1946
1953
  underline: "border-b-2 border-transparent rounded-none data-[state=active]:border-primary-500 data-[state=active]:text-[var(--color-on-surface)] text-[var(--color-on-surface-secondary)]"
@@ -2103,7 +2110,7 @@ var TableCell = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
2103
2110
  {
2104
2111
  ref,
2105
2112
  className: cn(
2106
- "px-3 py-2.5 align-middle text-sm [&:has([role=checkbox])]:pr-0",
2113
+ "px-2 py-2 sm:px-3 sm:py-2.5 align-middle text-sm [&:has([role=checkbox])]:pr-0",
2107
2114
  className
2108
2115
  ),
2109
2116
  ...props
@@ -2145,12 +2152,12 @@ function DataTablePagination({
2145
2152
  "div",
2146
2153
  {
2147
2154
  className: cn(
2148
- "flex items-center justify-between px-3 py-3 text-sm text-[var(--color-on-surface-secondary)]",
2155
+ "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between px-3 py-3 text-sm text-[var(--color-on-surface-secondary)]",
2149
2156
  className
2150
2157
  ),
2151
2158
  children: [
2152
2159
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
2153
- /* @__PURE__ */ jsx29("span", { children: "Rows per page" }),
2160
+ /* @__PURE__ */ jsx29("span", { className: "hidden sm:inline", children: "Rows per page" }),
2154
2161
  /* @__PURE__ */ jsx29(
2155
2162
  "select",
2156
2163
  {
@@ -2849,7 +2856,7 @@ var DialogContent = React35.forwardRef(({ className, children, ...props }, ref)
2849
2856
  "inset-0",
2850
2857
  // Desktop: centered modal
2851
2858
  "sm:inset-auto sm:left-1/2 sm:top-1/2 sm:-translate-x-1/2 sm:-translate-y-1/2",
2852
- "sm:w-full sm:max-w-lg sm:rounded-xl sm:border sm:border-[var(--color-border)]",
2859
+ "sm:w-full sm:max-w-lg md:max-w-xl sm:rounded-xl sm:border sm:border-[var(--color-border)]",
2853
2860
  // Animations
2854
2861
  "animate-in fade-in-0",
2855
2862
  "sm:zoom-in-95 sm:slide-in-from-left-1/2 sm:slide-in-from-top-[48%]",
@@ -3169,7 +3176,7 @@ var DrawerContent = React36.forwardRef(({ className, size, children, ...props },
3169
3176
  {
3170
3177
  ref,
3171
3178
  className: cn(
3172
- "fixed top-0 h-full bg-[var(--color-surface-raised)] shadow-xl",
3179
+ "fixed top-0 h-full max-w-full bg-[var(--color-surface-raised)] shadow-xl",
3173
3180
  "focus-visible:outline-none",
3174
3181
  side === "right" && "right-0 border-l border-[var(--color-border)] animate-slide-in-right data-[state=closed]:animate-slide-out-right",
3175
3182
  side === "left" && "left-0 border-r border-[var(--color-border)] animate-slide-in-left data-[state=closed]:animate-slide-out-left",
@@ -3191,7 +3198,7 @@ var DrawerHeader = React36.forwardRef(({ className, ...props }, ref) => {
3191
3198
  {
3192
3199
  ref,
3193
3200
  className: cn(
3194
- "flex items-center justify-between border-b border-[var(--color-border)] px-6 py-4",
3201
+ "flex items-center justify-between border-b border-[var(--color-border)] px-4 py-3 sm:px-6 sm:py-4",
3195
3202
  className
3196
3203
  ),
3197
3204
  ...props,
@@ -3270,7 +3277,7 @@ var DrawerFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PU
3270
3277
  {
3271
3278
  ref,
3272
3279
  className: cn(
3273
- "flex items-center justify-end gap-2 border-t border-[var(--color-border)] px-6 py-4",
3280
+ "flex items-center justify-end gap-2 border-t border-[var(--color-border)] px-4 py-3 sm:px-6 sm:py-4",
3274
3281
  className
3275
3282
  ),
3276
3283
  ...props
@@ -3670,9 +3677,214 @@ var PullToRefresh = React41.forwardRef(
3670
3677
  );
3671
3678
  PullToRefresh.displayName = "PullToRefresh";
3672
3679
 
3673
- // src/components/stat-card/stat-card.tsx
3680
+ // src/components/print/print-document.tsx
3674
3681
  import * as React42 from "react";
3682
+ import { cva as cva15 } from "class-variance-authority";
3675
3683
  import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
3684
+ var printDocumentVariants = cva15(
3685
+ [
3686
+ "bg-white text-neutral-900",
3687
+ "flex flex-col",
3688
+ // Screen preview: paper-on-desk effect
3689
+ "screen:shadow-lg screen:border screen:border-neutral-200"
3690
+ ].join(" "),
3691
+ {
3692
+ variants: {
3693
+ size: {
3694
+ A4: "w-[210mm] min-h-[297mm]",
3695
+ Letter: "w-[8.5in] min-h-[11in]"
3696
+ },
3697
+ orientation: {
3698
+ portrait: "",
3699
+ landscape: ""
3700
+ }
3701
+ },
3702
+ compoundVariants: [
3703
+ { size: "A4", orientation: "landscape", className: "w-[297mm] min-h-[210mm]" },
3704
+ { size: "Letter", orientation: "landscape", className: "w-[11in] min-h-[8.5in]" }
3705
+ ],
3706
+ defaultVariants: {
3707
+ size: "A4",
3708
+ orientation: "portrait"
3709
+ }
3710
+ }
3711
+ );
3712
+ var PrintDocument = React42.forwardRef(
3713
+ ({ className, size, orientation, padding = "20mm", style, children, ...props }, ref) => /* @__PURE__ */ jsx44(
3714
+ "div",
3715
+ {
3716
+ ref,
3717
+ className: cn(printDocumentVariants({ size, orientation }), className),
3718
+ style: {
3719
+ padding,
3720
+ boxSizing: "border-box",
3721
+ fontFamily: 'Inter, "Noto Sans JP", sans-serif',
3722
+ fontSize: "10pt",
3723
+ lineHeight: "1.6",
3724
+ ...style
3725
+ },
3726
+ ...props,
3727
+ children
3728
+ }
3729
+ )
3730
+ );
3731
+ PrintDocument.displayName = "PrintDocument";
3732
+ var PrintHeader = React42.forwardRef(
3733
+ ({ className, logo, title, subtitle, meta, children, ...props }, ref) => /* @__PURE__ */ jsxs25("div", { ref, className: cn("mb-6", className), ...props, children: [
3734
+ /* @__PURE__ */ jsx44("div", { className: "h-1 bg-primary-500 rounded-full mb-5" }),
3735
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between pb-4 border-b border-neutral-200", children: [
3736
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
3737
+ logo && /* @__PURE__ */ jsx44("div", { className: "shrink-0", children: logo }),
3738
+ /* @__PURE__ */ jsxs25("div", { children: [
3739
+ title && /* @__PURE__ */ jsx44("h1", { className: "text-xl font-bold text-neutral-900 leading-tight", children: title }),
3740
+ subtitle && /* @__PURE__ */ jsx44("p", { className: "text-[8pt] font-medium tracking-widest uppercase text-neutral-400 mt-0.5", children: subtitle })
3741
+ ] })
3742
+ ] }),
3743
+ meta && /* @__PURE__ */ jsx44("div", { className: "text-right text-[9pt] text-neutral-600 leading-relaxed", children: meta }),
3744
+ children
3745
+ ] })
3746
+ ] })
3747
+ );
3748
+ PrintHeader.displayName = "PrintHeader";
3749
+ var PrintFooter = React42.forwardRef(
3750
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx44(
3751
+ "div",
3752
+ {
3753
+ ref,
3754
+ className: cn("mt-auto pt-4 border-t border-neutral-200 text-[8pt] text-neutral-400 text-center leading-relaxed", className),
3755
+ ...props,
3756
+ children
3757
+ }
3758
+ )
3759
+ );
3760
+ PrintFooter.displayName = "PrintFooter";
3761
+
3762
+ // src/components/print/print-table.tsx
3763
+ import * as React43 from "react";
3764
+ import { jsx as jsx45 } from "react/jsx-runtime";
3765
+ var PrintTable = React43.forwardRef(
3766
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
3767
+ "table",
3768
+ {
3769
+ ref,
3770
+ className: cn("w-full border-collapse text-[9pt]", className),
3771
+ ...props
3772
+ }
3773
+ )
3774
+ );
3775
+ PrintTable.displayName = "PrintTable";
3776
+ var PrintTableHeader = React43.forwardRef(
3777
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx45("thead", { ref, className: cn("", className), ...props })
3778
+ );
3779
+ PrintTableHeader.displayName = "PrintTableHeader";
3780
+ var PrintTableBody = React43.forwardRef(
3781
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tbody", { ref, className: cn("", className), ...props })
3782
+ );
3783
+ PrintTableBody.displayName = "PrintTableBody";
3784
+ var PrintTableFooter = React43.forwardRef(
3785
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tfoot", { ref, className: cn("", className), ...props })
3786
+ );
3787
+ PrintTableFooter.displayName = "PrintTableFooter";
3788
+ var PrintTableRow = React43.forwardRef(
3789
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
3790
+ "tr",
3791
+ {
3792
+ ref,
3793
+ className: cn("[break-inside:avoid]", className),
3794
+ ...props
3795
+ }
3796
+ )
3797
+ );
3798
+ PrintTableRow.displayName = "PrintTableRow";
3799
+ var PrintTableHead = React43.forwardRef(
3800
+ ({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx45(
3801
+ "th",
3802
+ {
3803
+ ref,
3804
+ className: cn(
3805
+ "py-1.5 px-2 font-semibold text-neutral-700 bg-neutral-50 border-b-2 border-neutral-300 text-[8pt]",
3806
+ align === "right" && "text-right",
3807
+ align === "center" && "text-center",
3808
+ align === "left" && "text-left",
3809
+ className
3810
+ ),
3811
+ ...props
3812
+ }
3813
+ )
3814
+ );
3815
+ PrintTableHead.displayName = "PrintTableHead";
3816
+ var PrintTableCell = React43.forwardRef(
3817
+ ({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx45(
3818
+ "td",
3819
+ {
3820
+ ref,
3821
+ className: cn(
3822
+ "py-1.5 px-2 border-b border-neutral-200",
3823
+ align === "right" && "text-right",
3824
+ align === "center" && "text-center",
3825
+ align === "left" && "text-left",
3826
+ className
3827
+ ),
3828
+ ...props
3829
+ }
3830
+ )
3831
+ );
3832
+ PrintTableCell.displayName = "PrintTableCell";
3833
+
3834
+ // src/components/print/print-field.tsx
3835
+ import * as React44 from "react";
3836
+ import { cva as cva16 } from "class-variance-authority";
3837
+ import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3838
+ var PrintField = React44.forwardRef(
3839
+ ({ className, label, value, children, ...props }, ref) => /* @__PURE__ */ jsxs26("div", { ref, className: cn("", className), ...props, children: [
3840
+ /* @__PURE__ */ jsx46("dt", { className: "text-[8pt] font-medium text-neutral-500 mb-0.5", children: label }),
3841
+ /* @__PURE__ */ jsx46("dd", { className: "text-[9pt] text-neutral-900", children: value ?? children })
3842
+ ] })
3843
+ );
3844
+ PrintField.displayName = "PrintField";
3845
+ var printFieldGroupVariants = cva16("grid gap-x-6 gap-y-2", {
3846
+ variants: {
3847
+ columns: {
3848
+ 1: "grid-cols-1",
3849
+ 2: "grid-cols-2",
3850
+ 3: "grid-cols-3",
3851
+ responsive: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
3852
+ }
3853
+ },
3854
+ defaultVariants: {
3855
+ columns: 2
3856
+ }
3857
+ });
3858
+ var PrintFieldGroup = React44.forwardRef(
3859
+ ({ className, columns, ...props }, ref) => /* @__PURE__ */ jsx46(
3860
+ "dl",
3861
+ {
3862
+ ref,
3863
+ className: cn(printFieldGroupVariants({ columns }), className),
3864
+ ...props
3865
+ }
3866
+ )
3867
+ );
3868
+ PrintFieldGroup.displayName = "PrintFieldGroup";
3869
+
3870
+ // src/components/print/print-divider.tsx
3871
+ import * as React45 from "react";
3872
+ import { jsx as jsx47 } from "react/jsx-runtime";
3873
+ var PrintDivider = React45.forwardRef(
3874
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
3875
+ "hr",
3876
+ {
3877
+ ref,
3878
+ className: cn("border-neutral-200 my-4", className),
3879
+ ...props
3880
+ }
3881
+ )
3882
+ );
3883
+ PrintDivider.displayName = "PrintDivider";
3884
+
3885
+ // src/components/stat-card/stat-card.tsx
3886
+ import * as React46 from "react";
3887
+ import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
3676
3888
  function inferDirection(trend) {
3677
3889
  if (!trend) return "neutral";
3678
3890
  if (trend.startsWith("+")) return "up";
@@ -3689,27 +3901,27 @@ var TREND_ICONS = {
3689
3901
  down: "M7 7l5 5 5-5",
3690
3902
  neutral: ""
3691
3903
  };
3692
- var StatCard = React42.forwardRef(
3904
+ var StatCard = React46.forwardRef(
3693
3905
  ({ className, label, value, trend, trendDirection, icon, ...props }, ref) => {
3694
3906
  const direction = trendDirection ?? inferDirection(trend);
3695
- return /* @__PURE__ */ jsxs25(
3907
+ return /* @__PURE__ */ jsxs27(
3696
3908
  "div",
3697
3909
  {
3698
3910
  ref,
3699
3911
  className: cn(
3700
- "rounded-xl border border-[var(--color-border)] bg-[var(--color-surface-raised)] p-5",
3912
+ "rounded-xl border border-[var(--color-border)] bg-[var(--color-surface-raised)] p-4 sm:p-5",
3701
3913
  className
3702
3914
  ),
3703
3915
  ...props,
3704
3916
  children: [
3705
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
3706
- /* @__PURE__ */ jsx44("p", { className: "text-xs font-medium text-[var(--color-on-surface-muted)] uppercase tracking-wider", children: label }),
3707
- icon && /* @__PURE__ */ jsx44("span", { className: "text-[var(--color-on-surface-muted)]", children: icon })
3917
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between", children: [
3918
+ /* @__PURE__ */ jsx48("p", { className: "text-xs font-medium text-[var(--color-on-surface-muted)] uppercase tracking-wider", children: label }),
3919
+ icon && /* @__PURE__ */ jsx48("span", { className: "text-[var(--color-on-surface-muted)]", children: icon })
3708
3920
  ] }),
3709
- /* @__PURE__ */ jsxs25("div", { className: "flex items-baseline gap-2 mt-2", children: [
3710
- /* @__PURE__ */ jsx44("span", { className: "text-2xl font-bold tabular-nums", children: value }),
3711
- trend && /* @__PURE__ */ jsxs25("span", { className: cn("inline-flex items-center gap-0.5 text-xs font-medium", TREND_STYLES[direction]), children: [
3712
- direction !== "neutral" && /* @__PURE__ */ jsx44("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx44("path", { d: TREND_ICONS[direction] }) }),
3921
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-baseline gap-2 mt-2", children: [
3922
+ /* @__PURE__ */ jsx48("span", { className: "text-xl sm:text-2xl font-bold tabular-nums", children: value }),
3923
+ trend && /* @__PURE__ */ jsxs27("span", { className: cn("inline-flex items-center gap-0.5 text-xs font-medium", TREND_STYLES[direction]), children: [
3924
+ 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] }) }),
3713
3925
  trend
3714
3926
  ] })
3715
3927
  ] })
@@ -3721,10 +3933,10 @@ var StatCard = React42.forwardRef(
3721
3933
  StatCard.displayName = "StatCard";
3722
3934
 
3723
3935
  // src/components/chart-container/chart-container.tsx
3724
- import * as React43 from "react";
3725
- import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
3726
- var ChartContainer = React43.forwardRef(
3727
- ({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs26(
3936
+ import * as React47 from "react";
3937
+ import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
3938
+ var ChartContainer = React47.forwardRef(
3939
+ ({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs28(
3728
3940
  "div",
3729
3941
  {
3730
3942
  ref,
@@ -3734,14 +3946,14 @@ var ChartContainer = React43.forwardRef(
3734
3946
  ),
3735
3947
  ...props,
3736
3948
  children: [
3737
- /* @__PURE__ */ jsxs26("div", { className: "flex items-start justify-between gap-4 p-5 pb-0", children: [
3738
- /* @__PURE__ */ jsxs26("div", { children: [
3739
- /* @__PURE__ */ jsx45("h3", { className: "text-sm font-semibold leading-none tracking-tight", children: title }),
3740
- description && /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description })
3949
+ /* @__PURE__ */ jsxs28("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: [
3950
+ /* @__PURE__ */ jsxs28("div", { children: [
3951
+ /* @__PURE__ */ jsx49("h3", { className: "text-sm font-semibold leading-none tracking-tight", children: title }),
3952
+ description && /* @__PURE__ */ jsx49("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description })
3741
3953
  ] }),
3742
- actions && /* @__PURE__ */ jsx45("div", { className: "flex items-center gap-2 shrink-0", children: actions })
3954
+ actions && /* @__PURE__ */ jsx49("div", { className: "flex items-center gap-2 shrink-0", children: actions })
3743
3955
  ] }),
3744
- /* @__PURE__ */ jsx45("div", { className: "p-5", children })
3956
+ /* @__PURE__ */ jsx49("div", { className: "p-4 sm:p-5", children })
3745
3957
  ]
3746
3958
  }
3747
3959
  )
@@ -3926,6 +4138,19 @@ export {
3926
4138
  PopoverAnchor,
3927
4139
  PopoverContent,
3928
4140
  PopoverTrigger,
4141
+ PrintDivider,
4142
+ PrintDocument,
4143
+ PrintField,
4144
+ PrintFieldGroup,
4145
+ PrintFooter,
4146
+ PrintHeader,
4147
+ PrintTable,
4148
+ PrintTableBody,
4149
+ PrintTableCell,
4150
+ PrintTableFooter,
4151
+ PrintTableHead,
4152
+ PrintTableHeader,
4153
+ PrintTableRow,
3929
4154
  PullToRefresh,
3930
4155
  RadioGroup,
3931
4156
  RadioGroupItem,
@@ -3977,6 +4202,8 @@ export {
3977
4202
  formLayoutVariants,
3978
4203
  getFieldComponent,
3979
4204
  inputVariants,
4205
+ printDocumentVariants,
4206
+ printFieldGroupVariants,
3980
4207
  spinnerVariants,
3981
4208
  switchVariants,
3982
4209
  textareaVariants,