@atlaskit/table 0.11.7 → 0.12.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 +18 -0
- package/dist/cjs/body.js +8 -10
- package/dist/cjs/expandable-cell.js +6 -12
- package/dist/cjs/head-cell.js +4 -10
- package/dist/cjs/hooks/selection-provider.js +1 -2
- package/dist/cjs/hooks/use-expand-content.js +1 -2
- package/dist/cjs/hooks/use-expand.js +1 -2
- package/dist/cjs/hooks/use-table.js +1 -2
- package/dist/cjs/row.js +6 -12
- package/dist/cjs/selectable-cell.js +6 -12
- package/dist/cjs/sortable-column.compiled.css +6 -0
- package/dist/cjs/sortable-column.js +15 -21
- package/dist/cjs/table.js +6 -12
- package/dist/cjs/thead.js +7 -14
- package/dist/cjs/ui/base-cell.js +1 -2
- package/dist/cjs/ui/expand-icon.js +5 -11
- package/dist/cjs/ui/sort-icon.js +5 -11
- package/dist/cjs/ui/table.js +4 -10
- package/dist/cjs/ui/tbody.compiled.css +7 -0
- package/dist/cjs/ui/tbody.js +12 -22
- package/dist/cjs/ui/td.js +3 -7
- package/dist/cjs/ui/thead.compiled.css +7 -0
- package/dist/cjs/ui/thead.js +12 -19
- package/dist/cjs/ui/tr.compiled.css +11 -0
- package/dist/cjs/ui/tr.js +16 -36
- package/dist/es2019/body.js +5 -12
- package/dist/es2019/expandable-cell.js +4 -11
- package/dist/es2019/head-cell.js +3 -9
- package/dist/es2019/row.js +4 -11
- package/dist/es2019/selectable-cell.js +4 -11
- package/dist/es2019/sortable-column.compiled.css +6 -0
- package/dist/es2019/sortable-column.js +12 -21
- package/dist/es2019/table.js +4 -11
- package/dist/es2019/thead.js +7 -13
- package/dist/es2019/ui/expand-icon.js +3 -10
- package/dist/es2019/ui/sort-icon.js +3 -10
- package/dist/es2019/ui/table.js +3 -9
- package/dist/es2019/ui/tbody.compiled.css +7 -0
- package/dist/es2019/ui/tbody.js +7 -21
- package/dist/es2019/ui/td.js +3 -8
- package/dist/es2019/ui/thead.compiled.css +7 -0
- package/dist/es2019/ui/thead.js +7 -18
- package/dist/es2019/ui/tr.compiled.css +11 -0
- package/dist/es2019/ui/tr.js +11 -35
- package/dist/esm/body.js +5 -12
- package/dist/esm/expandable-cell.js +4 -11
- package/dist/esm/head-cell.js +3 -9
- package/dist/esm/row.js +4 -11
- package/dist/esm/selectable-cell.js +4 -11
- package/dist/esm/sortable-column.compiled.css +6 -0
- package/dist/esm/sortable-column.js +12 -21
- package/dist/esm/table.js +4 -11
- package/dist/esm/thead.js +7 -13
- package/dist/esm/ui/expand-icon.js +3 -10
- package/dist/esm/ui/sort-icon.js +3 -10
- package/dist/esm/ui/table.js +3 -9
- package/dist/esm/ui/tbody.compiled.css +7 -0
- package/dist/esm/ui/tbody.js +10 -21
- package/dist/esm/ui/td.js +3 -8
- package/dist/esm/ui/thead.compiled.css +7 -0
- package/dist/esm/ui/thead.js +10 -18
- package/dist/esm/ui/tr.compiled.css +11 -0
- package/dist/esm/ui/tr.js +14 -35
- package/dist/types/body.d.ts +2 -7
- package/dist/types/expandable-cell.d.ts +2 -3
- package/dist/types/head-cell.d.ts +1 -5
- package/dist/types/row.d.ts +0 -4
- package/dist/types/selectable-cell.d.ts +2 -2
- package/dist/types/table.d.ts +2 -7
- package/dist/types/thead.d.ts +0 -4
- package/dist/types/ui/expand-icon.d.ts +3 -4
- package/dist/types/ui/sort-icon.d.ts +0 -4
- package/dist/types/ui/table.d.ts +0 -4
- package/dist/types/ui/td.d.ts +1 -5
- package/dist/types-ts4.5/body.d.ts +2 -7
- package/dist/types-ts4.5/expandable-cell.d.ts +2 -3
- package/dist/types-ts4.5/head-cell.d.ts +1 -5
- package/dist/types-ts4.5/row.d.ts +0 -4
- package/dist/types-ts4.5/selectable-cell.d.ts +2 -2
- package/dist/types-ts4.5/table.d.ts +2 -7
- package/dist/types-ts4.5/thead.d.ts +0 -4
- package/dist/types-ts4.5/ui/expand-icon.d.ts +3 -4
- package/dist/types-ts4.5/ui/sort-icon.d.ts +0 -4
- package/dist/types-ts4.5/ui/table.d.ts +0 -4
- package/dist/types-ts4.5/ui/td.d.ts +1 -5
- package/package.json +10 -10
package/dist/esm/ui/thead.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
8
|
-
var baseStyles = css({
|
|
9
|
-
position: 'sticky',
|
|
10
|
-
zIndex: 1,
|
|
11
|
-
inset: 0,
|
|
12
|
-
backgroundColor: "var(--ds-surface, white)",
|
|
13
|
-
border: 'none',
|
|
14
|
-
borderBlockEnd: "2px solid ".concat("var(--ds-border, #eee)"),
|
|
15
|
-
borderBlockStart: '2px solid transparent'
|
|
16
|
-
});
|
|
1
|
+
/* thead.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./thead.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
var baseStyles = null;
|
|
17
6
|
|
|
18
7
|
/**
|
|
19
8
|
* __THead__
|
|
@@ -24,7 +13,10 @@ var baseStyles = css({
|
|
|
24
13
|
*/
|
|
25
14
|
export var THead = function THead(_ref) {
|
|
26
15
|
var children = _ref.children;
|
|
27
|
-
return
|
|
28
|
-
|
|
16
|
+
return /*#__PURE__*/React.createElement("thead", {
|
|
17
|
+
className: ax(["_1r04idpf _19itglyw _179r1n0b _mqm21vrj _kqsw1if8 _1pbykb7n _bfhkvuon"]),
|
|
18
|
+
style: {
|
|
19
|
+
"--_ukuvb0": ix("2px solid ".concat("var(--ds-border, #eee)"))
|
|
20
|
+
}
|
|
29
21
|
}, children);
|
|
30
22
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
._19itglyw{border:none}._179rmc7d{border-block-end:var(--_1748cv6)}
|
|
3
|
+
._4t3i1wto{height:3rem}
|
|
4
|
+
._bfhkcslv{background-color:var(--ds-background-selected,#deebff88)}
|
|
5
|
+
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
6
|
+
._btyzidpf{border-spacing:0}
|
|
7
|
+
._hpylidpf{border-image-width:0}
|
|
8
|
+
._kqswh2mm{position:relative}
|
|
9
|
+
._x6vyglyw:focus-visible:after{box-shadow:none}
|
|
10
|
+
._irr3134o:hover{background-color:var(--ds-background-neutral-subtle-hovered,#f8f8f8)}
|
|
11
|
+
._irr3quvt:hover{background-color:var(--ds-background-selected-hovered,#deebff)}
|
package/dist/esm/ui/tr.js
CHANGED
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
/* tr.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./tr.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
5
|
import FocusRing from '@atlaskit/focus-ring';
|
|
9
|
-
var baseStyles =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
borderImageWidth: 0,
|
|
14
|
-
borderSpacing: 0
|
|
15
|
-
});
|
|
16
|
-
var selectedStyles = css({
|
|
17
|
-
backgroundColor: "var(--ds-background-selected, #DEEBFF88)",
|
|
18
|
-
'&:hover': {
|
|
19
|
-
backgroundColor: "var(--ds-background-selected-hovered, #DEEBFF)" // B50
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
var subitemStyles = css({
|
|
23
|
-
backgroundColor: "var(--ds-background-neutral, #091E420F)"
|
|
24
|
-
});
|
|
25
|
-
var bodyRowStyles = css({
|
|
26
|
-
borderBlockEnd: "1px solid ".concat("var(--ds-border, #eee)"),
|
|
27
|
-
'&:hover': {
|
|
28
|
-
backgroundColor: "var(--ds-background-neutral-subtle-hovered, #f8f8f8)"
|
|
29
|
-
},
|
|
30
|
-
'&:focus-visible::after': {
|
|
31
|
-
boxShadow: 'none'
|
|
32
|
-
}
|
|
33
|
-
});
|
|
6
|
+
var baseStyles = null;
|
|
7
|
+
var selectedStyles = null;
|
|
8
|
+
var subitemStyles = null;
|
|
9
|
+
var bodyRowStyles = null;
|
|
34
10
|
/**
|
|
35
11
|
* __Row__
|
|
36
12
|
*
|
|
@@ -45,12 +21,15 @@ export var TR = function TR(_ref) {
|
|
|
45
21
|
_ref$isBodyRow = _ref.isBodyRow,
|
|
46
22
|
isBodyRow = _ref$isBodyRow === void 0 ? true : _ref$isBodyRow,
|
|
47
23
|
isSubitem = _ref.isSubitem;
|
|
48
|
-
return
|
|
24
|
+
return /*#__PURE__*/React.createElement(FocusRing, {
|
|
49
25
|
isInset: true
|
|
50
|
-
},
|
|
26
|
+
}, /*#__PURE__*/React.createElement("tr", {
|
|
51
27
|
tabIndex: -1,
|
|
52
28
|
"aria-selected": isSelected,
|
|
53
29
|
"data-testid": testId,
|
|
54
|
-
|
|
30
|
+
className: ax(["_19itglyw _4t3i1wto _kqswh2mm _hpylidpf _btyzidpf", isBodyRow && "_179rmc7d _x6vyglyw _irr3134o", isSelected && "_bfhkcslv _irr3quvt", isSubitem && "_bfhkm7j4"]),
|
|
31
|
+
style: {
|
|
32
|
+
"--_1748cv6": ix("1px solid ".concat("var(--ds-border, #eee)"))
|
|
33
|
+
}
|
|
55
34
|
}, children));
|
|
56
35
|
};
|
package/dist/types/body.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
7
2
|
type BodyProps<Item extends object> = {
|
|
8
3
|
rows: Item[];
|
|
9
4
|
children: (row: Item) => ReactElement;
|
|
@@ -14,5 +9,5 @@ type BodyProps<Item extends object> = {
|
|
|
14
9
|
/**
|
|
15
10
|
* __Table body__
|
|
16
11
|
*/
|
|
17
|
-
declare function TBody<ObjectType extends object>({ rows, children }: BodyProps<ObjectType>):
|
|
12
|
+
declare function TBody<ObjectType extends object>({ rows, children }: BodyProps<ObjectType>): React.JSX.Element;
|
|
18
13
|
export default TBody;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* __Expandable cell__
|
|
5
4
|
*
|
|
6
5
|
* A cell with an expand button that controls the expanded state
|
|
7
6
|
* of the `<ExpandableRow>`.
|
|
8
7
|
*/
|
|
9
|
-
declare const ExpandableCell:
|
|
8
|
+
declare const ExpandableCell: React.MemoExoticComponent<() => React.JSX.Element>;
|
|
10
9
|
export default ExpandableCell;
|
package/dist/types/row.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const SelectableCell:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const SelectableCell: React.NamedExoticComponent<{}>;
|
|
3
3
|
export default SelectableCell;
|
package/dist/types/table.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
7
2
|
import { type SortKey } from './hooks/use-table';
|
|
8
3
|
type TableProps<ItemType extends object = {}> = {
|
|
9
4
|
/**
|
|
@@ -29,5 +24,5 @@ type TableProps<ItemType extends object = {}> = {
|
|
|
29
24
|
*
|
|
30
25
|
* - [Examples](https://atlassian.design/components/table/examples)
|
|
31
26
|
*/
|
|
32
|
-
declare function Table<ItemType extends object = object>({ children, isSelectable, sortKey, testId, }: TableProps<ItemType>):
|
|
27
|
+
declare function Table<ItemType extends object = object>({ children, isSelectable, sortKey, testId, }: TableProps<ItemType>): React.JSX.Element;
|
|
33
28
|
export default Table;
|
package/dist/types/thead.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* __Expand icon__
|
|
5
4
|
*
|
|
6
5
|
* An icon used to display the expanded state in an `<ExpandableCell>`.
|
|
7
6
|
*/
|
|
8
|
-
export declare const ExpandIcon:
|
|
7
|
+
export declare const ExpandIcon: React.MemoExoticComponent<({ isExpanded }: {
|
|
9
8
|
isExpanded: boolean;
|
|
10
|
-
}) =>
|
|
9
|
+
}) => React.JSX.Element>;
|
package/dist/types/ui/table.d.ts
CHANGED
package/dist/types/ui/td.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
7
2
|
type BodyProps<Item extends object> = {
|
|
8
3
|
rows: Item[];
|
|
9
4
|
children: (row: Item) => ReactElement;
|
|
@@ -14,5 +9,5 @@ type BodyProps<Item extends object> = {
|
|
|
14
9
|
/**
|
|
15
10
|
* __Table body__
|
|
16
11
|
*/
|
|
17
|
-
declare function TBody<ObjectType extends object>({ rows, children }: BodyProps<ObjectType>):
|
|
12
|
+
declare function TBody<ObjectType extends object>({ rows, children }: BodyProps<ObjectType>): React.JSX.Element;
|
|
18
13
|
export default TBody;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* __Expandable cell__
|
|
5
4
|
*
|
|
6
5
|
* A cell with an expand button that controls the expanded state
|
|
7
6
|
* of the `<ExpandableRow>`.
|
|
8
7
|
*/
|
|
9
|
-
declare const ExpandableCell:
|
|
8
|
+
declare const ExpandableCell: React.MemoExoticComponent<() => React.JSX.Element>;
|
|
10
9
|
export default ExpandableCell;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const SelectableCell:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const SelectableCell: React.NamedExoticComponent<{}>;
|
|
3
3
|
export default SelectableCell;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
7
2
|
import { type SortKey } from './hooks/use-table';
|
|
8
3
|
type TableProps<ItemType extends object = {}> = {
|
|
9
4
|
/**
|
|
@@ -29,5 +24,5 @@ type TableProps<ItemType extends object = {}> = {
|
|
|
29
24
|
*
|
|
30
25
|
* - [Examples](https://atlassian.design/components/table/examples)
|
|
31
26
|
*/
|
|
32
|
-
declare function Table<ItemType extends object = object>({ children, isSelectable, sortKey, testId, }: TableProps<ItemType>):
|
|
27
|
+
declare function Table<ItemType extends object = object>({ children, isSelectable, sortKey, testId, }: TableProps<ItemType>): React.JSX.Element;
|
|
33
28
|
export default Table;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* __Expand icon__
|
|
5
4
|
*
|
|
6
5
|
* An icon used to display the expanded state in an `<ExpandableCell>`.
|
|
7
6
|
*/
|
|
8
|
-
export declare const ExpandIcon:
|
|
7
|
+
export declare const ExpandIcon: React.MemoExoticComponent<({ isExpanded }: {
|
|
9
8
|
isExpanded: boolean;
|
|
10
|
-
}) =>
|
|
9
|
+
}) => React.JSX.Element>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "A table is used to display data.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"name": "Table",
|
|
15
15
|
"category": "Text and data display",
|
|
16
16
|
"status": {
|
|
17
|
-
"type": "
|
|
18
|
-
"description": "This package
|
|
17
|
+
"type": "intent-to-deprecate",
|
|
18
|
+
"description": "This package was an experiment, and is currently deprioritized. It is not recommended for use in production, and we are not providing support for it at this time. Consider using [@atlaskit/dynamic-table](/components/dynamic-table) instead."
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"runReact18": true
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"./primitives": "./src/ui/index.tsx"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@atlaskit/button": "^23.
|
|
45
|
+
"@atlaskit/button": "^23.2.0",
|
|
46
46
|
"@atlaskit/checkbox": "^17.1.0",
|
|
47
47
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
48
48
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
49
|
-
"@atlaskit/icon": "^26.
|
|
50
|
-
"@atlaskit/primitives": "^14.
|
|
51
|
-
"@atlaskit/tokens": "^
|
|
52
|
-
"@atlaskit/tooltip": "^20.
|
|
49
|
+
"@atlaskit/icon": "^26.4.0",
|
|
50
|
+
"@atlaskit/primitives": "^14.8.0",
|
|
51
|
+
"@atlaskit/tokens": "^5.0.0",
|
|
52
|
+
"@atlaskit/tooltip": "^20.2.0",
|
|
53
53
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
|
-
"@
|
|
55
|
+
"@compiled/react": "^0.18.3",
|
|
56
56
|
"tiny-invariant": "^1.2.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@af/accessibility-testing": "workspace:^",
|
|
63
63
|
"@af/integration-testing": "workspace:^",
|
|
64
|
-
"@atlaskit/avatar": "^25.
|
|
64
|
+
"@atlaskit/avatar": "^25.1.0",
|
|
65
65
|
"@atlaskit/date": "^2.0.0",
|
|
66
66
|
"@atlaskit/docs": "^10.0.0",
|
|
67
67
|
"@atlaskit/dynamic-table": "^18.1.0",
|