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,43 @@
import { defaultOptions, FOCUS_VISIBLE_ATTR, FOCUS_WITHIN_ATTR } from './constants';
/**
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
* Should be used only when @see createFocusOutlineStyle does not fit requirements
*
* If you're using `createCustomFocusIndicatorStyle` instead of `createFocusOutlineStyle`
* keep in mind that the default outline style is not going to be removed
* (as it is in `createFocusOutlineStyle`),
* and is your responsibility to manually remove it from your styles.
*
* @example
* ```ts
* // Link styles
* const useStyles = makeStyles({
focusIndicator: createCustomFocusIndicatorStyle({
textDecorationColor: tokens.colorStrokeFocus2,
textDecorationLine: 'underline',
textDecorationStyle: 'double',
outlineStyle: 'none',
}),
// Common styles.
root: {
// ❗️ DO NOT FORGET TO REMOVE THE DEFAULT OUTLINE STYLE
':focus-visible': {
outlineStyle: 'none',
},
* ```
*
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
* @param options - Configure the style of the focus outline
*/ export function createCustomFocusIndicatorStyle(style, { selector: selectorType = defaultOptions.selector, customizeSelector = defaultOptions.customizeSelector } = defaultOptions) {
return {
[customizeSelector(createBaseSelector(selectorType))]: style
};
}
function createBaseSelector(selectorType) {
switch(selectorType){
case 'focus':
return `&[${FOCUS_VISIBLE_ATTR}]`;
case 'focus-within':
return `&[${FOCUS_WITHIN_ATTR}]:focus-within`;
}
}