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 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFluentIcon = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const shared_1 = require("./shared");
const useIconState_1 = require("./useIconState");
/**
* Base createFluentIcon — SVG icon factory without Styles.
*
* Returns a React component that renders an SVG icon with:
* - data-fui-icon attribute for CSS targeting
* - a11y attributes (aria-hidden, aria-label, role)
* - RTL flip via data-fui-icon-rtl attribute
* - HCM forced-color-adjust via CSS attribute selector
*
* @access private
* @alpha
*/
const createFluentIcon = (displayName, width, pathsOrSvg, options) => {
const viewBoxWidth = width === '1em' ? '20' : width;
const Icon = React.forwardRef((props, ref) => {
const iconState = useIconState_1.useIconState(props, { flipInRtl: options === null || options === void 0 ? void 0 : options.flipInRtl });
const state = {
...iconState,
className: shared_1.cx(shared_1.iconClassName, iconState.className),
ref,
width,
height: width,
viewBox: `0 0 ${viewBoxWidth} ${viewBoxWidth}`,
xmlns: 'http://www.w3.org/2000/svg',
};
if (typeof pathsOrSvg === 'string') {
return React.createElement('svg', { ...state, dangerouslySetInnerHTML: { __html: pathsOrSvg } });
}
else {
return React.createElement('svg', state, ...pathsOrSvg.map((d) => React.createElement('path', { d, fill: state.fill })));
}
});
Icon.displayName = displayName;
return Icon;
};
exports.createFluentIcon = createFluentIcon;