Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

2698
node_modules/@fluentui/react-image/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

15
node_modules/@fluentui/react-image/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,15 @@
@fluentui/react-image
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license

39
node_modules/@fluentui/react-image/README.md generated vendored Normal file
View File

@@ -0,0 +1,39 @@
# @fluentui/react-image
**Image components for [Fluent UI React](https://react.fluentui.dev/)**
Usage of Image component ensures consistent styling and behaviour of images in your application based on the Fluent UI Design System.
## Usage
To import Image:
```js
import { Image } from '@fluentui/react-components';
```
### Examples
```jsx
<Image src="example_image.png" />
<Image src="example_image.png" alt="Example image" />;
<Image src="example_image.png" bordered />;
<Image src="example_image.png" fit="contain" />;
<Image src="example_image.png" shadow />;
<Image src="example_image.png" shape="circular" />;
```
See [Fluent UI Storybook](https://react.fluentui.dev/) for more detailed usage examples.
Alternatively, run Storybook locally with:
1. `yarn start`
2. Select `react-image` from the list.
### Specification
See [SPEC.md](./SPEC.md).
## Migration
If you're upgrading to Fluent UI v9 see [MIGRATION.md](./MIGRATION.md) for guidance on updating to the latest Image implementation.

89
node_modules/@fluentui/react-image/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,89 @@
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { JSXElement } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';
/**
* The Image component ensures the consistent styling of images.
*/
declare const Image_2: ForwardRefComponent<ImageProps>;
export { Image_2 as Image }
/**
* Image props without design-specific props (shape, shadow, bordered, fit).
* Use this when building a base image that is unstyled or uses a custom design system.
*/
export declare type ImageBaseProps = ComponentProps<ImageSlots>;
/**
* Image state without design-specific state (shape, shadow, bordered, fit).
*/
export declare type ImageBaseState = ComponentState<ImageSlots>;
export declare const imageClassNames: SlotClassNames<ImageSlots>;
export declare type ImageProps = ComponentProps<ImageSlots> & {
/**
* An image can take up the width of its container.
*
* @default false
*/
block?: boolean;
/**
* An image can appear with a rectangular border.
*
* @default false
*/
bordered?: boolean;
/**
* An image can set how it should be resized to fit its container.
*
* @default 'default'
*/
fit?: 'none' | 'center' | 'contain' | 'cover' | 'default';
/**
* An image can appear elevated with shadow.
*
* @default false
*/
shadow?: boolean;
/**
* An image can appear square, circular, or rounded.
*
* @default 'square'
*/
shape?: 'square' | 'circular' | 'rounded';
};
export declare type ImageSlots = {
root: Slot<'img'>;
};
export declare type ImageState = ComponentState<ImageSlots> & Required<Pick<ImageProps, 'block' | 'bordered' | 'fit' | 'shadow' | 'shape'>>;
/**
* Define the render function.
* Given the state of an image, renders it.
*/
export declare const renderImage_unstable: (state: ImageBaseState) => JSXElement;
/**
* Given user props, returns state and render function for an Image.
*/
export declare const useImage_unstable: (props: ImageProps, ref: React_2.Ref<HTMLImageElement>) => ImageState;
/**
* Base hook for Image component, which manages state related to slot structure.
* This hook excludes design props (shape, shadow, bordered, fit).
*
* @param props - User provided props to the Image component.
* @param ref - User provided ref to be passed to the Image component.
*/
export declare const useImageBase_unstable: (props: ImageBaseProps, ref: React_2.Ref<HTMLImageElement>) => ImageBaseState;
export declare const useImageStyles_unstable: (state: ImageState) => ImageState;
export { }

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Image: function() {
return _index.Image;
},
imageClassNames: function() {
return _index.imageClassNames;
},
renderImage_unstable: function() {
return _index.renderImage_unstable;
},
useImageBase_unstable: function() {
return _index.useImageBase_unstable;
},
useImageStyles_unstable: function() {
return _index.useImageStyles_unstable;
},
useImage_unstable: function() {
return _index.useImage_unstable;
}
});
const _index = require("./components/Image/index");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/Image.ts"],"sourcesContent":["export type { ImageProps, ImageSlots, ImageState, ImageBaseProps, ImageBaseState } from './components/Image/index';\nexport {\n Image,\n imageClassNames,\n renderImage_unstable,\n useImageStyles_unstable,\n useImage_unstable,\n useImageBase_unstable,\n} from './components/Image/index';\n"],"names":["Image","imageClassNames","renderImage_unstable","useImageStyles_unstable","useImage_unstable","useImageBase_unstable"],"mappings":";;;;;;;;;;;;eAEEA,YAAK;;;eACLC,sBAAe;;;eACfC,2BAAoB;;;eAGpBG,4BAAqB;;;eAFrBF,8BAAuB;;;eACvBC,wBAAiB;;;uBAEZ,2BAA2B"}

View File

@@ -0,0 +1,24 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Image", {
enumerable: true,
get: function() {
return Image;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _renderImage = require("./renderImage");
const _useImage = require("./useImage");
const _useImageStylesstyles = require("./useImageStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const Image = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useImage.useImage_unstable)(props, ref);
(0, _useImageStylesstyles.useImageStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useImageStyles_unstable')(state);
return (0, _renderImage.renderImage_unstable)(state);
});
Image.displayName = 'Image';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/Image.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderImage_unstable } from './renderImage';\nimport { useImage_unstable } from './useImage';\nimport { useImageStyles_unstable } from './useImageStyles.styles';\nimport type { ImageProps } from './Image.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useImageStyles_unstable')(state);\n\n return renderImage_unstable(state);\n});\n\nImage.displayName = 'Image';\n"],"names":["React","renderImage_unstable","useImage_unstable","useImageStyles_unstable","useCustomStyleHook_unstable","Image","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BACM,gBAAgB;0BACnB,aAAa;sCACP,0BAA0B;qCAGtB,kCAAkC;AAKvE,MAAMK,QAAAA,WAAAA,GAAyCL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,YAAQP,2BAAAA,EAAkBK,OAAOC;QAEvCL,6CAAAA,EAAwBM;QAExBL,gDAAAA,EAA4B,2BAA2BK;IAEvD,WAAOR,iCAAAA,EAAqBQ;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}

