@simoncomputing/mui-bueno-v3 0.1.12

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +33 -0
  3. package/dist/@types/index.d.ts +192 -0
  4. package/dist/common/TestUtils/reactHookForms.d.ts +54 -0
  5. package/dist/common/TestUtils/renderWithReactHookForm.d.ts +7 -0
  6. package/dist/common/Utils/index.d.ts +65 -0
  7. package/dist/common/WindowDimensions/WindowDimensions.d.ts +26 -0
  8. package/dist/components/Alerts/Alert.d.ts +30 -0
  9. package/dist/components/Alerts/ErrorAlert.d.ts +4 -0
  10. package/dist/components/Alerts/InfoAlert.d.ts +4 -0
  11. package/dist/components/Alerts/SuccessAlert.d.ts +4 -0
  12. package/dist/components/Alerts/WarningAlert.d.ts +4 -0
  13. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +10 -0
  14. package/dist/components/Buttons/Button/Button.d.ts +24 -0
  15. package/dist/components/Buttons/ScrollToTop/ScrollToTop.d.ts +14 -0
  16. package/dist/components/Buttons/Submit/Submit.d.ts +11 -0
  17. package/dist/components/Form/Error/Error.d.ts +23 -0
  18. package/dist/components/Form/FormDebugger/FormDebugger.d.ts +8 -0
  19. package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +81 -0
  20. package/dist/components/Form/Inputs/Autocomplete/DynamicAutocomplete/DynamicAutocomplete.d.ts +31 -0
  21. package/dist/components/Form/Inputs/Autocomplete/MultiAutocomplete/MultiAutocomplete.d.ts +22 -0
  22. package/dist/components/Form/Inputs/Autocomplete/utils.d.ts +2 -0
  23. package/dist/components/Form/Inputs/Checkbox/Checkbox.d.ts +58 -0
  24. package/dist/components/Form/Inputs/CheckboxGroup/CheckboxGroup.d.ts +112 -0
  25. package/dist/components/Form/Inputs/CitationField/CitationBubbleMenuHandler.d.ts +43 -0
  26. package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +78 -0
  27. package/dist/components/Form/Inputs/CitationField/CitationMenu/AttachmentForm.d.ts +13 -0
  28. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationBubbleMenu.d.ts +25 -0
  29. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationForm.d.ts +12 -0
  30. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationMenu.d.ts +62 -0
  31. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationTable.d.ts +16 -0
  32. package/dist/components/Form/Inputs/CitationField/CitationNode.d.ts +2 -0
  33. package/dist/components/Form/Inputs/CitationField/CitationNodeComponent.d.ts +7 -0
  34. package/dist/components/Form/Inputs/CitationField/CitationRefreshContext/CitationRefreshContext.d.ts +29 -0
  35. package/dist/components/Form/Inputs/CitationField/MenuButtonEditCitation.d.ts +3 -0
  36. package/dist/components/Form/Inputs/DateField/DateField.d.ts +73 -0
  37. package/dist/components/Form/Inputs/DateField/DateRangeField/DateRangeField.d.ts +62 -0
  38. package/dist/components/Form/Inputs/DateField/dayjs-utils.d.ts +2 -0
  39. package/dist/components/Form/Inputs/FileUpload/FileList/FileList.d.ts +13 -0
  40. package/dist/components/Form/Inputs/FileUpload/FileUpload.d.ts +62 -0
  41. package/dist/components/Form/Inputs/Location/Location.d.ts +69 -0
  42. package/dist/components/Form/Inputs/Location/Location.types.d.ts +85 -0
  43. package/dist/components/Form/Inputs/Location/LocationOption.d.ts +38 -0
  44. package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +119 -0
  45. package/dist/components/Form/Inputs/RangeSlider/RangeSlider.d.ts +34 -0
  46. package/dist/components/Form/Inputs/RichTextField/RichTextControls.d.ts +6 -0
  47. package/dist/components/Form/Inputs/RichTextField/RichTextField.d.ts +56 -0
  48. package/dist/components/Form/Inputs/RichTextField/SuggestionList.d.ts +8 -0
  49. package/dist/components/Form/Inputs/RichTextField/mentionSuggestionOptions.d.ts +6 -0
  50. package/dist/components/Form/Inputs/RichTextField/useExtensions.d.ts +10 -0
  51. package/dist/components/Form/Inputs/SearchField/SearchField.d.ts +16 -0
  52. package/dist/components/Form/Inputs/Select/Select.d.ts +91 -0
  53. package/dist/components/Form/Inputs/Switch/Switch.d.ts +61 -0
  54. package/dist/components/Form/Inputs/TextField/TextField.d.ts +60 -0
  55. package/dist/components/Form/MForm/MForm.d.ts +19 -0
  56. package/dist/components/Form/MForm/useMyForm.d.ts +1 -0
  57. package/dist/components/Form/RepeatableFormGroup/RepeatableFormGroup.d.ts +89 -0
  58. package/dist/components/Form/Stepper/Stepper.d.ts +27 -0
  59. package/dist/components/Layout/MGrid/MGrid.d.ts +13 -0
  60. package/dist/components/Layout/MPanel/MPanel.d.ts +13 -0
  61. package/dist/components/Layout/MStack/MStack.d.ts +6 -0
  62. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +22 -0
  63. package/dist/components/Modals/AlertModal/AlertModal.d.ts +11 -0
  64. package/dist/components/Modals/ConfirmationModal/ConfirmationModal.d.ts +26 -0
  65. package/dist/components/Modals/DecisionModal/DecisionModal.d.ts +37 -0
  66. package/dist/components/Modals/Modal.d.ts +45 -0
  67. package/dist/components/Navigation/Footer/Footer.d.ts +31 -0
  68. package/dist/components/Navigation/Header/DarkModeToggle/DarkModeToggle.d.ts +13 -0
  69. package/dist/components/Navigation/Header/Drawer.d.ts +18 -0
  70. package/dist/components/Navigation/Header/EnvironmentBanner.d.ts +4 -0
  71. package/dist/components/Navigation/Header/Header.d.ts +63 -0
  72. package/dist/components/Navigation/Header/ProfileMenu.d.ts +8 -0
  73. package/dist/components/Navigation/MenuButton/MenuButton.d.ts +9 -0
  74. package/dist/components/Navigation/NavBar/FloatingNavBar/FloatingNavBar.d.ts +24 -0
  75. package/dist/components/Navigation/NavBar/NavBar.d.ts +24 -0
  76. package/dist/components/Navigation/Sidebar/Sidebar.d.ts +14 -0
  77. package/dist/components/Navigation/Tabs/Tabs.d.ts +19 -0
  78. package/dist/components/PageHeader/PageHeader.d.ts +27 -0
  79. package/dist/components/SingleActionCard/SingleActionCard.d.ts +26 -0
  80. package/dist/components/Snackbar/Snackbar.d.ts +28 -0
  81. package/dist/components/Table/ExpandableRow/ExpandableRow.d.ts +16 -0
  82. package/dist/components/Table/PaginatedTable.d.ts +44 -0
  83. package/dist/components/Table/Table.d.ts +129 -0
  84. package/dist/index.cjs.js +410 -0
  85. package/dist/index.css +1 -0
  86. package/dist/index.d.ts +112 -0
  87. package/dist/index.es.js +63994 -0
  88. package/dist/index.umd.js +411 -0
  89. package/dist/styles/3-theme/ThemeDemo.d.ts +3 -0
  90. package/dist/styles/3-theme/theme.d.ts +16 -0
  91. package/dist/styles/theme.d.ts +33 -0
  92. package/package.json +140 -0
