@jinaan/uikit 0.1.44 → 0.1.45

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.
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
2
2
  interface TableEmptyStateProps {
3
3
  icon?: ReactNode;
4
4
  title: string;
5
- description?: string;
5
+ description?: ReactNode;
6
6
  action?: ReactNode;
7
7
  className?: string;
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"table-empty-state.d.ts","sourceRoot":"","sources":["../src/table-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,oBAAoB,+BA4BtB"}
1
+ {"version":3,"file":"table-empty-state.d.ts","sourceRoot":"","sources":["../src/table-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,oBAAoB,+BA4BtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jinaan/uikit",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "Reusable React and Tailwind UI components for Jinaan projects.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -160,6 +160,10 @@ interface DataTableProps<T> {
160
160
 
161
161
  /** Surface preset for the table card. */
162
162
  tone?: TableSurfaceTone;
163
+ /** Title shown in the card's top band, above the column header. */
164
+ title?: ReactNode;
165
+ /** Supporting text under the title band. */
166
+ description?: ReactNode;
163
167
  /** Optional action pinned to the top-right of the header band. */
164
168
  headerAction?: ReactNode | TableSurfaceAction;
165
169
  /** Header band color/style overrides. */
@@ -237,6 +241,8 @@ export function DataTable<T>({
237
241
  pageSizeOptions = [10, 25, 50, 100],
238
242
  pagination = "auto",
239
243
  tone,
244
+ title,
245
+ description,
240
246
  headerAction,
241
247
  headerClassName,
242
248
  panelClassName,
@@ -728,6 +734,8 @@ export function DataTable<T>({
728
734
  headerContentRef={bandContentRef}
729
735
  action={headerAction}
730
736
  tone={tone}
737
+ title={title}
738
+ description={description}
731
739
  headerClassName={headerClassName}
732
740
  panelClassName={panelClassName}
733
741
  header={
@@ -850,7 +858,7 @@ export function DataTable<T>({
850
858
  <TableEmptyState
851
859
  icon={empty?.icon}
852
860
  title={empty?.title ?? "No results"}
853
- description={typeof empty?.description === "string" ? empty.description : undefined}
861
+ description={empty?.description}
854
862
  action={empty?.action}
855
863
  />
856
864
  ) : (
@@ -5,7 +5,7 @@ import { cn } from "./utils";
5
5
  interface TableEmptyStateProps {
6
6
  icon?: ReactNode;
7
7
  title: string;
8
- description?: string;
8
+ description?: ReactNode;
9
9
  action?: ReactNode;
10
10
  className?: string;
11
11
  }