@fluentui/react-image 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

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.
Files changed (47) hide show
  1. package/CHANGELOG.json +294 -16
  2. package/CHANGELOG.md +81 -10
  3. package/MIGRATION.md +235 -0
  4. package/README.md +4 -0
  5. package/dist/react-image.d.ts +8 -8
  6. package/lib/Image.js.map +1 -1
  7. package/lib/components/Image/Image.js +7 -7
  8. package/lib/components/Image/Image.js.map +1 -1
  9. package/lib/components/Image/Image.types.d.ts +4 -3
  10. package/lib/components/Image/Image.types.js.map +1 -1
  11. package/lib/components/Image/index.js.map +1 -1
  12. package/lib/components/Image/renderImage.d.ts +1 -1
  13. package/lib/components/Image/renderImage.js +7 -8
  14. package/lib/components/Image/renderImage.js.map +1 -1
  15. package/lib/components/Image/useImage.d.ts +2 -3
  16. package/lib/components/Image/useImage.js +18 -18
  17. package/lib/components/Image/useImage.js.map +1 -1
  18. package/lib/components/Image/useImageStyles.d.ts +2 -1
  19. package/lib/components/Image/useImageStyles.js +21 -10
  20. package/lib/components/Image/useImageStyles.js.map +1 -1
  21. package/lib/index.js.map +1 -1
  22. package/lib-commonjs/Image.js +1 -1
  23. package/lib-commonjs/Image.js.map +1 -1
  24. package/lib-commonjs/components/Image/Image.js +8 -8
  25. package/lib-commonjs/components/Image/Image.js.map +1 -1
  26. package/lib-commonjs/components/Image/Image.types.d.ts +4 -3
  27. package/lib-commonjs/components/Image/Image.types.js.map +1 -1
  28. package/lib-commonjs/components/Image/index.js +1 -1
  29. package/lib-commonjs/components/Image/index.js.map +1 -1
  30. package/lib-commonjs/components/Image/renderImage.d.ts +1 -1
  31. package/lib-commonjs/components/Image/renderImage.js +11 -14
  32. package/lib-commonjs/components/Image/renderImage.js.map +1 -1
  33. package/lib-commonjs/components/Image/useImage.d.ts +2 -3
  34. package/lib-commonjs/components/Image/useImage.js +22 -23
  35. package/lib-commonjs/components/Image/useImage.js.map +1 -1
  36. package/lib-commonjs/components/Image/useImageStyles.d.ts +2 -1
  37. package/lib-commonjs/components/Image/useImageStyles.js +25 -12
  38. package/lib-commonjs/components/Image/useImageStyles.js.map +1 -1
  39. package/lib-commonjs/index.js +1 -1
  40. package/lib-commonjs/index.js.map +1 -1
  41. package/package.json +9 -10
  42. package/lib/common/isConformant.d.ts +0 -4
  43. package/lib/common/isConformant.js +0 -13
  44. package/lib/common/isConformant.js.map +0 -1
  45. package/lib-commonjs/common/isConformant.d.ts +0 -4
  46. package/lib-commonjs/common/isConformant.js +0 -24
  47. package/lib-commonjs/common/isConformant.js.map +0 -1
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)
@@ -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 type ImageCommons = {
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: IntrinsicShorthandProps<'img'>;
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 renderImage: (state: ImageState) => JSX.Element;
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 useImage: (props: ImageProps, ref: React_2.Ref<HTMLImageElement>) => ImageState;
56
+ export declare const useImage_unstable: (props: ImageProps, ref: React_2.Ref<HTMLImageElement>) => ImageState;
57
57
 
58
- export declare const useImageStyles: (state: ImageState) => void;
58
+ export declare const useImageStyles_unstable: (state: ImageState) => void;
59
59
 
60
60
  export { }
package/lib/Image.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../src/Image.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"Image.js","sourceRoot":"../src/","sources":["Image.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Image/index';\n"]}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { renderImage } from './renderImage';
3
- import { useImage } from './useImage';
4
- import { useImageStyles } from './useImageStyles';
2
+ import { renderImage_unstable } from './renderImage';
3
+ import { useImage_unstable } from './useImage';
4
+ import { useImageStyles_unstable } from './useImageStyles';
5
5
  /**
6
6
  * The Image component ensures the consistent styling of images.
7
7
  */
8
8
 
9
- export var Image = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useImage(props, ref);
11
- useImageStyles(state);
12
- return renderImage(state);
9
+ export const Image = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useImage_unstable(props, ref);
11
+ useImageStyles_unstable(state);
12
+ return renderImage_unstable(state);
13
13
  });
