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,25 @@
'use client';
import * as React from 'react';
import { useDialogSurface_unstable, useDialogSurfaceContextValues_unstable, renderDialogSurface_unstable } from '@fluentui/react-dialog';
import { useOverlayDrawerSurfaceStyles_unstable } from './useOverlayDrawerSurfaceStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* OverlayDrawerSurface is a proxy for DialogSurface as is only meant to be used internally for Drawer.
*
* @internal
*/ export const OverlayDrawerSurface = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const dialogSurfaceState = useDialogSurface_unstable({
...props,
/**
* Drawer accepts a `div` or `aside` element type, but Dialog only accepts a `div` element type.
* We need to cast the ref to a `div` element type to not break Dialog's ref type.
*
* FIXME: Evaluate the possibility to remove this cast when Dialog is refactored to accept `aside` elements.
*/ as: props.as
}, ref);
const dialogSurfaceContextValues = useDialogSurfaceContextValues_unstable(dialogSurfaceState);
useOverlayDrawerSurfaceStyles_unstable(dialogSurfaceState);
useCustomStyleHook_unstable('useOverlayDrawerSurfaceStyles_unstable')(dialogSurfaceState);
return renderDialogSurface_unstable(dialogSurfaceState, dialogSurfaceContextValues);
});
OverlayDrawerSurface.displayName = 'OverlayDrawerSurface';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport {\n useDialogSurface_unstable,\n useDialogSurfaceContextValues_unstable,\n renderDialogSurface_unstable,\n} from '@fluentui/react-dialog';\n\nimport { useOverlayDrawerSurfaceStyles_unstable } from './useOverlayDrawerSurfaceStyles.styles';\nimport type { OverlayDrawerSurfaceProps } from './OverlayDrawerSurface.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * OverlayDrawerSurface is a proxy for DialogSurface as is only meant to be used internally for Drawer.\n *\n * @internal\n */\nexport const OverlayDrawerSurface: ForwardRefComponent<OverlayDrawerSurfaceProps> = React.forwardRef((props, ref) => {\n const dialogSurfaceState = useDialogSurface_unstable(\n {\n ...props,\n /**\n * Drawer accepts a `div` or `aside` element type, but Dialog only accepts a `div` element type.\n * We need to cast the ref to a `div` element type to not break Dialog's ref type.\n *\n * FIXME: Evaluate the possibility to remove this cast when Dialog is refactored to accept `aside` elements.\n */\n as: props.as as 'div',\n },\n ref,\n );\n const dialogSurfaceContextValues = useDialogSurfaceContextValues_unstable(dialogSurfaceState);\n\n useOverlayDrawerSurfaceStyles_unstable(dialogSurfaceState);\n useCustomStyleHook_unstable('useOverlayDrawerSurfaceStyles_unstable')(dialogSurfaceState);\n\n return renderDialogSurface_unstable(dialogSurfaceState, dialogSurfaceContextValues);\n});\n\nOverlayDrawerSurface.displayName = 'OverlayDrawerSurface';\n"],"names":["React","useDialogSurface_unstable","useDialogSurfaceContextValues_unstable","renderDialogSurface_unstable","useOverlayDrawerSurfaceStyles_unstable","useCustomStyleHook_unstable","OverlayDrawerSurface","forwardRef","props","ref","dialogSurfaceState","as","dialogSurfaceContextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,yBAAyB,EACzBC,sCAAsC,EACtCC,4BAA4B,QACvB,yBAAyB;AAEhC,SAASC,sCAAsC,QAAQ,yCAAyC;AAEhG,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;;CAIC,GACD,OAAO,MAAMC,qCAAuEN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,qBAAqBT,0BACzB;QACE,GAAGO,KAAK;QACR;;;;;OAKC,GACDG,IAAIH,MAAMG,EAAE;IACd,GACAF;IAEF,MAAMG,6BAA6BV,uCAAuCQ;IAE1EN,uCAAuCM;IACvCL,4BAA4B,0CAA0CK;IAEtE,OAAOP,6BAA6BO,oBAAoBE;AAC1D,GAAG;AAEHN,qBAAqBO,WAAW,GAAG"}

View File

