@fluentui/react-menu 0.0.0-nightlyf3ce1fbe1d20211110.1 → 0.0.0-nightlyf6116328d620220124.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +316 -30
- package/CHANGELOG.md +70 -16
- package/Spec.md +21 -16
- package/dist/react-menu.d.ts +54 -12
- 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 +30 -22
- 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/useMenuDivider.js +3 -0
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js +2 -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/MenuGroup/useMenuGroup.js +3 -0
- package/lib/components/MenuGroup/useMenuGroup.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/useMenuGroupHeader.js +3 -0
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -0
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +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 +8 -3
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.d.ts +1 -5
- package/lib/components/MenuItem/useMenuItem.js +3 -8
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +26 -23
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +7 -3
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +7 -3
- 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 +3 -0
- 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 +3 -0
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +8 -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 +15 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -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 +35 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.d.ts +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js +4 -3
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +5 -2
- package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js +177 -5
- package/lib/components/MenuTrigger/useMenuTrigger.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 +35 -28
- 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/useMenuDivider.js +3 -0
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +2 -0
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +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/MenuGroup/useMenuGroup.js +3 -0
- package/lib-commonjs/components/MenuGroup/useMenuGroup.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/useMenuGroupHeader.js +3 -0
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +2 -0
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +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 +8 -4
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +1 -5
- package/lib-commonjs/components/MenuItem/useMenuItem.js +5 -10
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +27 -22
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +7 -4
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +7 -4
- 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 +3 -0
- 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 +3 -0
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +8 -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 +26 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -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 +47 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +5 -5
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +5 -2
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +184 -5
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.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 +17 -17
- 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/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib/components/MenuTrigger/useTriggerElement.js +0 -165
- package/lib/components/MenuTrigger/useTriggerElement.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
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -180
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -1,39 +1,32 @@
|
|
1
|
-
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
1
|
+
import { mergeClasses, __styles, shorthands } from '@fluentui/react-make-styles';
|
2
2
|
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
3
|
+
import { tokens } from '@fluentui/react-theme';
|
4
|
+
import { useCheckmarkStyles } from '../../selectable/index';
|
3
5
|
export const menuItemClassName = 'fui-MenuItem';
|
4
6
|
|
5
7
|
const useStyles = /*#__PURE__*/__styles({
|
6
8
|
"focusIndicator": {
|
7
9
|
"B486eqv": "f2hkw1w",
|
8
|
-
"
|
9
|
-
"Jopkrh": ["f1781m5e", "flvaaa9"],
|
10
|
-
"hhrs2v": "f50u1b5",
|
11
|
-
"B7jbng7": ["flvaaa9", "f1781m5e"],
|
10
|
+
"B1bra5l": "fc85khu",
|
12
11
|
"e8izhr": "f1pxpxw8",
|
13
12
|
"in3gf6": "f1149fnl",
|
14
13
|
"B1i23sz": "fd1orka",
|
15
14
|
"ln9as": "fgtqheg",
|
16
15
|
"Bfgg0yq": "fq7mjg8",
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"fo1iai": "f1nbyjd2",
|
20
|
-
"Bh81ga8": ["famjx04", "f1lv6wi8"],
|
21
|
-
"qztvpn": "f5n18is",
|
22
|
-
"ge3ubn": ["f13az7yk", "f14kwzu1"],
|
23
|
-
"F41yt0": "fneogx5",
|
24
|
-
"Bxrdl85": ["f14kwzu1", "f13az7yk"],
|
16
|
+
"i16j1i": "fq9bj62",
|
17
|
+
"yxydaw": "fy07e8r",
|
25
18
|
"B9sa02e": "f1ha6shg",
|
26
|
-
"
|
27
|
-
"Ba9tnbb": ["f1ib27sc", "f14s7j5v"],
|
28
|
-
"Fpkomr": "f13oqbgc",
|
29
|
-
"Bttdqvk": ["f14s7j5v", "f1ib27sc"],
|
19
|
+
"yaquy9": "f4ltwxu",
|
30
20
|
"Bl8qd6i": "f1284xzw",
|
31
21
|
"Byzgy54": "f14dru39",
|
32
22
|
"mq8cyt": ["fvabyfg", "f12y1wz2"],
|
33
23
|
"B1a67j7": ["f12y1wz2", "fvabyfg"]
|
34
24
|
},
|
35
25
|
"root": {
|
36
|
-
"
|
26
|
+
"Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
|
27
|
+
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
28
|
+
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
29
|
+
"Btl43ni": ["fyu767a", "f1jar5jt"],
|
37
30
|
"qhf8xq": "f10pi13n",
|
38
31
|
"sj55zd": "f19n0e5",
|
39
32
|
"De3pzq": "fxugw4r",
|
@@ -44,7 +37,8 @@ const useStyles = /*#__PURE__*/__styles({
|
|
44
37
|
"Bt984gj": "f122n59",
|
45
38
|
"Be2twd7": "fkhj508",
|
46
39
|
"Bceei9c": "f1k6fduh",
|
47
|
-
"
|
40
|
+
"i8kkvl": "f1q8lukm",
|
41
|
+
"Belr9w4": "f1ma2n7n",
|
48
42
|
"Jwef8y": "f1knas48",
|
49
43
|
"Bi91k9c": "fnwyq0v",
|
50
44
|
"famaaq": "f1xqy1su"
|
@@ -64,11 +58,15 @@ const useStyles = /*#__PURE__*/__styles({
|
|
64
58
|
},
|
65
59
|
"icon": {
|
66
60
|
"a9b677": "f64fuq3",
|
67
|
-
"Bqenvij": "fjamq6b"
|
61
|
+
"Bqenvij": "fjamq6b",
|
62
|
+
"Be2twd7": "fe5j1ua",
|
63
|
+
"Bg96gwp": "fez10in"
|
68
64
|
},
|
69
65
|
"submenuIndicator": {
|
70
66
|
"a9b677": "f64fuq3",
|
71
|
-
"Bqenvij": "fjamq6b"
|
67
|
+
"Bqenvij": "fjamq6b",
|
68
|
+
"Be2twd7": "fe5j1ua",
|
69
|
+
"Bg96gwp": "fez10in"
|
72
70
|
},
|
73
71
|
"disabled": {
|
74
72
|
"sj55zd": "f1s2aq7o",
|
@@ -77,7 +75,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
77
75
|
}
|
78
76
|
}, {
|
79
77
|
"i": [".f2hkw1w:focus-visible{outline-style:none;}"],
|
80
|
-
"d": ["[data-keyboard-nav] .
|
78
|
+
"d": ["[data-keyboard-nav] .fc85khu:focus{border-color:transparent;}", "[data-keyboard-nav] .f1pxpxw8:focus:after{content:\"\";}", "[data-keyboard-nav] .f1149fnl:focus:after{position:absolute;}", "[data-keyboard-nav] .fd1orka:focus:after{pointer-events:none;}", "[data-keyboard-nav] .fgtqheg:focus:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fq7mjg8:focus:after{z-index:1;}", "[data-keyboard-nav] .fq9bj62:focus:after{border-style:solid;}", "[data-keyboard-nav] .fy07e8r:focus:after{border-width:2px;}", "[data-keyboard-nav] .f1ha6shg:focus:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f4ltwxu:focus:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1284xzw:focus:after{top:-2px;}", "[data-keyboard-nav] .f14dru39:focus:after{bottom:-2px;}", "[data-keyboard-nav] .fvabyfg:focus:after{left:-2px;}", "[data-keyboard-nav] .f12y1wz2:focus:after{right:-2px;}", ".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);}", ".f10pi13n{position:relative;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1k6fduh{cursor:pointer;}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f161knb0{padding-left:2px;}", ".f12huiiw{padding-right:2px;}", ".f3rmtva{background-color:transparent;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}", ".fe5j1ua{font-size:20px;}", ".fez10in{line-height:0;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"],
|
81
79
|
"h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"],
|
82
80
|
"f": [".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}", ".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}"]
|
83
81
|
});
|
@@ -87,7 +85,10 @@ const useStyles = /*#__PURE__*/__styles({
|
|
87
85
|
export const useMenuItemStyles = state => {
|
88
86
|
const styles = useStyles();
|
89
87
|
state.root.className = mergeClasses(menuItemClassName, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
|
90
|
-
|
88
|
+
|
89
|
+
if (state.content) {
|
90
|
+
state.content.className = mergeClasses(styles.content, state.content.className);
|
91
|
+
}
|
91
92
|
|
92
93
|
if (state.secondaryContent) {
|
93
94
|
state.secondaryContent.className = mergeClasses(!state.disabled && styles.secondaryContent, state.secondaryContent.className);
|
@@ -100,5 +101,7 @@ export const useMenuItemStyles = state => {
|
|
100
101
|
if (state.submenuIndicator) {
|
101
102
|
state.submenuIndicator.className = mergeClasses(styles.submenuIndicator, state.submenuIndicator.className);
|
102
103
|
}
|
104
|
+
|
105
|
+
useCheckmarkStyles(state);
|
103
106
|
};
|
104
107
|
//# sourceMappingURL=useMenuItemStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,6BAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AAIA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAgEA;;;AACA,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAAyB;AACxD,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,iBADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,MAAM,CAAC,cAH0B,EAIjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAJQ,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;;AAQA,MAAI,KAAK,CAAC,OAAV,EAAmB;AACjB,IAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CAAC,MAAM,CAAC,OAAR,EAAiB,KAAK,CAAC,OAAN,CAAc,SAA/B,CAAtC;AACD;;AAED,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAC7C,CAAC,KAAK,CAAC,QAAP,IAAmB,MAAM,CAAC,gBADmB,EAE7C,KAAK,CAAC,gBAAN,CAAuB,SAFsB,CAA/C;AAID;;AAED,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAAC,MAAM,CAAC,gBAAR,EAA0B,KAAK,CAAC,gBAAN,CAAuB,SAAjD,CAA/C;AACD;;AACD,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CA7BM","sourceRoot":""}
|
@@ -1,13 +1,17 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { getSlots } from '@fluentui/react-utilities';
|
3
|
-
import { menuItemSlots } from '../MenuItem/index';
|
4
3
|
/** Function that renders the final JSX of the component */
|
5
4
|
|
6
5
|
export const renderMenuItemCheckbox = state => {
|
7
6
|
const {
|
8
7
|
slots,
|
9
8
|
slotProps
|
10
|
-
} = getSlots(state
|
11
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
9
|
+
} = getSlots(state);
|
10
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
11
|
+
}, /*#__PURE__*/React.createElement(slots.checkmark, { ...slotProps.checkmark
|
12
|
+
}), /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
|
13
|
+
}), /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
|
14
|
+
}), /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
|
15
|
+
}));
|
12
16
|
};
|
13
17
|
//# sourceMappingURL=renderMenuItemCheckbox.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuItemCheckbox/renderMenuItemCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAIA;;AACA,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAiC;AACrE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJF,CADF;AAQD,CAXM","sourceRoot":""}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { getSlots } from '@fluentui/react-utilities';
|
3
|
-
import { menuItemSlots } from '../MenuItem/index';
|
4
3
|
/**
|
5
4
|
* Redefine the render function to add slots. Reuse the menuitemradio structure but add
|
6
5
|
* slots to children.
|
@@ -10,7 +9,12 @@ export const renderMenuItemRadio = state => {
|
|
10
9
|
const {
|
11
10
|
slots,
|
12
11
|
slotProps
|
13
|
-
} = getSlots(state
|
14
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
12
|
+
} = getSlots(state);
|
13
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
14
|
+
}, /*#__PURE__*/React.createElement(slots.checkmark, { ...slotProps.checkmark
|
15
|
+
}), /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
|
16
|
+
}), /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
|
17
|
+
}), /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
|
18
|
+
}));
|
15
19
|
};
|
16
20
|
//# sourceMappingURL=renderMenuItemRadio.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuItemRadio/renderMenuItemRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAIA;;;AAGG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAA8B;AAC/D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAJF,CADF;AAQD,CAXM","sourceRoot":""}
|
@@ -12,6 +12,7 @@ export const renderMenuList = (state, contextValues) => {
|
|
12
12
|
} = getSlots(state);
|
13
13
|
return /*#__PURE__*/React.createElement(MenuListProvider, {
|
14
14
|
value: contextValues.menuList
|
15
|
-
}, /*#__PURE__*/React.createElement(slots.root,
|
15
|
+
}, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
16
|
+
}));
|
16
17
|
};
|
17
18
|
//# sourceMappingURL=renderMenuList.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuList/renderMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,gBAAT,QAAiC,gCAAjC;AAEA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAAG,CAAC,KAAD,EAAuB,aAAvB,KAA+D;AAC3F,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,gBAAD,EAAiB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAjB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuList/renderMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,K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AG,MAAK;AACnC,QAAM,aAAa,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,aAApB,CAApC;AACA,QAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,oBAApB,CAA3C;AACA,QAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,oBAApB,CAA3C;AACA,QAAM,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,SAApB,CAAhC;AACA,QAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,QAApB,CAA/B;AACA,QAAM,aAAa,GAAG,cAAc,CAAC,OAAO,IAAI,OAAO,CAAC,aAApB,CAApC;AAEA,SAAO;AACL,IAAA,aADK;AAEL,IAAA,oBAFK;AAGL,IAAA,oBAHK;AAIL,IAAA,SAJK;AAKL,IAAA,QALK;AAML,IAAA;AANK,GAAP;AAQD,CAhBD;AAkBA;;AAEG;;;AACH,MAAM,wBAAwB,GAAG,CAC/B,KAD+B,EAE/B,YAF+B,EAG/B,cAH+B,KAI7B;AACF,MAAI,sBAAsB,GAAG,KAA7B;;AACA,OAAK,MAAM,GAAX,IAAkB,YAAlB,EAAgC;AAC9B,QAAI,KAAK,CAAC,GAAD,CAAT,EAA4G;AAC1G,MAAA,sBAAsB,GAAG,IAAzB;AACD;AACF;;AAED,SAAO,cAAc,IAAI,sBAAzB;AACD,CAbD","sourceRoot":""}
|
@@ -1,14 +1,15 @@
|
|
1
|
-
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
1
|
+
import { mergeClasses, __styles, shorthands } from '@fluentui/react-make-styles';
|
2
2
|
export const menuListClassName = 'fui-MenuList';
|
3
3
|
|
4
4
|
const useStyles = /*#__PURE__*/__styles({
|
5
5
|
"root": {
|
6
6
|
"mc9l5x": "f22iagw",
|
7
7
|
"Beiy3e4": "f1vx9l62",
|
8
|
-
"
|
8
|
+
"i8kkvl": "f16mnhsx",
|
9
|
+
"Belr9w4": "fbi42co"
|
9
10
|
}
|
10
11
|
}, {
|
11
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".
|
12
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f16mnhsx{-webkit-column-gap:2px;column-gap:2px;}", ".fbi42co{row-gap:2px;}"]
|
12
13
|
});
|
13
14
|
/**
|
14
15
|
* Apply styling to the Menu slots based on the state
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuList/useMenuListStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuList/useMenuListStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,6BAArD;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAQA;;AAEG;;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAAwC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,iBAAD,EAAoB,MAAM,CAAC,IAA3B,EAAiC,KAAK,CAAC,IAAN,CAAW,SAA5C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
|
@@ -12,9 +12,11 @@ export const renderMenuPopover = state => {
|
|
12
12
|
} = getSlots(state);
|
13
13
|
|
14
14
|
if (state.inline) {
|
15
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
15
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
16
|
+
});
|
16
17
|
}
|
17
18
|
|
18
|
-
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(slots.root,
|
19
|
+
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
20
|
+
}));
|
19
21
|
};
|
20
22
|
//# sourceMappingURL=renderMenuPopover.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuPopover/renderMenuPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,MAAT,QAAuB,wBAAvB;AAEA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAA4B;AAC3D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,CAArC;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,wBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuPopover/renderMenuPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,MAAT,QAAuB,wBAAvB;AAEA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAA4B;AAC3D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,CAArC;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,wBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,KAAX,CAAP;AACD;;AAED,sBACE,KAAA,CAAA,aAAA,CAAC,MAAD,EAAO,IAAP,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,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,GAAA,iBAAiB,CAAG,CAAH,CAAjB;AACD,GAfqC,CAAtC;AAiBA,SAAO;AACL,IAAA,MADK;AAEL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KAFP;AAKL,IAAA,IAAI,EAAE;AALD,GAAP;AAOD,CA9EM","sourceRoot":""}
|
@@ -1,14 +1,18 @@
|
|
1
|
-
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@fluentui/react-make-styles';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
2
3
|
export const menuPopoverClassName = 'fui-MenuPopover';
|
3
4
|
|
4
5
|
const useStyles = /*#__PURE__*/__styles({
|
5
6
|
"root": {
|
6
|
-
"
|
7
|
+
"Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
|
8
|
+
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
9
|
+
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
10
|
+
"Btl43ni": ["fyu767a", "f1jar5jt"],
|
7
11
|
"De3pzq": "fxugw4r",
|
8
12
|
"Bf4jedk": "fkqu4gx",
|
9
13
|
"B2u0y6b": "f1kaai3v",
|
10
14
|
"a9b677": "f1ahpp82",
|
11
|
-
"E5pizo":
|
15
|
+
"E5pizo": "f1hg901r",
|
12
16
|
"z8tnut": "f10ra9hq",
|
13
17
|
"z189sj": ["f8wuabp", "fycuoez"],
|
14
18
|
"Byoj8tv": "f1y2xyjm",
|
@@ -27,7 +31,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
27
31
|
"zhjwy3": ["fjscplz", "f1gn591s"]
|
28
32
|
}
|
29
33
|
}, {
|
30
|
-
"d": [".
|
34
|
+
"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);}"]
|
31
35
|
});
|
32
36
|
/**
|
33
37
|
* Apply styling to the Menu slots based on the state
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":"AAAA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;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;;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","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,15 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { useMenuSplitGroup } from './useMenuSplitGroup';
|
3
|
+
import { renderMenuSplitGroup } from './renderMenuSplitGroup';
|
4
|
+
import { useMenuSplitGroupStyles } from './useMenuSplitGroupStyles';
|
5
|
+
/**
|
6
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
7
|
+
*/
|
8
|
+
|
9
|
+
export const MenuSplitGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = useMenuSplitGroup(props, ref);
|
11
|
+
useMenuSplitGroupStyles(state);
|
12
|
+
return renderMenuSplitGroup(state);
|
13
|
+
});
|
14
|
+
MenuSplitGroup.displayName = 'MenuSplitGroup';
|
15
|
+
//# sourceMappingURL=MenuSplitGroup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,uBAAT,QAAwC,2BAAxC;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;AAEA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AACA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALuE,CAAjE;AAOP,cAAc,CAAC,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,"file":"MenuSplitGroup.types.js","sourceRoot":"","sources":["../../../src/components/MenuSplitGroup/MenuSplitGroup.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuSplitGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
3
|
+
/**
|
4
|
+
* Render the final JSX of MenuSplitGroup
|
5
|
+
*/
|
6
|
+
|
7
|
+
export const renderMenuSplitGroup = state => {
|
8
|
+
const {
|
9
|
+
slots,
|
10
|
+
slotProps
|
11
|
+
} = getSlots(state);
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
13
|
+
});
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=renderMenuSplitGroup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/renderMenuSplitGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA+B;AACjE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAsB,KAAtB,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourceRoot":""}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { MenuSplitGroupProps, MenuSplitGroupState } from './MenuSplitGroup.types';
|
3
|
+
/**
|
4
|
+
* Create the state required to render MenuSplitGroup.
|
5
|
+
*
|
6
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles,
|
7
|
+
* before being passed to renderMenuSplitGroup.
|
8
|
+
*
|
9
|
+
* @param props - props from this instance of MenuSplitGroup
|
10
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
11
|
+
*/
|
12
|
+
export declare const useMenuSplitGroup: (props: MenuSplitGroupProps, ref: React.Ref<HTMLElement>) => MenuSplitGroupState;
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { getNativeElementProps, getRTLSafeKey, useMergedRefs } from '@fluentui/react-utilities';
|
3
|
+
import { useFocusFinders } from '@fluentui/react-tabster';
|
4
|
+
import { useFluent } from '@fluentui/react-shared-contexts';
|
5
|
+
import { ArrowRight, ArrowLeft } from '@fluentui/keyboard-keys';
|
6
|
+
/**
|
7
|
+
* Create the state required to render MenuSplitGroup.
|
8
|
+
*
|
9
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles,
|
10
|
+
* before being passed to renderMenuSplitGroup.
|
11
|
+
*
|
12
|
+
* @param props - props from this instance of MenuSplitGroup
|
13
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
14
|
+
*/
|
15
|
+
|
16
|
+
export const useMenuSplitGroup = (props, ref) => {
|
17
|
+
const innerRef = React.useRef();
|
18
|
+
const {
|
19
|
+
dir,
|
20
|
+
targetDocument
|
21
|
+
} = useFluent();
|
22
|
+
const nextArrowKey = getRTLSafeKey(ArrowRight, dir);
|
23
|
+
const prevArrowKey = getRTLSafeKey(ArrowLeft, dir);
|
24
|
+
const {
|
25
|
+
findNextFocusable,
|
26
|
+
findPrevFocusable
|
27
|
+
} = useFocusFinders();
|
28
|
+
const onKeyDown = React.useCallback(e => {
|
29
|
+
var _a;
|
30
|
+
|
31
|
+
const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
|
32
|
+
|
33
|
+
if (!activeElement) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
|
37
|
+
if (!((_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.contains(activeElement))) {
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
|
41
|
+
if (e.key === nextArrowKey) {
|
42
|
+
const next = findNextFocusable(activeElement, {
|
43
|
+
container: innerRef.current
|
44
|
+
});
|
45
|
+
next === null || next === void 0 ? void 0 : next.focus();
|
46
|
+
}
|
47
|
+
|
48
|
+
if (e.key === prevArrowKey) {
|
49
|
+
const prev = findPrevFocusable(activeElement, {
|
50
|
+
container: innerRef.current
|
51
|
+
});
|
52
|
+
prev === null || prev === void 0 ? void 0 : prev.focus();
|
53
|
+
}
|
54
|
+
}, [findNextFocusable, findPrevFocusable, targetDocument, nextArrowKey, prevArrowKey]);
|
55
|
+
return {
|
56
|
+
components: {
|
57
|
+
root: 'div'
|
58
|
+
},
|
59
|
+
root: getNativeElementProps('div', {
|
60
|
+
role: 'group',
|
61
|
+
ref: useMergedRefs(ref, innerRef),
|
62
|
+
onKeyDown,
|
63
|
+
...props
|
64
|
+
})
|
65
|
+
};
|
66
|
+
};
|
67
|
+
//# sourceMappingURL=useMenuSplitGroup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,aAAhC,EAA+C,aAA/C,QAAoE,2BAApE;AACA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SAAS,SAAT,QAA0B,iCAA1B;AAEA,SAAS,UAAT,EAAqB,SAArB,QAAsC,yBAAtC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAA6B,GAA7B,KAAiF;AAChH,QAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,EAAjB;AACA,QAAM;AAAE,IAAA,GAAF;AAAO,IAAA;AAAP,MAA0B,SAAS,EAAzC;AAEA,QAAM,YAAY,GAAG,aAAa,CAAC,UAAD,EAAa,GAAb,CAAlC;AACA,QAAM,YAAY,GAAG,aAAa,CAAC,SAAD,EAAY,GAAZ,CAAlC;AAEA,QAAM;AAAE,IAAA,iBAAF;AAAqB,IAAA;AAArB,MAA2C,eAAe,EAAhE;AAEA,QAAM,SAAS,GAAG,KAAK,CAAC,WAAN,CACf,CAAD,IAAwC;;;AACtC,UAAM,aAAa,GAAG,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,aAAtC;;AACA,QAAI,CAAC,aAAL,EAAoB;AAClB;AACD;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const menuSplitGroupClassName = "fui-MenuSplitGroup";
|
3
|
+
/**
|
4
|
+
* Apply styling to the MenuSplitGroup slots based on the state
|
5
|
+
*/
|
6
|
+
export declare const useMenuSplitGroupStyles: (state: MenuSplitGroupState) => MenuSplitGroupState;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { __styles, mergeClasses } from '@fluentui/react-make-styles';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
|
+
import { menuItemClassName } from '../MenuItem/useMenuItemStyles';
|
4
|
+
export const menuSplitGroupClassName = 'fui-MenuSplitGroup';
|
5
|
+
/**
|
6
|
+
* Styles for the root slot
|
7
|
+
*/
|
8
|
+
|
9
|
+
const useStyles = /*#__PURE__*/__styles({
|
10
|
+
"root": {
|
11
|
+
"mc9l5x": "f22iagw",
|
12
|
+
"u7v6m2": "f168awwq",
|
13
|
+
"Bo1wru1": ["f1om2jlk", "fcyhg04"],
|
14
|
+
"Bhkyaub": ["fgqgg70", "fqo1hry"],
|
15
|
+
"J9ixe0": ["fh1zedf", "f1auaj6e"],
|
16
|
+
"rj29m3": ["fokbbcd", "f1xlvh9o"],
|
17
|
+
"lispf9": "f1et5qag",
|
18
|
+
"B9hwub1": "f13ngu1f",
|
19
|
+
"dvf9w6": "f1db9j62",
|
20
|
+
"Hjn5ok": "f92z21p"
|
21
|
+
}
|
22
|
+
}, {
|
23
|
+
"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);}"]
|
24
|
+
});
|
25
|
+
/**
|
26
|
+
* Apply styling to the MenuSplitGroup slots based on the state
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
export const useMenuSplitGroupStyles = state => {
|
31
|
+
const styles = useStyles();
|
32
|
+
state.root.className = mergeClasses(menuSplitGroupClassName, styles.root, state.root.className);
|
33
|
+
return state;
|
34
|
+
};
|
35
|
+
//# sourceMappingURL=useMenuSplitGroupStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroupStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,iBAAT,QAAkC,+BAAlC;AAGA,OAAO,MAAM,uBAAuB,GAAG,oBAAhC;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAoD;AACzF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,uBAAD,EAA0B,MAAM,CAAC,IAAjC,EAAuC,KAAK,CAAC,IAAN,CAAW,SAAlD,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
|
@@ -4,4 +4,4 @@ import type { MenuTriggerProps } from './MenuTrigger.types';
|
|
4
4
|
* Wraps a trigger element as an only child
|
5
5
|
* and adds the necessary event handling to open a popup menu
|
6
6
|
*/
|
7
|
-
export declare const MenuTrigger: React.
|
7
|
+
export declare const MenuTrigger: React.ForwardRefExoticComponent<MenuTriggerProps & React.RefAttributes<HTMLElement>>;
|