@versini/ui-datagrid 0.2.3 → 0.3.0

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -52,9 +52,10 @@ import clsx from "clsx";
52
52
  spinnerWrapper: overlayClasses?.spinnerWrapper ?? "",
53
53
  spinner: overlayClasses?.spinner ?? "",
54
54
  // Outer wrapper - overflow-hidden when sticky, like Panel's outerWrapper.
55
+ // Uses flex layout when sticky to allow scrollableContent to respect max-height.
55
56
  wrapper: clsx("not-prose relative w-full rounded-lg shadow-md", {
56
57
  "overflow-x-auto": !hasSticky && !disabled,
57
- "overflow-hidden": hasSticky || disabled,
58
+ "overflow-hidden flex flex-col": hasSticky || disabled,
58
59
  "bg-surface-darker": mode === "dark" || mode === "system",
59
60
  "bg-surface-light": mode === "light" || mode === "alt-system",
60
61
  "dark:bg-surface-light": mode === "system",
@@ -69,7 +70,9 @@ import clsx from "clsx";
69
70
  * Header height varies based on whether caption is present:
70
71
  * - pt-10 (40px): header row only
71
72
  * - pt-19 (76px): header row + caption
72
- */ scrollableContent: clsx("overflow-y-auto overflow-x-hidden rounded-[inherit]", {
73
+ */ scrollableContent: clsx(// flex-1 + min-h-0 allows this to shrink within flex parent and enable scrolling.
74
+ // min-h-0 overrides the default min-height:auto that prevents flex items from shrinking.
75
+ "overflow-y-auto overflow-x-hidden rounded-[inherit] flex-1 min-h-0", {
73
76
  "pt-10": stickyHeader && !hasCaption,
74
77
  "pt-19": stickyHeader && hasCaption,
75
78
  "pb-10": stickyFooter
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,11 +1,13 @@
1
1
  import type { DataGridCellProps } from "../DataGrid/DataGridTypes";
2
2
  import { type CellWrapperType, type ThemeMode } from "../DataGridConstants";
3
- export declare const getCellClasses: ({ cellWrapper, className, compact, align, active, mode, }: {
3
+ export declare const getCellClasses: ({ cellWrapper, className, compact, align, active, mode, borderLeft, borderRight, }: {
4
4
  cellWrapper?: CellWrapperType;
5
5
  className?: string;
6
6
  mode?: ThemeMode;
7
7
  compact?: boolean;
8
8
  align?: "left" | "center" | "right";
9
9
  active?: boolean;
10
+ borderLeft?: boolean;
11
+ borderRight?: boolean;
10
12
  }) => string;
11
- export declare const DataGridCell: ({ className, children, align, active, colSpan, style, ...rest }: DataGridCellProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const DataGridCell: ({ className, children, align, active, borderLeft, borderRight, colSpan, style, ...rest }: DataGridCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -21,7 +21,7 @@ import { CellWrapper } from "../DataGridConstants/index.js";
21
21
 
22
22
 
23
23
 
24
- const getCellClasses = ({ cellWrapper, className, compact, align, active, mode })=>{
24
+ const getCellClasses = ({ cellWrapper, className, compact, align, active, mode, borderLeft, borderRight })=>{
25
25
  const isHeader = cellWrapper === CellWrapper.HEADER;
26
26
  const mainClasses = clsx(// Base padding.
27
27
  {
@@ -42,6 +42,18 @@ const getCellClasses = ({ cellWrapper, className, compact, align, active, mode }
42
42
  "before:bg-table-active-light": active && mode === "light",
43
43
  "before:bg-table-active-dark dark:before:bg-table-active-light": active && mode === "system",
44
44
  "before:bg-table-active-light dark:before:bg-table-active-dark": active && mode === "alt-system"
45
+ }, // Vertical borders.
46
+ // self-stretch ensures border spans full row height in grid layout.
47
+ {
48
+ "self-stretch": borderLeft || borderRight,
49
+ "border-l border-l-table-dark": borderLeft && mode === "dark",
50
+ "border-l border-l-table-light": borderLeft && mode === "light",
51
+ "border-l border-l-table-dark dark:border-l-table-light": borderLeft && mode === "system",
52
+ "border-l border-l-table-light dark:border-l-table-dark": borderLeft && mode === "alt-system",
53
+ "border-r border-r-table-dark": borderRight && mode === "dark",
54
+ "border-r border-r-table-light": borderRight && mode === "light",
55
+ "border-r border-r-table-dark dark:border-r-table-light": borderRight && mode === "system",
56
+ "border-r border-r-table-light dark:border-r-table-dark": borderRight && mode === "alt-system"
45
57
  }, className);
46
58
  return mainClasses;
47
59
  };
@@ -55,7 +67,7 @@ const getCellClasses = ({ cellWrapper, className, compact, align, active, mode }
55
67
  };
56
68
  /* =============================================================================
57
69
  * DataGridCell
58
- * ========================================================================== */ const DataGridCell = ({ className, children, align, active, colSpan, style, ...rest })=>{
70
+ * ========================================================================== */ const DataGridCell = ({ className, children, align, active, borderLeft, borderRight, colSpan, style, ...rest })=>{
59
71
  return /*#__PURE__*/ jsx(DataGridContext.Consumer, {
60
72
  children: ({ mode, compact, cellWrapper })=>{
61
73
  const mainClasses = getCellClasses({
@@ -64,7 +76,9 @@ const getCellClasses = ({ cellWrapper, className, compact, align, active, mode }
64
76
  mode,
65
77
  compact,
66
78
  align,
67
- active
79
+ active,
80
+ borderLeft,
81
+ borderRight
68
82
  });
69
83
  const role = getCellRole(cellWrapper);
70
84
  // Apply grid-column span for colSpan > 1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-datagrid v0.2.3
2
+ @versini/ui-datagrid v0.3.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-datagrid",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -94,5 +94,5 @@
94
94
  "sideEffects": [
95
95
  "**/*.css"
96
96
  ],
97
- "gitHead": "e82cbf23cd8790099a81e5520e7d6a2c7df51ec9"
97
+ "gitHead": "f67b8a86233049086793d0b19d160c25fbfc0828"
98
98
  }