@atlaskit/dynamic-table 18.0.0 → 18.0.2

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 (71) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/components/stateless.js +2 -2
  3. package/dist/cjs/styled/constants.js +2 -35
  4. package/dist/cjs/styled/dynamic-table.compiled.css +11 -0
  5. package/dist/cjs/styled/dynamic-table.js +42 -52
  6. package/dist/cjs/styled/empty-body.compiled.css +11 -0
  7. package/dist/cjs/styled/empty-body.js +17 -25
  8. package/dist/cjs/styled/loading-container-advanced.compiled.css +9 -0
  9. package/dist/cjs/styled/loading-container-advanced.js +23 -38
  10. package/dist/cjs/styled/loading-container.compiled.css +8 -0
  11. package/dist/cjs/styled/loading-container.js +27 -33
  12. package/dist/cjs/styled/rankable/table-cell.compiled.css +1 -0
  13. package/dist/cjs/styled/rankable/table-cell.js +12 -15
  14. package/dist/cjs/styled/rankable/table-row.compiled.css +7 -0
  15. package/dist/cjs/styled/rankable/table-row.js +21 -26
  16. package/dist/cjs/styled/table-cell.compiled.css +13 -0
  17. package/dist/cjs/styled/table-cell.js +16 -17
  18. package/dist/cjs/styled/table-head.compiled.css +58 -0
  19. package/dist/cjs/styled/table-head.js +38 -153
  20. package/dist/cjs/styled/table-row.compiled.css +6 -0
  21. package/dist/cjs/styled/table-row.js +20 -36
  22. package/dist/cjs/theme.js +1 -21
  23. package/dist/es2019/components/stateless.js +2 -2
  24. package/dist/es2019/styled/constants.js +1 -33
  25. package/dist/es2019/styled/dynamic-table.compiled.css +11 -0
  26. package/dist/es2019/styled/dynamic-table.js +28 -52
  27. package/dist/es2019/styled/empty-body.compiled.css +11 -0
  28. package/dist/es2019/styled/empty-body.js +12 -22
  29. package/dist/es2019/styled/loading-container-advanced.compiled.css +9 -0
  30. package/dist/es2019/styled/loading-container-advanced.js +20 -37
  31. package/dist/es2019/styled/loading-container.compiled.css +8 -0
  32. package/dist/es2019/styled/loading-container.js +16 -29
  33. package/dist/es2019/styled/rankable/table-cell.compiled.css +1 -0
  34. package/dist/es2019/styled/rankable/table-cell.js +9 -14
  35. package/dist/es2019/styled/rankable/table-row.compiled.css +7 -0
  36. package/dist/es2019/styled/rankable/table-row.js +12 -23
  37. package/dist/es2019/styled/table-cell.compiled.css +13 -0
  38. package/dist/es2019/styled/table-cell.js +13 -19
  39. package/dist/es2019/styled/table-head.compiled.css +58 -0
  40. package/dist/es2019/styled/table-head.js +29 -153
  41. package/dist/es2019/styled/table-row.compiled.css +6 -0
  42. package/dist/es2019/styled/table-row.js +11 -38
  43. package/dist/es2019/theme.js +0 -17
  44. package/dist/esm/components/stateless.js +2 -2
  45. package/dist/esm/styled/constants.js +1 -33
  46. package/dist/esm/styled/dynamic-table.compiled.css +11 -0
  47. package/dist/esm/styled/dynamic-table.js +39 -50
  48. package/dist/esm/styled/empty-body.compiled.css +11 -0
  49. package/dist/esm/styled/empty-body.js +12 -22
  50. package/dist/esm/styled/loading-container-advanced.compiled.css +9 -0
  51. package/dist/esm/styled/loading-container-advanced.js +20 -37
  52. package/dist/esm/styled/loading-container.compiled.css +8 -0
  53. package/dist/esm/styled/loading-container.js +25 -33
  54. package/dist/esm/styled/rankable/table-cell.compiled.css +1 -0
  55. package/dist/esm/styled/rankable/table-cell.js +9 -14
  56. package/dist/esm/styled/rankable/table-row.compiled.css +7 -0
  57. package/dist/esm/styled/rankable/table-row.js +17 -23
  58. package/dist/esm/styled/table-cell.compiled.css +13 -0
  59. package/dist/esm/styled/table-cell.js +13 -19
  60. package/dist/esm/styled/table-head.compiled.css +58 -0
  61. package/dist/esm/styled/table-head.js +38 -154
  62. package/dist/esm/styled/table-row.compiled.css +6 -0
  63. package/dist/esm/styled/table-row.js +16 -36
  64. package/dist/esm/theme.js +0 -17
  65. package/dist/types/styled/constants.d.ts +0 -4
  66. package/dist/types/styled/dynamic-table.d.ts +0 -6
  67. package/dist/types/theme.d.ts +0 -16
  68. package/dist/types-ts4.5/styled/constants.d.ts +0 -4
  69. package/dist/types-ts4.5/styled/dynamic-table.d.ts +0 -6
  70. package/dist/types-ts4.5/theme.d.ts +0 -16
  71. package/package.json +18 -17
