Files
vexplor_dev/frontend/components/ui/table.tsx
DDD1542 f179a575ab feat: add shipping plan page with search and detail editing functionality
- Implemented the ShippingPlanPage component for managing shipment plans.
- Added search filters for date range, status, customer, and keywords.
- Integrated table for displaying shipment plans with grouping and selection features.
- Included detail panel for editing plan quantity, date, and memo with validation.
- Enhanced table readability with CSS adjustments for cell padding and hover effects.

style: improve global styles for table readability

- Adjusted padding and font sizes for table cells and headers.
- Added striped background for even rows and hover effects for better visibility.

fix: update TableSettingsModal for better overflow handling

- Modified modal layout to ensure proper scrolling for content overflow.
- Ensured drag-and-drop functionality for column settings remains intact.

chore: register new routes for COMPANY_7 and COMPANY_16 features

- Added dynamic imports for new pages related to purchase, logistics, quality, and design for COMPANY_7 and COMPANY_16.
2026-04-03 09:28:43 +09:00

85 lines
2.4 KiB
TypeScript

"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
interface TableProps extends React.ComponentProps<"table"> {
noWrapper?: boolean;
divClassName?: string;
}
function Table({ className, noWrapper, divClassName, ...props }: TableProps) {
if (noWrapper) {
return <table data-slot="table" className={cn("w-full caption-bottom text-sm", className)} {...props} />;
}
return (
<div data-slot="table-container" className={cn("relative w-full overflow-x-auto", divClassName)}>
<table data-slot="table" className={cn("w-full caption-bottom text-sm", className)} {...props} />
</div>
);
}
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
return <thead data-slot="table-header" className={cn("[&_tr]:border-b", className)} {...props} />;
}
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
return <tbody data-slot="table-body" className={cn(className)} {...props} />;
}
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
return (
<tfoot
data-slot="table-footer"
className={cn("bg-muted/50 font-medium", className)}
{...props}
/>
);
}
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
return (
<tr
data-slot="table-row"
className={cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className)}
{...props}
/>
);
}
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
return (
<th
data-slot="table-head"
className={cn(
"text-foreground h-10 px-3.5 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className,
)}
{...props}
/>
);
}
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
return (
<td
data-slot="table-cell"
className={cn(
"px-3.5 py-2.5 align-middle whitespace-nowrap text-[13px] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className,
)}
{...props}
/>
);
}
function TableCaption({ className, ...props }: React.ComponentProps<"caption">) {
return (
<caption data-slot="table-caption" className={cn("text-muted-foreground mt-4 text-sm", className)} {...props} />
);
}
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };