@atlaskit/image 1.2.1 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -1,150 +1,156 @@
1
1
  # @atlaskit/image
2
2
 
3
+ ## 1.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 1.2.1
4
10
 
5
11
  ### Patch Changes
6
12
 
7
- - [#89307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89307)
8
- [`47cdc66371fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/47cdc66371fb) -
9
- [ux] Fix bug where images flickered in dark mode. Source URLs are now set based on the current
10
- theme before first paint.
11
- - Updated dependencies
13
+ - [#89307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89307)
14
+ [`47cdc66371fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/47cdc66371fb) -
15
+ [ux] Fix bug where images flickered in dark mode. Source URLs are now set based on the current
16
+ theme before first paint.
17
+ - Updated dependencies
12
18
 
13
19
  ## 1.2.0
14
20
 
15
21
  ### Minor Changes
16
22
 
17
- - [#96499](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96499)
18
- [`d9a3724cdeb8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d9a3724cdeb8) -
19
- Add support for React 18.
23
+ - [#96499](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96499)
24
+ [`d9a3724cdeb8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d9a3724cdeb8) -
25
+ Add support for React 18 in non-strict mode.
20
26
 
21
27
  ## 1.1.7
22
28
 
23
29
  ### Patch Changes
24
30
 
25
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
26
- [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
27
- Upgrade Typescript from `4.9.5` to `5.4.2`
31
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
32
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
33
+ Upgrade Typescript from `4.9.5` to `5.4.2`
28
34
 
29
35
  ## 1.1.6
30
36
 
31
37
  ### Patch Changes
32
38
 
33
- - [#38487](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38487)
34
- [`b2da5b33468`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2da5b33468) -
35
- Documents that props like `css` and `className` are unsafe and will be deprecated in the future.
39
+ - [#38487](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38487)
40
+ [`b2da5b33468`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2da5b33468) -
41
+ Documents that props like `css` and `className` are unsafe and will be deprecated in the future.
36
42
 
37
43
  ## 1.1.5
38
44
 
39
45
  ### Patch Changes
40
46
 
41
- - [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754)
42
- [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use
43
- `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility
44
- testing.
47
+ - [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754)
48
+ [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use
49
+ `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility
50
+ testing.
45
51
 
46
52
  ## 1.1.4
47
53
 
48
54
  ### Patch Changes
49
55
 
50
- - [#34853](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34853)
51
- [`d0a020ae050`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0a020ae050) - Basic
52
- accessibility unit tests with jest-axe
56
+ - [#34853](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34853)
57
+ [`d0a020ae050`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0a020ae050) - Basic
58
+ accessibility unit tests with jest-axe
53
59
 
54
60
  ## 1.1.3
55
61
 
56
62
  ### Patch Changes
57
63
 
58
- - [#32935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32935)
59
- [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) -
60
- Internal change to enforce token usage for spacing properties. There is no expected visual or
61
- behaviour change.
64
+ - [#32935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32935)
65
+ [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal
66
+ change to enforce token usage for spacing properties. There is no expected visual or behaviour
67
+ change.
62
68
 
63
69
  ## 1.1.2
64
70
 
65
71
  ### Patch Changes
66
72
 
67
- - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
68
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
69
- legacy types are published for TS 4.5-4.8
73
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
74
+ [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
75
+ legacy types are published for TS 4.5-4.8
70
76
 
71
77
  ## 1.1.1
72
78
 
73
79
  ### Patch Changes
74
80
 
75
- - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
76
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) -
77
- Upgrade Typescript from `4.5.5` to `4.9.5`
81
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
82
+ [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade
83
+ Typescript from `4.5.5` to `4.9.5`
78
84
 
79
85
  ## 1.1.0
80
86
 
81
87
  ### Minor Changes
82
88
 
83
- - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
84
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
85
- minor dependency bump
89
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
90
+ [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
91
+ minor dependency bump
86
92
 
87
93
  ### Patch Changes
88
94
 
89
- - Updated dependencies
95
+ - Updated dependencies
90
96
 
91
97
  ## 1.0.4
92
98
 
93
99
  ### Patch Changes
94
100
 
95
- - [#27634](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27634)
96
- [`718d5ad3044`](https://bitbucket.org/atlassian/atlassian-frontend/commits/718d5ad3044) -
97
- Updates to support the new `@atlaskit/tokens` theming API.
98
- - Updated dependencies
101
+ - [#27634](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27634)
102
+ [`718d5ad3044`](https://bitbucket.org/atlassian/atlassian-frontend/commits/718d5ad3044) - Updates
103
+ to support the new `@atlaskit/tokens` theming API.
104
+ - Updated dependencies
99
105
 
100
106
  ## 1.0.3
101
107
 
102
108
  ### Patch Changes
103
109
 
104
- - Updated dependencies
110
+ - Updated dependencies
105
111
 
106
112
  ## 1.0.2
107
113
 
108
114
  ### Patch Changes
109
115
 
110
- - Updated dependencies
116
+ - Updated dependencies
111
117
 
112
118
  ## 1.0.1
113
119
 
114
120
  ### Patch Changes
115
121
 
116
- - [#28081](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28081)
117
- [`98f5ba36c98`](https://bitbucket.org/atlassian/atlassian-frontend/commits/98f5ba36c98) -
118
- Updates atlaskit/image thumbnails + descriptions for the website
122
+ - [#28081](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28081)
123
+ [`98f5ba36c98`](https://bitbucket.org/atlassian/atlassian-frontend/commits/98f5ba36c98) - Updates
124
+ atlaskit/image thumbnails + descriptions for the website
119
125
 
120
126
  ## 1.0.0
121
127
 
122
128
  ### Major Changes
123
129
 
124
- - [#28012](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28012)
125
- [`bc74a5feb7d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc74a5feb7d) - This
126
- package is no longer experimental and the API is considered stable. Version contains no changes
127
- what so ever.
130
+ - [#28012](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28012)
131
+ [`bc74a5feb7d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc74a5feb7d) - This
132
+ package is no longer experimental and the API is considered stable. Version contains no changes
133
+ what so ever.
128
134
 
129
135
  ## 0.2.1
130
136
 
131
137
  ### Patch Changes
132
138
 
133
- - [#27885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27885)
134
- [`c674eafa051`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c674eafa051) - Fixes
135
- a bug where the system preference would override the default behaviour when the color-mode was
136
- not set to auto. As a result, an OS setting of "dark" and a product setting of "light" would
137
- result in a "dark" image.
139
+ - [#27885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27885)
140
+ [`c674eafa051`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c674eafa051) - Fixes a
141
+ bug where the system preference would override the default behaviour when the color-mode was not
142
+ set to auto. As a result, an OS setting of "dark" and a product setting of "light" would result in
143
+ a "dark" image.
138
144
 
139
145
  ## 0.2.0
140
146
 
141
147
  ### Minor Changes
142
148
 
143
- - [#27046](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27046)
144
- [`8ab96dfc824`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8ab96dfc824) - Adds a
145
- new Image primitive that works like the native HTML img element, with the added functionality of
146
- being theme-aware.
149
+ - [#27046](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27046)
150
+ [`8ab96dfc824`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8ab96dfc824) - Adds a
151
+ new Image primitive that works like the native HTML img element, with the added functionality of
152
+ being theme-aware.
147
153
 
148
154
  ## 0.1.0
149
155
 
150
- - Create Image component with theme functionality.
156
+ - Create Image component with theme functionality.
package/LICENSE.md CHANGED
@@ -1,13 +1,11 @@
1
1
  Copyright 2022 Atlassian Pty Ltd
2
2
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
4
+ compliance with the License. You may obtain a copy of the License at
6
5
 
7
6
  http://www.apache.org/licenses/LICENSE-2.0
8
7
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
8
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
9
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+ implied. See the License for the specific language governing permissions and limitations under the
11
+ License.
@@ -19,7 +19,7 @@ var baseImageStyles = (0, _react2.css)({
19
19
  });
20
20
  var themedImageStyles = (0, _react2.css)({
21
21
  content: "var(--img-source)",
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
23
23
  'html[data-color-mode=dark] &': {
24
24
  content: "var(--img-source-dark)"
25
25
  }
@@ -58,7 +58,9 @@ function Image(_ref) {
58
58
  return (0, _react2.jsx)("img", (0, _extends2.default)({
59
59
  alt: alt,
60
60
  "data-testid": testId,
61
- src: src,
61
+ src: src
62
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
63
+ ,
62
64
  style: {
63
65
  '--img-source': "url(".concat(src, ")"),
64
66
  '--img-source-dark': "url(".concat(srcDark || src, ")")
@@ -10,7 +10,7 @@ const baseImageStyles = css({
10
10
  });
11
11
  const themedImageStyles = css({
12
12
  content: `var(--img-source)`,
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
14
14
  'html[data-color-mode=dark] &': {
15
15
  content: `var(--img-source-dark)`
16
16
  }
@@ -51,7 +51,9 @@ export default function Image({
51
51
  return jsx("img", _extends({
52
52
  alt: alt,
53
53
  "data-testid": testId,
54
- src: src,
54
+ src: src
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
56
+ ,
55
57
  style: {
56
58
  '--img-source': `url(${src})`,
57
59
  '--img-source-dark': `url(${srcDark || src})`
@@ -12,7 +12,7 @@ var baseImageStyles = css({
12
12
  });
13
13
  var themedImageStyles = css({
14
14
  content: "var(--img-source)",
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
16
16
  'html[data-color-mode=dark] &': {
17
17
  content: "var(--img-source-dark)"
18
18
  }
@@ -51,7 +51,9 @@ export default function Image(_ref) {
51
51
  return jsx("img", _extends({
52
52
  alt: alt,
53
53
  "data-testid": testId,
54
- src: src,
54
+ src: src
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
56
+ ,
55
57
  style: {
56
58
  '--img-source': "url(".concat(src, ")"),
57
59
  '--img-source-dark': "url(".concat(srcDark || src, ")")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/image",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "An image that changes in light or dark themes.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,8 +28,8 @@
28
28
  "runReact18": true
29
29
  },
30
30
  "dependencies": {
31
- "@atlaskit/app-provider": "1.3.2",
32
- "@atlaskit/tokens": "^1.49.0",
31
+ "@atlaskit/app-provider": "1.3.3",
32
+ "@atlaskit/tokens": "^1.50.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@emotion/react": "^11.7.1"
35
35
  },
@@ -43,7 +43,6 @@
43
43
  "@atlaskit/ds-lib": "^2.3.0",
44
44
  "@atlaskit/ssr": "*",
45
45
  "@atlaskit/visual-regression": "*",
46
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
47
46
  "@testing-library/react": "^12.1.5",
48
47
  "react-dom": "^16.8.0",
49
48
  "typescript": "~5.4.2",
@@ -97,6 +96,5 @@
97
96
  },
98
97
  "af:exports": {
99
98
  ".": "./src/index.tsx"
100
- },
101
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
99
+ }
102
100
  }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/image"
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
@@ -20,19 +21,13 @@
20
21
  import { jsx } from '@emotion/react';
21
22
 
22
23
  // @public
23
- function Image_2({
24
- src,
25
- srcDark,
26
- alt,
27
- testId,
28
- ...props
29
- }: ImageProps): jsx.JSX.Element;
24
+ function Image_2({ src, srcDark, alt, testId, ...props }: ImageProps): jsx.JSX.Element;
30
25
  export default Image_2;
31
26
 
32
27
  // @public (undocumented)
33
28
  interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
34
- srcDark?: string;
35
- testId?: string;
29
+ srcDark?: string;
30
+ testId?: string;
36
31
  }
37
32
 
38
33
  // (No @packageDocumentation comment for this package)
@@ -46,7 +41,7 @@ interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
46
41
 
47
42
  ```json
48
43
  {
49
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
44
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
50
45
  }
51
46
  ```
52
47