@@ -0,0 +1,3 @@
/**
* OverlayDrawerSurface Props
*/ export { };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.ts"],"sourcesContent":["import type { DialogSurfaceProps, DialogSurfaceSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, Slot } from '@fluentui/react-utilities';\n\n/**\n * OverlayDrawerSurface slots\n */\nexport type OverlayDrawerSurfaceSlots = Partial<Pick<DialogSurfaceSlots, 'backdrop' | 'backdropMotion'>> & {\n root: Slot<'div', 'aside'>;\n};\n\n/**\n * OverlayDrawerSurface Props\n */\nexport type OverlayDrawerSurfaceProps = ComponentProps<OverlayDrawerSurfaceSlots> &\n Pick<DialogSurfaceProps, 'mountNode'>;\n"],"names":[],"mappings":"AAUA;;CAEC,GACD,WACwC"}

View File

@@ -0,0 +1 @@
export { OverlayDrawerSurface } from './OverlayDrawerSurface';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/OverlayDrawer/OverlayDrawerSurface/index.ts"],"sourcesContent":["export { OverlayDrawerSurface } from './OverlayDrawerSurface';\nexport type { OverlayDrawerSurfaceProps, OverlayDrawerSurfaceSlots } from './OverlayDrawerSurface.types';\n"],"names":["OverlayDrawerSurface"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,yBAAyB"}

View File