View File

@@ -0,0 +1,6 @@
/**
* Image state without design-specific state (shape, shadow, bordered, fit).
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../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\n/**\n * Image props without design-specific props (shape, shadow, bordered, fit).\n * Use this when building a base image that is unstyled or uses a custom design system.\n */\nexport type ImageBaseProps = ComponentProps<ImageSlots>;\n\nexport type ImageState = ComponentState<ImageSlots> &\n Required<Pick<ImageProps, 'block' | 'bordered' | 'fit' | 'shadow' | 'shape'>>;\n\n/**\n * Image state without design-specific state (shape, shadow, bordered, fit).\n */\nexport type ImageBaseState = ComponentState<ImageSlots>;\n"],"names":[],"mappings":"AAoDA;;CAEC,GACD,WAAwD"}

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Image: function() {
return _Image.Image;
},
imageClassNames: function() {
return _useImageStylesstyles.imageClassNames;
},
renderImage_unstable: function() {
return _renderImage.renderImage_unstable;
},
useImageBase_unstable: function() {
return _useImage.useImageBase_unstable;
},
useImageStyles_unstable: function() {
return _useImageStylesstyles.useImageStyles_unstable;
},
useImage_unstable: function() {
return _useImage.useImage_unstable;
}
});
const _Image = require("./Image");
const _renderImage = require("./renderImage");
const _useImage = require("./useImage");
const _useImageStylesstyles = require("./useImageStyles.styles");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/index.ts"],"sourcesContent":["export type { ImageBaseProps, ImageBaseState, ImageProps, ImageSlots, ImageState } from './Image.types';\nexport { Image } from './Image';\nexport { renderImage_unstable } from './renderImage';\nexport { useImage_unstable, useImageBase_unstable } from './useImage';\nexport { imageClassNames, useImageStyles_unstable } from './useImageStyles.styles';\n"],"names":["Image","renderImage_unstable","useImage_unstable","useImageBase_unstable","imageClassNames","useImageStyles_unstable"],"mappings":";;;;;;;;;;;;eACSA,YAAK;;;eAGLI,qCAAe;;;eAFfH,iCAAoB;;;eACDE,+BAAqB;;;eACvBE,6CAAuB;;;eADxCH,2BAAiB;;;uBAFJ,UAAU;6BACK,gBAAgB;0BACI,aAAa;sCACb,0BAA0B"}

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderImage_unstable", {
enumerable: true,
get: function() {
return renderImage_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderImage_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/renderImage.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { ImageSlots, ImageBaseState } 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: ImageBaseState): JSXElement => {\n assertSlots<ImageSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderImage_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCAErB,4BAA4B;AAQjD,MAAMC,uBAAuB,CAACC;QACnCF,2BAAAA,EAAwBE;IAExB,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}

View File

