@atlaskit/media-table 18.1.11 → 18.1.13

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/media-table
2
2
 
3
+ ## 18.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [`715629fc18fc8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/715629fc18fc8) -
8
+ Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
9
+ - Updated dependencies
10
+
11
+ ## 18.1.12
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 18.1.11
4
18
 
5
19
  ### Patch Changes
@@ -8,7 +8,6 @@ exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _reactIntlNext = require("react-intl-next");
11
- var _colors = require("@atlaskit/theme/colors");
12
11
  var _download = _interopRequireDefault(require("@atlaskit/icon/core/download"));
13
12
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
14
13
  var _mediaUi = require("@atlaskit/media-ui");
@@ -43,7 +42,7 @@ var MediaDownloadButton = function MediaDownloadButton(props) {
43
42
  buttonStyles: _objectSpread(_objectSpread({}, current(themeProps).buttonStyles), {}, {
44
43
  minWidth: 'max-content',
45
44
  '&:hover': {
46
- background: "var(--ds-background-neutral-hovered, ".concat(_colors.N40, ")")
45
+ background: "var(--ds-background-neutral-hovered, #0B120E24)"
47
46
  }
48
47
  }),
49
48
  spinnerStyles: current(themeProps).spinnerStyles
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  // eslint-disable-next-line import/no-extraneous-dependencies
3
3
  import { injectIntl } from 'react-intl-next';
4
- import { N40 } from '@atlaskit/theme/colors';
5
4
  import DownloadIcon from '@atlaskit/icon/core/download';
6
5
  import Button from '@atlaskit/button/custom-theme-button';
7
6
  import { messages } from '@atlaskit/media-ui';
@@ -36,7 +35,7 @@ const MediaDownloadButton = props => {
36
35
  ...current(themeProps).buttonStyles,
37
36
  minWidth: 'max-content',
38
37
  '&:hover': {
39
- background: `var(--ds-background-neutral-hovered, ${N40})`
38
+ background: "var(--ds-background-neutral-hovered, #0B120E24)"
40
39
  }
41
40
  },
42
41
  spinnerStyles: current(themeProps).spinnerStyles
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import React from 'react';
5
5
  // eslint-disable-next-line import/no-extraneous-dependencies
6
6
  import { injectIntl } from 'react-intl-next';
7
- import { N40 } from '@atlaskit/theme/colors';
8
7
  import DownloadIcon from '@atlaskit/icon/core/download';
9
8
  import Button from '@atlaskit/button/custom-theme-button';
10
9
  import { messages } from '@atlaskit/media-ui';
@@ -38,7 +37,7 @@ var MediaDownloadButton = function MediaDownloadButton(props) {
38
37
  buttonStyles: _objectSpread(_objectSpread({}, current(themeProps).buttonStyles), {}, {
39
38
  minWidth: 'max-content',
40
39
  '&:hover': {
41
- background: "var(--ds-background-neutral-hovered, ".concat(N40, ")")
40
+ background: "var(--ds-background-neutral-hovered, #0B120E24)"
42
41
  }
43
42
  }),
44
43
  spinnerStyles: current(themeProps).spinnerStyles
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766
6
6
  import { jsx } from '@emotion/react';
7
7
  import React, { useState } from 'react';
8
8
  import dateFnsFormat from 'date-fns/format';
@@ -21,7 +21,7 @@ import {
21
21
  import { type MediaTableItem, NameCell } from '../src';
22
22
  import { IntlProvider } from 'react-intl-next';
23
23
 
24
- export const createMockFileData = (name: string, mediaType: MediaType) => {
24
+ export const createMockFileData = (name: string, mediaType: MediaType): jsx.JSX.Element => {
25
25
  return <NameCell text={name} mediaType={mediaType} endFixedChars={4} />;
26
26
  };
27
27
 
@@ -29,7 +29,9 @@ const dateformat = (date: number, format = 'E MMM dd yyyy kk:mm:ss') => {
29
29
  return dateFnsFormat(date, format);
30
30
  };
31
31
 
32
- export const RenderMediaTableWithFieldRange = (MediaTableNode: React.ReactNode) => {
32
+ export const RenderMediaTableWithFieldRange = (
33
+ MediaTableNode: React.ReactNode,
34
+ ): jsx.JSX.Element => {
33
35
  const [width, setWidth] = useState(1000);
34
36
 
35
37
  return (
@@ -104,7 +106,21 @@ export const items: MediaTableItem[] = [
104
106
  },
105
107
  ];
106
108
 
107
- export const generateItems = (numItems: number) => {
109
+ export const generateItems = (
110
+ numItems: number,
111
+ ): {
112
+ data: {
113
+ file: jsx.JSX.Element;
114
+ size: string;
115
+ date: string;
116
+ };
117
+ identifier: {
118
+ id: string;
119
+ mediaItemType: 'file';
120
+ occurrenceKey?: string;
121
+ collectionName?: string;
122
+ };
123
+ }[] => {
108
124
  const items = [];
109
125
  for (let i = 1; i <= numItems; i++) {
110
126
  items.push({
@@ -1,35 +1,32 @@
1
1
  import { token } from '@atlaskit/tokens';
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
- import { css } from '@emotion/react';
4
- // AFP-2532 TODO: Fix automatic suppressions below
5
- // eslint-disable-next-line @atlassian/tangerine/import/entry-points
6
- import { colors } from '@atlaskit/theme';
3
+ import { css, type SerializedStyles } from '@emotion/react';
7
4
 
8
5
  export const ROW_HIGHLIGHT_CLASSNAME = 'media-table-row-highlighted';
9
6
  export const ROW_CLASSNAME = 'media-table-row';
10
7
 
11
8
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
12
- export const exampleWrapperStyles = css`
9
+ export const exampleWrapperStyles: SerializedStyles = css`
13
10
  display: flex;
14
11
  flex-direction: column;
15
12
  align-items: center;
16
13
 
17
14
  .${ROW_HIGHLIGHT_CLASSNAME} {
18
- background-color: ${token('color.background.warning', colors.Y50)};
15
+ background-color: ${token('color.background.warning')};
19
16
 
20
17
  &:hover {
21
- background-color: ${token('color.background.warning.hovered', colors.Y75)};
18
+ background-color: ${token('color.background.warning.hovered')};
22
19
  }
23
20
  }
24
21
  `;
25
22
 
26
23
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
27
- export const greenOnHoverStyles = css`
28
- background-color: ${token('color.background.danger.bold', 'red')};
24
+ export const greenOnHoverStyles: SerializedStyles = css`
25
+ background-color: ${token('color.background.danger.bold')};
29
26
  height: 8px;
30
27
  width: 8px;
31
28
 
32
29
  .${ROW_CLASSNAME}:hover & {
33
- background-color: ${token('color.background.success.bold.hovered', 'green')};
30
+ background-color: ${token('color.background.success.bold.hovered')};
34
31
  }
35
32
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-table",
3
- "version": "18.1.11",
3
+ "version": "18.1.13",
4
4
  "description": "Table UI component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,17 +29,16 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@atlaskit/analytics-next": "^11.1.0",
32
+ "@atlaskit/analytics-next": "^11.2.0",
33
33
  "@atlaskit/button": "^23.10.0",
34
34
  "@atlaskit/dynamic-table": "^18.3.0",
35
- "@atlaskit/icon": "^33.0.0",
35
+ "@atlaskit/icon": "^33.1.0",
36
36
  "@atlaskit/media-client": "^36.0.0",
37
37
  "@atlaskit/media-client-react": "^5.0.0",
38
38
  "@atlaskit/media-ui": "^28.7.0",
39
- "@atlaskit/media-viewer": "^52.8.0",
40
- "@atlaskit/theme": "^22.0.0",
41
- "@atlaskit/tokens": "^11.1.0",
42
- "@atlaskit/tooltip": "^20.14.0",
39
+ "@atlaskit/media-viewer": "^52.9.0",
40
+ "@atlaskit/tokens": "^11.4.0",
41
+ "@atlaskit/tooltip": "^21.0.0",
43
42
  "@babel/runtime": "^7.0.0",
44
43
  "memoize-one": "^6.0.0"
45
44
  },