@@ -0,0 +1,38 @@
'use client';
import { __resetStyles, __styles, mergeClasses } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
/**
* Styles for the backdrop slot
*/
const useBackdropResetStyles = /*#__PURE__*/__resetStyles("rl76ifk", null, [".rl76ifk{inset:0px;position:fixed;background-color:var(--colorBackgroundOverlay);}"]);
const useBackdropStyles = /*#__PURE__*/__styles({
nested: {
De3pzq: "f1c21dwh"
},
drawerHidden: {
Bkecrkj: "f1aehjj5"
}
}, {
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1aehjj5{pointer-events:none;}"]
});
/**
* Apply styling to the OverlayDrawerSurface slots based on the state
*/
export const useOverlayDrawerSurfaceStyles_unstable = state => {
'use no memo';
const {
treatBackdropAsNested,
backdrop,
open,
unmountOnClose
} = state;
const backdropResetStyles = useBackdropResetStyles();
const backdropStyles = useBackdropStyles();
const mountedAndClosed = !unmountOnClose && !open;
if (backdrop) {
backdrop.className = mergeClasses(backdropResetStyles, treatBackdropAsNested && backdropStyles.nested, mountedAndClosed && backdropStyles.drawerHidden, backdrop.className);
}
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","useBackdropResetStyles","useBackdropStyles","nested","De3pzq","drawerHidden","Bkecrkj","d","useOverlayDrawerSurfaceStyles_unstable","state","treatBackdropAsNested","backdrop","open","unmountOnClose","backdropResetStyles","backdropStyles","mountedAndClosed","className"],"sources":["useOverlayDrawerSurfaceStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * Styles for the backdrop slot\n */ const useBackdropResetStyles = makeResetStyles({\n inset: '0px',\n position: 'fixed',\n backgroundColor: tokens.colorBackgroundOverlay\n});\nconst useBackdropStyles = makeStyles({\n nested: {\n backgroundColor: tokens.colorTransparentBackground\n },\n drawerHidden: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the OverlayDrawerSurface slots based on the state\n */ export const useOverlayDrawerSurfaceStyles_unstable = (state)=>{\n 'use no memo';\n const { treatBackdropAsNested, backdrop, open, unmountOnClose } = state;\n const backdropResetStyles = useBackdropResetStyles();\n const backdropStyles = useBackdropStyles();\n const mountedAndClosed = !unmountOnClose && !open;\n if (backdrop) {\n backdrop.className = mergeClasses(backdropResetStyles, treatBackdropAsNested && backdropStyles.nested, mountedAndClosed && backdropStyles.drawerHidden, backdrop.className);\n }\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C;AACA;AACA;AAAI,MAAMC,sBAAsB,gBAAGJ,aAAA,wGAIlC,CAAC;AACF,MAAMK,iBAAiB,gBAAGJ,QAAA;EAAAK,MAAA;IAAAC,MAAA;EAAA;EAAAC,YAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAOzB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,sCAAsC,GAAIC,KAAK,IAAG;EAC/D,aAAa;;EACb,MAAM;IAAEC,qBAAqB;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGJ,KAAK;EACvE,MAAMK,mBAAmB,GAAGb,sBAAsB,CAAC,CAAC;EACpD,MAAMc,cAAc,GAAGb,iBAAiB,CAAC,CAAC;EAC1C,MAAMc,gBAAgB,GAAG,CAACH,cAAc,IAAI,CAACD,IAAI;EACjD,IAAID,QAAQ,EAAE;IACVA,QAAQ,CAACM,SAAS,GAAGlB,YAAY,CAACe,mBAAmB,EAAEJ,qBAAqB,IAAIK,cAAc,CAACZ,MAAM,EAAEa,gBAAgB,IAAID,cAAc,CAACV,YAAY,EAAEM,QAAQ,CAACM,SAAS,CAAC;EAC/K;EACA,OAAOR,KAAK;AAChB,CAAC","ignoreList":[]}

View File

@@ -0,0 +1,31 @@
'use client';
import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
/**
* Styles for the backdrop slot
*/ const useBackdropResetStyles = makeResetStyles({
inset: '0px',
position: 'fixed',
backgroundColor: tokens.colorBackgroundOverlay
});
const useBackdropStyles = makeStyles({
nested: {
backgroundColor: tokens.colorTransparentBackground
},
drawerHidden: {
pointerEvents: 'none'
}
});
/**
* Apply styling to the OverlayDrawerSurface slots based on the state
*/ export const useOverlayDrawerSurfaceStyles_unstable = (state)=>{
'use no memo';
const { treatBackdropAsNested, backdrop, open, unmountOnClose } = state;
const backdropResetStyles = useBackdropResetStyles();
const backdropStyles = useBackdropStyles();
const mountedAndClosed = !unmountOnClose && !open;
if (backdrop) {
backdrop.className = mergeClasses(backdropResetStyles, treatBackdropAsNested && backdropStyles.nested, mountedAndClosed && backdropStyles.drawerHidden, backdrop.className);
}
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { DialogSurfaceState } from '@fluentui/react-dialog';\n\n/**\n * Styles for the backdrop slot\n */\nconst useBackdropResetStyles = makeResetStyles({\n inset: '0px',\n position: 'fixed',\n backgroundColor: tokens.colorBackgroundOverlay,\n});\n\nconst useBackdropStyles = makeStyles({\n nested: {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n drawerHidden: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the OverlayDrawerSurface slots based on the state\n */\nexport const useOverlayDrawerSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n 'use no memo';\n\n const { treatBackdropAsNested, backdrop, open, unmountOnClose } = state;\n\n const backdropResetStyles = useBackdropResetStyles();\n const backdropStyles = useBackdropStyles();\n\n const mountedAndClosed = !unmountOnClose && !open;\n\n if (backdrop) {\n backdrop.className = mergeClasses(\n backdropResetStyles,\n treatBackdropAsNested && backdropStyles.nested,\n mountedAndClosed && backdropStyles.drawerHidden,\n backdrop.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","useBackdropResetStyles","inset","position","backgroundColor","colorBackgroundOverlay","useBackdropStyles","nested","colorTransparentBackground","drawerHidden","pointerEvents","useOverlayDrawerSurfaceStyles_unstable","state","treatBackdropAsNested","backdrop","open","unmountOnClose","backdropResetStyles","backdropStyles","mountedAndClosed","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC3E,SAASC,MAAM,QAAQ,wBAAwB;AAG/C;;CAEC,GACD,MAAMC,yBAAyBJ,gBAAgB;IAC7CK,OAAO;IACPC,UAAU;IACVC,iBAAiBJ,OAAOK,sBAAsB;AAChD;AAEA,MAAMC,oBAAoBR,WAAW;IACnCS,QAAQ;QACNH,iBAAiBJ,OAAOQ,0BAA0B;IACpD;IAEAC,cAAc;QACZC,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,yCAAyC,CAACC;IACrD;IAEA,MAAM,EAAEC,qBAAqB,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,cAAc,EAAE,GAAGJ;IAElE,MAAMK,sBAAsBhB;IAC5B,MAAMiB,iBAAiBZ;IAEvB,MAAMa,mBAAmB,CAACH,kBAAkB,CAACD;IAE7C,IAAID,UAAU;QACZA,SAASM,SAAS,GAAGrB,aACnBkB,qBACAJ,yBAAyBK,eAAeX,MAAM,EAC9CY,oBAAoBD,eAAeT,YAAY,EAC/CK,SAASM,SAAS;IAEtB;IAEA,OAAOR;AACT,EAAE"}