@alexgorbatchev/shadcn 0.0.29 → 0.0.30

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.
@@ -21,7 +21,7 @@ import {
21
21
  TableHead2,
22
22
  TableCell2,
23
23
  TableCaption2
24
- } from "./chunk-v0k5jnk5.js";
24
+ } from "./chunk-zte6pw69.js";
25
25
  import {
26
26
  safeHref
27
27
  } from "./chunk-xhtsnwnb.js";
@@ -103,10 +103,11 @@ function TableColumnGroup2(props) {
103
103
  ...props
104
104
  });
105
105
  }
106
- function TableColumn2({ className, visibleFrom, ...props }) {
106
+ function TableColumn2({ className, style, visibleFrom, width, ...props }) {
107
107
  return /* @__PURE__ */ jsx("col", {
108
108
  "data-slot": "table-column",
109
109
  className: cn2(visibleFrom && columnVisibilityClasses[visibleFrom], className),
110
+ style: width === undefined ? style : { ...style, width },
110
111
  ...props
111
112
  });
112
113
  }
@@ -25,9 +25,12 @@ type TableCellProps = ComponentProps<"td"> & IDensityProps & ITableCellOptions;
25
25
  declare function TableCell({ density, className, truncate, textAlign, visibleFrom, ...props }: TableCellProps): ReactElement;
26
26
  type TableColumnGroupProps = ComponentProps<"colgroup">;
27
27
  declare function TableColumnGroup(props: TableColumnGroupProps): ReactElement;
28
- type TableColumnProps = ComponentProps<"col"> & Pick<ITableCellOptions, "visibleFrom">;
29
- /** A sized column; give it the same `visibleFrom` as its header and cells. */
30
- declare function TableColumn({ className, visibleFrom, ...props }: TableColumnProps): ReactElement;
28
+ type TableColumnProps = ComponentProps<"col"> & Pick<ITableCellOptions, "visibleFrom"> & {
29
+ /** Fixed column width; numbers are pixels. Columns without one share the remaining width. */
30
+ width?: number | string;
31
+ };
32
+ /** A column; give it the same `visibleFrom` as its header and cells. */
33
+ declare function TableColumn({ className, style, visibleFrom, width, ...props }: TableColumnProps): ReactElement;
31
34
  type TableCaptionProps = ComponentProps<"caption"> & IDensityProps;
32
35
  declare function TableCaption({ density, className, ...props }: TableCaptionProps): ReactElement;
33
36
  export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, TableColumnGroup, TableColumn, };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  DataTable2
3
- } from "../../../chunk-3z5gpbh0.js";
3
+ } from "../../../chunk-987zth0a.js";
4
4
  import"../../../chunk-1wz92wgg.js";
5
- import"../../../chunk-v0k5jnk5.js";
5
+ import"../../../chunk-zte6pw69.js";
6
6
  import"../../../chunk-bygq5yqf.js";
7
7
  import"../../../chunk-wjx6zf94.js";
8
8
  import"../../../chunk-q7p28b89.js";
@@ -199,8 +199,8 @@ import"../../chunk-1wz92wgg.js";
199
199
  import"../../chunk-wjx6zf94.js";
200
200
  import {
201
201
  DataTable2
202
- } from "../../chunk-3z5gpbh0.js";
203
- import"../../chunk-v0k5jnk5.js";
202
+ } from "../../chunk-987zth0a.js";
203
+ import"../../chunk-zte6pw69.js";
204
204
  import {
205
205
  DaySeparator2
206
206
  } from "../../chunk-jhw9q2eq.js";
@@ -9,7 +9,7 @@ import {
9
9
  TableRow2,
10
10
  TableHead2,
11
11
  TableCell2
12
- } from "../../chunk-v0k5jnk5.js";
12
+ } from "../../chunk-zte6pw69.js";
13
13
  import {
14
14
  NativeSelect2,
15
15
  NativeSelectOption2
@@ -24,7 +24,7 @@ import {
24
24
  TableRow2,
25
25
  TableHead2,
26
26
  TableCell2
27
- } from "../../chunk-v0k5jnk5.js";
27
+ } from "../../chunk-zte6pw69.js";
28
28
 
29
29
  // src/components/gantt/Gantt.tsx
30
30
  import { useId, useState } from "react";
@@ -3,7 +3,7 @@ import {
3
3
  Table2,
4
4
  TableHeader2,
5
5
  TableBody2
6
- } from "../../chunk-v0k5jnk5.js";
6
+ } from "../../chunk-zte6pw69.js";
7
7
 
8
8
  // src/components/virtual-table/VirtualTable.tsx
9
9
  import {
package/dist/index.js CHANGED
@@ -198,7 +198,7 @@ import {
198
198
  TableColumnGroup2,
199
199
  TableColumn2,
200
200
  TableCaption2
201
- } from "./chunk-v0k5jnk5.js";
201
+ } from "./chunk-zte6pw69.js";
202
202
  import {
203
203
  NativeSelect2,
204
204
  NativeSelectOption2,
@@ -266,7 +266,7 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
266
266
  <Table layout="fixed">
267
267
  <TableColumnGroup>
268
268
  <TableColumn />
269
- <TableColumn visibleFrom="container-sm" style={{ width: 60 }}/>
269
+ <TableColumn visibleFrom="container-sm" width={60}/>
270
270
  </TableColumnGroup>
271
271
  <TableHeader>
272
272
  <TableRow>
@@ -62,8 +62,8 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
62
62
  args: {
63
63
  columns: (<TableColumnGroup>
64
64
  <TableColumn />
65
- <TableColumn visibleFrom="container-sm" style={{ width: 80 }}/>
66
- <TableColumn style={{ width: 60 }}/>
65
+ <TableColumn visibleFrom="container-sm" width={80}/>
66
+ <TableColumn width={60}/>
67
67
  </TableColumnGroup>),
68
68
  header: (<TableRow>
69
69
  <TableHead scope="col">Name</TableHead>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {