@fluentui/react-menu 0.0.0-nightlyf3ce1fbe1d20211110.1 → 0.0.0-nightlyf8be6a7c6520220106.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +244 -30
- package/CHANGELOG.md +61 -16
- package/Spec.md +21 -16
- package/dist/react-menu.d.ts +54 -4
- package/lib/MenuSplitGroup.d.ts +1 -0
- package/lib/MenuSplitGroup.js +2 -0
- package/lib/MenuSplitGroup.js.map +1 -0
- package/lib/components/Menu/useMenu.js +28 -21
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js +2 -1
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js +2 -1
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
- package/lib/components/MenuItem/MenuItem.js +0 -2
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.d.ts +1 -1
- package/lib/components/MenuItem/renderMenuItem.js +7 -1
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.js +2 -2
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +19 -21
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +6 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.js +2 -1
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListStyles.js +4 -3
- package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js +4 -2
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +7 -4
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
- package/lib/components/MenuSplitGroup/index.d.ts +5 -0
- package/lib/components/MenuSplitGroup/index.js +6 -0
- package/lib/components/MenuSplitGroup/index.js.map +1 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +16 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +16 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +72 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +34 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +2 -1
- package/lib/components/MenuTrigger/useTriggerElement.js +6 -5
- package/lib/components/MenuTrigger/useTriggerElement.js.map +1 -1
- package/lib/index.d.ts +11 -10
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib/utils/useOnMenuEnter.js.map +1 -1
- package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
- package/lib-commonjs/MenuSplitGroup.js +10 -0
- package/lib-commonjs/MenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/Menu/useMenu.js +33 -27
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js +0 -3
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js +7 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.js +2 -2
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +19 -20
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +6 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js +2 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js +3 -2
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -2
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +6 -3
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
- package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +28 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +16 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +86 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +45 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +2 -1
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +6 -5
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +1 -1
- package/lib-commonjs/index.d.ts +11 -10
- package/lib-commonjs/index.js +16 -14
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +16 -16
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib/common/mockUseMenuContext.d.ts +0 -7
- package/lib/common/mockUseMenuContext.js +0 -29
- package/lib/common/mockUseMenuContext.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -23
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
- package/lib-commonjs/common/mockUseMenuContext.js +0 -39
- package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
@@ -11,12 +11,15 @@ exports.menuPopoverClassName = 'fui-MenuPopover';
|
|
11
11
|
|
12
12
|
const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
13
13
|
"root": {
|
14
|
-
"
|
14
|
+
"Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
|
15
|
+
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
16
|
+
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
17
|
+
"Btl43ni": ["fyu767a", "f1jar5jt"],
|
15
18
|
"De3pzq": "fxugw4r",
|
16
19
|
"Bf4jedk": "fkqu4gx",
|
17
20
|
"B2u0y6b": "f1kaai3v",
|
18
21
|
"a9b677": "f1ahpp82",
|
19
|
-
"E5pizo":
|
22
|
+
"E5pizo": "f1hg901r",
|
20
23
|
"z8tnut": "f10ra9hq",
|
21
24
|
"z189sj": ["f8wuabp", "fycuoez"],
|
22
25
|
"Byoj8tv": "f1y2xyjm",
|
@@ -35,7 +38,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
35
38
|
"zhjwy3": ["fjscplz", "f1gn591s"]
|
36
39
|
}
|
37
40
|
}, {
|
38
|
-
"d": [".
|
41
|
+
"d": [".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fkqu4gx{min-width:128px;}", ".f1kaai3v{max-width:300px;}", ".f1ahpp82{width:-webkit-max-content;width:-moz-max-content;width:max-content;}", ".f1hg901r{box-shadow:var(--shadow16);}", ".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}"]
|
39
42
|
});
|
40
43
|
/**
|
41
44
|
* Apply styling to the Menu slots based on the state
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAGa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;;AAEb,MAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAaA;;AAEG;;;AACI,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,MAAM,CAAC,IAA1C,EAAgD,KAAK,CAAC,IAAN,CAAW,SAA3D,CAAvB;AACA,SAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourceRoot":""}
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAGa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;;AAEb,MAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAaA;;AAEG;;;AACI,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,MAAM,CAAC,IAA1C,EAAgD,KAAK,CAAC,IAAN,CAAW,SAA3D,CAAvB;AACA,SAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourceRoot":""}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { MenuSplitGroupProps } from './MenuSplitGroup.types';
|
2
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
|
+
/**
|
4
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
5
|
+
*/
|
6
|
+
export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.MenuSplitGroup = void 0;
|
7
|
+
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
|
+
|
10
|
+
const useMenuSplitGroup_1 = /*#__PURE__*/require("./useMenuSplitGroup");
|
11
|
+
|
12
|
+
const renderMenuSplitGroup_1 = /*#__PURE__*/require("./renderMenuSplitGroup");
|
13
|
+
|
14
|
+
const useMenuSplitGroupStyles_1 = /*#__PURE__*/require("./useMenuSplitGroupStyles");
|
15
|
+
/**
|
16
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
17
|
+
*/
|
18
|
+
|
19
|
+
|
20
|
+
exports.MenuSplitGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
+
const state = useMenuSplitGroup_1.useMenuSplitGroup(props, ref);
|
22
|
+
useMenuSplitGroupStyles_1.useMenuSplitGroupStyles(state);
|
23
|
+
return renderMenuSplitGroup_1.renderMenuSplitGroup(state);
|
24
|
+
});
|
25
|
+
exports.MenuSplitGroup.displayName = 'MenuSplitGroup';
|
26
|
+
//# sourceMappingURL=MenuSplitGroup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;AAEA,EAAA,yBAAA,CAAA,uBAAA,CAAwB,KAAxB;AACA,SAAO,sBAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALuE,CAA3D;AAOb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourceRoot":""}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
2
|
+
export declare type MenuSplitGroupSlots = {
|
3
|
+
root: IntrinsicShorthandProps<'div'>;
|
4
|
+
};
|
5
|
+
export declare type MenuSplitGroupCommons = {};
|
6
|
+
/**
|
7
|
+
* MenuSplitGroup Props
|
8
|
+
*/
|
9
|
+
export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots> & MenuSplitGroupCommons;
|
10
|
+
/**
|
11
|
+
* State used in rendering MenuSplitGroup
|
12
|
+
*/
|
13
|
+
export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots> & MenuSplitGroupCommons;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
|
+
|
9
|
+
tslib_1.__exportStar(require("./MenuSplitGroup"), exports);
|
10
|
+
|
11
|
+
tslib_1.__exportStar(require("./MenuSplitGroup.types"), exports);
|
12
|
+
|
13
|
+
tslib_1.__exportStar(require("./renderMenuSplitGroup"), exports);
|
14
|
+
|
15
|
+
tslib_1.__exportStar(require("./useMenuSplitGroup"), exports);
|
16
|
+
|
17
|
+
tslib_1.__exportStar(require("./useMenuSplitGroupStyles"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.renderMenuSplitGroup = void 0;
|
7
|
+
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
|
+
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
+
|
12
|
+
const useMenuSplitGroup_1 = /*#__PURE__*/require("./useMenuSplitGroup");
|
13
|
+
/**
|
14
|
+
* Render the final JSX of MenuSplitGroup
|
15
|
+
*/
|
16
|
+
|
17
|
+
|
18
|
+
const renderMenuSplitGroup = state => {
|
19
|
+
const {
|
20
|
+
slots,
|
21
|
+
slotProps
|
22
|
+
} = react_utilities_1.getSlots(state, useMenuSplitGroup_1.menuSplitGroupShorthandProps);
|
23
|
+
return React.createElement(slots.root, { ...slotProps.root
|
24
|
+
});
|
25
|
+
};
|
26
|
+
|
27
|
+
exports.renderMenuSplitGroup = renderMenuSplitGroup;
|
28
|
+
//# sourceMappingURL=renderMenuSplitGroup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,oBAAoB,GAAI,KAAD,IAA+B;AACjE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,EAAqC,mBAAA,CAAA,4BAArC,CAA7B;AAEA,SAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourceRoot":""}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { MenuSplitGroupProps, MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup.types';
|
3
|
+
/**
|
4
|
+
* Array of all shorthand properties listed in MenuSplitGroupSlots
|
5
|
+
*/
|
6
|
+
export declare const menuSplitGroupShorthandProps: (keyof MenuSplitGroupSlots)[];
|
7
|
+
/**
|
8
|
+
* Create the state required to render MenuSplitGroup.
|
9
|
+
*
|
10
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles,
|
11
|
+
* before being passed to renderMenuSplitGroup.
|
12
|
+
*
|
13
|
+
* @param props - props from this instance of MenuSplitGroup
|
14
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
15
|
+
*/
|
16
|
+
export declare const useMenuSplitGroup: (props: MenuSplitGroupProps, ref: React.Ref<HTMLElement>) => MenuSplitGroupState;
|
@@ -0,0 +1,86 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.useMenuSplitGroup = exports.menuSplitGroupShorthandProps = void 0;
|
7
|
+
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
|
+
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
+
|
12
|
+
const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
13
|
+
|
14
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
15
|
+
|
16
|
+
const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
|
17
|
+
/**
|
18
|
+
* Array of all shorthand properties listed in MenuSplitGroupSlots
|
19
|
+
*/
|
20
|
+
|
21
|
+
|
22
|
+
exports.menuSplitGroupShorthandProps = ['root'];
|
23
|
+
/**
|
24
|
+
* Create the state required to render MenuSplitGroup.
|
25
|
+
*
|
26
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles,
|
27
|
+
* before being passed to renderMenuSplitGroup.
|
28
|
+
*
|
29
|
+
* @param props - props from this instance of MenuSplitGroup
|
30
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
31
|
+
*/
|
32
|
+
|
33
|
+
const useMenuSplitGroup = (props, ref) => {
|
34
|
+
const innerRef = React.useRef();
|
35
|
+
const {
|
36
|
+
dir,
|
37
|
+
targetDocument
|
38
|
+
} = react_shared_contexts_1.useFluent();
|
39
|
+
const nextArrowKey = react_utilities_1.getRTLSafeKey(keyboard_keys_1.ArrowRight, dir);
|
40
|
+
const prevArrowKey = react_utilities_1.getRTLSafeKey(keyboard_keys_1.ArrowLeft, dir);
|
41
|
+
const {
|
42
|
+
findNextFocusable,
|
43
|
+
findPrevFocusable
|
44
|
+
} = react_tabster_1.useFocusFinders();
|
45
|
+
const onKeyDown = React.useCallback(e => {
|
46
|
+
var _a;
|
47
|
+
|
48
|
+
const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
|
49
|
+
|
50
|
+
if (!activeElement) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
|
54
|
+
if (!((_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.contains(activeElement))) {
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
|
58
|
+
if (e.key === nextArrowKey) {
|
59
|
+
const next = findNextFocusable(activeElement, {
|
60
|
+
container: innerRef.current
|
61
|
+
});
|
62
|
+
next === null || next === void 0 ? void 0 : next.focus();
|
63
|
+
}
|
64
|
+
|
65
|
+
if (e.key === prevArrowKey) {
|
66
|
+
const prev = findPrevFocusable(activeElement, {
|
67
|
+
container: innerRef.current
|
68
|
+
});
|
69
|
+
prev === null || prev === void 0 ? void 0 : prev.focus();
|
70
|
+
}
|
71
|
+
}, [findNextFocusable, findPrevFocusable, targetDocument, nextArrowKey, prevArrowKey]);
|
72
|
+
return {
|
73
|
+
components: {
|
74
|
+
root: 'div'
|
75
|
+
},
|
76
|
+
root: react_utilities_1.getNativeElementProps('div', {
|
77
|
+
role: 'group',
|
78
|
+
ref: react_utilities_1.useMergedRefs(ref, innerRef),
|
79
|
+
onKeyDown,
|
80
|
+
...props
|
81
|
+
})
|
82
|
+
};
|
83
|
+
};
|
84
|
+
|
85
|
+
exports.useMenuSplitGroup = useMenuSplitGroup;
|
86
|
+
//# sourceMappingURL=useMenuSplitGroup.js.map
|
@@ -0,0 +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Apply styling to the MenuSplitGroup slots based on the state
|
5
|
+
*/
|
6
|
+
export declare const useMenuSplitGroupStyles: (state: MenuSplitGroupState) => MenuSplitGroupState;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.useMenuSplitGroupStyles = exports.menuSplitGroupClassName = void 0;
|
7
|
+
|
8
|
+
const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
|
9
|
+
|
10
|
+
const useMenuItemStyles_1 = /*#__PURE__*/require("../MenuItem/useMenuItemStyles");
|
11
|
+
|
12
|
+
exports.menuSplitGroupClassName = 'fui-MenuSplitGroup';
|
13
|
+
/**
|
14
|
+
* Styles for the root slot
|
15
|
+
*/
|
16
|
+
|
17
|
+
const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
18
|
+
"root": {
|
19
|
+
"mc9l5x": "f22iagw",
|
20
|
+
"u7v6m2": "f168awwq",
|
21
|
+
"Bo1wru1": ["f1om2jlk", "fcyhg04"],
|
22
|
+
"Bhkyaub": ["fgqgg70", "fqo1hry"],
|
23
|
+
"J9ixe0": ["fh1zedf", "f1auaj6e"],
|
24
|
+
"rj29m3": ["fokbbcd", "f1xlvh9o"],
|
25
|
+
"lispf9": "f1et5qag",
|
26
|
+
"B9hwub1": "f13ngu1f",
|
27
|
+
"dvf9w6": "f1db9j62",
|
28
|
+
"Hjn5ok": "f92z21p"
|
29
|
+
}
|
30
|
+
}, {
|
31
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f168awwq>.fui-MenuItem:nth-child(1){width:100%;}", ".f1om2jlk>.fui-MenuItem:nth-child(2){border-top-left-radius:0;}", ".fcyhg04>.fui-MenuItem:nth-child(2){border-top-right-radius:0;}", ".fgqgg70>.fui-MenuItem:nth-child(2){border-bottom-left-radius:0;}", ".fqo1hry>.fui-MenuItem:nth-child(2){border-bottom-right-radius:0;}", ".fh1zedf>.fui-MenuItem:nth-child(2){padding-left:0;}", ".f1auaj6e>.fui-MenuItem:nth-child(2){padding-right:0;}", ".fokbbcd>.fui-MenuItem:nth-child(2){margin-left:auto;}", ".f1xlvh9o>.fui-MenuItem:nth-child(2){margin-right:auto;}", ".f1et5qag>.fui-MenuItem:nth-child(2):before{content:\"\";}", ".f13ngu1f>.fui-MenuItem:nth-child(2):before{width:var(--strokeWidthThin);}", ".f1db9j62>.fui-MenuItem:nth-child(2):before{height:24px;}", ".f92z21p>.fui-MenuItem:nth-child(2):before{background-color:var(--colorNeutralStroke1);}"]
|
32
|
+
});
|
33
|
+
/**
|
34
|
+
* Apply styling to the MenuSplitGroup slots based on the state
|
35
|
+
*/
|
36
|
+
|
37
|
+
|
38
|
+
const useMenuSplitGroupStyles = state => {
|
39
|
+
const styles = useStyles();
|
40
|
+
state.root.className = react_make_styles_1.mergeClasses(exports.menuSplitGroupClassName, styles.root, state.root.className);
|
41
|
+
return state;
|
42
|
+
};
|
43
|
+
|
44
|
+
exports.useMenuSplitGroupStyles = useMenuSplitGroupStyles;
|
45
|
+
//# sourceMappingURL=useMenuSplitGroupStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AAGa,OAAA,CAAA,uBAAA,GAA0B,oBAA1B;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAoD;AACzF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,OAAA,CAAA,uBAAb,EAAsC,MAAM,CAAC,IAA7C,EAAmD,KAAK,CAAC,IAAN,CAAW,SAA9D,CAAvB;AACA,SAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourceRoot":""}
|
@@ -10,7 +10,8 @@ export declare type MenuTriggerProps = {
|
|
10
10
|
/**
|
11
11
|
* Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
|
12
12
|
*/
|
13
|
-
export declare type MenuTriggerChildProps = Required<Pick<React.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | '
|
13
|
+
export declare type MenuTriggerChildProps = Required<Pick<React.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
|
14
14
|
ref?: React.Ref<never>;
|
15
|
+
'aria-expanded': boolean | undefined;
|
15
16
|
};
|
16
17
|
export declare type MenuTriggerState = MenuTriggerProps;
|
@@ -106,10 +106,6 @@ const useTriggerElement = state => {
|
|
106
106
|
focusFirst();
|
107
107
|
}
|
108
108
|
|
109
|
-
if (open && key === keyboard_keys_1.ArrowDown && !isSubmenu) {
|
110
|
-
focusFirst();
|
111
|
-
}
|
112
|
-
|
113
109
|
(_c = (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, e);
|
114
110
|
});
|
115
111
|
const onMouseEnter = react_utilities_1.useEventCallback(e => {
|
@@ -150,7 +146,7 @@ const useTriggerElement = state => {
|
|
150
146
|
});
|
151
147
|
const disabled = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.disabled;
|
152
148
|
const triggerProps = {
|
153
|
-
'aria-haspopup':
|
149
|
+
'aria-haspopup': 'menu',
|
154
150
|
'aria-expanded': open,
|
155
151
|
id: ((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.id) || triggerId,
|
156
152
|
...(!disabled ? {
|
@@ -170,6 +166,11 @@ const useTriggerElement = state => {
|
|
170
166
|
onMouseMove: noop
|
171
167
|
})
|
172
168
|
};
|
169
|
+
|
170
|
+
if (!open && !isSubmenu) {
|
171
|
+
triggerProps['aria-expanded'] = undefined;
|
172
|
+
}
|
173
|
+
|
173
174
|
state.children = react_utilities_1.applyTriggerPropsToChildren(state.children, { ...triggerProps,
|
174
175
|
ref: react_utilities_1.useMergedRefs(typeof state.children !== 'function' && state.children.ref || null, triggerRef)
|
175
176
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuTrigger/useTriggerElement.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAGA,MAAM,IAAI,GAAG,MAAM,IAAnB;AAEA;;AAEG;;;AACI,MAAM,iBAAiB,GAAI,KAAD,IAA8C;;;AAC7E,QAAM,UAAU,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,UAAlC,CAAnB;AACA,QAAM,cAAc,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,cAAlC,CAAvB;AACA,QA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KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,EAAd,KAAoB,SAHkB;AAK1C,QAAI,CAAC,QAAD,GACA;AACE,MAAA,OADF;AAEE,MAAA,YAFF;AAGE,MAAA,YAHF;AAIE,MAAA,aAJF;AAKE,MAAA,SALF;AAME,MAAA;AANF,KADA,GASA;AACA;AACE,MAAA,OAAO,EAAE,IADX;AAEE,MAAA,YAAY,EAAE,IAFhB;AAGE,MAAA,YAAY,EAAE,IAHhB;AAIE,MAAA,aAAa,EAAE,IAJjB;AAKE,MAAA,SAAS,EAAE,IALb;AAME,MAAA,WAAW,EAAE;AANf,KAVJ;AAL0C,GAA5C;;AAyBA,MAAI,CAAC,IAAD,IAAS,CAAC,SAAd,EAAyB;AACvB,IAAA,YAAY,CAAC,eAAD,CAAZ,GAAgC,SAAhC;AACD;;AAED,EAAA,KAAK,CAAC,QAAN,GAAiB,iBAAA,CAAA,2BAAA,CAA4B,KAAK,CAAC,QAAlC,EAA4C,EAC3D,GAAG,YADwD;AAE3D,IAAA,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAe,OAAO,KAAK,CAAC,QAAb,KAA0B,UAA1B,IAAwC,KAAK,CAAC,QAAN,CAAe,GAAxD,IAAgE,IAA9E,EAAoF,UAApF;AAFsD,GAA5C,CAAjB;AAKA,SAAO,KAAP;AACD,CAhIM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourceRoot":""}
|
package/lib-commonjs/index.d.ts
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
export * from './MenuItem';
|
2
|
-
export * from './MenuList';
|
3
|
-
export * from './MenuItemCheckbox';
|
4
|
-
export * from './MenuItemRadio';
|
5
|
-
export * from './MenuDivider';
|
6
|
-
export * from './MenuGroupHeader';
|
7
|
-
export * from './MenuGroup';
|
8
|
-
export * from './selectable/index';
|
9
|
-
export * from './MenuTrigger';
|
10
|
-
export * from './Menu';
|
11
1
|
export * from './contexts/menuContext';
|
12
2
|
export * from './contexts/menuTriggerContext';
|
13
3
|
export * from './contexts/menuGroupContext';
|
14
4
|
export * from './contexts/menuListContext';
|
5
|
+
export * from './Menu';
|
6
|
+
export * from './MenuDivider';
|
7
|
+
export * from './MenuGroup';
|
8
|
+
export * from './MenuGroupHeader';
|
9
|
+
export * from './MenuItem';
|
10
|
+
export * from './MenuItemCheckbox';
|
11
|
+
export * from './MenuItemRadio';
|
12
|
+
export * from './MenuList';
|
15
13
|
export * from './MenuPopover';
|
14
|
+
export * from './MenuSplitGroup';
|
15
|
+
export * from './MenuTrigger';
|
16
|
+
export * from './selectable/index';
|
package/lib-commonjs/index.js
CHANGED
@@ -6,33 +6,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
|
7
7
|
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
|
-
tslib_1.__exportStar(require("./
|
9
|
+
tslib_1.__exportStar(require("./contexts/menuContext"), exports);
|
10
10
|
|
11
|
-
tslib_1.__exportStar(require("./
|
11
|
+
tslib_1.__exportStar(require("./contexts/menuTriggerContext"), exports);
|
12
12
|
|
13
|
-
tslib_1.__exportStar(require("./
|
13
|
+
tslib_1.__exportStar(require("./contexts/menuGroupContext"), exports);
|
14
14
|
|
15
|
-
tslib_1.__exportStar(require("./
|
15
|
+
tslib_1.__exportStar(require("./contexts/menuListContext"), exports);
|
16
16
|
|
17
|
-
tslib_1.__exportStar(require("./
|
17
|
+
tslib_1.__exportStar(require("./Menu"), exports);
|
18
18
|
|
19
|
-
tslib_1.__exportStar(require("./
|
19
|
+
tslib_1.__exportStar(require("./MenuDivider"), exports);
|
20
20
|
|
21
21
|
tslib_1.__exportStar(require("./MenuGroup"), exports);
|
22
22
|
|
23
|
-
tslib_1.__exportStar(require("./
|
23
|
+
tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
|
24
24
|
|
25
|
-
tslib_1.__exportStar(require("./
|
25
|
+
tslib_1.__exportStar(require("./MenuItem"), exports);
|
26
26
|
|
27
|
-
tslib_1.__exportStar(require("./
|
27
|
+
tslib_1.__exportStar(require("./MenuItemCheckbox"), exports);
|
28
28
|
|
29
|
-
tslib_1.__exportStar(require("./
|
29
|
+
tslib_1.__exportStar(require("./MenuItemRadio"), exports);
|
30
30
|
|
31
|
-
tslib_1.__exportStar(require("./
|
31
|
+
tslib_1.__exportStar(require("./MenuList"), exports);
|
32
32
|
|
33
|
-
tslib_1.__exportStar(require("./
|
33
|
+
tslib_1.__exportStar(require("./MenuPopover"), exports);
|
34
34
|
|
35
|
-
tslib_1.__exportStar(require("./
|
35
|
+
tslib_1.__exportStar(require("./MenuSplitGroup"), exports);
|
36
36
|
|
37
|
-
tslib_1.__exportStar(require("./
|
37
|
+
tslib_1.__exportStar(require("./MenuTrigger"), exports);
|
38
|
+
|
39
|
+
tslib_1.__exportStar(require("./selectable/index"), exports);
|
38
40
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OA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A,OAAO,CAAC,mBAAR,CAA4B,OAAA,CAAA,gBAA5B,EAA8C,QAA9C;AACD,KAFD;AAGD,GArBD,EAqBG,CAAC,QAAD,EAAW,OAAX,EAAoB,QAApB,CArBH;AAsBD,CAvCM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB;AAyCb;;;;AAIG;;AACI,MAAM,sBAAsB,GAAG,CAAC,EAAD,EAAkB,WAAlB,KAA6C;AACjF,EAAA,EAAE,CAAC,aAAH,CAAiB,IAAI,WAAJ,CAAgB,OAAA,CAAA,gBAAhB,EAAkC;AAAE,IAAA,OAAO,EAAE,IAAX;AAAiB,IAAA,MAAM,EAAE;AAAE,MAAA;AAAF;AAAzB,GAAlC,CAAjB;AACD,CAFM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyf8be6a7c6520220106.1",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"license": "MIT",
|
14
14
|
"scripts": {
|
15
15
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
16
|
-
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-menu/src && yarn docs",
|
16
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-menu/src && yarn docs",
|
17
17
|
"build": "just-scripts build",
|
18
18
|
"bundle-size": "bundle-size measure",
|
19
19
|
"clean": "just-scripts clean",
|
@@ -23,14 +23,15 @@
|
|
23
23
|
"lint": "just-scripts lint",
|
24
24
|
"start": "yarn storybook",
|
25
25
|
"storybook": "start-storybook",
|
26
|
-
"test": "jest"
|
26
|
+
"test": "jest",
|
27
|
+
"type-check": "tsc -b tsconfig.json"
|
27
28
|
},
|
28
29
|
"devDependencies": {
|
29
|
-
"@fluentui/babel-make-styles": "0.0.0-
|
30
|
+
"@fluentui/babel-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
|
30
31
|
"@fluentui/eslint-plugin": "*",
|
31
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-
|
32
|
+
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
|
32
33
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-make-styles": "0.0.0-
|
34
|
+
"@fluentui/react-conformance-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
|
34
35
|
"@fluentui/scripts": "^1.0.0",
|
35
36
|
"@types/enzyme": "3.10.3",
|
36
37
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -44,15 +45,15 @@
|
|
44
45
|
"react-test-renderer": "^16.3.0"
|
45
46
|
},
|
46
47
|
"dependencies": {
|
47
|
-
"@fluentui/keyboard-keys": "0.0.0-
|
48
|
-
"@fluentui/react-context-selector": "0.0.0-
|
49
|
-
"@fluentui/react-icons": "^
|
50
|
-
"@fluentui/react-make-styles": "0.0.0-
|
51
|
-
"@fluentui/react-portal": "0.0.0-
|
52
|
-
"@fluentui/react-positioning": "0.0.0-
|
53
|
-
"@fluentui/react-
|
54
|
-
"@fluentui/react-tabster": "0.0.0-
|
55
|
-
"@fluentui/react-utilities": "0.0.0-
|
48
|
+
"@fluentui/keyboard-keys": "0.0.0-nightlyf8be6a7c6520220106.1",
|
49
|
+
"@fluentui/react-context-selector": "0.0.0-nightlyf8be6a7c6520220106.1",
|
50
|
+
"@fluentui/react-icons": "^2.0.154-beta.5",
|
51
|
+
"@fluentui/react-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
|
52
|
+
"@fluentui/react-portal": "0.0.0-nightlyf8be6a7c6520220106.1",
|
53
|
+
"@fluentui/react-positioning": "0.0.0-nightlyf8be6a7c6520220106.1",
|
54
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightlyf8be6a7c6520220106.1",
|
55
|
+
"@fluentui/react-tabster": "0.0.0-nightlyf8be6a7c6520220106.1",
|
56
|
+
"@fluentui/react-utilities": "0.0.0-nightlyf8be6a7c6520220106.1",
|
56
57
|
"tslib": "^2.1.0"
|
57
58
|
},
|
58
59
|
"peerDependencies": {
|
@@ -62,7 +63,6 @@
|
|
62
63
|
"react-dom": ">=16.8.0 <18.0.0"
|
63
64
|
},
|
64
65
|
"beachball": {
|
65
|
-
"tag": "beta",
|
66
66
|
"disallowedChangeTypes": [
|
67
67
|
"major",
|
68
68
|
"minor",
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
|
2
|
-
import makeStylesTests from '@fluentui/react-conformance-make-styles';
|
3
|
-
export function isConformant(testInfo) {
|
4
|
-
const defaultOptions = {
|
5
|
-
asPropHandlesRef: true,
|
6
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
7
|
-
skipAsPropTests: true,
|
8
|
-
extraTests: makeStylesTests
|
9
|
-
};
|
10
|
-
baseIsConformant(defaultOptions, testInfo);
|
11
|
-
}
|
12
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,QAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,eAAe,EAAE,IAH0C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import type { MenuContextValue } from '../contexts/menuContext';
|
2
|
-
/**
|
3
|
-
* A test utility to mock the useMenuContext hook that relies on context selector
|
4
|
-
* Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
|
5
|
-
* @param options Menu context values to set for testing
|
6
|
-
*/
|
7
|
-
export declare const mockUseMenuContext: (options?: Partial<MenuContextValue>) => void;
|