@@ -0,0 +1,47 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
useImageBase_unstable: function() {
return useImageBase_unstable;
},
useImage_unstable: function() {
return useImage_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const useImage_unstable = (props, ref)=>{
const { bordered = false, block = false, fit = 'default', shadow = false, shape = 'square', ...imageProps } = props;
const state = useImageBase_unstable(imageProps, ref);
return {
bordered,
block,
fit,
shadow,
shape,
...state
};
};
const useImageBase_unstable = (props, ref)=>{
return {
components: {
root: 'img'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('img', {
ref,
...props
}), {
elementType: 'img'
})
};
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/useImage.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ImageBaseProps, ImageBaseState, 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, block = false, fit = 'default', shadow = false, shape = 'square', ...imageProps } = props;\n const state = useImageBase_unstable(imageProps, ref);\n\n return {\n bordered,\n block,\n fit,\n shadow,\n shape,\n ...state,\n };\n};\n\n/**\n * Base hook for Image component, which manages state related to slot structure.\n * This hook excludes design props (shape, shadow, bordered, fit).\n *\n * @param props - User provided props to the Image component.\n * @param ref - User provided ref to be passed to the Image component.\n */\nexport const useImageBase_unstable = (props: ImageBaseProps, ref: React.Ref<HTMLImageElement>): ImageBaseState => {\n return {\n components: {\n root: 'img',\n },\n root: slot.always(\n getIntrinsicElementProps('img', {\n ref,\n ...props,\n }),\n { elementType: 'img' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useImage_unstable","props","ref","bordered","block","fit","shadow","shape","imageProps","state","useImageBase_unstable","components","root","always","elementType"],"mappings":"AAAA;;;;;;;;;;;;IA8Baa,qBAAAA;;;qBArBAV;;;;;iEAPU,QAAQ;gCACgB,4BAA4B;AAMpE,MAAMA,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EAAEC,WAAW,KAAK,EAAEC,QAAQ,KAAK,EAAEC,MAAM,SAAS,EAAEC,SAAS,KAAK,EAAEC,QAAQ,QAAQ,EAAE,GAAGC,YAAY,GAAGP;IAC9G,MAAMQ,QAAQC,sBAAsBF,YAAYN;IAEhD,OAAO;QACLC;QACAC;QACAC;QACAC;QACAC;QACA,GAAGE,KAAK;IACV;AACF,EAAE;AASK,8BAA8B,CAACR,OAAuBC;IAC3D,OAAO;QACLS,YAAY;YACVC,MAAM;QACR;QACAA,MAAMb,oBAAAA,CAAKc,MAAM,KACff,wCAAAA,EAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEa,aAAa;QAAM;IAEzB;AACF,EAAE"}

View File

@@ -0,0 +1,165 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
imageClassNames: function() {
return imageClassNames;
},
useImageStyles_unstable: function() {
return useImageStyles_unstable;
}
});
const _react = require("@griffel/react");
const imageClassNames = {
root: 'fui-Image'
};
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
base: {
g2u3we: "fj3muxo",
h3c5rm: [
"f1akhkt",
"f1lxtadh"
],
B9xav0g: "f1aperda",
zhjwy3: [
"f1lxtadh",
"f1akhkt"
],
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f1fabniw",
B7ck84d: "f1ewtqcl",
mc9l5x: "f14t3ns0"
},
bordered: {
icvyot: "fzkkow9",
vrafjx: [
"fcdblym",
"fjik90z"
],
oivjwe: "fg706s2",
wvpqe5: [
"fjik90z",
"fcdblym"
],
B4j52fo: "f192inf7",
Bekrc4i: [
"f5tn483",
"f1ojsxk5"
],
Bn0qgzm: "f1vxd6vx",
ibv6hh: [
"f1ojsxk5",
"f5tn483"
]
},
circular: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f44lkw9"
},
rounded: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "ft85np5"
},
square: {},
shadow: {
E5pizo: "f1whvlc6"
},
center: {
st4lth: "f1plgu50",
Ermj5k: "f14xojzb"
},
contain: {
st4lth: "f1kle4es",
Ermj5k: "f14xojzb"
},
"default": {},
cover: {
st4lth: "f1ps3kmd",
Ermj5k: "f14xojzb"
},
none: {
st4lth: "f1plgu50",
Ermj5k: [
"f13uwng7",
"fjmyj0p"
]
},
fitFill: {
Bqenvij: "f1l02sjl",
a9b677: "fly5x3f"
},
block: {
a9b677: "fly5x3f"
}
}, {
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);}",
{
p: -1
}
],
".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);}",
{
p: -1
}
],
[
".ft85np5{border-radius:var(--borderRadiusMedium);}",
{
p: -1
}
],
".f1whvlc6{box-shadow:var(--shadow4);}",
".f1plgu50{object-fit:none;}",
".f14xojzb{object-position:center;}",
".f1kle4es{object-fit:contain;}",
".f1ps3kmd{object-fit:cover;}",
".f13uwng7{object-position:left top;}",
".fjmyj0p{object-position:right top;}",
".f1l02sjl{height:100%;}",
".fly5x3f{width:100%;}"
]
});
const useImageStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { height, width } = state.root;
// eslint-disable-next-line eqeqeq
const hasExplicitSize = height != null || width != null;
const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;
state.root.className = (0, _react.mergeClasses)(imageClassNames.root, styles.base, state.block && styles.block, state.bordered && styles.bordered, state.shadow && styles.shadow, styles[state.fit], shouldApplyFitFill && styles.fitFill, styles[state.shape], state.root.className);
return state;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,88 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
imageClassNames: function() {
return imageClassNames;
},
useImageStyles_unstable: function() {
return useImageStyles_unstable;
}
});
const _react = require("@griffel/react");
const _reacttheme = require("@fluentui/react-theme");
const imageClassNames = {
root: 'fui-Image'
};
const useStyles = (0, _react.makeStyles)({
// Base styles
base: {
..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1),
borderRadius: _reacttheme.tokens.borderRadiusNone,
boxSizing: 'border-box',
display: 'inline-block'
},
// Bordered styles
bordered: {
..._react.shorthands.borderStyle('solid'),
..._react.shorthands.borderWidth(_reacttheme.tokens.strokeWidthThin)
},
// Shape variations
circular: {
borderRadius: _reacttheme.tokens.borderRadiusCircular
},
rounded: {
borderRadius: _reacttheme.tokens.borderRadiusMedium
},
square: {},
// Shadow styles
shadow: {
boxShadow: _reacttheme.tokens.shadow4
},
// Fit variations
center: {
objectFit: 'none',
objectPosition: 'center'
},
contain: {
objectFit: 'contain',
objectPosition: 'center'
},
default: {},
cover: {
objectFit: 'cover',
objectPosition: 'center'
},
none: {
objectFit: 'none',
objectPosition: 'left top'
},
// When no explicit height/width props are provided, apply full-size
// sizing so fit modes behave as intended (object-fit fills the element).
fitFill: {
height: '100%',
width: '100%'
},
// Block styles
block: {
width: '100%'
}
});
const useImageStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { height, width } = state.root;
// eslint-disable-next-line eqeqeq
const hasExplicitSize = height != null || width != null;
const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;
state.root.className = (0, _react.mergeClasses)(imageClassNames.root, styles.base, state.block && styles.block, state.bordered && styles.bordered, state.shadow && styles.shadow, styles[state.fit], shouldApplyFitFill && styles.fitFill, styles[state.shape], state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/useImageStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 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: { borderRadius: tokens.borderRadiusCircular },\n rounded: { borderRadius: tokens.borderRadiusMedium },\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 },\n contain: {\n objectFit: 'contain',\n objectPosition: 'center',\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 },\n none: {\n objectFit: 'none',\n objectPosition: 'left top',\n },\n\n // When no explicit height/width props are provided, apply full-size\n // sizing so fit modes behave as intended (object-fit fills the element).\n fitFill: {\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): ImageState => {\n 'use no memo';\n\n const styles = useStyles();\n\n const { height, width } = state.root;\n // eslint-disable-next-line eqeqeq\n const hasExplicitSize = height != null || width != null;\n const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;\n\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 shouldApplyFitFill && styles.fitFill,\n styles[state.shape],\n state.root.className,\n );\n\n return state;\n};\n"],"names":["shorthands","mergeClasses","makeStyles","tokens","imageClassNames","root","useStyles","base","borderColor","colorNeutralStroke1","borderRadius","borderRadiusNone","boxSizing","display","bordered","borderStyle","borderWidth","strokeWidthThin","circular","borderRadiusCircular","rounded","borderRadiusMedium","square","shadow","boxShadow","shadow4","center","objectFit","objectPosition","contain","default","cover","none","fitFill","height","width","block","useImageStyles_unstable","state","styles","hasExplicitSize","shouldApplyFitFill","fit","className","shape"],"mappings":"AAAA;;;;;;;;;;;;IAOaI,eAAAA;;;IAkEAiC,uBAAAA;;;;uBAvEwC,iBAAiB;4BAC/C,wBAAwB;AAIxC,wBAAoD;IACzDhC,MAAM;AACR,EAAE;AAEF,MAAMC,gBAAYJ,iBAAAA,EAAW;IAC3B,cAAc;IACdK,MAAM;QACJ,GAAGP,iBAAAA,CAAWQ,WAAW,CAACL,kBAAAA,CAAOM,mBAAmB,CAAC;QACrDC,cAAcP,kBAAAA,CAAOQ,gBAAgB;QAErCC,WAAW;QACXC,SAAS;IACX;IAEA,kBAAkB;IAClBC,UAAU;QACR,GAAGd,iBAAAA,CAAWe,WAAW,CAAC,QAAQ;QAClC,GAAGf,iBAAAA,CAAWgB,WAAW,CAACb,kBAAAA,CAAOc,eAAe,CAAC;IACnD;IAEA,mBAAmB;IACnBC,UAAU;QAAER,cAAcP,kBAAAA,CAAOgB,oBAAoB;IAAC;IACtDC,SAAS;QAAEV,cAAcP,kBAAAA,CAAOkB,kBAAkB;IAAC;IACnDC,QAAQ,CAER;IAEA,gBAAgB;IAChBC,QAAQ;QACNC,WAAWrB,kBAAAA,CAAOsB,OAAO;IAC3B;IAEA,iBAAiB;IACjBC,QAAQ;QACNC,WAAW;QACXC,gBAAgB;IAClB;IACAC,SAAS;QACPF,WAAW;QACXC,gBAAgB;IAClB;IACAE,SAAS,CAET;IACAC,OAAO;QACLJ,WAAW;QACXC,gBAAgB;IAClB;IACAI,MAAM;QACJL,WAAW;QACXC,gBAAgB;IAClB;IAEA,oEAAoE;IACpE,yEAAyE;IACzEK,SAAS;QACPC,QAAQ;QACRC,OAAO;IACT;IAEA,eAAe;IACfC,OAAO;QACLD,OAAO;IACT;AACF;AAEO,gCAAgC,CAACG;IACtC;IAEA,MAAMC,SAASjC;IAEf,MAAM,EAAE4B,MAAM,EAAEC,KAAK,EAAE,GAAGG,MAAMjC,IAAI;IACpC,kCAAkC;IAClC,MAAMmC,kBAAkBN,UAAU,QAAQC,SAAS;IACnD,MAAMM,qBAAqBH,MAAMI,GAAG,KAAK,aAAa,CAACF;IAEvDF,MAAMjC,IAAI,CAACsC,SAAS,OAAG1C,mBAAAA,EACrBG,gBAAgBC,IAAI,EACpBkC,OAAOhC,IAAI,EACX+B,MAAMF,KAAK,IAAIG,OAAOH,KAAK,EAC3BE,MAAMxB,QAAQ,IAAIyB,OAAOzB,QAAQ,EACjCwB,MAAMf,MAAM,IAAIgB,OAAOhB,MAAM,EAC7BgB,MAAM,CAACD,MAAMI,GAAG,CAAC,EACjBD,sBAAsBF,OAAON,OAAO,EACpCM,MAAM,CAACD,MAAMM,KAAK,CAAC,EACnBN,MAAMjC,IAAI,CAACsC,SAAS;IAGtB,OAAOL;AACT,EAAE"}

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Image: function() {
return _Image.Image;
},
imageClassNames: function() {
return _Image.imageClassNames;
},
renderImage_unstable: function() {
return _Image.renderImage_unstable;
},
useImageBase_unstable: function() {
return _Image.useImageBase_unstable;
},
useImageStyles_unstable: function() {
return _Image.useImageStyles_unstable;
},
useImage_unstable: function() {
return _Image.useImage_unstable;
}
});
const _Image = require("./Image");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Image,\n imageClassNames,\n renderImage_unstable,\n useImageStyles_unstable,\n useImage_unstable,\n useImageBase_unstable,\n} from './Image';\nexport type { ImageProps, ImageSlots, ImageState, ImageBaseProps, ImageBaseState } from './Image';\n"],"names":["Image","imageClassNames","renderImage_unstable","useImageStyles_unstable","useImage_unstable","useImageBase_unstable"],"mappings":";;;;;;;;;;;;eACEA,YAAK;;;eACLC,sBAAe;;;eACfC,2BAAoB;;;eAGpBG,4BAAqB;;;eAFrBF,8BAAuB;;;eACvBC,wBAAiB;;;uBAEZ,UAAU"}

