@alexgorbatchev/shadcn 0.0.61 → 0.0.63

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.
@@ -4,12 +4,19 @@ import {
4
4
 
5
5
  // src/components/Table.tsx
6
6
  import { jsx } from "react/jsx-runtime";
7
- function Table2({ density, className, dir, layout = "auto", ...props }) {
7
+ function Table2({
8
+ density,
9
+ className,
10
+ dir,
11
+ layout = "auto",
12
+ scrollContainer = "self",
13
+ ...props
14
+ }) {
8
15
  return /* @__PURE__ */ jsx("div", {
9
16
  "data-density": density,
10
17
  "data-slot": "table-container",
11
18
  dir,
12
- className: cn2("@container/table relative min-w-0 w-full", layout === "fixed" ? "overflow-x-hidden" : "overflow-x-auto"),
19
+ className: cn2("@container/table relative min-w-0 w-full", scrollContainer === "parent" ? "overflow-visible" : layout === "fixed" ? "overflow-x-hidden" : "overflow-x-auto"),
13
20
  children: /* @__PURE__ */ jsx("table", {
14
21
  "data-slot": "table",
15
22
  dir,
@@ -18,11 +25,11 @@ function Table2({ density, className, dir, layout = "auto", ...props }) {
18
25
  })
19
26
  });
20
27
  }
21
- function TableHeader2({ density, className, ...props }) {
28
+ function TableHeader2({ density, className, sticky = false, ...props }) {
22
29
  return /* @__PURE__ */ jsx("thead", {
23
30
  "data-density": density,
24
31
  "data-slot": "table-header",
25
- className: cn2("[&_tr]:border-b", className),
32
+ className: cn2("[&_tr]:border-b", sticky && "sticky top-0 z-10 bg-background", className),
26
33
  ...props
27
34
  });
28
35
  }
@@ -2,7 +2,7 @@ import {
2
2
  Table2,
3
3
  TableHeader2,
4
4
  TableBody2
5
- } from "./chunk-tmr0jqv8.js";
5
+ } from "./chunk-4sk3r1hg.js";
6
6
 
7
7
  // src/components/virtual-table/VirtualTable.tsx
8
8
  import {
@@ -58,12 +58,14 @@ function VirtualTable2({
58
58
  setFocusedKey(getItemKey(item));
59
59
  },
60
60
  children: /* @__PURE__ */ jsxs(Table2, {
61
+ scrollContainer: "parent",
61
62
  layout,
62
63
  "aria-label": label,
63
64
  "aria-rowcount": items.length + 1,
64
65
  children: [
65
66
  columns,
66
67
  /* @__PURE__ */ jsx(TableHeader2, {
68
+ sticky: true,
67
69
  children: header
68
70
  }),
69
71
  /* @__PURE__ */ jsxs(TableBody2, {
@@ -24,7 +24,7 @@ import {
24
24
  TableHead2,
25
25
  TableCell2,
26
26
  TableCaption2
27
- } from "./chunk-tmr0jqv8.js";
27
+ } from "./chunk-4sk3r1hg.js";
28
28
  import {
29
29
  safeHref
30
30
  } from "./chunk-xhtsnwnb.js";
@@ -10,7 +10,7 @@ import {
10
10
  TableCell2,
11
11
  TableColumnGroup2,
12
12
  TableColumn2
13
- } from "./chunk-tmr0jqv8.js";
13
+ } from "./chunk-4sk3r1hg.js";
14
14
  import {
15
15
  OptionSelect2
16
16
  } from "./chunk-p6z2m3zp.js";
@@ -3,10 +3,13 @@ import type { ComponentProps, ReactElement } from "react";
3
3
  import type { TextAlign } from "../typography/types.js";
4
4
  type TableProps = ComponentProps<"table"> & IDensityProps & {
5
5
  layout?: "auto" | "fixed";
6
+ scrollContainer?: "self" | "parent";
6
7
  };
7
- declare function Table({ density, className, dir, layout, ...props }: TableProps): ReactElement;
8
- type TableHeaderProps = ComponentProps<"thead"> & IDensityProps;
9
- declare function TableHeader({ density, className, ...props }: TableHeaderProps): ReactElement;
8
+ declare function Table({ density, className, dir, layout, scrollContainer, ...props }: TableProps): ReactElement;
9
+ type TableHeaderProps = ComponentProps<"thead"> & IDensityProps & {
10
+ sticky?: boolean;
11
+ };
12
+ declare function TableHeader({ density, className, sticky, ...props }: TableHeaderProps): ReactElement;
10
13
  type TableBodyProps = ComponentProps<"tbody"> & IDensityProps;
11
14
  declare function TableBody({ density, className, ...props }: TableBodyProps): ReactElement;
12
15
  type TableFooterProps = ComponentProps<"tfoot"> & IDensityProps;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  DataTable2
3
- } from "../../../chunk-98s6zk9v.js";
3
+ } from "../../../chunk-dfy3e5tq.js";
4
4
  import"../../../chunk-1wz92wgg.js";
5
- import"../../../chunk-tmr0jqv8.js";
5
+ import"../../../chunk-4sk3r1hg.js";
6
6
  import"../../../chunk-k1f35j55.js";
7
7
  import"../../../chunk-m4geb1s5.js";
8
8
  import"../../../chunk-9t530p75.js";
@@ -203,8 +203,8 @@ import"../../chunk-1wz92wgg.js";
203
203
  import"../../chunk-9t530p75.js";
204
204
  import {
205
205
  DataTable2
206
- } from "../../chunk-98s6zk9v.js";
207
- import"../../chunk-tmr0jqv8.js";
206
+ } from "../../chunk-dfy3e5tq.js";
207
+ import"../../chunk-4sk3r1hg.js";
208
208
  import {
209
209
  DaySeparator2
210
210
  } from "../../chunk-3j9enr2q.js";
@@ -7,7 +7,7 @@ import {
7
7
  DataGridColumnHeader2,
8
8
  DataGridFilter2,
9
9
  DataGridPagination2
10
- } from "../../chunk-8m97h03v.js";
10
+ } from "../../chunk-sha0bfg0.js";
11
11
  import"../../chunk-7ny0vyek.js";
12
12
  import"../../chunk-8ssktt4b.js";
13
13
  import"../../chunk-en44w1pn.js";
@@ -17,7 +17,7 @@ import"../../chunk-jpvw9xqy.js";
17
17
  import {
18
18
  Button2
19
19
  } from "../../chunk-bd09gygt.js";
20
- import"../../chunk-tmr0jqv8.js";
20
+ import"../../chunk-4sk3r1hg.js";
21
21
  import"../../chunk-p6z2m3zp.js";
22
22
  import"../../chunk-7jpsybag.js";
23
23
  import"../../chunk-7vg045gd.js";
@@ -28,7 +28,7 @@ import {
28
28
  TableRow2,
29
29
  TableHead2,
30
30
  TableCell2
31
- } from "../../chunk-tmr0jqv8.js";
31
+ } from "../../chunk-4sk3r1hg.js";
32
32
  import"../../chunk-5mydsjp3.js";
33
33
 
34
34
  // src/components/gantt/Gantt.tsx
@@ -145,7 +145,7 @@ import {
145
145
  TableHead2,
146
146
  TableCell2,
147
147
  TableCaption2
148
- } from "../../chunk-tmr0jqv8.js";
148
+ } from "../../chunk-4sk3r1hg.js";
149
149
  import"../../chunk-7vnpp3ya.js";
150
150
  import"../../chunk-m4geb1s5.js";
151
151
  import"../../chunk-9ecf92s6.js";
@@ -1,7 +1,7 @@
1
1
  import"../../chunk-en44w1pn.js";
2
2
  import {
3
3
  TableRow2
4
- } from "../../chunk-tmr0jqv8.js";
4
+ } from "../../chunk-4sk3r1hg.js";
5
5
  import {
6
6
  DataGridColumnFitContext,
7
7
  getDataGridColumnFit,
@@ -10,7 +10,7 @@ import {
10
10
  DataGridHeaderRows,
11
11
  DataGridCells2,
12
12
  DataGridColumns
13
- } from "../../chunk-8m97h03v.js";
13
+ } from "../../chunk-sha0bfg0.js";
14
14
  import"../../chunk-7ny0vyek.js";
15
15
  import"../../chunk-8ssktt4b.js";
16
16
  import"../../chunk-e6hk39ev.js";
@@ -22,7 +22,7 @@ import"../../chunk-7jpsybag.js";
22
22
  import"../../chunk-7vg045gd.js";
23
23
  import {
24
24
  VirtualTable2
25
- } from "../../chunk-bmyw7q4w.js";
25
+ } from "../../chunk-82swja0b.js";
26
26
  import"../../chunk-5mydsjp3.js";
