@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.
Files changed (83) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/LICENSE.md +6 -8
  3. package/README.md +40 -38
  4. package/dist/cjs/body.js +3 -1
  5. package/dist/cjs/expandable-cell.js +5 -0
  6. package/dist/cjs/head-cell.js +5 -0
  7. package/dist/cjs/row.js +5 -0
  8. package/dist/cjs/selectable-cell.js +5 -0
  9. package/dist/cjs/sortable-column.js +6 -2
  10. package/dist/cjs/table.js +5 -0
  11. package/dist/cjs/thead.js +5 -0
  12. package/dist/cjs/ui/base-cell.js +2 -0
  13. package/dist/cjs/ui/expand-icon.js +5 -0
  14. package/dist/cjs/ui/sort-icon.js +5 -0
  15. package/dist/cjs/ui/table.js +5 -0
  16. package/dist/cjs/ui/tbody.js +6 -0
  17. package/dist/cjs/ui/td.js +4 -0
  18. package/dist/cjs/ui/thead.js +7 -2
  19. package/dist/cjs/ui/tr.js +5 -0
  20. package/dist/es2019/body.js +5 -0
  21. package/dist/es2019/expandable-cell.js +5 -0
  22. package/dist/es2019/head-cell.js +4 -0
  23. package/dist/es2019/row.js +5 -0
  24. package/dist/es2019/selectable-cell.js +5 -0
  25. package/dist/es2019/sortable-column.js +7 -2
  26. package/dist/es2019/table.js +5 -0
  27. package/dist/es2019/thead.js +4 -0
  28. package/dist/es2019/ui/base-cell.js +2 -0
  29. package/dist/es2019/ui/expand-icon.js +5 -0
  30. package/dist/es2019/ui/sort-icon.js +5 -0
  31. package/dist/es2019/ui/table.js +4 -0
  32. package/dist/es2019/ui/tbody.js +5 -0
  33. package/dist/es2019/ui/td.js +4 -0
  34. package/dist/es2019/ui/thead.js +6 -2
  35. package/dist/es2019/ui/tr.js +4 -0
  36. package/dist/esm/body.js +5 -0
  37. package/dist/esm/expandable-cell.js +5 -0
  38. package/dist/esm/head-cell.js +4 -0
  39. package/dist/esm/row.js +5 -0
  40. package/dist/esm/selectable-cell.js +5 -0
  41. package/dist/esm/sortable-column.js +7 -2
  42. package/dist/esm/table.js +5 -0
  43. package/dist/esm/thead.js +4 -0
  44. package/dist/esm/ui/base-cell.js +2 -0
  45. package/dist/esm/ui/expand-icon.js +5 -0
  46. package/dist/esm/ui/sort-icon.js +5 -0
  47. package/dist/esm/ui/table.js +4 -0
  48. package/dist/esm/ui/tbody.js +5 -0
  49. package/dist/esm/ui/td.js +4 -0
  50. package/dist/esm/ui/thead.js +6 -2
  51. package/dist/esm/ui/tr.js +4 -0
  52. package/dist/types/body.d.ts +4 -1
  53. package/dist/types/expandable-row.d.ts +1 -1
  54. package/dist/types/head-cell.d.ts +3 -0
  55. package/dist/types/hooks/use-expand-content.d.ts +1 -1
  56. package/dist/types/row.d.ts +3 -0
  57. package/dist/types/sortable-column.d.ts +3 -0
  58. package/dist/types/table.d.ts +3 -0
  59. package/dist/types/thead.d.ts +3 -0
  60. package/dist/types/ui/sort-icon.d.ts +3 -0
  61. package/dist/types/ui/table.d.ts +3 -0
  62. package/dist/types/ui/tbody.d.ts +3 -0
  63. package/dist/types/ui/td.d.ts +3 -0
  64. package/dist/types/ui/thead.d.ts +3 -0
  65. package/dist/types/ui/tr.d.ts +3 -0
  66. package/dist/types-ts4.5/body.d.ts +4 -1
  67. package/dist/types-ts4.5/expandable-row.d.ts +1 -1
  68. package/dist/types-ts4.5/head-cell.d.ts +3 -0
  69. package/dist/types-ts4.5/hooks/use-expand-content.d.ts +1 -1
  70. package/dist/types-ts4.5/row.d.ts +3 -0
  71. package/dist/types-ts4.5/sortable-column.d.ts +3 -0
  72. package/dist/types-ts4.5/table.d.ts +3 -0
  73. package/dist/types-ts4.5/thead.d.ts +3 -0
  74. package/dist/types-ts4.5/ui/sort-icon.d.ts +3 -0
  75. package/dist/types-ts4.5/ui/table.d.ts +3 -0
  76. package/dist/types-ts4.5/ui/tbody.d.ts +3 -0
  77. package/dist/types-ts4.5/ui/td.d.ts +3 -0
  78. package/dist/types-ts4.5/ui/thead.d.ts +3 -0
  79. package/dist/types-ts4.5/ui/tr.d.ts +3 -0
  80. package/extract-react-types/row.tsx +2 -2
  81. package/extract-react-types/table.tsx +2 -2
  82. package/package.json +102 -102
  83. package/report.api.md +53 -57
