it-data-nexus-ui-library 2.9.1 → 2.9.2
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 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Caption as i,Body2 as l}from"../Typography.mjs";import{Stack as o}from"../_Primitives/Stack.mjs";import{ChartFrame as t}from"./chartFrame.mjs";function a({rows:a,columns:n,cells:s,statusMap:d,
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Caption as i,Body2 as l}from"../Typography.mjs";import{Stack as o}from"../_Primitives/Stack.mjs";import{ChartFrame as t}from"./chartFrame.mjs";function a({rows:a,columns:n,cells:s,statusMap:d,cellMinHeight:c=40,cellIconSize:m=22,sx:p,title:x,titleComponent:b,titleSx:h,titleHidden:g,description:u,actions:f,isLoading:$,isError:w,errorMessage:y,paperSx:H}){const S=new Map(s.map(e=>[`${e.rowId}:${e.columnId}`,e]));return e(t,{title:x,titleComponent:b,titleSx:h,titleHidden:g,description:u,actions:f,isLoading:$,isError:w,errorMessage:y,paperSx:H,children:r(o,{sx:[{gap:.5},...Array.isArray(p)?p:p?[p]:[]],role:"table","aria-label":x??"Heatmap",children:[r(o,{direction:"row",role:"row",sx:{gap:.5},children:[e(o,{sx:{flex:"0 0 120px"}}),n.map(r=>e(o,{role:"columnheader",sx:{flex:1,alignItems:"center",minWidth:0},children:e(i,{sx:{textAlign:"center"},children:r.label})},r.id))]}),a.map(i=>r(o,{direction:"row",role:"row",sx:{gap:.5},children:[e(o,{role:"rowheader",sx:{flex:"0 0 120px",justifyContent:"center",minWidth:0},children:e(l,{children:i.label})}),n.map(r=>{const l=S.get(`${i.id}:${r.id}`),t=l?d[l.status]:void 0,a=l?.label??t?.label??"No data";if(!t)return e(o,{role:"cell","aria-label":`${a}: ${i.label}, ${r.label}`,sx:{flex:1,minHeight:c,border:1,borderColor:"divider",borderRadius:.5,bgcolor:"action.hover"}},r.id);const{Icon:n,color:s}=t;return e(o,{role:"cell",sx:{flex:1,minHeight:c,alignItems:"center",justifyContent:"center",border:1,borderColor:"divider",borderRadius:.5,bgcolor:"action.hover"},children:e(n,{"aria-label":`${a}: ${i.label}, ${r.label}`,titleAccess:`${a}: ${i.label}, ${r.label}`,sx:{color:s,fontSize:m}})},r.id)})]},i.id))]})})}a.displayName="NexusHeatmap";export{a as NexusHeatmap};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="2.9.
|
|
1
|
+
const o="2.9.2";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -1377,9 +1377,13 @@ interface NexusHeatmapProps extends ChartAsyncProps {
|
|
|
1377
1377
|
columns: NexusHeatmapAxisItem[];
|
|
1378
1378
|
cells: NexusHeatmapCell[];
|
|
1379
1379
|
statusMap: Record<string, NexusHeatmapStatus>;
|
|
1380
|
+
/** Minimum height of each heatmap cell. Defaults to 40. */
|
|
1381
|
+
cellMinHeight?: number;
|
|
1382
|
+
/** Icon size in px for populated heatmap cells. Defaults to 22. */
|
|
1383
|
+
cellIconSize?: number;
|
|
1380
1384
|
sx?: SxProps<Theme>;
|
|
1381
1385
|
}
|
|
1382
|
-
declare function NexusHeatmap({ rows, columns, cells, statusMap, sx, title, titleComponent, titleSx, titleHidden, description, actions, isLoading, isError, errorMessage, paperSx, }: NexusHeatmapProps): react.JSX.Element;
|
|
1386
|
+
declare function NexusHeatmap({ rows, columns, cells, statusMap, cellMinHeight, cellIconSize, sx, title, titleComponent, titleSx, titleHidden, description, actions, isLoading, isError, errorMessage, paperSx, }: NexusHeatmapProps): react.JSX.Element;
|
|
1383
1387
|
declare namespace NexusHeatmap {
|
|
1384
1388
|
var displayName: string;
|
|
1385
1389
|
}
|