1
node_modules/@fluentui/react-image/lib/Image.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { Image, imageClassNames, renderImage_unstable, useImageStyles_unstable, useImage_unstable, useImageBase_unstable } from './components/Image/index';

1
node_modules/@fluentui/react-image/lib/Image.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/Image.ts"],"sourcesContent":["export type { ImageProps, ImageSlots, ImageState, ImageBaseProps, ImageBaseState } from './components/Image/index';\nexport {\n Image,\n imageClassNames,\n renderImage_unstable,\n useImageStyles_unstable,\n useImage_unstable,\n useImageBase_unstable,\n} from './components/Image/index';\n"],"names":["Image","imageClassNames","renderImage_unstable","useImageStyles_unstable","useImage_unstable","useImageBase_unstable"],"mappings":"AACA,SACEA,KAAK,EACLC,eAAe,EACfC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,EACjBC,qBAAqB,QAChB,2BAA2B"}

View File

@@ -0,0 +1,15 @@
'use client';
import * as React from 'react';
import { renderImage_unstable } from './renderImage';
import { useImage_unstable } from './useImage';
import { useImageStyles_unstable } from './useImageStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* The Image component ensures the consistent styling of images.
*/ export const Image = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useImage_unstable(props, ref);
useImageStyles_unstable(state);
useCustomStyleHook_unstable('useImageStyles_unstable')(state);
return renderImage_unstable(state);
});
Image.displayName = 'Image';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/Image.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderImage_unstable } from './renderImage';\nimport { useImage_unstable } from './useImage';\nimport { useImageStyles_unstable } from './useImageStyles.styles';\nimport type { ImageProps } from './Image.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useImageStyles_unstable')(state);\n\n return renderImage_unstable(state);\n});\n\nImage.displayName = 'Image';\n"],"names":["React","renderImage_unstable","useImage_unstable","useImageStyles_unstable","useCustomStyleHook_unstable","Image","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQP,kBAAkBK,OAAOC;IAEvCL,wBAAwBM;IAExBL,4BAA4B,2BAA2BK;IAEvD,OAAOR,qBAAqBQ;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}

