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, "TeachingPopoverFooter", {
enumerable: true,
get: function() {
return TeachingPopoverFooter;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useTeachingPopoverFooter = require("./useTeachingPopoverFooter");
const _renderTeachingPopoverFooter = require("./renderTeachingPopoverFooter");
const _useTeachingPopoverFooterStylesstyles = require("./useTeachingPopoverFooterStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const TeachingPopoverFooter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useTeachingPopoverFooter.useTeachingPopoverFooter_unstable)(props, ref);
(0, _useTeachingPopoverFooterStylesstyles.useTeachingPopoverFooterStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useTeachingPopoverFooterStyles_unstable')(state);
return (0, _renderTeachingPopoverFooter.renderTeachingPopoverFooter_unstable)(state);
});
TeachingPopoverFooter.displayName = 'TeachingPopoverFooter';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverFooter/TeachingPopoverFooter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTeachingPopoverFooter_unstable } from './useTeachingPopoverFooter';\nimport { renderTeachingPopoverFooter_unstable } from './renderTeachingPopoverFooter';\nimport { useTeachingPopoverFooterStyles_unstable } from './useTeachingPopoverFooterStyles.styles';\nimport type { TeachingPopoverFooterProps } from './TeachingPopoverFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled TeachingPopoverFooter, using the `useTeachingPopoverFooter_unstable` and `useTeachingPopoverFooterStyles_unstable`\n * hooks.\n *\n * TeachingPopoverFooter will provide both a secondary and primary button for the TeachingPopover,\n * and handle Popover functionality such as closing the popup.\n *\n * Users must provide the localized text for each button within the footer via slots.\n */\nexport const TeachingPopoverFooter: ForwardRefComponent<TeachingPopoverFooterProps> = React.forwardRef((props, ref) => {\n const state = useTeachingPopoverFooter_unstable(props, ref);\n\n useTeachingPopoverFooterStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTeachingPopoverFooterStyles_unstable')(state);\n\n return renderTeachingPopoverFooter_unstable(state);\n});\n\nTeachingPopoverFooter.displayName = 'TeachingPopoverFooter';\n"],"names":["React","useTeachingPopoverFooter_unstable","renderTeachingPopoverFooter_unstable","useTeachingPopoverFooterStyles_unstable","useCustomStyleHook_unstable","TeachingPopoverFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;0CACmB,6BAA6B;6CAC1B,gCAAgC;sDAC7B,0CAA0C;qCAGtD,kCAAkC;AAWvE,MAAMK,wBAAAA,WAAAA,GAAyEL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7G,MAAMC,YAAQR,2DAAAA,EAAkCM,OAAOC;QAEvDL,6EAAAA,EAAwCM;QAExCL,gDAAAA,EAA4B,2CAA2CK;IAEvE,WAAOP,iEAAAA,EAAqCO;AAC9C,GAAG;AAEHJ,sBAAsBK,WAAW,GAAG"}

View File

