@movable/ui 3.20.3 → 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.
@@ -1,10 +1,4 @@
1
- type HeaderMetadataType = {
2
- icon?: string | JSX.Element;
3
- label: string;
4
- value?: string | JSX.Element | null;
5
- };
6
- type MetaDataProps = {
7
- metadata: HeaderMetadataType[];
8
- };
9
- export declare function HeaderMetadata({ metadata }: MetaDataProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
1
+ /**
2
+ * @deprecated Use `MetadataList` instead. This alias will be removed in a future release.
3
+ */
4
+ export { MetadataList as HeaderMetadata } from '../MetadataList/MetadataList';
@@ -1,4 +1,5 @@
1
1
  export { HeaderMetadata } from './HeaderMetadata';
2
+ export { MetadataList, type MetadataListProps, type MetadataItem, } from '../MetadataList';
2
3
  export { InkPageHeader } from './InkPageHeader';
3
4
  export { LinkBreadcrumbs } from './LinkBreadcrumbs';
4
5
  export { PageHeaderActionButtons } from './PageHeaderActionButtons';
@@ -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';
@@ -5,5 +5,5 @@ type InkToggleIconProps = ToggleButtonProps & {
5
5
  icon: JSX.Element;
6
6
  value: string | number;
7
7
  };
8
- export declare function InkToggleIcon({ value, size, ariaLabel, icon, ...rest }: InkToggleIconProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function InkToggleIcon({ value, size, ariaLabel, icon, sx, ...rest }: InkToggleIconProps): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -5,5 +5,5 @@ type InkToggleTextProps = ToggleButtonProps & {
5
5
  label?: string;
6
6
  value: string | number;
7
7
  };
8
- export declare function InkToggleText({ value, label, size, ariaLabel, ...rest }: InkToggleTextProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function InkToggleText({ value, label, size, ariaLabel, sx, ...rest }: InkToggleTextProps): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -0,0 +1,9 @@
1
+ export type MetadataItem = {
2
+ icon?: string | JSX.Element;
3
+ label: string;
4
+ value?: string | JSX.Element | null;
5
+ };
6
+ export type MetadataListProps = {
7
+ metadata: MetadataItem[];
8
+ };
9
+ export declare function MetadataList({ metadata }: MetadataListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { MetadataList, type MetadataListProps, type MetadataItem, } from './MetadataList';
@@ -3,8 +3,9 @@ export { InkChip } from './Chip';
3
3
  export { InkChipGroup } from './ChipGroup';
4
4
  export { InkDialog, type InkDialogProps } from './Dialog';
5
5
  export { InkPersistentFilterDrawer } from './PersistentFilterDrawer';
6
- export { HeaderMetadata, LinkBreadcrumbs, InkPageHeader, InkWorkflowHeader, PageHeaderActionButtons, HeaderSubtitle, } from './Header';
6
+ export { HeaderMetadata, MetadataList, type MetadataListProps, type MetadataItem, LinkBreadcrumbs, InkPageHeader, InkWorkflowHeader, PageHeaderActionButtons, HeaderSubtitle, } from './Header';
7
7
  export { InkPaper, type InkPaperProps } from './surfaces';
8
+ export { InkAccordion, type InkAccordionProps } from './surfaces';
8
9
  export { InkRadioTiles, type InkRadioTilesProps } from './InkRadioTiles';
9
10
  export { InkToggleText } from './InkToggleText';
10
11
  export { InkToggleTextGroup } from './InkToggleTextGroup';
@@ -27,3 +28,4 @@ export { InkCard } from './InkCard';
27
28
  export { InkGridToolBar } from './InkGridToolBar';
28
29
  export { InkDataGrid, InkDataGridEmpty, InkDataGridTextWrapCell, createEmptyColumns, createTextWrapColumn, type InkDataGridProps, type InkDataGridEmptyProps, type InkDataGridTextWrapCellProps, } from './InkDataGrid';
29
30
  export { InkHighlightAlert, InkAlert, type InkAlertProps } from './Alert';
31
+ export { InkMetricCard, type InkMetricCardProps, type PrimaryMetricData, type SecondaryMetricData, type MetricTrend, type DirectIndirectData, } from './InkMetricCard';
@@ -0,0 +1,11 @@
1
+ import { AccordionProps } from '@mui/material/Accordion';
2
+ import { ReactNode } from 'react';
3
+ export type InkAccordionProps = Omit<AccordionProps, 'children'> & {
4
+ label: ReactNode;
5
+ children?: ReactNode;
6
+ leftAdornment?: ReactNode;
7
+ chip?: ReactNode;
8
+ details?: ReactNode;
9
+ onDelete?: () => void;
10
+ };
11
+ export declare function InkAccordion({ label, children, leftAdornment, chip, details, onDelete, sx, ...accordionProps }: InkAccordionProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,2 @@
1
1
  export * from './InkPaper';
2
+ export * from './InkAccordion';
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AccordionProps } from '@mui/material/Accordion';
1
2
  import { AlertProps } from '@mui/material';
2
3
  import { AlertProps as AlertProps_2 } from '@mui/material/Alert';
3
4
  import { AutocompleteProps } from '@mui/material/Autocomplete';
@@ -95,6 +96,11 @@ declare type BaseContentLayoutProps = {
95
96
  rightProps?: Grid2Props_2;
96
97
  };
97
98
 
99
+ declare type BaseProps = {
100
+ isEmpty?: boolean;
101
+ sx?: SxProps<Theme_2>;
102
+ };
103
+
98
104
  declare type BreadcrumbProps = {
99
105
  breadcrumbs: HeaderLink[];
100
106
  };
@@ -185,6 +191,12 @@ declare const defaultDrawerWidths: {
185
191
 
186
192
  export declare function DetailsLayout({ Header, children, sx, itemProps, ...rest }: LayoutDetailsProps): JSX_2.Element;
187
193
 
194
+ export declare type DirectIndirectData = {
195
+ directPercent: number;
196
+ directLabel?: string;
197
+ indirectLabel?: string;
198
+ };
199
+
188
200
  declare type DrawerType = 'basic' | 'panel' | 'filter';
189
201
 
190
202
  declare type DropdownActionType = {
@@ -256,20 +268,12 @@ declare type HeaderLink = {
256
268
  } & LinkProps;
257
269
  };
258
270
 
259
- export declare function HeaderMetadata({ metadata }: MetaDataProps): JSX_2.Element;
260
-
261
271
  declare class HeaderMetaDataPageObject {
262
272
  baseSelector: string;
263
273
  get element(): Cypress.Chainable<JQuery<HTMLElement>>;
264
274
  getDatum(label: string): Cypress.Chainable<JQuery<HTMLElement>>;
265
275
  }
266
276
 
267
- declare type HeaderMetadataType = {
268
- icon?: string | JSX.Element;
269
- label: string;
270
- value?: string | JSX.Element | null;
271
- };
272
-
273
277
  export declare function HeaderSubtitle({ subtitle, sx, ...rest }: HeaderSubtitleType): JSX_2.Element;
274
278
 
275
279
  declare type HeaderSubtitleType = TypographyProps & {
@@ -327,6 +331,17 @@ declare type IndexLayoutProps = Grid2Props & {
327
331
  children: React.ReactNode;
328
332
  };
329
333
 
334
+ export declare function InkAccordion({ label, children, leftAdornment, chip, details, onDelete, sx, ...accordionProps }: InkAccordionProps): JSX_2.Element;
335
+
336
+ export declare type InkAccordionProps = Omit<AccordionProps, 'children'> & {
337
+ label: ReactNode;
338
+ children?: ReactNode;
339
+ leftAdornment?: ReactNode;
340
+ chip?: ReactNode;
341
+ details?: ReactNode;
342
+ onDelete?: () => void;
343
+ };
344
+
330
345
  /**
331
346
  * InkAlert component provides a consistent way to display alerts with proper
332
347
  * alignment and styling. It handles the vertical alignment issues when
@@ -697,6 +712,10 @@ declare type InkImageProps = BoxProps_2 & {
697
712
  fallbackText?: string;
698
713
  };
699
714
 
715
+ export declare function InkMetricCard(props: InkMetricCardProps): JSX_2.Element;
716
+
717
+ export declare type InkMetricCardProps = RobustCardProps | InsightCardProps | SimpleCardProps;
718
+
700
719
  export declare function InkPageHeader({ Breadcrumbs, Subtitle, Metadata, Chips, ButtonGroup, Tabs, sx, }: InkPageHeaderProps): JSX_2.Element;
701
720
 
702
721
  export declare const inkPageHeader: InkPageHeaderPageObject;
@@ -927,7 +946,7 @@ export declare interface InkTileIconProps {
927
946
  size?: 'small' | 'normal';
928
947
  }
929
948
 
930
- export declare function InkToggleIcon({ value, size, ariaLabel, icon, ...rest }: InkToggleIconProps): JSX_2.Element;
949
+ export declare function InkToggleIcon({ value, size, ariaLabel, icon, sx, ...rest }: InkToggleIconProps): JSX_2.Element;
931
950
 
932
951
  export declare function InkToggleIconGroup({ id, toggleButtons, ariaLabel, size, single, value, enforceValueSet, onChange, sx, ...rest }: InkToggleIconGroupProps): JSX_2.Element;
933
952
 
@@ -951,7 +970,7 @@ declare type InkToggleIconProps = ToggleButtonProps & {
951
970
  value: string | number;
952
971
  };
953
972
 
954
- export declare function InkToggleText({ value, label, size, ariaLabel, ...rest }: InkToggleTextProps): JSX_2.Element;
973
+ export declare function InkToggleText({ value, label, size, ariaLabel, sx, ...rest }: InkToggleTextProps): JSX_2.Element;
955
974
 
956
975
  export declare function InkToggleTextGroup({ id, toggleButtons, ariaLabel, value, size, single, enforceValueSet, sx, onChange, ...rest }: InkToggleTextGroupProps): JSX_2.Element;
957
976
 
@@ -995,6 +1014,14 @@ declare type InkWorkflowHeaderProps = {
995
1014
  subtitle?: string;
996
1015
  };
997
1016
 
1017
+ declare type InsightCardProps = BaseProps & {
1018
+ variant: 'insight';
1019
+ title: string;
1020
+ primaryMetric: PrimaryMetricData;
1021
+ secondaryMetrics?: SecondaryMetricData[];
1022
+ graph?: ReactNode;
1023
+ };
1024
+
998
1025
  export declare function InternalUseOnlyAlert({ message, sx, messageSx, }: InternalUseOnlyAlertProp): JSX_2.Element;
999
1026
 
1000
1027
  declare type InternalUseOnlyAlertProp = {
@@ -1041,12 +1068,45 @@ declare type MenuOptionType = {
1041
1068
  menuItemProps?: Partial<MenuItemProps>;
1042
1069
  };
1043
1070
 
1044
- declare type MetaDataProps = {
1045
- metadata: HeaderMetadataType[];
1071
+ export declare type MetadataItem = {
1072
+ icon?: string | JSX.Element;
1073
+ label: string;
1074
+ value?: string | JSX.Element | null;
1075
+ };
1076
+
1077
+ declare function MetadataList({ metadata }: MetadataListProps): JSX_2.Element;
1078
+ export { MetadataList as HeaderMetadata }
1079
+ export { MetadataList }
1080
+
1081
+ export declare type MetadataListProps = {
1082
+ metadata: MetadataItem[];
1083
+ };
1084
+
1085
+ export declare type MetricTrend = {
1086
+ value: string;
1087
+ direction: 'up' | 'down';
1046
1088
  };
1047
1089
 
1048
1090
  export declare const MovableUITheme: Theme;
1049
1091
 
1092
+ export declare class MuiDatePickerPageObject {
1093
+ baseAttribute: string;
1094
+ name: string;
1095
+ static create(name: string): MuiDatePickerPageObject;
1096
+ constructor(name: string);
1097
+ get element(): Cypress.Chainable<JQuery<HTMLElement>>;
1098
+ get input(): Cypress.Chainable<JQuery<HTMLInputElement>>;
1099
+ get openButton(): Cypress.Chainable<JQuery<HTMLElement>>;
1100
+ get calendarHeader(): Cypress.Chainable<JQuery<HTMLElement>>;
1101
+ openCalendar(): void;
1102
+ previousMonth(): void;
1103
+ nextMonth(): void;
1104
+ selectDay(day: number): void;
1105
+ setValue(isoDateString: string): void;
1106
+ hasValue(value: string): Cypress.Chainable<JQuery<HTMLInputElement>>;
1107
+ isDisabled(): Cypress.Chainable<JQuery<HTMLInputElement>>;
1108
+ }
1109
+
1050
1110
  declare type MuiSelectProps = SelectProps<string>;
1051
1111
 
1052
1112
  declare interface Option_2 {
@@ -1101,6 +1161,26 @@ declare type PrimaryButtonType = ButtonProps & {
1101
1161
  loading?: boolean;
1102
1162
  };
1103
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
+
1104
1184
  export declare function SevenThreeSplitContentLayout({ leftContent, rightContent, containerProps, leftProps, rightProps, }: SevenThreeSplitContentLayoutProps): JSX_2.Element;
1105
1185
 
1106
1186
  declare type SevenThreeSplitContentLayoutProps = {
@@ -1111,6 +1191,13 @@ declare type SevenThreeSplitContentLayoutProps = {
1111
1191
  rightProps?: Grid2Props;
1112
1192
  };
1113
1193
 
1194
+ declare type SimpleCardProps = BaseProps & {
1195
+ variant: 'simple';
1196
+ metric: SecondaryMetricData;
1197
+ href?: string;
1198
+ onClick?: () => void;
1199
+ };
1200
+
1114
1201
  declare type SkeletonGridType = {
1115
1202
  skeletonRows: number;
1116
1203
  skeletonColumns: number;