14
14
  Image.displayName = 'Image';
15
15
  //# sourceMappingURL=Image.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,QAAT,QAAyB,YAAzB;AACA,SAAS,cAAT,QAA+B,kBAA/B;AAIA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAChF,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AACA,EAAA,cAAc,CAAC,KAAD,CAAd;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AAIA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;AACA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","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';\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 useImageStyles_unstable(state);\n\n return renderImage_unstable(state);\n});\n\nImage.displayName = 'Image';\n"],"sourceRoot":"../src/"}
@@ -1,8 +1,8 @@
1
- import type { ComponentState, ComponentProps, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities';
2
2
  export declare type ImageSlots = {
3
- root: IntrinsicShorthandProps<'img'>;
3
+ root: Slot<'img'>;
4
4
  };
5
- export declare type ImageCommons = {
5
+ declare type ImageCommons = {
6
6
  /**
7
7
  * An image can appear with rectangular border.
8
8
  */
@@ -27,3 +27,4 @@ export declare type ImageCommons = {
27
27
  };
28
28
  export declare type ImageProps = ComponentProps<ImageSlots> & Partial<ImageCommons>;
29
29
  export declare type ImageState = ComponentState<ImageSlots> & ImageCommons;
30
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Image.types.js","sourceRoot":"","sources":["../../../src/components/Image/Image.types.ts"],"names":[],"mappings":""}
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\ntype ImageCommons = {\n /**\n * An image can appear with rectangular border.\n */\n bordered?: boolean;\n\n /**\n * An image can set how it should be resized to fit its container.\n */\n fit?: 'none' | 'center' | 'contain' | 'cover';\n\n /**\n * An image can take up the width of its container.\n */\n block?: boolean;\n\n /**\n * An image can appear square, circular, or rounded.\n * @defaultvalue square\n */\n shape?: 'square' | 'circular' | 'rounded';\n\n /**\n * An image can appear elevated with shadow.\n */\n shadow?: boolean;\n};\n\nexport type ImageProps = ComponentProps<ImageSlots> & Partial<ImageCommons>;\n\nexport type ImageState = ComponentState<ImageSlots> & ImageCommons;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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"]}
@@ -3,4 +3,4 @@ import { ImageState } from './Image.types';
3
3
  * Define the render function.
4
4
  * Given the state of an image, renders it.
5
5
  */
6
- export declare const renderImage: (state: ImageState) => JSX.Element;
6
+ export declare const renderImage_unstable: (state: ImageState) => JSX.Element;
@@ -1,17 +1,16 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
- import { imageShorthandProps } from './useImage';
5
3
  /**
6
4
  * Define the render function.
7
5
  * Given the state of an image, renders it.
8
6
  */
9
7
 
10
- export var renderImage = function (state) {
11
- var _a = getSlots(state, imageShorthandProps),
12
- slots = _a.slots,
13
- slotProps = _a.slotProps;
14
-
15
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root));
8
+ export const renderImage_unstable = state => {
9
+ const {
10
+ slots,
11
+ slotProps
12
+ } = getSlots(state);
13
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
14
+ });
16
15
  };
17
16
  //# sourceMappingURL=renderImage.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Image/renderImage.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,mBAAT,QAAoC,YAApC;AAEA;;;AAGG;;AACH,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,QAAQ,CAAa,KAAb,EAAoB,mBAApB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Image/renderImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAAsB;AACxD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","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"],"sourceRoot":"../src/"}
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- import type { ImageProps, ImageSlots, ImageState } from './Image.types';
3
- export declare const imageShorthandProps: Array<keyof ImageSlots>;
2
+ import type { ImageProps, ImageState } from './Image.types';
4
3
  /**
5
4
  * Given user props, returns state and render function for an Image.
6
5
  */
7
- export declare const useImage: (props: ImageProps, ref: React.Ref<HTMLImageElement>) => ImageState;
6
+ export declare const useImage_unstable: (props: ImageProps, ref: React.Ref<HTMLImageElement>) => ImageState;
@@ -1,29 +1,29 @@
1
- import { __assign } from "tslib";
2
1
  import { getNativeElementProps } from '@fluentui/react-utilities';
3
- export var imageShorthandProps = ['root'];
4
2
  /**
5
3
  * Given user props, returns state and render function for an Image.
6
4
  */
7
5
 
