@fluentui/react-image 9.0.0-rc.8 → 9.0.0-rc.9
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 +46 -1
- package/CHANGELOG.md +16 -2
- package/dist/index.d.ts +20 -13
- package/lib/components/Image/Image.types.js.map +1 -1
- package/lib/components/Image/useImage.js +4 -4
- package/lib/components/Image/useImage.js.map +1 -1
- package/lib-commonjs/components/Image/useImage.js +4 -4
- package/lib-commonjs/components/Image/useImage.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
2
2
|
"name": "@fluentui/react-image",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 23 May 2022 12:10:42 GMT",
|
|
6
|
+
"tag": "@fluentui/react-image_v9.0.0-rc.9",
|
|
7
|
+
"version": "9.0.0-rc.9",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "olfedias@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-image",
|
|
13
|
+
"commit": "60804cec07a495b8a5d1fc66338bf0443b212144",
|
|
14
|
+
"comment": "chore: Update Griffel to latest version"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-image",
|
|
19
|
+
"commit": "9ee5fba37a8d253133f4338575ebedd238cd74a3",
|
|
20
|
+
"comment": "Removing ImageCommons type."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "olfedias@microsoft.com",
|
|
24
|
+
"package": "@fluentui/react-image",
|
|
25
|
+
"commit": "f120fe9160ad7311a87af0cfacd8d2fb26275e34",
|
|
26
|
+
"comment": "chore: Update Griffel to latest version"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-image",
|
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.9",
|
|
32
|
+
"commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-image",
|
|
37
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.8",
|
|
38
|
+
"commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-image",
|
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6",
|
|
44
|
+
"commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Thu, 05 May 2022 18:26:30 GMT",
|
|
6
51
|
"tag": "@fluentui/react-image_v9.0.0-rc.8",
|
|
7
52
|
"version": "9.0.0-rc.8",
|
|
8
53
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-image
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 23 May 2022 12:10:42 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-rc.9)
|
|
8
|
+
|
|
9
|
+
Mon, 23 May 2022 12:10:42 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-rc.8..@fluentui/react-image_v9.0.0-rc.9)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
|
|
15
|
+
- Removing ImageCommons type. ([PR #22957](https://github.com/microsoft/fluentui/pull/22957) by Humberto.Morimoto@microsoft.com)
|
|
16
|
+
- chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
|
|
17
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
|
18
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
|
20
|
+
|
|
7
21
|
## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.0.0-rc.8)
|
|
8
22
|
|
|
9
|
-
Thu, 05 May 2022 18:
|
|
23
|
+
Thu, 05 May 2022 18:26:30 GMT
|
|
10
24
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.0.0-rc.7..@fluentui/react-image_v9.0.0-rc.8)
|
|
11
25
|
|
|
12
26
|
### Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -18,37 +18,44 @@ export declare const imageClassName = "fui-Image";
|
|
|
18
18
|
|
|
19
19
|
export declare const imageClassNames: SlotClassNames<ImageSlots>;
|
|
20
20
|
|
|
21
|
-
declare type
|
|
21
|
+
export declare type ImageProps = ComponentProps<ImageSlots> & {
|
|
22
22
|
/**
|
|
23
|
-
* An image can
|
|
23
|
+
* An image can take up the width of its container.
|
|
24
|
+
*
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
block?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* An image can appear with a rectangular border.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
24
32
|
*/
|
|
25
33
|
bordered?: boolean;
|
|
26
34
|
/**
|
|
27
35
|
* An image can set how it should be resized to fit its container.
|
|
36
|
+
*
|
|
37
|
+
* @default 'default'
|
|
28
38
|
*/
|
|
29
|
-
fit?: 'none' | 'center' | 'contain' | 'cover';
|
|
39
|
+
fit?: 'none' | 'center' | 'contain' | 'cover' | 'default';
|
|
30
40
|
/**
|
|
31
|
-
* An image can
|
|
41
|
+
* An image can appear elevated with shadow.
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
32
44
|
*/
|
|
33
|
-
|
|
45
|
+
shadow?: boolean;
|
|
34
46
|
/**
|
|
35
47
|
* An image can appear square, circular, or rounded.
|
|
36
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* @default 'square'
|
|
37
50
|
*/
|
|
38
51
|
shape?: 'square' | 'circular' | 'rounded';
|
|
39
|
-
/**
|
|
40
|
-
* An image can appear elevated with shadow.
|
|
41
|
-
*/
|
|
42
|
-
shadow?: boolean;
|
|
43
52
|
};
|
|
44
53
|
|
|
45
|
-
export declare type ImageProps = ComponentProps<ImageSlots> & Partial<ImageCommons>;
|
|
46
|
-
|
|
47
54
|
export declare type ImageSlots = {
|
|
48
55
|
root: Slot<'img'>;
|
|
49
56
|
};
|
|
50
57
|
|
|
51
|
-
export declare type ImageState = ComponentState<ImageSlots> &
|
|
58
|
+
export declare type ImageState = ComponentState<ImageSlots> & Required<Pick<ImageProps, 'block' | 'bordered' | 'fit' | 'shadow' | 'shape'>>;
|
|
52
59
|
|
|
53
60
|
/**
|
|
54
61
|
* Define the render function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.types.js","sourceRoot":"../src/","sources":["components/Image/Image.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities';\n\nexport type ImageSlots = {\n root: Slot<'img'>;\n};\n\
|
|
1
|
+
{"version":3,"file":"Image.types.js","sourceRoot":"../src/","sources":["components/Image/Image.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities';\n\nexport type ImageSlots = {\n root: Slot<'img'>;\n};\n\nexport type ImageProps = ComponentProps<ImageSlots> & {\n /**\n * An image can take up the width of its container.\n *\n * @default false\n */\n block?: boolean;\n\n /**\n * An image can appear with a rectangular border.\n *\n * @default false\n */\n bordered?: boolean;\n\n /**\n * An image can set how it should be resized to fit its container.\n *\n * @default 'default'\n */\n fit?: 'none' | 'center' | 'contain' | 'cover' | 'default';\n\n /**\n * An image can appear elevated with shadow.\n *\n * @default false\n */\n shadow?: boolean;\n\n /**\n * An image can appear square, circular, or rounded.\n *\n * @default 'square'\n */\n shape?: 'square' | 'circular' | 'rounded';\n};\n\nexport type ImageState = ComponentState<ImageSlots> &\n Required<Pick<ImageProps, 'block' | 'bordered' | 'fit' | 'shadow' | 'shape'>>;\n"]}
|
|
@@ -5,11 +5,11 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
|
5
5
|
|
|
6
6
|
export const useImage_unstable = (props, ref) => {
|
|
7
7
|
const {
|
|
8
|
-
bordered,
|
|
9
|
-
fit,
|
|
10
|
-
block,
|
|
8
|
+
bordered = false,
|
|
9
|
+
fit = 'default',
|
|
10
|
+
block = false,
|
|
11
11
|
shape = 'square',
|
|
12
|
-
shadow
|
|
12
|
+
shadow = false
|
|
13
13
|
} = props;
|
|
14
14
|
const state = {
|
|
15
15
|
bordered,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Image/useImage.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;AACnG,QAAM;AAAE,IAAA,
|
|
1
|
+
{"version":3,"sources":["components/Image/useImage.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;AACnG,QAAM;AAAE,IAAA,QAAQ,GAAG,KAAb;AAAoB,IAAA,GAAG,GAAG,SAA1B;AAAqC,IAAA,KAAK,GAAG,KAA7C;AAAoD,IAAA,KAAK,GAAG,QAA5D;AAAsE,IAAA,MAAM,GAAG;AAA/E,MAAyF,KAA/F;AAEA,QAAM,KAAK,GAAe;AACxB,IAAA,QADwB;AAExB,IAAA,GAFwB;AAGxB,IAAA,KAHwB;AAIxB,IAAA,KAJwB;AAKxB,IAAA,MALwB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KANY;AASxB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR;AATH,GAA1B;AAeA,SAAO,KAAP;AACD,CAnBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { ImageProps, ImageState } from './Image.types';\n\n/**\n * Given user props, returns state and render function for an Image.\n */\nexport const useImage_unstable = (props: ImageProps, ref: React.Ref<HTMLImageElement>): ImageState => {\n const { bordered = false, fit = 'default', block = false, shape = 'square', shadow = false } = props;\n\n const state: ImageState = {\n bordered,\n fit,\n block,\n shape,\n shadow,\n components: {\n root: 'img',\n },\n root: getNativeElementProps('img', {\n ref,\n ...props,\n }),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -13,11 +13,11 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
|
13
13
|
|
|
14
14
|
const useImage_unstable = (props, ref) => {
|
|
15
15
|
const {
|
|
16
|
-
bordered,
|
|
17
|
-
fit,
|
|
18
|
-
block,
|
|
16
|
+
bordered = false,
|
|
17
|
+
fit = 'default',
|
|
18
|
+
block = false,
|
|
19
19
|
shape = 'square',
|
|
20
|
-
shadow
|
|
20
|
+
shadow = false
|
|
21
21
|
} = props;
|
|
22
22
|
const state = {
|
|
23
23
|
bordered,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Image/useImage.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;AACnG,QAAM;AAAE,IAAA,
|
|
1
|
+
{"version":3,"sources":["components/Image/useImage.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;AACnG,QAAM;AAAE,IAAA,QAAQ,GAAG,KAAb;AAAoB,IAAA,GAAG,GAAG,SAA1B;AAAqC,IAAA,KAAK,GAAG,KAA7C;AAAoD,IAAA,KAAK,GAAG,QAA5D;AAAsE,IAAA,MAAM,GAAG;AAA/E,MAAyF,KAA/F;AAEA,QAAM,KAAK,GAAe;AACxB,IAAA,QADwB;AAExB,IAAA,GAFwB;AAGxB,IAAA,KAHwB;AAIxB,IAAA,KAJwB;AAKxB,IAAA,MALwB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KANY;AASxB,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAA7B;AATkB,GAA1B;AAeA,SAAO,KAAP;AACD,CAnBM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { ImageProps, ImageState } from './Image.types';\n\n/**\n * Given user props, returns state and render function for an Image.\n */\nexport const useImage_unstable = (props: ImageProps, ref: React.Ref<HTMLImageElement>): ImageState => {\n const { bordered = false, fit = 'default', block = false, shape = 'square', shadow = false } = props;\n\n const state: ImageState = {\n bordered,\n fit,\n block,\n shape,\n shadow,\n components: {\n root: 'img',\n },\n root: getNativeElementProps('img', {\n ref,\n ...props,\n }),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-image",
|
|
3
|
-
"version": "9.0.0-rc.
|
|
3
|
+
"version": "9.0.0-rc.9",
|
|
4
4
|
"description": "Fluent UI React Image component.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
|
30
30
|
"@fluentui/react-conformance": "*",
|
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.6",
|
|
32
32
|
"@fluentui/scripts": "^1.0.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@griffel/react": "1.0.
|
|
36
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
|
37
|
-
"@fluentui/react-theme": "9.0.0-rc.
|
|
35
|
+
"@griffel/react": "1.0.5",
|
|
36
|
+
"@fluentui/react-utilities": "9.0.0-rc.9",
|
|
37
|
+
"@fluentui/react-theme": "9.0.0-rc.8",
|
|
38
38
|
"tslib": "^2.1.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|