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,24 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DrawerHeaderTitle", {
enumerable: true,
get: function() {
return DrawerHeaderTitle;
}
});
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 _useDrawerHeaderTitle = require("./useDrawerHeaderTitle");
const _renderDrawerHeaderTitle = require("./renderDrawerHeaderTitle");
const _useDrawerHeaderTitleStylesstyles = require("./useDrawerHeaderTitleStyles.styles");
const DrawerHeaderTitle = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDrawerHeaderTitle.useDrawerHeaderTitle_unstable)(props, ref);
(0, _useDrawerHeaderTitleStylesstyles.useDrawerHeaderTitleStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDrawerHeaderTitleStyles_unstable')(state);
return (0, _renderDrawerHeaderTitle.renderDrawerHeaderTitle_unstable)(state);
});
DrawerHeaderTitle.displayName = 'DrawerHeaderTitle';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DrawerHeaderTitle/DrawerHeaderTitle.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 { useDrawerHeaderTitle_unstable } from './useDrawerHeaderTitle';\nimport { renderDrawerHeaderTitle_unstable } from './renderDrawerHeaderTitle';\nimport { useDrawerHeaderTitleStyles_unstable } from './useDrawerHeaderTitleStyles.styles';\nimport type { DrawerHeaderTitleProps } from './DrawerHeaderTitle.types';\n\n/**\n * DrawerHeader provides a structured header for the drawer component.\n */\nexport const DrawerHeaderTitle: ForwardRefComponent<DrawerHeaderTitleProps> = React.forwardRef((props, ref) => {\n const state = useDrawerHeaderTitle_unstable(props, ref);\n\n useDrawerHeaderTitleStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerHeaderTitleStyles_unstable')(state);\n\n return renderDrawerHeaderTitle_unstable(state);\n});\n\nDrawerHeaderTitle.displayName = 'DrawerHeaderTitle';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerHeaderTitle_unstable","renderDrawerHeaderTitle_unstable","useDrawerHeaderTitleStyles_unstable","DrawerHeaderTitle","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;qCAEa,kCAAkC;sCAEhC,yBAAyB;yCACtB,4BAA4B;kDACzB,sCAAsC;AAMnF,MAAMK,oBAAAA,WAAAA,GAAiEL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,YAAQP,mDAAAA,EAA8BK,OAAOC;QAEnDJ,qEAAAA,EAAoCK;QACpCR,gDAAAA,EAA4B,uCAAuCQ;IAEnE,WAAON,yDAAAA,EAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DrawerHeaderTitle/DrawerHeaderTitle.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DrawerHeaderTitleSlots = {\n root: Slot<'div'>;\n\n /**\n * By default this is a h2, but can be any heading or div.\n * If `div` is provided do not forget to also provide proper `role=\"heading\"` and `aria-level` attributes\n */\n heading?: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;\n\n /**\n * Action slot for the close button\n */\n action?: Slot<'div'>;\n};\n\n/**\n * DrawerHeaderTitle Props\n */\nexport type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots>;\n\n/**\n * State used in rendering DrawerHeaderTitle\n */\nexport type DrawerHeaderTitleState = ComponentState<DrawerHeaderTitleSlots>;\n"],"names":[],"mappings":"AAsBA;;CAEC,GACD,WAA4E"}

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, {
DrawerHeaderTitle: function() {
return _DrawerHeaderTitle.DrawerHeaderTitle;
},
drawerHeaderTitleClassNames: function() {
return _useDrawerHeaderTitleStylesstyles.drawerHeaderTitleClassNames;
},
renderDrawerHeaderTitle_unstable: function() {
return _renderDrawerHeaderTitle.renderDrawerHeaderTitle_unstable;
},
useDrawerHeaderTitleStyles_unstable: function() {
return _useDrawerHeaderTitleStylesstyles.useDrawerHeaderTitleStyles_unstable;
},
useDrawerHeaderTitle_unstable: function() {
return _useDrawerHeaderTitle.useDrawerHeaderTitle_unstable;
}
});
const _DrawerHeaderTitle = require("./DrawerHeaderTitle");
const _renderDrawerHeaderTitle = require("./renderDrawerHeaderTitle");
const _useDrawerHeaderTitle = require("./useDrawerHeaderTitle");
const _useDrawerHeaderTitleStylesstyles = require("./useDrawerHeaderTitleStyles.styles");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DrawerHeaderTitle/index.ts"],"sourcesContent":["export { DrawerHeaderTitle } from './DrawerHeaderTitle';\nexport type { DrawerHeaderTitleProps, DrawerHeaderTitleSlots, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\nexport { renderDrawerHeaderTitle_unstable } from './renderDrawerHeaderTitle';\nexport { useDrawerHeaderTitle_unstable } from './useDrawerHeaderTitle';\nexport { drawerHeaderTitleClassNames, useDrawerHeaderTitleStyles_unstable } from './useDrawerHeaderTitleStyles.styles';\n"],"names":["DrawerHeaderTitle","renderDrawerHeaderTitle_unstable","useDrawerHeaderTitle_unstable","drawerHeaderTitleClassNames","useDrawerHeaderTitleStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oCAAiB;;;eAIjBG,6DAA2B;;;eAF3BF,yDAAgC;;;eAEHG,qEAAmC;;;eADhEF,mDAA6B;;;mCAHJ,sBAAsB;yCAEP,4BAA4B;sCAC/B,yBAAyB;kDACU,sCAAsC"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DrawerHeaderTitle/renderDrawerHeaderTitle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { DrawerHeaderTitleState, DrawerHeaderTitleSlots } from './DrawerHeaderTitle.types';\n\n/**\n * Render the final JSX of DrawerHeaderTitle\n */\nexport const renderDrawerHeaderTitle_unstable = (state: DrawerHeaderTitleState): JSXElement => {\n assertSlots<DrawerHeaderTitleSlots>(state);\n\n return (\n <state.root>\n {state.heading && <state.heading />}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderDrawerHeaderTitle_unstable","state","root","heading","action"],"mappings":";;;;+BAUaC;;;;;;4BATb,iCAAiD;gCACrB,4BAA4B;AAQjD,yCAAyC,CAACC;QAC/CF,2BAAAA,EAAoCE;IAEpC,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAME,OAAO,IAAA,WAAA,OAAI,eAAA,EAACF,MAAME,OAAO,EAAA,CAAA;YAC/BF,MAAMG,MAAM,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,MAAM,EAAA,CAAA;;;AAGpC,EAAE"}

