@atlaskit/dynamic-table 14.4.1 → 14.5.0

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 (55) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/components/Body.js +1 -1
  4. package/dist/cjs/components/Stateless.js +1 -1
  5. package/dist/cjs/components/TableHead.js +5 -2
  6. package/dist/cjs/components/TableHeadCell.js +3 -1
  7. package/dist/cjs/components/TableRow.js +5 -2
  8. package/dist/cjs/components/rankable/TableCell.js +3 -1
  9. package/dist/cjs/components/rankable/TableHeadCell.js +3 -1
  10. package/dist/cjs/components/rankable/TableRow.js +5 -3
  11. package/dist/cjs/hoc/withSortedPageRows.js +5 -3
  12. package/dist/cjs/index.js +4 -4
  13. package/dist/cjs/internal/constants.js +1 -1
  14. package/dist/cjs/internal/helpers.js +1 -1
  15. package/dist/cjs/styled/DynamicTable.js +3 -3
  16. package/dist/cjs/styled/EmptyBody.js +1 -1
  17. package/dist/cjs/styled/TableCell.js +3 -2
  18. package/dist/cjs/styled/TableHead.js +13 -12
  19. package/dist/cjs/styled/TableRow.js +6 -8
  20. package/dist/cjs/styled/constants.js +2 -2
  21. package/dist/cjs/styled/rankable/TableCell.js +2 -2
  22. package/dist/cjs/styled/rankable/TableRow.js +5 -7
  23. package/dist/cjs/theme.js +19 -21
  24. package/dist/cjs/version.json +1 -1
  25. package/dist/es2019/components/Body.js +1 -1
  26. package/dist/es2019/components/Stateless.js +1 -1
  27. package/dist/es2019/styled/TableHead.js +5 -6
  28. package/dist/es2019/styled/TableRow.js +4 -5
  29. package/dist/es2019/styled/constants.js +1 -1
  30. package/dist/es2019/styled/rankable/TableRow.js +3 -4
  31. package/dist/es2019/theme.js +18 -19
  32. package/dist/es2019/version.json +1 -1
  33. package/dist/esm/components/Body.js +1 -1
  34. package/dist/esm/components/Stateless.js +1 -1
  35. package/dist/esm/components/TableHead.js +4 -2
  36. package/dist/esm/components/TableHeadCell.js +2 -1
  37. package/dist/esm/components/TableRow.js +4 -2
  38. package/dist/esm/components/rankable/TableCell.js +2 -1
  39. package/dist/esm/components/rankable/TableHeadCell.js +2 -1
  40. package/dist/esm/components/rankable/TableRow.js +4 -3
  41. package/dist/esm/hoc/withSortedPageRows.js +4 -3
  42. package/dist/esm/styled/DynamicTable.js +2 -1
  43. package/dist/esm/styled/TableCell.js +2 -1
  44. package/dist/esm/styled/TableHead.js +11 -10
  45. package/dist/esm/styled/TableRow.js +6 -6
  46. package/dist/esm/styled/constants.js +1 -1
  47. package/dist/esm/styled/rankable/TableCell.js +2 -1
  48. package/dist/esm/styled/rankable/TableRow.js +5 -5
  49. package/dist/esm/theme.js +18 -19
  50. package/dist/esm/version.json +1 -1
  51. package/dist/types/components/TableRow.d.ts +1 -0
  52. package/dist/types/styled/constants.d.ts +1 -1
  53. package/dist/types/theme.d.ts +9 -9
  54. package/dist/types/types.d.ts +28 -24
  55. package/package.json +10 -8
package/dist/esm/theme.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as colors from '@atlaskit/theme/colors';
2
2
  import { themed } from '@atlaskit/theme/components';
