@coveord/plasma-mantine 52.24.1 → 52.26.0
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +32 -32
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/table/layouts/RowLayout.styles.d.ts.map +1 -1
- package/dist/cjs/components/table/layouts/RowLayout.styles.js +0 -3
- package/dist/cjs/components/table/layouts/RowLayout.styles.js.map +1 -1
- package/dist/cjs/components/table/table-filter/TableFilter.js +1 -1
- package/dist/cjs/components/table/table-filter/TableFilter.js.map +1 -1
- package/dist/cjs/components/table/table-header/Th.d.ts +1 -1
- package/dist/cjs/components/table/table-header/Th.d.ts.map +1 -1
- package/dist/cjs/components/table/table-header/Th.js +38 -35
- package/dist/cjs/components/table/table-header/Th.js.map +1 -1
- package/dist/cjs/components/table/table-header/Th.styles.d.ts +4 -3
- package/dist/cjs/components/table/table-header/Th.styles.d.ts.map +1 -1
- package/dist/cjs/components/table/table-header/Th.styles.js +16 -13
- package/dist/cjs/components/table/table-header/Th.styles.js.map +1 -1
- package/dist/cjs/components/table/table-header/Th.types.d.ts +6 -1
- package/dist/cjs/components/table/table-header/Th.types.d.ts.map +1 -1
- package/dist/esm/components/table/layouts/RowLayout.styles.d.ts.map +1 -1
- package/dist/esm/components/table/layouts/RowLayout.styles.js +0 -3
- package/dist/esm/components/table/layouts/RowLayout.styles.js.map +1 -1
- package/dist/esm/components/table/table-filter/TableFilter.js +2 -2
- package/dist/esm/components/table/table-filter/TableFilter.js.map +1 -1
- package/dist/esm/components/table/table-header/Th.d.ts +1 -1
- package/dist/esm/components/table/table-header/Th.d.ts.map +1 -1
- package/dist/esm/components/table/table-header/Th.js +39 -36
- package/dist/esm/components/table/table-header/Th.js.map +1 -1
- package/dist/esm/components/table/table-header/Th.styles.d.ts +4 -3
- package/dist/esm/components/table/table-header/Th.styles.d.ts.map +1 -1
- package/dist/esm/components/table/table-header/Th.styles.js +16 -13
- package/dist/esm/components/table/table-header/Th.styles.js.map +1 -1
- package/dist/esm/components/table/table-header/Th.types.d.ts +6 -1
- package/dist/esm/components/table/table-header/Th.types.d.ts.map +1 -1
- package/dist/esm/components/table/table-header/Th.types.js.map +1 -1
- package/package.json +3 -3
- package/src/components/table/__tests__/Th.spec.tsx +4 -6
- package/src/components/table/layouts/RowLayout.styles.ts +0 -4
- package/src/components/table/table-filter/TableFilter.tsx +2 -2
- package/src/components/table/table-header/Th.styles.ts +23 -12
- package/src/components/table/table-header/Th.tsx +31 -26
- package/src/components/table/table-header/Th.types.ts +7 -1
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { createStyles } from "@mantine/core";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export default createStyles(function(theme, param) {
|
|
3
|
+
var maxSize = param.maxSize, minSize = param.minSize, size = param.size;
|
|
4
4
|
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
padding: "0 !important",
|
|
5
|
+
root: {
|
|
6
|
+
padding: "".concat(theme.spacing.xs, " ").concat(theme.spacing.sm),
|
|
8
7
|
verticalAlign: "middle",
|
|
9
8
|
whiteSpace: "nowrap",
|
|
10
9
|
textAlign: "left",
|
|
11
10
|
color: theme.colors.gray[6],
|
|
12
11
|
backgroundColor: theme.colorScheme === "dark" ? theme.colors.gray[8] : theme.colors.gray[0],
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
height: theme.spacing.xl,
|
|
13
|
+
width: size !== null && size !== void 0 ? size : "auto",
|
|
14
|
+
minWidth: minSize,
|
|
15
|
+
maxWidth: maxSize,
|
|
16
|
+
fontWeight: 500,
|
|
17
|
+
fontSize: theme.fontSizes.xs,
|
|
18
|
+
"&:first-of-type": {
|
|
19
|
+
paddingLeft: theme.spacing.xl
|
|
20
|
+
},
|
|
21
|
+
"&:last-of-type": {
|
|
22
|
+
paddingRight: theme.spacing.xl
|
|
23
|
+
}
|
|
16
24
|
},
|
|
17
25
|
control: {
|
|
18
|
-
color: "inherit",
|
|
19
|
-
whiteSpace: "inherit",
|
|
20
|
-
fontWeight: "inherit",
|
|
21
|
-
width: "100%",
|
|
22
|
-
padding: "".concat(theme.spacing.xs, " ").concat(theme.spacing.sm),
|
|
23
26
|
"&:hover": {
|
|
24
27
|
backgroundColor: theme.colorScheme === "dark" ? theme.colors.gray[7] : theme.colors.gray[1]
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/table/table-header/Th.styles.ts"],"sourcesContent":["import {createStyles} from '@mantine/core';\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/table/table-header/Th.styles.ts"],"sourcesContent":["import {createStyles} from '@mantine/core';\n\nexport interface ThStyleParams {\n size: number;\n minSize: number;\n maxSize: number;\n}\n\nexport default createStyles((theme, {maxSize, minSize, size}: ThStyleParams) => ({\n root: {\n padding: `${theme.spacing.xs} ${theme.spacing.sm}`,\n verticalAlign: 'middle',\n whiteSpace: 'nowrap',\n textAlign: 'left',\n color: theme.colors.gray[6],\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.gray[8] : theme.colors.gray[0],\n height: theme.spacing.xl,\n width: size ?? 'auto',\n minWidth: minSize,\n maxWidth: maxSize,\n fontWeight: 500,\n fontSize: theme.fontSizes.xs,\n\n '&:first-of-type': {\n paddingLeft: theme.spacing.xl,\n },\n\n '&:last-of-type': {\n paddingRight: theme.spacing.xl,\n },\n },\n\n control: {\n '&:hover': {\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.gray[7] : theme.colors.gray[1],\n },\n },\n}));\n"],"names":["createStyles","theme","maxSize","minSize","size","root","padding","spacing","xs","sm","verticalAlign","whiteSpace","textAlign","color","colors","gray","backgroundColor","colorScheme","height","xl","width","minWidth","maxWidth","fontWeight","fontSize","fontSizes","paddingLeft","paddingRight","control"],"mappings":"AAAA,SAAQA,YAAY,QAAO,gBAAgB;AAQ3C,eAAeA,aAAa,SAACC;QAAQC,gBAAAA,SAASC,gBAAAA,SAASC,aAAAA;WAA0B;QAC7EC,MAAM;YACFC,SAAS,AAAC,GAAsBL,OAApBA,MAAMM,OAAO,CAACC,EAAE,EAAC,KAAoB,OAAjBP,MAAMM,OAAO,CAACE,EAAE;YAChDC,eAAe;YACfC,YAAY;YACZC,WAAW;YACXC,OAAOZ,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE;YAC3BC,iBAAiBf,MAAMgB,WAAW,KAAK,SAAShB,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE,GAAGd,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE;YAC3FG,QAAQjB,MAAMM,OAAO,CAACY,EAAE;YACxBC,OAAOhB,iBAAAA,kBAAAA,OAAQ;YACfiB,UAAUlB;YACVmB,UAAUpB;YACVqB,YAAY;YACZC,UAAUvB,MAAMwB,SAAS,CAACjB,EAAE;YAE5B,mBAAmB;gBACfkB,aAAazB,MAAMM,OAAO,CAACY,EAAE;YACjC;YAEA,kBAAkB;gBACdQ,cAAc1B,MAAMM,OAAO,CAACY,EAAE;YAClC;QACJ;QAEAS,SAAS;YACL,WAAW;gBACPZ,iBAAiBf,MAAMgB,WAAW,KAAK,SAAShB,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE,GAAGd,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE;YAC/F;QACJ;IACJ;GAAI"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { DefaultProps, Selectors } from '@mantine/core';
|
|
1
2
|
import { Header } from '@tanstack/react-table';
|
|
2
|
-
|
|
3
|
+
import { ComponentType, SVGProps } from 'react';
|
|
4
|
+
import useStyles from './Th.styles';
|
|
5
|
+
export type SortState = 'asc' | 'desc' | 'none';
|
|
6
|
+
export interface ThProps<T = unknown> extends DefaultProps<Selectors<typeof useStyles>> {
|
|
3
7
|
header: Header<T, unknown>;
|
|
8
|
+
sortingIcons?: Record<SortState, ComponentType<SVGProps<SVGSVGElement>>>;
|
|
4
9
|
}
|
|
5
10
|
//# sourceMappingURL=Th.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Th.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-header/Th.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Th.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-header/Th.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,OAAO,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IACnF,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/table/table-header/Th.types.ts"],"sourcesContent":["import {Header} from '@tanstack/react-table';\n\nexport interface ThProps<T> {\n header: Header<T, unknown>;\n}\n"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/table/table-header/Th.types.ts"],"sourcesContent":["import {DefaultProps, Selectors} from '@mantine/core';\nimport {Header} from '@tanstack/react-table';\nimport {ComponentType, SVGProps} from 'react';\nimport useStyles from './Th.styles';\n\nexport type SortState = 'asc' | 'desc' | 'none';\n\nexport interface ThProps<T = unknown> extends DefaultProps<Selectors<typeof useStyles>> {\n header: Header<T, unknown>;\n sortingIcons?: Record<SortState, ComponentType<SVGProps<SVGSVGElement>>>;\n}\n"],"names":[],"mappings":"AAAA,WAUC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "52.
|
|
3
|
+
"version": "52.26.0",
|
|
4
4
|
"description": "A Plasma flavoured Mantine theme",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plasma",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"lodash.debounce": "4.0.8",
|
|
42
42
|
"lodash.defaultsdeep": "4.6.1",
|
|
43
43
|
"monaco-editor": "0.41.0",
|
|
44
|
-
"@coveord/plasma-
|
|
45
|
-
"@coveord/plasma-
|
|
44
|
+
"@coveord/plasma-react-icons": "52.23.1",
|
|
45
|
+
"@coveord/plasma-tokens": "52.23.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@emotion/react": "11.11.1",
|
|
@@ -22,9 +22,7 @@ describe('Th', () => {
|
|
|
22
22
|
];
|
|
23
23
|
render(<Table data={data} columns={columns} />);
|
|
24
24
|
|
|
25
|
-
const headers = screen.getAllByRole('
|
|
26
|
-
expect(headers.length).toBe(2);
|
|
27
|
-
|
|
25
|
+
const headers = screen.getAllByRole('columnheader');
|
|
28
26
|
expect(headers[0]).toHaveAccessibleName(/name doubleArrowHead/i);
|
|
29
27
|
expect(headers[1]).toHaveAccessibleName(/type doubleArrowHead/i);
|
|
30
28
|
});
|
|
@@ -38,17 +36,17 @@ describe('Th', () => {
|
|
|
38
36
|
const onChange = vi.fn();
|
|
39
37
|
render(<Table data={data} columns={columns} onChange={onChange} />);
|
|
40
38
|
|
|
41
|
-
await user.click(screen.getByRole('
|
|
39
|
+
await user.click(screen.getByRole('columnheader', {name: /name doubleArrowHead/i}));
|
|
42
40
|
await waitFor(() => {
|
|
43
41
|
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({sorting: [{id: 'name', desc: false}]}));
|
|
44
42
|
});
|
|
45
43
|
|
|
46
|
-
await user.click(screen.getByRole('
|
|
44
|
+
await user.click(screen.getByRole('columnheader', {name: /name arrowUp/i}));
|
|
47
45
|
await waitFor(() => {
|
|
48
46
|
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({sorting: [{id: 'name', desc: true}]}));
|
|
49
47
|
});
|
|
50
48
|
|
|
51
|
-
await user.click(screen.getByRole('
|
|
49
|
+
await user.click(screen.getByRole('columnheader', {name: /name arrowDown/i}));
|
|
52
50
|
await waitFor(() => {
|
|
53
51
|
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({sorting: [{id: 'name', desc: false}]}));
|
|
54
52
|
});
|
|
@@ -10,10 +10,6 @@ export default createStyles<string, RowLayoutStylesParams>((theme, {multiRowSele
|
|
|
10
10
|
const border = `${rem(1)} solid ${theme.colorScheme === 'dark' ? theme.colors.dark[4] : theme.colors.gray[3]}`;
|
|
11
11
|
return {
|
|
12
12
|
headerColumns: {
|
|
13
|
-
'& th:first-of-type > *': {
|
|
14
|
-
paddingLeft: '40px',
|
|
15
|
-
},
|
|
16
|
-
|
|
17
13
|
'& input[type=checkbox]': {
|
|
18
14
|
backgroundColor: disableRowSelection ? `${theme.colors.gray[2]}` : undefined,
|
|
19
15
|
borderColor: disableRowSelection ? `${theme.colors.gray[3]}` : `${theme.colors.gray[4]}`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {CrossSize16Px,
|
|
1
|
+
import {CrossSize16Px, FilterSize16Px} from '@coveord/plasma-react-icons';
|
|
2
2
|
import {ActionIcon, Grid, TextInput} from '@mantine/core';
|
|
3
3
|
import {ChangeEventHandler, FunctionComponent, MouseEventHandler, useEffect, useState} from 'react';
|
|
4
4
|
|
|
@@ -57,7 +57,7 @@ export const TableFilter: FunctionComponent<TableFilterProps> = ({
|
|
|
57
57
|
<CrossSize16Px height={16} />
|
|
58
58
|
</ActionIcon>
|
|
59
59
|
) : (
|
|
60
|
-
<
|
|
60
|
+
<FilterSize16Px height={16} className={classes.empty} />
|
|
61
61
|
)
|
|
62
62
|
}
|
|
63
63
|
value={filter}
|
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import {createStyles} from '@mantine/core';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export interface ThStyleParams {
|
|
4
|
+
size: number;
|
|
5
|
+
minSize: number;
|
|
6
|
+
maxSize: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createStyles((theme, {maxSize, minSize, size}: ThStyleParams) => ({
|
|
10
|
+
root: {
|
|
11
|
+
padding: `${theme.spacing.xs} ${theme.spacing.sm}`,
|
|
7
12
|
verticalAlign: 'middle',
|
|
8
13
|
whiteSpace: 'nowrap',
|
|
9
14
|
textAlign: 'left',
|
|
10
15
|
color: theme.colors.gray[6],
|
|
11
16
|
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.gray[8] : theme.colors.gray[0],
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
height: theme.spacing.xl,
|
|
18
|
+
width: size ?? 'auto',
|
|
19
|
+
minWidth: minSize,
|
|
20
|
+
maxWidth: maxSize,
|
|
21
|
+
fontWeight: 500,
|
|
22
|
+
fontSize: theme.fontSizes.xs,
|
|
23
|
+
|
|
24
|
+
'&:first-of-type': {
|
|
25
|
+
paddingLeft: theme.spacing.xl,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
'&:last-of-type': {
|
|
29
|
+
paddingRight: theme.spacing.xl,
|
|
30
|
+
},
|
|
15
31
|
},
|
|
16
32
|
|
|
17
33
|
control: {
|
|
18
|
-
color: 'inherit',
|
|
19
|
-
whiteSpace: 'inherit',
|
|
20
|
-
fontWeight: 'inherit',
|
|
21
|
-
width: '100%',
|
|
22
|
-
padding: `${theme.spacing.xs} ${theme.spacing.sm}`,
|
|
23
34
|
'&:hover': {
|
|
24
35
|
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.gray[7] : theme.colors.gray[1],
|
|
25
36
|
},
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
import {ArrowDownSize16Px, ArrowUpSize16Px, DoubleArrowHeadVSize16Px} from '@coveord/plasma-react-icons';
|
|
2
|
-
import {
|
|
2
|
+
import {Group, UnstyledButton, useComponentDefaultProps} from '@mantine/core';
|
|
3
3
|
import {defaultColumnSizing, flexRender} from '@tanstack/react-table';
|
|
4
|
+
import {AriaAttributes} from 'react';
|
|
4
5
|
import useStyles from './Th.styles';
|
|
5
|
-
import {ThProps} from './Th.types';
|
|
6
|
+
import {SortState, ThProps} from './Th.types';
|
|
6
7
|
|
|
7
|
-
const SortingIcons = {
|
|
8
|
+
const SortingIcons: ThProps['sortingIcons'] = {
|
|
8
9
|
asc: ArrowUpSize16Px,
|
|
9
10
|
desc: ArrowDownSize16Px,
|
|
10
11
|
none: DoubleArrowHeadVSize16Px,
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
const SortingLabels = {
|
|
14
|
+
const SortingLabels: Record<SortState, AriaAttributes['aria-sort']> = {
|
|
14
15
|
asc: 'ascending',
|
|
15
16
|
desc: 'descending',
|
|
16
17
|
none: 'none',
|
|
17
18
|
} as const;
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
const defaultProps: Partial<ThProps> = {
|
|
21
|
+
sortingIcons: SortingIcons,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Th = <T,>(props: ThProps<T>) => {
|
|
25
|
+
const {header, classNames, styles, unstyled, sortingIcons, ...others} = useComponentDefaultProps(
|
|
26
|
+
'PlasmaTableColumnHeader',
|
|
27
|
+
defaultProps as Partial<ThProps<T>>,
|
|
28
|
+
props,
|
|
29
|
+
);
|
|
30
|
+
|
|
20
31
|
const columnSizing = {
|
|
21
32
|
...defaultColumnSizing,
|
|
22
33
|
size: header.column.columnDef.size,
|
|
@@ -24,38 +35,32 @@ export const Th = <T,>({header}: ThProps<T>) => {
|
|
|
24
35
|
maxSize: header.column.columnDef.maxSize,
|
|
25
36
|
};
|
|
26
37
|
|
|
27
|
-
const {classes} = useStyles(columnSizing);
|
|
38
|
+
const {classes, cx} = useStyles(columnSizing, {name: 'PlasmaTableColumnHeader', classNames, styles, unstyled});
|
|
28
39
|
|
|
29
40
|
if (header.isPlaceholder) {
|
|
30
41
|
return null;
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
if (!header.column.getCanSort()) {
|
|
34
|
-
return (
|
|
35
|
-
<th className={classes.th}>
|
|
36
|
-
<Text size="xs" py="xs" px="sm" fw={500}>
|
|
37
|
-
{flexRender(header.column.columnDef.header, header.getContext())}
|
|
38
|
-
</Text>
|
|
39
|
-
</th>
|
|
40
|
-
);
|
|
45
|
+
return <th className={classes.root}>{flexRender(header.column.columnDef.header, header.getContext())}</th>;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
const onSort = header.column.getToggleSortingHandler();
|
|
44
49
|
const sortingOrder = header.column.getIsSorted() || 'none';
|
|
45
|
-
const Icon =
|
|
50
|
+
const Icon = sortingIcons[sortingOrder];
|
|
46
51
|
|
|
47
52
|
return (
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</
|
|
59
|
-
</
|
|
53
|
+
<UnstyledButton
|
|
54
|
+
component="th"
|
|
55
|
+
onClick={onSort}
|
|
56
|
+
className={cx(classes.root, classes.control)}
|
|
57
|
+
aria-sort={SortingLabels[sortingOrder]}
|
|
58
|
+
{...others}
|
|
59
|
+
>
|
|
60
|
+
<Group noWrap spacing="xs">
|
|
61
|
+
{flexRender(header.column.columnDef.header, header.getContext())}
|
|
62
|
+
<Icon height={16} width={16} />
|
|
63
|
+
</Group>
|
|
64
|
+
</UnstyledButton>
|
|
60
65
|
);
|
|
61
66
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import {DefaultProps, Selectors} from '@mantine/core';
|
|
1
2
|
import {Header} from '@tanstack/react-table';
|
|
3
|
+
import {ComponentType, SVGProps} from 'react';
|
|
4
|
+
import useStyles from './Th.styles';
|
|
2
5
|
|
|
3
|
-
export
|
|
6
|
+
export type SortState = 'asc' | 'desc' | 'none';
|
|
7
|
+
|
|
8
|
+
export interface ThProps<T = unknown> extends DefaultProps<Selectors<typeof useStyles>> {
|
|
4
9
|
header: Header<T, unknown>;
|
|
10
|
+
sortingIcons?: Record<SortState, ComponentType<SVGProps<SVGSVGElement>>>;
|
|
5
11
|
}
|