@atlaskit/table 0.4.17 → 0.4.19
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 +12 -0
- package/dist/cjs/expandable-cell.js +9 -7
- package/dist/cjs/sortable-column.js +3 -1
- package/dist/es2019/expandable-cell.js +9 -7
- package/dist/es2019/sortable-column.js +3 -1
- package/dist/esm/expandable-cell.js +9 -7
- package/dist/esm/sortable-column.js +3 -1
- package/package.json +5 -5
- package/tmp/api-report-tmp.d.ts +0 -122
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/table
|
|
2
2
|
|
|
3
|
+
## 0.4.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#65875](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65875) [`98e49fd3f04d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/98e49fd3f04d) - [ux] Updated buttons in table to consume new buttons.
|
|
8
|
+
|
|
9
|
+
## 0.4.18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 0.4.17
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -8,7 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
|
-
var
|
|
11
|
+
var _new = require("@atlaskit/button/new");
|
|
12
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
|
|
13
|
+
var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
|
|
12
14
|
var _useExpand2 = _interopRequireDefault(require("./hooks/use-expand"));
|
|
13
15
|
var Primitives = _interopRequireWildcard(require("./ui"));
|
|
14
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -30,15 +32,15 @@ var ExpandableCell = /*#__PURE__*/(0, _react.memo)(function () {
|
|
|
30
32
|
}, [toggleExpanded]);
|
|
31
33
|
return (0, _react2.jsx)(Primitives.ExpandableCell, {
|
|
32
34
|
as: "td"
|
|
33
|
-
}, (0, _react2.jsx)(
|
|
35
|
+
}, (0, _react2.jsx)(_new.IconButton, {
|
|
34
36
|
spacing: "compact",
|
|
35
37
|
appearance: "subtle",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
icon: isExpanded ? _chevronUp.default : _chevronDown.default,
|
|
39
|
+
label: "Expand row",
|
|
40
|
+
"aria-label": "Expand row",
|
|
41
|
+
UNSAFE_size: "small",
|
|
39
42
|
onClick: handleClick,
|
|
40
|
-
"aria-pressed": isExpanded
|
|
41
|
-
"aria-label": "Expand row"
|
|
43
|
+
"aria-pressed": isExpanded
|
|
42
44
|
}));
|
|
43
45
|
});
|
|
44
46
|
var _default = exports.default = ExpandableCell;
|
|
@@ -84,7 +84,9 @@ var SortableColumn = function SortableColumn(_ref) {
|
|
|
84
84
|
name: name
|
|
85
85
|
})
|
|
86
86
|
}, tooltipProps, {
|
|
87
|
-
onClick: updateSortState
|
|
87
|
+
onClick: updateSortState
|
|
88
|
+
// TODO: (from codemod) Buttons with "css" or "style" prop can't be migrated for now. Please wait for the support of xcss prop.
|
|
89
|
+
,
|
|
88
90
|
css: overrideStyles
|
|
89
91
|
// TODO: i18n support for this attr
|
|
90
92
|
,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { memo, useCallback } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import
|
|
4
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
+
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
6
|
+
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
5
7
|
import useExpand from './hooks/use-expand';
|
|
6
8
|
import * as Primitives from './ui';
|
|
7
9
|
|
|
@@ -21,15 +23,15 @@ const ExpandableCell = /*#__PURE__*/memo(() => {
|
|
|
21
23
|
}, [toggleExpanded]);
|
|
22
24
|
return jsx(Primitives.ExpandableCell, {
|
|
23
25
|
as: "td"
|
|
24
|
-
}, jsx(
|
|
26
|
+
}, jsx(IconButton, {
|
|
25
27
|
spacing: "compact",
|
|
26
28
|
appearance: "subtle",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
icon: isExpanded ? ChevronUpIcon : ChevronDownIcon,
|
|
30
|
+
label: "Expand row",
|
|
31
|
+
"aria-label": "Expand row",
|
|
32
|
+
UNSAFE_size: "small",
|
|
30
33
|
onClick: handleClick,
|
|
31
|
-
"aria-pressed": isExpanded
|
|
32
|
-
"aria-label": "Expand row"
|
|
34
|
+
"aria-pressed": isExpanded
|
|
33
35
|
}));
|
|
34
36
|
});
|
|
35
37
|
export default ExpandableCell;
|
|
@@ -74,7 +74,9 @@ const SortableColumn = ({
|
|
|
74
74
|
name: name
|
|
75
75
|
})
|
|
76
76
|
}, tooltipProps, {
|
|
77
|
-
onClick: updateSortState
|
|
77
|
+
onClick: updateSortState
|
|
78
|
+
// TODO: (from codemod) Buttons with "css" or "style" prop can't be migrated for now. Please wait for the support of xcss prop.
|
|
79
|
+
,
|
|
78
80
|
css: overrideStyles
|
|
79
81
|
// TODO: i18n support for this attr
|
|
80
82
|
,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { memo, useCallback } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import
|
|
4
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
+
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
6
|
+
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
5
7
|
import useExpand from './hooks/use-expand';
|
|
6
8
|
import * as Primitives from './ui';
|
|
7
9
|
|
|
@@ -20,15 +22,15 @@ var ExpandableCell = /*#__PURE__*/memo(function () {
|
|
|
20
22
|
}, [toggleExpanded]);
|
|
21
23
|
return jsx(Primitives.ExpandableCell, {
|
|
22
24
|
as: "td"
|
|
23
|
-
}, jsx(
|
|
25
|
+
}, jsx(IconButton, {
|
|
24
26
|
spacing: "compact",
|
|
25
27
|
appearance: "subtle",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
icon: isExpanded ? ChevronUpIcon : ChevronDownIcon,
|
|
29
|
+
label: "Expand row",
|
|
30
|
+
"aria-label": "Expand row",
|
|
31
|
+
UNSAFE_size: "small",
|
|
29
32
|
onClick: handleClick,
|
|
30
|
-
"aria-pressed": isExpanded
|
|
31
|
-
"aria-label": "Expand row"
|
|
33
|
+
"aria-pressed": isExpanded
|
|
32
34
|
}));
|
|
33
35
|
});
|
|
34
36
|
export default ExpandableCell;
|
|
@@ -77,7 +77,9 @@ var SortableColumn = function SortableColumn(_ref) {
|
|
|
77
77
|
name: name
|
|
78
78
|
})
|
|
79
79
|
}, tooltipProps, {
|
|
80
|
-
onClick: updateSortState
|
|
80
|
+
onClick: updateSortState
|
|
81
|
+
// TODO: (from codemod) Buttons with "css" or "style" prop can't be migrated for now. Please wait for the support of xcss prop.
|
|
82
|
+
,
|
|
81
83
|
css: overrideStyles
|
|
82
84
|
// TODO: i18n support for this attr
|
|
83
85
|
,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"description": "A table is used to display data.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"./primitives": "./src/ui/index.tsx"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@atlaskit/button": "^
|
|
43
|
+
"@atlaskit/button": "^17.2.0",
|
|
44
44
|
"@atlaskit/checkbox": "^13.0.0",
|
|
45
45
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
46
46
|
"@atlaskit/focus-ring": "^1.3.0",
|
|
47
47
|
"@atlaskit/icon": "^22.0.0",
|
|
48
|
-
"@atlaskit/primitives": "^1.
|
|
49
|
-
"@atlaskit/tokens": "^1.
|
|
50
|
-
"@atlaskit/tooltip": "^18.
|
|
48
|
+
"@atlaskit/primitives": "^1.19.0",
|
|
49
|
+
"@atlaskit/tokens": "^1.34.0",
|
|
50
|
+
"@atlaskit/tooltip": "^18.1.0",
|
|
51
51
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/table"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
/// <reference types="react" />
|
|
8
|
-
|
|
9
|
-
import { BoxProps } from '@atlaskit/primitives';
|
|
10
|
-
import { FC } from 'react';
|
|
11
|
-
import { jsx } from '@emotion/react';
|
|
12
|
-
import { MemoExoticComponent } from 'react';
|
|
13
|
-
import { default as React_2 } from 'react';
|
|
14
|
-
import { ReactElement } from 'react';
|
|
15
|
-
import { ReactNode } from 'react';
|
|
16
|
-
|
|
17
|
-
// @public (undocumented)
|
|
18
|
-
type BaseCellProps = {
|
|
19
|
-
width?: string;
|
|
20
|
-
align?: 'icon' | 'number' | 'text';
|
|
21
|
-
as?: 'td' | 'th';
|
|
22
|
-
scope?: 'col' | 'row';
|
|
23
|
-
testId?: string;
|
|
24
|
-
children?: ReactNode;
|
|
25
|
-
colSpan?: number;
|
|
26
|
-
} & Pick<BoxProps<any>, 'backgroundColor' | 'paddingBlock' | 'paddingInline' | 'xcss'>;
|
|
27
|
-
|
|
28
|
-
// @public (undocumented)
|
|
29
|
-
type BodyProps<Item extends object> = {
|
|
30
|
-
rows: Item[];
|
|
31
|
-
children: (row: Item) => ReactElement;
|
|
32
|
-
} | {
|
|
33
|
-
rows?: never;
|
|
34
|
-
children: ReactElement | ReactElement[];
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// @public
|
|
38
|
-
export const Cell: FC<Omit<BaseCellProps, 'as'>>;
|
|
39
|
-
|
|
40
|
-
// @public (undocumented)
|
|
41
|
-
interface CellProps {
|
|
42
|
-
// (undocumented)
|
|
43
|
-
children?: ReactNode;
|
|
44
|
-
name: string;
|
|
45
|
-
// (undocumented)
|
|
46
|
-
onClick?: React.MouseEventHandler;
|
|
47
|
-
testId?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// @public
|
|
51
|
-
export const ExpandableCell: MemoExoticComponent<() => jsx.JSX.Element>;
|
|
52
|
-
|
|
53
|
-
// @public
|
|
54
|
-
export const ExpandableRow: ({ children, isExpanded, isDefaultExpanded, }: ExpandableRowProps) => JSX.Element;
|
|
55
|
-
|
|
56
|
-
// @public
|
|
57
|
-
export const ExpandableRowContent: ({ children }: ExpandableRowContentProps) => JSX.Element;
|
|
58
|
-
|
|
59
|
-
// @public (undocumented)
|
|
60
|
-
type ExpandableRowContentProps = {
|
|
61
|
-
children?: React_2.ReactNode;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// @public (undocumented)
|
|
65
|
-
type ExpandableRowProps = {
|
|
66
|
-
children: React_2.ReactNode;
|
|
67
|
-
isExpanded?: boolean;
|
|
68
|
-
isDefaultExpanded?: boolean;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// @public
|
|
72
|
-
export const HeadCell: FC<THProps>;
|
|
73
|
-
|
|
74
|
-
// @public
|
|
75
|
-
export const Row: FC<RowProps>;
|
|
76
|
-
|
|
77
|
-
// @public (undocumented)
|
|
78
|
-
type RowProps = {
|
|
79
|
-
testId?: string;
|
|
80
|
-
children?: ReactNode;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// @public
|
|
84
|
-
export const SortableColumn: FC<CellProps>;
|
|
85
|
-
|
|
86
|
-
// @public (undocumented)
|
|
87
|
-
type SortKey<Key extends number | string | symbol> = 'unset' | Key;
|
|
88
|
-
|
|
89
|
-
// @public
|
|
90
|
-
function Table<ItemType extends object = object>({ children, isSelectable, sortKey, testId, }: TableProps<ItemType>): jsx.JSX.Element;
|
|
91
|
-
export default Table;
|
|
92
|
-
|
|
93
|
-
// @public (undocumented)
|
|
94
|
-
type TableProps<ItemType extends object = {}> = {
|
|
95
|
-
testId?: string;
|
|
96
|
-
sortKey?: SortKey<keyof ItemType>;
|
|
97
|
-
children: ReactElement | ReactElement[];
|
|
98
|
-
} & ({
|
|
99
|
-
isSelectable: true;
|
|
100
|
-
defaultSelected?: number;
|
|
101
|
-
} | {
|
|
102
|
-
isSelectable?: false;
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// @public
|
|
106
|
-
export function TBody<ObjectType extends object>({ rows, children, }: BodyProps<ObjectType>): jsx.JSX.Element;
|
|
107
|
-
|
|
108
|
-
// @public (undocumented)
|
|
109
|
-
export const THead: FC<THeadProps>;
|
|
110
|
-
|
|
111
|
-
// @public (undocumented)
|
|
112
|
-
type THeadProps = {
|
|
113
|
-
actions?: (selected: number[]) => ReactNode;
|
|
114
|
-
children?: ReactNode;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
// @public (undocumented)
|
|
118
|
-
type THProps = Omit<BaseCellProps, 'as'>;
|
|
119
|
-
|
|
120
|
-
// (No @packageDocumentation comment for this package)
|
|
121
|
-
|
|
122
|
-
```
|