@okta/odyssey-react-mui 1.6.19 → 1.6.21
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.
- package/CHANGELOG.md +8 -0
- package/dist/Button.js +2 -2
- package/dist/Button.js.map +1 -1
- package/dist/CssBaseline.js +3 -1
- package/dist/CssBaseline.js.map +1 -1
- package/dist/MenuButton.js +16 -2
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuContext.js +2 -1
- package/dist/MenuContext.js.map +1 -1
- package/dist/MenuItem.js +6 -3
- package/dist/MenuItem.js.map +1 -1
- package/dist/SearchField.js.map +1 -1
- package/dist/icons.generated/ArrowBottom.js +33 -0
- package/dist/icons.generated/ArrowBottom.js.map +1 -0
- package/dist/icons.generated/ArrowTop.js +33 -0
- package/dist/icons.generated/ArrowTop.js.map +1 -0
- package/dist/icons.generated/index.js +2 -0
- package/dist/icons.generated/index.js.map +1 -1
- package/dist/labs/DataFilters.js +366 -0
- package/dist/labs/DataFilters.js.map +1 -0
- package/dist/labs/DataTable.js +366 -0
- package/dist/labs/DataTable.js.map +1 -0
- package/dist/labs/DataTablePagination.js +74 -0
- package/dist/labs/DataTablePagination.js.map +1 -0
- package/dist/labs/PaginatedTable.js +9 -6
- package/dist/labs/PaginatedTable.js.map +1 -1
- package/dist/labs/StaticTable.js +8 -5
- package/dist/labs/StaticTable.js.map +1 -1
- package/dist/labs/index.js +4 -1
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/materialReactTableTypes.js.map +1 -1
- package/dist/src/CssBaseline.d.ts +2 -1
- package/dist/src/CssBaseline.d.ts.map +1 -1
- package/dist/src/MenuButton.d.ts +12 -2
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/MenuContext.d.ts +1 -0
- package/dist/src/MenuContext.d.ts.map +1 -1
- package/dist/src/MenuItem.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +16 -0
- package/dist/src/SearchField.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowBottom.d.ts +16 -0
- package/dist/src/icons.generated/ArrowBottom.d.ts.map +1 -0
- package/dist/src/icons.generated/ArrowTop.d.ts +16 -0
- package/dist/src/icons.generated/ArrowTop.d.ts.map +1 -0
- package/dist/src/icons.generated/index.d.ts +2 -0
- package/dist/src/icons.generated/index.d.ts.map +1 -1
- package/dist/src/labs/DataFilters.d.ts +85 -0
- package/dist/src/labs/DataFilters.d.ts.map +1 -0
- package/dist/src/labs/DataTable.d.ts +193 -0
- package/dist/src/labs/DataTable.d.ts.map +1 -0
- package/dist/src/labs/DataTablePagination.d.ts +25 -0
- package/dist/src/labs/DataTablePagination.d.ts.map +1 -0
- package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
- package/dist/src/labs/StaticTable.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +4 -2
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/labs/materialReactTableTypes.d.ts +1 -1
- package/dist/src/labs/materialReactTableTypes.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +137 -64
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/Button.tsx +2 -2
- package/src/CssBaseline.tsx +7 -2
- package/src/MenuButton.tsx +50 -8
- package/src/MenuContext.ts +2 -0
- package/src/MenuItem.tsx +5 -3
- package/src/SearchField.tsx +8 -0
- package/src/icons.generated/ArrowBottom.tsx +43 -0
- package/src/icons.generated/ArrowTop.tsx +43 -0
- package/src/icons.generated/index.ts +2 -0
- package/src/labs/DataFilters.tsx +601 -0
- package/src/labs/DataTable.tsx +681 -0
- package/src/labs/DataTablePagination.tsx +88 -0
- package/src/labs/PaginatedTable.tsx +35 -33
- package/src/labs/StaticTable.tsx +26 -29
- package/src/labs/index.ts +6 -3
- package/src/labs/{materialReactTableTypes.ts → materialReactTableTypes.tsx} +1 -1
- package/src/theme/components.tsx +154 -62
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo } from "react";
|
|
14
|
+
import { Box } from "../Box";
|
|
15
|
+
import { Button } from "../Button";
|
|
16
|
+
import { Support } from "../Typography";
|
|
17
|
+
import { ArrowLeftIcon, ArrowRightIcon } from "../icons.generated";
|
|
18
|
+
|
|
19
|
+
export const paginationTypeValues = ["paged", "loadMore"] as const;
|
|
20
|
+
|
|
21
|
+
export type DataTablePaginationProps = {
|
|
22
|
+
currentPage?: number;
|
|
23
|
+
currentNumberOfResults?: number;
|
|
24
|
+
isNextButtonDisabled?: boolean;
|
|
25
|
+
isPreviousButtonDisabled?: boolean;
|
|
26
|
+
onClickNext: () => void;
|
|
27
|
+
onClickPrevious?: () => void;
|
|
28
|
+
paginationType?: (typeof paginationTypeValues)[number];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const DataTablePagination = ({
|
|
32
|
+
currentPage,
|
|
33
|
+
currentNumberOfResults,
|
|
34
|
+
isNextButtonDisabled,
|
|
35
|
+
isPreviousButtonDisabled,
|
|
36
|
+
onClickNext,
|
|
37
|
+
onClickPrevious,
|
|
38
|
+
paginationType,
|
|
39
|
+
}: DataTablePaginationProps) => {
|
|
40
|
+
return (
|
|
41
|
+
<Box sx={{ display: "flex", gap: 4, alignItems: "center" }}>
|
|
42
|
+
{paginationType === "loadMore" ? (
|
|
43
|
+
<>
|
|
44
|
+
<Button
|
|
45
|
+
label="Show more"
|
|
46
|
+
variant="secondary"
|
|
47
|
+
onClick={onClickNext}
|
|
48
|
+
isDisabled={isNextButtonDisabled}
|
|
49
|
+
/>
|
|
50
|
+
{currentNumberOfResults && (
|
|
51
|
+
<Support color="textSecondary">
|
|
52
|
+
{currentNumberOfResults} results
|
|
53
|
+
</Support>
|
|
54
|
+
)}
|
|
55
|
+
</>
|
|
56
|
+
) : (
|
|
57
|
+
<>
|
|
58
|
+
<Button
|
|
59
|
+
label="Previous"
|
|
60
|
+
startIcon={<ArrowLeftIcon />}
|
|
61
|
+
variant="secondary"
|
|
62
|
+
onClick={onClickPrevious}
|
|
63
|
+
isDisabled={isPreviousButtonDisabled}
|
|
64
|
+
/>
|
|
65
|
+
{currentPage && (
|
|
66
|
+
<Box>
|
|
67
|
+
<Support color="textSecondary" component="span">
|
|
68
|
+
Page {currentPage}
|
|
69
|
+
</Support>
|
|
70
|
+
</Box>
|
|
71
|
+
)}
|
|
72
|
+
<Button
|
|
73
|
+
label="Next"
|
|
74
|
+
endIcon={<ArrowRightIcon />}
|
|
75
|
+
variant="secondary"
|
|
76
|
+
onClick={onClickNext}
|
|
77
|
+
isDisabled={isNextButtonDisabled}
|
|
78
|
+
/>
|
|
79
|
+
</>
|
|
80
|
+
)}
|
|
81
|
+
</Box>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const MemoizedDataTablePagination = memo(DataTablePagination);
|
|
86
|
+
MemoizedDataTablePagination.displayName = "DataTablePagination";
|
|
87
|
+
|
|
88
|
+
export { MemoizedDataTablePagination as DataTablePagination };
|
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { AlertProps
|
|
13
|
+
import { AlertProps } from "@mui/material";
|
|
14
14
|
import { Typography } from "../Typography";
|
|
15
|
-
import
|
|
15
|
+
import {
|
|
16
16
|
MRT_PaginationState,
|
|
17
17
|
type MRT_ColumnFiltersState,
|
|
18
18
|
type MRT_RowSelectionState,
|
|
19
19
|
type MRT_TableInstance,
|
|
20
20
|
type MRT_Virtualizer,
|
|
21
|
+
useMaterialReactTable,
|
|
22
|
+
MaterialReactTable,
|
|
21
23
|
} from "material-react-table";
|
|
22
24
|
import {
|
|
23
25
|
FunctionComponent,
|
|
@@ -55,8 +57,8 @@ export type PaginatedTableProps<TData extends DefaultMaterialReactTableData> = {
|
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
const PaginatedTable = <TData extends DefaultMaterialReactTableData>({
|
|
58
|
-
columns,
|
|
59
|
-
data,
|
|
60
|
+
columns = [],
|
|
61
|
+
data = [],
|
|
60
62
|
fetchMoreData,
|
|
61
63
|
getRowId,
|
|
62
64
|
hasError,
|
|
@@ -130,7 +132,9 @@ const PaginatedTable = <TData extends DefaultMaterialReactTableData>({
|
|
|
130
132
|
undefined
|
|
131
133
|
>
|
|
132
134
|
>(
|
|
133
|
-
({ table }
|
|
135
|
+
({ table }: { table: MRT_TableInstance<TData> }) => (
|
|
136
|
+
<>{ToolbarButtons && <ToolbarButtons table={table} />}</>
|
|
137
|
+
),
|
|
134
138
|
[ToolbarButtons]
|
|
135
139
|
);
|
|
136
140
|
|
|
@@ -224,9 +228,7 @@ const PaginatedTable = <TData extends DefaultMaterialReactTableData>({
|
|
|
224
228
|
[hasError, t]
|
|
225
229
|
);
|
|
226
230
|
|
|
227
|
-
const muiTablePaginationProps
|
|
228
|
-
Omit<TablePaginationProps, "rowsPerPage">
|
|
229
|
-
> = useMemo(
|
|
231
|
+
const muiTablePaginationProps = useMemo(
|
|
230
232
|
() => ({
|
|
231
233
|
rowsPerPageOptions: [],
|
|
232
234
|
showFirstButton: false,
|
|
@@ -246,31 +248,31 @@ const PaginatedTable = <TData extends DefaultMaterialReactTableData>({
|
|
|
246
248
|
[]
|
|
247
249
|
);
|
|
248
250
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
251
|
+
const table = useMaterialReactTable({
|
|
252
|
+
columns: columns,
|
|
253
|
+
data: data,
|
|
254
|
+
enableMultiRowSelection: hasRowSelection,
|
|
255
|
+
enablePagination: true,
|
|
256
|
+
enableRowSelection: hasRowSelection,
|
|
257
|
+
enableSorting: false,
|
|
258
|
+
getRowId: getRowId,
|
|
259
|
+
initialState: modifiedInitialState,
|
|
260
|
+
muiSelectAllCheckboxProps: { sx: muiCheckboxStyles },
|
|
261
|
+
muiSelectCheckboxProps: { sx: muiCheckboxStyles },
|
|
262
|
+
muiPaginationProps: muiTablePaginationProps,
|
|
263
|
+
muiToolbarAlertBannerProps: muiToolbarAlertBannerProps,
|
|
264
|
+
onColumnFiltersChange: setColumnFilters,
|
|
265
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
266
|
+
onPaginationChange: updatePagination,
|
|
267
|
+
onRowSelectionChange: setRowSelection,
|
|
268
|
+
renderBottomToolbarCustomActions: renderBottomToolbarCustomActions,
|
|
269
|
+
renderTopToolbarCustomActions: renderTopToolbarCustomActions,
|
|
270
|
+
rowVirtualizerInstanceRef: rowVirtualizerInstanceRef,
|
|
271
|
+
rowVirtualizerOptions: { overscan: 4 },
|
|
272
|
+
state: modifiedState,
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
return <MaterialReactTable table={table} />;
|
|
274
276
|
};
|
|
275
277
|
|
|
276
278
|
const MemoizedPaginatedTable = memo(PaginatedTable) as typeof PaginatedTable;
|
package/src/labs/StaticTable.tsx
CHANGED
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import {
|
|
14
|
+
useMaterialReactTable,
|
|
14
15
|
type MRT_ColumnFiltersState,
|
|
15
16
|
type MRT_TableInstance,
|
|
16
17
|
type MRT_Virtualizer,
|
|
18
|
+
MaterialReactTable,
|
|
17
19
|
} from "material-react-table";
|
|
18
20
|
import {
|
|
19
21
|
FunctionComponent,
|
|
@@ -45,8 +47,8 @@ export type StaticTableProps<TData extends DefaultMaterialReactTableData> = {
|
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
const StaticTable = <TData extends DefaultMaterialReactTableData>({
|
|
48
|
-
columns,
|
|
49
|
-
data,
|
|
50
|
+
columns = [],
|
|
51
|
+
data = [],
|
|
50
52
|
getRowId,
|
|
51
53
|
hasError,
|
|
52
54
|
initialState,
|
|
@@ -99,32 +101,27 @@ const StaticTable = <TData extends DefaultMaterialReactTableData>({
|
|
|
99
101
|
}
|
|
100
102
|
}, [columnFilters, globalFilter]);
|
|
101
103
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
rowVirtualizerInstanceRef={rowVirtualizerInstanceRef}
|
|
124
|
-
rowVirtualizerProps={{ overscan: 4 }}
|
|
125
|
-
state={modifiedState}
|
|
126
|
-
/>
|
|
127
|
-
);
|
|
104
|
+
const table = useMaterialReactTable({
|
|
105
|
+
columns: columns,
|
|
106
|
+
data: data,
|
|
107
|
+
enableBottomToolbar: false,
|
|
108
|
+
enablePagination: false,
|
|
109
|
+
enableRowVirtualization: true,
|
|
110
|
+
enableSorting: false,
|
|
111
|
+
getRowId: getRowId,
|
|
112
|
+
initialState: initialState,
|
|
113
|
+
muiToolbarAlertBannerProps: hasError
|
|
114
|
+
? { children: t("table.error"), color: "error" }
|
|
115
|
+
: undefined,
|
|
116
|
+
onColumnFiltersChange: setColumnFilters,
|
|
117
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
118
|
+
renderTopToolbarCustomActions: renderTopToolbarCustomActions,
|
|
119
|
+
rowVirtualizerInstanceRef: rowVirtualizerInstanceRef,
|
|
120
|
+
rowVirtualizerOptions: { overscan: 4 },
|
|
121
|
+
state: modifiedState,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
return <MaterialReactTable table={table} />;
|
|
128
125
|
};
|
|
129
126
|
|
|
130
127
|
const MemoizedStaticTable = memo(StaticTable) as typeof StaticTable;
|
package/src/labs/index.ts
CHANGED
|
@@ -14,13 +14,16 @@ export { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
|
14
14
|
export { LocalizationProvider } from "@mui/x-date-pickers";
|
|
15
15
|
export type { LocalizationProviderProps } from "@mui/x-date-pickers";
|
|
16
16
|
|
|
17
|
-
export type { MRT_ColumnDef as TableColumn } from "material-react-table";
|
|
18
|
-
|
|
19
17
|
export * from "./DatePicker";
|
|
20
18
|
export * from "./datePickerTheme";
|
|
21
19
|
|
|
20
|
+
export * from "./DataTable";
|
|
21
|
+
export * from "./DataTablePagination";
|
|
22
|
+
export * from "./DataFilters";
|
|
23
|
+
|
|
22
24
|
export * from "./materialReactTableTypes";
|
|
23
|
-
export * from "./PaginatedTable";
|
|
24
25
|
export * from "./StaticTable";
|
|
26
|
+
export * from "./PaginatedTable";
|
|
27
|
+
|
|
25
28
|
export * from "./GroupPicker";
|
|
26
29
|
export * from "./VirtualizedAutocomplete";
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import MaterialReactTable from "material-react-table";
|
|
13
|
+
import { MaterialReactTable } from "material-react-table";
|
|
14
14
|
|
|
15
15
|
export type DefaultMaterialReactTableData = Record<string, unknown>;
|
|
16
16
|
|
package/src/theme/components.tsx
CHANGED
|
@@ -29,15 +29,12 @@ import { radioClasses } from "@mui/material/Radio";
|
|
|
29
29
|
import { stackClasses } from "@mui/material/Stack";
|
|
30
30
|
import { svgIconClasses } from "@mui/material/SvgIcon";
|
|
31
31
|
import { tableBodyClasses } from "@mui/material/TableBody";
|
|
32
|
-
import { tableCellClasses } from "@mui/material/TableCell";
|
|
33
32
|
import { tableHeadClasses } from "@mui/material/TableHead";
|
|
34
33
|
import { tableRowClasses } from "@mui/material/TableRow";
|
|
35
|
-
import { tableSortLabelClasses } from "@mui/material/TableSortLabel";
|
|
36
34
|
import { tooltipClasses } from "@mui/material/Tooltip";
|
|
37
35
|
import { typographyClasses } from "@mui/material/Typography";
|
|
38
36
|
|
|
39
37
|
import {
|
|
40
|
-
ArrowDownIcon,
|
|
41
38
|
CheckCircleFilledIcon,
|
|
42
39
|
CheckIcon,
|
|
43
40
|
ChevronDownIcon,
|
|
@@ -1793,6 +1790,13 @@ export const components = ({
|
|
|
1793
1790
|
paddingInline: odysseyTokens.Spacing2,
|
|
1794
1791
|
borderRadius: odysseyTokens.BorderRadiusMain,
|
|
1795
1792
|
},
|
|
1793
|
+
root: {
|
|
1794
|
+
"& hr": {
|
|
1795
|
+
borderStyle: "solid none none",
|
|
1796
|
+
borderWidth: odysseyTokens.BorderWidthMain,
|
|
1797
|
+
borderColor: odysseyTokens.BorderColorDisplay,
|
|
1798
|
+
},
|
|
1799
|
+
},
|
|
1796
1800
|
},
|
|
1797
1801
|
},
|
|
1798
1802
|
MuiMenuItem: {
|
|
@@ -2148,6 +2152,22 @@ export const components = ({
|
|
|
2148
2152
|
},
|
|
2149
2153
|
},
|
|
2150
2154
|
},
|
|
2155
|
+
MuiTabs: {
|
|
2156
|
+
defaultProps: {
|
|
2157
|
+
textColor: "inherit",
|
|
2158
|
+
},
|
|
2159
|
+
styleOverrides: {
|
|
2160
|
+
root: {
|
|
2161
|
+
minHeight: "unset",
|
|
2162
|
+
marginBottom: odysseyTokens.Spacing5,
|
|
2163
|
+
},
|
|
2164
|
+
|
|
2165
|
+
flexContainer: {
|
|
2166
|
+
gap: odysseyTokens.Spacing5,
|
|
2167
|
+
borderBottom: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.BorderColorDisplay}`,
|
|
2168
|
+
},
|
|
2169
|
+
},
|
|
2170
|
+
},
|
|
2151
2171
|
MuiTable: {
|
|
2152
2172
|
styleOverrides: {
|
|
2153
2173
|
root: ({ ownerState }) => ({
|
|
@@ -2155,12 +2175,15 @@ export const components = ({
|
|
|
2155
2175
|
width: "auto",
|
|
2156
2176
|
borderCollapse: "separate",
|
|
2157
2177
|
borderSpacing: 0,
|
|
2158
|
-
border: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.HueNeutral100}`,
|
|
2159
|
-
borderRadius: odysseyTokens.BorderRadiusMain,
|
|
2160
2178
|
marginBlock: odysseyTokens.Spacing0,
|
|
2161
2179
|
marginInline: odysseyTokens.Spacing0,
|
|
2162
2180
|
lineHeight: odysseyTokens.TypographyLineHeightUi,
|
|
2163
2181
|
|
|
2182
|
+
"&.narrow": {
|
|
2183
|
+
width: "100%",
|
|
2184
|
+
tableLayout: "fixed",
|
|
2185
|
+
},
|
|
2186
|
+
|
|
2164
2187
|
"&:only-child": {
|
|
2165
2188
|
marginBlockEnd: 0,
|
|
2166
2189
|
},
|
|
@@ -2189,11 +2212,13 @@ export const components = ({
|
|
|
2189
2212
|
borderBottom: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.HueNeutral100}`,
|
|
2190
2213
|
textAlign: "start",
|
|
2191
2214
|
verticalAlign: "baseline",
|
|
2192
|
-
padding:
|
|
2193
|
-
paddingBlock: odysseyTokens.Spacing4,
|
|
2194
|
-
paddingInline: odysseyTokens.Spacing4,
|
|
2215
|
+
padding: odysseyTokens.Spacing3,
|
|
2195
2216
|
overflowWrap: "break-word",
|
|
2196
2217
|
|
|
2218
|
+
[`.MuiTable-root.narrow &:last-child`]: {
|
|
2219
|
+
width: "auto",
|
|
2220
|
+
},
|
|
2221
|
+
|
|
2197
2222
|
[`.${tableRowClasses.root}:hover &[rowspan]`]: {
|
|
2198
2223
|
backgroundColor: odysseyTokens.HueNeutralWhite,
|
|
2199
2224
|
},
|
|
@@ -2203,6 +2228,13 @@ export const components = ({
|
|
|
2203
2228
|
borderBottom: 0,
|
|
2204
2229
|
},
|
|
2205
2230
|
|
|
2231
|
+
[`.${tableBodyClasses.root} .${tableRowClasses.root}:first-of-type &`]:
|
|
2232
|
+
{
|
|
2233
|
+
borderTopColor: odysseyTokens.HueNeutralWhite,
|
|
2234
|
+
borderTopStyle: "solid",
|
|
2235
|
+
borderTopWidth: odysseyTokens.BorderWidthMain,
|
|
2236
|
+
},
|
|
2237
|
+
|
|
2206
2238
|
[`.${tableRowClasses.selected} &`]: {
|
|
2207
2239
|
borderBottomColor: odysseyTokens.PalettePrimaryLight,
|
|
2208
2240
|
},
|
|
@@ -2230,10 +2262,23 @@ export const components = ({
|
|
|
2230
2262
|
}),
|
|
2231
2263
|
|
|
2232
2264
|
[`.${tableHeadClasses.root} &`]: {
|
|
2233
|
-
color: odysseyTokens.
|
|
2265
|
+
color: odysseyTokens.TypographyColorHeading,
|
|
2266
|
+
fontSize: odysseyTokens.TypographySizeSubordinate,
|
|
2234
2267
|
lineHeight: odysseyTokens.TypographyLineHeightBody,
|
|
2235
2268
|
fontWeight: odysseyTokens.TypographyWeightBodyBold,
|
|
2269
|
+
textTransform: "uppercase",
|
|
2236
2270
|
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2271
|
+
borderBottom: 0,
|
|
2272
|
+
},
|
|
2273
|
+
|
|
2274
|
+
[`.${tableHeadClasses.root} &:first-of-type`]: {
|
|
2275
|
+
borderTopLeftRadius: odysseyTokens.Spacing2,
|
|
2276
|
+
borderBottomLeftRadius: odysseyTokens.Spacing2,
|
|
2277
|
+
},
|
|
2278
|
+
|
|
2279
|
+
[`.${tableHeadClasses.root} &:last-of-type`]: {
|
|
2280
|
+
borderTopRightRadius: odysseyTokens.Spacing2,
|
|
2281
|
+
borderBottomRightRadius: odysseyTokens.Spacing2,
|
|
2237
2282
|
},
|
|
2238
2283
|
|
|
2239
2284
|
...(ownerState.variant === "head" && {
|
|
@@ -2271,6 +2316,26 @@ export const components = ({
|
|
|
2271
2316
|
...(ownerState.align === "justify" && {
|
|
2272
2317
|
textAlign: "justify",
|
|
2273
2318
|
}),
|
|
2319
|
+
|
|
2320
|
+
["&.MuiTableCell-compact"]: {
|
|
2321
|
+
fontSize: odysseyTokens.TypographySizeSubordinate,
|
|
2322
|
+
padding: odysseyTokens.Spacing2,
|
|
2323
|
+
},
|
|
2324
|
+
|
|
2325
|
+
["&.MuiTableCell-spacious"]: {
|
|
2326
|
+
padding: odysseyTokens.Spacing4,
|
|
2327
|
+
},
|
|
2328
|
+
|
|
2329
|
+
[`& .${checkboxClasses.root}`]: {
|
|
2330
|
+
width: `${odysseyTokens.TypographyLineHeightUi}rem`,
|
|
2331
|
+
height: `${odysseyTokens.TypographyLineHeightUi}rem`,
|
|
2332
|
+
margin: 0,
|
|
2333
|
+
},
|
|
2334
|
+
|
|
2335
|
+
[`& .${dividerClasses.vertical}`]: {
|
|
2336
|
+
borderStyle: "dotted",
|
|
2337
|
+
borderWidth: 2,
|
|
2338
|
+
},
|
|
2274
2339
|
}),
|
|
2275
2340
|
},
|
|
2276
2341
|
},
|
|
@@ -2296,24 +2361,82 @@ export const components = ({
|
|
|
2296
2361
|
},
|
|
2297
2362
|
MuiTableRow: {
|
|
2298
2363
|
styleOverrides: {
|
|
2299
|
-
root: {
|
|
2364
|
+
root: () => ({
|
|
2300
2365
|
verticalAlign: "unset",
|
|
2301
|
-
[`&.${tableRowClasses.root}:hover`]: {
|
|
2302
|
-
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2303
|
-
},
|
|
2304
2366
|
[`&.${tableRowClasses.selected}`]: {
|
|
2305
2367
|
backgroundColor: odysseyTokens.PalettePrimaryLighter,
|
|
2306
2368
|
"&:hover": {
|
|
2307
2369
|
backgroundColor: odysseyTokens.PalettePrimaryLighter,
|
|
2308
2370
|
},
|
|
2309
2371
|
},
|
|
2310
|
-
|
|
2372
|
+
[`&.${tableRowClasses.head}`]: {
|
|
2373
|
+
boxShadow: "none !important",
|
|
2374
|
+
|
|
2375
|
+
"&:hover, &:focus-within": {
|
|
2376
|
+
backgroundColor: "transparent !important",
|
|
2377
|
+
},
|
|
2378
|
+
},
|
|
2379
|
+
|
|
2380
|
+
"&.isDragTarget": {
|
|
2381
|
+
opacity: 1,
|
|
2382
|
+
position: "relative",
|
|
2383
|
+
|
|
2384
|
+
"&::after": {
|
|
2385
|
+
content: '""',
|
|
2386
|
+
width: "100%",
|
|
2387
|
+
position: "absolute",
|
|
2388
|
+
left: 0,
|
|
2389
|
+
right: 0,
|
|
2390
|
+
bottom: 0,
|
|
2391
|
+
height: odysseyTokens.Spacing1,
|
|
2392
|
+
backgroundColor: odysseyTokens.PalettePrimaryMain,
|
|
2393
|
+
},
|
|
2394
|
+
|
|
2395
|
+
"& td": {
|
|
2396
|
+
borderTop: "0 !important",
|
|
2397
|
+
borderLeft: "0 !important",
|
|
2398
|
+
borderRight: "0 !important",
|
|
2399
|
+
borderBottom: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.HueNeutral100} !important`,
|
|
2400
|
+
},
|
|
2401
|
+
},
|
|
2402
|
+
|
|
2403
|
+
"&.isDragging, &.isDragging.isDragTarget": {
|
|
2404
|
+
border: "0 !important",
|
|
2405
|
+
position: "relative",
|
|
2406
|
+
opacity: 1,
|
|
2407
|
+
borderRadius: odysseyTokens.BorderRadiusOuter,
|
|
2408
|
+
|
|
2409
|
+
"&::after": {
|
|
2410
|
+
content: '""',
|
|
2411
|
+
position: "absolute",
|
|
2412
|
+
left: 0,
|
|
2413
|
+
right: 0,
|
|
2414
|
+
top: 0,
|
|
2415
|
+
bottom: 0,
|
|
2416
|
+
height: "auto",
|
|
2417
|
+
borderRadius: odysseyTokens.BorderRadiusOuter,
|
|
2418
|
+
borderColor: odysseyTokens.PalettePrimaryLight,
|
|
2419
|
+
borderStyle: "solid",
|
|
2420
|
+
borderWidth: odysseyTokens.Spacing1,
|
|
2421
|
+
backgroundColor: "transparent",
|
|
2422
|
+
},
|
|
2423
|
+
|
|
2424
|
+
"& td": {
|
|
2425
|
+
borderTop: "0 !important",
|
|
2426
|
+
borderLeft: "0 !important",
|
|
2427
|
+
borderRight: "0 !important",
|
|
2428
|
+
borderBottom: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.HueNeutral100} !important`,
|
|
2429
|
+
opacity: 0.5,
|
|
2430
|
+
},
|
|
2431
|
+
},
|
|
2432
|
+
|
|
2433
|
+
"&.isDragging.isDragTarget::after": {
|
|
2434
|
+
borderColor: odysseyTokens.PalettePrimaryMain,
|
|
2435
|
+
},
|
|
2436
|
+
}),
|
|
2311
2437
|
},
|
|
2312
2438
|
},
|
|
2313
2439
|
MuiTableSortLabel: {
|
|
2314
|
-
defaultProps: {
|
|
2315
|
-
IconComponent: ArrowDownIcon,
|
|
2316
|
-
},
|
|
2317
2440
|
styleOverrides: {
|
|
2318
2441
|
root: {
|
|
2319
2442
|
cursor: "pointer",
|
|
@@ -2330,62 +2453,31 @@ export const components = ({
|
|
|
2330
2453
|
},
|
|
2331
2454
|
"&:hover": {
|
|
2332
2455
|
color: odysseyTokens.TypographyColorBody,
|
|
2333
|
-
[`& .${tableSortLabelClasses.icon}`]: {
|
|
2334
|
-
opacity: 1,
|
|
2335
|
-
},
|
|
2336
|
-
},
|
|
2337
|
-
[`&.${tableSortLabelClasses.active}`]: {
|
|
2338
|
-
color: odysseyTokens.TypographyColorSubordinate,
|
|
2339
|
-
[`& .${tableSortLabelClasses.icon}`]: {
|
|
2340
|
-
opacity: 1,
|
|
2341
|
-
color: "inherit",
|
|
2342
|
-
},
|
|
2343
2456
|
},
|
|
2344
2457
|
},
|
|
2345
|
-
icon: ({
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
marginInlineStart: 0,
|
|
2349
|
-
opacity: 0,
|
|
2350
|
-
color: "inherit",
|
|
2351
|
-
transition: theme.transitions.create(["opacity", "transform"], {
|
|
2352
|
-
duration: odysseyTokens.TransitionDurationMain,
|
|
2458
|
+
icon: ({ ownerState }) => ({
|
|
2459
|
+
...(ownerState.direction === "asc" && {
|
|
2460
|
+
transform: "rotate(180deg) !important",
|
|
2353
2461
|
}),
|
|
2354
|
-
userSelect: "none",
|
|
2355
2462
|
|
|
2356
|
-
|
|
2357
|
-
|
|
2463
|
+
".isUnsorted &": {
|
|
2464
|
+
opacity: "0 !important",
|
|
2358
2465
|
},
|
|
2359
2466
|
|
|
2360
|
-
|
|
2361
|
-
|
|
2467
|
+
".isUnsorted:hover &, .isUnsorted:focus &": {
|
|
2468
|
+
opacity: "0.5 !important",
|
|
2469
|
+
|
|
2470
|
+
"&:hover, &:focus": {
|
|
2471
|
+
opacity: "1 !important",
|
|
2472
|
+
},
|
|
2362
2473
|
},
|
|
2363
2474
|
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
}
|
|
2367
|
-
...(ownerState.direction === "asc" && {
|
|
2368
|
-
transform: "rotate(180deg)",
|
|
2369
|
-
}),
|
|
2475
|
+
".isSorted &": {
|
|
2476
|
+
opacity: 1,
|
|
2477
|
+
},
|
|
2370
2478
|
}),
|
|
2371
2479
|
},
|
|
2372
2480
|
},
|
|
2373
|
-
MuiTabs: {
|
|
2374
|
-
defaultProps: {
|
|
2375
|
-
textColor: "inherit",
|
|
2376
|
-
},
|
|
2377
|
-
styleOverrides: {
|
|
2378
|
-
root: {
|
|
2379
|
-
minHeight: "unset",
|
|
2380
|
-
marginBottom: odysseyTokens.Spacing5,
|
|
2381
|
-
},
|
|
2382
|
-
|
|
2383
|
-
flexContainer: {
|
|
2384
|
-
gap: odysseyTokens.Spacing5,
|
|
2385
|
-
borderBottom: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.BorderColorDisplay}`,
|
|
2386
|
-
},
|
|
2387
|
-
},
|
|
2388
|
-
},
|
|
2389
2481
|
MuiTooltip: {
|
|
2390
2482
|
defaultProps: {
|
|
2391
2483
|
arrow: true,
|