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,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getPositionStyles", {
enumerable: true,
get: function() {
return getPositionStyles;
}
});
const getPositionStyles = (position, dir, offset)=>{
const positionStyles = {};
var _offset_position;
const offsetStyles = offset ? isShorthandOffset(offset) ? offset : (_offset_position = offset[position]) !== null && _offset_position !== void 0 ? _offset_position : {} : {};
const centered = position === 'top' || position === 'bottom';
const { horizontal = centered ? 0 : 20, vertical = 16 } = offsetStyles;
const start = dir === 'ltr' ? 'left' : 'right';
const end = dir === 'ltr' ? 'right' : 'left';
switch(position){
case 'top':
Object.assign(positionStyles, {
top: vertical,
left: `calc(50% + ${horizontal}px)`,
transform: 'translateX(-50%)'
});
break;
case 'bottom':
Object.assign(positionStyles, {
bottom: vertical,
left: `calc(50% + ${horizontal}px)`,
transform: 'translateX(-50%)'
});
break;
case 'top-start':
Object.assign(positionStyles, {
top: vertical,
[start]: horizontal
});
break;
case 'top-end':
Object.assign(positionStyles, {
top: vertical,
[end]: horizontal
});
break;
case 'bottom-start':
Object.assign(positionStyles, {
bottom: vertical,
[start]: horizontal
});
break;
case 'bottom-end':
Object.assign(positionStyles, {
bottom: vertical,
[end]: horizontal
});
break;
}
return positionStyles;
};
function isShorthandOffset(offset) {
return 'horizontal' in offset || 'vertical' in offset;
}