@fluentui/react-button 9.3.3 → 9.3.5
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +30 -0
- package/CHANGELOG.json +97 -1
- package/CHANGELOG.md +31 -2
- package/lib/Button.js.map +1 -1
- package/lib/CompoundButton.js.map +1 -1
- package/lib/MenuButton.js.map +1 -1
- package/lib/SplitButton.js.map +1 -1
- package/lib/ToggleButton.js.map +1 -1
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.types.js.map +1 -1
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/renderButton.js +1 -7
- package/lib/components/Button/renderButton.js.map +1 -1
- package/lib/components/Button/useButton.js +1 -0
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonStyles.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib/components/CompoundButton/index.js.map +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.js +1 -11
- package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButton.js +3 -2
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib/components/MenuButton/index.js.map +1 -1
- package/lib/components/MenuButton/renderMenuButton.js +1 -7
- package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButton.js +2 -2
- package/lib/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
- package/lib/components/SplitButton/index.js.map +1 -1
- package/lib/components/SplitButton/renderSplitButton.js +1 -7
- package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButton.js +1 -0
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib/components/ToggleButton/index.js.map +1 -1
- package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButton.js +1 -0
- package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib/contexts/ButtonContext.js +2 -4
- package/lib/contexts/ButtonContext.js.map +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/useToggleState.js.map +1 -1
- package/lib-commonjs/Button.js +5 -4
- package/lib-commonjs/Button.js.map +1 -1
- package/lib-commonjs/CompoundButton.js +5 -4
- package/lib-commonjs/CompoundButton.js.map +1 -1
- package/lib-commonjs/MenuButton.js +5 -4
- package/lib-commonjs/MenuButton.js.map +1 -1
- package/lib-commonjs/SplitButton.js +5 -4
- package/lib-commonjs/SplitButton.js.map +1 -1
- package/lib-commonjs/ToggleButton.js +5 -4
- package/lib-commonjs/ToggleButton.js.map +1 -1
- package/lib-commonjs/components/Button/Button.js +19 -21
- package/lib-commonjs/components/Button/Button.js.map +1 -1
- package/lib-commonjs/components/Button/Button.types.js +3 -2
- package/lib-commonjs/components/Button/Button.types.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +17 -19
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/renderButton.js +14 -26
- package/lib-commonjs/components/Button/renderButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButton.js +40 -52
- package/lib-commonjs/components/Button/useButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.js +1129 -471
- package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.js +19 -21
- package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +3 -2
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/index.js +18 -20
- package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +14 -30
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js +31 -36
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +315 -184
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.js +19 -22
- package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.js +3 -2
- package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib-commonjs/components/MenuButton/index.js +18 -20
- package/lib-commonjs/components/MenuButton/index.js.map +1 -1
- package/lib-commonjs/components/MenuButton/renderMenuButton.js +14 -26
- package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.js +34 -37
- package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +166 -106
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.js +19 -22
- package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.js +3 -2
- package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
- package/lib-commonjs/components/SplitButton/index.js +18 -20
- package/lib-commonjs/components/SplitButton/index.js.map +1 -1
- package/lib-commonjs/components/SplitButton/renderSplitButton.js +13 -22
- package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.js +66 -79
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +263 -106
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.js +19 -21
- package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +3 -2
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/index.js +18 -20
- package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/renderToggleButton.js +6 -8
- package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.js +14 -16
- package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +897 -380
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-commonjs/contexts/ButtonContext.js +18 -19
- package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +5 -4
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +47 -179
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +5 -4
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/useToggleState.js +40 -40
- package/lib-commonjs/utils/useToggleState.js.map +1 -1
- package/package.json +12 -11
- package/lib-amd/Button.js +0 -6
- package/lib-amd/Button.js.map +0 -1
- package/lib-amd/CompoundButton.js +0 -6
- package/lib-amd/CompoundButton.js.map +0 -1
- package/lib-amd/MenuButton.js +0 -6
- package/lib-amd/MenuButton.js.map +0 -1
- package/lib-amd/SplitButton.js +0 -6
- package/lib-amd/SplitButton.js.map +0 -1
- package/lib-amd/ToggleButton.js +0 -6
- package/lib-amd/ToggleButton.js.map +0 -1
- package/lib-amd/components/Button/Button.js +0 -18
- package/lib-amd/components/Button/Button.js.map +0 -1
- package/lib-amd/components/Button/Button.types.js +0 -5
- package/lib-amd/components/Button/Button.types.js.map +0 -1
- package/lib-amd/components/Button/index.js +0 -11
- package/lib-amd/components/Button/index.js.map +0 -1
- package/lib-amd/components/Button/renderButton.js +0 -18
- package/lib-amd/components/Button/renderButton.js.map +0 -1
- package/lib-amd/components/Button/useButton.js +0 -41
- package/lib-amd/components/Button/useButton.js.map +0 -1
- package/lib-amd/components/Button/useButtonStyles.js +0 -227
- package/lib-amd/components/Button/useButtonStyles.js.map +0 -1
- package/lib-amd/components/CompoundButton/CompoundButton.js +0 -18
- package/lib-amd/components/CompoundButton/CompoundButton.js.map +0 -1
- package/lib-amd/components/CompoundButton/CompoundButton.types.js +0 -5
- package/lib-amd/components/CompoundButton/CompoundButton.types.js.map +0 -1
- package/lib-amd/components/CompoundButton/index.js +0 -12
- package/lib-amd/components/CompoundButton/index.js.map +0 -1
- package/lib-amd/components/CompoundButton/renderCompoundButton.js +0 -20
- package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +0 -1
- package/lib-amd/components/CompoundButton/useCompoundButton.js +0 -27
- package/lib-amd/components/CompoundButton/useCompoundButton.js.map +0 -1
- package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js +0 -216
- package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js.map +0 -1
- package/lib-amd/components/MenuButton/MenuButton.js +0 -19
- package/lib-amd/components/MenuButton/MenuButton.js.map +0 -1
- package/lib-amd/components/MenuButton/MenuButton.types.js +0 -5
- package/lib-amd/components/MenuButton/MenuButton.types.js.map +0 -1
- package/lib-amd/components/MenuButton/index.js +0 -12
- package/lib-amd/components/MenuButton/index.js.map +0 -1
- package/lib-amd/components/MenuButton/renderMenuButton.js +0 -18
- package/lib-amd/components/MenuButton/renderMenuButton.js.map +0 -1
- package/lib-amd/components/MenuButton/useMenuButton.js +0 -30
- package/lib-amd/components/MenuButton/useMenuButton.js.map +0 -1
- package/lib-amd/components/MenuButton/useMenuButtonStyles.js +0 -97
- package/lib-amd/components/MenuButton/useMenuButtonStyles.js.map +0 -1
- package/lib-amd/components/SplitButton/SplitButton.js +0 -19
- package/lib-amd/components/SplitButton/SplitButton.js.map +0 -1
- package/lib-amd/components/SplitButton/SplitButton.types.js +0 -5
- package/lib-amd/components/SplitButton/SplitButton.types.js.map +0 -1
- package/lib-amd/components/SplitButton/index.js +0 -12
- package/lib-amd/components/SplitButton/index.js.map +0 -1
- package/lib-amd/components/SplitButton/renderSplitButton.js +0 -16
- package/lib-amd/components/SplitButton/renderSplitButton.js.map +0 -1
- package/lib-amd/components/SplitButton/useSplitButton.js +0 -67
- package/lib-amd/components/SplitButton/useSplitButton.js.map +0 -1
- package/lib-amd/components/SplitButton/useSplitButtonStyles.js +0 -162
- package/lib-amd/components/SplitButton/useSplitButtonStyles.js.map +0 -1
- package/lib-amd/components/ToggleButton/ToggleButton.js +0 -18
- package/lib-amd/components/ToggleButton/ToggleButton.js.map +0 -1
- package/lib-amd/components/ToggleButton/ToggleButton.types.js +0 -5
- package/lib-amd/components/ToggleButton/ToggleButton.types.js.map +0 -1
- package/lib-amd/components/ToggleButton/index.js +0 -12
- package/lib-amd/components/ToggleButton/index.js.map +0 -1
- package/lib-amd/components/ToggleButton/renderToggleButton.js +0 -7
- package/lib-amd/components/ToggleButton/renderToggleButton.js.map +0 -1
- package/lib-amd/components/ToggleButton/useToggleButton.js +0 -17
- package/lib-amd/components/ToggleButton/useToggleButton.js.map +0 -1
- package/lib-amd/components/ToggleButton/useToggleButtonStyles.js +0 -87
- package/lib-amd/components/ToggleButton/useToggleButtonStyles.js.map +0 -1
- package/lib-amd/contexts/ButtonContext.js +0 -19
- package/lib-amd/contexts/ButtonContext.js.map +0 -1
- package/lib-amd/contexts/index.js +0 -6
- package/lib-amd/contexts/index.js.map +0 -1
- package/lib-amd/index.js +0 -34
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/index.js +0 -6
- package/lib-amd/utils/index.js.map +0 -1
- package/lib-amd/utils/useToggleState.js +0 -27
- package/lib-amd/utils/useToggleState.js.map +0 -1
@@ -1,20 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.renderCompoundButton_unstable = void 0;
|
5
|
-
/**
|
6
|
-
* Renders a CompoundButton component by passing the state defined props to the appropriate slots.
|
7
|
-
*/
|
8
|
-
var renderCompoundButton_unstable = function (state) {
|
9
|
-
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
10
|
-
var iconOnly = state.iconOnly, iconPosition = state.iconPosition;
|
11
|
-
return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
|
12
|
-
iconPosition !== 'after' && slots.icon && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)),
|
13
|
-
!iconOnly && (React.createElement(slots.contentContainer, tslib_1.__assign({}, slotProps.contentContainer),
|
14
|
-
slotProps.root.children,
|
15
|
-
slots.secondaryContent && React.createElement(slots.secondaryContent, tslib_1.__assign({}, slotProps.secondaryContent)))),
|
16
|
-
iconPosition === 'after' && slots.icon && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon))));
|
17
|
-
};
|
18
|
-
exports.renderCompoundButton_unstable = renderCompoundButton_unstable;
|
19
|
-
});
|
20
|
-
//# sourceMappingURL=renderCompoundButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"renderCompoundButton.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/CompoundButton/renderCompoundButton.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,6BAA6B,GAAG,UAAC,KAA0B;QAChE,IAAA,KAAuB,0BAAQ,CAAsB,KAAK,CAAC,EAAzD,KAAK,WAAA,EAAE,SAAS,eAAyC,CAAC;QAC1D,IAAA,QAAQ,GAAmB,KAAK,SAAxB,EAAE,YAAY,GAAK,KAAK,aAAV,CAAW;QAEzC,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC3B,YAAY,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI;YAC5E,CAAC,QAAQ,IAAI,CACZ,oBAAC,KAAK,CAAC,gBAAgB,uBAAK,SAAS,CAAC,gBAAgB;gBACnD,SAAS,CAAC,IAAI,CAAC,QAAQ;gBACvB,KAAK,CAAC,gBAAgB,IAAI,oBAAC,KAAK,CAAC,gBAAgB,uBAAK,SAAS,CAAC,gBAAgB,EAAI,CAC9D,CAC1B;YACA,YAAY,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAClE,CACd,CAAC;IACJ,CAAC,CAAC;IAhBW,QAAA,6BAA6B,iCAgBxC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton_unstable = (state: CompoundButtonState) => {\n const { slots, slotProps } = getSlots<CompoundButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && (\n <slots.contentContainer {...slotProps.contentContainer}>\n {slotProps.root.children}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n </slots.contentContainer>\n )}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"]}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "@fluentui/react-utilities", "../Button/index"], function (require, exports, tslib_1, react_utilities_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCompoundButton_unstable = void 0;
|
5
|
-
/**
|
6
|
-
* Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
|
7
|
-
* @param props - User provided props to the CompoundButton component.
|
8
|
-
* @param ref - User provided ref to be passed to the CompoundButton component.
|
9
|
-
*/
|
10
|
-
var useCompoundButton_unstable = function (_a, ref) {
|
11
|
-
var _b, _c;
|
12
|
-
var contentContainer = _a.contentContainer, secondaryContent = _a.secondaryContent, props = tslib_1.__rest(_a, ["contentContainer", "secondaryContent"]);
|
13
|
-
var state = tslib_1.__assign(tslib_1.__assign({}, index_1.useButton_unstable(props, ref)), {
|
14
|
-
// Slots definition
|
15
|
-
components: {
|
16
|
-
root: 'button',
|
17
|
-
icon: 'span',
|
18
|
-
contentContainer: 'span',
|
19
|
-
secondaryContent: 'span',
|
20
|
-
}, contentContainer: react_utilities_1.resolveShorthand(contentContainer, { required: true }), secondaryContent: react_utilities_1.resolveShorthand(secondaryContent) });
|
21
|
-
// Recalculate iconOnly to take into account secondaryContent.
|
22
|
-
state.iconOnly = Boolean(((_b = state.icon) === null || _b === void 0 ? void 0 : _b.children) && !props.children && !((_c = state.secondaryContent) === null || _c === void 0 ? void 0 : _c.children));
|
23
|
-
return state;
|
24
|
-
};
|
25
|
-
exports.useCompoundButton_unstable = useCompoundButton_unstable;
|
26
|
-
});
|
27
|
-
//# sourceMappingURL=useCompoundButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCompoundButton.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/CompoundButton/useCompoundButton.ts"],"names":[],"mappings":";;;;IAKA;;;;OAIG;IACI,IAAM,0BAA0B,GAAG,UACxC,EAAqE,EACrE,GAAqD;;QADnD,IAAA,gBAAgB,sBAAA,EAAE,gBAAgB,sBAAA,EAAK,KAAK,sBAA9C,wCAAgD,CAAF;QAG9C,IAAM,KAAK,yCAEN,0BAAkB,CAAC,KAAK,EAAE,GAAG,CAAC;YAEjC,mBAAmB;YACnB,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,MAAM;gBACZ,gBAAgB,EAAE,MAAM;gBACxB,gBAAgB,EAAE,MAAM;aACzB,EACD,gBAAgB,EAAE,kCAAgB,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EACxE,gBAAgB,EAAE,kCAAgB,CAAC,gBAAgB,CAAC,GACrD,CAAC;QAEF,8DAA8D;QAC9D,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,QAAQ,KAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,QAAQ,CAAA,CAAC,CAAC;QAEvG,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAvBW,QAAA,0BAA0B,8BAuBrC","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\nimport type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = (\n { contentContainer, secondaryContent, ...props }: CompoundButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonState => {\n const state: CompoundButtonState = {\n // Button state\n ...useButton_unstable(props, ref),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span',\n },\n contentContainer: resolveShorthand(contentContainer, { required: true }),\n secondaryContent: resolveShorthand(secondaryContent),\n };\n\n // Recalculate iconOnly to take into account secondaryContent.\n state.iconOnly = Boolean(state.icon?.children && !props.children && !state.secondaryContent?.children);\n\n return state;\n};\n"]}
|
@@ -1,216 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "@fluentui/react-theme", "@griffel/react", "../Button/useButtonStyles"], function (require, exports, tslib_1, react_theme_1, react_1, useButtonStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
-
exports.useCompoundButtonStyles_unstable = exports.compoundButtonClassNames = void 0;
|
6
|
-
exports.compoundButtonClassNames = {
|
7
|
-
root: 'fui-CompoundButton',
|
8
|
-
icon: 'fui-CompoundButton__icon',
|
9
|
-
contentContainer: 'fui-CompoundButton__contentContainer',
|
10
|
-
secondaryContent: 'fui-CompoundButton__secondaryContent',
|
11
|
-
};
|
12
|
-
var useRootStyles = react_1.makeStyles({
|
13
|
-
// Base styles
|
14
|
-
base: (_a = {
|
15
|
-
height: 'auto'
|
16
|
-
},
|
17
|
-
_a["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
18
|
-
color: react_theme_1.tokens.colorNeutralForeground2,
|
19
|
-
},
|
20
|
-
_a[':hover'] = (_b = {},
|
21
|
-
_b["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
22
|
-
color: react_theme_1.tokens.colorNeutralForeground2Hover,
|
23
|
-
},
|
24
|
-
_b),
|
25
|
-
_a[':hover:active'] = (_c = {},
|
26
|
-
_c["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
27
|
-
color: react_theme_1.tokens.colorNeutralForeground2Pressed,
|
28
|
-
},
|
29
|
-
_c),
|
30
|
-
_a),
|
31
|
-
// High contrast styles
|
32
|
-
highContrast: {
|
33
|
-
'@media (forced-colors: active)': {
|
34
|
-
':hover': (_d = {},
|
35
|
-
_d["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
36
|
-
color: 'Highlight',
|
37
|
-
},
|
38
|
-
_d),
|
39
|
-
':hover:active': (_e = {},
|
40
|
-
_e["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
41
|
-
color: 'Highlight',
|
42
|
-
},
|
43
|
-
_e),
|
44
|
-
},
|
45
|
-
},
|
46
|
-
// Appearance variations
|
47
|
-
outline: {
|
48
|
-
/* No styles */
|
49
|
-
},
|
50
|
-
primary: (_f = {},
|
51
|
-
_f["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
52
|
-
color: react_theme_1.tokens.colorNeutralForegroundOnBrand,
|
53
|
-
},
|
54
|
-
_f[':hover'] = (_g = {},
|
55
|
-
_g["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
56
|
-
color: react_theme_1.tokens.colorNeutralForegroundOnBrand,
|
57
|
-
},
|
58
|
-
_g),
|
59
|
-
_f[':hover:active'] = (_h = {},
|
60
|
-
_h["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
61
|
-
color: react_theme_1.tokens.colorNeutralForegroundOnBrand,
|
62
|
-
},
|
63
|
-
_h),
|
64
|
-
_f['@media (forced-colors: active)'] = (_j = {},
|
65
|
-
_j["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
66
|
-
color: 'HighlightText',
|
67
|
-
},
|
68
|
-
_j),
|
69
|
-
_f),
|
70
|
-
secondary: {
|
71
|
-
/* The secondary styles are exactly the same as the base styles. */
|
72
|
-
},
|
73
|
-
subtle: (_k = {},
|
74
|
-
_k["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
75
|
-
color: react_theme_1.tokens.colorNeutralForeground2,
|
76
|
-
},
|
77
|
-
_k[':hover'] = (_l = {},
|
78
|
-
_l["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
79
|
-
color: react_theme_1.tokens.colorNeutralForeground2Hover,
|
80
|
-
},
|
81
|
-
_l),
|
82
|
-
_k[':hover:active'] = (_m = {},
|
83
|
-
_m["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
84
|
-
color: react_theme_1.tokens.colorNeutralForeground2Pressed,
|
85
|
-
},
|
86
|
-
_m),
|
87
|
-
_k),
|
88
|
-
transparent: (_o = {},
|
89
|
-
_o["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
90
|
-
color: react_theme_1.tokens.colorNeutralForeground2,
|
91
|
-
},
|
92
|
-
_o[':hover'] = (_p = {},
|
93
|
-
_p["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
94
|
-
color: react_theme_1.tokens.colorNeutralForeground2BrandHover,
|
95
|
-
},
|
96
|
-
_p),
|
97
|
-
_o[':hover:active'] = (_q = {},
|
98
|
-
_q["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
99
|
-
color: react_theme_1.tokens.colorNeutralForeground2BrandPressed,
|
100
|
-
},
|
101
|
-
_q),
|
102
|
-
_o),
|
103
|
-
// Size variations
|
104
|
-
small: tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding(react_theme_1.tokens.spacingHorizontalS, react_theme_1.tokens.spacingHorizontalS, react_theme_1.tokens.spacingHorizontalMNudge, react_theme_1.tokens.spacingHorizontalS)), { fontSize: react_theme_1.tokens.fontSizeBase300, lineHeight: react_theme_1.tokens.lineHeightBase300 }),
|
105
|
-
medium: tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding('14px', react_theme_1.tokens.spacingHorizontalM, react_theme_1.tokens.spacingHorizontalL, react_theme_1.tokens.spacingHorizontalM)), { fontSize: react_theme_1.tokens.fontSizeBase300, lineHeight: react_theme_1.tokens.lineHeightBase300 }),
|
106
|
-
large: tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding('18px', react_theme_1.tokens.spacingHorizontalL, react_theme_1.tokens.spacingHorizontalXL, react_theme_1.tokens.spacingHorizontalL)), { fontSize: react_theme_1.tokens.fontSizeBase400, lineHeight: react_theme_1.tokens.lineHeightBase400 }),
|
107
|
-
// Disabled styles
|
108
|
-
disabled: (_r = {},
|
109
|
-
_r["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
110
|
-
color: react_theme_1.tokens.colorNeutralForegroundDisabled,
|
111
|
-
},
|
112
|
-
_r[':hover'] = (_s = {},
|
113
|
-
_s["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
114
|
-
color: react_theme_1.tokens.colorNeutralForegroundDisabled,
|
115
|
-
},
|
116
|
-
_s),
|
117
|
-
_r[':hover:active'] = (_t = {},
|
118
|
-
_t["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
119
|
-
color: react_theme_1.tokens.colorNeutralForegroundDisabled,
|
120
|
-
},
|
121
|
-
_t),
|
122
|
-
_r),
|
123
|
-
// Disabled high contrast styles
|
124
|
-
disabledHighContrast: {
|
125
|
-
'@media (forced-colors: active)': (_u = {},
|
126
|
-
_u["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
127
|
-
color: 'GrayText',
|
128
|
-
},
|
129
|
-
_u[':hover'] = (_v = {},
|
130
|
-
_v["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
131
|
-
color: 'GrayText',
|
132
|
-
},
|
133
|
-
_v),
|
134
|
-
_u[':hover:active'] = (_w = {},
|
135
|
-
_w["& ." + exports.compoundButtonClassNames.secondaryContent] = {
|
136
|
-
color: 'GrayText',
|
137
|
-
},
|
138
|
-
_w),
|
139
|
-
_u),
|
140
|
-
},
|
141
|
-
});
|
142
|
-
var useRootIconOnlyStyles = react_1.makeStyles({
|
143
|
-
// Size variations
|
144
|
-
small: tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding(react_theme_1.tokens.spacingHorizontalXS)), { maxWidth: '48px', minWidth: '48px' }),
|
145
|
-
medium: tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding(react_theme_1.tokens.spacingHorizontalSNudge)), { maxWidth: '52px', minWidth: '52px' }),
|
146
|
-
large: tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding(react_theme_1.tokens.spacingHorizontalS)), { maxWidth: '56px', minWidth: '56px' }),
|
147
|
-
});
|
148
|
-
var useIconStyles = react_1.makeStyles({
|
149
|
-
// Base styles
|
150
|
-
base: {
|
151
|
-
fontSize: '40px',
|
152
|
-
height: '40px',
|
153
|
-
width: '40px',
|
154
|
-
},
|
155
|
-
// Icon position variations
|
156
|
-
before: {
|
157
|
-
marginRight: react_theme_1.tokens.spacingHorizontalM,
|
158
|
-
},
|
159
|
-
after: {
|
160
|
-
marginLeft: react_theme_1.tokens.spacingHorizontalM,
|
161
|
-
},
|
162
|
-
});
|
163
|
-
var useContentContainerStyles = react_1.makeStyles({
|
164
|
-
// Base styles
|
165
|
-
base: {
|
166
|
-
display: 'flex',
|
167
|
-
flexDirection: 'column',
|
168
|
-
textAlign: 'left',
|
169
|
-
},
|
170
|
-
});
|
171
|
-
var useSecondaryContentStyles = react_1.makeStyles({
|
172
|
-
// Base styles
|
173
|
-
base: {
|
174
|
-
lineHeight: '100%',
|
175
|
-
fontWeight: react_theme_1.tokens.fontWeightRegular,
|
176
|
-
},
|
177
|
-
// Size variations
|
178
|
-
small: {
|
179
|
-
fontSize: react_theme_1.tokens.fontSizeBase200,
|
180
|
-
},
|
181
|
-
medium: {
|
182
|
-
fontSize: react_theme_1.tokens.fontSizeBase200,
|
183
|
-
},
|
184
|
-
large: {
|
185
|
-
fontSize: react_theme_1.tokens.fontSizeBase300,
|
186
|
-
},
|
187
|
-
});
|
188
|
-
var useCompoundButtonStyles_unstable = function (state) {
|
189
|
-
var rootStyles = useRootStyles();
|
190
|
-
var rootIconOnlyStyles = useRootIconOnlyStyles();
|
191
|
-
var iconStyles = useIconStyles();
|
192
|
-
var contentContainerStyles = useContentContainerStyles();
|
193
|
-
var secondaryContentStyles = useSecondaryContentStyles();
|
194
|
-
var appearance = state.appearance, disabled = state.disabled, disabledFocusable = state.disabledFocusable, iconOnly = state.iconOnly, iconPosition = state.iconPosition, size = state.size;
|
195
|
-
state.root.className = react_1.mergeClasses(exports.compoundButtonClassNames.root,
|
196
|
-
// Root styles
|
197
|
-
rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size],
|
198
|
-
// Disabled styles
|
199
|
-
(disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast,
|
200
|
-
// Icon-only styles
|
201
|
-
iconOnly && rootIconOnlyStyles[size],
|
202
|
-
// User provided class name
|
203
|
-
state.root.className);
|
204
|
-
state.contentContainer.className = react_1.mergeClasses(exports.compoundButtonClassNames.contentContainer, contentContainerStyles.base, state.contentContainer.className);
|
205
|
-
if (state.icon) {
|
206
|
-
state.icon.className = react_1.mergeClasses(exports.compoundButtonClassNames.icon, iconStyles.base, state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition], state.icon.className);
|
207
|
-
}
|
208
|
-
if (state.secondaryContent) {
|
209
|
-
state.secondaryContent.className = react_1.mergeClasses(exports.compoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
|
210
|
-
}
|
211
|
-
useButtonStyles_1.useButtonStyles_unstable(state);
|
212
|
-
return state;
|
213
|
-
};
|
214
|
-
exports.useCompoundButtonStyles_unstable = useCompoundButtonStyles_unstable;
|
215
|
-
});
|
216
|
-
//# sourceMappingURL=useCompoundButtonStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCompoundButtonStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/CompoundButton/useCompoundButtonStyles.ts"],"names":[],"mappings":";;;;;IAMa,QAAA,wBAAwB,GAAwC;QAC3E,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,0BAA0B;QAChC,gBAAgB,EAAE,sCAAsC;QACxD,g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3B,sBAAsB,CAAC,IAAI,CAAC,EAC5B,KAAK,CAAC,gBAAgB,CAAC,SAAS,CACjC,CAAC;SACH;QAED,0CAAwB,CAAC,KAAK,CAAC,CAAC;QAEhC,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAxDW,QAAA,gCAAgC,oCAwD3C","sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\nexport const compoundButtonClassNames: SlotClassNames<CompoundButtonSlots> = {\n root: 'fui-CompoundButton',\n icon: 'fui-CompoundButton__icon',\n contentContainer: 'fui-CompoundButton__contentContainer',\n secondaryContent: 'fui-CompoundButton__secondaryContent',\n};\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n height: 'auto',\n\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'HighlightText',\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n transparent: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n\n // Size variations\n small: {\n ...shorthands.padding(\n tokens.spacingHorizontalS,\n tokens.spacingHorizontalS,\n tokens.spacingHorizontalMNudge,\n tokens.spacingHorizontalS,\n ),\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n medium: {\n ...shorthands.padding('14px', tokens.spacingHorizontalM, tokens.spacingHorizontalL, tokens.spacingHorizontalM),\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n large: {\n ...shorthands.padding('18px', tokens.spacingHorizontalL, tokens.spacingHorizontalXL, tokens.spacingHorizontalL),\n\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n\n // Disabled styles\n disabled: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding(tokens.spacingHorizontalXS),\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n ...shorthands.padding(tokens.spacingHorizontalSNudge),\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n ...shorthands.padding(tokens.spacingHorizontalS),\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n\n // Icon position variations\n before: {\n marginRight: tokens.spacingHorizontalM,\n },\n after: {\n marginLeft: tokens.spacingHorizontalM,\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n // Base styles\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n // Base styles\n base: {\n lineHeight: '100%',\n fontWeight: tokens.fontWeightRegular,\n },\n\n // Size variations\n small: {\n fontSize: tokens.fontSizeBase200,\n },\n medium: {\n fontSize: tokens.fontSizeBase200,\n },\n large: {\n fontSize: tokens.fontSizeBase300,\n },\n});\n\nexport const useCompoundButtonStyles_unstable = (state: CompoundButtonState): CompoundButtonState => {\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, size } = state;\n\n state.root.className = mergeClasses(\n compoundButtonClassNames.root,\n\n // Root styles\n rootStyles.base,\n rootStyles.highContrast,\n appearance && rootStyles[appearance],\n rootStyles[size],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n state.contentContainer.className = mergeClasses(\n compoundButtonClassNames.contentContainer,\n contentContainerStyles.base,\n state.contentContainer.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n compoundButtonClassNames.icon,\n iconStyles.base,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n state.icon.className,\n );\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n compoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[size],\n state.secondaryContent.className,\n );\n }\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"]}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "./renderMenuButton", "./useMenuButton", "./useMenuButtonStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, renderMenuButton_1, useMenuButton_1, useMenuButtonStyles_1, react_shared_contexts_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.MenuButton = void 0;
|
5
|
-
/**
|
6
|
-
* MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close
|
7
|
-
* menus.
|
8
|
-
*/
|
9
|
-
exports.MenuButton = React.forwardRef(function (props, ref) {
|
10
|
-
var state = useMenuButton_1.useMenuButton_unstable(props, ref);
|
11
|
-
useMenuButtonStyles_1.useMenuButtonStyles_unstable(state);
|
12
|
-
var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useMenuButtonStyles_unstable;
|
13
|
-
useCustomStyles(state);
|
14
|
-
return renderMenuButton_1.renderMenuButton_unstable(state);
|
15
|
-
// Casting is required due to lack of distributive union to support unions on @types/react
|
16
|
-
});
|
17
|
-
exports.MenuButton.displayName = 'MenuButton';
|
18
|
-
});
|
19
|
-
//# sourceMappingURL=MenuButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,UAAU,GAAyC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC1F,IAAM,KAAK,GAAG,sCAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEjD,kDAA4B,CAAC,KAAK,CAAC,CAAC;QAE5B,IAA8B,eAAe,GAAK,oDAA4B,EAAE,6BAAnC,CAAoC;QACzF,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,4CAAyB,CAAC,KAAK,CAAC,CAAC;QACxC,0FAA0F;IAC5F,CAAC,CAAyC,CAAC;IAE3C,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */\nexport const MenuButton: ForwardRefComponent<MenuButtonProps> = React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n\n useMenuButtonStyles_unstable(state);\n\n const { useMenuButtonStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderMenuButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<MenuButtonProps>;\n\nMenuButton.displayName = 'MenuButton';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuButton.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/MenuButton/MenuButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type MenuButtonSlots = ButtonSlots & {\n /**\n * Menu icon that indicates that this button has a menu that can be expanded.\n */\n menuIcon?: Slot<'span'>;\n};\n\nexport type MenuButtonProps = ComponentProps<MenuButtonSlots> &\n Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'shape' | 'size'>;\n\nexport type MenuButtonState = ComponentState<MenuButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;\n"]}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./MenuButton.types", "./MenuButton", "./renderMenuButton", "./useMenuButton", "./useMenuButtonStyles"], function (require, exports, tslib_1, MenuButton_types_1, MenuButton_1, renderMenuButton_1, useMenuButton_1, useMenuButtonStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useMenuButtonStyles_unstable = exports.menuButtonClassNames = void 0;
|
5
|
-
tslib_1.__exportStar(MenuButton_types_1, exports);
|
6
|
-
tslib_1.__exportStar(MenuButton_1, exports);
|
7
|
-
tslib_1.__exportStar(renderMenuButton_1, exports);
|
8
|
-
tslib_1.__exportStar(useMenuButton_1, exports);
|
9
|
-
Object.defineProperty(exports, "menuButtonClassNames", { enumerable: true, get: function () { return useMenuButtonStyles_1.menuButtonClassNames; } });
|
10
|
-
Object.defineProperty(exports, "useMenuButtonStyles_unstable", { enumerable: true, get: function () { return useMenuButtonStyles_1.useMenuButtonStyles_unstable; } });
|
11
|
-
});
|
12
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/MenuButton/index.ts"],"names":[],"mappings":";;;;IAAA,kDAAmC;IACnC,4CAA6B;IAC7B,kDAAmC;IACnC,+CAAgC;IACvB,2HAAA,oBAAoB,OAAA;IAAE,mIAAA,4BAA4B,OAAA","sourcesContent":["export * from './MenuButton.types';\nexport * from './MenuButton';\nexport * from './renderMenuButton';\nexport * from './useMenuButton';\nexport { menuButtonClassNames, useMenuButtonStyles_unstable } from './useMenuButtonStyles';\n"]}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.renderMenuButton_unstable = void 0;
|
5
|
-
/**
|
6
|
-
* Renders a MenuButton component by passing the state defined props to the appropriate slots.
|
7
|
-
*/
|
8
|
-
var renderMenuButton_unstable = function (state) {
|
9
|
-
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
10
|
-
var icon = state.icon, iconOnly = state.iconOnly;
|
11
|
-
return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
|
12
|
-
slots.icon && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)),
|
13
|
-
!iconOnly && slotProps.root.children,
|
14
|
-
(!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && slots.menuIcon && React.createElement(slots.menuIcon, tslib_1.__assign({}, slotProps.menuIcon))));
|
15
|
-
};
|
16
|
-
exports.renderMenuButton_unstable = renderMenuButton_unstable;
|
17
|
-
});
|
18
|
-
//# sourceMappingURL=renderMenuButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"renderMenuButton.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/MenuButton/renderMenuButton.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,yBAAyB,GAAG,UAAC,KAAsB;QACxD,IAAA,KAAuB,0BAAQ,CAAkB,KAAK,CAAC,EAArD,KAAK,WAAA,EAAE,SAAS,eAAqC,CAAC;QACtD,IAAA,IAAI,GAAe,KAAK,KAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;QAEjC,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC3B,KAAK,CAAC,IAAI,IAAI,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI;YAChD,CAAC,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ;YACpC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,CAAA,CAAC,IAAI,KAAK,CAAC,QAAQ,IAAI,oBAAC,KAAK,CAAC,QAAQ,uBAAK,SAAS,CAAC,QAAQ,EAAI,CACpF,CACd,CAAC;IACJ,CAAC,CAAC;IAXW,QAAA,yBAAyB,6BAWpC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton_unstable = (state: MenuButtonState) => {\n const { slots, slotProps } = getSlots<MenuButtonSlots>(state);\n const { icon, iconOnly } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && slotProps.root.children}\n {(!iconOnly || !icon?.children) && slots.menuIcon && <slots.menuIcon {...slotProps.menuIcon} />}\n </slots.root>\n );\n};\n"]}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-icons", "@fluentui/react-utilities", "../Button/index"], function (require, exports, tslib_1, React, react_icons_1, react_utilities_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useMenuButton_unstable = void 0;
|
5
|
-
/**
|
6
|
-
* Given user props, returns the final state for a MenuButton.
|
7
|
-
*/
|
8
|
-
var useMenuButton_unstable = function (_a, ref) {
|
9
|
-
var _b;
|
10
|
-
var menuIcon = _a.menuIcon, props = tslib_1.__rest(_a, ["menuIcon"]);
|
11
|
-
var buttonState = index_1.useButton_unstable(props, ref);
|
12
|
-
buttonState.root['aria-expanded'] = (_b = props['aria-expanded']) !== null && _b !== void 0 ? _b : false;
|
13
|
-
return tslib_1.__assign(tslib_1.__assign({}, buttonState), {
|
14
|
-
// State calculated from a set of props
|
15
|
-
iconOnly: Boolean(!props.children),
|
16
|
-
// Slots definition
|
17
|
-
components: {
|
18
|
-
root: 'button',
|
19
|
-
icon: 'span',
|
20
|
-
menuIcon: 'span',
|
21
|
-
}, menuIcon: react_utilities_1.resolveShorthand(menuIcon, {
|
22
|
-
defaultProps: {
|
23
|
-
children: React.createElement(react_icons_1.ChevronDownRegular, null),
|
24
|
-
},
|
25
|
-
required: true,
|
26
|
-
}) });
|
27
|
-
};
|
28
|
-
exports.useMenuButton_unstable = useMenuButton_unstable;
|
29
|
-
});
|
30
|
-
//# sourceMappingURL=useMenuButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useMenuButton.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/MenuButton/useMenuButton.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACI,IAAM,sBAAsB,GAAG,UACpC,EAAuC,EACvC,GAAqD;;QADnD,IAAA,QAAQ,cAAA,EAAK,KAAK,sBAApB,YAAsB,CAAF;QAGpB,IAAM,WAAW,GAAG,0BAAkB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACnD,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,MAAA,KAAK,CAAC,eAAe,CAAC,mCAAI,KAAK,CAAC;QAEpE,6CAEK,WAAW;YAEd,uCAAuC;YACvC,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;YAElC,mBAAmB;YACnB,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,MAAM;aACjB,EAED,QAAQ,EAAE,kCAAgB,CAAC,QAAQ,EAAE;gBACnC,YAAY,EAAE;oBACZ,QAAQ,EAAE,oBAAC,gCAAkB,OAAG;iBACjC;gBACD,QAAQ,EAAE,IAAI;aACf,CAAC,IACF;IACJ,CAAC,CAAC;IA5BW,QAAA,sBAAsB,0BA4BjC","sourcesContent":["import * as React from 'react';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\nimport type { MenuButtonProps, MenuButtonState } from './MenuButton.types';\n\n/**\n * Given user props, returns the final state for a MenuButton.\n */\nexport const useMenuButton_unstable = (\n { menuIcon, ...props }: MenuButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): MenuButtonState => {\n const buttonState = useButton_unstable(props, ref);\n buttonState.root['aria-expanded'] = props['aria-expanded'] ?? false;\n\n return {\n // Button state\n ...buttonState,\n\n // State calculated from a set of props\n iconOnly: Boolean(!props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n menuIcon: 'span',\n },\n\n menuIcon: resolveShorthand(menuIcon, {\n defaultProps: {\n children: <ChevronDownRegular />,\n },\n required: true,\n }),\n };\n};\n"]}
|
@@ -1,97 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "@fluentui/react-icons", "@fluentui/react-theme", "@griffel/react", "../Button/useButtonStyles"], function (require, exports, tslib_1, react_icons_1, react_theme_1, react_1, useButtonStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
var _a;
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
-
exports.useMenuButtonStyles_unstable = exports.menuButtonClassNames = void 0;
|
6
|
-
exports.menuButtonClassNames = {
|
7
|
-
root: 'fui-MenuButton',
|
8
|
-
icon: 'fui-MenuButton__icon',
|
9
|
-
menuIcon: 'fui-MenuButton__menuIcon',
|
10
|
-
};
|
11
|
-
var useRootExpandedStyles = react_1.makeStyles({
|
12
|
-
base: (_a = {},
|
13
|
-
_a["& ." + react_icons_1.iconFilledClassName] = {
|
14
|
-
display: 'inline',
|
15
|
-
},
|
16
|
-
_a["& ." + react_icons_1.iconRegularClassName] = {
|
17
|
-
display: 'none',
|
18
|
-
},
|
19
|
-
_a),
|
20
|
-
// Appearance variations
|
21
|
-
outline: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStroke1Selected)), react_1.shorthands.borderWidth(react_theme_1.tokens.strokeWidthThicker)), { color: react_theme_1.tokens.colorNeutralForeground1Selected }),
|
22
|
-
primary: {
|
23
|
-
backgroundColor: react_theme_1.tokens.colorBrandBackgroundSelected,
|
24
|
-
},
|
25
|
-
secondary: tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorNeutralBackground1Selected }, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStroke1Selected)), { color: react_theme_1.tokens.colorNeutralForeground1Selected }),
|
26
|
-
subtle: {
|
27
|
-
backgroundColor: react_theme_1.tokens.colorSubtleBackgroundSelected,
|
28
|
-
color: react_theme_1.tokens.colorNeutralForeground2Selected,
|
29
|
-
},
|
30
|
-
transparent: {
|
31
|
-
backgroundColor: react_theme_1.tokens.colorTransparentBackgroundSelected,
|
32
|
-
color: react_theme_1.tokens.colorNeutralForeground2BrandSelected,
|
33
|
-
},
|
34
|
-
});
|
35
|
-
var useIconExpandedStyles = react_1.makeStyles({
|
36
|
-
// Appearance variations
|
37
|
-
outline: {
|
38
|
-
color: react_theme_1.tokens.colorNeutralForeground1Selected,
|
39
|
-
},
|
40
|
-
primary: {
|
41
|
-
/* The primary styles are exactly the same as the base styles. */
|
42
|
-
},
|
43
|
-
secondary: {
|
44
|
-
color: react_theme_1.tokens.colorNeutralForeground1Selected,
|
45
|
-
},
|
46
|
-
subtle: {
|
47
|
-
color: react_theme_1.tokens.colorNeutralForeground2BrandSelected,
|
48
|
-
},
|
49
|
-
transparent: {
|
50
|
-
color: react_theme_1.tokens.colorNeutralForeground2BrandSelected,
|
51
|
-
},
|
52
|
-
});
|
53
|
-
var useMenuIconStyles = react_1.makeStyles({
|
54
|
-
base: {
|
55
|
-
lineHeight: 0,
|
56
|
-
},
|
57
|
-
// Size appearance
|
58
|
-
small: {
|
59
|
-
fontSize: '12px',
|
60
|
-
height: '12px',
|
61
|
-
lineHeight: react_theme_1.tokens.lineHeightBase200,
|
62
|
-
width: '12px',
|
63
|
-
},
|
64
|
-
medium: {
|
65
|
-
fontSize: '12px',
|
66
|
-
height: '12px',
|
67
|
-
lineHeight: react_theme_1.tokens.lineHeightBase200,
|
68
|
-
width: '12px',
|
69
|
-
},
|
70
|
-
large: {
|
71
|
-
fontSize: '16px',
|
72
|
-
height: '16px',
|
73
|
-
lineHeight: react_theme_1.tokens.lineHeightBase400,
|
74
|
-
width: '16px',
|
75
|
-
},
|
76
|
-
// Not-icon only
|
77
|
-
notIconOnly: {
|
78
|
-
marginLeft: react_theme_1.tokens.spacingHorizontalXS,
|
79
|
-
},
|
80
|
-
});
|
81
|
-
var useMenuButtonStyles_unstable = function (state) {
|
82
|
-
var rootExpandedStyles = useRootExpandedStyles();
|
83
|
-
var iconExpandedStyles = useIconExpandedStyles();
|
84
|
-
var menuIconStyles = useMenuIconStyles();
|
85
|
-
state.root.className = react_1.mergeClasses(exports.menuButtonClassNames.root, state.root['aria-expanded'] && rootExpandedStyles.base, state.root['aria-expanded'] && rootExpandedStyles[state.appearance], state.root.className);
|
86
|
-
if (state.icon) {
|
87
|
-
state.icon.className = react_1.mergeClasses(exports.menuButtonClassNames.icon, state.root['aria-expanded'] && iconExpandedStyles[state.appearance], state.icon.className);
|
88
|
-
}
|
89
|
-
if (state.menuIcon) {
|
90
|
-
state.menuIcon.className = react_1.mergeClasses(exports.menuButtonClassNames.menuIcon, menuIconStyles.base, menuIconStyles[state.size], !state.iconOnly && menuIconStyles.notIconOnly, state.menuIcon.className);
|
91
|
-
}
|
92
|
-
useButtonStyles_1.useButtonStyles_unstable(tslib_1.__assign(tslib_1.__assign({}, state), { iconPosition: 'before' }));
|
93
|
-
return state;
|
94
|
-
};
|
95
|
-
exports.useMenuButtonStyles_unstable = useMenuButtonStyles_unstable;
|
96
|
-
});
|
97
|
-
//# sourceMappingURL=useMenuButtonStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useMenuButtonStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/MenuButton/useMenuButtonStyles.ts"],"names":[],"mappings":";;;;;IAOa,QAAA,oBAAoB,GAAoC;QACnE,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,sBAAsB;QAC5B,QAAQ,EAAE,0BAA0B;KACrC,CAAC;IAEF,IAAM,qBAAqB,GAAG,kBAAU,CAAC;QACvC,IAAI;YACF,GAAC,QAAM,iCAAqB,IAAG;gBAC7B,OAAO,EAAE,QAAQ;aAClB;YACD,GAAC,QAAM,kCAAsB,IAAG;gBAC9B,OAAO,EAAE,MAAM;aAChB;eACF;QAED,wBAAwB;QACxB,OAAO,yDACF,kBAAU,CAAC,WAAW,CAAC,oBAAM,CAAC,2BAA2B,CAAC,GAC1D,kBAAU,CAAC,WAAW,CAAC,oBAAM,CAAC,kBAAkB,CAAC,KACpD,KAAK,EAAE,oBAAM,CAAC,+BAA+B,GAC9C;QACD,OAAO,EAAE;YACP,eAAe,EAAE,oBAAM,CAAC,4BAA4B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CAiCvC","sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\nexport const menuButtonClassNames: SlotClassNames<MenuButtonSlots> = {\n root: 'fui-MenuButton',\n icon: 'fui-MenuButton__icon',\n menuIcon: 'fui-MenuButton__menuIcon',\n};\n\nconst useRootExpandedStyles = makeStyles({\n base: {\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n // Appearance variations\n outline: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n ...shorthands.borderWidth(tokens.strokeWidthThicker),\n color: tokens.colorNeutralForeground1Selected,\n },\n primary: {\n backgroundColor: tokens.colorBrandBackgroundSelected,\n },\n secondary: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n color: tokens.colorNeutralForeground1Selected,\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground2Selected,\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n});\n\nconst useIconExpandedStyles = makeStyles({\n // Appearance variations\n outline: {\n color: tokens.colorNeutralForeground1Selected,\n },\n primary: {\n /* The primary styles are exactly the same as the base styles. */\n },\n secondary: {\n color: tokens.colorNeutralForeground1Selected,\n },\n subtle: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n transparent: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n});\n\nconst useMenuIconStyles = makeStyles({\n base: {\n lineHeight: 0,\n },\n\n // Size appearance\n small: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n medium: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n large: {\n fontSize: '16px',\n height: '16px',\n lineHeight: tokens.lineHeightBase400,\n width: '16px',\n },\n\n // Not-icon only\n notIconOnly: {\n marginLeft: tokens.spacingHorizontalXS,\n },\n});\n\nexport const useMenuButtonStyles_unstable = (state: MenuButtonState): MenuButtonState => {\n const rootExpandedStyles = useRootExpandedStyles();\n const iconExpandedStyles = useIconExpandedStyles();\n const menuIconStyles = useMenuIconStyles();\n\n state.root.className = mergeClasses(\n menuButtonClassNames.root,\n state.root['aria-expanded'] && rootExpandedStyles.base,\n state.root['aria-expanded'] && rootExpandedStyles[state.appearance],\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n menuButtonClassNames.icon,\n state.root['aria-expanded'] && iconExpandedStyles[state.appearance],\n state.icon.className,\n );\n }\n\n if (state.menuIcon) {\n state.menuIcon.className = mergeClasses(\n menuButtonClassNames.menuIcon,\n menuIconStyles.base,\n menuIconStyles[state.size],\n !state.iconOnly && menuIconStyles.notIconOnly,\n state.menuIcon.className,\n );\n }\n\n useButtonStyles_unstable({ ...state, iconPosition: 'before' });\n\n return state;\n};\n"]}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "./renderSplitButton", "./useSplitButton", "./useSplitButtonStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, renderSplitButton_1, useSplitButton_1, useSplitButtonStyles_1, react_shared_contexts_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.SplitButton = void 0;
|
5
|
-
/**
|
6
|
-
* SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary
|
7
|
-
* action, while interacting with the second one opens a menu with secondary actions.
|
8
|
-
*/
|
9
|
-
exports.SplitButton = React.forwardRef(function (props, ref) {
|
10
|
-
var state = useSplitButton_1.useSplitButton_unstable(props, ref);
|
11
|
-
useSplitButtonStyles_1.useSplitButtonStyles_unstable(state);
|
12
|
-
var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useSplitButtonStyles_unstable;
|
13
|
-
useCustomStyles(state);
|
14
|
-
return renderSplitButton_1.renderSplitButton_unstable(state);
|
15
|
-
// Casting is required due to lack of distributive union to support unions on @types/react
|
16
|
-
});
|
17
|
-
exports.SplitButton.displayName = 'SplitButton';
|
18
|
-
});
|
19
|
-
//# sourceMappingURL=SplitButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/SplitButton/SplitButton.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,WAAW,GAA0C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC5F,IAAM,KAAK,GAAG,wCAAuB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElD,oDAA6B,CAAC,KAAK,CAAC,CAAC;QAE7B,IAA+B,eAAe,GAAK,oDAA4B,EAAE,8BAAnC,CAAoC;QAC1F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,8CAA0B,CAAC,KAAK,CAAC,CAAC;QACzC,0FAA0F;IAC5F,CAAC,CAA0C,CAAC;IAE5C,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { renderSplitButton_unstable } from './renderSplitButton';\nimport { useSplitButton_unstable } from './useSplitButton';\nimport { useSplitButtonStyles_unstable } from './useSplitButtonStyles';\nimport type { SplitButtonProps } from './SplitButton.types';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */\nexport const SplitButton: ForwardRefComponent<SplitButtonProps> = React.forwardRef((props, ref) => {\n const state = useSplitButton_unstable(props, ref);\n\n useSplitButtonStyles_unstable(state);\n\n const { useSplitButtonStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderSplitButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<SplitButtonProps>;\n\nSplitButton.displayName = 'SplitButton';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SplitButton.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/SplitButton/SplitButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonState } from '../Button/Button.types';\nimport type { MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';\n\nexport type SplitButtonSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<typeof MenuButton>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<typeof Button>;\n};\n\nexport type SplitButtonProps = ComponentProps<SplitButtonSlots> &\n Omit<ButtonProps, 'root'> &\n Omit<MenuButtonProps, 'root'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"]}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./SplitButton", "./SplitButton.types", "./renderSplitButton", "./useSplitButton", "./useSplitButtonStyles"], function (require, exports, tslib_1, SplitButton_1, SplitButton_types_1, renderSplitButton_1, useSplitButton_1, useSplitButtonStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useSplitButtonStyles_unstable = exports.splitButtonClassNames = void 0;
|
5
|
-
tslib_1.__exportStar(SplitButton_1, exports);
|
6
|
-
tslib_1.__exportStar(SplitButton_types_1, exports);
|
7
|
-
tslib_1.__exportStar(renderSplitButton_1, exports);
|
8
|
-
tslib_1.__exportStar(useSplitButton_1, exports);
|
9
|
-
Object.defineProperty(exports, "splitButtonClassNames", { enumerable: true, get: function () { return useSplitButtonStyles_1.splitButtonClassNames; } });
|
10
|
-
Object.defineProperty(exports, "useSplitButtonStyles_unstable", { enumerable: true, get: function () { return useSplitButtonStyles_1.useSplitButtonStyles_unstable; } });
|
11
|
-
});
|
12
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/SplitButton/index.ts"],"names":[],"mappings":";;;;IAAA,6CAA8B;IAC9B,mDAAoC;IACpC,mDAAoC;IACpC,gDAAiC;IACxB,6HAAA,qBAAqB,OAAA;IAAE,qIAAA,6BAA6B,OAAA","sourcesContent":["export * from './SplitButton';\nexport * from './SplitButton.types';\nexport * from './renderSplitButton';\nexport * from './useSplitButton';\nexport { splitButtonClassNames, useSplitButtonStyles_unstable } from './useSplitButtonStyles';\n"]}
|