27
27
 
28
28
  // src/components/virtual-data-grid/VirtualDataGrid.tsx
@@ -1,8 +1,8 @@
1
1
  import"../../chunk-en44w1pn.js";
2
- import"../../chunk-tmr0jqv8.js";
2
+ import"../../chunk-4sk3r1hg.js";
3
3
  import {
4
4
  VirtualTable2
5
- } from "../../chunk-bmyw7q4w.js";
5
+ } from "../../chunk-82swja0b.js";
6
6
  export {
7
7
  VirtualTable2 as VirtualTable
8
8
  };
package/dist/index.js CHANGED
@@ -260,7 +260,7 @@ import {
260
260
  TableColumnGroup2,
261
261
  TableColumn2,
262
262
  TableCaption2
263
- } from "./chunk-tmr0jqv8.js";
263
+ } from "./chunk-4sk3r1hg.js";
264
264
  import {
265
265
  ScrollArea2,
266
266
  ScrollBar2
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.61",
2054
+ version: "0.0.63",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -3447,7 +3447,8 @@ var package_default = {
3447
3447
  "@vitest/coverage-istanbul@4.1.11": "patches/@vitest%2Fcoverage-istanbul@4.1.11.patch",
3448
3448
  "storybook@10.6.1": "patches/storybook@10.6.1.patch",
3449
3449
  "uncontrollable@7.2.1": "patches/uncontrollable@7.2.1.patch",
3450
- "@headless-tree/core@1.8.0": "patches/@headless-tree%2Fcore@1.8.0.patch"
3450
+ "@headless-tree/core@1.8.0": "patches/@headless-tree%2Fcore@1.8.0.patch",
3451
+ "@base-ui/react@1.9.0": "patches/@base-ui%2Freact@1.9.0.patch"
3451
3452
  }
3452
3453
  };
3453
3454
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {