@atlaskit/table 0.11.2 → 0.11.3
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/cjs/ui/tbody.js +2 -3
- package/dist/es2019/ui/tbody.js +1 -2
- package/dist/esm/ui/tbody.js +1 -2
- package/dist/types/body.d.ts +1 -1
- package/dist/types/hooks/use-table.d.ts +3 -1
- package/dist/types/row.d.ts +1 -1
- package/dist/types/sortable-column.d.ts +1 -1
- package/dist/types/table.d.ts +1 -1
- package/dist/types/ui/tbody.d.ts +0 -1
- package/dist/types-ts4.5/body.d.ts +1 -1
- package/dist/types-ts4.5/hooks/use-table.d.ts +3 -1
- package/dist/types-ts4.5/row.d.ts +1 -1
- package/dist/types-ts4.5/sortable-column.d.ts +1 -1
- package/dist/types-ts4.5/table.d.ts +1 -1
- package/dist/types-ts4.5/ui/tbody.d.ts +0 -1
- package/package.json +13 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/table
|
|
2
2
|
|
|
3
|
+
## 0.11.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#125078](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125078)
|
|
8
|
+
[`734cc6689a73c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/734cc6689a73c) -
|
|
9
|
+
Update dependencies and remove unused internal exports.
|
|
10
|
+
|
|
3
11
|
## 0.11.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/ui/tbody.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.TBody = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
9
9
|
/**
|
|
@@ -35,5 +35,4 @@ var TBody = exports.TBody = function TBody(_ref) {
|
|
|
35
35
|
return (0, _react.jsx)("tbody", {
|
|
36
36
|
css: bodyStyles
|
|
37
37
|
}, children);
|
|
38
|
-
};
|
|
39
|
-
var _default = exports.default = TBody;
|
|
38
|
+
};
|
package/dist/es2019/ui/tbody.js
CHANGED
package/dist/esm/ui/tbody.js
CHANGED
package/dist/types/body.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type SortDirection = 'ascending' | 'descending';
|
|
3
3
|
export type SortKey<Key extends string | symbol | number> = Key | 'unset';
|
|
4
|
-
|
|
4
|
+
type TableContext<T, K extends keyof T = keyof T> = {
|
|
5
5
|
isSelectable?: boolean;
|
|
6
6
|
sortKey: SortKey<K>;
|
|
7
7
|
sortDirection?: SortDirection;
|
|
8
8
|
sortFn?: (a: T, b: T) => number;
|
|
9
9
|
setSortState: (key: SortKey<K>) => void;
|
|
10
10
|
};
|
|
11
|
+
declare const TableContext: React.Context<TableContext<object, never>>;
|
|
11
12
|
/**
|
|
12
13
|
* __Table state provider__
|
|
13
14
|
*
|
|
@@ -20,3 +21,4 @@ export declare function TableProvider<T extends object>({ children, state, }: {
|
|
|
20
21
|
state: TableContext<T>;
|
|
21
22
|
}): React.JSX.Element;
|
|
22
23
|
export declare const useTable: <TableItem extends object>() => TableContext<TableItem, keyof TableItem>;
|
|
24
|
+
export {};
|
package/dist/types/row.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type FC, type ReactNode } from 'react';
|
|
6
|
-
|
|
6
|
+
type RowProps = {
|
|
7
7
|
/**
|
|
8
8
|
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
9
9
|
* in the rendered code, serving as a hook for automated tests.
|
package/dist/types/table.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type ReactElement } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type SortKey } from './hooks/use-table';
|
|
8
|
-
|
|
8
|
+
type TableProps<ItemType extends object = {}> = {
|
|
9
9
|
/**
|
|
10
10
|
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
11
11
|
* in the rendered code, serving as a hook for automated tests.
|
package/dist/types/ui/tbody.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type SortDirection = 'ascending' | 'descending';
|
|
3
3
|
export type SortKey<Key extends string | symbol | number> = Key | 'unset';
|
|
4
|
-
|
|
4
|
+
type TableContext<T, K extends keyof T = keyof T> = {
|
|
5
5
|
isSelectable?: boolean;
|
|
6
6
|
sortKey: SortKey<K>;
|
|
7
7
|
sortDirection?: SortDirection;
|
|
8
8
|
sortFn?: (a: T, b: T) => number;
|
|
9
9
|
setSortState: (key: SortKey<K>) => void;
|
|
10
10
|
};
|
|
11
|
+
declare const TableContext: React.Context<TableContext<object, never>>;
|
|
11
12
|
/**
|
|
12
13
|
* __Table state provider__
|
|
13
14
|
*
|
|
@@ -20,3 +21,4 @@ export declare function TableProvider<T extends object>({ children, state, }: {
|
|
|
20
21
|
state: TableContext<T>;
|
|
21
22
|
}): React.JSX.Element;
|
|
22
23
|
export declare const useTable: <TableItem extends object>() => TableContext<TableItem, keyof TableItem>;
|
|
24
|
+
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type FC, type ReactNode } from 'react';
|
|
6
|
-
|
|
6
|
+
type RowProps = {
|
|
7
7
|
/**
|
|
8
8
|
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
9
9
|
* in the rendered code, serving as a hook for automated tests.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type ReactElement } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type SortKey } from './hooks/use-table';
|
|
8
|
-
|
|
8
|
+
type TableProps<ItemType extends object = {}> = {
|
|
9
9
|
/**
|
|
10
10
|
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
11
11
|
* in the rendered code, serving as a hook for automated tests.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "A table is used to display data.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
49
49
|
"@atlaskit/icon": "^24.1.0",
|
|
50
50
|
"@atlaskit/primitives": "^14.1.0",
|
|
51
|
-
"@atlaskit/tokens": "^4.
|
|
51
|
+
"@atlaskit/tokens": "^4.4.0",
|
|
52
52
|
"@atlaskit/tooltip": "^20.0.0",
|
|
53
53
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -59,14 +59,20 @@
|
|
|
59
59
|
"react": "^18.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@af/accessibility-testing": "
|
|
63
|
-
"@af/integration-testing": "
|
|
64
|
-
"@atlaskit/
|
|
65
|
-
"@atlaskit/
|
|
62
|
+
"@af/accessibility-testing": "^2.0.0",
|
|
63
|
+
"@af/integration-testing": "^0.5.0",
|
|
64
|
+
"@atlaskit/avatar": "^25.0.0",
|
|
65
|
+
"@atlaskit/date": "^2.0.0",
|
|
66
|
+
"@atlaskit/docs": "^10.0.0",
|
|
67
|
+
"@atlaskit/dynamic-table": "^18.0.0",
|
|
68
|
+
"@atlaskit/lozenge": "^12.2.0",
|
|
69
|
+
"@atlaskit/section-message": "^8.1.0",
|
|
70
|
+
"@atlaskit/ssr": "^0.4.0",
|
|
71
|
+
"@atlaskit/visual-regression": "^0.10.0",
|
|
66
72
|
"@testing-library/react": "^13.4.0",
|
|
67
73
|
"@testing-library/react-hooks": "^8.0.1",
|
|
74
|
+
"raw-loader": "^0.5.1",
|
|
68
75
|
"react-dom": "^18.2.0",
|
|
69
|
-
"storybook-addon-designs": "^6.3.1",
|
|
70
76
|
"typescript": "~5.4.2"
|
|
71
77
|
},
|
|
72
78
|
"techstack": {
|