@atlaskit/table 0.3.4 → 0.4.1
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 +16 -0
- package/README.md +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/body.d.ts +1 -1
- package/dist/types/expandable-row-content.d.ts +1 -1
- package/dist/types/expandable-row.d.ts +1 -1
- package/dist/types/hooks/selection-provider.d.ts +1 -1
- package/dist/types/hooks/use-expand-content.d.ts +1 -1
- package/dist/types/hooks/use-expand.d.ts +1 -1
- package/dist/types/hooks/use-selectable.d.ts +2 -2
- package/dist/types/hooks/use-table.d.ts +3 -3
- package/dist/types/row.d.ts +1 -1
- package/dist/types/table.d.ts +1 -1
- package/dist/types/thead.d.ts +1 -1
- package/dist/types/ui/base-cell.d.ts +2 -2
- package/dist/types/ui/expandable-cell.d.ts +1 -1
- package/dist/types/ui/selectable-cell.d.ts +1 -1
- package/dist/types/ui/table.d.ts +1 -1
- package/dist/types/ui/th.d.ts +2 -2
- package/package.json +21 -13
- package/primitives/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/table
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
8
|
+
|
|
9
|
+
## 0.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 0.3.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table';
|
|
|
22
22
|
|
|
23
23
|
import { presidents } from './data';
|
|
24
24
|
|
|
25
|
-
type President = typeof presidents[number];
|
|
25
|
+
type President = (typeof presidents)[number];
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Primary UI component for user interaction
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/dist/types/body.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
export
|
|
4
|
+
export type BodyProps<Item extends object> = {
|
|
5
5
|
rows: Item[];
|
|
6
6
|
children: (row: Item) => ReactElement;
|
|
7
7
|
} | {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
2
|
import { SelectableActions, SelectableState } from './use-selectable';
|
|
3
|
-
|
|
3
|
+
type SelectionContext = [
|
|
4
4
|
SelectableState,
|
|
5
5
|
/**
|
|
6
6
|
* Context actions will be undefined without a `SelectionProvider` mounted.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SelectableState = {
|
|
2
2
|
/**
|
|
3
3
|
* The localised ids that have been checked.
|
|
4
4
|
*/
|
|
@@ -27,7 +27,7 @@ export declare type SelectableState = {
|
|
|
27
27
|
*/
|
|
28
28
|
previousSelection: number[];
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type SelectableActions = {
|
|
31
31
|
setAll: () => void;
|
|
32
32
|
removeAll: () => void;
|
|
33
33
|
toggleSelection: (id: number, shiftHeld: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type SortDirection = 'ascending' | 'descending';
|
|
3
|
+
export type SortKey<Key extends string | symbol | number> = Key | 'unset';
|
|
4
|
+
export type TableContext<T, K extends keyof T = keyof T> = {
|
|
5
5
|
isSelectable?: boolean;
|
|
6
6
|
sortKey: SortKey<K>;
|
|
7
7
|
sortDirection?: SortDirection;
|
package/dist/types/row.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC, ReactNode } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type RowProps = {
|
|
4
4
|
/**
|
|
5
5
|
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
6
6
|
* in the rendered code, serving as a hook for automated tests.
|
package/dist/types/table.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { SortKey } from './hooks/use-table';
|
|
5
|
-
export
|
|
5
|
+
export type TableProps<ItemType extends object = {}> = {
|
|
6
6
|
/**
|
|
7
7
|
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
8
8
|
* in the rendered code, serving as a hook for automated tests.
|
package/dist/types/thead.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BoxProps } from '@atlaskit/ds-explorations/box';
|
|
4
|
-
export
|
|
4
|
+
export type BaseCellProps = {
|
|
5
5
|
/**
|
|
6
6
|
* A percentage of pixel width of the table to apply to a column.
|
|
7
7
|
*/
|
|
@@ -37,7 +37,7 @@ export declare type BaseCellProps = {
|
|
|
37
37
|
/**
|
|
38
38
|
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export type SortDirection = 'ascending' | 'descending' | 'none' | 'other';
|
|
41
41
|
declare const alignMap: {
|
|
42
42
|
readonly text: import("@emotion/react").SerializedStyles;
|
|
43
43
|
readonly number: import("@emotion/react").SerializedStyles;
|
package/dist/types/ui/table.d.ts
CHANGED
package/dist/types/ui/th.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { BaseCellProps, SortDirection } from './base-cell';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type THProps = Omit<BaseCellProps, 'as'>;
|
|
4
|
+
type InternalTHProps = THProps & {
|
|
5
5
|
sortDirection?: SortDirection;
|
|
6
6
|
};
|
|
7
7
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "A table is used to display data.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,6 +25,14 @@
|
|
|
25
25
|
"module": "dist/esm/index.js",
|
|
26
26
|
"module:es2019": "dist/es2019/index.js",
|
|
27
27
|
"types": "dist/types/index.d.ts",
|
|
28
|
+
"typesVersions": {
|
|
29
|
+
">=4.5 <4.9": {
|
|
30
|
+
"*": [
|
|
31
|
+
"dist/types-ts4.5/*",
|
|
32
|
+
"dist/types-ts4.5/index.d.ts"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
28
36
|
"sideEffects": false,
|
|
29
37
|
"atlaskit:src": "src/index.tsx",
|
|
30
38
|
"af:exports": {
|
|
@@ -32,16 +40,16 @@
|
|
|
32
40
|
"./primitives": "./src/ui/index.tsx"
|
|
33
41
|
},
|
|
34
42
|
"dependencies": {
|
|
35
|
-
"@atlaskit/button": "^16.
|
|
36
|
-
"@atlaskit/checkbox": "^12.
|
|
37
|
-
"@atlaskit/ds-explorations": "^2.
|
|
38
|
-
"@atlaskit/ds-lib": "^2.
|
|
39
|
-
"@atlaskit/focus-ring": "^1.
|
|
40
|
-
"@atlaskit/icon": "^21.
|
|
41
|
-
"@atlaskit/primitives": "^0.
|
|
42
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
-
"@atlaskit/tooltip": "^17.
|
|
44
|
-
"@atlaskit/visually-hidden": "^1.
|
|
43
|
+
"@atlaskit/button": "^16.7.0",
|
|
44
|
+
"@atlaskit/checkbox": "^12.6.0",
|
|
45
|
+
"@atlaskit/ds-explorations": "^2.1.0",
|
|
46
|
+
"@atlaskit/ds-lib": "^2.2.0",
|
|
47
|
+
"@atlaskit/focus-ring": "^1.3.0",
|
|
48
|
+
"@atlaskit/icon": "^21.12.0",
|
|
49
|
+
"@atlaskit/primitives": "^0.9.0",
|
|
50
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
51
|
+
"@atlaskit/tooltip": "^17.8.0",
|
|
52
|
+
"@atlaskit/visually-hidden": "^1.2.0",
|
|
45
53
|
"@babel/runtime": "^7.0.0",
|
|
46
54
|
"@emotion/react": "^11.7.1",
|
|
47
55
|
"tiny-invariant": "^1.2.0"
|
|
@@ -57,7 +65,7 @@
|
|
|
57
65
|
"@atlaskit/ds-lib": "*",
|
|
58
66
|
"@atlaskit/dynamic-table": "*",
|
|
59
67
|
"@atlaskit/lozenge": "*",
|
|
60
|
-
"@atlaskit/section-message": "^6.
|
|
68
|
+
"@atlaskit/section-message": "^6.4.0",
|
|
61
69
|
"@atlaskit/ssr": "*",
|
|
62
70
|
"@atlaskit/visual-regression": "*",
|
|
63
71
|
"@atlaskit/webdriver-runner": "*",
|
|
@@ -67,7 +75,7 @@
|
|
|
67
75
|
"jest-axe": "^4.0.0",
|
|
68
76
|
"react-dom": "^16.8.0",
|
|
69
77
|
"storybook-addon-designs": "^6.3.1",
|
|
70
|
-
"typescript": "4.
|
|
78
|
+
"typescript": "~4.9.5",
|
|
71
79
|
"wait-for-expect": "^1.2.0"
|
|
72
80
|
},
|
|
73
81
|
"techstack": {
|
package/primitives/package.json
CHANGED