@fluentui/react-menu 9.12.10 → 9.12.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +133 -1
- package/CHANGELOG.md +37 -2
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.js +13 -11
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.js +1 -1
- package/lib/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js +2 -2
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js +5 -4
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -2
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/renderMenuItem.js +10 -2
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useCharacterSearch.js +5 -4
- package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.js +8 -8
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +9 -2
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemLink/MenuItemLink.js.map +1 -1
- package/lib/components/MenuItemLink/renderMenuItemLink.js +9 -2
- package/lib/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
- package/lib/components/MenuItemLink/useMenuItemLink.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +9 -2
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.js +5 -4
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js +6 -4
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js +6 -5
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js +6 -4
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -2
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +8 -6
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js +15 -13
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.js.map +1 -1
- package/lib/utils/useIsSubmenu.js.map +1 -1
- package/lib/utils/useOnMenuEnter.js +1 -1
- package/lib/utils/useOnMenuEnter.js.map +1 -1
- package/lib-commonjs/Menu.js +2 -2
- package/lib-commonjs/Menu.js.map +1 -1
- package/lib-commonjs/MenuDivider.js +2 -2
- package/lib-commonjs/MenuDivider.js.map +1 -1
- package/lib-commonjs/MenuGroup.js +2 -2
- package/lib-commonjs/MenuGroup.js.map +1 -1
- package/lib-commonjs/MenuGroupHeader.js +2 -2
- package/lib-commonjs/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/MenuItem.js +2 -2
- package/lib-commonjs/MenuItem.js.map +1 -1
- package/lib-commonjs/MenuItemCheckbox.js +2 -2
- package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/MenuItemLink.js +2 -2
- package/lib-commonjs/MenuItemLink.js.map +1 -1
- package/lib-commonjs/MenuItemRadio.js +2 -2
- package/lib-commonjs/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/MenuList.js +2 -2
- package/lib-commonjs/MenuList.js.map +1 -1
- package/lib-commonjs/MenuPopover.js +2 -2
- package/lib-commonjs/MenuPopover.js.map +1 -1
- package/lib-commonjs/MenuSplitGroup.js +2 -2
- package/lib-commonjs/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/MenuTrigger.js +2 -2
- package/lib-commonjs/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.js +5 -3
- package/lib-commonjs/components/Menu/Menu.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.types.js +2 -2
- package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +6 -6
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/renderMenu.js +5 -3
- package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.js +35 -31
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.js +4 -2
- package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -7
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/index.js +6 -6
- package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +8 -6
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js +7 -5
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js +7 -3
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.js +9 -7
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/index.js +7 -7
- package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +11 -8
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js +8 -6
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +6 -4
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js +6 -2
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -7
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js +6 -6
- package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +8 -6
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +8 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js +7 -3
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js +9 -7
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/index.js +6 -6
- package/lib-commonjs/components/MenuItem/index.js.map +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -6
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js +10 -7
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.js +31 -29
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js +7 -3
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -7
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js +6 -6
- package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -6
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +13 -11
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js +8 -4
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.js +7 -5
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/index.js +6 -6
- package/lib-commonjs/components/MenuItemLink/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js +15 -6
- package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js +7 -5
- package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js +9 -5
- package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -7
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js +6 -6
- package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -6
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +13 -11
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js +8 -4
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.js +9 -7
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.types.js +2 -2
- package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js +7 -7
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js +11 -8
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js +21 -17
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js +4 -2
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js +7 -3
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.js +9 -7
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/index.js +6 -6
- package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +13 -10
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +23 -19
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js +7 -3
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +9 -7
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js +6 -6
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +8 -6
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +21 -17
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js +7 -3
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +5 -3
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +2 -2
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js +5 -5
- package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +5 -3
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +33 -29
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/index.js +3 -3
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.js +14 -8
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js +8 -4
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.js +14 -8
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js +8 -4
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- package/lib-commonjs/index.js +225 -83
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/selectable/index.js +3 -3
- package/lib-commonjs/selectable/index.js.map +1 -1
- package/lib-commonjs/selectable/types.js +2 -2
- package/lib-commonjs/selectable/types.js.map +1 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.styles.js +4 -2
- package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -1
- package/lib-commonjs/utils/index.js +2 -2
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js +5 -3
- package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js +16 -10
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +16 -16
@@ -4,29 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "useMenuItem_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return useMenuItem_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
-
const
|
12
|
-
const
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
14
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
13
15
|
const _useCharacterSearch = require("./useCharacterSearch");
|
14
16
|
const _menuTriggerContext = require("../../contexts/menuTriggerContext");
|
15
|
-
const
|
17
|
+
const _reacticons = require("@fluentui/react-icons");
|
16
18
|
const _menuListContext = require("../../contexts/menuListContext");
|
17
19
|
const _menuContext = require("../../contexts/menuContext");
|
18
|
-
const
|
19
|
-
const
|
20
|
-
const ChevronRightIcon = (0,
|
21
|
-
const ChevronLeftIcon = (0,
|
20
|
+
const _reactaria = require("@fluentui/react-aria");
|
21
|
+
const _keyboardkeys = require("@fluentui/keyboard-keys");
|
22
|
+
const ChevronRightIcon = (0, _reacticons.bundleIcon)(_reacticons.ChevronRightFilled, _reacticons.ChevronRightRegular);
|
23
|
+
const ChevronLeftIcon = (0, _reacticons.bundleIcon)(_reacticons.ChevronLeftFilled, _reacticons.ChevronLeftRegular);
|
22
24
|
const useMenuItem_unstable = (props, ref)=>{
|
23
25
|
const isSubmenuTrigger = (0, _menuTriggerContext.useMenuTriggerContext_unstable)();
|
24
26
|
const persistOnClickContext = (0, _menuContext.useMenuContext_unstable)((context)=>context.persistOnItemClick);
|
25
|
-
const { as ='div'
|
27
|
+
const { as = 'div', disabled = false, hasSubmenu = isSubmenuTrigger, persistOnClick = persistOnClickContext } = props;
|
26
28
|
const hasIcons = (0, _menuListContext.useMenuListContext_unstable)((context)=>context.hasIcons);
|
27
29
|
const hasCheckmarks = (0, _menuListContext.useMenuListContext_unstable)((context)=>context.hasCheckmarks);
|
28
30
|
const setOpen = (0, _menuContext.useMenuContext_unstable)((context)=>context.setOpen);
|
29
|
-
const { dir
|
31
|
+
const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
|
30
32
|
const innerRef = _react.useRef(null);
|
31
33
|
const dismissedWithKeyboardRef = _react.useRef(false);
|
32
34
|
const state = {
|
@@ -41,26 +43,26 @@ const useMenuItem_unstable = (props, ref)=>{
|
|
41
43
|
content: 'span',
|
42
44
|
secondaryContent: 'span'
|
43
45
|
},
|
44
|
-
root:
|
46
|
+
root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)(as, (0, _reactaria.useARIAButtonProps)(as, {
|
45
47
|
role: 'menuitem',
|
46
48
|
...props,
|
47
49
|
disabled: false,
|
48
50
|
disabledFocusable: disabled,
|
49
|
-
ref: (0,
|
50
|
-
onKeyDown: (0,
|
51
|
-
var _props_onKeyDown;
|
52
|
-
(_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(
|
53
|
-
if (!event.isDefaultPrevented() && (event.key ===
|
51
|
+
ref: (0, _reactutilities.useMergedRefs)(ref, innerRef),
|
52
|
+
onKeyDown: (0, _reactutilities.useEventCallback)((event)=>{
|
53
|
+
var _props_onKeyDown, _props;
|
54
|
+
(_props_onKeyDown = (_props = props).onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(_props, event);
|
55
|
+
if (!event.isDefaultPrevented() && (event.key === _keyboardkeys.Space || event.key === _keyboardkeys.Enter)) {
|
54
56
|
dismissedWithKeyboardRef.current = true;
|
55
57
|
}
|
56
58
|
}),
|
57
|
-
onMouseEnter: (0,
|
58
|
-
var _innerRef_current, _props_onMouseEnter;
|
59
|
+
onMouseEnter: (0, _reactutilities.useEventCallback)((event)=>{
|
60
|
+
var _innerRef_current, _props_onMouseEnter, _props;
|
59
61
|
(_innerRef_current = innerRef.current) === null || _innerRef_current === void 0 ? void 0 : _innerRef_current.focus();
|
60
|
-
(_props_onMouseEnter = props.onMouseEnter) === null || _props_onMouseEnter === void 0 ? void 0 : _props_onMouseEnter.call(
|
62
|
+
(_props_onMouseEnter = (_props = props).onMouseEnter) === null || _props_onMouseEnter === void 0 ? void 0 : _props_onMouseEnter.call(_props, event);
|
61
63
|
}),
|
62
|
-
onClick: (0,
|
63
|
-
var _props_onClick;
|
64
|
+
onClick: (0, _reactutilities.useEventCallback)((event)=>{
|
65
|
+
var _props_onClick, _props;
|
64
66
|
if (!hasSubmenu && !persistOnClick) {
|
65
67
|
setOpen(event, {
|
66
68
|
open: false,
|
@@ -71,34 +73,34 @@ const useMenuItem_unstable = (props, ref)=>{
|
|
71
73
|
});
|
72
74
|
dismissedWithKeyboardRef.current = false;
|
73
75
|
}
|
74
|
-
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(
|
76
|
+
(_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, event);
|
75
77
|
})
|
76
78
|
})), {
|
77
79
|
elementType: 'div'
|
78
80
|
}),
|
79
|
-
icon:
|
81
|
+
icon: _reactutilities.slot.optional(props.icon, {
|
80
82
|
renderByDefault: hasIcons,
|
81
83
|
elementType: 'span'
|
82
84
|
}),
|
83
|
-
checkmark:
|
85
|
+
checkmark: _reactutilities.slot.optional(props.checkmark, {
|
84
86
|
renderByDefault: hasCheckmarks,
|
85
87
|
elementType: 'span'
|
86
88
|
}),
|
87
|
-
submenuIndicator:
|
89
|
+
submenuIndicator: _reactutilities.slot.optional(props.submenuIndicator, {
|
88
90
|
renderByDefault: hasSubmenu,
|
89
91
|
defaultProps: {
|
90
92
|
children: dir === 'ltr' ? /*#__PURE__*/ _react.createElement(ChevronRightIcon, null) : /*#__PURE__*/ _react.createElement(ChevronLeftIcon, null)
|
91
93
|
},
|
92
94
|
elementType: 'span'
|
93
95
|
}),
|
94
|
-
content:
|
96
|
+
content: _reactutilities.slot.optional(props.content, {
|
95
97
|
renderByDefault: !!props.children,
|
96
98
|
defaultProps: {
|
97
99
|
children: props.children
|
98
100
|
},
|
99
101
|
elementType: 'span'
|
100
102
|
}),
|
101
|
-
secondaryContent:
|
103
|
+
secondaryContent: _reactutilities.slot.optional(props.secondaryContent, {
|
102
104
|
elementType: 'span'
|
103
105
|
})
|
104
106
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, useMergedRefs, getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useCharacterSearch } from './useCharacterSearch';\nimport { useMenuTriggerContext_unstable } from '../../contexts/menuTriggerContext';\nimport { ChevronRightFilled, ChevronRightRegular, ChevronLeftFilled, ChevronLeftRegular, bundleIcon } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nconst ChevronRightIcon = bundleIcon(ChevronRightFilled, ChevronRightRegular);\nconst ChevronLeftIcon = bundleIcon(ChevronLeftFilled, ChevronLeftRegular);\n/**\n * Returns the props and state required to render the component\n */ export const useMenuItem_unstable = (props, ref)=>{\n const isSubmenuTrigger = useMenuTriggerContext_unstable();\n const persistOnClickContext = useMenuContext_unstable((context)=>context.persistOnItemClick);\n const { as ='div'
|
1
|
+
{"version":3,"sources":["useMenuItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, useMergedRefs, getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useCharacterSearch } from './useCharacterSearch';\nimport { useMenuTriggerContext_unstable } from '../../contexts/menuTriggerContext';\nimport { ChevronRightFilled, ChevronRightRegular, ChevronLeftFilled, ChevronLeftRegular, bundleIcon } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nconst ChevronRightIcon = bundleIcon(ChevronRightFilled, ChevronRightRegular);\nconst ChevronLeftIcon = bundleIcon(ChevronLeftFilled, ChevronLeftRegular);\n/**\n * Returns the props and state required to render the component\n */ export const useMenuItem_unstable = (props, ref)=>{\n const isSubmenuTrigger = useMenuTriggerContext_unstable();\n const persistOnClickContext = useMenuContext_unstable((context)=>context.persistOnItemClick);\n const { as = 'div', disabled = false, hasSubmenu = isSubmenuTrigger, persistOnClick = persistOnClickContext } = props;\n const hasIcons = useMenuListContext_unstable((context)=>context.hasIcons);\n const hasCheckmarks = useMenuListContext_unstable((context)=>context.hasCheckmarks);\n const setOpen = useMenuContext_unstable((context)=>context.setOpen);\n const { dir } = useFluent();\n const innerRef = React.useRef(null);\n const dismissedWithKeyboardRef = React.useRef(false);\n const state = {\n hasSubmenu,\n disabled,\n persistOnClick,\n components: {\n root: 'div',\n icon: 'span',\n checkmark: 'span',\n submenuIndicator: 'span',\n content: 'span',\n secondaryContent: 'span'\n },\n root: slot.always(getNativeElementProps(as, useARIAButtonProps(as, {\n role: 'menuitem',\n ...props,\n disabled: false,\n disabledFocusable: disabled,\n ref: useMergedRefs(ref, innerRef),\n onKeyDown: useEventCallback((event)=>{\n var _props_onKeyDown, _props;\n (_props_onKeyDown = (_props = props).onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(_props, event);\n if (!event.isDefaultPrevented() && (event.key === Space || event.key === Enter)) {\n dismissedWithKeyboardRef.current = true;\n }\n }),\n onMouseEnter: useEventCallback((event)=>{\n var _innerRef_current, _props_onMouseEnter, _props;\n (_innerRef_current = innerRef.current) === null || _innerRef_current === void 0 ? void 0 : _innerRef_current.focus();\n (_props_onMouseEnter = (_props = props).onMouseEnter) === null || _props_onMouseEnter === void 0 ? void 0 : _props_onMouseEnter.call(_props, event);\n }),\n onClick: useEventCallback((event)=>{\n var _props_onClick, _props;\n if (!hasSubmenu && !persistOnClick) {\n setOpen(event, {\n open: false,\n keyboard: dismissedWithKeyboardRef.current,\n bubble: true,\n type: 'menuItemClick',\n event\n });\n dismissedWithKeyboardRef.current = false;\n }\n (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, event);\n })\n })), {\n elementType: 'div'\n }),\n icon: slot.optional(props.icon, {\n renderByDefault: hasIcons,\n elementType: 'span'\n }),\n checkmark: slot.optional(props.checkmark, {\n renderByDefault: hasCheckmarks,\n elementType: 'span'\n }),\n submenuIndicator: slot.optional(props.submenuIndicator, {\n renderByDefault: hasSubmenu,\n defaultProps: {\n children: dir === 'ltr' ? /*#__PURE__*/ React.createElement(ChevronRightIcon, null) : /*#__PURE__*/ React.createElement(ChevronLeftIcon, null)\n },\n elementType: 'span'\n }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.children,\n defaultProps: {\n children: props.children\n },\n elementType: 'span'\n }),\n secondaryContent: slot.optional(props.secondaryContent, {\n elementType: 'span'\n })\n };\n useCharacterSearch(state, innerRef);\n return state;\n};\n"],"names":["useMenuItem_unstable","ChevronRightIcon","bundleIcon","ChevronRightFilled","ChevronRightRegular","ChevronLeftIcon","ChevronLeftFilled","ChevronLeftRegular","props","ref","isSubmenuTrigger","useMenuTriggerContext_unstable","persistOnClickContext","useMenuContext_unstable","context","persistOnItemClick","as","disabled","hasSubmenu","persistOnClick","hasIcons","useMenuListContext_unstable","hasCheckmarks","setOpen","dir","useFluent","innerRef","React","useRef","dismissedWithKeyboardRef","state","components","root","icon","checkmark","submenuIndicator","content","secondaryContent","slot","always","getNativeElementProps","useARIAButtonProps","role","disabledFocusable","useMergedRefs","onKeyDown","useEventCallback","event","_props_onKeyDown","_props","call","isDefaultPrevented","key","Space","Enter","current","onMouseEnter","_innerRef_current","_props_onMouseEnter","focus","onClick","_props_onClick","open","keyboard","bubble","type","elementType","optional","renderByDefault","defaultProps","children","createElement","useCharacterSearch"],"mappings":";;;;+BAciBA;;;eAAAA;;;;iEAdM;gCACsD;qCAC7B;oCACb;oCACY;4BAC4D;iCAC/D;6BACJ;2BACL;8BACN;AAC7B,MAAMC,mBAAmBC,IAAAA,sBAAU,EAACC,8BAAkB,EAAEC,+BAAmB;AAC3E,MAAMC,kBAAkBH,IAAAA,sBAAU,EAACI,6BAAiB,EAAEC,8BAAkB;AAG7D,MAAMP,uBAAuB,CAACQ,OAAOC;IAC5C,MAAMC,mBAAmBC,IAAAA,kDAA8B;IACvD,MAAMC,wBAAwBC,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQC,kBAAkB;IAC3F,MAAM,EAAEC,KAAK,KAAK,EAAEC,WAAW,KAAK,EAAEC,aAAaR,gBAAgB,EAAES,iBAAiBP,qBAAqB,EAAE,GAAGJ;IAChH,MAAMY,WAAWC,IAAAA,4CAA2B,EAAC,CAACP,UAAUA,QAAQM,QAAQ;IACxE,MAAME,gBAAgBD,IAAAA,4CAA2B,EAAC,CAACP,UAAUA,QAAQQ,aAAa;IAClF,MAAMC,UAAUV,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQS,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"}
|
@@ -9,8 +9,12 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
menuItemClassNames: ()
|
13
|
-
|
12
|
+
menuItemClassNames: function() {
|
13
|
+
return menuItemClassNames;
|
14
|
+
},
|
15
|
+
useMenuItemStyles_unstable: function() {
|
16
|
+
return useMenuItemStyles_unstable;
|
17
|
+
}
|
14
18
|
});
|
15
19
|
const _react = require("@griffel/react");
|
16
20
|
const _index = require("../../selectable/index");
|
@@ -22,7 +26,7 @@ const menuItemClassNames = {
|
|
22
26
|
content: 'fui-MenuItem__content',
|
23
27
|
secondaryContent: 'fui-MenuItem__secondaryContent'
|
24
28
|
};
|
25
|
-
const useStyles = /*#__PURE__*/ (0, _react
|
29
|
+
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
26
30
|
focusIndicator: {
|
27
31
|
Brovlpu: "ftqa4ok",
|
28
32
|
B486eqv: "f2hkw1w",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuItemStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles, shorthands } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nexport const menuItemClassNames = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent'\n};\nconst useStyles = /*#__PURE__*/__styles({\n focusIndicator: {\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"f8hki3x\",\n Bci5o5g: [\"f1d2448m\", \"ffh67wi\"],\n n8qw10: \"f1bjia2o\",\n Bdrgwmp: [\"ffh67wi\", \"f1d2448m\"],\n Bm4h7ae: \"f15bsgw9\",\n B7ys5i9: \"f14e48fq\",\n Busjfv9: \"f18yb2kv\",\n Bhk32uz: \"fd6o370\",\n Bf4ptjt: \"fh1cnn4\",\n kclons: [\"fy7oxxb\", \"f184ne2d\"],\n Bhdgwq3: \"fpukqih\",\n Blkhhs4: [\"f184ne2d\", \"fy7oxxb\"],\n Bqtpl0w: \"frrh606\",\n clg4pj: [\"f1v5zibi\", \"fo2hd23\"],\n hgwjuy: \"ful5kiu\",\n Bonggc9: [\"fo2hd23\", \"f1v5zibi\"],\n B1tsrr9: [\"f1jqcqds\", \"ftffrms\"],\n Dah5zi: [\"ftffrms\", \"f1jqcqds\"],\n Bkh64rk: [\"f2e7qr6\", \"fsr1zz6\"],\n qqdqy8: [\"fsr1zz6\", \"f2e7qr6\"],\n B6dhp37: \"f1dvezut\",\n i03rao: [\"fd0oaoj\", \"f1cwg4i8\"],\n Boxcth7: \"fjvm52t\",\n Bsom6fd: [\"f1cwg4i8\", \"fd0oaoj\"],\n J0r882: \"f57olzd\",\n Bule8hv: [\"f4stah7\", \"fs1por5\"],\n Bjwuhne: \"f480a47\",\n Ghsupd: [\"fs1por5\", \"f4stah7\"]\n },\n root: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n qhf8xq: \"f10pi13n\",\n sj55zd: \"fkfq4zb\",\n De3pzq: \"fxugw4r\",\n z189sj: [\"fkzw4jo\", \"fzzclc0\"],\n uwmqm3: [\"fzzclc0\", \"fkzw4jo\"],\n z8tnut: \"fp2oml8\",\n B7ck84d: \"f1ewtqcl\",\n B2u0y6b: \"f1wklaru\",\n sshi5w: \"f1nxs5xn\",\n Bnnss6s: \"fi64zpg\",\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f1s2louj\",\n Be2twd7: \"fkhj508\",\n Bceei9c: \"f1k6fduh\",\n i8kkvl: \"f1q8lukm\",\n Belr9w4: \"f1ma2n7n\",\n Jwef8y: \"f1knas48\",\n Bi91k9c: \"fnwyq0v\",\n Bk3fhr4: \"ft1hn21\",\n Bmfj8id: \"fuxngvv\",\n Bg7n49j: \"fp258yr\",\n famaaq: \"f1xqy1su\"\n },\n content: {\n uwmqm3: [\"f161knb0\", \"f12huiiw\"],\n z189sj: [\"f12huiiw\", \"f161knb0\"],\n De3pzq: \"f3rmtva\",\n Bh6795r: \"fqerorx\"\n },\n secondaryContent: {\n uwmqm3: [\"f161knb0\", \"f12huiiw\"],\n z189sj: [\"f12huiiw\", \"f161knb0\"],\n sj55zd: \"f11d4kpn\",\n Bi91k9c: \"f1jp5ecu\",\n t0hwav: \"fc1cou1\"\n },\n checkmark: {\n B6of3ja: \"fmnzpld\"\n },\n icon: {\n a9b677: \"f64fuq3\",\n Bqenvij: \"fjamq6b\",\n Be2twd7: \"fe5j1ua\",\n Bg96gwp: \"fez10in\",\n Bt984gj: \"f122n59\",\n mc9l5x: \"ftuwxu6\",\n Brf1p80: \"f4d9j23\"\n },\n submenuIndicator: {\n a9b677: \"f64fuq3\",\n Bqenvij: \"fjamq6b\",\n Be2twd7: \"fe5j1ua\",\n Bg96gwp: \"fez10in\",\n Bt984gj: \"f122n59\",\n mc9l5x: \"ftuwxu6\",\n Brf1p80: \"f4d9j23\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Bi91k9c: \"fvgxktp\",\n Jwef8y: \"f1ijtazh\",\n eoavqd: \"fphbwmw\",\n Bk3fhr4: \"f19vpps7\",\n Bmfj8id: \"fv5swzo\",\n Bg7n49j: \"f1q1x1ba\",\n t0hwav: \"ft33916\",\n Bbusuzp: \"f1dcs8yz\",\n ze5xyy: \"f1kc2mi9\",\n Bctn1xl: \"fk56vqo\",\n Bh6z0a4: \"f1ikwg0d\"\n }\n}, {\n f: [\".ftqa4ok:focus{outline-style:none;}\", \".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}\", \".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"],\n d: [\".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}\", \".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}\", \".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}\", \".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}\", \".f15bsgw9[data-fui-focus-visible]::after{content:\\\"\\\";}\", \".f14e48fq[data-fui-focus-visible]::after{position:absolute;}\", \".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}\", \".fd6o370[data-fui-focus-visible]::after{z-index:1;}\", \".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}\", \".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}\", \".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}\", \".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}\", \".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}\", \".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}\", \".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}\", \".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}\", \".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}\", \".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}\", \".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}\", \".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}\", \".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;}\", \".fkfq4zb{color:var(--colorNeutralForeground2);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".fkzw4jo{padding-right:var(--spacingVerticalSNudge);}\", \".fzzclc0{padding-left:var(--spacingVerticalSNudge);}\", \".fp2oml8{padding-top:var(--spacingVerticalSNudge);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f1wklaru{max-width:290px;}\", \".f1nxs5xn{min-height:32px;}\", \".fi64zpg{flex-shrink:0;}\", \".f22iagw{display:flex;}\", \".f1s2louj{align-items:start;}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1k6fduh{cursor:pointer;}\", \".f1q8lukm{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{flex-grow:1;}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".fmnzpld{margin-top:2px;}\", \".f64fuq3{width:20px;}\", \".fjamq6b{height:20px;}\", \".fe5j1ua{font-size:20px;}\", \".fez10in{line-height:0;}\", \".f122n59{align-items:center;}\", \".ftuwxu6{display:inline-flex;}\", \".f4d9j23{justify-content:center;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}\", \".ft1hn21:hover .fui-Icon-filled{display:inline;}\", \".fuxngvv:hover .fui-Icon-regular{display:none;}\", \".fp258yr:hover .fui-MenuItem__icon{color:var(--colorNeutralForeground2BrandSelected);}\", \".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}\", \".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f1ijtazh:hover{background-color:var(--colorNeutralBackground1);}\", \".fphbwmw:hover{cursor:not-allowed;}\", \".f19vpps7:hover .fui-Icon-filled{display:none;}\", \".fv5swzo:hover .fui-Icon-regular{display:inline;}\", \".f1q1x1ba:hover .fui-MenuItem__icon{color:var(--colorNeutralForegroundDisabled);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1kc2mi9:hover{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fk56vqo:hover .fui-MenuItem__icon{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1ikwg0d:focus{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuItemClassNames.root, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemClassNames.content, styles.content, state.content.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, styles.checkmark, state.checkmark.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, !state.disabled && styles.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemClassNames.icon, styles.icon, state.icon.className);\n }\n if (state.submenuIndicator) {\n state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, styles.submenuIndicator, state.submenuIndicator.className);\n }\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemStyles.styles.js.map"],"names":["menuItemClassNames","useMenuItemStyles_unstable","root","icon","checkmark","submenuIndicator","content","secondaryContent","useStyles","__styles","focusIndicator","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bule8hv","Bjwuhne","Ghsupd","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","qhf8xq","sj55zd","De3pzq","z189sj","uwmqm3","z8tnut","B7ck84d","B2u0y6b","sshi5w","Bnnss6s","mc9l5x","Bt984gj","Be2twd7","Bceei9c","i8kkvl","Belr9w4","Jwef8y","Bi91k9c","Bk3fhr4","Bmfj8id","Bg7n49j","famaaq","Bh6795r","t0hwav","B6of3ja","a9b677","Bqenvij","Bg96gwp","Brf1p80","disabled","eoavqd","Bbusuzp","ze5xyy","Bctn1xl","Bh6z0a4","f","i","d","h","m","state","styles","className","mergeClasses","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAKaA,kBAAkB,MAAlBA;IAqIAC,0BAA0B,MAA1BA;;uBA1IsC;uBAIP;AACrC,MAAMD,qBAAqB;IAChCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;IACTC,kBAAkB;AACpB;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,gBAAgB;QACdC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,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AA,mBAAY,EAACxF,mBAAmBK,gBAAgB,EAAEiF,OAAOjF,gBAAgB,EAAEgF,MAAMhF,gBAAgB,CAACkF,SAAS;IAChJ,CAAC;IACDE,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,oDAAoD"}
|
1
|
+
{"version":3,"sources":["useMenuItemStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles, shorthands } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nexport const menuItemClassNames = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent'\n};\nconst useStyles = /*#__PURE__*/__styles({\n focusIndicator: {\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"f8hki3x\",\n Bci5o5g: [\"f1d2448m\", \"ffh67wi\"],\n n8qw10: \"f1bjia2o\",\n Bdrgwmp: [\"ffh67wi\", \"f1d2448m\"],\n Bm4h7ae: \"f15bsgw9\",\n B7ys5i9: \"f14e48fq\",\n Busjfv9: \"f18yb2kv\",\n Bhk32uz: \"fd6o370\",\n Bf4ptjt: \"fh1cnn4\",\n kclons: [\"fy7oxxb\", \"f184ne2d\"],\n Bhdgwq3: \"fpukqih\",\n Blkhhs4: [\"f184ne2d\", \"fy7oxxb\"],\n Bqtpl0w: \"frrh606\",\n clg4pj: [\"f1v5zibi\", \"fo2hd23\"],\n hgwjuy: \"ful5kiu\",\n Bonggc9: [\"fo2hd23\", \"f1v5zibi\"],\n B1tsrr9: [\"f1jqcqds\", \"ftffrms\"],\n Dah5zi: [\"ftffrms\", \"f1jqcqds\"],\n Bkh64rk: [\"f2e7qr6\", \"fsr1zz6\"],\n qqdqy8: [\"fsr1zz6\", \"f2e7qr6\"],\n B6dhp37: \"f1dvezut\",\n i03rao: [\"fd0oaoj\", \"f1cwg4i8\"],\n Boxcth7: \"fjvm52t\",\n Bsom6fd: [\"f1cwg4i8\", \"fd0oaoj\"],\n J0r882: \"f57olzd\",\n Bule8hv: [\"f4stah7\", \"fs1por5\"],\n Bjwuhne: \"f480a47\",\n Ghsupd: [\"fs1por5\", \"f4stah7\"]\n },\n root: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n qhf8xq: \"f10pi13n\",\n sj55zd: \"fkfq4zb\",\n De3pzq: \"fxugw4r\",\n z189sj: [\"fkzw4jo\", \"fzzclc0\"],\n uwmqm3: [\"fzzclc0\", \"fkzw4jo\"],\n z8tnut: \"fp2oml8\",\n B7ck84d: \"f1ewtqcl\",\n B2u0y6b: \"f1wklaru\",\n sshi5w: \"f1nxs5xn\",\n Bnnss6s: \"fi64zpg\",\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f1s2louj\",\n Be2twd7: \"fkhj508\",\n Bceei9c: \"f1k6fduh\",\n i8kkvl: \"f1q8lukm\",\n Belr9w4: \"f1ma2n7n\",\n Jwef8y: \"f1knas48\",\n Bi91k9c: \"fnwyq0v\",\n Bk3fhr4: \"ft1hn21\",\n Bmfj8id: \"fuxngvv\",\n Bg7n49j: \"fp258yr\",\n famaaq: \"f1xqy1su\"\n },\n content: {\n uwmqm3: [\"f161knb0\", \"f12huiiw\"],\n z189sj: [\"f12huiiw\", \"f161knb0\"],\n De3pzq: \"f3rmtva\",\n Bh6795r: \"fqerorx\"\n },\n secondaryContent: {\n uwmqm3: [\"f161knb0\", \"f12huiiw\"],\n z189sj: [\"f12huiiw\", \"f161knb0\"],\n sj55zd: \"f11d4kpn\",\n Bi91k9c: \"f1jp5ecu\",\n t0hwav: \"fc1cou1\"\n },\n checkmark: {\n B6of3ja: \"fmnzpld\"\n },\n icon: {\n a9b677: \"f64fuq3\",\n Bqenvij: \"fjamq6b\",\n Be2twd7: \"fe5j1ua\",\n Bg96gwp: \"fez10in\",\n Bt984gj: \"f122n59\",\n mc9l5x: \"ftuwxu6\",\n Brf1p80: \"f4d9j23\"\n },\n submenuIndicator: {\n a9b677: \"f64fuq3\",\n Bqenvij: \"fjamq6b\",\n Be2twd7: \"fe5j1ua\",\n Bg96gwp: \"fez10in\",\n Bt984gj: \"f122n59\",\n mc9l5x: \"ftuwxu6\",\n Brf1p80: \"f4d9j23\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Bi91k9c: \"fvgxktp\",\n Jwef8y: \"f1ijtazh\",\n eoavqd: \"fphbwmw\",\n Bk3fhr4: \"f19vpps7\",\n Bmfj8id: \"fv5swzo\",\n Bg7n49j: \"f1q1x1ba\",\n t0hwav: \"ft33916\",\n Bbusuzp: \"f1dcs8yz\",\n ze5xyy: \"f1kc2mi9\",\n Bctn1xl: \"fk56vqo\",\n Bh6z0a4: \"f1ikwg0d\"\n }\n}, {\n f: [\".ftqa4ok:focus{outline-style:none;}\", \".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}\", \".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"],\n d: [\".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}\", \".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}\", \".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}\", \".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}\", \".f15bsgw9[data-fui-focus-visible]::after{content:\\\"\\\";}\", \".f14e48fq[data-fui-focus-visible]::after{position:absolute;}\", \".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}\", \".fd6o370[data-fui-focus-visible]::after{z-index:1;}\", \".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}\", \".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}\", \".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}\", \".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}\", \".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}\", \".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}\", \".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}\", \".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}\", \".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}\", \".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}\", \".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}\", \".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}\", \".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;}\", \".fkfq4zb{color:var(--colorNeutralForeground2);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".fkzw4jo{padding-right:var(--spacingVerticalSNudge);}\", \".fzzclc0{padding-left:var(--spacingVerticalSNudge);}\", \".fp2oml8{padding-top:var(--spacingVerticalSNudge);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f1wklaru{max-width:290px;}\", \".f1nxs5xn{min-height:32px;}\", \".fi64zpg{flex-shrink:0;}\", \".f22iagw{display:flex;}\", \".f1s2louj{align-items:start;}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1k6fduh{cursor:pointer;}\", \".f1q8lukm{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{flex-grow:1;}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".fmnzpld{margin-top:2px;}\", \".f64fuq3{width:20px;}\", \".fjamq6b{height:20px;}\", \".fe5j1ua{font-size:20px;}\", \".fez10in{line-height:0;}\", \".f122n59{align-items:center;}\", \".ftuwxu6{display:inline-flex;}\", \".f4d9j23{justify-content:center;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}\", \".ft1hn21:hover .fui-Icon-filled{display:inline;}\", \".fuxngvv:hover .fui-Icon-regular{display:none;}\", \".fp258yr:hover .fui-MenuItem__icon{color:var(--colorNeutralForeground2BrandSelected);}\", \".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}\", \".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f1ijtazh:hover{background-color:var(--colorNeutralBackground1);}\", \".fphbwmw:hover{cursor:not-allowed;}\", \".f19vpps7:hover .fui-Icon-filled{display:none;}\", \".fv5swzo:hover .fui-Icon-regular{display:inline;}\", \".f1q1x1ba:hover .fui-MenuItem__icon{color:var(--colorNeutralForegroundDisabled);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1kc2mi9:hover{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fk56vqo:hover .fui-MenuItem__icon{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1ikwg0d:focus{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuItemClassNames.root, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemClassNames.content, styles.content, state.content.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, styles.checkmark, state.checkmark.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, !state.disabled && styles.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemClassNames.icon, styles.icon, state.icon.className);\n }\n if (state.submenuIndicator) {\n state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, styles.submenuIndicator, state.submenuIndicator.className);\n }\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemStyles.styles.js.map"],"names":["menuItemClassNames","useMenuItemStyles_unstable","root","icon","checkmark","submenuIndicator","content","secondaryContent","useStyles","__styles","focusIndicator","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bule8hv","Bjwuhne","Ghsupd","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","qhf8xq","sj55zd","De3pzq","z189sj","uwmqm3","z8tnut","B7ck84d","B2u0y6b","sshi5w","Bnnss6s","mc9l5x","Bt984gj","Be2twd7","Bceei9c","i8kkvl","Belr9w4","Jwef8y","Bi91k9c","Bk3fhr4","Bmfj8id","Bg7n49j","famaaq","Bh6795r","t0hwav","B6of3ja","a9b677","Bqenvij","Bg96gwp","Brf1p80","disabled","eoavqd","Bbusuzp","ze5xyy","Bctn1xl","Bh6z0a4","f","i","d","h","m","state","styles","className","mergeClasses","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAKaA,kBAAkB;eAAlBA;;IAqIAC,0BAA0B;eAA1BA;;;uBA1IsC;uBAIP;AACrC,MAAMD,qBAAqB;IAChCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;IACTC,kBAAkB;AACpB;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCC,gBAAgB;QACdC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,S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AY,EAACxF,mBAAmBM,OAAO,EAAEgF,OAAOhF,OAAO,EAAE+E,MAAM/E,OAAO,CAACiF,SAAS;IAC5G;IACA,IAAIF,MAAMjF,SAAS,EAAE;QACnBiF,MAAMjF,SAAS,CAACmF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,mBAAmBI,SAAS,EAAEkF,OAAOlF,SAAS,EAAEiF,MAAMjF,SAAS,CAACmF,SAAS;IACpH;IACA,IAAIF,MAAM9E,gBAAgB,EAAE;QAC1B8E,MAAM9E,gBAAgB,CAACgF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,mBAAmBO,gBAAgB,EAAE,CAAC8E,MAAMX,QAAQ,IAAIY,OAAO/E,gBAAgB,EAAE8E,MAAM9E,gBAAgB,CAACgF,SAAS;IACnK;IACA,IAAIF,MAAMlF,IAAI,EAAE;QACdkF,MAAMlF,IAAI,CAACoF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,mBAAmBG,IAAI,EAAEmF,OAAOnF,IAAI,EAAEkF,MAAMlF,IAAI,CAACoF,SAAS;IAChG;IACA,IAAIF,MAAMhF,gBAAgB,EAAE;QAC1BgF,MAAMhF,gBAAgB,CAACkF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,mBAAmBK,gBAAgB,EAAEiF,OAAOjF,gBAAgB,EAAEgF,MAAMhF,gBAAgB,CAACkF,SAAS;IAChJ;IACAE,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,oDAAoD"}
|
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "MenuItemCheckbox", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return MenuItemCheckbox;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
11
13
|
const _useMenuItemCheckbox = require("./useMenuItemCheckbox");
|
12
14
|
const _renderMenuItemCheckbox = require("./renderMenuItemCheckbox");
|
13
|
-
const
|
14
|
-
const
|
15
|
+
const _useMenuItemCheckboxStylesstyles = require("./useMenuItemCheckboxStyles.styles");
|
16
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
15
17
|
const MenuItemCheckbox = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
18
|
const state = (0, _useMenuItemCheckbox.useMenuItemCheckbox_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
(0,
|
19
|
+
(0, _useMenuItemCheckboxStylesstyles.useMenuItemCheckboxStyles_unstable)(state);
|
20
|
+
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useMenuItemCheckboxStyles_unstable')(state);
|
19
21
|
return (0, _renderMenuItemCheckbox.renderMenuItemCheckbox_unstable)(state);
|
20
22
|
});
|
21
23
|
MenuItemCheckbox.displayName = 'MenuItemCheckbox';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';\nimport { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';\nimport { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.\n */ export const MenuItemCheckbox = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuItemCheckbox_unstable(props, ref);\n useMenuItemCheckboxStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemCheckboxStyles_unstable')(state);\n return renderMenuItemCheckbox_unstable(state);\n});\nMenuItemCheckbox.displayName = 'MenuItemCheckbox';\n"],"names":["MenuItemCheckbox","React","forwardRef","props","ref","state","useMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useCustomStyleHook_unstable","renderMenuItemCheckbox_unstable","displayName"],"mappings":";;;;+BAOiBA
|
1
|
+
{"version":3,"sources":["MenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';\nimport { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';\nimport { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.\n */ export const MenuItemCheckbox = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuItemCheckbox_unstable(props, ref);\n useMenuItemCheckboxStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemCheckboxStyles_unstable')(state);\n return renderMenuItemCheckbox_unstable(state);\n});\nMenuItemCheckbox.displayName = 'MenuItemCheckbox';\n"],"names":["MenuItemCheckbox","React","forwardRef","props","ref","state","useMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useCustomStyleHook_unstable","renderMenuItemCheckbox_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;qCACsB;wCACG;iDACG;qCACP;AAGjC,MAAMA,mBAAmB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvE,MAAMC,QAAQC,IAAAA,iDAA4B,EAACH,OAAOC;IAClDG,IAAAA,mEAAkC,EAACF;IACnCG,IAAAA,gDAA2B,EAAC,sCAAsCH;IAClE,OAAOI,IAAAA,uDAA+B,EAACJ;AAC3C;AACAL,iBAAiBU,WAAW,GAAG"}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./MenuItemCheckbox.types"), exports);
|
7
|
+
_export_star._(require("./MenuItemCheckbox"), exports);
|
8
|
+
_export_star._(require("./renderMenuItemCheckbox"), exports);
|
9
|
+
_export_star._(require("./useMenuItemCheckbox"), exports);
|
10
|
+
_export_star._(require("./useMenuItemCheckboxStyles.styles"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles.styles';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
@@ -1,14 +1,23 @@
|
|
1
|
-
/** @jsxRuntime
|
1
|
+
/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "renderMenuItemCheckbox_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return renderMenuItemCheckbox_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
12
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
11
13
|
const renderMenuItemCheckbox_unstable = (state)=>{
|
12
|
-
(0,
|
13
|
-
return /*#__PURE__*/ (0,
|
14
|
+
(0, _reactutilities.assertSlots)(state);
|
15
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
16
|
+
children: [
|
17
|
+
state.checkmark && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.checkmark, {}),
|
18
|
+
state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
|
19
|
+
state.content && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
|
20
|
+
state.secondaryContent && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.secondaryContent, {})
|
21
|
+
]
|
22
|
+
});
|
14
23
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderMenuItemCheckbox.js"],"sourcesContent":["/** @jsxRuntime
|
1
|
+
{"version":3,"sources":["renderMenuItemCheckbox.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/** Function that renders the final JSX of the component */ export const renderMenuItemCheckbox_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.checkmark && /*#__PURE__*/ _jsx(state.checkmark, {}),\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n state.content && /*#__PURE__*/ _jsx(state.content, {}),\n state.secondaryContent && /*#__PURE__*/ _jsx(state.secondaryContent, {})\n ]\n });\n};\n"],"names":["renderMenuItemCheckbox_unstable","state","assertSlots","_jsxs","root","children","checkmark","_jsx","icon","content","secondaryContent"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAEJA;;;eAAAA;;;4BAFkD;gCAChG;AACwC,MAAMA,kCAAkC,CAACC;IACzGC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,SAAS,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,SAAS,EAAE,CAAC;YACxDL,MAAMO,IAAI,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,IAAI,EAAE,CAAC;YAC9CP,MAAMQ,OAAO,IAAI,WAAW,GAAGF,IAAAA,eAAI,EAACN,MAAMQ,OAAO,EAAE,CAAC;YACpDR,MAAMS,gBAAgB,IAAI,WAAW,GAAGH,IAAAA,eAAI,EAACN,MAAMS,gBAAgB,EAAE,CAAC;SACzE;IACL;AACJ"}
|
@@ -4,17 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "useMenuItemCheckbox_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return useMenuItemCheckbox_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
-
const
|
12
|
-
const
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
14
|
+
const _reacticons = require("@fluentui/react-icons");
|
13
15
|
const _menuListContext = require("../../contexts/menuListContext");
|
14
16
|
const _useMenuItem = require("../MenuItem/useMenuItem");
|
15
17
|
const useMenuItemCheckbox_unstable = (props, ref)=>{
|
16
18
|
const toggleCheckbox = (0, _menuListContext.useMenuListContext_unstable)((context)=>context.toggleCheckbox);
|
17
|
-
const { name
|
19
|
+
const { name, value } = props;
|
18
20
|
const checked = (0, _menuListContext.useMenuListContext_unstable)((context)=>{
|
19
21
|
var _context_checkedValues;
|
20
22
|
const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];
|
@@ -26,17 +28,17 @@ const useMenuItemCheckbox_unstable = (props, ref)=>{
|
|
26
28
|
persistOnClick: true,
|
27
29
|
...props,
|
28
30
|
'aria-checked': checked,
|
29
|
-
checkmark:
|
31
|
+
checkmark: _reactutilities.slot.optional(props.checkmark, {
|
30
32
|
defaultProps: {
|
31
|
-
children: /*#__PURE__*/ _react.createElement(
|
33
|
+
children: /*#__PURE__*/ _react.createElement(_reacticons.Checkmark16Filled, null)
|
32
34
|
},
|
33
35
|
renderByDefault: true,
|
34
36
|
elementType: 'span'
|
35
37
|
}),
|
36
38
|
onClick: (e)=>{
|
37
|
-
var _props_onClick;
|
38
|
-
toggleCheckbox === null ||
|
39
|
-
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(
|
39
|
+
var _toggleCheckbox, _props_onClick, _props;
|
40
|
+
(_toggleCheckbox = toggleCheckbox) === null || _toggleCheckbox === void 0 ? void 0 : _toggleCheckbox(e, name, value, checked);
|
41
|
+
(_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, e);
|
40
42
|
}
|
41
43
|
}, ref),
|
42
44
|
name,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\n/** Returns the props and state required to render the component */ export const useMenuItemCheckbox_unstable = (props, ref)=>{\n const toggleCheckbox = useMenuListContext_unstable((context)=>context.toggleCheckbox);\n const { name
|
1
|
+
{"version":3,"sources":["useMenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { Checkmark16Filled } from '@fluentui/react-icons';\nimport { useMenuListContext_unstable } from '../../contexts/menuListContext';\nimport { useMenuItem_unstable } from '../MenuItem/useMenuItem';\n/** Returns the props and state required to render the component */ export const useMenuItemCheckbox_unstable = (props, ref)=>{\n const toggleCheckbox = useMenuListContext_unstable((context)=>context.toggleCheckbox);\n const { name, value } = props;\n const checked = useMenuListContext_unstable((context)=>{\n var _context_checkedValues;\n const checkedItems = ((_context_checkedValues = context.checkedValues) === null || _context_checkedValues === void 0 ? void 0 : _context_checkedValues[name]) || [];\n return checkedItems.indexOf(value) !== -1;\n });\n const state = {\n ...useMenuItem_unstable({\n role: 'menuitemcheckbox',\n persistOnClick: true,\n ...props,\n 'aria-checked': checked,\n checkmark: slot.optional(props.checkmark, {\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(Checkmark16Filled, null)\n },\n renderByDefault: true,\n elementType: 'span'\n }),\n onClick: (e)=>{\n var _toggleCheckbox, _props_onClick, _props;\n (_toggleCheckbox = toggleCheckbox) === null || _toggleCheckbox === void 0 ? void 0 : _toggleCheckbox(e, name, value, checked);\n (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, e);\n }\n }, ref),\n name,\n value,\n checked\n };\n return state;\n};\n"],"names":["useMenuItemCheckbox_unstable","props","ref","toggleCheckbox","useMenuListContext_unstable","context","name","value","checked","_context_checkedValues","checkedItems","checkedValues","indexOf","state","useMenuItem_unstable","role","persistOnClick","checkmark","slot","optional","defaultProps","children","React","createElement","Checkmark16Filled","renderByDefault","elementType","onClick","e","_toggleCheckbox","_props_onClick","_props","call"],"mappings":";;;;+BAKiFA;;;eAAAA;;;;iEAL1D;gCACF;4BACa;iCACU;6BACP;AACsC,MAAMA,+BAA+B,CAACC,OAAOC;IACpH,MAAMC,iBAAiBC,IAAAA,4CAA2B,EAAC,CAACC,UAAUA,QAAQF,cAAc;IACpF,MAAM,EAAEG,IAAI,EAAEC,KAAK,EAAE,GAAGN;IACxB,MAAMO,UAAUJ,IAAAA,4CAA2B,EAAC,CAACC;QACzC,IAAII;QACJ,MAAMC,eAAe,AAAC,CAAA,AAACD,CAAAA,yBAAyBJ,QAAQM,aAAa,AAAD,MAAO,QAAQF,2BAA2B,KAAK,IAAI,KAAK,IAAIA,sBAAsB,CAACH,KAAK,AAAD,KAAM,EAAE;QACnK,OAAOI,aAAaE,OAAO,CAACL,WAAW,CAAC;IAC5C;IACA,MAAMM,QAAQ;QACV,GAAGC,IAAAA,iCAAoB,EAAC;YACpBC,MAAM;YACNC,gBAAgB;YAChB,GAAGf,KAAK;YACR,gBAAgBO;YAChBS,WAAWC,oBAAI,CAACC,QAAQ,CAAClB,MAAMgB,SAAS,EAAE;gBACtCG,cAAc;oBACVC,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,6BAAiB,EAAE;gBACnE;gBACAC,iBAAiB;gBACjBC,aAAa;YACjB;YACAC,SAAS,CAACC;gBACN,IAAIC,iBAAiBC,gBAAgBC;gBACpCF,CAAAA,kBAAkB1B,cAAa,MAAO,QAAQ0B,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBD,GAAGtB,MAAMC,OAAOC;gBACpHsB,CAAAA,iBAAiB,AAACC,CAAAA,SAAS9B,KAAI,EAAG0B,OAAO,AAAD,MAAO,QAAQG,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeE,IAAI,CAACD,QAAQH;YAC7H;QACJ,GAAG1B,IAAI;QACPI;QACAC;QACAC;IACJ;IACA,OAAOK;AACX"}
|
@@ -9,12 +9,16 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
menuItemCheckboxClassNames: ()
|
13
|
-
|
12
|
+
menuItemCheckboxClassNames: function() {
|
13
|
+
return menuItemCheckboxClassNames;
|
14
|
+
},
|
15
|
+
useMenuItemCheckboxStyles_unstable: function() {
|
16
|
+
return useMenuItemCheckboxStyles_unstable;
|
17
|
+
}
|
14
18
|
});
|
15
19
|
const _react = require("@griffel/react");
|
16
20
|
const _index = require("../../selectable/index");
|
17
|
-
const
|
21
|
+
const _useMenuItemStylesstyles = require("../MenuItem/useMenuItemStyles.styles");
|
18
22
|
const menuItemCheckboxClassNames = {
|
19
23
|
root: 'fui-MenuItemCheckbox',
|
20
24
|
icon: 'fui-MenuItemCheckbox__icon',
|
@@ -36,6 +40,6 @@ const useMenuItemCheckboxStyles_unstable = (state)=>{
|
|
36
40
|
if (state.checkmark) {
|
37
41
|
state.checkmark.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.checkmark, state.checkmark.className);
|
38
42
|
}
|
39
|
-
(0,
|
43
|
+
(0, _useMenuItemStylesstyles.useMenuItemStyles_unstable)(state);
|
40
44
|
(0, _index.useCheckmarkStyles_unstable)(state);
|
41
45
|
}; //# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuItemCheckboxStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nexport const menuItemCheckboxClassNames = {\n root: 'fui-MenuItemCheckbox',\n icon: 'fui-MenuItemCheckbox__icon',\n checkmark: 'fui-MenuItemCheckbox__checkmark',\n content: 'fui-MenuItemCheckbox__content',\n secondaryContent: 'fui-MenuItemCheckbox__secondaryContent'\n};\nexport const useMenuItemCheckboxStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemCheckboxClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemCheckboxClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemCheckboxClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemCheckboxClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemCheckboxClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map"],"names":["menuItemCheckboxClassNames","useMenuItemCheckboxStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B
|
1
|
+
{"version":3,"sources":["useMenuItemCheckboxStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nexport const menuItemCheckboxClassNames = {\n root: 'fui-MenuItemCheckbox',\n icon: 'fui-MenuItemCheckbox__icon',\n checkmark: 'fui-MenuItemCheckbox__checkmark',\n content: 'fui-MenuItemCheckbox__content',\n secondaryContent: 'fui-MenuItemCheckbox__secondaryContent'\n};\nexport const useMenuItemCheckboxStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemCheckboxClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemCheckboxClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemCheckboxClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemCheckboxClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemCheckboxClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map"],"names":["menuItemCheckboxClassNames","useMenuItemCheckboxStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B;eAA1BA;;IAOAC,kCAAkC;eAAlCA;;;uBAVgB;uBACe;yCACD;AACpC,MAAMD,6BAA6B;IACxCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,qCAAqCM,CAAAA;IAChDA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACzF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACpG;IACA,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC/H;IACA,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IAC3F;IACA,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IAC1G;IACAE,IAAAA,mDAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,4DAA4D"}
|
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "MenuItemLink", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return MenuItemLink;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
11
13
|
const _useMenuItemLink = require("./useMenuItemLink");
|
12
14
|
const _renderMenuItemLink = require("./renderMenuItemLink");
|
13
|
-
const
|
15
|
+
const _useMenuItemLinkStylesstyles = require("./useMenuItemLinkStyles.styles");
|
14
16
|
const MenuItemLink = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
15
17
|
const state = (0, _useMenuItemLink.useMenuItemLink_unstable)(props, ref);
|
16
|
-
(0,
|
18
|
+
(0, _useMenuItemLinkStylesstyles.useMenuItemLinkStyles_unstable)(state);
|
17
19
|
return (0, _renderMenuItemLink.renderMenuItemLink_unstable)(state);
|
18
20
|
});
|
19
21
|
MenuItemLink.displayName = 'MenuItemLink';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["MenuItemLink.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemLink_unstable } from './useMenuItemLink';\nimport { renderMenuItemLink_unstable } from './renderMenuItemLink';\nimport { useMenuItemLinkStyles_unstable } from './useMenuItemLinkStyles.styles';\n/**\n * MenuItemLink component\n */ export const MenuItemLink = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuItemLink_unstable(props, ref);\n useMenuItemLinkStyles_unstable(state);\n return renderMenuItemLink_unstable(state);\n});\nMenuItemLink.displayName = 'MenuItemLink';\n"],"names":["MenuItemLink","React","forwardRef","props","ref","state","useMenuItemLink_unstable","useMenuItemLinkStyles_unstable","renderMenuItemLink_unstable","displayName"],"mappings":";;;;+BAMiBA
|
1
|
+
{"version":3,"sources":["MenuItemLink.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemLink_unstable } from './useMenuItemLink';\nimport { renderMenuItemLink_unstable } from './renderMenuItemLink';\nimport { useMenuItemLinkStyles_unstable } from './useMenuItemLinkStyles.styles';\n/**\n * MenuItemLink component\n */ export const MenuItemLink = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuItemLink_unstable(props, ref);\n useMenuItemLinkStyles_unstable(state);\n return renderMenuItemLink_unstable(state);\n});\nMenuItemLink.displayName = 'MenuItemLink';\n"],"names":["MenuItemLink","React","forwardRef","props","ref","state","useMenuItemLink_unstable","useMenuItemLinkStyles_unstable","renderMenuItemLink_unstable","displayName"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;iEANM;iCACkB;oCACG;6CACG;AAGpC,MAAMA,eAAe,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnE,MAAMC,QAAQC,IAAAA,yCAAwB,EAACH,OAAOC;IAC9CG,IAAAA,2DAA8B,EAACF;IAC/B,OAAOG,IAAAA,+CAA2B,EAACH;AACvC;AACAL,aAAaS,WAAW,GAAG"}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./MenuItemLink"), exports);
|
7
|
+
_export_star._(require("./MenuItemLink.types"), exports);
|
8
|
+
_export_star._(require("./renderMenuItemLink"), exports);
|
9
|
+
_export_star._(require("./useMenuItemLink"), exports);
|
10
|
+
_export_star._(require("./useMenuItemLinkStyles.styles"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuItemLink';\nexport * from './MenuItemLink.types';\nexport * from './renderMenuItemLink';\nexport * from './useMenuItemLink';\nexport * from './useMenuItemLinkStyles.styles';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './MenuItemLink';\nexport * from './MenuItemLink.types';\nexport * from './renderMenuItemLink';\nexport * from './useMenuItemLink';\nexport * from './useMenuItemLinkStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|