package/package.json CHANGED
@@ -1,103 +1,103 @@
1
1
  {
2
- "name": "@atlaskit/table",
3
- "version": "0.5.2",
4
- "description": "A table is used to display data.",
5
- "author": "Atlassian Pty Ltd",
6
- "license": "Apache-2.0",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/"
9
- },
10
- "homepage": "https://atlassian.design/components/table",
11
- "atlassian": {
12
- "team": "Design System Team",
13
- "inPublicMirror": false,
14
- "releaseModel": "continuous",
15
- "website": {
16
- "name": "Table",
17
- "category": "Components",
18
- "status": {
19
- "type": "alpha"
20
- }
21
- },
22
- "runReact18": true
23
- },
24
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
25
- "main": "dist/cjs/index.js",
26
- "module": "dist/esm/index.js",
27
- "module:es2019": "dist/es2019/index.js",
28
- "types": "dist/types/index.d.ts",
29
- "typesVersions": {
30
- ">=4.5 <4.9": {
31
- "*": [
32
- "dist/types-ts4.5/*",
33
- "dist/types-ts4.5/index.d.ts"
34
- ]
35
- }
36
- },
37
- "sideEffects": false,
38
- "atlaskit:src": "src/index.tsx",
39
- "af:exports": {
40
- ".": "./src/index.tsx",
41
- "./primitives": "./src/ui/index.tsx"
42
- },
43
- "dependencies": {
44
- "@atlaskit/button": "^17.17.0",
45
- "@atlaskit/checkbox": "^13.4.0",
46
- "@atlaskit/ds-lib": "^2.3.0",
47
- "@atlaskit/focus-ring": "^1.4.0",
48
- "@atlaskit/icon": "^22.3.0",
49
- "@atlaskit/primitives": "^7.0.0",
50
- "@atlaskit/tokens": "^1.49.0",
51
- "@atlaskit/tooltip": "^18.4.0",
52
- "@atlaskit/visually-hidden": "^1.3.0",
53
- "@babel/runtime": "^7.0.0",
54
- "@emotion/react": "^11.7.1",
55
- "tiny-invariant": "^1.2.0"
56
- },
57
- "peerDependencies": {
58
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
59
- },
60
- "devDependencies": {
61
- "@af/accessibility-testing": "*",
62
- "@atlaskit/ssr": "*",
63
- "@atlaskit/visual-regression": "*",
64
- "@testing-library/react": "^12.1.5",
65
- "@testing-library/react-hooks": "^8.0.1",
66
- "react-dom": "^16.8.0",
67
- "storybook-addon-designs": "^6.3.1",
68
- "typescript": "~5.4.2",
69
- "wait-for-expect": "^1.2.0"
70
- },
71
- "techstack": {
72
- "@atlassian/frontend": {
73
- "import-structure": [
74
- "atlassian-conventions"
75
- ],
76
- "circular-dependencies": [
77
- "file-and-folder-level"
78
- ]
79
- },
80
- "@repo/internal": {
81
- "dom-events": "use-bind-event-listener",
82
- "analytics": [
83
- "analytics-next"
84
- ],
85
- "design-tokens": [
86
- "color",
87
- "spacing"
88
- ],
89
- "theming": [
90
- "react-context"
91
- ],
92
- "ui-components": [
93
- "lite-mode"
94
- ],
95
- "design-system": "v1",
96
- "deprecation": "no-deprecated-imports",
97
- "styling": [
98
- "emotion",
99
- "emotion"
100
- ]
101
- }
102
- }
103
- }
2
+ "name": "@atlaskit/table",
3
+ "version": "0.6.1",
4
+ "description": "A table is used to display data.",
5
+ "author": "Atlassian Pty Ltd",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "homepage": "https://atlassian.design/components/table",
11
+ "atlassian": {
12
+ "team": "Design System Team",
13
+ "inPublicMirror": false,
14
+ "releaseModel": "continuous",
15
+ "website": {
16
+ "name": "Table",
17
+ "category": "Components",
18
+ "status": {
19
+ "type": "alpha"
20
+ }
21
+ },
22
+ "runReact18": true
23
+ },
24
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
25
+ "main": "dist/cjs/index.js",
26
+ "module": "dist/esm/index.js",
27
+ "module:es2019": "dist/es2019/index.js",
28
+ "types": "dist/types/index.d.ts",
29
+ "typesVersions": {
30
+ ">=4.5 <4.9": {
31
+ "*": [
32
+ "dist/types-ts4.5/*",
33
+ "dist/types-ts4.5/index.d.ts"
34
+ ]
35
+ }
36
+ },
37
+ "sideEffects": false,
38
+ "atlaskit:src": "src/index.tsx",
39
+ "af:exports": {
40
+ ".": "./src/index.tsx",
41
+ "./primitives": "./src/ui/index.tsx"
42
+ },
43
+ "dependencies": {
44
+ "@atlaskit/button": "^17.22.0",
45
+ "@atlaskit/checkbox": "^13.5.0",
46
+ "@atlaskit/ds-lib": "^2.3.0",
47
+ "@atlaskit/focus-ring": "^1.5.0",
48
+ "@atlaskit/icon": "^22.4.0",
49
+ "@atlaskit/primitives": "^8.0.0",
50
+ "@atlaskit/tokens": "^1.51.0",
51
+ "@atlaskit/tooltip": "^18.5.0",
52
+ "@atlaskit/visually-hidden": "^1.4.0",
53
+ "@babel/runtime": "^7.0.0",
54
+ "@emotion/react": "^11.7.1",
55
+ "tiny-invariant": "^1.2.0"
56
+ },
57
+ "peerDependencies": {
58
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
59
+ },
60
+ "devDependencies": {
61
+ "@af/accessibility-testing": "*",
62
+ "@atlaskit/ssr": "*",
63
+ "@atlaskit/visual-regression": "*",
64
+ "@testing-library/react": "^12.1.5",
65
+ "@testing-library/react-hooks": "^8.0.1",
66
+ "react-dom": "^16.8.0",
67
+ "storybook-addon-designs": "^6.3.1",
68
+ "typescript": "~5.4.2",
69
+ "wait-for-expect": "^1.2.0"
70
+ },
71
+ "techstack": {
72
+ "@atlassian/frontend": {
73
+ "import-structure": [
74
+ "atlassian-conventions"
75
+ ],
76
+ "circular-dependencies": [
77
+ "file-and-folder-level"
78
+ ]
79
+ },
80
+ "@repo/internal": {
81
+ "dom-events": "use-bind-event-listener",
82
+ "analytics": [
83
+ "analytics-next"
84
+ ],
85
+ "design-tokens": [
86
+ "color",
87
+ "spacing"
88
+ ],
89
+ "theming": [
90
+ "react-context"
91
+ ],
92
+ "ui-components": [
93
+ "lite-mode"
94
+ ],
95
+ "design-system": "v1",
96
+ "deprecation": "no-deprecated-imports",
97
+ "styling": [
98
+ "emotion",
99
+ "emotion"
100
+ ]
101
+ }
102
+ }
103
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/table"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -27,40 +28,37 @@ import { ReactNode } from 'react';
27
28
 