@@ -0,0 +1,6 @@
1
+
2
+ ._bfhkqtfy{background-color:var(--ds-background-neutral-subtle,transparent)}
3
+ ._bfhktkjs{background-color:var(--ds-background-selected,var(--local-dynamic-table-highlighted-bg))}
4
+ ._1ygb1852:focus-visible{outline:var(--_akp1ox)}._1ah312gs:focus-visible{outline-offset:-2px}
5
+ ._irr31ae3:hover{background-color:var(--ds-background-selected-hovered,var(--local-dynamic-table-hover-highlighted-bg))}
6
+ ._irr3s8ts:hover{background-color:var(--ds-background-neutral-subtle-hovered,var(--local-dynamic-table-hover-bg))}
@@ -1,37 +1,17 @@
1
+ /* table-row.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
5
  var _excluded = ["isHighlighted", "children", "style", "testId"];
4
- /**
5
- * @jsxRuntime classic
6
- * @jsx jsx
7
- */
6
+ import "./table-row.compiled.css";
7
+ import * as React from 'react';
8
+ import { ax, ix } from "@compiled/react/runtime";
9
+ 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; }
10
+ 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; }
8
11
  import { forwardRef } from 'react';
9
-
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
- import { css, jsx } from '@emotion/react';
12
- import { tableRowCSSVars as cssVars } from './dynamic-table';
13
- var rowStyles = css({
14
- backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
15
- '&:focus-visible': {
16
- outline: "2px solid ".concat("var(--ds-border-focused, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
17
- "var(".concat(cssVars.CSS_VAR_HOVER_BACKGROUND, ")"), ")")),
18
- outlineOffset: "-2px"
19
- }
20
- });
21
- var rowBackgroundStyles = css({
22
- '&:hover': {
23
- backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
24
- "var(".concat(cssVars.CSS_VAR_HOVER_BACKGROUND, ")"), ")")
25
- }
26
- });
27
- var rowHighlightedBackgroundStyles = css({
28
- backgroundColor: "var(--ds-background-selected, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
29
- "var(".concat(cssVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, ")"), ")"),
30
- '&:hover': {
31
- backgroundColor: "var(--ds-background-selected-hovered, ".concat( // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
32
- "var(".concat(cssVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, ")"), ")")
33
- }
34
- });
12
+ var rowStyles = null;
13
+ var rowBackgroundStyles = null;
14
+ var rowHighlightedBackgroundStyles = null;
35
15
 
36
16
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
37
17
  export var TableBodyRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -40,12 +20,12 @@ export var TableBodyRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
40
20
  style = _ref.style,
41
21
  testId = _ref.testId,
42
22
  rest = _objectWithoutProperties(_ref, _excluded);
