@fluentui/react-image 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.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 +11 -11
- package/CHANGELOG.md +8 -8
- package/lib/Image.js +1 -1
- package/lib/Image.js.map +1 -1
- package/lib/components/Image/Image.js +6 -6
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/Image.types.js.map +1 -1
- package/lib/components/Image/index.js +5 -5
- package/lib/components/Image/index.js.map +1 -1
- package/lib/components/Image/renderImage.js +5 -3
- package/lib/components/Image/renderImage.js.map +1 -1
- package/lib/components/Image/useImage.js +5 -6
- package/lib/components/Image/useImage.js.map +1 -1
- package/lib/components/Image/useImageStyles.js +3 -3
- package/lib/components/Image/useImageStyles.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Image.js +4 -5
- package/lib-commonjs/Image.js.map +1 -1
- package/lib-commonjs/components/Image/Image.js +20 -19
- package/lib-commonjs/components/Image/Image.js.map +1 -1
- package/lib-commonjs/components/Image/Image.types.js +2 -3
- package/lib-commonjs/components/Image/Image.types.js.map +1 -1
- package/lib-commonjs/components/Image/index.js +8 -9
- package/lib-commonjs/components/Image/index.js.map +1 -1
- package/lib-commonjs/components/Image/renderImage.js +19 -13
- package/lib-commonjs/components/Image/renderImage.js.map +1 -1
- package/lib-commonjs/components/Image/useImage.js +32 -27
- package/lib-commonjs/components/Image/useImage.js.map +1 -1
- package/lib-commonjs/components/Image/useImageStyles.js +80 -180
- package/lib-commonjs/components/Image/useImageStyles.js.map +1 -1
- package/lib-commonjs/index.js +33 -16
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -7
- package/.swcrc +0 -39
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui/react-image",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui/react-image_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Tue, 21 Mar 2023 04:49:57 GMT",
|
|
6
|
+
"tag": "@fluentui/react-image_v0.0.0-nightly-20230321-0440.1",
|
|
7
|
+
"version": "0.0.0-nightly-20230321-0440.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,26 +16,26 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui/react-image",
|
|
19
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230321-0440.1",
|
|
20
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"author": "beachball",
|
|
24
24
|
"package": "@fluentui/react-image",
|
|
25
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
26
|
-
"commit": "
|
|
25
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230321-0440.1",
|
|
26
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"author": "beachball",
|
|
30
30
|
"package": "@fluentui/react-image",
|
|
31
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
32
|
-
"commit": "
|
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230321-0440.1",
|
|
32
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"author": "beachball",
|
|
36
36
|
"package": "@fluentui/react-image",
|
|
37
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
38
|
-
"commit": "
|
|
37
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230321-0440.1",
|
|
38
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-image
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 21 Mar 2023 04:49:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20230321-0440.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v0.0.0-nightly-20230321-0440.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.1.1..@fluentui/react-image_v0.0.0-nightly-
|
|
9
|
+
Tue, 21 Mar 2023 04:49:57 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-image_v9.1.1..@fluentui/react-image_v0.0.0-nightly-20230321-0440.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
|
16
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
|
19
19
|
|
|
20
20
|
## [9.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-image_v9.1.1)
|
|
21
21
|
|
package/lib/Image.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './components/Image/index';
|
|
2
2
|
//# sourceMappingURL=Image.js.map
|
package/lib/Image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-image/src/Image.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Image/index';\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { renderImage_unstable } from
|
|
3
|
-
import { useImage_unstable } from
|
|
4
|
-
import { useImageStyles_unstable } from
|
|
5
|
-
import { useCustomStyleHooks_unstable } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { renderImage_unstable } from './renderImage';
|
|
3
|
+
import { useImage_unstable } from './useImage';
|
|
4
|
+
import { useImageStyles_unstable } from './useImageStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
6
6
|
/**
|
|
7
7
|
* The Image component ensures the consistent styling of images.
|
|
8
8
|
*/
|
|
@@ -15,5 +15,5 @@ export const Image = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
15
15
|
useCustomStyles(state);
|
|
16
16
|
return renderImage_unstable(state);
|
|
17
17
|
});
|
|
18
|
-
Image.displayName =
|
|
18
|
+
Image.displayName = 'Image';
|
|
19
19
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","renderImage_unstable","useImage_unstable","useImageStyles_unstable","useCustomStyleHooks_unstable","Image","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["
|
|
1
|
+
{"version":3,"names":["React","renderImage_unstable","useImage_unstable","useImageStyles_unstable","useCustomStyleHooks_unstable","Image","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/Image.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderImage_unstable } from './renderImage';\nimport { useImage_unstable } from './useImage';\nimport { useImageStyles_unstable } from './useImageStyles';\nimport type { ImageProps } from './Image.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The Image component ensures the consistent styling of images.\n */\nexport const Image: ForwardRefComponent<ImageProps> = React.forwardRef((props, ref) => {\n const state = useImage_unstable(props, ref);\n\n useImageStyles_unstable(state);\n\n const { useImageStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderImage_unstable(state);\n});\n\nImage.displayName = 'Image';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,uBAAuB,QAAQ,kBAAkB;AAG1D,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGP,iBAAiB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE3CL,uBAAuB,CAACM,KAAK,CAAC;EAE9B,MAAM;IAAEN,uBAAuB,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACnFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,oBAAoB,CAACQ,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,KAAK,CAACM,WAAW,GAAG,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Image.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-image/src/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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from './Image.types';
|
|
2
|
+
export * from './Image';
|
|
3
|
+
export * from './renderImage';
|
|
4
|
+
export * from './useImage';
|
|
5
|
+
export * from './useImageStyles';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Image.types';\nexport * from './Image';\nexport * from './renderImage';\nexport * from './useImage';\nexport * from './useImageStyles';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { getSlots } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Define the render function.
|
|
5
5
|
* Given the state of an image, renders it.
|
|
@@ -9,6 +9,8 @@ export const renderImage_unstable = state => {
|
|
|
9
9
|
slots,
|
|
10
10
|
slotProps
|
|
11
11
|
} = getSlots(state);
|
|
12
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, {
|
|
13
|
+
...slotProps.root
|
|
14
|
+
});
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=renderImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","getSlots","renderImage_unstable","state","slots","slotProps","createElement","root"],"sources":["
|
|
1
|
+
{"version":3,"names":["React","getSlots","renderImage_unstable","state","slots","slotProps","createElement","root"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/renderImage.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { ImageSlots, ImageState } from './Image.types';\n\n/**\n * Define the render function.\n * Given the state of an image, renders it.\n */\nexport const renderImage_unstable = (state: ImageState) => {\n const { slots, slotProps } = getSlots<ImageSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAaE,KAAK,CAAC;EAExD,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,EAAI;AAC3C,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getNativeElementProps } from "@fluentui/react-utilities";
|
|
1
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
3
2
|
/**
|
|
4
3
|
* Given user props, returns state and render function for an Image.
|
|
5
4
|
*/
|
|
6
5
|
export const useImage_unstable = (props, ref) => {
|
|
7
6
|
const {
|
|
8
7
|
bordered = false,
|
|
9
|
-
fit =
|
|
8
|
+
fit = 'default',
|
|
10
9
|
block = false,
|
|
11
|
-
shape =
|
|
10
|
+
shape = 'square',
|
|
12
11
|
shadow = false
|
|
13
12
|
} = props;
|
|
14
13
|
const state = {
|
|
@@ -18,9 +17,9 @@ export const useImage_unstable = (props, ref) => {
|
|
|
18
17
|
shape,
|
|
19
18
|
shadow,
|
|
20
19
|
components: {
|
|
21
|
-
root:
|
|
20
|
+
root: 'img'
|
|
22
21
|
},
|
|
23
|
-
root: getNativeElementProps(
|
|
22
|
+
root: getNativeElementProps('img', {
|
|
24
23
|
ref,
|
|
25
24
|
...props
|
|
26
25
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getNativeElementProps","useImage_unstable","props","ref","bordered","fit","block","shape","shadow","state","components","root"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/useImage.ts"],"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"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAGjE;;;AAGA,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,KAAiB,EAAEC,GAAgC,KAAgB;EACnG,MAAM;IAAEC,QAAQ,GAAG,KAAK;IAAEC,GAAG,GAAG,SAAS;IAAEC,KAAK,GAAG,KAAK;IAAEC,KAAK,GAAG,QAAQ;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGN,KAAK;EAEpG,MAAMO,KAAK,GAAe;IACxBL,QAAQ;IACRC,GAAG;IACHC,KAAK;IACLC,KAAK;IACLC,MAAM;IACNE,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEX,qBAAqB,CAAC,KAAK,EAAE;MACjCG,GAAG;MACH,GAAGD;KACJ;GACF;EAED,OAAOO,KAAK;AACd,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { shorthands, mergeClasses, __styles } from
|
|
2
|
-
import { tokens } from
|
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
3
|
export const imageClassNames = {
|
|
4
|
-
root:
|
|
4
|
+
root: 'fui-Image'
|
|
5
5
|
};
|
|
6
6
|
const useStyles = /*#__PURE__*/__styles({
|
|
7
7
|
base: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["shorthands","mergeClasses","__styles","tokens","imageClassNames","root","useStyles","base","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B7ck84d","mc9l5x","bordered","icvyot","vrafjx","oivjwe","wvpqe5","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","circular","rounded","square","shadow","E5pizo","center","st4lth","Ermj5k","Bqenvij","a9b677","contain","cover","none","block","d","useImageStyles_unstable","state","styles","className","fit","shape"],"sources":["
|
|
1
|
+
{"version":3,"names":["shorthands","mergeClasses","__styles","tokens","imageClassNames","root","useStyles","base","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B7ck84d","mc9l5x","bordered","icvyot","vrafjx","oivjwe","wvpqe5","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","circular","rounded","square","shadow","E5pizo","center","st4lth","Ermj5k","Bqenvij","a9b677","contain","cover","none","block","d","useImageStyles_unstable","state","styles","className","fit","shape"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/useImageStyles.ts"],"sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ImageSlots, ImageState } from './Image.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const imageClassNames: SlotClassNames<ImageSlots> = {\n root: 'fui-Image',\n};\n\nconst useStyles = makeStyles({\n // Base styles\n base: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n\n boxSizing: 'border-box',\n display: 'inline-block',\n },\n\n // Bordered styles\n bordered: {\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n },\n\n // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n square: {\n /* The square styles are exactly the same as the base styles. */\n },\n\n // Shadow styles\n shadow: {\n boxShadow: tokens.shadow4,\n },\n\n // Fit variations\n center: {\n objectFit: 'none',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n contain: {\n objectFit: 'contain',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n default: {\n /* The default styles are exactly the same as the base styles. */\n },\n cover: {\n objectFit: 'cover',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n none: {\n objectFit: 'none',\n objectPosition: 'left top',\n height: '100%',\n width: '100%',\n },\n\n // Block styles\n block: {\n width: '100%',\n },\n});\n\nexport const useImageStyles_unstable = (state: ImageState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n imageClassNames.root,\n styles.base,\n state.block && styles.block,\n state.bordered && styles.bordered,\n state.shadow && styles.shadow,\n styles[state.fit],\n styles[state.shape],\n state.root.className,\n );\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,eAAe,GAA+B;EACzDC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGJ,QAAA;EAAAK,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAf,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAa,OAAA;IAAAhB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAc,MAAA;EAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAJ,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAA;EAAAE,KAAA;IAAAL,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAG,IAAA;IAAAN,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAI,KAAA;IAAAJ,MAAA;EAAA;AAAA;EAAAK,CAAA;AAAA,EAiEhB;AAEF,OAAO,MAAMC,uBAAuB,GAAIC,KAAiB,IAAI;EAC3D,MAAMC,MAAM,GAAGtC,SAAS,EAAE;EAC1BqC,KAAK,CAACtC,IAAI,CAACwC,SAAS,GAAG5C,YAAY,CACjCG,eAAe,CAACC,IAAI,EACpBuC,MAAM,CAACrC,IAAI,EACXoC,KAAK,CAACH,KAAK,IAAII,MAAM,CAACJ,KAAK,EAC3BG,KAAK,CAACzB,QAAQ,IAAI0B,MAAM,CAAC1B,QAAQ,EACjCyB,KAAK,CAACb,MAAM,IAAIc,MAAM,CAACd,MAAM,EAC7Bc,MAAM,CAACD,KAAK,CAACG,GAAG,CAAC,EACjBF,MAAM,CAACD,KAAK,CAACI,KAAK,CAAC,EACnBJ,KAAK,CAACtC,IAAI,CAACwC,SAAS,CACrB;AACH,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Image, imageClassNames, renderImage_unstable, useImageStyles_unstable, useImage_unstable } from
|
|
1
|
+
export { Image, imageClassNames, renderImage_unstable, useImageStyles_unstable, useImage_unstable } from './Image';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-image/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export { Image, imageClassNames, renderImage_unstable, useImageStyles_unstable, useImage_unstable } from './Image';\nexport type { ImageProps, ImageSlots, ImageState } from './Image';\n"]}
|
package/lib-commonjs/Image.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
+
value: true
|
|
4
5
|
});
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=Image.js.map
|
|
8
|
-
|
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
7
|
+
tslib_1.__exportStar(require("./components/Image/index"), exports);
|
|
9
8
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../packages/react-components/react-image/src/Image.ts"],"sourcesContent":["export * from './components/Image/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "Image", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: ()=>Image
|
|
4
|
+
value: true
|
|
8
5
|
});
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
exports.Image = void 0;
|
|
7
|
+
const React = /*#__PURE__*/require("react");
|
|
8
|
+
const renderImage_1 = /*#__PURE__*/require("./renderImage");
|
|
9
|
+
const useImage_1 = /*#__PURE__*/require("./useImage");
|
|
10
|
+
const useImageStyles_1 = /*#__PURE__*/require("./useImageStyles");
|
|
11
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
12
|
+
/**
|
|
13
|
+
* The Image component ensures the consistent styling of images.
|
|
14
|
+
*/
|
|
15
|
+
exports.Image = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
16
|
+
const state = useImage_1.useImage_unstable(props, ref);
|
|
17
|
+
useImageStyles_1.useImageStyles_unstable(state);
|
|
18
|
+
const {
|
|
19
|
+
useImageStyles_unstable: useCustomStyles
|
|
20
|
+
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
|
21
|
+
useCustomStyles(state);
|
|
22
|
+
return renderImage_1.renderImage_unstable(state);
|
|
21
23
|
});
|
|
22
|
-
Image.displayName =
|
|
23
|
-
|
|
24
|
+
exports.Image.displayName = 'Image';
|
|
24
25
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["React","require","renderImage_1","useImage_1","useImageStyles_1","react_shared_contexts_1","exports","Image","forwardRef","props","ref","state","useImage_unstable","useImageStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderImage_unstable","displayName"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/Image.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderImage_unstable } from './renderImage';\nimport { useImage_unstable } from './useImage';\nimport { useImageStyles_unstable } from './useImageStyles';\nimport type { ImageProps } from './Image.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The Image component ensures the consistent styling of images.\n */\nexport const Image: ForwardRefComponent<ImageProps> = React.forwardRef((props, ref) => {\n const state = useImage_unstable(props, ref);\n\n useImageStyles_unstable(state);\n\n const { useImageStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderImage_unstable(state);\n});\n\nImage.displayName = 'Image';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,UAAA,gBAAAF,OAAA;AACA,MAAAG,gBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,KAAK,gBAAoCP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGR,UAAA,CAAAS,iBAAiB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE3CN,gBAAA,CAAAS,uBAAuB,CAACF,KAAK,CAAC;EAE9B,MAAM;IAAEE,uBAAuB,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACnFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOT,aAAA,CAAAc,oBAAoB,CAACL,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFL,OAAA,CAAAC,KAAK,CAACU,WAAW,GAAG,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/Image.types.ts"],"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"],"mappings":""}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
+
value: true
|
|
4
5
|
});
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
-
|
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
7
|
+
tslib_1.__exportStar(require("./Image.types"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./Image"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./renderImage"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./useImage"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./useImageStyles"), exports);
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/index.ts"],"sourcesContent":["export * from './Image.types';\nexport * from './Image';\nexport * from './renderImage';\nexport * from './useImage';\nexport * from './useImageStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,aAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,gBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "renderImage_unstable", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: ()=>renderImage_unstable
|
|
4
|
+
value: true
|
|
8
5
|
});
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
exports.renderImage_unstable = void 0;
|
|
7
|
+
const React = /*#__PURE__*/require("react");
|
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
9
|
+
/**
|
|
10
|
+
* Define the render function.
|
|
11
|
+
* Given the state of an image, renders it.
|
|
12
|
+
*/
|
|
13
|
+
const renderImage_unstable = state => {
|
|
14
|
+
const {
|
|
15
|
+
slots,
|
|
16
|
+
slotProps
|
|
17
|
+
} = react_utilities_1.getSlots(state);
|
|
18
|
+
return React.createElement(slots.root, {
|
|
19
|
+
...slotProps.root
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.renderImage_unstable = renderImage_unstable;
|
|
17
23
|
//# sourceMappingURL=renderImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderImage_unstable","state","slots","slotProps","getSlots","createElement","root","exports"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/renderImage.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { ImageSlots, ImageState } from './Image.types';\n\n/**\n * Define the render function.\n * Given the state of an image, renders it.\n */\nexport const renderImage_unstable = (state: ImageState) => {\n const { slots, slotProps } = getSlots<ImageSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;;AAIO,MAAME,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAaH,KAAK,CAAC;EAExD,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,OAAA,CAAAP,oBAAoB,GAAAA,oBAAA"}
|
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useImage_unstable", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: ()=>useImage_unstable
|
|
4
|
+
value: true
|
|
8
5
|
});
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
exports.useImage_unstable = void 0;
|
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Given user props, returns state and render function for an Image.
|
|
10
|
+
*/
|
|
11
|
+
const useImage_unstable = (props, ref) => {
|
|
12
|
+
const {
|
|
13
|
+
bordered = false,
|
|
14
|
+
fit = 'default',
|
|
15
|
+
block = false,
|
|
16
|
+
shape = 'square',
|
|
17
|
+
shadow = false
|
|
18
|
+
} = props;
|
|
19
|
+
const state = {
|
|
20
|
+
bordered,
|
|
21
|
+
fit,
|
|
22
|
+
block,
|
|
23
|
+
shape,
|
|
24
|
+
shadow,
|
|
25
|
+
components: {
|
|
26
|
+
root: 'img'
|
|
27
|
+
},
|
|
28
|
+
root: react_utilities_1.getNativeElementProps('img', {
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
35
|
+
exports.useImage_unstable = useImage_unstable;
|
|
31
36
|
//# sourceMappingURL=useImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["react_utilities_1","require","useImage_unstable","props","ref","bordered","fit","block","shape","shadow","state","components","root","getNativeElementProps","exports"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/useImage.ts"],"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"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;AAGO,MAAMC,iBAAiB,GAAGA,CAACC,KAAiB,EAAEC,GAAgC,KAAgB;EACnG,MAAM;IAAEC,QAAQ,GAAG,KAAK;IAAEC,GAAG,GAAG,SAAS;IAAEC,KAAK,GAAG,KAAK;IAAEC,KAAK,GAAG,QAAQ;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGN,KAAK;EAEpG,MAAMO,KAAK,GAAe;IACxBL,QAAQ;IACRC,GAAG;IACHC,KAAK;IACLC,KAAK;IACLC,MAAM;IACNE,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEZ,iBAAA,CAAAa,qBAAqB,CAAC,KAAK,EAAE;MACjCT,GAAG;MACH,GAAGD;KACJ;GACF;EAED,OAAOO,KAAK;AACd,CAAC;AAnBYI,OAAA,CAAAZ,iBAAiB,GAAAA,iBAAA"}
|
|
@@ -1,187 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
imageClassNames: ()=>imageClassNames,
|
|
13
|
-
useImageStyles_unstable: ()=>useImageStyles_unstable
|
|
4
|
+
value: true
|
|
14
5
|
});
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
6
|
+
exports.useImageStyles_unstable = exports.imageClassNames = void 0;
|
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
8
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
9
|
+
exports.imageClassNames = {
|
|
10
|
+
root: 'fui-Image'
|
|
18
11
|
};
|
|
19
|
-
const useStyles = /*#__PURE__*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"f1s8kh49",
|
|
87
|
-
"f1djnp8u"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
rounded: {
|
|
91
|
-
Bbmb7ep: [
|
|
92
|
-
"f1aa9q02",
|
|
93
|
-
"f16jpd5f"
|
|
94
|
-
],
|
|
95
|
-
Beyfa6y: [
|
|
96
|
-
"f16jpd5f",
|
|
97
|
-
"f1aa9q02"
|
|
98
|
-
],
|
|
99
|
-
B7oj6ja: [
|
|
100
|
-
"f1jar5jt",
|
|
101
|
-
"fyu767a"
|
|
102
|
-
],
|
|
103
|
-
Btl43ni: [
|
|
104
|
-
"fyu767a",
|
|
105
|
-
"f1jar5jt"
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
square: {},
|
|
109
|
-
shadow: {
|
|
110
|
-
E5pizo: "f1whvlc6"
|
|
111
|
-
},
|
|
112
|
-
center: {
|
|
113
|
-
st4lth: "f1plgu50",
|
|
114
|
-
Ermj5k: "f14xojzb",
|
|
115
|
-
Bqenvij: "f1l02sjl",
|
|
116
|
-
a9b677: "fly5x3f"
|
|
117
|
-
},
|
|
118
|
-
contain: {
|
|
119
|
-
st4lth: "f1kle4es",
|
|
120
|
-
Ermj5k: "f14xojzb",
|
|
121
|
-
Bqenvij: "f1l02sjl",
|
|
122
|
-
a9b677: "fly5x3f"
|
|
123
|
-
},
|
|
124
|
-
"default": {},
|
|
125
|
-
cover: {
|
|
126
|
-
st4lth: "f1ps3kmd",
|
|
127
|
-
Ermj5k: "f14xojzb",
|
|
128
|
-
Bqenvij: "f1l02sjl",
|
|
129
|
-
a9b677: "fly5x3f"
|
|
130
|
-
},
|
|
131
|
-
none: {
|
|
132
|
-
st4lth: "f1plgu50",
|
|
133
|
-
Ermj5k: [
|
|
134
|
-
"f13uwng7",
|
|
135
|
-
"fjmyj0p"
|
|
136
|
-
],
|
|
137
|
-
Bqenvij: "f1l02sjl",
|
|
138
|
-
a9b677: "fly5x3f"
|
|
139
|
-
},
|
|
140
|
-
block: {
|
|
141
|
-
a9b677: "fly5x3f"
|
|
142
|
-
}
|
|
12
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
13
|
+
base: {
|
|
14
|
+
g2u3we: "fj3muxo",
|
|
15
|
+
h3c5rm: ["f1akhkt", "f1lxtadh"],
|
|
16
|
+
B9xav0g: "f1aperda",
|
|
17
|
+
zhjwy3: ["f1lxtadh", "f1akhkt"],
|
|
18
|
+
Bbmb7ep: ["fzi6hpg", "fyowgf4"],
|
|
19
|
+
Beyfa6y: ["fyowgf4", "fzi6hpg"],
|
|
20
|
+
B7oj6ja: ["f3fg2lr", "f13av6d4"],
|
|
21
|
+
Btl43ni: ["f13av6d4", "f3fg2lr"],
|
|
22
|
+
B7ck84d: "f1ewtqcl",
|
|
23
|
+
mc9l5x: "f14t3ns0"
|
|
24
|
+
},
|
|
25
|
+
bordered: {
|
|
26
|
+
icvyot: "fzkkow9",
|
|
27
|
+
vrafjx: ["fcdblym", "fjik90z"],
|
|
28
|
+
oivjwe: "fg706s2",
|
|
29
|
+
wvpqe5: ["fjik90z", "fcdblym"],
|
|
30
|
+
B4j52fo: "f192inf7",
|
|
31
|
+
Bekrc4i: ["f5tn483", "f1ojsxk5"],
|
|
32
|
+
Bn0qgzm: "f1vxd6vx",
|
|
33
|
+
ibv6hh: ["f1ojsxk5", "f5tn483"]
|
|
34
|
+
},
|
|
35
|
+
circular: {
|
|
36
|
+
Bbmb7ep: ["f8fbkgy", "f1nfllo7"],
|
|
37
|
+
Beyfa6y: ["f1nfllo7", "f8fbkgy"],
|
|
38
|
+
B7oj6ja: ["f1djnp8u", "f1s8kh49"],
|
|
39
|
+
Btl43ni: ["f1s8kh49", "f1djnp8u"]
|
|
40
|
+
},
|
|
41
|
+
rounded: {
|
|
42
|
+
Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
|
|
43
|
+
Beyfa6y: ["f16jpd5f", "f1aa9q02"],
|
|
44
|
+
B7oj6ja: ["f1jar5jt", "fyu767a"],
|
|
45
|
+
Btl43ni: ["fyu767a", "f1jar5jt"]
|
|
46
|
+
},
|
|
47
|
+
square: {},
|
|
48
|
+
shadow: {
|
|
49
|
+
E5pizo: "f1whvlc6"
|
|
50
|
+
},
|
|
51
|
+
center: {
|
|
52
|
+
st4lth: "f1plgu50",
|
|
53
|
+
Ermj5k: "f14xojzb",
|
|
54
|
+
Bqenvij: "f1l02sjl",
|
|
55
|
+
a9b677: "fly5x3f"
|
|
56
|
+
},
|
|
57
|
+
contain: {
|
|
58
|
+
st4lth: "f1kle4es",
|
|
59
|
+
Ermj5k: "f14xojzb",
|
|
60
|
+
Bqenvij: "f1l02sjl",
|
|
61
|
+
a9b677: "fly5x3f"
|
|
62
|
+
},
|
|
63
|
+
"default": {},
|
|
64
|
+
cover: {
|
|
65
|
+
st4lth: "f1ps3kmd",
|
|
66
|
+
Ermj5k: "f14xojzb",
|
|
67
|
+
Bqenvij: "f1l02sjl",
|
|
68
|
+
a9b677: "fly5x3f"
|
|
69
|
+
},
|
|
70
|
+
none: {
|
|
71
|
+
st4lth: "f1plgu50",
|
|
72
|
+
Ermj5k: ["f13uwng7", "fjmyj0p"],
|
|
73
|
+
Bqenvij: "f1l02sjl",
|
|
74
|
+
a9b677: "fly5x3f"
|
|
75
|
+
},
|
|
76
|
+
block: {
|
|
77
|
+
a9b677: "fly5x3f"
|
|
78
|
+
}
|
|
143
79
|
}, {
|
|
144
|
-
|
|
145
|
-
".fj3muxo{border-top-color:var(--colorNeutralStroke1);}",
|
|
146
|
-
".f1akhkt{border-right-color:var(--colorNeutralStroke1);}",
|
|
147
|
-
".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}",
|
|
148
|
-
".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}",
|
|
149
|
-
".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",
|
|
150
|
-
".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",
|
|
151
|
-
".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",
|
|
152
|
-
".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",
|
|
153
|
-
".f1ewtqcl{box-sizing:border-box;}",
|
|
154
|
-
".f14t3ns0{display:inline-block;}",
|
|
155
|
-
".fzkkow9{border-top-style:solid;}",
|
|
156
|
-
".fcdblym{border-right-style:solid;}",
|
|
157
|
-
".fjik90z{border-left-style:solid;}",
|
|
158
|
-
".fg706s2{border-bottom-style:solid;}",
|
|
159
|
-
".f192inf7{border-top-width:var(--strokeWidthThin);}",
|
|
160
|
-
".f5tn483{border-right-width:var(--strokeWidthThin);}",
|
|
161
|
-
".f1ojsxk5{border-left-width:var(--strokeWidthThin);}",
|
|
162
|
-
".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}",
|
|
163
|
-
".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}",
|
|
164
|
-
".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}",
|
|
165
|
-
".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}",
|
|
166
|
-
".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}",
|
|
167
|
-
".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
|
168
|
-
".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
|
169
|
-
".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
|
|
170
|
-
".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
|
|
171
|
-
".f1whvlc6{box-shadow:var(--shadow4);}",
|
|
172
|
-
".f1plgu50{object-fit:none;}",
|
|
173
|
-
".f14xojzb{object-position:center;}",
|
|
174
|
-
".f1l02sjl{height:100%;}",
|
|
175
|
-
".fly5x3f{width:100%;}",
|
|
176
|
-
".f1kle4es{object-fit:contain;}",
|
|
177
|
-
".f1ps3kmd{object-fit:cover;}",
|
|
178
|
-
".f13uwng7{object-position:left top;}",
|
|
179
|
-
".fjmyj0p{object-position:right top;}"
|
|
180
|
-
]
|
|
80
|
+
d: [".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f1ewtqcl{box-sizing:border-box;}", ".f14t3ns0{display:inline-block;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".f1plgu50{object-fit:none;}", ".f14xojzb{object-position:center;}", ".f1l02sjl{height:100%;}", ".fly5x3f{width:100%;}", ".f1kle4es{object-fit:contain;}", ".f1ps3kmd{object-fit:cover;}", ".f13uwng7{object-position:left top;}", ".fjmyj0p{object-position:right top;}"]
|
|
181
81
|
});
|
|
182
|
-
const useImageStyles_unstable =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
186
|
-
|
|
82
|
+
const useImageStyles_unstable = state => {
|
|
83
|
+
const styles = useStyles();
|
|
84
|
+
state.root.className = react_1.mergeClasses(exports.imageClassNames.root, styles.base, state.block && styles.block, state.bordered && styles.bordered, state.shadow && styles.shadow, styles[state.fit], styles[state.shape], state.root.className);
|
|
85
|
+
};
|
|
86
|
+
exports.useImageStyles_unstable = useImageStyles_unstable;
|
|
187
87
|
//# sourceMappingURL=useImageStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["react_1","require","react_theme_1","exports","imageClassNames","root","useStyles","__styles","base","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B7ck84d","mc9l5x","bordered","icvyot","vrafjx","oivjwe","wvpqe5","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","circular","rounded","square","shadow","E5pizo","center","st4lth","Ermj5k","Bqenvij","a9b677","contain","cover","none","block","d","useImageStyles_unstable","state","styles","className","mergeClasses","fit","shape"],"sources":["../../../../../../../../../packages/react-components/react-image/src/components/Image/useImageStyles.ts"],"sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ImageSlots, ImageState } from './Image.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const imageClassNames: SlotClassNames<ImageSlots> = {\n root: 'fui-Image',\n};\n\nconst useStyles = makeStyles({\n // Base styles\n base: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n\n boxSizing: 'border-box',\n display: 'inline-block',\n },\n\n // Bordered styles\n bordered: {\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n },\n\n // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n square: {\n /* The square styles are exactly the same as the base styles. */\n },\n\n // Shadow styles\n shadow: {\n boxShadow: tokens.shadow4,\n },\n\n // Fit variations\n center: {\n objectFit: 'none',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n contain: {\n objectFit: 'contain',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n default: {\n /* The default styles are exactly the same as the base styles. */\n },\n cover: {\n objectFit: 'cover',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n none: {\n objectFit: 'none',\n objectPosition: 'left top',\n height: '100%',\n width: '100%',\n },\n\n // Block styles\n block: {\n width: '100%',\n },\n});\n\nexport const useImageStyles_unstable = (state: ImageState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n imageClassNames.root,\n styles.base,\n state.block && styles.block,\n state.bordered && styles.bordered,\n state.shadow && styles.shadow,\n styles[state.fit],\n styles[state.shape],\n state.root.className,\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AAIaE,OAAA,CAAAC,eAAe,GAA+B;EACzDC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGN,OAAA,CAAAO,QAAU;EAAAC,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAf,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAa,OAAA;IAAAhB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAc,MAAA;EAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAJ,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAA;EAAAE,KAAA;IAAAL,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAG,IAAA;IAAAN,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAI,KAAA;IAAAJ,MAAA;EAAA;AAAA;EAAAK,CAAA;AAAA,EAiE1B;AAEK,MAAMC,uBAAuB,GAAIC,KAAiB,IAAI;EAC3D,MAAMC,MAAM,GAAGvC,SAAS,EAAE;EAC1BsC,KAAK,CAACvC,IAAI,CAACyC,SAAS,GAAG9C,OAAA,CAAA+C,YAAY,CACjC5C,OAAA,CAAAC,eAAe,CAACC,IAAI,EACpBwC,MAAM,CAACrC,IAAI,EACXoC,KAAK,CAACH,KAAK,IAAII,MAAM,CAACJ,KAAK,EAC3BG,KAAK,CAACzB,QAAQ,IAAI0B,MAAM,CAAC1B,QAAQ,EACjCyB,KAAK,CAACb,MAAM,IAAIc,MAAM,CAACd,MAAM,EAC7Bc,MAAM,CAACD,KAAK,CAACI,GAAG,CAAC,EACjBH,MAAM,CAACD,KAAK,CAACK,KAAK,CAAC,EACnBL,KAAK,CAACvC,IAAI,CAACyC,SAAS,CACrB;AACH,CAAC;AAZY3C,OAAA,CAAAwC,uBAAuB,GAAAA,uBAAA"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
+
value: true
|
|
4
5
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
exports.useImage_unstable = exports.useImageStyles_unstable = exports.renderImage_unstable = exports.imageClassNames = exports.Image = void 0;
|
|
7
|
+
var Image_1 = /*#__PURE__*/require("./Image");
|
|
8
|
+
Object.defineProperty(exports, "Image", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return Image_1.Image;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "imageClassNames", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return Image_1.imageClassNames;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "renderImage_unstable", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return Image_1.renderImage_unstable;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "useImageStyles_unstable", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return Image_1.useImageStyles_unstable;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "useImage_unstable", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return Image_1.useImage_unstable;
|
|
36
|
+
}
|
|
17
37
|
});
|
|
18
|
-
const _image = require("./Image");
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
-
|
|
21
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"names":["Image_1","require","Object","defineProperty","exports","enumerable","get","Image","imageClassNames","renderImage_unstable","useImageStyles_unstable","useImage_unstable"],"sources":["../../../../../../../packages/react-components/react-image/src/index.ts"],"sourcesContent":["export { Image, imageClassNames, renderImage_unstable, useImageStyles_unstable, useImage_unstable } from './Image';\nexport type { ImageProps, ImageSlots, ImageState } from './Image';\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAO,KAAK;EAAA;AAAA;AAAEL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAQ,eAAe;EAAA;AAAA;AAAEN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAS,oBAAoB;EAAA;AAAA;AAAEP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAU,uBAAuB;EAAA;AAAA;AAAER,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAW,iBAAiB;EAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-image",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20230321-0440.1",
|
|
4
4
|
"description": "Fluent UI React Image component.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"test": "jest --passWithNoTests",
|
|
23
23
|
"storybook": "start-storybook",
|
|
24
24
|
"type-check": "tsc -b tsconfig.json",
|
|
25
|
-
"generate-api": "just-scripts
|
|
25
|
+
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
|
29
29
|
"@fluentui/react-conformance": "*",
|
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230321-0440.1",
|
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@griffel/react": "^1.5.2",
|
|
36
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
37
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
38
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
39
|
-
"
|
|
36
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230321-0440.1",
|
|
37
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230321-0440.1",
|
|
38
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230321-0440.1",
|
|
39
|
+
"tslib": "^2.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@types/react": ">=16.8.0 <19.0.0",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"exports": {
|
|
49
49
|
".": {
|
|
50
50
|
"types": "./dist/index.d.ts",
|
|
51
|
+
"node": "./lib-commonjs/index.js",
|
|
51
52
|
"import": "./lib/index.js",
|
|
52
53
|
"require": "./lib-commonjs/index.js"
|
|
53
54
|
},
|
package/.swcrc
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
|
3
|
-
"env": {
|
|
4
|
-
"targets": {
|
|
5
|
-
"chrome": "84",
|
|
6
|
-
"edge": "84",
|
|
7
|
-
"firefox": "75",
|
|
8
|
-
"opera": "73",
|
|
9
|
-
"safari": "14.1"
|
|
10
|
-
},
|
|
11
|
-
"bugfixes": true
|
|
12
|
-
},
|
|
13
|
-
"exclude": [
|
|
14
|
-
"/testing",
|
|
15
|
-
"/**/*.cy.ts",
|
|
16
|
-
"/**/*.cy.tsx",
|
|
17
|
-
"/**/*.spec.ts",
|
|
18
|
-
"/**/*.spec.tsx",
|
|
19
|
-
"/**/*.test.ts",
|
|
20
|
-
"/**/*.test.tsx"
|
|
21
|
-
],
|
|
22
|
-
"jsc": {
|
|
23
|
-
"parser": {
|
|
24
|
-
"syntax": "typescript",
|
|
25
|
-
"tsx": true,
|
|
26
|
-
"decorators": false,
|
|
27
|
-
"dynamicImport": false
|
|
28
|
-
},
|
|
29
|
-
"externalHelpers": true,
|
|
30
|
-
"transform": {
|
|
31
|
-
"react": {
|
|
32
|
-
"runtime": "classic",
|
|
33
|
-
"useSpread": true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"minify": false,
|
|
38
|
-
"sourceMaps": true
|
|
39
|
-
}
|