28
29
  // @public (undocumented)
29
30
  type BaseCellProps = {
30
- width?: string;
31
- align?: 'icon' | 'number' | 'text';
32
- as?: 'td' | 'th';
33
- scope?: 'col' | 'row';
34
- testId?: string;
35
- children?: ReactNode;
36
- colSpan?: number;
37
- } & Pick<
38
- BoxProps<any>,
39
- 'backgroundColor' | 'paddingBlock' | 'paddingInline' | 'xcss'
40
- >;
31
+ width?: string;
32
+ align?: 'icon' | 'number' | 'text';
33
+ as?: 'td' | 'th';
34
+ scope?: 'col' | 'row';
35
+ testId?: string;
36
+ children?: ReactNode;
37
+ colSpan?: number;
38
+ } & Pick<BoxProps<any>, 'backgroundColor' | 'paddingBlock' | 'paddingInline' | 'xcss'>;
41
39
 
42
40
  // @public (undocumented)
43
41
  type BodyProps<Item extends object> =
44
- | {
45
- rows: Item[];
46
- children: (row: Item) => ReactElement;
47
- }
48
- | {
49
- rows?: never;
50
- children: ReactElement | ReactElement[];
51
- };
42
+ | {
43
+ rows: Item[];
44
+ children: (row: Item) => ReactElement;
45
+ }
46
+ | {
47
+ rows?: never;
48
+ children: ReactElement | ReactElement[];
49
+ };
52
50
 
