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

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;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