View File

@@ -0,0 +1,3 @@
/**
* Image state without design-specific state (shape, shadow, bordered, fit).
*/ export { };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../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\n/**\n * Image props without design-specific props (shape, shadow, bordered, fit).\n * Use this when building a base image that is unstyled or uses a custom design system.\n */\nexport type ImageBaseProps = ComponentProps<ImageSlots>;\n\nexport type ImageState = ComponentState<ImageSlots> &\n Required<Pick<ImageProps, 'block' | 'bordered' | 'fit' | 'shadow' | 'shape'>>;\n\n/**\n * Image state without design-specific state (shape, shadow, bordered, fit).\n */\nexport type ImageBaseState = ComponentState<ImageSlots>;\n"],"names":[],"mappings":"AAoDA;;CAEC,GACD,WAAwD"}

View File

@@ -0,0 +1,4 @@
export { Image } from './Image';
export { renderImage_unstable } from './renderImage';
export { useImage_unstable, useImageBase_unstable } from './useImage';
export { imageClassNames, useImageStyles_unstable } from './useImageStyles.styles';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/index.ts"],"sourcesContent":["export type { ImageBaseProps, ImageBaseState, ImageProps, ImageSlots, ImageState } from './Image.types';\nexport { Image } from './Image';\nexport { renderImage_unstable } from './renderImage';\nexport { useImage_unstable, useImageBase_unstable } from './useImage';\nexport { imageClassNames, useImageStyles_unstable } from './useImageStyles.styles';\n"],"names":["Image","renderImage_unstable","useImage_unstable","useImageBase_unstable","imageClassNames","useImageStyles_unstable"],"mappings":"AACA,SAASA,KAAK,QAAQ,UAAU;AAChC,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,aAAa;AACtE,SAASC,eAAe,EAAEC,uBAAuB,QAAQ,0BAA0B"}

View File

@@ -0,0 +1,9 @@
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
import { assertSlots } from '@fluentui/react-utilities';
/**
* Define the render function.
* Given the state of an image, renders it.
*/ export const renderImage_unstable = (state)=>{
assertSlots(state);
return /*#__PURE__*/ _jsx(state.root, {});
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/renderImage.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { ImageSlots, ImageBaseState } 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: ImageBaseState): JSXElement => {\n assertSlots<ImageSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderImage_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;;CAGC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnCF,YAAwBE;IAExB,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}

View File