53
51
  // @public
54
52
  export const Cell: FC<Omit<BaseCellProps, 'as'>>;
55
53
 
56
54
  // @public (undocumented)
57
55
  interface CellProps {
58
- // (undocumented)
59
- children?: ReactNode;
60
- name: string;
61
- // (undocumented)
62
- onClick?: React.MouseEventHandler;
63
- testId?: string;
56
+ // (undocumented)
57
+ children?: ReactNode;
58
+ name: string;
59
+ // (undocumented)
60
+ onClick?: React.MouseEventHandler;
61
+ testId?: string;
64
62
  }
65
63
 
66
64
  // @public
@@ -68,26 +66,24 @@ export const ExpandableCell: MemoExoticComponent<() => jsx.JSX.Element>;
68
66
 
69
67
  // @public
70
68
  export const ExpandableRow: ({
71
- children,
72
- isExpanded,
73
- isDefaultExpanded,
69
+ children,
70
+ isExpanded,
71
+ isDefaultExpanded,
74
72
  }: ExpandableRowProps) => JSX.Element;
75
73
 
76
74
  // @public
77
- export const ExpandableRowContent: ({
78
- children,
79
- }: ExpandableRowContentProps) => JSX.Element;
75
+ export const ExpandableRowContent: ({ children }: ExpandableRowContentProps) => JSX.Element;
80
76
 
81
77
  // @public (undocumented)
82
78
  type ExpandableRowContentProps = {
83
- children?: React_2.ReactNode;
79
+ children?: React_2.ReactNode;
84
80
  };
85
81
 
86
82
  // @public (undocumented)
87
83
  type ExpandableRowProps = {
88
- children: React_2.ReactNode;
89
- isExpanded?: boolean;
90
- isDefaultExpanded?: boolean;
84
+ children: React_2.ReactNode;
85
+ isExpanded?: boolean;
86
+ isDefaultExpanded?: boolean;
91
87
  };
92
88
 
93
89
  // @public
@@ -98,8 +94,8 @@ export const Row: FC<RowProps>;
98
94
 
99
95
  // @public (undocumented)
100
96
  type RowProps = {
101
- testId?: string;
102
- children?: ReactNode;
97
+ testId?: string;
98
+ children?: ReactNode;
103
99
  };
104
100
 
105
101
  // @public
@@ -110,32 +106,32 @@ type SortKey<Key extends number | string | symbol> = 'unset' | Key;
110
106
 
111
107
  // @public
112
108
  function Table<ItemType extends object = object>({
113
- children,
114
- isSelectable,
115
- sortKey,
116
- testId,
109
+ children,
110
+ isSelectable,
111
+ sortKey,
112
+ testId,
117
113
  }: TableProps<ItemType>): jsx.JSX.Element;
118
114
  export default Table;
119
115
 
120
116
  // @public (undocumented)
121
117
  type TableProps<ItemType extends object = {}> = {
122
- testId?: string;
123
- sortKey?: SortKey<keyof ItemType>;
124
- children: ReactElement | ReactElement[];
118
+ testId?: string;
119
+ sortKey?: SortKey<keyof ItemType>;
120
+ children: ReactElement | ReactElement[];
125
121
  } & (
126
- | {
127
- isSelectable: true;
128
- defaultSelected?: number;
129
- }
130
- | {
131
- isSelectable?: false;
132
- }
122
+ | {
123
+ isSelectable: true;
124
+ defaultSelected?: number;
125
+ }
126
+ | {
127
+ isSelectable?: false;
128
+ }
133
129
  );
134
130
 
135
131
  // @public
136
132
  export function TBody<ObjectType extends object>({
137
- rows,
138
- children,
133
+ rows,
134
+ children,
139
135
  }: BodyProps<ObjectType>): jsx.JSX.Element;
140
136
 
141
137
  // @public (undocumented)
@@ -143,8 +139,8 @@ export const THead: FC<THeadProps>;
143
139
 
144
140
  // @public (undocumented)
145
141
  type THeadProps = {
146
- actions?: (selected: number[]) => ReactNode;
147
- children?: ReactNode;
142
+ actions?: (selected: number[]) => ReactNode;
143
+ children?: ReactNode;
148
144
  };
149
145
 
150
146
  // @public (undocumented)
@@ -161,7 +157,7 @@ type THProps = Omit<BaseCellProps, 'as'>;
161
157
 
162
158
  ```json
163
159
  {
164
- "react": "^16.8.0"
160
+ "react": "^16.8.0"
165
161
  }
166
162
  ```
167
163