@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverFooter/TeachingPopoverFooter.types.ts"],"sourcesContent":["import { Button } from '@fluentui/react-button';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { PopoverContextValue } from '@fluentui/react-popover';\n\nexport type TeachingPopoverFooterSlots = {\n /**\n * The element wrapping the buttons.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The primary button slot.\n */\n primary: NonNullable<Slot<typeof Button>>;\n\n /**\n * The secondary button slot.\n */\n secondary?: Slot<typeof Button>;\n};\n\nexport type TeachingPopoverFooterState = ComponentState<TeachingPopoverFooterSlots> &\n Pick<PopoverContextValue, 'appearance'> & {\n /**\n * Enables stylization to a horizontal or vertical stack of button layouts.\n * Defaults to horizontal\n */\n footerLayout?: 'horizontal' | 'vertical';\n };\n\nexport type TeachingPopoverFooterProps = ComponentProps<TeachingPopoverFooterSlots> &\n Pick<TeachingPopoverFooterState, 'footerLayout'>;\n"],"names":[],"mappings":""}

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, {
TeachingPopoverFooter: function() {
return _TeachingPopoverFooter.TeachingPopoverFooter;
},
renderTeachingPopoverFooter_unstable: function() {
return _renderTeachingPopoverFooter.renderTeachingPopoverFooter_unstable;
},
teachingPopoverFooterClassNames: function() {
return _useTeachingPopoverFooterStylesstyles.teachingPopoverFooterClassNames;
},
useTeachingPopoverFooterStyles_unstable: function() {
return _useTeachingPopoverFooterStylesstyles.useTeachingPopoverFooterStyles_unstable;
},
useTeachingPopoverFooter_unstable: function() {
return _useTeachingPopoverFooter.useTeachingPopoverFooter_unstable;
}
});
const _TeachingPopoverFooter = require("./TeachingPopoverFooter");
const _renderTeachingPopoverFooter = require("./renderTeachingPopoverFooter");
const _useTeachingPopoverFooter = require("./useTeachingPopoverFooter");
const _useTeachingPopoverFooterStylesstyles = require("./useTeachingPopoverFooterStyles.styles");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverFooter/index.ts"],"sourcesContent":["export { TeachingPopoverFooter } from './TeachingPopoverFooter';\nexport type {\n TeachingPopoverFooterProps,\n TeachingPopoverFooterSlots,\n TeachingPopoverFooterState,\n} from './TeachingPopoverFooter.types';\nexport { renderTeachingPopoverFooter_unstable } from './renderTeachingPopoverFooter';\nexport { useTeachingPopoverFooter_unstable } from './useTeachingPopoverFooter';\nexport {\n teachingPopoverFooterClassNames,\n useTeachingPopoverFooterStyles_unstable,\n} from './useTeachingPopoverFooterStyles.styles';\n"],"names":["TeachingPopoverFooter","renderTeachingPopoverFooter_unstable","useTeachingPopoverFooter_unstable","teachingPopoverFooterClassNames","useTeachingPopoverFooterStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,4CAAqB;;;eAMrBC,iEAAoC;;;eAG3CE,qEAA+B;;;eAC/BC,6EAAuC;;;eAHhCF,2DAAiC;;;uCAPJ,0BAA0B;6CAMX,gCAAgC;0CACnC,6BAA6B;sDAIxE,0CAA0C"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverFooter/renderTeachingPopoverFooter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverFooterState } from './TeachingPopoverFooter.types';\nimport { TeachingPopoverFooterSlots } from './TeachingPopoverFooter.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverFooter\n */\nexport const renderTeachingPopoverFooter_unstable = (state: TeachingPopoverFooterState): JSXElement => {\n assertSlots<TeachingPopoverFooterSlots>(state);\n\n return (\n <state.root>\n <state.primary />\n {state.secondary && <state.secondary />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTeachingPopoverFooter_unstable","state","root","primary","secondary"],"mappings":";;;;+BAUaC;;;;;;4BATb,iCAAiD;gCAGrB,4BAA4B;AAMjD,6CAA6C,CAACC;QACnDF,2BAAAA,EAAwCE;IAExC,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;8BACT,eAAA,EAACD,MAAME,OAAO,EAAA,CAAA;YACbF,MAAMG,SAAS,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,SAAS,EAAA,CAAA;;;AAG1C,EAAE"}

View File

