@jinaan/uikit 0.1.44 → 0.1.46

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"}
@@ -27,6 +27,10 @@ interface TableSurfaceProps {
27
27
  headerClassName?: string;
28
28
  /** Inner panel overrides (background, border color, …). */
29
29
  panelClassName?: string;
30
+ /** Optional footer strip in the outer shell, below the panel (hairline top border). */
31
+ footer?: ReactNode;
32
+ /** Footer strip overrides (padding, colors, …). */
33
+ footerClassName?: string;
30
34
  /** Minimum panel height; keeps empty states from collapsing. */
31
35
  minHeight?: string;
32
36
  /**
@@ -46,6 +50,6 @@ interface TableSurfaceProps {
46
50
  * Colors come from the `--table-*` tokens and can be adjusted per surface with
47
51
  * `tone` plus `headerClassName` / `panelClassName`.
48
52
  */
49
- export declare function TableSurface({ title, description, header, children, action, tone, className, headerClassName, panelClassName, minHeight, scrollMode, headerContentRef, }: TableSurfaceProps): import("react").JSX.Element;
53
+ export declare function TableSurface({ title, description, header, children, action, tone, className, headerClassName, panelClassName, footer, footerClassName, minHeight, scrollMode, headerContentRef, }: TableSurfaceProps): import("react").JSX.Element;
50
54
  export {};
51
55
  //# sourceMappingURL=table-surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-surface.d.ts","sourceRoot":"","sources":["../src/table-surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAM5C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,iBAAiB;IACzB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE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AE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,iBAAiB;IACzB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,yDAAyD;IACzD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,SAAS,GAAG,kBAAkB,CAAC;IACxC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uFAAuF;IACvF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAyBD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAgB,EAChB,SAAS,EACT,eAAe,EACf,cAAc,EACd,MAAM,EACN,eAAe,EACf,SAAS,EACT,UAAsB,EACtB,gBAAgB,GACjB,EAAE,iBAAiB,+BAiGnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jinaan/uikit",
3
- "version": "0.1.44",
3
+ "version": "0.1.46",
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
  }
@@ -34,6 +34,10 @@ interface TableSurfaceProps {
34
34
  headerClassName?: string;
35
35
  /** Inner panel overrides (background, border color, …). */
36
36
  panelClassName?: string;
37
+ /** Optional footer strip in the outer shell, below the panel (hairline top border). */
38
+ footer?: ReactNode;
39
+ /** Footer strip overrides (padding, colors, …). */
40
+ footerClassName?: string;
37
41
  /** Minimum panel height; keeps empty states from collapsing. */
38
42
  minHeight?: string;
39
43
  /**
@@ -87,6 +91,8 @@ export function TableSurface({
87
91
  className,
88
92
  headerClassName,
89
93
  panelClassName,
94
+ footer,
95
+ footerClassName,
90
96
  minHeight,
91
97
  scrollMode = "surface",
92
98
  headerContentRef,
@@ -170,6 +176,16 @@ export function TableSurface({
170
176
  {panel}
171
177
  </div>
172
178
  )}
179
+ {footer ? (
180
+ <div
181
+ className={cn(
182
+ "border-t border-line px-(--table-pad-x) py-3 text-table-header",
183
+ footerClassName,
184
+ )}
185
+ >
186
+ {footer}
187
+ </div>
188
+ ) : null}
173
189
  {actionNode ? (
174
190
  <div className="pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center">
175
191
  <div className="pointer-events-auto">{actionNode}</div>