@atlaskit/table 0.5.2 → 0.6.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 +20 -1
- package/LICENSE.md +6 -8
- package/README.md +40 -38
- package/dist/cjs/body.js +3 -1
- package/dist/cjs/expandable-cell.js +5 -0
- package/dist/cjs/head-cell.js +5 -0
- package/dist/cjs/row.js +5 -0
- package/dist/cjs/selectable-cell.js +5 -0
- package/dist/cjs/sortable-column.js +6 -2
- package/dist/cjs/table.js +5 -0
- package/dist/cjs/thead.js +5 -0
- package/dist/cjs/ui/base-cell.js +2 -0
- package/dist/cjs/ui/expand-icon.js +5 -0
- package/dist/cjs/ui/sort-icon.js +5 -0
- package/dist/cjs/ui/table.js +5 -0
- package/dist/cjs/ui/tbody.js +6 -0
- package/dist/cjs/ui/td.js +4 -0
- package/dist/cjs/ui/thead.js +7 -2
- package/dist/cjs/ui/tr.js +5 -0
- package/dist/es2019/body.js +5 -0
- package/dist/es2019/expandable-cell.js +5 -0
- package/dist/es2019/head-cell.js +4 -0
- package/dist/es2019/row.js +5 -0
- package/dist/es2019/selectable-cell.js +5 -0
- package/dist/es2019/sortable-column.js +7 -2
- package/dist/es2019/table.js +5 -0
- package/dist/es2019/thead.js +4 -0
- package/dist/es2019/ui/base-cell.js +2 -0
- package/dist/es2019/ui/expand-icon.js +5 -0
- package/dist/es2019/ui/sort-icon.js +5 -0
- package/dist/es2019/ui/table.js +4 -0
- package/dist/es2019/ui/tbody.js +5 -0
- package/dist/es2019/ui/td.js +4 -0
- package/dist/es2019/ui/thead.js +6 -2
- package/dist/es2019/ui/tr.js +4 -0
- package/dist/esm/body.js +5 -0
- package/dist/esm/expandable-cell.js +5 -0
- package/dist/esm/head-cell.js +4 -0
- package/dist/esm/row.js +5 -0
- package/dist/esm/selectable-cell.js +5 -0
- package/dist/esm/sortable-column.js +7 -2
- package/dist/esm/table.js +5 -0
- package/dist/esm/thead.js +4 -0
- package/dist/esm/ui/base-cell.js +2 -0
- package/dist/esm/ui/expand-icon.js +5 -0
- package/dist/esm/ui/sort-icon.js +5 -0
- package/dist/esm/ui/table.js +4 -0
- package/dist/esm/ui/tbody.js +5 -0
- package/dist/esm/ui/td.js +4 -0
- package/dist/esm/ui/thead.js +6 -2
- package/dist/esm/ui/tr.js +4 -0
- package/dist/types/body.d.ts +4 -1
- package/dist/types/expandable-row.d.ts +1 -1
- package/dist/types/head-cell.d.ts +3 -0
- package/dist/types/hooks/use-expand-content.d.ts +1 -1
- package/dist/types/row.d.ts +3 -0
- package/dist/types/sortable-column.d.ts +3 -0
- package/dist/types/table.d.ts +3 -0
- package/dist/types/thead.d.ts +3 -0
- package/dist/types/ui/sort-icon.d.ts +3 -0
- package/dist/types/ui/table.d.ts +3 -0
- package/dist/types/ui/tbody.d.ts +3 -0
- package/dist/types/ui/td.d.ts +3 -0
- package/dist/types/ui/thead.d.ts +3 -0
- package/dist/types/ui/tr.d.ts +3 -0
- package/dist/types-ts4.5/body.d.ts +4 -1
- package/dist/types-ts4.5/expandable-row.d.ts +1 -1
- package/dist/types-ts4.5/head-cell.d.ts +3 -0
- package/dist/types-ts4.5/hooks/use-expand-content.d.ts +1 -1
- package/dist/types-ts4.5/row.d.ts +3 -0
- package/dist/types-ts4.5/sortable-column.d.ts +3 -0
- package/dist/types-ts4.5/table.d.ts +3 -0
- package/dist/types-ts4.5/thead.d.ts +3 -0
- package/dist/types-ts4.5/ui/sort-icon.d.ts +3 -0
- package/dist/types-ts4.5/ui/table.d.ts +3 -0
- package/dist/types-ts4.5/ui/tbody.d.ts +3 -0
- package/dist/types-ts4.5/ui/td.d.ts +3 -0
- package/dist/types-ts4.5/ui/thead.d.ts +3 -0
- package/dist/types-ts4.5/ui/tr.d.ts +3 -0
- package/extract-react-types/row.tsx +2 -2
- package/extract-react-types/table.tsx +2 -2
- package/package.json +102 -102
- package/report.api.md +53 -57
package/dist/esm/body.js
CHANGED
|
@@ -5,8 +5,13 @@ var _excluded = ["idx"];
|
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
8
|
+
/**
|
|
9
|
+
* @jsxRuntime classic
|
|
10
|
+
*/
|
|
8
11
|
/** @jsx jsx */
|
|
9
12
|
import { Children, useEffect, useMemo } from 'react';
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
15
|
import { jsx } from '@emotion/react';
|
|
11
16
|
import { useSelection } from './hooks/selection-provider';
|
|
12
17
|
import { RowProvider } from './hooks/use-row-id';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { memo, useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { jsx } from '@emotion/react';
|
|
4
9
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
10
|
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
package/dist/esm/head-cell.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { jsx } from '@emotion/react';
|
|
5
9
|
import { Text } from '@atlaskit/primitives';
|
|
6
10
|
import { TH } from './ui/th';
|
package/dist/esm/row.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { memo, useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { useSelection } from './hooks/selection-provider';
|
|
6
11
|
import useExpand from './hooks/use-expand';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { memo, useCallback, useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import Checkbox from '@atlaskit/checkbox';
|
|
6
11
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -2,8 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["name", "testId", "onClick", "children"];
|
|
4
4
|
/* eslint-disable no-unused-vars */
|
|
5
|
+
/**
|
|
6
|
+
* @jsxRuntime classic
|
|
7
|
+
*/
|
|
5
8
|
/** @jsx jsx */
|
|
6
9
|
import { useCallback } from 'react';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
12
|
import { css, jsx } from '@emotion/react';
|
|
8
13
|
import Button from '@atlaskit/button';
|
|
9
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -28,10 +33,10 @@ var sortingMessages = {
|
|
|
28
33
|
}
|
|
29
34
|
};
|
|
30
35
|
var overrideStyles = css({
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
36
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
32
37
|
margin: '0 -2px !important',
|
|
33
38
|
gap: "var(--ds-space-050, 4px)",
|
|
34
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
35
40
|
paddingInline: "2px !important"
|
|
36
41
|
});
|
|
37
42
|
|
package/dist/esm/table.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { jsx } from '@emotion/react';
|
|
4
9
|
import SelectionProvider from './hooks/selection-provider';
|
|
5
10
|
import { useSorting } from './hooks/use-sorting';
|
package/dist/esm/thead.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { jsx } from '@emotion/react';
|
|
5
9
|
import Checkbox from '@atlaskit/checkbox';
|
|
6
10
|
import Inline from '@atlaskit/primitives/inline';
|
package/dist/esm/ui/base-cell.js
CHANGED
|
@@ -9,9 +9,11 @@ import { Box, xcss } from '@atlaskit/primitives';
|
|
|
9
9
|
var baseResetStyles = xcss({
|
|
10
10
|
display: 'table-cell',
|
|
11
11
|
verticalAlign: 'middle',
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
12
13
|
':first-of-type': {
|
|
13
14
|
paddingInlineStart: 'space.100'
|
|
14
15
|
},
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
15
17
|
':last-of-type': {
|
|
16
18
|
paddingInlineEnd: 'space.100'
|
|
17
19
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { memo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
|
|
6
11
|
// TODO: Using HipChat icons as the standard icon set is missing large
|
package/dist/esm/ui/sort-icon.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { memo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
|
|
6
11
|
import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
|
package/dist/esm/ui/table.js
CHANGED
package/dist/esm/ui/tbody.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { css, jsx } from '@emotion/react';
|
|
5
9
|
var bodyStyles = css({
|
|
6
10
|
position: 'relative',
|
|
7
11
|
border: 'none',
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
8
13
|
'&:after': {
|
|
9
14
|
position: 'absolute',
|
|
10
15
|
inset: 0,
|
package/dist/esm/ui/td.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["testId"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
10
|
import { jsx } from '@emotion/react';
|
|
7
11
|
import { BaseCell } from './base-cell';
|
|
8
12
|
|
package/dist/esm/ui/thead.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
7
|
import { css, jsx } from '@emotion/react';
|
|
4
8
|
var baseStyles = css({
|
|
5
9
|
position: 'sticky',
|
|
@@ -7,8 +11,8 @@ var baseStyles = css({
|
|
|
7
11
|
inset: 0,
|
|
8
12
|
backgroundColor: "var(--ds-surface, white)",
|
|
9
13
|
border: 'none',
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
borderBlockEnd: "2px solid ".concat("var(--ds-border, #eee)"),
|
|
15
|
+
borderBlockStart: '2px solid transparent'
|
|
12
16
|
});
|
|
13
17
|
|
|
14
18
|
/**
|
package/dist/esm/ui/tr.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
7
|
import { css, jsx } from '@emotion/react';
|
|
4
8
|
import FocusRing from '@atlaskit/focus-ring';
|
|
5
9
|
var baseStyles = css({
|
package/dist/types/body.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { type ReactElement } from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
@@ -11,5 +14,5 @@ export type BodyProps<Item extends object> = {
|
|
|
11
14
|
/**
|
|
12
15
|
* __Table body__
|
|
13
16
|
*/
|
|
14
|
-
declare function TBody<ObjectType extends object>({ rows, children
|
|
17
|
+
declare function TBody<ObjectType extends object>({ rows, children }: BodyProps<ObjectType>): jsx.JSX.Element;
|
|
15
18
|
export default TBody;
|
|
@@ -15,5 +15,5 @@ type ExpandableRowProps = {
|
|
|
15
15
|
*
|
|
16
16
|
* A context provider for `<Row>` to support expandable content.
|
|
17
17
|
*/
|
|
18
|
-
declare const ExpandableRow: ({ children, isExpanded, isDefaultExpanded
|
|
18
|
+
declare const ExpandableRow: ({ children, isExpanded, isDefaultExpanded }: ExpandableRowProps) => JSX.Element;
|
|
19
19
|
export default ExpandableRow;
|
|
@@ -8,7 +8,7 @@ declare const ExpandContentContext: React.Context<ExpandContentContext>;
|
|
|
8
8
|
*
|
|
9
9
|
* An expand content provider allows `<Row>` to determine if it is a subitem.
|
|
10
10
|
*/
|
|
11
|
-
export declare const ExpandContentContextProvider: ({ children
|
|
11
|
+
export declare const ExpandContentContextProvider: ({ children }: {
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}) => JSX.Element;
|
|
14
14
|
declare const useExpandContent: () => ExpandContentContext;
|
package/dist/types/row.d.ts
CHANGED
package/dist/types/table.d.ts
CHANGED
package/dist/types/thead.d.ts
CHANGED
package/dist/types/ui/table.d.ts
CHANGED
package/dist/types/ui/tbody.d.ts
CHANGED
package/dist/types/ui/td.d.ts
CHANGED
package/dist/types/ui/thead.d.ts
CHANGED
package/dist/types/ui/tr.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { type ReactElement } from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
@@ -11,5 +14,5 @@ export type BodyProps<Item extends object> = {
|
|
|
11
14
|
/**
|
|
12
15
|
* __Table body__
|
|
13
16
|
*/
|
|
14
|
-
declare function TBody<ObjectType extends object>({ rows, children
|
|
17
|
+
declare function TBody<ObjectType extends object>({ rows, children }: BodyProps<ObjectType>): jsx.JSX.Element;
|
|
15
18
|
export default TBody;
|
|
@@ -15,5 +15,5 @@ type ExpandableRowProps = {
|
|
|
15
15
|
*
|
|
16
16
|
* A context provider for `<Row>` to support expandable content.
|
|
17
17
|
*/
|
|
18
|
-
declare const ExpandableRow: ({ children, isExpanded, isDefaultExpanded
|
|
18
|
+
declare const ExpandableRow: ({ children, isExpanded, isDefaultExpanded }: ExpandableRowProps) => JSX.Element;
|
|
19
19
|
export default ExpandableRow;
|
|
@@ -8,7 +8,7 @@ declare const ExpandContentContext: React.Context<ExpandContentContext>;
|
|
|
8
8
|
*
|
|
9
9
|
* An expand content provider allows `<Row>` to determine if it is a subitem.
|
|
10
10
|
*/
|
|
11
|
-
export declare const ExpandContentContextProvider: ({ children
|
|
11
|
+
export declare const ExpandContentContextProvider: ({ children }: {
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}) => JSX.Element;
|
|
14
14
|
declare const useExpandContent: () => ExpandContentContext;
|