@@ -0,0 +1,36 @@
'use client';
import * as React from 'react';
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
/**
* Given user props, returns state and render function for an Image.
*/ export const useImage_unstable = (props, ref)=>{
const { bordered = false, block = false, fit = 'default', shadow = false, shape = 'square', ...imageProps } = props;
const state = useImageBase_unstable(imageProps, ref);
return {
bordered,
block,
fit,
shadow,
shape,
...state
};
};
/**
* Base hook for Image component, which manages state related to slot structure.
* This hook excludes design props (shape, shadow, bordered, fit).
*
* @param props - User provided props to the Image component.
* @param ref - User provided ref to be passed to the Image component.
*/ export const useImageBase_unstable = (props, ref)=>{
return {
components: {
root: 'img'
},
root: slot.always(getIntrinsicElementProps('img', {
ref,
...props
}), {
elementType: 'img'
})
};
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/useImage.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ImageBaseProps, ImageBaseState, 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, block = false, fit = 'default', shadow = false, shape = 'square', ...imageProps } = props;\n const state = useImageBase_unstable(imageProps, ref);\n\n return {\n bordered,\n block,\n fit,\n shadow,\n shape,\n ...state,\n };\n};\n\n/**\n * Base hook for Image component, which manages state related to slot structure.\n * This hook excludes design props (shape, shadow, bordered, fit).\n *\n * @param props - User provided props to the Image component.\n * @param ref - User provided ref to be passed to the Image component.\n */\nexport const useImageBase_unstable = (props: ImageBaseProps, ref: React.Ref<HTMLImageElement>): ImageBaseState => {\n return {\n components: {\n root: 'img',\n },\n root: slot.always(\n getIntrinsicElementProps('img', {\n ref,\n ...props,\n }),\n { elementType: 'img' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useImage_unstable","props","ref","bordered","block","fit","shadow","shape","imageProps","state","useImageBase_unstable","components","root","always","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;CAEC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EAAEC,WAAW,KAAK,EAAEC,QAAQ,KAAK,EAAEC,MAAM,SAAS,EAAEC,SAAS,KAAK,EAAEC,QAAQ,QAAQ,EAAE,GAAGC,YAAY,GAAGP;IAC9G,MAAMQ,QAAQC,sBAAsBF,YAAYN;IAEhD,OAAO;QACLC;QACAC;QACAC;QACAC;QACAC;QACA,GAAGE,KAAK;IACV;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,wBAAwB,CAACT,OAAuBC;IAC3D,OAAO;QACLS,YAAY;YACVC,MAAM;QACR;QACAA,MAAMb,KAAKc,MAAM,CACff,yBAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEa,aAAa;QAAM;IAEzB;AACF,EAAE"}

View File

@@ -0,0 +1,96 @@
'use client';
import { shorthands, mergeClasses, __styles } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
export const imageClassNames = {
root: 'fui-Image'
};
const useStyles = /*#__PURE__*/__styles({
base: {
g2u3we: "fj3muxo",
h3c5rm: ["f1akhkt", "f1lxtadh"],
B9xav0g: "f1aperda",
zhjwy3: ["f1lxtadh", "f1akhkt"],
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f1fabniw",
B7ck84d: "f1ewtqcl",
mc9l5x: "f14t3ns0"
},
bordered: {
icvyot: "fzkkow9",
vrafjx: ["fcdblym", "fjik90z"],
oivjwe: "fg706s2",
wvpqe5: ["fjik90z", "fcdblym"],
B4j52fo: "f192inf7",
Bekrc4i: ["f5tn483", "f1ojsxk5"],
Bn0qgzm: "f1vxd6vx",
ibv6hh: ["f1ojsxk5", "f5tn483"]
},
circular: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f44lkw9"
},
rounded: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "ft85np5"
},
square: {},
shadow: {
E5pizo: "f1whvlc6"
},
center: {
st4lth: "f1plgu50",
Ermj5k: "f14xojzb"
},
contain: {
st4lth: "f1kle4es",
Ermj5k: "f14xojzb"
},
"default": {},
cover: {
st4lth: "f1ps3kmd",
Ermj5k: "f14xojzb"
},
none: {
st4lth: "f1plgu50",
Ermj5k: ["f13uwng7", "fjmyj0p"]
},
fitFill: {
Bqenvij: "f1l02sjl",
a9b677: "fly5x3f"
},
block: {
a9b677: "fly5x3f"
}
}, {
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);}", {
p: -1
}], ".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);}", {
p: -1
}], [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
p: -1
}], ".f1whvlc6{box-shadow:var(--shadow4);}", ".f1plgu50{object-fit:none;}", ".f14xojzb{object-position:center;}", ".f1kle4es{object-fit:contain;}", ".f1ps3kmd{object-fit:cover;}", ".f13uwng7{object-position:left top;}", ".fjmyj0p{object-position:right top;}", ".f1l02sjl{height:100%;}", ".fly5x3f{width:100%;}"]
});
export const useImageStyles_unstable = state => {
'use no memo';
const styles = useStyles();
const {
height,
width
} = state.root;
// eslint-disable-next-line eqeqeq
const hasExplicitSize = height != null || width != null;
const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;
state.root.className = mergeClasses(imageClassNames.root, styles.base, state.block && styles.block, state.bordered && styles.bordered, state.shadow && styles.shadow, styles[state.fit], shouldApplyFitFill && styles.fitFill, styles[state.shape], state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"names":["shorthands","mergeClasses","__styles","tokens","imageClassNames","root","useStyles","base","g2u3we","h3c5rm","B9xav0g","zhjwy3","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","B7ck84d","mc9l5x","bordered","icvyot","vrafjx","oivjwe","wvpqe5","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","circular","rounded","square","shadow","E5pizo","center","st4lth","Ermj5k","contain","cover","none","fitFill","Bqenvij","a9b677","block","d","p","useImageStyles_unstable","state","styles","height","width","hasExplicitSize","shouldApplyFitFill","fit","className","shape"],"sources":["useImageStyles.styles.js"],"sourcesContent":["'use client';\nimport { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const imageClassNames = {\n root: 'fui-Image'\n};\nconst useStyles = makeStyles({\n // Base styles\n base: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n borderRadius: tokens.borderRadiusNone,\n boxSizing: 'border-box',\n display: 'inline-block'\n },\n // Bordered styles\n bordered: {\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin)\n },\n // Shape variations\n circular: {\n borderRadius: tokens.borderRadiusCircular\n },\n rounded: {\n borderRadius: tokens.borderRadiusMedium\n },\n square: {\n },\n // Shadow styles\n shadow: {\n boxShadow: tokens.shadow4\n },\n // Fit variations\n center: {\n objectFit: 'none',\n objectPosition: 'center'\n },\n contain: {\n objectFit: 'contain',\n objectPosition: 'center'\n },\n default: {\n },\n cover: {\n objectFit: 'cover',\n objectPosition: 'center'\n },\n none: {\n objectFit: 'none',\n objectPosition: 'left top'\n },\n // When no explicit height/width props are provided, apply full-size\n // sizing so fit modes behave as intended (object-fit fills the element).\n fitFill: {\n height: '100%',\n width: '100%'\n },\n // Block styles\n block: {\n width: '100%'\n }\n});\nexport const useImageStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const { height, width } = state.root;\n // eslint-disable-next-line eqeqeq\n const hasExplicitSize = height != null || width != null;\n const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;\n state.root.className = mergeClasses(imageClassNames.root, styles.base, state.block && styles.block, state.bordered && styles.bordered, state.shadow && styles.shadow, styles[state.fit], shouldApplyFitFill && styles.fitFill, styles[state.shape], state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,UAAU,EAAEC,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,eAAe,GAAG;EAC3BC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,gBAAGJ,QAAA;EAAAK,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;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;IAAAhB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAa,OAAA;IAAAjB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAc,MAAA;EAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAF,MAAA;IAAAC,MAAA;EAAA;EAAA;EAAAE,KAAA;IAAAH,MAAA;IAAAC,MAAA;EAAA;EAAAG,IAAA;IAAAJ,MAAA;IAAAC,MAAA;EAAA;EAAAI,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAD,MAAA;EAAA;AAAA;EAAAE,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAuDjB,CAAC;AACF,OAAO,MAAMC,uBAAuB,GAAIC,KAAK,IAAG;EAC5C,aAAa;;EACb,MAAMC,MAAM,GAAGzC,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAE0C,MAAM;IAAEC;EAAM,CAAC,GAAGH,KAAK,CAACzC,IAAI;EACpC;EACA,MAAM6C,eAAe,GAAGF,MAAM,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI;EACvD,MAAME,kBAAkB,GAAGL,KAAK,CAACM,GAAG,KAAK,SAAS,IAAI,CAACF,eAAe;EACtEJ,KAAK,CAACzC,IAAI,CAACgD,SAAS,GAAGpD,YAAY,CAACG,eAAe,CAACC,IAAI,EAAE0C,MAAM,CAACxC,IAAI,EAAEuC,KAAK,CAACJ,KAAK,IAAIK,MAAM,CAACL,KAAK,EAAEI,KAAK,CAAC3B,QAAQ,IAAI4B,MAAM,CAAC5B,QAAQ,EAAE2B,KAAK,CAACf,MAAM,IAAIgB,MAAM,CAAChB,MAAM,EAAEgB,MAAM,CAACD,KAAK,CAACM,GAAG,CAAC,EAAED,kBAAkB,IAAIJ,MAAM,CAACR,OAAO,EAAEQ,MAAM,CAACD,KAAK,CAACQ,KAAK,CAAC,EAAER,KAAK,CAACzC,IAAI,CAACgD,SAAS,CAAC;EACzQ,OAAOP,KAAK;AAChB,CAAC","ignoreList":[]}

View File

@@ -0,0 +1,72 @@
'use client';
import { shorthands, mergeClasses, makeStyles } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
export const imageClassNames = {
root: 'fui-Image'
};
const useStyles = makeStyles({
// Base styles
base: {
...shorthands.borderColor(tokens.colorNeutralStroke1),
borderRadius: tokens.borderRadiusNone,
boxSizing: 'border-box',
display: 'inline-block'
},
// Bordered styles
bordered: {
...shorthands.borderStyle('solid'),
...shorthands.borderWidth(tokens.strokeWidthThin)
},
// Shape variations
circular: {
borderRadius: tokens.borderRadiusCircular
},
rounded: {
borderRadius: tokens.borderRadiusMedium
},
square: {
},
// Shadow styles
shadow: {
boxShadow: tokens.shadow4
},
// Fit variations
center: {
objectFit: 'none',
objectPosition: 'center'
},
contain: {
objectFit: 'contain',
objectPosition: 'center'
},
default: {
},
cover: {
objectFit: 'cover',
objectPosition: 'center'
},
none: {
objectFit: 'none',
objectPosition: 'left top'
},
// When no explicit height/width props are provided, apply full-size
// sizing so fit modes behave as intended (object-fit fills the element).
fitFill: {
height: '100%',
width: '100%'
},
// Block styles
block: {
width: '100%'
}
});
export const useImageStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { height, width } = state.root;
// eslint-disable-next-line eqeqeq
const hasExplicitSize = height != null || width != null;
const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;
state.root.className = mergeClasses(imageClassNames.root, styles.base, state.block && styles.block, state.bordered && styles.bordered, state.shadow && styles.shadow, styles[state.fit], shouldApplyFitFill && styles.fitFill, styles[state.shape], state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Image/useImageStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 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: { borderRadius: tokens.borderRadiusCircular },\n rounded: { borderRadius: tokens.borderRadiusMedium },\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 },\n contain: {\n objectFit: 'contain',\n objectPosition: 'center',\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 },\n none: {\n objectFit: 'none',\n objectPosition: 'left top',\n },\n\n // When no explicit height/width props are provided, apply full-size\n // sizing so fit modes behave as intended (object-fit fills the element).\n fitFill: {\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): ImageState => {\n 'use no memo';\n\n const styles = useStyles();\n\n const { height, width } = state.root;\n // eslint-disable-next-line eqeqeq\n const hasExplicitSize = height != null || width != null;\n const shouldApplyFitFill = state.fit !== 'default' && !hasExplicitSize;\n\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 shouldApplyFitFill && styles.fitFill,\n styles[state.shape],\n state.root.className,\n );\n\n return state;\n};\n"],"names":["shorthands","mergeClasses","makeStyles","tokens","imageClassNames","root","useStyles","base","borderColor","colorNeutralStroke1","borderRadius","borderRadiusNone","boxSizing","display","bordered","borderStyle","borderWidth","strokeWidthThin","circular","borderRadiusCircular","rounded","borderRadiusMedium","square","shadow","boxShadow","shadow4","center","objectFit","objectPosition","contain","default","cover","none","fitFill","height","width","block","useImageStyles_unstable","state","styles","hasExplicitSize","shouldApplyFitFill","fit","className","shape"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,QAAQ,wBAAwB;AAI/C,OAAO,MAAMC,kBAA8C;IACzDC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYJ,WAAW;IAC3B,cAAc;IACdK,MAAM;QACJ,GAAGP,WAAWQ,WAAW,CAACL,OAAOM,mBAAmB,CAAC;QACrDC,cAAcP,OAAOQ,gBAAgB;QAErCC,WAAW;QACXC,SAAS;IACX;IAEA,kBAAkB;IAClBC,UAAU;QACR,GAAGd,WAAWe,WAAW,CAAC,QAAQ;QAClC,GAAGf,WAAWgB,WAAW,CAACb,OAAOc,eAAe,CAAC;IACnD;IAEA,mBAAmB;IACnBC,UAAU;QAAER,cAAcP,OAAOgB,oBAAoB;IAAC;IACtDC,SAAS;QAAEV,cAAcP,OAAOkB,kBAAkB;IAAC;IACnDC,QAAQ;IAER;IAEA,gBAAgB;IAChBC,QAAQ;QACNC,WAAWrB,OAAOsB,OAAO;IAC3B;IAEA,iBAAiB;IACjBC,QAAQ;QACNC,WAAW;QACXC,gBAAgB;IAClB;IACAC,SAAS;QACPF,WAAW;QACXC,gBAAgB;IAClB;IACAE,SAAS;IAET;IACAC,OAAO;QACLJ,WAAW;QACXC,gBAAgB;IAClB;IACAI,MAAM;QACJL,WAAW;QACXC,gBAAgB;IAClB;IAEA,oEAAoE;IACpE,yEAAyE;IACzEK,SAAS;QACPC,QAAQ;QACRC,OAAO;IACT;IAEA,eAAe;IACfC,OAAO;QACLD,OAAO;IACT;AACF;AAEA,OAAO,MAAME,0BAA0B,CAACC;IACtC;IAEA,MAAMC,SAASjC;IAEf,MAAM,EAAE4B,MAAM,EAAEC,KAAK,EAAE,GAAGG,MAAMjC,IAAI;IACpC,kCAAkC;IAClC,MAAMmC,kBAAkBN,UAAU,QAAQC,SAAS;IACnD,MAAMM,qBAAqBH,MAAMI,GAAG,KAAK,aAAa,CAACF;IAEvDF,MAAMjC,IAAI,CAACsC,SAAS,GAAG1C,aACrBG,gBAAgBC,IAAI,EACpBkC,OAAOhC,IAAI,EACX+B,MAAMF,KAAK,IAAIG,OAAOH,KAAK,EAC3BE,MAAMxB,QAAQ,IAAIyB,OAAOzB,QAAQ,EACjCwB,MAAMf,MAAM,IAAIgB,OAAOhB,MAAM,EAC7BgB,MAAM,CAACD,MAAMI,GAAG,CAAC,EACjBD,sBAAsBF,OAAON,OAAO,EACpCM,MAAM,CAACD,MAAMM,KAAK,CAAC,EACnBN,MAAMjC,IAAI,CAACsC,SAAS;IAGtB,OAAOL;AACT,EAAE"}

1
node_modules/@fluentui/react-image/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { Image, imageClassNames, renderImage_unstable, useImageStyles_unstable, useImage_unstable, useImageBase_unstable } from './Image';

1
node_modules/@fluentui/react-image/lib/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Image,\n imageClassNames,\n renderImage_unstable,\n useImageStyles_unstable,\n useImage_unstable,\n useImageBase_unstable,\n} from './Image';\nexport type { ImageProps, ImageSlots, ImageState, ImageBaseProps, ImageBaseState } from './Image';\n"],"names":["Image","imageClassNames","renderImage_unstable","useImageStyles_unstable","useImage_unstable","useImageBase_unstable"],"mappings":"AAAA,SACEA,KAAK,EACLC,eAAe,EACfC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,EACjBC,qBAAqB,QAChB,UAAU"}

49
node_modules/@fluentui/react-image/package.json generated vendored Normal file
View File

@@ -0,0 +1,49 @@
{
"name": "@fluentui/react-image",
"version": "9.4.0",
"description": "Fluent UI React Image component.",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"typings": "./dist/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/microsoft/fluentui"
},
"license": "MIT",
"dependencies": {
"@fluentui/react-shared-contexts": "^9.26.2",
"@fluentui/react-utilities": "^9.26.2",
"@fluentui/react-jsx-runtime": "^9.4.1",
"@fluentui/react-theme": "^9.2.1",
"@griffel/react": "^1.5.32",
"@swc/helpers": "^0.5.1"
},
"peerDependencies": {
"@types/react": ">=16.14.0 <20.0.0",
"@types/react-dom": ">=16.9.0 <20.0.0",
"react": ">=16.14.0 <20.0.0",
"react-dom": ">=16.14.0 <20.0.0"
},
"beachball": {
"disallowedChangeTypes": [
"major",
"prerelease"
]
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"node": "./lib-commonjs/index.js",
"import": "./lib/index.js",
"require": "./lib-commonjs/index.js"
},
"./package.json": "./package.json"
},
"files": [
"*.md",
"dist/*.d.ts",
"lib",
"lib-commonjs"
]
}