3
- import { token } from '@atlaskit/tokens';
4
3
  export var MSThemeColors = {
5
4
  Background: 'Canvas',
6
5
  Text: 'CanvasText',
@@ -9,43 +8,43 @@ export var MSThemeColors = {
9
8
  };
10
9
  export var arrow = {
11
10
  defaultColor: themed({
12
- light: token('color.background.subtleNeutral.resting', colors.N40),
13
- dark: token('color.background.subtleNeutral.resting', colors.DN40)
11
+ light: "var(--ds-background-neutral, ".concat(colors.N40, ")"),
12
+ dark: "var(--ds-background-neutral, ".concat(colors.DN40, ")")
14
13
  }),
15
14
  selectedColor: themed({
16
- light: token('color.text.lowEmphasis', colors.N300),
17
- dark: token('color.text.lowEmphasis', colors.DN300)
15
+ light: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
16
+ dark: "var(--ds-text-subtlest, ".concat(colors.DN300, ")")
18
17
  }),
19
18
  hoverColor: themed({
20
- light: token('color.background.subtleNeutral.pressed', colors.N60),
21
- dark: token('color.background.subtleNeutral.pressed', colors.DN60)
19
+ light: "var(--ds-background-neutral-pressed, ".concat(colors.N60, ")"),
20
+ dark: "var(--ds-background-neutral-pressed, ".concat(colors.DN60, ")")
22
21
  })
23
22
  };
24
23
  export var row = {
25
24
  focusOutline: themed({
26
- light: token('color.border.focus', colors.B100),
27
- dark: token('color.border.focus', colors.B100)
25
+ light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
26
+ dark: "var(--ds-border-focused, ".concat(colors.B100, ")")
28
27
  }),
29
28
  highlightedBackground: themed({
30
- light: token('color.background.selected.resting', colors.B50),
31
- dark: token('color.background.selected.resting', colors.DN50)
29
+ light: "var(--ds-background-brand, ".concat(colors.B50, ")"),
30
+ dark: "var(--ds-background-brand, ".concat(colors.DN50, ")")
32
31
  }),
33
32
  hoverBackground: themed({
34
- light: token('color.background.subtleBorderedNeutral.resting', colors.N10),
35
- dark: token('color.background.subtleBorderedNeutral.resting', colors.DN40)
33
+ light: "var(--ds-background-input, ".concat(colors.N10, ")"),
34
+ dark: "var(--ds-background-input, ".concat(colors.DN40, ")")
36
35
  }),
37
36
  hoverHighlightedBackground: themed({
38
- light: token('color.background.selected.hover', colors.B75),
39
- dark: token('color.background.selected.hover', colors.DN60)
37
+ light: "var(--ds-background-brand-hovered, ".concat(colors.B75, ")"),
38
+ dark: "var(--ds-background-brand-hovered, ".concat(colors.DN60, ")")
40
39
  })
41
40
  };
42
41
  export var head = {
43
42
  borderColor: themed({
44
- light: token('color.border.neutral', colors.N40),
45
- dark: token('color.border.neutral', colors.DN50)
43
+ light: "var(--ds-border, ".concat(colors.N40, ")"),
44
+ dark: "var(--ds-border, ".concat(colors.DN50, ")")
46
45
  }),
47
46
  textColor: themed({
48
- light: token('color.text.lowEmphasis', colors.N300),
49
- dark: token('color.text.lowEmphasis', colors.DN300)
47
+ light: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
48
+ dark: "var(--ds-text-subtlest, ".concat(colors.DN300, ")")
50
49
  })
51
50
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.4.1",
3
+ "version": "14.5.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { HeadType, RowType } from '../types';
2
3
  interface Props {
3
4
  head?: HeadType;
@@ -12,7 +12,7 @@ export declare const truncationWidthStyles: import("@emotion/core").SerializedSt
12
12
  export declare const fixedSizeTruncateStyles: import("@emotion/core").SerializedStyles;
13
13
  export declare const overflowTruncateStyles: import("@emotion/core").SerializedStyles;
14
14
  export declare const getTruncationStyleVars: ({ width }: TruncateStyleProps) => {
15
- "--local-dynamic-table-width": string;
15
+ "--local-dynamic-table-width": string | undefined;
16
16
  };
17
17
  export declare const cellStyles: import("@emotion/core").SerializedStyles;
18
18
  export {};
@@ -5,17 +5,17 @@ export declare const MSThemeColors: {
5
5
  SelectedText: string;
6
6
  };
7
7
  export declare const arrow: {
8
- defaultColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-subtleNeutral-resting)">;
9
- selectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-lowEmphasis)">;
10
- hoverColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-subtleNeutral-pressed)">;
8
+ defaultColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral)">;
9
+ selectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
10
+ hoverColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-pressed)">;
11
11
  };
