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,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useSplitButton_unstable", {
enumerable: true,
get: function() {
return useSplitButton_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 _Button = require("../Button/Button");
const _MenuButton = require("../MenuButton/MenuButton");
const useSplitButton_unstable = (props, ref)=>{
const { appearance = 'secondary', children, disabled = false, disabledFocusable = false, icon, iconPosition = 'before', menuButton, menuIcon, primaryActionButton, shape = 'rounded', size = 'medium', ...rest } = props;
const baseId = (0, _reactutilities.useId)('splitButton-');
const menuButtonShorthand = _reactutilities.slot.optional(menuButton, {
defaultProps: {
appearance,
disabled,
disabledFocusable,
menuIcon,
shape,
size
},
renderByDefault: true,
elementType: _MenuButton.MenuButton
});
const primaryActionButtonShorthand = _reactutilities.slot.optional(primaryActionButton, {
defaultProps: {
appearance,
children,
disabled,
disabledFocusable,
icon,
iconPosition,
id: baseId + '__primaryActionButton',
shape,
size
},
renderByDefault: true,
elementType: _Button.Button
});
// Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the
// user.
if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
}
return {
// Props passed at the top-level
appearance,
disabled,
disabledFocusable,
iconPosition,
shape,
size,
components: {
root: 'div',
menuButton: _MenuButton.MenuButton,
primaryActionButton: _Button.Button
},
root: _reactutilities.slot.always({
ref: ref,
...rest
}, {
elementType: 'div'
}),
menuButton: menuButtonShorthand,
primaryActionButton: primaryActionButtonShorthand
};
};