@atlaskit/table 0.11.1 → 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 CHANGED
@@ -1,5 +1,19 @@
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
+
11
+ ## 0.11.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 0.11.1
4
18
 
5
19
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.TBody = void 0;
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
+ };
@@ -27,5 +27,4 @@ export const TBody = ({
27
27
  children
28
28
  }) => jsx("tbody", {
29
29
  css: bodyStyles
30
- }, children);
31
- export default TBody;
30
+ }, children);
@@ -28,5 +28,4 @@ export var TBody = function TBody(_ref) {
28
28
  return jsx("tbody", {
29
29
  css: bodyStyles
30
30
  }, children);
31
- };
32
- export default TBody;
31
+ };
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type ReactElement } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
- export type BodyProps<Item extends object> = {
7
+ type BodyProps<Item extends object> = {
8
8
  rows: Item[];
9
9
  children: (row: Item) => ReactElement;
10
10
  } | {
@@ -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
- export type TableContext<T, K extends keyof T = keyof T> = {
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
- export type RowProps = {
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.
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type FC, type ReactNode } from 'react';
6
- export interface CellProps {
6
+ interface CellProps {
7
7
  /**
8
8
  * Unique key used for sorting table data by this column
9
9
  */
@@ -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
- export type TableProps<ItemType extends object = {}> = {
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.
@@ -10,4 +10,3 @@ import { type FC, type ReactNode } from 'react';
10
10
  export declare const TBody: FC<{
11
11
  children: ReactNode;
12
12
  }>;
13
- export default TBody;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type ReactElement } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
- export type BodyProps<Item extends object> = {
7
+ type BodyProps<Item extends object> = {
8
8
  rows: Item[];
9
9
  children: (row: Item) => ReactElement;
10
10
  } | {
@@ -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
- export type TableContext<T, K extends keyof T = keyof T> = {
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
- export type RowProps = {
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.
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type FC, type ReactNode } from 'react';
6
- export interface CellProps {
6
+ interface CellProps {
7
7
  /**
8
8
  * Unique key used for sorting table data by this column
9
9
  */
@@ -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
- export type TableProps<ItemType extends object = {}> = {
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.
@@ -10,4 +10,3 @@ import { type FC, type ReactNode } from 'react';
10
10
  export declare const TBody: FC<{
11
11
  children: ReactNode;
12
12
  }>;
13
- export default TBody;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table",
3
- "version": "0.11.1",
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,9 +48,9 @@
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.2.0",
51
+ "@atlaskit/tokens": "^4.4.0",
52
52
  "@atlaskit/tooltip": "^20.0.0",
53
- "@atlaskit/visually-hidden": "^2.0.0",
53
+ "@atlaskit/visually-hidden": "^3.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
56
56
  "tiny-invariant": "^1.2.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/ssr": "*",
65
- "@atlaskit/visual-regression": "*",
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": {