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,26 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Drawer", {
enumerable: true,
get: function() {
return Drawer;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const _drawerContext = require("../../contexts/drawerContext");
const _useDrawer = require("./useDrawer");
const _renderDrawer = require("./renderDrawer");
const _useDrawerStylesstyles = require("./useDrawerStyles.styles");
const Drawer = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDrawer.useDrawer_unstable)(props, ref);
const contextValue = (0, _drawerContext.useDrawerContextValue)();
(0, _useDrawerStylesstyles.useDrawerStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDrawerStyles_unstable')(state);
return (0, _renderDrawer.renderDrawer_unstable)(state, contextValue);
});
Drawer.displayName = 'Drawer';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Drawer/Drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerContextValue } from '../../contexts/drawerContext';\n\nimport { useDrawer_unstable } from './useDrawer';\nimport { renderDrawer_unstable } from './renderDrawer';\nimport { useDrawerStyles_unstable } from './useDrawerStyles.styles';\nimport type { DrawerProps } from './Drawer.types';\n\n/**\n * Drawer contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const Drawer: ForwardRefComponent<DrawerProps> = React.forwardRef((props, ref) => {\n const state = useDrawer_unstable(props, ref);\n const contextValue = useDrawerContextValue();\n\n useDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerStyles_unstable')(state);\n\n return renderDrawer_unstable(state, contextValue);\n});\n\nDrawer.displayName = 'Drawer';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerContextValue","useDrawer_unstable","renderDrawer_unstable","useDrawerStyles_unstable","Drawer","forwardRef","props","ref","state","contextValue","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;qCAEa,kCAAkC;+BAExC,+BAA+B;2BAElC,cAAc;8BACX,iBAAiB;uCACd,2BAA2B;AAM7D,MAAMM,SAAAA,WAAAA,GAA2CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,YAAQP,6BAAAA,EAAmBK,OAAOC;IACxC,MAAME,mBAAeT,oCAAAA;QAErBG,+CAAAA,EAAyBK;QACzBT,gDAAAA,EAA4B,4BAA4BS;IAExD,WAAON,mCAAAA,EAAsBM,OAAOC;AACtC,GAAG;AAEHL,OAAOM,WAAW,GAAG"}

View File

@@ -0,0 +1,6 @@
/**
* State used in rendering Drawer
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Drawer/Drawer.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\n\nimport type { OverlayDrawerProps, OverlayDrawerSlots } from '../OverlayDrawer';\nimport type { InlineDrawerProps, InlineDrawerSlots } from '../InlineDrawer';\n\nexport type DrawerSlots = Pick<OverlayDrawerSlots, 'root'> | Pick<InlineDrawerSlots, 'root'>;\n\n/**\n * Drawer Props\n */\nexport type DrawerProps = ComponentProps<DrawerSlots> & {\n /**\n * Type of the drawer.\n *\n * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.\n * - 'inline' - Drawer is stacked with the content\n *\n * @default overlay\n */\n type?: 'inline' | 'overlay';\n} & (OverlayDrawerProps | InlineDrawerProps);\n\n/**\n * State used in rendering Drawer\n */\nexport type DrawerState = ComponentState<DrawerSlots>;\n"],"names":[],"mappings":"AAsBA;;CAEC,GACD,WAAsD"}

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, {
Drawer: function() {
return _Drawer.Drawer;
},
drawerClassNames: function() {
return _useDrawerStylesstyles.drawerClassNames;
},
renderDrawer_unstable: function() {
return _renderDrawer.renderDrawer_unstable;
},
useDrawerStyles_unstable: function() {
return _useDrawerStylesstyles.useDrawerStyles_unstable;
},
useDrawer_unstable: function() {
return _useDrawer.useDrawer_unstable;
}
});
const _Drawer = require("./Drawer");
const _renderDrawer = require("./renderDrawer");
const _useDrawer = require("./useDrawer");
const _useDrawerStylesstyles = require("./useDrawerStyles.styles");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Drawer/index.ts"],"sourcesContent":["export { Drawer } from './Drawer';\nexport type { DrawerProps, DrawerSlots, DrawerState } from './Drawer.types';\nexport { renderDrawer_unstable } from './renderDrawer';\nexport { useDrawer_unstable } from './useDrawer';\nexport { drawerClassNames, useDrawerStyles_unstable } from './useDrawerStyles.styles';\n"],"names":["Drawer","renderDrawer_unstable","useDrawer_unstable","drawerClassNames","useDrawerStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,cAAM;;;eAING,uCAAgB;;;eAFhBF,mCAAqB;;;eAEHG,+CAAwB;;;eAD1CF,6BAAkB;;;wBAHJ,WAAW;8BAEI,iBAAiB;2BACpB,cAAc;uCACU,2BAA2B"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Drawer/renderDrawer.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 { DrawerContextValue, DrawerProvider } from '../../contexts/drawerContext';\n\nimport type { DrawerState, DrawerSlots } from './Drawer.types';\n\n/**\n * Render the final JSX of Drawer\n */\nexport const renderDrawer_unstable = (state: DrawerState, contextValue: DrawerContextValue): JSXElement => {\n assertSlots<DrawerSlots>(state);\n\n return (\n <DrawerProvider value={contextValue}>\n <state.root />\n </DrawerProvider>\n );\n};\n"],"names":["assertSlots","DrawerProvider","renderDrawer_unstable","state","contextValue","value","root"],"mappings":";;;;+BAYaE;;;;;;4BAXb,gDAAiD;gCAErB,4BAA4B;+BAEL,+BAA+B;AAO3E,8BAA8B,CAACC,OAAoBC;QACxDJ,2BAAAA,EAAyBG;IAEzB,OAAA,WAAA,OACE,eAAA,EAACF,6BAAAA,EAAAA;QAAeI,OAAOD;kBACrB,WAAA,OAAA,eAAA,EAACD,MAAMG,IAAI,EAAA,CAAA;;AAGjB,EAAE"}

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDrawer_unstable", {
enumerable: true,
get: function() {
return useDrawer_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 _OverlayDrawer = require("../OverlayDrawer");
const _InlineDrawer = require("../InlineDrawer");
const useDrawer_unstable = (props, ref)=>{
// casting here to convert a union of functions to a single function with the union of parameters
const elementType = props.type === 'inline' ? _InlineDrawer.InlineDrawer : _OverlayDrawer.OverlayDrawer;
const root = _reactutilities.slot.always({
ref,
...props
}, {
elementType
});
return {
components: {
root: elementType
},
root
};
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Drawer/useDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\n\nimport type { DrawerProps, DrawerState } from './Drawer.types';\nimport { OverlayDrawer, type OverlayDrawerProps } from '../OverlayDrawer';\nimport { InlineDrawer, type InlineDrawerProps } from '../InlineDrawer';\n\n/**\n * Create the state required to render Drawer.\n *\n * The returned state can be modified with hooks such as useDrawerStyles_unstable,\n * before being passed to renderDrawer_unstable.\n *\n * @param props - props from this instance of Drawer\n * @param ref - reference to root HTMLElement of Drawer\n */\nexport const useDrawer_unstable = (props: DrawerProps, ref: React.Ref<HTMLElement>): DrawerState => {\n // casting here to convert a union of functions to a single function with the union of parameters\n const elementType = (props.type === 'inline' ? InlineDrawer : OverlayDrawer) as React.FC<\n InlineDrawerProps | OverlayDrawerProps\n >;\n const root: InlineDrawerProps | OverlayDrawerProps = slot.always({ ref, ...props }, { elementType });\n\n return {\n components: { root: elementType },\n root,\n };\n};\n"],"names":["React","slot","OverlayDrawer","InlineDrawer","useDrawer_unstable","props","ref","elementType","type","root","always","components"],"mappings":";;;;+BAgBaI;;;;;;;iEAhBU,QAAQ;gCACV,4BAA4B;+BAGM,mBAAmB;8BACrB,kBAAkB;AAWhE,2BAA2B,CAACC,OAAoBC;IACrD,iGAAiG;IACjG,MAAMC,cAAeF,MAAMG,IAAI,KAAK,WAAWL,0BAAAA,GAAeD,4BAAAA;IAG9D,MAAMO,OAA+CR,oBAAAA,CAAKS,MAAM,CAAC;QAAEJ;QAAK,GAAGD,KAAK;IAAC,GAAG;QAAEE;IAAY;IAElG,OAAO;QACLI,YAAY;YAAEF,MAAMF;QAAY;QAChCE;IACF;AACF,EAAE"}

View File

@@ -0,0 +1,27 @@
"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, {
drawerClassNames: function() {
return drawerClassNames;
},
useDrawerStyles_unstable: function() {
return useDrawerStyles_unstable;
}
});
const _react = require("@griffel/react");
const drawerClassNames = {
root: 'fui-Drawer'
};
const useDrawerStyles_unstable = (state)=>{
'use no memo';
state.root.className = (0, _react.mergeClasses)(drawerClassNames.root, state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["useDrawerStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nexport const drawerClassNames = {\n root: 'fui-Drawer'\n};\n/**\n * Apply styling to the Drawer slots based on the state\n */ export const useDrawerStyles_unstable = (state)=>{\n 'use no memo';\n state.root.className = mergeClasses(drawerClassNames.root, state.root.className);\n return state;\n};\n"],"names":["mergeClasses","drawerClassNames","root","useDrawerStyles_unstable","state","className"],"mappings":";;;;;;;;;;;IACaC,gBAAgB;;;4BAKY;;;;uBANZ,gBAAgB;AACtC,yBAAyB;IAC5BC,IAAI,EAAE;AACV,CAAC;AAGU,MAAMC,2BAA4BC,KAAK,IAAG;IACjD,aAAa;IACbA,KAAK,CAACF,IAAI,CAACG,SAAS,OAAGL,mBAAY,EAACC,gBAAgB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;IAChF,OAAOD,KAAK;AAChB,CAAC"}

View File

@@ -0,0 +1,27 @@
"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, {
drawerClassNames: function() {
return drawerClassNames;
},
useDrawerStyles_unstable: function() {
return useDrawerStyles_unstable;
}
});
const _react = require("@griffel/react");
const drawerClassNames = {
root: 'fui-Drawer'
};
const useDrawerStyles_unstable = (state)=>{
'use no memo';
state.root.className = (0, _react.mergeClasses)(drawerClassNames.root, state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Drawer/useDrawerStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport type { DrawerSlots, DrawerState } from './Drawer.types';\n\nexport const drawerClassNames: SlotClassNames<Omit<DrawerSlots, 'surfaceMotion'>> = {\n root: 'fui-Drawer',\n};\n\n/**\n * Apply styling to the Drawer slots based on the state\n */\nexport const useDrawerStyles_unstable = (state: DrawerState): DrawerState => {\n 'use no memo';\n\n state.root.className = mergeClasses(drawerClassNames.root, state.root.className);\n\n return state;\n};\n"],"names":["mergeClasses","drawerClassNames","root","useDrawerStyles_unstable","state","className"],"mappings":";;;;;;;;;;;IAKaC,gBAAAA;;;4BAOAE;;;;uBAZgB,iBAAiB;AAKvC,yBAA6E;IAClFD,MAAM;AACR,EAAE;AAKK,MAAMC,2BAA2B,CAACC;IACvC;IAEAA,MAAMF,IAAI,CAACG,SAAS,OAAGL,mBAAAA,EAAaC,iBAAiBC,IAAI,EAAEE,MAAMF,IAAI,CAACG,SAAS;IAE/E,OAAOD;AACT,EAAE"}