43
- return jsx("tr", _extends({
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
45
- style: style,
46
- css: [rowStyles, isHighlighted ? rowHighlightedBackgroundStyles : rowBackgroundStyles]
47
- }, rest, {
23
+ return /*#__PURE__*/React.createElement("tr", _extends({}, rest, {
48
24
  ref: ref,
49
- "data-testid": testId
25
+ "data-testid": testId,
26
+ className: ax(["_bfhkqtfy _1ygb1852 _1ah312gs", isHighlighted ? "_bfhktkjs _irr31ae3" : "_irr3s8ts"]),
27
+ style: _objectSpread(_objectSpread({}, style), {}, {
28
+ "--_akp1ox": ix("2px solid ".concat("var(--ds-border-focused, var(--local-dynamic-table-hover-bg))"))
29
+ })
50
30
  }), children);
51
31
  });
package/dist/esm/theme.js CHANGED
@@ -1,23 +1,6 @@
1
- import * as colors from '@atlaskit/theme/colors';
2
1
  export var MSThemeColors = {
3
2
  Background: 'Canvas',
4
3
  Text: 'CanvasText',
5
4
  SelectedBackground: 'Highlight',
6
5
  SelectedText: 'HighlightText'
7
- };
8
- export var arrow = {
9
- defaultColor: "var(--ds-icon-disabled, ".concat(colors.N40, ")"),
10
- selectedColor: "var(--ds-icon-subtle, ".concat(colors.N300, ")")
11
- };
12
- export var row = {
13
- focusOutline: "var(--ds-border-focused, ".concat(colors.B100, ")"),
14
- highlightedBackground: "var(--ds-background-selected, ".concat(colors.B50, ")"),
15
- hoverBackground: "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N10, ")"),
16
- hoverHighlightedBackground: "var(--ds-background-selected-hovered, ".concat(colors.B75, ")")
17
- };
18
- export var head = {
19
- textColor: "var(--ds-text-subtlest, ".concat(colors.N300, ")")
20
- };
21
- export var tableBorder = {
22
- borderColor: "var(--ds-border, ".concat(colors.N40, ")")
23
6
  };
@@ -8,10 +8,6 @@ export interface TruncateStyleProps {
8
8
  innerRef?: Ref<HTMLTableCellElement | HTMLTableRowElement> | undefined;
9
9
  className?: string;
10
10
  }
11
- export declare const truncationWidthStyles: import("@emotion/react").SerializedStyles;
12
- export declare const fixedSizeTruncateStyles: import("@emotion/react").SerializedStyles;
13
- export declare const overflowTruncateStyles: import("@emotion/react").SerializedStyles;
14
11
  export declare const getTruncationStyleVars: ({ width }: TruncateStyleProps) => {
15
12
  "--local-dynamic-table-width": string;
16
13
  } | undefined;
17
- export declare const cellStyles: import("@emotion/react").SerializedStyles;
@@ -9,12 +9,6 @@ type TableProps = HTMLProps<HTMLTableElement> & {
9
9
  hasDataRow: boolean;
10
10
  testId?: string;
11
11
  };
12
- export declare const tableRowCSSVars: {
13
- CSS_VAR_HOVER_BACKGROUND: string;
14
- CSS_VAR_HIGHLIGHTED_BACKGROUND: string;
15
- CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: string;
16
- CSS_VAR_ROW_FOCUS_OUTLINE: string;
17
- };
18
12
  export declare const Table: import("react").ForwardRefExoticComponent<Omit<TableProps, "ref"> & import("react").RefAttributes<HTMLTableElement>>;