@@ -0,0 +1,63 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { EnvironmentInfo, MenuOption } from '../../../@types';
3
+ import * as React from 'react';
4
+ export type HeaderProps = {
5
+ /**
6
+ * Provides environment info for lower environments. Automatically hidden when `isProd` is true.
7
+ */
8
+ envInfo?: EnvironmentInfo;
9
+ headerRef?: React.RefObject<HTMLElement | null>;
10
+ /**
11
+ * App logo image. Can be a path to an image (string) or a ReactNode for more fine-tuned control.
12
+ */
13
+ logo: string | React.ReactNode;
14
+ /**
15
+ * Features that appear below the primary header.
16
+ * Intended for general navigation within the application.
17
+ *
18
+ * NOTE: For each `MenuOption`, if `path` is defined, but NOT `onClick`, it will behave as a link. Otherwise, it will
19
+ * behave as a button.
20
+ */
21
+ featureMenuOptions?: MenuOption[];
22
+ /**
23
+ * User Actions that will appear on the user profile dropdown button.
24
+ * These are for logged in users so they only display when `displayName` is not undefined
25
+ */
26
+ userMenuOptions?: MenuOption[];
27
+ onToggleDarkMode?: () => void;
28
+ /**
29
+ * Appear directly in header on the right side. Useful for quick-access general links such as FAQ
30
+ * Recommend no more than 3.
31
+ *
32
+ * NOTE: For each `MenuOption`, if `path` is defined, but NOT `onClick`, it will behave as a link. Otherwise, it will
33
+ * behave as a button.
34
+ */
35
+ quickLinks?: MenuOption[];
36
+ /**
37
+ * Display Name for the user that is currently logged in. Set as undefined if no user is logged in.
38
+ * Ex: `displayName={isAuthenticated ? userName : undefined}
39
+ */
40
+ displayName?: string;
41
+ /**
42
+ * Appears above the app header. Useful for simple announcements/etc.
43
+ */
44
+ banner?: React.ReactNode;
45
+ position?: 'absolute' | 'sticky' | 'relative' | 'static' | 'fixed';
46
+ /**
47
+ * Children will be rendered in between quickLinks & user dropdown.
48
+ *
49
+ * IMPORTANT: Children will NOT display on mobile, so if you render any navigation links here, you will need to
50
+ * add logic to pass those links to `userActions` when screen size is less than or equal to `sm` (default is <=600 px).
51
+ */
52
+ children?: React.ReactNode;
53
+ /**
54
+ * Style overrides for Mui's AppBar
55
+ */
56
+ sx?: SxProps<Theme>;
57
+ /**
58
+ * Style overrides for the NavBar
59
+ */
60
+ navBarSx?: SxProps<Theme>;
61
+ };
62
+ export declare const Header: React.FC<HeaderProps>;
63
+ export default Header;
@@ -0,0 +1,8 @@
1
+ import { MenuOption, ObjectWithId } from '../../../@types';
2
+ import * as React from 'react';
3
+ export interface ProfileMenuProps extends ObjectWithId {
4
+ displayName: string;
5
+ userMenuOptions: MenuOption[];
6
+ }
7
+ export declare const ProfileMenu: React.FC<ProfileMenuProps>;
8
+ export default ProfileMenu;
@@ -0,0 +1,9 @@
1
+ import { MenuOption, ObjectWithId } from '../../../@types';
2
+ import * as React from 'react';
3
+ export interface MenuButtonProps extends ObjectWithId {
4
+ label: string;
5
+ menuOptions?: MenuOption[];
6
+ icon?: React.ReactElement;
7
+ }
8
+ export declare const MenuButton: React.FC<MenuButtonProps>;
9
+ export default MenuButton;
@@ -0,0 +1,24 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { MenuOption } from '../../../../@types';
3
+ export type FloatingNavBarProps = {
4
+ /**
5
+ * Features that appear below the primary header.
6
+ * Intended for general navigation within the application.
7
+ */
8
+ featureMenuOptions?: MenuOption[];
9
+ /**
10
+ * Index of the active tab, starts at 0. Default is undefined (no active tab marked)
11
+ */
12
+ activeTabIdx?: number;
13
+ /**
14
+ * Style overrides
15
+ */
16
+ sx?: SxProps<Theme>;
17
+ };
18
+ /**
19
+ * Primary navigation. For an alternative style, see `NavBar`.
20
+ *
21
+ * @deprecated Will remove soon, switch to NavBar
22
+ */
23
+ export declare const FloatingNavBar: (props: FloatingNavBarProps) => false | import("react/jsx-runtime").JSX.Element;
24
+ export default FloatingNavBar;
@@ -0,0 +1,24 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { MenuOption } from '../../../@types';
3
+ export type NavBarProps = {
4
+ /**
5
+ * Features that appear below the primary header.
6
+ * Intended for general navigation within the application.
7
+ */
8
+ featureMenuOptions?: MenuOption[];
9
+ /**
10
+ * Index of the active tab, starts at 0. Default is undefined (no active tab marked)
11
+ */
12
+ activeTabIdx?: number;
13
+ /**
14
+ * Style overrides
15
+ */
16
+ sx?: SxProps<Theme>;
17
+ };
18
+ /**
19
+ * Primary navigation. For an alternative style, see `FloatingNavBar`.
20
+ *
21
+ * We recommend using the `Header` component, which already has a `NavBar` built in.
22
+ */
23
+ export declare const NavBar: (props: NavBarProps) => false | import("react/jsx-runtime").JSX.Element;
24
+ export default NavBar;
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { SxProps, Theme } from '@mui/material';
3
+ import { MenuOption } from '../../../@types';
4
+ export type SidebarProps = {
5
+ menuOptions?: MenuOption[];
6
+ sx?: SxProps<Theme>;
7
+ };
8
+ /**
9
+ * Intended for secondary navigation.
10
+ *
11
+ * This component does NOT render on mobile.
12
+ */
13
+ export declare const Sidebar: React.FC<SidebarProps>;
14
+ export default Sidebar;
@@ -0,0 +1,19 @@
1
+ import { TabsProps as MuiTabsProps } from '@mui/material';
2
+ import { MenuOption } from '../../../@types';
3
+ import * as React from 'react';
4
+ type TabsBaseProps = {
5
+ /**
6
+ * Array of navigation items to show
7
+ *
8
+ * NOTE: For each `MenuOption`, if `path` is defined, but NOT `onClick`, it will behave as a link. Otherwise, it will
9
+ * behave as a button._
10
+ */
11
+ menuOptions: MenuOption[];
12
+ /**
13
+ * Index of the active tab in `menuOptions`
14
+ */
15
+ activeTabIdx?: number;
16
+ };
17
+ export type TabsProps = TabsBaseProps & Omit<MuiTabsProps, 'value' | 'onChange'>;
18
+ export declare const Tabs: React.FC<TabsProps>;
19
+ export default Tabs;
@@ -0,0 +1,27 @@
1
+ import { BreadcrumbInfo } from '../Breadcrumbs/Breadcrumbs';
2
+ import { SxProps, Theme } from '@mui/material';
3
+ import { ReactNode } from 'react';
4
+ /**
5
+ * Interface for PageHeader props.
6
+ * @property {string} tableKey - The key of the table.
7
+ * @property {string} title - Title for the table
8
+ * @property {string} createButtonLabel - Label for the Create/Add button (to add new objects to the table)
9
+ * @property {string} createPermission - Permission required to give the user permission to edit this table
10
+ * @property {(id?: number | string) => void} onAdd - callback when the create/add button is clicked
11
+ * @property {BreadcrumbInfo[]} breadcrumbs - breadcrumbs to be displayed above the title (optional)
12
+ * @property {React.ReactNode} children - additional components to display on the right side of the component (or below, on mobile screens)
13
+ */
14
+ export type PageHeaderProps = {
15
+ title: string | ReactNode;
16
+ createButtonLabel: string;
17
+ showAddButton?: boolean;
18
+ onAdd?: (id?: number | string) => void;
19
+ breadcrumbs?: BreadcrumbInfo[];
20
+ children?: React.ReactNode;
21
+ sx?: SxProps<Theme>;
22
+ };
23
+ /**
24
+ * Header for PagingTable. Includes Title, Add Button, breadcrumbs (optional). Additional components can be added via children (ex. SearchField) if desired.
25
+ */
26
+ export declare const PageHeader: (props: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
27
+ export default PageHeader;
@@ -0,0 +1,26 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { PropsWithChildren, ReactNode } from 'react';
3
+ /**
4
+ * Interface for table props.
5
+ * @property {string} tableKey - The key of the table.
6
+ * @property {{label: string; fieldName: string}[]} columns - An array of column definitions.
7
+ * @property {T[]} data - Array of objects that will be displayed in the table
8
+ * @property {(id?: number | string) => void} onSelect - Function to call when a row is selected.
9
+ * @property {boolean} canSort - Whether or not this table supports sorting (depends on your API)
10
+ * @property {boolean} stackWhenMobile - If true, on mobile screens, table is replaced with list of cards,
11
+ * where each card represents 1 row. NOTE: sorting is not available when using mobile stack.
12
+ */
13
+ export interface SingleActionCardProps extends PropsWithChildren {
14
+ title: string;
15
+ titleIcon?: ReactNode;
16
+ fullWidthIcon?: boolean;
17
+ children?: ReactNode;
18
+ actionLabel: string;
19
+ action: () => void;
20
+ sx?: SxProps<Theme>;
21
+ }
22
+ /**
23
+ * Full-page component for displaying simple messages with a single action (button).
24
+ */
25
+ export declare const SingleActionCard: (props: SingleActionCardProps) => import("react/jsx-runtime").JSX.Element;
26
+ export default SingleActionCard;
@@ -0,0 +1,28 @@
1
+ import { AlertProps } from '../Alerts/Alert';
2
+ import * as React from 'react';
3
+ export type SnackbarProps = {
4
+ title: string;
5
+ message?: string;
6
+ type: SnackbarType;
7
+ onClose: () => void;
8
+ /**
9
+ * milliseconds before the snackbar auto-hides
10
+ * @default 8000 (8 seconds)
11
+ */
12
+ autoHideDuration?: number;
13
+ variant?: AlertProps['variant'];
14
+ elevation?: number;
15
+ };
16
+ /**
17
+ * Type for the message snackbar.
18
+ * @typedef {'success' | 'error' | 'warning' | 'info' | 'timeout' | 'logout'} MessageSnackbarType
19
+ */
20
+ export type SnackbarType = 'success' | 'error' | 'warning' | 'info' | 'timeout' | 'logout';
21
+ /**
22
+ * Snackbar
23
+ *
24
+ * TODO documentation
25
+ *
26
+ */
27
+ export declare const Snackbar: React.FC<SnackbarProps>;
28
+ export default Snackbar;
@@ -0,0 +1,16 @@
1
+ import { ObjectWithId } from '../../../@types';
2
+ export type ExpandableRowProps<T> = {
3
+ colSpan: number;
4
+ isExpanded?: boolean;
5
+ obj: T;
6
+ renderExpand: (obj: T) => React.ReactNode;
7
+ asMobileCard?: boolean;
8
+ };
9
+ /**
10
+ * This component is intended to be used internally by `Table` to allow rows to expand when clicked and
11
+ * is not currently exported by the library.
12
+ *
13
+ * This component contains the content for the expanded section as well as the expand/collapse functionality.
14
+ */
15
+ declare const ExpandableRow: <T extends ObjectWithId>(props: ExpandableRowProps<T>) => import("react/jsx-runtime").JSX.Element;
16
+ export default ExpandableRow;
@@ -0,0 +1,44 @@
1
+ import { TableProps } from './Table';
2
+ import { ObjectWithId, PaginationState } from '../../@types';
3
+ /**
4
+ * Paginated Table Props
5
+ */
6
+ type BasePaginatedTableProps = {
7
+ /**
8
+ * Current state of the pagination (page number, page size, etc.)
9
+ * This is intended to be used with Redux -- set your redux slice value here.
10
+ */
11
+ paginationState: PaginationState;
12
+ /**
13
+ * Callback when the user changes the page number.
14
+ * This is intended to be used with Redux -- call your dispatch here.
15
+ */
16
+ onPageChange: (newPage: number) => void;
17
+ /**
18
+ * Callback when the user changes the number of rows per page.
19
+ * This is intended to be used with Redux -- call your dispatch here.
20
+ */
21
+ onRowsPerPageChange: (newPage: number) => void;
22
+ /**
23
+ * Hides the pagination controls when true. NOTE: pagination controls will always auto-hide when the table is empty.
24
+ *
25
+ * IMPORTANT: Make sure this is not changed after the page loads. Otherwise the pagination controls could disappear
26
+ * when the user changes the pagination settings (Ex. changing page size from 5 to 25 when only 15 records exist).
27
+ */
28
+ hidePaginationControls?: boolean;
29
+ /**
30
+ * The options available to the user representing the Number of rows per page
31
+ * @default [5, 10, 25]
32
+ */
33
+ rowsPerPageOptions?: Array<number>;
34
+ };
35
+ export type PaginatedTableProps<T> = BasePaginatedTableProps & Omit<TableProps<T>, 'sortField' | 'sortOrder'>;
36
+ /**
37
+ * Table with Pagination.
38
+ *
39
+ * This is a barebones paginated table. For additional functionality, see {@link file://./ListPage.tsx}
40
+ *
41
+ * Pagination controls will auto-hide when the table is empty or hidePaginationControls is true
42
+ */
43
+ export declare const PaginatedTable: <T extends ObjectWithId>(props: PaginatedTableProps<T>) => import("react/jsx-runtime").JSX.Element;
44
+ export default PaginatedTable;
@@ -0,0 +1,129 @@
1
+ import { TableProps as MuiTableProps } from '@mui/material';
2
+ import { SystemStyleObject, Theme } from '@mui/system';
3
+ import { SortOrder, TableConfig } from '../../@types';
4
+ import { default as React } from 'react';
5
+ /**
6
+ * Interface for table props.
7
+ */
8
+ export type BaseTableProps<T> = {
9
+ /**
10
+ * Optional identifier for your table; useful when overriding styles for only a single table (NOTE: will render as "mobile-table-{id}" and "table-{id}")
11
+ */
12
+ id?: string;
13
+ /**
14
+ * If the data in your table does not have an id OR your the id is undefined, use `getRowKey` to tell Table how to uniquely identify each row.
15
+ */
16
+ getRowKey?: (row: T) => string | number;
17
+ /**
18
+ * An array of column definitions
19
+ */
20
+ columns: TableConfig<T>;
21
+ /**
22
+ * Array of objects that will be displayed in the table
23
+ */
24
+ data: T[] | undefined;
25
+ /**
26
+ * Function to call when a row is clicked
27
+ */
28
+ onRowClick?: (id?: number | string) => void;
29
+ /**
30
+ * Define which columns (fieldName) to hide on mobile/small screens
31
+ */
32
+ hideColumnsOnMobile?: string[];
33
+ /**
34
+ * fieldName of field to be sorted (can be provided via redux)
35
+ */
36
+ sortField?: string;
37
+ /**
38
+ * Sorting order for sortField (can be provided via redux)
39
+ */
40
+ sortOrder?: string;
41
+ /**
42
+ * Callback when sortField or sortOrder is changed (can be provided via redux)
43
+ */
44
+ onSortChange?: (field: string, order: SortOrder) => void;
45
+ /**
46
+ * Define which columns are able to be sorted. Use this when not all columns can be sorted.
47
+ */
48
+ allowSortCols?: string[];
49
+ /**
50
+ * Sets tableLayout on Material UI table to 'fixed'.
51
+ * Expects 'true' for same-width columns, or an array of widths for non-same-width columns
52
+ */
53
+ fixedLayout?: string[] | boolean;
54
+ /**
55
+ * Adds CSS classes to top-level component (TableContainer)
56
+ */
57
+ className?: string;
58
+ /**
59
+ * Message that displays when the number of items in the table is 0
60
+ *
61
+ * Note: This is lower priorty than isLoading & errorTableMsg, so this will not display if the table has an error or is loading.
62
+ */
63
+ emptyTableMsg?: string;
64
+ /**
65
+ * Message that displays when the table could not successfully load data (ex. from an API).
66
+ *
67
+ * Note: This is lower priorty than isLoading, so this will not display if the table is loading.
68
+ */
69
+ errorTableMsg?: string;
70
+ /**
71
+ * When defined, renders a "Retry?" button that the user can click which will trigger this callback. Intended for allowing the user
72
+ * to trigger a re-fetch in an attempt to populate the table with data from an API when the previous attempt failed.
73
+ *
74
+ * Only displays when `errorTableMsg` is defined.
75
+ */
76
+ retryCallback?: () => void;
77
+ /**
78
+ * Displays a loading spinner in the table body when true. Use this when you have an API call for loading the table data.
79
+ *
80
+ */
81
+ isLoading?: boolean;
82
+ /**
83
+ * Function called when a row is clicked. Expands the row and displays the content returned by the function.
84
+ *
85
+ * NOTE: not supported for mobile stack currently.
86
+ */
87
+ renderExpand?: (item: T) => React.ReactNode;
88
+ /**
89
+ * Renders Table render as a Table, instead of cards, on Mobile/small screens
90
+ * @default false
91
+ */
92
+ disableMobileCards?: boolean;
93
+ /**
94
+ * Defines highlight color for a selected row.
95
+ * - Set to 'true' to have the selected row highlighted when clicked on (must have `onRowClicked` defined).
96
+ * - Set to string (color) to define your own color.
97
+ * @default false
98
+ */
99
+ highlightSelectedRow?: boolean | string;
100
+ /**
101
+ * Allows overriding of default header row style settings (table only -- this has no effect on the card list for mobile)
102
+ *
103
+ * NOTE: Use this if you want to style a specific table differently from other tables in your app. If you want all tables
104
+ * to have a specific header style, add the following override to your theme(s) in `theme.ts`:
105
+ * components: {
106
+ * MuiTableCell: {
107
+ * styleOverrides: {
108
+ * head: {
109
+ * // YOUR STYLE SETTINGS HERE
110
+ * },
111
+ * },
112
+ * },
113
+ * }
114
+ * (More details on this in Storybook on the `Getting Started/Global Styling` page)
115
+ */
116
+ headerRowStyle?: SystemStyleObject<Theme>;
117
+ /**
118
+ * Enables sticky header row. Set to a valid height (ex. "400px") to define the table's max height.
119
+ */
120
+ stickyHeader?: string;
121
+ };
122
+ export type TableProps<T> = BaseTableProps<T> & Omit<MuiTableProps, 'stickyHeader'>;
123
+ /**
124
+ * The Table is a reusable component for displaying data in a table.
125
+ * It includes sorting (optional).
126
+ * If you're looking for a paginated table, use see {@link file://../PagingTable/PagingTable.tsx} or
127
+ * {@link file://../ListPage/ListPage.tsx} which includes add & search functionality.
128
+ */
129
+ export declare const Table: <T extends object>(props: BaseTableProps<T>) => import("react/jsx-runtime").JSX.Element;