@@ -0,0 +1,65 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useTeachingPopoverFooter_unstable", {
enumerable: true,
get: function() {
return useTeachingPopoverFooter_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 _reactbutton = require("@fluentui/react-button");
const _reactpopover = require("@fluentui/react-popover");
const useTeachingPopoverFooter_unstable = (props, ref)=>{
const appearance = (0, _reactpopover.usePopoverContext_unstable)((context)=>context.appearance);
const toggleOpen = (0, _reactpopover.usePopoverContext_unstable)((context)=>context.toggleOpen);
const handleButtonClick = (0, _reactutilities.useEventCallback)((event)=>{
if (event.isDefaultPrevented()) {
return;
}
toggleOpen(event);
});
const secondary = _reactutilities.slot.optional(props.secondary, {
defaultProps: {
appearance: appearance === 'brand' ? 'primary' : undefined
},
renderByDefault: props.secondary !== undefined,
elementType: _reactbutton.Button
});
// Merge any provided callback with close trigger
if (secondary) {
secondary.onClick = (0, _reactutilities.mergeCallbacks)(handleButtonClick, secondary === null || secondary === void 0 ? void 0 : secondary.onClick);
}
const primary = _reactutilities.slot.always(props.primary, {
defaultProps: {
appearance: appearance === 'brand' ? undefined : 'primary'
},
elementType: _reactbutton.Button
});
// Primary button will close the popover if no secondary action is available.
if (!secondary) {
primary.onClick = (0, _reactutilities.mergeCallbacks)(handleButtonClick, primary === null || primary === void 0 ? void 0 : primary.onClick);
}
var _props_footerLayout;
return {
footerLayout: (_props_footerLayout = props.footerLayout) !== null && _props_footerLayout !== void 0 ? _props_footerLayout : 'horizontal',
appearance,
components: {
root: 'div',
primary: _reactbutton.Button,
secondary: _reactbutton.Button
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
ref,
...props
}), {
elementType: 'div'
}),
secondary,
primary
};
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverFooter/useTeachingPopoverFooter.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport type { TeachingPopoverFooterProps, TeachingPopoverFooterState } from './TeachingPopoverFooter.types';\nimport { Button } from '@fluentui/react-button';\nimport { usePopoverContext_unstable } from '@fluentui/react-popover';\n\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverFooter properties\n * @param ref - reference to root HTMLElement of TeachingPopoverFooter\n */\nexport const useTeachingPopoverFooter_unstable = (\n props: TeachingPopoverFooterProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverFooterState => {\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);\n\n const handleButtonClick = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n\n toggleOpen(event);\n },\n );\n\n const secondary = slot.optional(props.secondary, {\n defaultProps: {\n appearance: appearance === 'brand' ? 'primary' : undefined,\n },\n renderByDefault: props.secondary !== undefined,\n elementType: Button,\n });\n\n // Merge any provided callback with close trigger\n if (secondary) {\n secondary.onClick = mergeCallbacks(handleButtonClick, secondary?.onClick);\n }\n\n const primary = slot.always(props.primary, {\n defaultProps: {\n appearance: appearance === 'brand' ? undefined : 'primary',\n },\n elementType: Button,\n });\n\n // Primary button will close the popover if no secondary action is available.\n if (!secondary) {\n primary.onClick = mergeCallbacks(handleButtonClick, primary?.onClick);\n }\n\n return {\n footerLayout: props.footerLayout ?? 'horizontal',\n appearance,\n components: {\n root: 'div',\n primary: Button,\n secondary: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n secondary,\n primary,\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useEventCallback","Button","usePopoverContext_unstable","useTeachingPopoverFooter_unstable","props","ref","appearance","context","toggleOpen","handleButtonClick","event","isDefaultPrevented","secondary","optional","defaultProps","undefined","renderByDefault","elementType","onClick","primary","always","footerLayout","components","root"],"mappings":"AAAA;;;;;+BAaaO;;;;;;;iEAXU,QAAQ;gCACkD,4BAA4B;6BAEtF,yBAAyB;8BACL,0BAA0B;AAO9D,0CAA0C,CAC/CC,OACAC;IAEA,MAAMC,iBAAaJ,wCAAAA,EAA2BK,CAAAA,UAAWA,QAAQD,UAAU;IAC3E,MAAME,iBAAaN,wCAAAA,EAA2BK,CAAAA,UAAWA,QAAQC,UAAU;IAE3E,MAAMC,wBAAoBT,gCAAAA,EACxB,CAACU;QACC,IAAIA,MAAMC,kBAAkB,IAAI;YAC9B;QACF;QAEAH,WAAWE;IACb;IAGF,MAAME,YAAYb,oBAAAA,CAAKc,QAAQ,CAACT,MAAMQ,SAAS,EAAE;QAC/CE,cAAc;YACZR,YAAYA,eAAe,UAAU,YAAYS;QACnD;QACAC,iBAAiBZ,MAAMQ,SAAS,KAAKG;QACrCE,aAAahB,mBAAAA;IACf;IAEA,iDAAiD;IACjD,IAAIW,WAAW;QACbA,UAAUM,OAAO,GAAGpB,kCAAAA,EAAeW,mBAAmBG,cAAAA,QAAAA,cAAAA,KAAAA,IAAAA,KAAAA,IAAAA,UAAWM,OAAO;IAC1E;IAEA,MAAMC,UAAUpB,oBAAAA,CAAKqB,MAAM,CAAChB,MAAMe,OAAO,EAAE;QACzCL,cAAc;YACZR,YAAYA,eAAe,UAAUS,YAAY;QACnD;QACAE,aAAahB,mBAAAA;IACf;IAEA,6EAA6E;IAC7E,IAAI,CAACW,WAAW;QACdO,QAAQD,OAAO,OAAGpB,8BAAAA,EAAeW,mBAAmBU,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASD,OAAO;IACtE;QAGgBd;IADhB,OAAO;QACLiB,cAAcjB,CAAAA,sBAAAA,MAAMiB,YAAAA,AAAY,MAAA,QAAlBjB,wBAAAA,KAAAA,IAAAA,sBAAsB;QACpCE;QACAgB,YAAY;YACVC,MAAM;YACNJ,SAASlB,mBAAAA;YACTW,WAAWX,mBAAAA;QACb;QACAsB,MAAMxB,oBAAAA,CAAKqB,MAAM,KACfvB,wCAAAA,EAAyB,OAAO;YAC9BQ;YACA,GAAGD,KAAK;QACV,IACA;YAAEa,aAAa;QAAM;QAEvBL;QACAO;IACF;AACF,EAAE"}