View File

@@ -0,0 +1,43 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDrawerHeaderTitle_unstable", {
enumerable: true,
get: function() {
return useDrawerHeaderTitle_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 _reactdialog = require("@fluentui/react-dialog");
const useDrawerHeaderTitle_unstable = (props, ref)=>{
const { children, heading } = props;
const headingId = (0, _reactdialog.useDialogContext_unstable)((ctx)=>ctx.dialogTitleId);
return {
components: {
root: 'div',
heading: 'h2',
action: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
ref,
...props
}), {
elementType: 'div'
}),
heading: _reactutilities.slot.optional(heading, {
defaultProps: {
id: headingId,
children
},
renderByDefault: true,
elementType: 'h2'
}),
action: _reactutilities.slot.optional(props.action, {
elementType: 'div'
})
};
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DrawerHeaderTitle/useDrawerHeaderTitle.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '@fluentui/react-dialog';\n\nimport type { DrawerHeaderTitleProps, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\n\n/**\n * Create the state required to render DrawerHeaderTitle.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderTitleStyles_unstable,\n * before being passed to renderDrawerHeaderTitle_unstable.\n *\n * @param props - props from this instance of DrawerHeaderTitle\n * @param ref - reference to root HTMLElement of DrawerHeaderTitle\n */\nexport const useDrawerHeaderTitle_unstable = (\n props: DrawerHeaderTitleProps,\n ref: React.Ref<HTMLDivElement>,\n): DrawerHeaderTitleState => {\n const { children, heading } = props;\n const headingId = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n return {\n components: {\n root: 'div',\n heading: 'h2',\n action: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n heading: slot.optional(heading, {\n defaultProps: {\n id: headingId,\n children,\n },\n renderByDefault: true,\n elementType: 'h2',\n }),\n action: slot.optional(props.action, {\n elementType: 'div',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useDialogContext_unstable","useDrawerHeaderTitle_unstable","props","ref","children","heading","headingId","ctx","dialogTitleId","components","root","action","always","elementType","optional","defaultProps","id","renderByDefault"],"mappings":"AAAA;;;;;+BAiBaI;;;;;;;iEAfU,QAAQ;gCACgB,4BAA4B;6BACjC,yBAAyB;AAa5D,sCAAsC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGH;IAC9B,MAAMI,gBAAYN,sCAAAA,EAA0BO,CAAAA,MAAOA,IAAIC,aAAa;IAEpE,OAAO;QACLC,YAAY;YACVC,MAAM;YACNL,SAAS;YACTM,QAAQ;QACV;QAEAD,MAAMX,oBAAAA,CAAKa,MAAM,KACfd,wCAAAA,EAAyB,OAAO;YAC9BK;YACA,GAAGD,KAAK;QACV,IACA;YAAEW,aAAa;QAAM;QAEvBR,SAASN,oBAAAA,CAAKe,QAAQ,CAACT,SAAS;YAC9BU,cAAc;gBACZC,IAAIV;gBACJF;YACF;YACAa,iBAAiB;YACjBJ,aAAa;QACf;QACAF,QAAQZ,oBAAAA,CAAKe,QAAQ,CAACZ,MAAMS,MAAM,EAAE;YAClCE,aAAa;QACf;IACF;AACF,EAAE"}

View File

@@ -0,0 +1,77 @@
'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, {
drawerHeaderTitleClassNames: function() {
return drawerHeaderTitleClassNames;
},
useDrawerHeaderTitleStyles_unstable: function() {
return useDrawerHeaderTitleStyles_unstable;
}
});
const _react = require("@griffel/react");
const _reactdialog = require("@fluentui/react-dialog");
const drawerHeaderTitleClassNames = {
root: 'fui-DrawerHeaderTitle',
heading: 'fui-DrawerHeaderTitle__heading',
action: 'fui-DrawerHeaderTitle__action'
};
/**
* Styles for the root slot
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "f22iagw",
Brf1p80: "f1869bpl",
Bt984gj: "f122n59",
i8kkvl: "fsnqrgy"
},
action: {
t21cq0: [
"faqnl2i",
"fd75udd"
]
}
}, {
d: [
".f22iagw{display:flex;}",
".f1869bpl{justify-content:space-between;}",
".f122n59{align-items:center;}",
".fsnqrgy{column-gap:var(--spacingHorizontalS);}",
".faqnl2i{margin-right:calc(var(--spacingHorizontalS) * -1);}",
".fd75udd{margin-left:calc(var(--spacingHorizontalS) * -1);}"
]
});
const useDrawerHeaderTitleStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { heading: root = {}, action, // We should not use components to pass along the base element type of a slot
// but there's no way to retrieve the element type of a slot from the slot definition
// right now without using SLOT_ELEMENT_TYPE_SYMBOL
// TODO: create a method to retrieve the element type of a slot
// eslint-disable-next-line @typescript-eslint/no-deprecated
components } = state;
(0, _reactdialog.useDialogTitleStyles_unstable)({
components: {
root: components.heading,
action: components.action
},
root,
action
});
state.root.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.root, styles.root, state.root.className);
if (state.heading) {
state.heading.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.heading, state.heading.className);
}
if (state.action) {
state.action.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.action, styles.action, state.action.className);
}
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["useDrawerHeaderTitleStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { useDialogTitleStyles_unstable } from '@fluentui/react-dialog';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerHeaderTitleClassNames = {\n root: 'fui-DrawerHeaderTitle',\n heading: 'fui-DrawerHeaderTitle__heading',\n action: 'fui-DrawerHeaderTitle__action'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS\n },\n action: {\n marginRight: `calc(${tokens.spacingHorizontalS} * -1)`\n }\n});\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */ export const useDrawerHeaderTitleStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const { heading: root = {}, action, // We should not use components to pass along the base element type of a slot\n // but there's no way to retrieve the element type of a slot from the slot definition\n // right now without using SLOT_ELEMENT_TYPE_SYMBOL\n // TODO: create a method to retrieve the element type of a slot\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n components } = state;\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action\n },\n root,\n action\n });\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n if (state.heading) {\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n if (state.action) {\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICI,2BAA2B;;;uCAoBY;eAAnCW;;;uBAvBwB,gBAAgB;6BACX,wBAAwB;AAE/D,oCAAoC;IACvCV,IAAI,EAAE,uBAAuB;IAC7BC,OAAO,EAAE,gCAAgC;IACzCC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAI,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAL,MAAA,EAAA;QAAAM,MAAA,EAAA;YAAA;YAAA;SAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAUrB,CAAC;AAGS,6CAA6CE,KAAK,IAAG;IAC5D,aAAa;IACb,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;IAC1B,MAAM,EAAEF,OAAO,EAAED,IAAI,GAAG,CAAC,CAAC,EAAEE,MAAM,EAAE,6EAAA;IACpC,qFAAA;IACA,mDAAA;IACA,+DAAA;IACA,4DAAA;IACAW,UAAAA,EAAY,GAAGF,KAAK;QACpBd,0CAA6B,EAAC;QAC1BgB,UAAU,EAAE;YACRb,IAAI,EAAEa,UAAU,CAACZ,OAAO;YACxBC,MAAM,EAAEW,UAAU,CAACX,MAAAA;QACvB,CAAC;QACDF,IAAI;QACJE;IACJ,CAAC,CAAC;IACFS,KAAK,CAACX,IAAI,CAACc,SAAS,OAAGlB,mBAAY,EAACG,2BAA2B,CAACC,IAAI,EAAEY,MAAM,CAACZ,IAAI,EAAEW,KAAK,CAACX,IAAI,CAACc,SAAS,CAAC;IACxG,IAAIH,KAAK,CAACV,OAAO,EAAE;QACfU,KAAK,CAACV,OAAO,CAACa,SAAS,OAAGlB,mBAAY,EAACG,2BAA2B,CAACE,OAAO,EAAEU,KAAK,CAACV,OAAO,CAACa,SAAS,CAAC;IACxG;IACA,IAAIH,KAAK,CAACT,MAAM,EAAE;QACdS,KAAK,CAACT,MAAM,CAACY,SAAS,OAAGlB,mBAAY,EAACG,2BAA2B,CAACG,MAAM,EAAEU,MAAM,CAACV,MAAM,EAAES,KAAK,CAACT,MAAM,CAACY,SAAS,CAAC;IACpH;IACA,OAAOH,KAAK;AAChB,CAAC"}

View File

@@ -0,0 +1,65 @@
'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, {
drawerHeaderTitleClassNames: function() {
return drawerHeaderTitleClassNames;
},
useDrawerHeaderTitleStyles_unstable: function() {
return useDrawerHeaderTitleStyles_unstable;
}
});
const _react = require("@griffel/react");
const _reactdialog = require("@fluentui/react-dialog");
const _reacttheme = require("@fluentui/react-theme");
const drawerHeaderTitleClassNames = {
root: 'fui-DrawerHeaderTitle',
heading: 'fui-DrawerHeaderTitle__heading',
action: 'fui-DrawerHeaderTitle__action'
};
/**
* Styles for the root slot
*/ const useStyles = (0, _react.makeStyles)({
root: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
columnGap: _reacttheme.tokens.spacingHorizontalS
},
action: {
marginRight: `calc(${_reacttheme.tokens.spacingHorizontalS} * -1)`
}
});
const useDrawerHeaderTitleStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { heading: root = {}, action, // but there's no way to retrieve the element type of a slot from the slot definition
// right now without using SLOT_ELEMENT_TYPE_SYMBOL
// TODO: create a method to retrieve the element type of a slot
// eslint-disable-next-line @typescript-eslint/no-deprecated
components } = state;
(0, _reactdialog.useDialogTitleStyles_unstable)({
components: {
root: components.heading,
action: components.action
},
root,
action
});
state.root.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.root, styles.root, state.root.className);
if (state.heading) {
state.heading.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.heading, state.heading.className);
}
if (state.action) {
state.action.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.action, styles.action, state.action.className);
}
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useDialogTitleStyles_unstable } from '@fluentui/react-dialog';\nimport { tokens } from '@fluentui/react-theme';\n\nimport type { DrawerHeaderTitleSlots, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\n\nexport const drawerHeaderTitleClassNames: SlotClassNames<DrawerHeaderTitleSlots> = {\n root: 'fui-DrawerHeaderTitle',\n heading: 'fui-DrawerHeaderTitle__heading',\n action: 'fui-DrawerHeaderTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n },\n\n action: {\n marginRight: `calc(${tokens.spacingHorizontalS} * -1)`,\n },\n});\n\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */\nexport const useDrawerHeaderTitleStyles_unstable = (state: DrawerHeaderTitleState): DrawerHeaderTitleState => {\n 'use no memo';\n\n const styles = useStyles();\n\n const {\n heading: root = {},\n action,\n // We should not use components to pass along the base element type of a slot\n // but there's no way to retrieve the element type of a slot from the slot definition\n // right now without using SLOT_ELEMENT_TYPE_SYMBOL\n // TODO: create a method to retrieve the element type of a slot\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n components,\n } = state;\n\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action,\n },\n root,\n action,\n });\n\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n\n if (state.heading) {\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n\n if (state.action) {\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","display","justifyContent","alignItems","columnGap","spacingHorizontalS","marginRight","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"mappings":"AAAA;;;;;;;;;;;;IASaI,2BAAAA;;;uCAyBAW;eAAAA;;;uBAhC4B,iBAAiB;6BAEZ,yBAAyB;4BAChD,wBAAwB;AAIxC,oCAA4E;IACjFV,MAAM;IACNC,SAAS;IACTC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYR,qBAAAA,EAAW;IAC3BK,MAAM;QACJI,SAAS;QACTC,gBAAgB;QAChBC,YAAY;QACZC,WAAWT,kBAAAA,CAAOU,kBAAkB;IACtC;IAEAN,QAAQ;QACNO,aAAa,CAAC,KAAK,EAAEX,kBAAAA,CAAOU,kBAAkB,CAAC,MAAM,CAAC;IACxD;AACF;AAKO,4CAA4C,CAACG;IAClD;IAEA,MAAMC,SAAST;IAEf,MAAM,EACJF,SAASD,OAAO,CAAC,CAAC,EAClBE,MAAM,EACN,AACA,6EAD6E,QACQ;IACrF,mDAAmD;IACnD,+DAA+D;IAC/D,4DAA4D;IAC5DW,UAAU,EACX,GAAGF;QAEJd,0CAAAA,EAA8B;QAC5BgB,YAAY;YACVb,MAAMa,WAAWZ,OAAO;YACxBC,QAAQW,WAAWX,MAAM;QAC3B;QACAF;QACAE;IACF;IAEAS,MAAMX,IAAI,CAACc,SAAS,OAAGlB,mBAAAA,EAAaG,4BAA4BC,IAAI,EAAEY,OAAOZ,IAAI,EAAEW,MAAMX,IAAI,CAACc,SAAS;IAEvG,IAAIH,MAAMV,OAAO,EAAE;QACjBU,MAAMV,OAAO,CAACa,SAAS,OAAGlB,mBAAAA,EAAaG,4BAA4BE,OAAO,EAAEU,MAAMV,OAAO,CAACa,SAAS;IACrG;IAEA,IAAIH,MAAMT,MAAM,EAAE;QAChBS,MAAMT,MAAM,CAACY,SAAS,OAAGlB,mBAAAA,EAAaG,4BAA4BG,MAAM,EAAEU,OAAOV,MAAM,EAAES,MAAMT,MAAM,CAACY,SAAS;IACjH;IAEA,OAAOH;AACT,EAAE"}