12
12
  export declare const row: {
13
- focusOutline: import("@atlaskit/theme").ThemedValue<"var(--ds-border-focus)">;
14
- highlightedBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-selected-resting)">;
15
- hoverBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-subtleBorderedNeutral-resting)">;
16
- hoverHighlightedBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-selected-hover)">;
13
+ focusOutline: import("@atlaskit/theme").ThemedValue<"var(--ds-border-focused)">;
14
+ highlightedBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-brand)">;
15
+ hoverBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-input)">;
16
+ hoverHighlightedBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-brand-hovered)">;
17
17
  };
18
18
  export declare const head: {
19
- borderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-neutral)">;
20
- textColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-lowEmphasis)">;
19
+ borderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border)">;
20
+ textColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
21
21
  };
@@ -129,18 +129,18 @@ export interface StatelessProps extends WithAnalyticsEventsProps {
129
129
  */
130
130
  highlightedRowIndex?: number | number[];
131
131
  /**
132
- * A `testId` prop is provided for specified elements,
133
- * which is a unique string that appears as a data attribute
134
- * `data-testid` in the rendered code, serving as a hook for automated tests.
132
+ A `testId` prop is provided for specified elements,
133
+ which is a unique string that appears as a data attribute
134
+ `data-testid` in the rendered code, serving as a hook for automated tests.
135
135
 
136
- * The value of `testId` is used to prefix `testId` props in given elements.
137
- * + `${testId}--table` - Table.
138
- * + `${testId}--head` - Table header.
139
- * + `${testId}--head--{content of the cell}` - Table header cell can be identified by their content.
140
- * + `${testId}--row--{index - content of the first cell}` - Table row.
141
- * + `${testId}--body` - Table body.
142
- * + `${testId}--body--{content of the cell}` - Table body cell can be identified by their content.
143
- * + `${testId}--loadingSpinner` - The spinner overlaid when loading.
136
+ The value of `testId` is used to prefix `testId` props in given elements.
137
+ + `${testId}--table` - Table.
138
+ + `${testId}--head` - Table header.
139
+ + `${testId}--head--{content of the cell}` - Table header cell can be identified by their content.
140
+ + `${testId}--row--{index - content of the first cell}` - Table row.
141
+ + `${testId}--body` - Table body.
142
+ + `${testId}--body--{content of the cell}` - Table body cell can be identified by their content.
143
+ + `${testId}--loadingSpinner` - The spinner overlaid when loading.
144
144
  */
145
145
  testId?: string;
146
146
  /**
@@ -260,18 +260,18 @@ export interface StatefulProps extends WithAnalyticsEventsProps {
260
260
  */
261
261
  highlightedRowIndex?: number | number[];
262
262
  /**
263
- * A `testId` prop is provided for specified elements,
264
- * which is a unique string that appears as a data attribute
265
- * `data-testid` in the rendered code, serving as a hook for automated tests.
266
- *
267
- * The value of `testId` is used to prefix `testId` props in given elements.
268
- * + `${testId}--table` - Table.
269
- * + `${testId}--head` - Table header.
270
- * + `${testId}--head--{content of the cell}` - Table header cell can be identified by their content.
271
- * + `${testId}--row--{index - content of the first cell}` - Table row.
272
- * + `${testId}--body` - Table body.
273
- * + `${testId}--body--{content of the cell}` - Table body cell can be identified by their content.
274
- * + `${testId}--loadingSpinner` - The spinner overlaid when loading.
263
+ A `testId` prop is provided for specified elements,
264
+ which is a unique string that appears as a data attribute
265
+ `data-testid` in the rendered code, serving as a hook for automated tests.
266
+
267
+ The value of `testId` is used to prefix `testId` props in given elements.
268
+ + `${testId}--table` - Table.
269
+ + `${testId}--head` - Table header.
270
+ + `${testId}--head--{content of the cell}` - Table header cell can be identified by their content.
271
+ + `${testId}--row--{index - content of the first cell}` - Table row.
272
+ + `${testId}--body` - Table body.
273
+ + `${testId}--body--{content of the cell}` - Table body cell can be identified by their content.
274
+ + `${testId}--loadingSpinner` - The spinner overlaid when loading.
275
275
  */
276
276
  testId?: string;
277
277
  /**
@@ -292,6 +292,10 @@ export interface RowType extends React.ComponentPropsWithoutRef<'tr'> {
292
292
  * A key event handler to support interaction of a row.
293
293
  */
294
294
  onKeyPress?: React.KeyboardEventHandler;
295
+ /**
296
+ * Highlights the row. Should be used to draw attention to a row; not to indicate selection.
297
+ */
298
+ isHighlighted?: boolean;
295
299
  /**
296
300
  * Hook for automated testing.
297
301
  */
@@ -303,7 +307,7 @@ export interface RowType extends React.ComponentPropsWithoutRef<'tr'> {
303
307
  */
304
308
  export declare type SortOrderType = 'ASC' | 'DESC';
305
309
  /**
306
- * Determines the size of the Table loading spinner.
310
+ * Determines the size of the table loading spinner.
307
311
  * This matches the underlying `Size` type in `@atlaskit/spinner`
308
312
  */
309
313
  export declare type SpinnerSizeType = SizeType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.4.1",
3
+ "version": "14.5.0",
4
4
  "description": "A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -18,7 +18,6 @@
18
18
  "atlassian": {
19
19
  "team": "Design System Team",
20
20
  "deprecatedAutoEntryPoints": true,
21
- "inPublicMirror": true,
22
21
  "releaseModel": "scheduled",
23
22
  "website": {
24
23
  "name": "Dynamic table"
@@ -28,8 +27,8 @@
28
27
  "@atlaskit/analytics-next": "^8.0.0",
29
28
  "@atlaskit/pagination": "^14.0.0",
30
29
  "@atlaskit/spinner": "^15.0.0",
31
- "@atlaskit/theme": "^12.0.0",
32
- "@atlaskit/tokens": "^0.3.0",
30
+ "@atlaskit/theme": "^12.1.0",
31
+ "@atlaskit/tokens": "^0.6.0",
33
32
  "@babel/runtime": "^7.0.0",
34
33
  "@emotion/core": "^10.0.9",
35
34
  "react-beautiful-dnd": "^12.1.1"
@@ -40,12 +39,11 @@
40
39
  },
41
40
  "devDependencies": {
42
41
  "@atlaskit/avatar": "^20.5.0",
43
- "@atlaskit/build-utils": "*",
44
42
  "@atlaskit/button": "^16.0.0",
45
43
  "@atlaskit/docs": "*",
46
- "@atlaskit/dropdown-menu": "^10.1.0",
44
+ "@atlaskit/dropdown-menu": "^11.0.0",
47
45
  "@atlaskit/ssr": "*",
48
- "@atlaskit/toggle": "^12.3.0",
46
+ "@atlaskit/toggle": "^12.4.0",
49
47
  "@atlaskit/visual-regression": "*",
50
48
  "@atlaskit/webdriver-runner": "*",
51
49
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -62,7 +60,11 @@
62
60
  "import-structure": "atlassian-conventions"
63
61
  },
64
62
  "@repo/internal": {
65
- "theming": "tokens"
63
+ "theming": "tokens",
64
+ "deprecation": "no-deprecated-imports",
65
+ "styling": [
66
+ "emotion"
67
+ ]
66
68
  }
67
69
  },
68
70
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"