View File

@@ -0,0 +1,128 @@
'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, {
teachingPopoverFooterClassNames: function() {
return teachingPopoverFooterClassNames;
},
useTeachingPopoverFooterStyles_unstable: function() {
return useTeachingPopoverFooterStyles_unstable;
}
});
const _react = require("@griffel/react");
const teachingPopoverFooterClassNames = {
root: 'fui-TeachingPopoverFooter',
primary: 'fui-TeachingPopoverFooter__primary',
secondary: 'fui-TeachingPopoverFooter__secondary'
};
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "f22iagw",
i8kkvl: 0,
Belr9w4: 0,
rmohyg: "f19gb1f4",
z8tnut: "f1kcqot9"
},
rootVertical: {
Beiy3e4: "f1vx9l62"
},
rootHorizontal: {
Beiy3e4: "f1063pyq",
Brf1p80: "f9c4gz4"
},
buttonRootVertical: {
a9b677: "f14z66ap",
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "ff3glw6"
},
buttonRootHorizontal: {
Bf4jedk: "f14es27b",
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "ff3glw6"
},
brandSecondary: {
g2u3we: "fm1ebug",
h3c5rm: [
"f28omuz",
"f1uhflii"
],
B9xav0g: "f1ixw5o4",
zhjwy3: [
"f1uhflii",
"f28omuz"
]
},
brandPrimary: {
sj55zd: "f16muhyy",
De3pzq: "f10s6wn9",
Bi91k9c: "f3ymbdj",
Jwef8y: "f1rgtb95",
B2d53fq: "f1pu27ff",
iro3zm: "f1d5c7in"
}
}, {
d: [
".f22iagw{display:flex;}",
[
".f19gb1f4{gap:8px;}",
{
p: -1
}
],
".f1kcqot9{padding-top:12px;}",
".f1vx9l62{flex-direction:column;}",
".f1063pyq{flex-direction:row;}",
".f9c4gz4{justify-content:flex-end;}",
".f14z66ap{width:auto;}",
[
".ff3glw6{border-radius:4px;}",
{
p: -1
}
],
".f14es27b{min-width:96px;}",
[
".ff3glw6{border-radius:4px;}",
{
p: -1
}
],
".fm1ebug{border-top-color:var(--colorNeutralForegroundOnBrand);}",
".f28omuz{border-right-color:var(--colorNeutralForegroundOnBrand);}",
".f1uhflii{border-left-color:var(--colorNeutralForegroundOnBrand);}",
".f1ixw5o4{border-bottom-color:var(--colorNeutralForegroundOnBrand);}",
".f16muhyy{color:var(--colorBrandForeground1);}",
".f10s6wn9{background-color:var(--colorNeutralForegroundOnBrand);}"
],
h: [
".f3ymbdj:hover{color:var(--colorCompoundBrandForeground1Hover);}",
".f1rgtb95:hover{background-color:var(--colorNeutralForegroundOnBrand);}",
".f1pu27ff:hover:active{color:var(--colorCompoundBrandForeground1Pressed);}",
".f1d5c7in:hover:active{background-color:var(--colorNeutralForegroundOnBrand);}"
]
});
const useTeachingPopoverFooterStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { appearance, footerLayout } = state;
state.root.className = (0, _react.mergeClasses)(teachingPopoverFooterClassNames.root, styles.root, footerLayout === 'horizontal' ? styles.rootHorizontal : styles.rootVertical, state.root.className);
if (state.secondary) {
state.secondary.className = (0, _react.mergeClasses)(teachingPopoverFooterClassNames.secondary, footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical, appearance === 'brand' ? styles.brandSecondary : undefined, state.secondary.className);
}
state.primary.className = (0, _react.mergeClasses)(teachingPopoverFooterClassNames.primary, footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical, appearance === 'brand' ? styles.brandPrimary : undefined, state.primary.className);
return state;
};

