@atlaskit/image 3.0.10 → 4.0.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.
- package/CHANGELOG.md +33 -0
- package/README.md +4 -0
- package/image.docs.tsx +41 -39
- package/package.json +10 -20
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/image/index.d.ts +0 -24
- package/offerings.json +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/image
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 3.1.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- [`afbd895691509`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/afbd895691509) -
|
|
34
|
+
Promote `@atlaskit/image` to general availability.
|
|
35
|
+
|
|
3
36
|
## 3.0.10
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
package/README.md
CHANGED
package/image.docs.tsx
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
4
4
|
|
|
5
|
-
const documentation:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: 'A component for displaying images with theme support.',
|
|
9
|
-
status: 'open-beta',
|
|
10
|
-
import: {
|
|
5
|
+
const documentation: StructuredContentSource = {
|
|
6
|
+
components: [
|
|
7
|
+
{
|
|
11
8
|
name: 'Image',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
packageJson: require('./package.json'),
|
|
16
|
-
},
|
|
17
|
-
usageGuidelines: [
|
|
18
|
-
'Use for displaying images in content',
|
|
19
|
-
'Provide appropriate alt text',
|
|
20
|
-
'Consider responsive image sizing',
|
|
21
|
-
'Handle loading and error states',
|
|
22
|
-
],
|
|
23
|
-
contentGuidelines: [
|
|
24
|
-
'Use clear, descriptive alt text',
|
|
25
|
-
'Choose appropriate image dimensions',
|
|
26
|
-
'Consider image quality and file size',
|
|
27
|
-
'Use meaningful image content',
|
|
28
|
-
],
|
|
29
|
-
accessibilityGuidelines: [
|
|
30
|
-
'Always provide meaningful alt text',
|
|
31
|
-
'Ensure appropriate image sizing',
|
|
32
|
-
'Consider loading states and error handling',
|
|
33
|
-
'Use appropriate image formats',
|
|
34
|
-
],
|
|
35
|
-
examples: [
|
|
36
|
-
{
|
|
9
|
+
description: 'A component for displaying images with theme support.',
|
|
10
|
+
status: 'general-availability',
|
|
11
|
+
import: {
|
|
37
12
|
name: 'Image',
|
|
38
|
-
|
|
39
|
-
|
|
13
|
+
package: '@atlaskit/image',
|
|
14
|
+
type: 'default',
|
|
15
|
+
packagePath: path.resolve(__dirname),
|
|
16
|
+
packageJson: require('./package.json'),
|
|
40
17
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
usageGuidelines: [
|
|
19
|
+
'Use for displaying images in content',
|
|
20
|
+
'Provide appropriate alt text',
|
|
21
|
+
'Consider responsive image sizing',
|
|
22
|
+
'Handle loading and error states',
|
|
23
|
+
],
|
|
24
|
+
contentGuidelines: [
|
|
25
|
+
'Use clear, descriptive alt text',
|
|
26
|
+
'Choose appropriate image dimensions',
|
|
27
|
+
'Consider image quality and file size',
|
|
28
|
+
'Use meaningful image content',
|
|
29
|
+
],
|
|
30
|
+
accessibilityGuidelines: [
|
|
31
|
+
'Always provide meaningful alt text',
|
|
32
|
+
'Ensure appropriate image sizing',
|
|
33
|
+
'Consider loading states and error handling',
|
|
34
|
+
'Use appropriate image formats',
|
|
35
|
+
],
|
|
36
|
+
examples: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Image',
|
|
39
|
+
description: 'Image example',
|
|
40
|
+
source: path.resolve(__dirname, './examples/ai/image.tsx'),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
keywords: ['image', 'picture', 'photo', 'visual', 'media'],
|
|
44
|
+
categories: ['data-display'],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
46
48
|
|
|
47
49
|
export default documentation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/image",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "An image that changes in light or dark themes.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,15 +27,12 @@
|
|
|
27
27
|
"team": "Design System Team",
|
|
28
28
|
"website": {
|
|
29
29
|
"name": "Image",
|
|
30
|
-
"category": "Images and icons"
|
|
31
|
-
"status": {
|
|
32
|
-
"type": "beta"
|
|
33
|
-
}
|
|
30
|
+
"category": "Images and icons"
|
|
34
31
|
}
|
|
35
32
|
},
|
|
36
33
|
"dependencies": {
|
|
37
|
-
"@atlaskit/app-provider": "^
|
|
38
|
-
"@atlaskit/tokens": "^
|
|
34
|
+
"@atlaskit/app-provider": "^5.0.0",
|
|
35
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
39
36
|
"@babel/runtime": "^7.0.0",
|
|
40
37
|
"@compiled/react": "^0.20.0"
|
|
41
38
|
},
|
|
@@ -46,14 +43,15 @@
|
|
|
46
43
|
"@af/accessibility-testing": "workspace:^",
|
|
47
44
|
"@af/integration-testing": "workspace:^",
|
|
48
45
|
"@af/visual-regression": "workspace:^",
|
|
49
|
-
"@atlaskit/docs": "^
|
|
50
|
-
"@atlaskit/link": "^
|
|
51
|
-
"@atlaskit/primitives": "^
|
|
52
|
-
"@atlaskit/section-message": "^
|
|
46
|
+
"@atlaskit/docs": "^12.0.0",
|
|
47
|
+
"@atlaskit/link": "^4.0.0",
|
|
48
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
49
|
+
"@atlaskit/section-message": "^9.0.0",
|
|
53
50
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
54
51
|
"@atlassian/ssr-tests": "workspace:^",
|
|
55
52
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
56
53
|
"@testing-library/react": "^16.3.0",
|
|
54
|
+
"react": "^18.2.0",
|
|
57
55
|
"react-dom": "^18.2.0"
|
|
58
56
|
},
|
|
59
57
|
"techstack": {
|
|
@@ -93,13 +91,5 @@
|
|
|
93
91
|
]
|
|
94
92
|
}
|
|
95
93
|
},
|
|
96
|
-
"homepage": "https://atlassian.design/components/image/"
|
|
97
|
-
"typesVersions": {
|
|
98
|
-
">=4.5 <4.9": {
|
|
99
|
-
"*": [
|
|
100
|
-
"dist/types-ts4.5/*",
|
|
101
|
-
"dist/types-ts4.5/index.d.ts"
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
94
|
+
"homepage": "https://atlassian.design/components/image/"
|
|
105
95
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ui/image';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
2
|
-
/**
|
|
3
|
-
* Image URL to use for dark mode. This overrides `src` when the user
|
|
4
|
-
* has selected dark mode either in the app or on their operating system.
|
|
5
|
-
*/
|
|
6
|
-
srcDark?: string;
|
|
7
|
-
/**
|
|
8
|
-
* A `testId` prop is provided for specified elements, which is a unique
|
|
9
|
-
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
-
* serving as a hook for automated tests.
|
|
11
|
-
*/
|
|
12
|
-
testId?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* __Image__
|
|
16
|
-
*
|
|
17
|
-
* This component can be used interchangeably with the native `img` element. It includes additional functionality, such as theme support.
|
|
18
|
-
*
|
|
19
|
-
* - [Examples](https://atlassian.design/components/image/examples)
|
|
20
|
-
* - [Code](https://atlassian.design/components/image/code)
|
|
21
|
-
* - [Usage](https://atlassian.design/components/image/usage)
|
|
22
|
-
*/
|
|
23
|
-
export default function Image({ src, srcDark, alt, testId, className, ...props }: ImageProps): JSX.Element;
|
|
24
|
-
export {};
|
package/offerings.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "Image",
|
|
4
|
-
"package": "@atlaskit/image",
|
|
5
|
-
"import": {
|
|
6
|
-
"name": "Image",
|
|
7
|
-
"package": "@atlaskit/image",
|
|
8
|
-
"type": "default"
|
|
9
|
-
},
|
|
10
|
-
"keywords": ["image", "picture", "photo", "visual", "media"],
|
|
11
|
-
"categories": ["data-display"],
|
|
12
|
-
"shortDescription": "A component for displaying images with theme support.",
|
|
13
|
-
"status": "open-beta",
|
|
14
|
-
"accessibilityGuidelines": [
|
|
15
|
-
"Always provide meaningful alt text",
|
|
16
|
-
"Ensure appropriate image sizing",
|
|
17
|
-
"Consider loading states and error handling",
|
|
18
|
-
"Use appropriate image formats"
|
|
19
|
-
],
|
|
20
|
-
"usageGuidelines": [
|
|
21
|
-
"Use for displaying images in content",
|
|
22
|
-
"Provide appropriate alt text",
|
|
23
|
-
"Consider responsive image sizing",
|
|
24
|
-
"Handle loading and error states"
|
|
25
|
-
],
|
|
26
|
-
"contentGuidelines": [
|
|
27
|
-
"Use clear, descriptive alt text",
|
|
28
|
-
"Choose appropriate image dimensions",
|
|
29
|
-
"Consider image quality and file size",
|
|
30
|
-
"Use meaningful image content"
|
|
31
|
-
],
|
|
32
|
-
"examples": ["./examples/ai/image.tsx"]
|
|
33
|
-
}
|
|
34
|
-
]
|