19
13
  export declare const Caption: FC<{
20
14
  children: ReactNode;
@@ -4,19 +4,3 @@ export declare const MSThemeColors: {
4
4
  SelectedBackground: string;
5
5
  SelectedText: string;
6
6
  };
7
- export declare const arrow: {
8
- defaultColor: "var(--ds-icon-disabled)";
9
- selectedColor: "var(--ds-icon-subtle)";
10
- };
11
- export declare const row: {
12
- focusOutline: "var(--ds-border-focused)";
13
- highlightedBackground: "var(--ds-background-selected)";
14
- hoverBackground: "var(--ds-background-neutral-subtle-hovered)";
15
- hoverHighlightedBackground: "var(--ds-background-selected-hovered)";
16
- };
17
- export declare const head: {
18
- textColor: "var(--ds-text-subtlest)";
19
- };
20
- export declare const tableBorder: {
21
- borderColor: "var(--ds-border)";
22
- };
@@ -8,10 +8,6 @@ export interface TruncateStyleProps {
8
8
  innerRef?: Ref<HTMLTableCellElement | HTMLTableRowElement> | undefined;
9
9
  className?: string;
10
10
  }
11
- export declare const truncationWidthStyles: import("@emotion/react").SerializedStyles;
12
- export declare const fixedSizeTruncateStyles: import("@emotion/react").SerializedStyles;
13
- export declare const overflowTruncateStyles: import("@emotion/react").SerializedStyles;
14
11
  export declare const getTruncationStyleVars: ({ width }: TruncateStyleProps) => {
15
12
  "--local-dynamic-table-width": string;
16
13
  } | undefined;
17
- export declare const cellStyles: import("@emotion/react").SerializedStyles;
@@ -9,12 +9,6 @@ type TableProps = HTMLProps<HTMLTableElement> & {
9
9
  hasDataRow: boolean;
10
10
  testId?: string;
11
11
  };
12
- export declare const tableRowCSSVars: {
13
- CSS_VAR_HOVER_BACKGROUND: string;
14
- CSS_VAR_HIGHLIGHTED_BACKGROUND: string;
15
- CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: string;
16
- CSS_VAR_ROW_FOCUS_OUTLINE: string;
17
- };
18
12
  export declare const Table: import("react").ForwardRefExoticComponent<Omit<TableProps, "ref"> & import("react").RefAttributes<HTMLTableElement>>;
19
13
  export declare const Caption: FC<{
20
14
  children: ReactNode;
@@ -4,19 +4,3 @@ export declare const MSThemeColors: {
4
4
  SelectedBackground: string;
5
5
  SelectedText: string;
6
6
  };
7
- export declare const arrow: {
8
- defaultColor: "var(--ds-icon-disabled)";
9
- selectedColor: "var(--ds-icon-subtle)";
10
- };
11
- export declare const row: {
12
- focusOutline: "var(--ds-border-focused)";
13
- highlightedBackground: "var(--ds-background-selected)";
14
- hoverBackground: "var(--ds-background-neutral-subtle-hovered)";
15
- hoverHighlightedBackground: "var(--ds-background-selected-hovered)";
16
- };
17
- export declare const head: {
18
- textColor: "var(--ds-text-subtlest)";
19
- };
20
- export declare const tableBorder: {
21
- borderColor: "var(--ds-border)";
22
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "18.0.0",
3
+ "version": "18.0.2",
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/"
@@ -42,16 +42,17 @@
42
42
  "@atlaskit/analytics-next": "^11.0.0",
43
43
  "@atlaskit/css": "^0.10.0",
44
44
  "@atlaskit/ds-lib": "^4.0.0",
45
- "@atlaskit/icon": "^24.0.0",
45
+ "@atlaskit/icon": "^25.0.0",
46
46
  "@atlaskit/pagination": "^16.0.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^2.0.0",
49
- "@atlaskit/primitives": "^14.0.0",
49
+ "@atlaskit/primitives": "^14.1.0",
50
50
  "@atlaskit/spinner": "^18.0.0",
51
- "@atlaskit/theme": "^17.0.0",
52
- "@atlaskit/tokens": "^4.0.0",
51
+ "@atlaskit/theme": "^18.0.0",
52
+ "@atlaskit/tokens": "^4.4.0",
53
53
  "@atlaskit/tooltip": "^20.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
+ "@compiled/react": "^0.18.2",
55
56
  "@emotion/react": "^11.7.1"
56
57
  },
57
58
  "peerDependencies": {
@@ -59,23 +60,23 @@
59
60
  "react-dom": "^18.2.0"
60
61
  },
61
62
  "devDependencies": {
62
- "@af/accessibility-testing": "*",
63
- "@af/integration-testing": "*",
64
- "@af/visual-regression": "*",
65
- "@atlaskit/avatar": "^22.0.0",
66
- "@atlaskit/banner": "^13.0.0",
67
- "@atlaskit/button": "*",
68
- "@atlaskit/docs": "*",
63
+ "@af/accessibility-testing": "^2.0.0",
64
+ "@af/integration-testing": "^0.5.0",
65
+ "@af/visual-regression": "^1.3.0",
66
+ "@atlaskit/avatar": "^25.0.0",
67
+ "@atlaskit/banner": "^14.0.0",
68
+ "@atlaskit/button": "^21.1.0",
69
+ "@atlaskit/docs": "^10.0.0",
69
70
  "@atlaskit/drawer": "^10.0.0",
70
71
  "@atlaskit/dropdown-menu": "^13.0.0",
71
- "@atlaskit/link": "*",
72
+ "@atlaskit/link": "^3.0.0",
72
73
  "@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
73
- "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
74
- "@atlaskit/section-message": "*",
75
- "@atlaskit/ssr": "*",
74
+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
75
+ "@atlaskit/section-message": "^8.1.0",
76
+ "@atlaskit/ssr": "^0.4.0",
76
77
  "@atlaskit/toggle": "^15.0.0",
77
78
  "@atlassian/feature-flags-storybook-utils": "^0.3.0",
78
- "@atlassian/feature-flags-test-utils": "*",
79
+ "@atlassian/feature-flags-test-utils": "^0.3.0",
79
80
  "@emotion/styled": "^11.0.0",
80
81
  "@testing-library/react": "^13.4.0",
81
82
  "@testing-library/user-event": "^14.4.3",