@movable/ui 3.20.4 → 3.20.5

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.
@@ -0,0 +1,48 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ export type MetricTrend = {
4
+ value: string;
5
+ direction: 'up' | 'down';
6
+ };
7
+ export type PrimaryMetricData = {
8
+ value: string;
9
+ label: string;
10
+ trend?: MetricTrend;
11
+ };
12
+ export type SecondaryMetricData = {
13
+ value: string;
14
+ label: string;
15
+ };
16
+ export type DirectIndirectData = {
17
+ directPercent: number;
18
+ directLabel?: string;
19
+ indirectLabel?: string;
20
+ };
21
+ type BaseProps = {
22
+ isEmpty?: boolean;
23
+ sx?: SxProps<Theme>;
24
+ };
25
+ type RobustCardProps = BaseProps & {
26
+ variant: 'robust';
27
+ title: string;
28
+ primaryMetric: PrimaryMetricData;
29
+ secondaryMetrics?: SecondaryMetricData[];
30
+ graph?: ReactNode;
31
+ directIndirect?: DirectIndirectData;
32
+ };
33
+ type InsightCardProps = BaseProps & {
34
+ variant: 'insight';
35
+ title: string;
36
+ primaryMetric: PrimaryMetricData;
37
+ secondaryMetrics?: SecondaryMetricData[];
38
+ graph?: ReactNode;
39
+ };
40
+ type SimpleCardProps = BaseProps & {
41
+ variant: 'simple';
42
+ metric: SecondaryMetricData;
43
+ href?: string;
44
+ onClick?: () => void;
45
+ };
46
+ export type InkMetricCardProps = RobustCardProps | InsightCardProps | SimpleCardProps;
47
+ export declare function InkMetricCard(props: InkMetricCardProps): import("react/jsx-runtime").JSX.Element;
48
+ export {};
@@ -0,0 +1 @@
1
+ export { InkMetricCard, type InkMetricCardProps, type PrimaryMetricData, type SecondaryMetricData, type MetricTrend, type DirectIndirectData, } from './InkMetricCard';
@@ -28,3 +28,4 @@ export { InkCard } from './InkCard';
28
28
  export { InkGridToolBar } from './InkGridToolBar';
29
29
  export { InkDataGrid, InkDataGridEmpty, InkDataGridTextWrapCell, createEmptyColumns, createTextWrapColumn, type InkDataGridProps, type InkDataGridEmptyProps, type InkDataGridTextWrapCellProps, } from './InkDataGrid';
30
30
  export { InkHighlightAlert, InkAlert, type InkAlertProps } from './Alert';
31
+ export { InkMetricCard, type InkMetricCardProps, type PrimaryMetricData, type SecondaryMetricData, type MetricTrend, type DirectIndirectData, } from './InkMetricCard';
package/lib/index.d.ts CHANGED
@@ -96,6 +96,11 @@ declare type BaseContentLayoutProps = {
96
96
  rightProps?: Grid2Props_2;
97
97
  };
98
98
 
99
+ declare type BaseProps = {
100
+ isEmpty?: boolean;
101
+ sx?: SxProps<Theme_2>;
102
+ };
103
+
99
104
  declare type BreadcrumbProps = {
100
105
  breadcrumbs: HeaderLink[];
101
106
  };
@@ -186,6 +191,12 @@ declare const defaultDrawerWidths: {
186
191
 
187
192
  export declare function DetailsLayout({ Header, children, sx, itemProps, ...rest }: LayoutDetailsProps): JSX_2.Element;
188
193
 
194
+ export declare type DirectIndirectData = {
195
+ directPercent: number;
196
+ directLabel?: string;
197
+ indirectLabel?: string;
198
+ };
199
+
189
200
  declare type DrawerType = 'basic' | 'panel' | 'filter';
190
201
 
191
202
  declare type DropdownActionType = {
@@ -701,6 +712,10 @@ declare type InkImageProps = BoxProps_2 & {
701
712
  fallbackText?: string;
702
713
  };
703
714
 
715
+ export declare function InkMetricCard(props: InkMetricCardProps): JSX_2.Element;
716
+
717
+ export declare type InkMetricCardProps = RobustCardProps | InsightCardProps | SimpleCardProps;
718
+
704
719
  export declare function InkPageHeader({ Breadcrumbs, Subtitle, Metadata, Chips, ButtonGroup, Tabs, sx, }: InkPageHeaderProps): JSX_2.Element;
705
720
 
706
721
  export declare const inkPageHeader: InkPageHeaderPageObject;
@@ -999,6 +1014,14 @@ declare type InkWorkflowHeaderProps = {
999
1014
  subtitle?: string;
1000
1015
  };
1001
1016
 
1017
+ declare type InsightCardProps = BaseProps & {
1018
+ variant: 'insight';
1019
+ title: string;
1020
+ primaryMetric: PrimaryMetricData;
1021
+ secondaryMetrics?: SecondaryMetricData[];
1022
+ graph?: ReactNode;
1023
+ };
1024
+
1002
1025
  export declare function InternalUseOnlyAlert({ message, sx, messageSx, }: InternalUseOnlyAlertProp): JSX_2.Element;
1003
1026
 
1004
1027
  declare type InternalUseOnlyAlertProp = {
@@ -1059,6 +1082,11 @@ export declare type MetadataListProps = {
1059
1082
  metadata: MetadataItem[];
1060
1083
  };
1061
1084
 
1085
+ export declare type MetricTrend = {
1086
+ value: string;
1087
+ direction: 'up' | 'down';
1088
+ };
1089
+
1062
1090
  export declare const MovableUITheme: Theme;
1063
1091
 
1064
1092
  export declare class MuiDatePickerPageObject {
@@ -1133,6 +1161,26 @@ declare type PrimaryButtonType = ButtonProps & {
1133
1161
  loading?: boolean;
1134
1162
  };
1135
1163
 
1164
+ export declare type PrimaryMetricData = {
1165
+ value: string;
1166
+ label: string;
1167
+ trend?: MetricTrend;
1168
+ };
1169
+
1170
+ declare type RobustCardProps = BaseProps & {
1171
+ variant: 'robust';
1172
+ title: string;
1173
+ primaryMetric: PrimaryMetricData;
1174
+ secondaryMetrics?: SecondaryMetricData[];
1175
+ graph?: ReactNode;
1176
+ directIndirect?: DirectIndirectData;
1177
+ };
1178
+
1179
+ export declare type SecondaryMetricData = {
1180
+ value: string;
1181
+ label: string;
1182
+ };
1183
+
1136
1184
  export declare function SevenThreeSplitContentLayout({ leftContent, rightContent, containerProps, leftProps, rightProps, }: SevenThreeSplitContentLayoutProps): JSX_2.Element;
1137
1185
 
1138
1186
  declare type SevenThreeSplitContentLayoutProps = {
@@ -1143,6 +1191,13 @@ declare type SevenThreeSplitContentLayoutProps = {
1143
1191
  rightProps?: Grid2Props;
1144
1192
  };
1145
1193
 
1194
+ declare type SimpleCardProps = BaseProps & {
1195
+ variant: 'simple';
1196
+ metric: SecondaryMetricData;
1197
+ href?: string;
1198
+ onClick?: () => void;
1199
+ };
1200
+
1146
1201
  declare type SkeletonGridType = {
1147
1202
  skeletonRows: number;
1148
1203
  skeletonColumns: number;