View File

@@ -0,0 +1,74 @@
'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, {
teachingPopoverFooterClassNames: function() {
return teachingPopoverFooterClassNames;
},
useTeachingPopoverFooterStyles_unstable: function() {
return useTeachingPopoverFooterStyles_unstable;
}
});
const _react = require("@griffel/react");
const _reacttheme = require("@fluentui/react-theme");
const teachingPopoverFooterClassNames = {
root: 'fui-TeachingPopoverFooter',
primary: 'fui-TeachingPopoverFooter__primary',
secondary: 'fui-TeachingPopoverFooter__secondary'
};
const useStyles = (0, _react.makeStyles)({
root: {
display: 'flex',
gap: '8px',
paddingTop: '12px'
},
rootVertical: {
flexDirection: 'column'
},
rootHorizontal: {
flexDirection: 'row',
justifyContent: 'flex-end'
},
buttonRootVertical: {
width: 'auto',
borderRadius: '4px'
},
buttonRootHorizontal: {
minWidth: '96px',
borderRadius: '4px'
},
brandSecondary: {
..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralForegroundOnBrand)
},
brandPrimary: {
color: _reacttheme.tokens.colorBrandForeground1,
backgroundColor: _reacttheme.tokens.colorNeutralForegroundOnBrand,
':hover': {
color: _reacttheme.tokens.colorCompoundBrandForeground1Hover,
backgroundColor: _reacttheme.tokens.colorNeutralForegroundOnBrand
},
':hover:active': {
color: _reacttheme.tokens.colorCompoundBrandForeground1Pressed,
backgroundColor: _reacttheme.tokens.colorNeutralForegroundOnBrand
}
}
});
const useTeachingPopoverFooterStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { appearance, footerLayout } = state;
state.root.className = (0, _react.mergeClasses)(teachingPopoverFooterClassNames.root, styles.root, footerLayout === 'horizontal' ? styles.rootHorizontal : styles.rootVertical, state.root.className);
if (state.secondary) {
state.secondary.className = (0, _react.mergeClasses)(teachingPopoverFooterClassNames.secondary, footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical, appearance === 'brand' ? styles.brandSecondary : undefined, state.secondary.className);
}
state.primary.className = (0, _react.mergeClasses)(teachingPopoverFooterClassNames.primary, footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical, appearance === 'brand' ? styles.brandPrimary : undefined, state.primary.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverFooter/useTeachingPopoverFooterStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TeachingPopoverFooterSlots, TeachingPopoverFooterState } from './TeachingPopoverFooter.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const teachingPopoverFooterClassNames: SlotClassNames<TeachingPopoverFooterSlots> = {\n root: 'fui-TeachingPopoverFooter',\n primary: 'fui-TeachingPopoverFooter__primary',\n secondary: 'fui-TeachingPopoverFooter__secondary',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n gap: '8px',\n paddingTop: '12px',\n },\n rootVertical: {\n flexDirection: 'column',\n },\n rootHorizontal: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n },\n buttonRootVertical: {\n width: 'auto',\n borderRadius: '4px',\n },\n buttonRootHorizontal: {\n minWidth: '96px',\n borderRadius: '4px',\n },\n brandSecondary: {\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n },\n brandPrimary: {\n color: tokens.colorBrandForeground1,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n ':hover': {\n color: tokens.colorCompoundBrandForeground1Hover,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n ':hover:active': {\n color: tokens.colorCompoundBrandForeground1Pressed,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverFooterStyles_unstable = (\n state: TeachingPopoverFooterState,\n): TeachingPopoverFooterState => {\n 'use no memo';\n\n const styles = useStyles();\n const { appearance, footerLayout } = state;\n\n state.root.className = mergeClasses(\n teachingPopoverFooterClassNames.root,\n styles.root,\n footerLayout === 'horizontal' ? styles.rootHorizontal : styles.rootVertical,\n state.root.className,\n );\n if (state.secondary) {\n state.secondary.className = mergeClasses(\n teachingPopoverFooterClassNames.secondary,\n footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical,\n appearance === 'brand' ? styles.brandSecondary : undefined,\n state.secondary.className,\n );\n }\n state.primary.className = mergeClasses(\n teachingPopoverFooterClassNames.primary,\n footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical,\n appearance === 'brand' ? styles.brandPrimary : undefined,\n state.primary.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","teachingPopoverFooterClassNames","root","primary","secondary","useStyles","display","gap","paddingTop","rootVertical","flexDirection","rootHorizontal","justifyContent","buttonRootVertical","width","borderRadius","buttonRootHorizontal","minWidth","brandSecondary","borderColor","colorNeutralForegroundOnBrand","brandPrimary","color","colorBrandForeground1","backgroundColor","colorCompoundBrandForeground1Hover","colorCompoundBrandForeground1Pressed","useTeachingPopoverFooterStyles_unstable","state","styles","appearance","footerLayout","className","undefined"],"mappings":"AAAA;;;;;;;;;;;;IAOaI,+BAAAA;;;2CA6CA0B;eAAAA;;;uBAlDwC,iBAAiB;4BAG/C,wBAAwB;AAExC,wCAAoF;IACzFzB,MAAM;IACNC,SAAS;IACTC,WAAW;AACb,EAAE;AAEF,MAAMC,gBAAYR,iBAAAA,EAAW;IAC3BK,MAAM;QACJI,SAAS;QACTC,KAAK;QACLC,YAAY;IACd;IACAC,cAAc;QACZC,eAAe;IACjB;IACAC,gBAAgB;QACdD,eAAe;QACfE,gBAAgB;IAClB;IACAC,oBAAoB;QAClBC,OAAO;QACPC,cAAc;IAChB;IACAC,sBAAsB;QACpBC,UAAU;QACVF,cAAc;IAChB;IACAG,gBAAgB;QACd,GAAGnB,iBAAAA,CAAWoB,WAAW,CAACnB,kBAAAA,CAAOoB,6BAA6B,CAAC;IACjE;IACAC,cAAc;QACZC,OAAOtB,kBAAAA,CAAOuB,qBAAqB;QACnCC,iBAAiBxB,kBAAAA,CAAOoB,6BAA6B;QACrD,UAAU;YACRE,OAAOtB,kBAAAA,CAAOyB,kCAAkC;YAChDD,iBAAiBxB,kBAAAA,CAAOoB,6BAA6B;QACvD;QACA,iBAAiB;YACfE,OAAOtB,kBAAAA,CAAO0B,oCAAoC;YAClDF,iBAAiBxB,kBAAAA,CAAOoB,6BAA6B;QACvD;IACF;AACF;AAGO,gDAAgD,CACrDQ;IAEA;IAEA,MAAMC,SAASxB;IACf,MAAM,EAAEyB,UAAU,EAAEC,YAAY,EAAE,GAAGH;IAErCA,MAAM1B,IAAI,CAAC8B,SAAS,OAAGlC,mBAAAA,EACrBG,gCAAgCC,IAAI,EACpC2B,OAAO3B,IAAI,EACX6B,iBAAiB,eAAeF,OAAOlB,cAAc,GAAGkB,OAAOpB,YAAY,EAC3EmB,MAAM1B,IAAI,CAAC8B,SAAS;IAEtB,IAAIJ,MAAMxB,SAAS,EAAE;QACnBwB,MAAMxB,SAAS,CAAC4B,SAAS,OAAGlC,mBAAAA,EAC1BG,gCAAgCG,SAAS,EACzC2B,iBAAiB,eAAeF,OAAOb,oBAAoB,GAAGa,OAAOhB,kBAAkB,EACvFiB,eAAe,UAAUD,OAAOX,cAAc,GAAGe,WACjDL,MAAMxB,SAAS,CAAC4B,SAAS;IAE7B;IACAJ,MAAMzB,OAAO,CAAC6B,SAAS,GAAGlC,uBAAAA,EACxBG,gCAAgCE,OAAO,EACvC4B,iBAAiB,eAAeF,OAAOb,oBAAoB,GAAGa,OAAOhB,kBAAkB,EACvFiB,eAAe,UAAUD,OAAOR,YAAY,GAAGY,WAC/CL,MAAMzB,OAAO,CAAC6B,SAAS;IAGzB,OAAOJ;AACT,EAAE"}