@izumisy-tailor/tailor-data-viewer 0.1.50 → 0.1.51

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@izumisy-tailor/tailor-data-viewer",
3
3
  "private": false,
4
- "version": "0.1.50",
4
+ "version": "0.1.51",
5
5
  "type": "module",
6
6
  "description": "Flexible data viewer component for Tailor Platform",
7
7
  "files": [
@@ -272,7 +272,7 @@ export function DataTable(props: DataTableProps = {}) {
272
272
 
273
273
  return (
274
274
  <>
275
- <div className="rounded-md border">
275
+ <div className="rounded-md border bg-background">
276
276
  <Table>
277
277
  <TableHeader>
278
278
  <TableRow>
@@ -4,7 +4,12 @@ import * as React from "react";
4
4
 
5
5
  import { cn } from "../lib/utils";
6
6
 
7
- function Table({ className, ...props }: React.ComponentProps<"table">) {
7
+ interface TableProps extends React.ComponentProps<"table"> {
8
+ /** Table layout algorithm. Defaults to "fixed" to respect explicit column widths. */
9
+ tableLayout?: "fixed" | "auto";
10
+ }
11
+
12
+ function Table({ className, tableLayout = "fixed", ...props }: TableProps) {
8
13
  return (
9
14
  <div
10
15
  data-slot="table-container"
@@ -12,7 +17,11 @@ function Table({ className, ...props }: React.ComponentProps<"table">) {
12
17
  >
13
18
  <table
14
19
  data-slot="table"
15
- className={cn("w-full caption-bottom text-sm", className)}
20
+ className={cn(
21
+ "w-full caption-bottom text-sm",
22
+ tableLayout === "fixed" ? "table-fixed" : "table-auto",
23
+ className,
24
+ )}
16
25
  {...props}
17
26
  />
18
27
  </div>