@fluentui/react-image 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.1
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.json +240 -16
- package/CHANGELOG.md +59 -10
- package/MIGRATION.md +235 -0
- package/README.md +4 -0
- package/dist/react-image.d.ts +8 -8
- package/lib/components/Image/Image.js +7 -7
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/Image.types.d.ts +4 -3
- package/lib/components/Image/renderImage.d.ts +1 -1
- package/lib/components/Image/renderImage.js +7 -8
- package/lib/components/Image/renderImage.js.map +1 -1
- package/lib/components/Image/useImage.d.ts +2 -3
- package/lib/components/Image/useImage.js +18 -18
- package/lib/components/Image/useImage.js.map +1 -1
- package/lib/components/Image/useImageStyles.d.ts +2 -1
- package/lib/components/Image/useImageStyles.js +21 -10
- package/lib/components/Image/useImageStyles.js.map +1 -1
- package/lib-commonjs/Image.js +1 -1
- package/lib-commonjs/components/Image/Image.js +8 -8
- package/lib-commonjs/components/Image/Image.js.map +1 -1
- package/lib-commonjs/components/Image/Image.types.d.ts +4 -3
- package/lib-commonjs/components/Image/index.js +1 -1
- package/lib-commonjs/components/Image/renderImage.d.ts +1 -1
- package/lib-commonjs/components/Image/renderImage.js +11 -14
- package/lib-commonjs/components/Image/renderImage.js.map +1 -1
- package/lib-commonjs/components/Image/useImage.d.ts +2 -3
- package/lib-commonjs/components/Image/useImage.js +22 -23
- package/lib-commonjs/components/Image/useImage.js.map +1 -1
- package/lib-commonjs/components/Image/useImageStyles.d.ts +2 -1
- package/lib-commonjs/components/Image/useImageStyles.js +25 -12
- package/lib-commonjs/components/Image/useImageStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/package.json +8 -10
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -13
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -24
- package/lib-commonjs/common/isConformant.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,46 +2,270 @@
|
|
|
2
2
|
"name": "@fluentui/react-image",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui/react-image_v9.0.0-
|
|
7
|
-
"version": "9.0.0-
|
|
5
|
+
"date": "Thu, 10 Feb 2022 08:44:28 GMT",
|
|
6
|
+
"tag": "@fluentui/react-image_v9.0.0-rc.1",
|
|
7
|
+
"version": "9.0.0-rc.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
11
|
-
"author": "
|
|
11
|
+
"author": "mgodbolt@microsoft.com",
|
|
12
12
|
"package": "@fluentui/react-image",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"commit": "839ec14849e112b85aa321d034739ec421199141",
|
|
14
|
+
"comment": "remove export of commons types"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-image",
|
|
19
|
+
"commit": "147ca590e83068153f0358da46b84e7e873b891f",
|
|
20
|
+
"comment": "react-image: Replacing use of functions in makeStyles with direct use of tokens."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "olfedias@microsoft.com",
|
|
24
|
+
"package": "@fluentui/react-image",
|
|
25
|
+
"commit": "2ce465c8034747199be56ab5ebce3272b6d3a4f9",
|
|
26
|
+
"comment": "use Griffel packages"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "behowell@microsoft.com",
|
|
30
|
+
"package": "@fluentui/react-image",
|
|
31
|
+
"commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
|
|
32
|
+
"comment": "Remove component's shorthandProps array"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "lingfangao@hotmail.com",
|
|
36
|
+
"package": "@fluentui/react-image",
|
|
37
|
+
"commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
|
|
38
|
+
"comment": "Bump Fluent UI packages to 9.0.0-rc"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "behowell@microsoft.com",
|
|
42
|
+
"package": "@fluentui/react-image",
|
|
43
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
|
44
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
48
|
+
"package": "@fluentui/react-image",
|
|
49
|
+
"commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
|
|
50
|
+
"comment": "Updating based on changes to composition types."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "behowell@microsoft.com",
|
|
54
|
+
"package": "@fluentui/react-image",
|
|
55
|
+
"commit": "53b01d71e335715fda91b33e3d7bbd9d471d5ed3",
|
|
56
|
+
"comment": "Refactor component Slot typings"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "olfedias@microsoft.com",
|
|
60
|
+
"package": "@fluentui/react-image",
|
|
61
|
+
"commit": "ffe595b06f256f25e6224a0069972e1474893758",
|
|
62
|
+
"comment": "update styles to not use CSS shorthands"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "beachball",
|
|
66
|
+
"package": "@fluentui/react-image",
|
|
67
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
|
|
68
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"author": "beachball",
|
|
72
|
+
"package": "@fluentui/react-image",
|
|
73
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1",
|
|
74
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"none": [
|
|
78
|
+
{
|
|
79
|
+
"author": "martinhochel@microsoft.com",
|
|
80
|
+
"package": "@fluentui/react-image",
|
|
81
|
+
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
|
82
|
+
"comment": "chore: use storybook runner for all vNext packages"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"author": "olfedias@microsoft.com",
|
|
86
|
+
"package": "@fluentui/react-image",
|
|
87
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
|
88
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"date": "Thu, 25 Nov 2021 08:34:13 GMT",
|
|
95
|
+
"tag": "@fluentui/react-image_v9.0.0-beta.4",
|
|
96
|
+
"version": "9.0.0-beta.4",
|
|
97
|
+
"comments": {
|
|
98
|
+
"none": [
|
|
99
|
+
{
|
|
100
|
+
"author": "tkrasniqi@microsoft.com",
|
|
101
|
+
"package": "@fluentui/react-image",
|
|
102
|
+
"commit": "01111bb9f10ad2bbe10902a48d15dce2e9cc4264",
|
|
103
|
+
"comment": {
|
|
104
|
+
"title": "",
|
|
105
|
+
"value": ""
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"prerelease": [
|
|
110
|
+
{
|
|
111
|
+
"author": "beachball",
|
|
112
|
+
"package": "@fluentui/react-image",
|
|
113
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
|
|
114
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"author": "beachball",
|
|
118
|
+
"package": "@fluentui/react-image",
|
|
119
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
|
|
120
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"author": "beachball",
|
|
124
|
+
"package": "@fluentui/react-image",
|
|
125
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
|
|
126
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"author": "beachball",
|
|
130
|
+
"package": "@fluentui/react-image",
|
|
131
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
|
|
132
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"author": "beachball",
|
|
136
|
+
"package": "@fluentui/react-image",
|
|
137
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4",
|
|
138
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"date": "Fri, 12 Nov 2021 13:25:24 GMT",
|
|
145
|
+
"tag": "@fluentui/react-image_v9.0.0-beta.3",
|
|
146
|
+
"version": "9.0.0-beta.3",
|
|
147
|
+
"comments": {
|
|
148
|
+
"prerelease": [
|
|
149
|
+
{
|
|
150
|
+
"author": "olfedias@microsoft.com",
|
|
151
|
+
"package": "@fluentui/react-image",
|
|
152
|
+
"commit": "22460e1421c0f3b2bdf9c76d80a2cb202fa30079",
|
|
153
|
+
"comment": "export static classes for components"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"author": "gcox@microsoft.com",
|
|
157
|
+
"package": "@fluentui/react-image",
|
|
158
|
+
"commit": "8555daca54fa0ab490b5400b8d67a9430be9e8e5",
|
|
159
|
+
"comment": "Updated Image stories with codesandbox export comments"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"author": "gcox@microsoft.com",
|
|
163
|
+
"package": "@fluentui/react-image",
|
|
164
|
+
"commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
|
|
165
|
+
"comment": "Updated beta and RC components to ES2019"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"author": "beachball",
|
|
169
|
+
"package": "@fluentui/react-image",
|
|
170
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
|
|
171
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"author": "beachball",
|
|
175
|
+
"package": "@fluentui/react-image",
|
|
176
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
|
|
177
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"author": "beachball",
|
|
181
|
+
"package": "@fluentui/react-image",
|
|
182
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
|
|
183
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"author": "beachball",
|
|
187
|
+
"package": "@fluentui/react-image",
|
|
188
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
|
|
189
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"author": "beachball",
|
|
193
|
+
"package": "@fluentui/react-image",
|
|
194
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
|
|
195
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"none": [
|
|
199
|
+
{
|
|
200
|
+
"author": "mgodbolt@microsoft.com",
|
|
201
|
+
"package": "@fluentui/react-image",
|
|
202
|
+
"commit": "7fafe76eb2c09f9d17a03c11ba73729d91ef411e",
|
|
203
|
+
"comment": "update docs descriptions"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"author": "lingfangao@hotmail.com",
|
|
207
|
+
"package": "@fluentui/react-image",
|
|
208
|
+
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
|
|
209
|
+
"comment": "Remove beta release tag"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"date": "Wed, 27 Oct 2021 12:14:18 GMT",
|
|
216
|
+
"tag": "@fluentui/react-image_v9.0.0-beta.2",
|
|
217
|
+
"version": "9.0.0-beta.2",
|
|
218
|
+
"comments": {
|
|
219
|
+
"none": [
|
|
220
|
+
{
|
|
221
|
+
"author": "tkrasniqi@microsoft.com",
|
|
222
|
+
"package": "@fluentui/react-image",
|
|
223
|
+
"commit": "138ac075ebfc80d8ed588e23177d14b70ca03593",
|
|
224
|
+
"comment": "Updated migration guide"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"prerelease": [
|
|
228
|
+
{
|
|
229
|
+
"author": "gcox@microsoft.com",
|
|
230
|
+
"package": "@fluentui/react-image",
|
|
231
|
+
"commit": "e71393ebda85c52094c46d42d93af1e642f21293",
|
|
232
|
+
"comment": "Removed duplicate 'Image' from story names"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"author": "peter@draxler.ml",
|
|
236
|
+
"package": "@fluentui/react-image",
|
|
237
|
+
"commit": "f6db7c8d6b7db0902775e7857b62b745be35b59a",
|
|
238
|
+
"comment": "added styling of documentation"
|
|
15
239
|
},
|
|
16
240
|
{
|
|
17
241
|
"author": "beachball",
|
|
18
242
|
"package": "@fluentui/react-image",
|
|
19
|
-
"comment": "Bump @fluentui/react-make-styles to v9.0.0-
|
|
20
|
-
"commit": "
|
|
243
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.2",
|
|
244
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
|
21
245
|
},
|
|
22
246
|
{
|
|
23
247
|
"author": "beachball",
|
|
24
248
|
"package": "@fluentui/react-image",
|
|
25
|
-
"comment": "Bump @fluentui/react-utilities to v9.0.0-
|
|
26
|
-
"commit": "
|
|
249
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.2",
|
|
250
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
|
27
251
|
},
|
|
28
252
|
{
|
|
29
253
|
"author": "beachball",
|
|
30
254
|
"package": "@fluentui/react-image",
|
|
31
|
-
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-
|
|
32
|
-
"commit": "
|
|
255
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.2",
|
|
256
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
|
33
257
|
},
|
|
34
258
|
{
|
|
35
259
|
"author": "beachball",
|
|
36
260
|
"package": "@fluentui/react-image",
|
|
37
|
-
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-
|
|
38
|
-
"commit": "
|
|
261
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2",
|
|
262
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
|
39
263
|
},
|
|
40
264
|
{
|
|
41
265
|
"author": "beachball",
|
|
42
266
|
"package": "@fluentui/react-image",
|
|
43
|
-
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-
|
|
44
|
-
"commit": "
|
|
267
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.2",
|
|
268
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
|
45
269
|
}
|
|
46
270
|
]
|
|
47
271
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,71 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-image
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 10 Feb 2022 08:44:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.0.0-
|
|
7
|
+
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-rc.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-beta.
|
|
9
|
+
Thu, 10 Feb 2022 08:44:28 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-beta.4..@fluentui/react-image_v9.0.0-rc.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- Bump
|
|
19
|
-
-
|
|
14
|
+
- remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
|
|
15
|
+
- react-image: Replacing use of functions in makeStyles with direct use of tokens. ([PR #21044](https://github.com/microsoft/fluentui/pull/21044) by Humberto.Morimoto@microsoft.com)
|
|
16
|
+
- use Griffel packages ([PR #21432](https://github.com/microsoft/fluentui/pull/21432) by olfedias@microsoft.com)
|
|
17
|
+
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
|
18
|
+
- Bump Fluent UI packages to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
|
|
19
|
+
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
|
20
|
+
- Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
|
|
21
|
+
- Refactor component Slot typings ([PR #21518](https://github.com/microsoft/fluentui/pull/21518) by behowell@microsoft.com)
|
|
22
|
+
- update styles to not use CSS shorthands ([PR #20818](https://github.com/microsoft/fluentui/pull/20818) by olfedias@microsoft.com)
|
|
23
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
|
24
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
|
25
|
+
|
|
26
|
+
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-beta.4)
|
|
27
|
+
|
|
28
|
+
Thu, 25 Nov 2021 08:34:13 GMT
|
|
29
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-beta.3..@fluentui/react-image_v9.0.0-beta.4)
|
|
30
|
+
|
|
31
|
+
### Changes
|
|
32
|
+
|
|
33
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
|
34
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
|
35
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
|
36
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
|
37
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
|
38
|
+
|
|
39
|
+
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-beta.3)
|
|
40
|
+
|
|
41
|
+
Fri, 12 Nov 2021 13:25:24 GMT
|
|
42
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-beta.2..@fluentui/react-image_v9.0.0-beta.3)
|
|
43
|
+
|
|
44
|
+
### Changes
|
|
45
|
+
|
|
46
|
+
- export static classes for components ([PR #20447](https://github.com/microsoft/fluentui/pull/20447) by olfedias@microsoft.com)
|
|
47
|
+
- Updated Image stories with codesandbox export comments ([PR #20369](https://github.com/microsoft/fluentui/pull/20369) by gcox@microsoft.com)
|
|
48
|
+
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
|
|
49
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
|
50
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
|
51
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
|
52
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
|
53
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
|
54
|
+
|
|
55
|
+
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-beta.2)
|
|
56
|
+
|
|
57
|
+
Wed, 27 Oct 2021 12:14:18 GMT
|
|
58
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-beta.1..@fluentui/react-image_v9.0.0-beta.2)
|
|
59
|
+
|
|
60
|
+
### Changes
|
|
61
|
+
|
|
62
|
+
- Removed duplicate 'Image' from story names ([PR #20268](https://github.com/microsoft/fluentui/pull/20268) by gcox@microsoft.com)
|
|
63
|
+
- added styling of documentation ([PR #20193](https://github.com/microsoft/fluentui/pull/20193) by peter@draxler.ml)
|
|
64
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
|
65
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
|
66
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
|
67
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
|
68
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
|
20
69
|
|
|
21
70
|
## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-beta.1)
|
|
22
71
|
|
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Image Migration
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
This guide is a reference for upgrading the Image component from v8 (Fabric) or v0 (Northstar) to v9 (FluentUI vNext).
|
|
6
|
+
|
|
7
|
+
## Migration from v8 (Fabric)
|
|
8
|
+
|
|
9
|
+
### Property mapping
|
|
10
|
+
|
|
11
|
+
The table below presents a mapping of props between the v8 (FabricUI) and v9 (Fluent UI vNext) in order to clarify which properties require changes to achieve the same result.
|
|
12
|
+
|
|
13
|
+
> ⚠️ Note - Properties not in this table are considered deprecated.
|
|
14
|
+
|
|
15
|
+
| v7 / v8 | v9 | Good to go? |
|
|
16
|
+
| ----------------------- | ------- | ----------- |
|
|
17
|
+
| `className` | - | ✔️ |
|
|
18
|
+
| `coverStyle` | `fit` | ⚠️ |
|
|
19
|
+
| `imageFit` | `fit` | ✔️ |
|
|
20
|
+
| `maximizeFrame` | `block` | ✔️ |
|
|
21
|
+
| `loading` | - | ✔️ |
|
|
22
|
+
| `onLoadingStateChanged` | - | ❌ |
|
|
23
|
+
| `shouldFadeIn` | - | ❌ |
|
|
24
|
+
| `shouldStartVisible` | - | ❌ |
|
|
25
|
+
| `styles` | - | ❌ |
|
|
26
|
+
| `theme` | - | ❓ |
|
|
27
|
+
|
|
28
|
+
### className
|
|
29
|
+
|
|
30
|
+
_This property has not changed and can be left as is._
|
|
31
|
+
|
|
32
|
+
### coverStyle
|
|
33
|
+
|
|
34
|
+
The behaviour of this prop can be achieved using the `fit` prop with the value of `cover`.
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
<Image src="example.jpg" fit="cover" />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### imageFit
|
|
41
|
+
|
|
42
|
+
This can be achieved using the `fit` prop by asigning the value of `contain`.
|
|
43
|
+
|
|
44
|
+
```jsx
|
|
45
|
+
<Image src="example.jpg" fit="contain" />
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### maximizeFrame
|
|
49
|
+
|
|
50
|
+
This prop has been renamed to `block` which will result in the same behaviour as before.
|
|
51
|
+
|
|
52
|
+
```jsx
|
|
53
|
+
<Image src="example.jpg" block />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### loading
|
|
57
|
+
|
|
58
|
+
_This property has not changed and can be used as is._
|
|
59
|
+
|
|
60
|
+
### onLoadingStateChanged
|
|
61
|
+
|
|
62
|
+
For v9, this feature is no longer supported. The alternative would be to use the global events such as: `onLoad`, `onError` to detect the image loading state.
|
|
63
|
+
|
|
64
|
+
### shouldFadeIn
|
|
65
|
+
|
|
66
|
+
For v9, this feature is no longer supported. The alternative is to apply the animation through `make-styles` and using the global event `onLoad`. Below is an example of a migration:
|
|
67
|
+
|
|
68
|
+
```jsx
|
|
69
|
+
import { useState } from 'react';
|
|
70
|
+
import { Image } from '@fluentui/react-image';
|
|
71
|
+
import { makeStyles } from '@griffel/react';
|
|
72
|
+
|
|
73
|
+
const useStyles = makeStyles(theme => ({
|
|
74
|
+
fadeIn400: {
|
|
75
|
+
animationName: {
|
|
76
|
+
from : {
|
|
77
|
+
opacity: 0,
|
|
78
|
+
},
|
|
79
|
+
to: {
|
|
80
|
+
opacity: 1,
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
animationIterationCount: 'infinite',
|
|
84
|
+
animationDuration: '0.367s',
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
const MyComponent = () => {
|
|
89
|
+
const [isLoaded, setLoaded] = useState(false);
|
|
90
|
+
const styles = useStyles()
|
|
91
|
+
|
|
92
|
+
return <Image src="example.jpg" onLoad={()=> setLoaded(true)} className={!isLoaded? styles.fadeIn400 : ''} />
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### shouldStartVisible
|
|
97
|
+
|
|
98
|
+
For v9, this feature is no longer supported. The alternative would be to use the global events such as: `onLoad` and `onError` to achieve the same behaviour. Below is an example showcasing this:
|
|
99
|
+
|
|
100
|
+
```jsx
|
|
101
|
+
import { useState } from 'react';
|
|
102
|
+
import { makeStyles } from '@griffel/react';
|
|
103
|
+
import { Image } from '@fluentui/react-image';
|
|
104
|
+
|
|
105
|
+
const useStyles = makeStyles({
|
|
106
|
+
root: {
|
|
107
|
+
display: 'none',
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export default function App() {
|
|
112
|
+
const [isLoaded, setLoaded] = useState(null);
|
|
113
|
+
|
|
114
|
+
const styles = useStyles();
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<Image
|
|
118
|
+
src="https://via.placeholder.com/300x300"
|
|
119
|
+
alt="Example image"
|
|
120
|
+
onLoad={() => setLoaded(true)}
|
|
121
|
+
onError={() => setLoaded(false)}
|
|
122
|
+
className={isLoaded === false ? styles.root : ''}
|
|
123
|
+
/>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### styles
|
|
129
|
+
|
|
130
|
+
_This property has not changed and can be used as is. However, we highly recommend that you migrate to a `make-styles` styling solution for performance reasons._
|
|
131
|
+
|
|
132
|
+
### theme
|
|
133
|
+
|
|
134
|
+
_This property has not changed and can be used as is. However, we highly recommend that you migrate to a `make-styles` styling solution for performance reasons._
|
|
135
|
+
|
|
136
|
+
## Migration from v0 (Northstar)
|
|
137
|
+
|
|
138
|
+
### Property mapping
|
|
139
|
+
|
|
140
|
+
The table below presents a mapping of props between the v0 and v9 versions in order to make it clear which properties require changes to achieve the same result.
|
|
141
|
+
|
|
142
|
+
| v0 | v9 | Good to go? |
|
|
143
|
+
| --------------- | ------------------ | ----------- |
|
|
144
|
+
| `accessibility` | - | ❌ |
|
|
145
|
+
| `alt` | - | ✔️ |
|
|
146
|
+
| `aria-label` | - | ✔️ |
|
|
147
|
+
| `as` | - | ❌ |
|
|
148
|
+
| `avatar` | `shape="circular"` | ✔️ |
|
|
149
|
+
| `circular` | `shape="circular"` | ✔️ |
|
|
150
|
+
| `className` | - | ✔️ |
|
|
151
|
+
| `fluid` | `block` | ✔️ |
|
|
152
|
+
| `styles` | - | ❌ |
|
|
153
|
+
| `variables` | - | ❌ |
|
|
154
|
+
|
|
155
|
+
### accessibility
|
|
156
|
+
|
|
157
|
+
For v9, this property is no longer supported. It is recommended to follow the best practices of a11y in order for Image to be accessible to assistive tools. Thus:
|
|
158
|
+
|
|
159
|
+
- It is important for Image to have the `alt` description.
|
|
160
|
+
- In case the Image is decorative only, have either `role="presentation"` or `aria-hidden`. Ensure the correct usage of these two attributes, based on your objectives.
|
|
161
|
+
|
|
162
|
+
### alt
|
|
163
|
+
|
|
164
|
+
_This property has not changed and can be left as is._
|
|
165
|
+
|
|
166
|
+
### aria-label
|
|
167
|
+
|
|
168
|
+
_This property has not changed and can be left as is._
|
|
169
|
+
|
|
170
|
+
### as
|
|
171
|
+
|
|
172
|
+
For v9, this property is no longer supported. The Image prop will always be an `<img/>` element, it is not possible to show an image as any other element.
|
|
173
|
+
|
|
174
|
+
### avatar
|
|
175
|
+
|
|
176
|
+
This can be achieved using the `shape` prop with the value of `circular`.
|
|
177
|
+
|
|
178
|
+
```jsx
|
|
179
|
+
<Image src="example.jpg" shape="circular" />
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### circular
|
|
183
|
+
|
|
184
|
+
This can be achieved using the `shape` prop with the value of `circular`.
|
|
185
|
+
|
|
186
|
+
```jsx
|
|
187
|
+
<Image src="example.jpg" shape="circular" />
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### className
|
|
191
|
+
|
|
192
|
+
_This property has not changed and can be left as is._
|
|
193
|
+
|
|
194
|
+
### fluid
|
|
195
|
+
|
|
196
|
+
This prop has been renamed to `block` which will result into the same behaviour as before.
|
|
197
|
+
|
|
198
|
+
```jsx
|
|
199
|
+
<Image src="example.jpg" block />
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### styles
|
|
203
|
+
|
|
204
|
+
_This property has not changed and can be used as is. However, we highly recommend that you migrate to a `make-styles` styling solution for performance reasons._
|
|
205
|
+
|
|
206
|
+
### variables
|
|
207
|
+
|
|
208
|
+
For v9, this feature is no longer supported. The alternative is to apply styles through `make-styles`. Below is an example of a migration:
|
|
209
|
+
|
|
210
|
+
#### v0 (Northstar) implementation
|
|
211
|
+
|
|
212
|
+
```jsx
|
|
213
|
+
const MyComponent = () => {
|
|
214
|
+
return <Image src="example.jpg" variables={{ width: '100px' }} />;
|
|
215
|
+
};
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
#### v9 (Fluent UI vNext) implementation
|
|
219
|
+
|
|
220
|
+
```jsx
|
|
221
|
+
import { Image } from '@fluentui/react-image';
|
|
222
|
+
import { makeStyles } from '@griffel/react';
|
|
223
|
+
|
|
224
|
+
const useStyles = makeStyles(theme => ({
|
|
225
|
+
width100: {
|
|
226
|
+
width: '100px'
|
|
227
|
+
},
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
const MyComponent = () => {
|
|
231
|
+
const styles = useStyles()
|
|
232
|
+
|
|
233
|
+
return <Image src="example.jpg" className={styles.width100} />
|
|
234
|
+
}
|
|
235
|
+
```
|
package/README.md
CHANGED
|
@@ -51,3 +51,7 @@ The DOM structure will result into:
|
|
|
51
51
|
Image component is build upon the `<img/>` tag, which does support all the native attributes. Additionaly, the following properties are available: `bordered`, `fit`, `block`, `shape` and `shadow`.
|
|
52
52
|
|
|
53
53
|
For more information on the component, please refer to the [API documentation](https://aka.ms/fluentui-storybook).
|
|
54
|
+
|
|
55
|
+
## Migration
|
|
56
|
+
|
|
57
|
+
For migrating from older versions of FluentUI, please check out the [migration guide](./MIGRATION.md)
|
package/dist/react-image.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
4
|
-
import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
|
5
4
|
import * as React_2 from 'react';
|
|
5
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The Image component ensures the consistent styling of images.
|
|
@@ -10,7 +10,9 @@ import * as React_2 from 'react';
|
|
|
10
10
|
declare const Image_2: ForwardRefComponent<ImageProps>;
|
|
11
11
|
export { Image_2 as Image }
|
|
12
12
|
|
|
13
|
-
export declare
|
|
13
|
+
export declare const imageClassName = "fui-Image";
|
|
14
|
+
|
|
15
|
+
declare type ImageCommons = {
|
|
14
16
|
/**
|
|
15
17
|
* An image can appear with rectangular border.
|
|
16
18
|
*/
|
|
@@ -36,10 +38,8 @@ export declare type ImageCommons = {
|
|
|
36
38
|
|
|
37
39
|
export declare type ImageProps = ComponentProps<ImageSlots> & Partial<ImageCommons>;
|
|
38
40
|
|
|
39
|
-
export declare const imageShorthandProps: Array<keyof ImageSlots>;
|
|
40
|
-
|
|
41
41
|
export declare type ImageSlots = {
|
|
42
|
-
root:
|
|
42
|
+
root: Slot<'img'>;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export declare type ImageState = ComponentState<ImageSlots> & ImageCommons;
|
|
@@ -48,13 +48,13 @@ export declare type ImageState = ComponentState<ImageSlots> & ImageCommons;
|
|
|
48
48
|
* Define the render function.
|
|
49
49
|
* Given the state of an image, renders it.
|
|
50
50
|
*/
|
|
51
|
-
export declare const
|
|
51
|
+
export declare const renderImage_unstable: (state: ImageState) => JSX.Element;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Given user props, returns state and render function for an Image.
|
|
55
55
|
*/
|
|
56
|
-
export declare const
|
|
56
|
+
export declare const useImage_unstable: (props: ImageProps, ref: React_2.Ref<HTMLImageElement>) => ImageState;
|
|
57
57
|
|
|
58
|
-
export declare const
|
|
58
|
+
export declare const useImageStyles_unstable: (state: ImageState) => void;
|
|
59
59
|
|
|
60
60
|
export { }
|