8
- export var useImage = function (props, ref) {
9
- var bordered = props.bordered,
10
- fit = props.fit,
11
- block = props.block,
12
- _a = props.shape,
13
- shape = _a === void 0 ? 'square' : _a,
14
- shadow = props.shadow;
15
- var state = {
16
- bordered: bordered,
17
- fit: fit,
18
- block: block,
19
- shape: shape,
20
- shadow: shadow,
6
+ export const useImage_unstable = (props, ref) => {
7
+ const {
8
+ bordered,
9
+ fit,
10
+ block,
11
+ shape = 'square',
12
+ shadow
13
+ } = props;
14
+ const state = {
15
+ bordered,
16
+ fit,
17
+ block,
18
+ shape,
19
+ shadow,
21
20
  components: {
22
21
  root: 'img'
23
22
  },
24
- root: getNativeElementProps('img', __assign({
25
- ref: ref
26
- }, props))
23
+ root: getNativeElementProps('img', {
24
+ ref,
25
+ ...props
26
+ })
27
27
  };
28
28
  return state;
29
29
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Image/useImage.ts"],"names":[],"mappings":";AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA,OAAO,IAAM,mBAAmB,GAA4B,CAAC,MAAD,CAArD;AAEP;;AAEG;;AACH,OAAO,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAAoD;AAClE,MAAA,QAAQ,GAA2C,KAAK,CAAhD,QAAR;AAAA,MAAU,GAAG,GAAsC,KAAK,CAA3C,GAAb;AAAA,MAAe,KAAK,GAA+B,KAAK,CAApC,KAApB;AAAA,MAAsB,EAAA,GAA6B,KAAK,CAAlB,KAAtC;AAAA,MAAsB,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAAtC;AAAA,MAAwC,MAAM,GAAK,KAAK,CAAV,MAA9C;AAER,MAAM,KAAK,GAAe;AACxB,IAAA,QAAQ,EAAA,QADgB;AAExB,IAAA,GAAG,EAAA,GAFqB;AAGxB,IAAA,KAAK,EAAA,KAHmB;AAIxB,IAAA,KAAK,EAAA,KAJmB;AAKxB,IAAA,MAAM,EAAA,MALkB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KANY;AASxB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAM,QAAA,CAAA;AAC/B,MAAA,GAAG,EAAA;AAD4B,KAAA,EAE5B,KAF4B,CAAN;AATH,GAA1B;AAeA,SAAO,KAAP;AACD,CAnBM","sourceRoot":""}
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,QAAF;AAAY,IAAA,GAAZ;AAAiB,IAAA,KAAjB;AAAwB,IAAA,KAAK,GAAG,QAAhC;AAA0C,IAAA;AAA1C,MAAqD,KAA3D;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, fit, block, shape = 'square', shadow } = 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/"}
@@ -1,2 +1,3 @@
1
1
  import type { ImageState } from './Image.types';
2
- export declare const useImageStyles: (state: ImageState) => void;
2
+ export declare const imageClassName = "fui-Image";
3
+ export declare const useImageStyles_unstable: (state: ImageState) => void;
@@ -1,12 +1,17 @@
1
- import { mergeClasses, __styles } from '@fluentui/react-make-styles';
1
+ import { shorthands, mergeClasses, __styles } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const imageClassName = 'fui-Image';
2
4
 
3
- var useStyles = /*#__PURE__*/__styles({
5
+ const useStyles = /*#__PURE__*/__styles({
4
6
  "root": {
5
7
  "g2u3we": "fj3muxo",
6
8
  "h3c5rm": ["f1akhkt", "f1lxtadh"],
7
9
  "B9xav0g": "f1aperda",
8
10
  "zhjwy3": ["f1lxtadh", "f1akhkt"],
9
- "Dimara": "f1fabniw",
11
+ "Bbmb7ep": ["fzi6hpg", "fyowgf4"],
12
+ "Beyfa6y": ["fyowgf4", "fzi6hpg"],
13
+ "B7oj6ja": ["f3fg2lr", "f13av6d4"],
14
+ "Btl43ni": ["f13av6d4", "f3fg2lr"],
10
15
  "B7ck84d": "f1ewtqcl",
11
16
  "mc9l5x": "f14t3ns0"
12
17
  },
@@ -21,13 +26,19 @@ var useStyles = /*#__PURE__*/__styles({
21
26
  "ibv6hh": ["f1ojsxk5", "f5tn483"]
22
27
  },
23
28
  "rootCircular": {
24
- "Dimara": "f44lkw9"
29
+ "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
30
+ "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
31
+ "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
32
+ "Btl43ni": ["f1s8kh49", "f1djnp8u"]
25
33
  },
26
34
  "rootRounded": {
27
- "Dimara": "ft85np5"
35
+ "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
36
+ "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
37
+ "B7oj6ja": ["f1jar5jt", "fyu767a"],
38
+ "Btl43ni": ["fyu767a", "f1jar5jt"]
28
39
  },
29
40
  "rootShadow": {
30
- "E5pizo": ["f1whvlc6", "fzb35q0"]
41
+ "E5pizo": "f1whvlc6"
31
42
  },
32
43
  "rootFitNone": {
33
44
  "st4lth": "f1plgu50",
@@ -57,11 +68,11 @@ var useStyles = /*#__PURE__*/__styles({
57
68
  "a9b677": "fly5x3f"
58
69
  }
59
70
  }, {
60
- "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);}", ".f1fabniw{border-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);}", ".f44lkw9{border-radius:var(--borderRadiusCircular);}", ".ft85np5{border-radius:var(--borderRadiusMedium);}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".fzb35q0{box-shadow:var(--shadow-4);}", ".f1plgu50{object-fit:none;}", ".f13uwng7{object-position:left top;}", ".fjmyj0p{object-position:right top;}", ".f1l02sjl{height:100%;}", ".fly5x3f{width:100%;}", ".f14xojzb{object-position:center;}", ".f1ps3kmd{object-fit:cover;}", ".f1kle4es{object-fit:contain;}"]
71
+ "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;}", ".f13uwng7{object-position:left top;}", ".fjmyj0p{object-position:right top;}", ".f1l02sjl{height:100%;}", ".fly5x3f{width:100%;}", ".f14xojzb{object-position:center;}", ".f1ps3kmd{object-fit:cover;}", ".f1kle4es{object-fit:contain;}"]
61
72
  });
62
73
 
63
- export var useImageStyles = function (state) {
64
- var styles = useStyles();
65
- state.root.className = mergeClasses(styles.root, state.bordered && styles.rootBordered, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shadow && styles.rootShadow, state.fit === 'none' && styles.rootFitNone, state.fit === 'center' && styles.rootFitCenter, state.fit === 'cover' && styles.rootFitCover, state.fit === 'contain' && styles.rootFitContain, state.block && styles.rootBlock, state.root.className);
74
+ export const useImageStyles_unstable = state => {
75
+ const styles = useStyles();
76
+ state.root.className = mergeClasses(imageClassName, styles.root, state.bordered && styles.rootBordered, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shadow && styles.rootShadow, state.fit === 'none' && styles.rootFitNone, state.fit === 'center' && styles.rootFitCenter, state.fit === 'cover' && styles.rootFitCover, state.fit === 'contain' && styles.rootFitContain, state.block && styles.rootBlock, state.root.className);
66
77
  };
67
78
  //# sourceMappingURL=useImageStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Image/useImageStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;;AAGA,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAkDA,OAAO,IAAM,cAAc,GAAG,UAAC,KAAD,EAAkB;AAC9C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,MAAM,CAAC,IAD0B,EAEjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,YAFQ,EAGjC,KAAK,CAAC,KAAN,KAAgB,UAAhB,IAA8B,MAAM,CAAC,YAHJ,EAIjC,KAAK,CAAC,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,WAJH,EAKjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,UALU,EAMjC,KAAK,CAAC,GAAN,KAAc,MAAd,IAAwB,MAAM,CAAC,WANE,EAOjC,KAAK,CAAC,GAAN,KAAc,QAAd,IAA0B,MAAM,CAAC,aAPA,EAQjC,KAAK,CAAC,GAAN,KAAc,OAAd,IAAyB,MAAM,CAAC,YARC,EASjC,KAAK,CAAC,GAAN,KAAc,SAAd,IAA2B,MAAM,CAAC,cATD,EAUjC,KAAK,CAAC,KAAN,IAAe,MAAM,CAAC,SAVW,EAWjC,KAAK,CAAC,IAAN,CAAW,SAXsB,CAAnC;AAaD,CAfM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Image/useImageStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,cAAc,GAAG,WAAvB;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAkDA,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAsB;AAC3D,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,cADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,YAHQ,EAIjC,KAAK,CAAC,KAAN,KAAgB,UAAhB,IAA8B,MAAM,CAAC,YAJJ,EAKjC,KAAK,CAAC,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,WALH,EAMjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,UANU,EAOjC,KAAK,CAAC,GAAN,KAAc,MAAd,IAAwB,MAAM,CAAC,WAPE,EAQjC,KAAK,CAAC,GAAN,KAAc,QAAd,IAA0B,MAAM,CAAC,aARA,EASjC,KAAK,CAAC,GAAN,KAAc,OAAd,IAAyB,MAAM,CAAC,YATC,EAUjC,KAAK,CAAC,GAAN,KAAc,SAAd,IAA2B,MAAM,CAAC,cAVD,EAWjC,KAAK,CAAC,KAAN,IAAe,MAAM,CAAC,SAXW,EAYjC,KAAK,CAAC,IAAN,CAAW,SAZsB,CAAnC;AAcD,CAhBM","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ImageState } from './Image.types';\n\nexport const imageClassName = 'fui-Image';\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n\n boxSizing: 'border-box',\n display: 'inline-block',\n },\n rootBordered: {\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n },\n rootCircular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rootRounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n rootShadow: {\n boxShadow: tokens.shadow4,\n },\n rootFitNone: {\n objectFit: 'none',\n objectPosition: 'left top',\n height: '100%',\n width: '100%',\n },\n rootFitCenter: {\n objectFit: 'none',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n rootFitCover: {\n objectFit: 'cover',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n rootFitContain: {\n objectFit: 'contain',\n objectPosition: 'center',\n height: '100%',\n width: '100%',\n },\n rootBlock: {\n width: '100%',\n },\n});\n\nexport const useImageStyles_unstable = (state: ImageState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n imageClassName,\n styles.root,\n state.bordered && styles.rootBordered,\n state.shape === 'circular' && styles.rootCircular,\n state.shape === 'rounded' && styles.rootRounded,\n state.shadow && styles.rootShadow,\n state.fit === 'none' && styles.rootFitNone,\n state.fit === 'center' && styles.rootFitCenter,\n state.fit === 'cover' && styles.rootFitCover,\n state.fit === 'contain' && styles.rootFitContain,\n state.block && styles.rootBlock,\n state.root.className,\n );\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC","sourcesContent":["export * from './Image';\n"]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./components/Image/index"), exports);
10
10
  //# sourceMappingURL=Image.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Image.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["Image.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Image/index';\n"],"sourceRoot":"../src/"}
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Image = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var renderImage_1 = /*#__PURE__*/require("./renderImage");
10
+ const renderImage_1 = /*#__PURE__*/require("./renderImage");
11
11
 
12
- var useImage_1 = /*#__PURE__*/require("./useImage");
12
+ const useImage_1 = /*#__PURE__*/require("./useImage");
13
13
 
14
- var useImageStyles_1 = /*#__PURE__*/require("./useImageStyles");
14
+ const useImageStyles_1 = /*#__PURE__*/require("./useImageStyles");
15
15
  /**
16
16
  * The Image component ensures the consistent styling of images.
17
17
  */
18
18
 
19
19
 
20
- exports.Image = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
- var state = useImage_1.useImage(props, ref);
22
- useImageStyles_1.useImageStyles(state);
23
- return renderImage_1.renderImage(state);
20
+ exports.Image = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useImage_1.useImage_unstable(props, ref);
22
+ useImageStyles_1.useImageStyles_unstable(state);
23
+ return renderImage_1.renderImage_unstable(state);
24
24
  });
25
25
  exports.Image.displayName = 'Image';
26
26
  //# sourceMappingURL=Image.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Image/Image.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAChF,MAAM,KAAK,GAAG,UAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAAd;AACA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AAEA,SAAO,aAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Image/Image.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,UAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;AACA,EAAA,gBAAA,CAAA,uBAAA,CAAwB,KAAxB;AAEA,SAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","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';\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 useImageStyles_unstable(state);\n\n return renderImage_unstable(state);\n});\n\nImage.displayName = 'Image';\n"],"sourceRoot":"../src/"}
@@ -1,8 +1,8 @@
1
- import type { ComponentState, ComponentProps, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities';
2
2
  export declare type ImageSlots = {
3
- root: IntrinsicShorthandProps<'img'>;
3
+ root: Slot<'img'>;
4
4
  };
5
- export declare type ImageCommons = {
5
+ declare type ImageCommons = {
6
6
  /**
7
7
  * An image can appear with rectangular border.
8
8
  */
@@ -27,3 +27,4 @@ export declare type ImageCommons = {
27
27
  };
28
28
  export declare type ImageProps = ComponentProps<ImageSlots> & Partial<ImageCommons>;
29
29
  export declare type ImageState = ComponentState<ImageSlots> & ImageCommons;
30
+ export {};
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}