@fluentui/react-menu 9.7.10 → 9.7.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +168 -2
- package/CHANGELOG.md +41 -3
- package/lib/components/Menu/useMenu.js +3 -1
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.js +3 -6
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/index.js +1 -1
- package/lib/components/MenuDivider/index.js.map +1 -1
- package/lib/components/MenuDivider/{useMenuDividerStyles.js → useMenuDividerStyles.styles.js} +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -0
- package/lib/components/MenuGroup/MenuGroup.js +3 -6
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/index.js +1 -1
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/{useMenuGroupStyles.js → useMenuGroupStyles.styles.js} +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -0
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js +3 -6
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/index.js +1 -1
- package/lib/components/MenuGroupHeader/index.js.map +1 -1
- package/lib/components/MenuGroupHeader/{useMenuGroupHeaderStyles.js → useMenuGroupHeaderStyles.styles.js} +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -0
- package/lib/components/MenuItem/MenuItem.js +3 -6
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/index.js +1 -1
- package/lib/components/MenuItem/index.js.map +1 -1
- package/lib/components/MenuItem/{useMenuItemStyles.js → useMenuItemStyles.styles.js} +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.styles.js.map +1 -0
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +3 -6
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/index.js +1 -1
- package/lib/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib/components/MenuItemCheckbox/{useMenuItemCheckboxStyles.js → useMenuItemCheckboxStyles.styles.js} +2 -2
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -0
- package/lib/components/MenuItemRadio/MenuItemRadio.js +3 -6
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/index.js +1 -1
- package/lib/components/MenuItemRadio/index.js.map +1 -1
- package/lib/components/MenuItemRadio/{useMenuItemRadioStyles.js → useMenuItemRadioStyles.styles.js} +2 -2
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -0
- package/lib/components/MenuList/MenuList.js +3 -6
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/index.js +1 -1
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/{useMenuListStyles.js → useMenuListStyles.styles.js} +1 -1
- package/lib/components/MenuList/useMenuListStyles.styles.js.map +1 -0
- package/lib/components/MenuPopover/MenuPopover.js +3 -6
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/index.js +1 -1
- package/lib/components/MenuPopover/index.js.map +1 -1
- package/lib/components/MenuPopover/{useMenuPopoverStyles.js → useMenuPopoverStyles.styles.js} +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +3 -6
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/index.js +1 -1
- package/lib/components/MenuSplitGroup/index.js.map +1 -1
- package/lib/components/MenuSplitGroup/{useMenuSplitGroupStyles.js → useMenuSplitGroupStyles.styles.js} +2 -2
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.js +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/index.js +1 -1
- package/lib/components/MenuTrigger/index.js.map +1 -1
- package/lib/components/MenuTrigger/{useMenuTrigger.js → useMenuTrigger.styles.js} +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.styles.js.map +1 -0
- package/lib/selectable/index.js +1 -1
- package/lib/selectable/index.js.map +1 -1
- package/lib/selectable/{useCheckmarkStyles.js → useCheckmarkStyles.styles.js} +1 -1
- package/lib/selectable/useCheckmarkStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Menu/useMenu.js +2 -1
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js +3 -4
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/index.js +1 -1
- package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/{useMenuDividerStyles.js → useMenuDividerStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuGroup/MenuGroup.js +3 -4
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/index.js +1 -1
- package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/{useMenuGroupStyles.js → useMenuGroupStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +3 -4
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/{useMenuGroupHeaderStyles.js → useMenuGroupHeaderStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuItem/MenuItem.js +3 -4
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/index.js +1 -1
- package/lib-commonjs/components/MenuItem/index.js.map +1 -1
- package/lib-commonjs/components/MenuItem/{useMenuItemStyles.js → useMenuItemStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +3 -4
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/{useMenuItemCheckboxStyles.js → useMenuItemCheckboxStyles.styles.js} +4 -4
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +3 -4
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/{useMenuItemRadioStyles.js → useMenuItemRadioStyles.styles.js} +4 -4
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuList/MenuList.js +3 -4
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js +1 -1
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/{useMenuListStyles.js → useMenuListStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -4
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/index.js +1 -1
- package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/{useMenuPopoverStyles.js → useMenuPopoverStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +3 -4
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/{useMenuSplitGroupStyles.js → useMenuSplitGroupStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +2 -2
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/{useMenuTrigger.js → useMenuTrigger.styles.js} +2 -2
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.styles.js.map +1 -0
- package/lib-commonjs/selectable/index.js +1 -1
- package/lib-commonjs/selectable/index.js.map +1 -1
- package/lib-commonjs/selectable/{useCheckmarkStyles.js → useCheckmarkStyles.styles.js} +2 -2
- package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -0
- package/package.json +14 -13
- package/.swcrc +0 -30
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
- package/lib/components/MenuItem/useMenuItemStyles.js.map +0 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
- package/lib/components/MenuList/useMenuListStyles.js.map +0 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +0 -1
- package/lib/selectable/useCheckmarkStyles.js.map +0 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +0 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +0 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +0 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["mergeClasses","__styles","shorthands","iconFilledClassName","iconRegularClassName","createFocusOutlineStyle","tokens","useCheckmarkStyles_unstable","menuItemClassNames","root","icon","checkmark","submenuIndicator","content","secondaryContent","useStyles","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","Bjwuhne","Ghsupd","Bule8hv","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","qhf8xq","sj55zd","De3pzq","z189sj","uwmqm3","Bqenvij","mc9l5x","Bt984gj","Be2twd7","Bceei9c","i8kkvl","Belr9w4","Jwef8y","Bi91k9c","Bk3fhr4","Bmfj8id","Bg7n49j","famaaq","Bh6795r","t0hwav","a9b677","Bg96gwp","Brf1p80","disabled","Bbusuzp","ze5xyy","Bctn1xl","Bh6z0a4","f","i","d","h","m","useMenuItemStyles_unstable","state","styles","className"],"sources":["../../../src/components/MenuItem/useMenuItemStyles.styles.ts"],"sourcesContent":["import { mergeClasses, makeStyles, 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';\nimport type { MenuItemCheckboxState } from '../MenuItemCheckbox/index';\nimport type { MenuItemSlots, MenuItemState } from './MenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuItemClassNames: SlotClassNames<MenuItemSlots> = {\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};\n\nconst useStyles = makeStyles({\n focusIndicator: createFocusOutlineStyle(),\n // TODO: this should be extracted to another package\n root: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n paddingRight: '10px',\n paddingLeft: '10px',\n height: '32px',\n display: 'flex',\n alignItems: 'center',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n ...shorthands.gap('4px'),\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n },\n\n userSelect: 'none',\n },\n content: {\n paddingLeft: '2px',\n paddingRight: '2px',\n backgroundColor: 'transparent',\n flexGrow: 1,\n },\n secondaryContent: {\n paddingLeft: '2px',\n paddingRight: '2px',\n color: tokens.colorNeutralForeground3,\n ':hover': {\n color: tokens.colorNeutralForeground3Hover,\n },\n ':focus': {\n color: tokens.colorNeutralForeground3Hover,\n },\n },\n icon: {\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n submenuIndicator: {\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n ':hover': {\n color: tokens.colorNeutralForegroundDisabled,\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':focus': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n ':hover': {\n color: 'GrayText',\n [`& .${menuItemClassNames.icon}`]: {\n color: 'GrayText',\n },\n },\n ':focus': {\n color: 'GrayText',\n },\n },\n },\n});\n\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = (state: MenuItemState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n menuItemClassNames.root,\n styles.root,\n styles.focusIndicator,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.content) {\n state.content.className = mergeClasses(menuItemClassNames.content, styles.content, state.content.className);\n }\n\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, state.checkmark.className);\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n menuItemClassNames.secondaryContent,\n !state.disabled && styles.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemClassNames.icon, styles.icon, state.icon.className);\n }\n\n if (state.submenuIndicator) {\n state.submenuIndicator.className = mergeClasses(\n menuItemClassNames.submenuIndicator,\n styles.submenuIndicator,\n state.submenuIndicator.className,\n );\n }\n useCheckmarkStyles_unstable(state as MenuItemCheckboxState);\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAAC,QAAA,EAAcC,UAAU,QAAQ;AACrD,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ;AAC1D,SAASC,uBAAuB,QAAQ;AACxC,SAASC,MAAM,QAAQ;AACvB,SAASC,2BAA2B,QAAQ;AAK5C,OAAO,MAAMC,kBAAA,GAAoD;EAC/DC,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,SAAA,EAAW;EACXC,gBAAA,EAAkB;EAClBC,OAAA,EAAS;EACTC,gBAAA,EAAkB;AACpB;AAEA,MAAMC,SAAA,gBAAYd,QAAA;EAAAe,cAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAArC,IAAA;IAAAsC,OA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* as React from 'react';
|
2
2
|
import { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';
|
3
3
|
import { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';
|
4
|
-
import { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles';
|
5
|
-
import {
|
4
|
+
import { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles.styles';
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
|
8
8
|
*/
|
9
9
|
export const MenuItemCheckbox = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
10
|
const state = useMenuItemCheckbox_unstable(props, ref);
|
11
11
|
useMenuItemCheckboxStyles_unstable(state);
|
12
|
-
|
13
|
-
useMenuItemCheckboxStyles_unstable: useCustomStyles
|
14
|
-
} = useCustomStyleHooks_unstable();
|
15
|
-
useCustomStyles(state);
|
12
|
+
useCustomStyleHook_unstable('useMenuItemCheckboxStyles_unstable')(state);
|
16
13
|
return renderMenuItemCheckbox_unstable(state);
|
17
14
|
});
|
18
15
|
MenuItemCheckbox.displayName = 'MenuItemCheckbox';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useMenuItemCheckbox_unstable","renderMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","
|
1
|
+
{"version":3,"names":["React","useMenuItemCheckbox_unstable","renderMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useCustomStyleHook_unstable","MenuItemCheckbox","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/MenuItemCheckbox/MenuItemCheckbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';\nimport { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';\nimport { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles.styles';\nimport type { MenuItemCheckboxProps } from './MenuItemCheckbox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.\n */\nexport const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps> = React.forwardRef((props, ref) => {\n const state = useMenuItemCheckbox_unstable(props, ref);\n\n useMenuItemCheckboxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuItemCheckboxStyles_unstable')(state);\n\n return renderMenuItemCheckbox_unstable(state);\n});\n\nMenuItemCheckbox.displayName = 'MenuItemCheckbox';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAChD,SAASC,kCAAkC,QAAQ;AAGnD,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,gBAAA,gBAA+DL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC3G,MAAMC,KAAA,GAAQR,4BAAA,CAA6BM,KAAA,EAAOC,GAAA;EAElDL,kCAAA,CAAmCM,KAAA;EAEnCL,2BAAA,CAA4B,sCAAsCK,KAAA;EAElE,OAAOP,+BAAA,CAAgCO,KAAA;AACzC;AAEAJ,gBAAA,CAAiBK,WAAW,GAAG"}
|
@@ -2,5 +2,5 @@ export * from './MenuItemCheckbox.types';
|
|
2
2
|
export * from './MenuItemCheckbox';
|
3
3
|
export * from './renderMenuItemCheckbox';
|
4
4
|
export * from './useMenuItemCheckbox';
|
5
|
-
export * from './useMenuItemCheckboxStyles';
|
5
|
+
export * from './useMenuItemCheckboxStyles.styles';
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/MenuItemCheckbox/index.ts"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/MenuItemCheckbox/index.ts"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { mergeClasses } from '@griffel/react';
|
2
2
|
import { useCheckmarkStyles_unstable } from '../../selectable/index';
|
3
|
-
import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';
|
3
|
+
import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';
|
4
4
|
export const menuItemCheckboxClassNames = {
|
5
5
|
root: 'fui-MenuItemCheckbox',
|
6
6
|
icon: 'fui-MenuItemCheckbox__icon',
|
@@ -25,4 +25,4 @@ export const useMenuItemCheckboxStyles_unstable = state => {
|
|
25
25
|
useMenuItemStyles_unstable(state);
|
26
26
|
useCheckmarkStyles_unstable(state);
|
27
27
|
};
|
28
|
-
//# sourceMappingURL=useMenuItemCheckboxStyles.js.map
|
28
|
+
//# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["mergeClasses","useCheckmarkStyles_unstable","useMenuItemStyles_unstable","menuItemCheckboxClassNames","root","icon","checkmark","content","secondaryContent","useMenuItemCheckboxStyles_unstable","state","className"],"sources":["../../../src/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../index';\nimport type { MenuItemCheckboxState } from './MenuItemCheckbox.types';\n\nexport const menuItemCheckboxClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {\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};\n\nexport const useMenuItemCheckboxStyles_unstable = (state: MenuItemCheckboxState) => {\n state.root.className = mergeClasses(menuItemCheckboxClassNames.root, state.root.className);\n\n if (state.content) {\n state.content.className = mergeClasses(menuItemCheckboxClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n menuItemCheckboxClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemCheckboxClassNames.icon, state.icon.className);\n }\n\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemCheckboxClassNames.checkmark, state.checkmark.className);\n }\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAC7B,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,0BAA0B,QAAQ;AAK3C,OAAO,MAAMC,0BAAA,GAAsF;EACjGC,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,SAAA,EAAW;EACXC,OAAA,EAAS;EACTC,gBAAA,EAAkB;AACpB;AAEA,OAAO,MAAMC,kCAAA,GAAsCC,KAAA,IAAiC;EAClFA,KAAA,CAAMN,IAAI,CAACO,SAAS,GAAGX,YAAA,CAAaG,0BAAA,CAA2BC,IAAI,EAAEM,KAAA,CAAMN,IAAI,CAACO,SAAS;EAEzF,IAAID,KAAA,CAAMH,OAAO,EAAE;IACjBG,KAAA,CAAMH,OAAO,CAACI,SAAS,GAAGX,YAAA,CAAaG,0BAAA,CAA2BI,OAAO,EAAEG,KAAA,CAAMH,OAAO,CAACI,SAAS;EACpG;EAEA,IAAID,KAAA,CAAMF,gBAAgB,EAAE;IAC1BE,KAAA,CAAMF,gBAAgB,CAACG,SAAS,GAAGX,YAAA,CACjCG,0BAAA,CAA2BK,gBAAgB,EAC3CE,KAAA,CAAMF,gBAAgB,CAACG,SAAS;EAEpC;EAEA,IAAID,KAAA,CAAML,IAAI,EAAE;IACdK,KAAA,CAAML,IAAI,CAACM,SAAS,GAAGX,YAAA,CAAaG,0BAAA,CAA2BE,IAAI,EAAEK,KAAA,CAAML,IAAI,CAACM,SAAS;EAC3F;EAEA,IAAID,KAAA,CAAMJ,SAAS,EAAE;IACnBI,KAAA,CAAMJ,SAAS,CAACK,SAAS,GAAGX,YAAA,CAAaG,0BAAA,CAA2BG,SAAS,EAAEI,KAAA,CAAMJ,SAAS,CAACK,SAAS;EAC1G;EAEAT,0BAAA,CAA2BQ,KAAA;EAC3BT,2BAAA,CAA4BS,KAAA;AAC9B"}
|
@@ -1,18 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { useMenuItemRadio_unstable } from './useMenuItemRadio';
|
3
3
|
import { renderMenuItemRadio_unstable } from './renderMenuItemRadio';
|
4
|
-
import { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles';
|
5
|
-
import {
|
4
|
+
import { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
|
8
8
|
*/
|
9
9
|
export const MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
10
|
const state = useMenuItemRadio_unstable(props, ref);
|
11
11
|
useMenuItemRadioStyles_unstable(state);
|
12
|
-
|
13
|
-
useMenuItemRadioStyles_unstable: useCustomStyles
|
14
|
-
} = useCustomStyleHooks_unstable();
|
15
|
-
useCustomStyles(state);
|
12
|
+
useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);
|
16
13
|
return renderMenuItemRadio_unstable(state);
|
17
14
|
});
|
18
15
|
MenuItemRadio.displayName = 'MenuItemRadio';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useMenuItemRadio_unstable","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","
|
1
|
+
{"version":3,"names":["React","useMenuItemRadio_unstable","renderMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyleHook_unstable","MenuItemRadio","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/MenuItemRadio/MenuItemRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\nimport type { MenuItemRadioProps } from './MenuItemRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.\n */\nexport const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps> = React.forwardRef((props, ref) => {\n const state = useMenuItemRadio_unstable(props, ref);\n\n useMenuItemRadioStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);\n\n return renderMenuItemRadio_unstable(state);\n});\n\nMenuItemRadio.displayName = 'MenuItemRadio';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,aAAA,gBAAyDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQR,yBAAA,CAA0BM,KAAA,EAAOC,GAAA;EAE/CL,+BAAA,CAAgCM,KAAA;EAEhCL,2BAAA,CAA4B,mCAAmCK,KAAA;EAE/D,OAAOP,4BAAA,CAA6BO,KAAA;AACtC;AAEAJ,aAAA,CAAcK,WAAW,GAAG"}
|
@@ -2,5 +2,5 @@ export * from './MenuItemRadio.types';
|
|
2
2
|
export * from './MenuItemRadio';
|
3
3
|
export * from './renderMenuItemRadio';
|
4
4
|
export * from './useMenuItemRadio';
|
5
|
-
export * from './useMenuItemRadioStyles';
|
5
|
+
export * from './useMenuItemRadioStyles.styles';
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/MenuItemRadio/index.ts"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/MenuItemRadio/index.ts"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
package/lib/components/MenuItemRadio/{useMenuItemRadioStyles.js → useMenuItemRadioStyles.styles.js}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { mergeClasses } from '@griffel/react';
|
2
2
|
import { useCheckmarkStyles_unstable } from '../../selectable/index';
|
3
|
-
import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';
|
3
|
+
import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';
|
4
4
|
export const menuItemRadioClassNames = {
|
5
5
|
root: 'fui-MenuItemRadio',
|
6
6
|
icon: 'fui-MenuItemRadio__icon',
|
@@ -25,4 +25,4 @@ export const useMenuItemRadioStyles_unstable = state => {
|
|
25
25
|
useMenuItemStyles_unstable(state);
|
26
26
|
useCheckmarkStyles_unstable(state);
|
27
27
|
};
|
28
|
-
//# sourceMappingURL=useMenuItemRadioStyles.js.map
|
28
|
+
//# sourceMappingURL=useMenuItemRadioStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["mergeClasses","useCheckmarkStyles_unstable","useMenuItemStyles_unstable","menuItemRadioClassNames","root","icon","checkmark","content","secondaryContent","useMenuItemRadioStyles_unstable","state","className"],"sources":["../../../src/components/MenuItemRadio/useMenuItemRadioStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuItemSlots } from '../index';\nimport type { MenuItemRadioState } from './MenuItemRadio.types';\n\nexport const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {\n root: 'fui-MenuItemRadio',\n icon: 'fui-MenuItemRadio__icon',\n checkmark: 'fui-MenuItemRadio__checkmark',\n content: 'fui-MenuItemRadio__content',\n secondaryContent: 'fui-MenuItemRadio__secondaryContent',\n};\n\nexport const useMenuItemRadioStyles_unstable = (state: MenuItemRadioState) => {\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n\n if (state.content) {\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n menuItemRadioClassNames.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAC7B,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,0BAA0B,QAAQ;AAK3C,OAAO,MAAMC,uBAAA,GAAmF;EAC9FC,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,SAAA,EAAW;EACXC,OAAA,EAAS;EACTC,gBAAA,EAAkB;AACpB;AAEA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAA8B;EAC5EA,KAAA,CAAMN,IAAI,CAACO,SAAS,GAAGX,YAAA,CAAaG,uBAAA,CAAwBC,IAAI,EAAEM,KAAA,CAAMN,IAAI,CAACO,SAAS;EAEtF,IAAID,KAAA,CAAMH,OAAO,EAAE;IACjBG,KAAA,CAAMH,OAAO,CAACI,SAAS,GAAGX,YAAA,CAAaG,uBAAA,CAAwBI,OAAO,EAAEG,KAAA,CAAMH,OAAO,CAACI,SAAS;EACjG;EAEA,IAAID,KAAA,CAAMF,gBAAgB,EAAE;IAC1BE,KAAA,CAAMF,gBAAgB,CAACG,SAAS,GAAGX,YAAA,CACjCG,uBAAA,CAAwBK,gBAAgB,EACxCE,KAAA,CAAMF,gBAAgB,CAACG,SAAS;EAEpC;EAEA,IAAID,KAAA,CAAML,IAAI,EAAE;IACdK,KAAA,CAAML,IAAI,CAACM,SAAS,GAAGX,YAAA,CAAaG,uBAAA,CAAwBE,IAAI,EAAEK,KAAA,CAAML,IAAI,CAACM,SAAS;EACxF;EAEA,IAAID,KAAA,CAAMJ,SAAS,EAAE;IACnBI,KAAA,CAAMJ,SAAS,CAACK,SAAS,GAAGX,YAAA,CAAaG,uBAAA,CAAwBG,SAAS,EAAEI,KAAA,CAAMJ,SAAS,CAACK,SAAS;EACvG;EAEAT,0BAAA,CAA2BQ,KAAA;EAC3BT,2BAAA,CAA4BS,KAAA;AAC9B"}
|
@@ -2,8 +2,8 @@ import * as React from 'react';
|
|
2
2
|
import { useMenuList_unstable } from './useMenuList';
|
3
3
|
import { renderMenuList_unstable } from './renderMenuList';
|
4
4
|
import { useMenuListContextValues_unstable } from './useMenuListContextValues';
|
5
|
-
import { useMenuListStyles_unstable } from './useMenuListStyles';
|
6
|
-
import {
|
5
|
+
import { useMenuListStyles_unstable } from './useMenuListStyles.styles';
|
6
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
7
7
|
/**
|
8
8
|
* Define a styled MenuList, using the `useMenuList_unstable` hook.
|
9
9
|
*/
|
@@ -11,10 +11,7 @@ export const MenuList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
11
11
|
const state = useMenuList_unstable(props, ref);
|
12
12
|
const contextValues = useMenuListContextValues_unstable(state);
|
13
13
|
useMenuListStyles_unstable(state);
|
14
|
-
|
15
|
-
useMenuListStyles_unstable: useCustomStyles
|
16
|
-
} = useCustomStyleHooks_unstable();
|
17
|
-
useCustomStyles(state);
|
14
|
+
useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);
|
18
15
|
return renderMenuList_unstable(state, contextValues);
|
19
16
|
});
|
20
17
|
MenuList.displayName = 'MenuList';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useMenuList_unstable","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","
|
1
|
+
{"version":3,"names":["React","useMenuList_unstable","renderMenuList_unstable","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyleHook_unstable","MenuList","forwardRef","props","ref","state","contextValues","displayName"],"sources":["../../../src/components/MenuList/MenuList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles.styles';\nimport type { MenuListProps } from './MenuList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */\nexport const MenuList: ForwardRefComponent<MenuListProps> = React.forwardRef((props, ref) => {\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n\n useMenuListStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);\n\n return renderMenuList_unstable(state, contextValues);\n});\n\nMenuList.displayName = 'MenuList';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,uBAAuB,QAAQ;AACxC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,0BAA0B,QAAQ;AAG3C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,QAAA,gBAA+CN,KAAA,CAAMO,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC3F,MAAMC,KAAA,GAAQT,oBAAA,CAAqBO,KAAA,EAAOC,GAAA;EAC1C,MAAME,aAAA,GAAgBR,iCAAA,CAAkCO,KAAA;EAExDN,0BAAA,CAA2BM,KAAA;EAE3BL,2BAAA,CAA4B,8BAA8BK,KAAA;EAE1D,OAAOR,uBAAA,CAAwBQ,KAAA,EAAOC,aAAA;AACxC;AAEAL,QAAA,CAASM,WAAW,GAAG"}
|
@@ -2,6 +2,6 @@ export * from './MenuList';
|
|
2
2
|
export * from './MenuList.types';
|
3
3
|
export * from './renderMenuList';
|
4
4
|
export * from './useMenuList';
|
5
|
-
export * from './useMenuListStyles';
|
5
|
+
export * from './useMenuListStyles.styles';
|
6
6
|
export * from './useMenuListContextValues';
|
7
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/MenuList/index.ts"],"sourcesContent":["export * from './MenuList';\nexport * from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles';\nexport * from './useMenuListContextValues';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/MenuList/index.ts"],"sourcesContent":["export * from './MenuList';\nexport * from './MenuList.types';\nexport * from './renderMenuList';\nexport * from './useMenuList';\nexport * from './useMenuListStyles.styles';\nexport * from './useMenuListContextValues';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
@@ -20,4 +20,4 @@ export const useMenuListStyles_unstable = state => {
|
|
20
20
|
state.root.className = mergeClasses(menuListClassNames.root, styles.root, state.root.className);
|
21
21
|
return state;
|
22
22
|
};
|
23
|
-
//# sourceMappingURL=useMenuListStyles.js.map
|
23
|
+
//# sourceMappingURL=useMenuListStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["mergeClasses","__styles","shorthands","menuListClassNames","root","useStyles","mc9l5x","Beiy3e4","i8kkvl","Belr9w4","d","useMenuListStyles_unstable","state","styles","className"],"sources":["../../../src/components/MenuList/useMenuListStyles.styles.ts"],"sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport type { MenuListSlots, MenuListState } from './MenuList.types';\n\nexport const menuListClassNames: SlotClassNames<MenuListSlots> = {\n root: 'fui-MenuList',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.gap('2px'),\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = (state: MenuListState): MenuListState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuListClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AACA,SAASA,YAAY,EAAAC,QAAA,EAAcC,UAAU,QAAQ;AAGrD,OAAO,MAAMC,kBAAA,GAAoD;EAC/DC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYJ,QAAA;EAAAG,IAAA;IAAAE,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAMlB;AAEA;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAAwC;EACjF,MAAMC,MAAA,GAASR,SAAA;EACfO,KAAA,CAAMR,IAAI,CAACU,SAAS,GAAGd,YAAA,CAAaG,kBAAA,CAAmBC,IAAI,EAAES,MAAA,CAAOT,IAAI,EAAEQ,KAAA,CAAMR,IAAI,CAACU,SAAS;EAC9F,OAAOF,KAAA;AACT"}
|
@@ -1,18 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { useMenuPopover_unstable } from './useMenuPopover';
|
3
|
-
import { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles';
|
3
|
+
import { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';
|
4
4
|
import { renderMenuPopover_unstable } from './renderMenuPopover';
|
5
|
-
import {
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus
|
8
8
|
*/
|
9
9
|
export const MenuPopover = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
10
|
const state = useMenuPopover_unstable(props, ref);
|
11
11
|
useMenuPopoverStyles_unstable(state);
|
12
|
-
|
13
|
-
useMenuPopoverStyles_unstable: useCustomStyles
|
14
|
-
} = useCustomStyleHooks_unstable();
|
15
|
-
useCustomStyles(state);
|
12
|
+
useCustomStyleHook_unstable('useMenuPopoverStyles_unstable')(state);
|
16
13
|
return renderMenuPopover_unstable(state);
|
17
14
|
});
|
18
15
|
MenuPopover.displayName = 'MenuPopover';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useMenuPopover_unstable","useMenuPopoverStyles_unstable","renderMenuPopover_unstable","
|
1
|
+
{"version":3,"names":["React","useMenuPopover_unstable","useMenuPopoverStyles_unstable","renderMenuPopover_unstable","useCustomStyleHook_unstable","MenuPopover","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/MenuPopover/MenuPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuPopover_unstable } from './useMenuPopover';\nimport { useMenuPopoverStyles_unstable } from './useMenuPopoverStyles.styles';\nimport { renderMenuPopover_unstable } from './renderMenuPopover';\nimport type { MenuPopoverProps } from './MenuPopover.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus\n */\nexport const MenuPopover: ForwardRefComponent<MenuPopoverProps> = React.forwardRef((props, ref) => {\n const state = useMenuPopover_unstable(props, ref);\n\n useMenuPopoverStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuPopoverStyles_unstable')(state);\n\n return renderMenuPopover_unstable(state);\n});\n\nMenuPopover.displayName = 'MenuPopover';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,0BAA0B,QAAQ;AAG3C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,WAAA,gBAAqDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACjG,MAAMC,KAAA,GAAQR,uBAAA,CAAwBM,KAAA,EAAOC,GAAA;EAE7CN,6BAAA,CAA8BO,KAAA;EAE9BL,2BAAA,CAA4B,iCAAiCK,KAAA;EAE7D,OAAON,0BAAA,CAA2BM,KAAA;AACpC;AAEAJ,WAAA,CAAYK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/MenuPopover/index.ts"],"sourcesContent":["export * from './MenuPopover';\nexport * from './MenuPopover.types';\nexport * from './renderMenuPopover';\nexport * from './useMenuPopover';\nexport * from './useMenuPopoverStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/MenuPopover/index.ts"],"sourcesContent":["export * from './MenuPopover';\nexport * from './MenuPopover.types';\nexport * from './renderMenuPopover';\nexport * from './useMenuPopover';\nexport * from './useMenuPopoverStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
package/lib/components/MenuPopover/{useMenuPopoverStyles.js → useMenuPopoverStyles.styles.js}
RENAMED
@@ -47,4 +47,4 @@ export const useMenuPopoverStyles_unstable = state => {
|
|
47
47
|
state.root.className = mergeClasses(menuPopoverClassNames.root, styles.root, state.root.className);
|
48
48
|
return state;
|
49
49
|
};
|
50
|
-
//# sourceMappingURL=useMenuPopoverStyles.js.map
|
50
|
+
//# sourceMappingURL=useMenuPopoverStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["shorthands","mergeClasses","__styles","tokens","typographyStyles","menuPopoverClassNames","root","useStyles","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","De3pzq","sj55zd","Bf4jedk","B2u0y6b","a9b677","E5pizo","z8tnut","z189sj","Byoj8tv","uwmqm3","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useMenuPopoverStyles_unstable","state","styles","className"],"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.styles.ts"],"sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { MenuPopoverSlots, MenuPopoverState } from './MenuPopover.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuPopoverClassNames: SlotClassNames<MenuPopoverSlots> = {\n root: 'fui-MenuPopover',\n};\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n minWidth: '128px',\n maxWidth: '300px',\n width: 'max-content',\n boxShadow: `${tokens.shadow16}`,\n ...shorthands.padding('4px'),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuPopoverStyles_unstable = (state: MenuPopoverState): MenuPopoverState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuPopoverClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAAC,QAAA,QAAoB;AACrD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAIzC,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYL,QAAA;EAAAI,IAAA;IAAAE,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAalB;AAEA;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA8C;EAC1F,MAAMC,MAAA,GAASlC,SAAA;EACfiC,KAAA,CAAMlC,IAAI,CAACoC,SAAS,GAAGzC,YAAA,CAAaI,qBAAA,CAAsBC,IAAI,EAAEmC,MAAA,CAAOnC,IAAI,EAAEkC,KAAA,CAAMlC,IAAI,CAACoC,SAAS;EACjG,OAAOF,KAAA;AACT"}
|
@@ -1,18 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { useMenuSplitGroup_unstable } from './useMenuSplitGroup';
|
3
3
|
import { renderMenuSplitGroup_unstable } from './renderMenuSplitGroup';
|
4
|
-
import { useMenuSplitGroupStyles_unstable } from './useMenuSplitGroupStyles';
|
5
|
-
import {
|
4
|
+
import { useMenuSplitGroupStyles_unstable } from './useMenuSplitGroupStyles.styles';
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
8
8
|
*/
|
9
9
|
export const MenuSplitGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
10
|
const state = useMenuSplitGroup_unstable(props, ref);
|
11
11
|
useMenuSplitGroupStyles_unstable(state);
|
12
|
-
|
13
|
-
useMenuSplitGroupStyles_unstable: useCustomStyles
|
14
|
-
} = useCustomStyleHooks_unstable();
|
15
|
-
useCustomStyles(state);
|
12
|
+
useCustomStyleHook_unstable('useMenuSplitGroupStyles_unstable')(state);
|
16
13
|
return renderMenuSplitGroup_unstable(state);
|
17
14
|
});
|
18
15
|
MenuSplitGroup.displayName = 'MenuSplitGroup';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useMenuSplitGroup_unstable","renderMenuSplitGroup_unstable","useMenuSplitGroupStyles_unstable","
|
1
|
+
{"version":3,"names":["React","useMenuSplitGroup_unstable","renderMenuSplitGroup_unstable","useMenuSplitGroupStyles_unstable","useCustomStyleHook_unstable","MenuSplitGroup","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/MenuSplitGroup/MenuSplitGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuSplitGroup_unstable } from './useMenuSplitGroup';\nimport { renderMenuSplitGroup_unstable } from './renderMenuSplitGroup';\nimport { useMenuSplitGroupStyles_unstable } from './useMenuSplitGroupStyles.styles';\nimport type { MenuSplitGroupProps } from './MenuSplitGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.\n */\nexport const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuSplitGroup_unstable(props, ref);\n\n useMenuSplitGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuSplitGroupStyles_unstable')(state);\n\n return renderMenuSplitGroup_unstable(state);\n});\n\nMenuSplitGroup.displayName = 'MenuSplitGroup';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,gCAAgC,QAAQ;AAGjD,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,cAAA,gBAA2DL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACvG,MAAMC,KAAA,GAAQR,0BAAA,CAA2BM,KAAA,EAAOC,GAAA;EAEhDL,gCAAA,CAAiCM,KAAA;EAEjCL,2BAAA,CAA4B,oCAAoCK,KAAA;EAEhE,OAAOP,6BAAA,CAA8BO,KAAA;AACvC;AAEAJ,cAAA,CAAeK,WAAW,GAAG"}
|
@@ -2,5 +2,5 @@ export * from './MenuSplitGroup';
|
|
2
2
|
export * from './MenuSplitGroup.types';
|
3
3
|
export * from './renderMenuSplitGroup';
|
4
4
|
export * from './useMenuSplitGroup';
|
5
|
-
export * from './useMenuSplitGroupStyles';
|
5
|
+
export * from './useMenuSplitGroupStyles.styles';
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/MenuSplitGroup/index.ts"],"sourcesContent":["export * from './MenuSplitGroup';\nexport * from './MenuSplitGroup.types';\nexport * from './renderMenuSplitGroup';\nexport * from './useMenuSplitGroup';\nexport * from './useMenuSplitGroupStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/MenuSplitGroup/index.ts"],"sourcesContent":["export * from './MenuSplitGroup';\nexport * from './MenuSplitGroup.types';\nexport * from './renderMenuSplitGroup';\nexport * from './useMenuSplitGroup';\nexport * from './useMenuSplitGroupStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { __styles, mergeClasses } from '@griffel/react';
|
2
2
|
import { tokens } from '@fluentui/react-theme';
|
3
|
-
import { menuItemClassNames } from '../MenuItem/useMenuItemStyles';
|
3
|
+
import { menuItemClassNames } from '../MenuItem/useMenuItemStyles.styles';
|
4
4
|
export const menuSplitGroupClassNames = {
|
5
5
|
root: 'fui-MenuSplitGroup'
|
6
6
|
};
|
@@ -31,4 +31,4 @@ export const useMenuSplitGroupStyles_unstable = state => {
|
|
31
31
|
state.root.className = mergeClasses(menuSplitGroupClassNames.root, styles.root, state.root.className);
|
32
32
|
return state;
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=useMenuSplitGroupStyles.js.map
|
34
|
+
//# sourceMappingURL=useMenuSplitGroupStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","menuItemClassNames","menuSplitGroupClassNames","root","useStyles","mc9l5x","u7v6m2","Bo1wru1","Bhkyaub","J9ixe0","rj29m3","B2knx3v","Bl7aesu","e82tai","Bnkcs84","d","useMenuSplitGroupStyles_unstable","state","styles","className"],"sources":["../../../src/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { menuItemClassNames } from '../MenuItem/useMenuItemStyles.styles';\nimport type { MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuSplitGroupClassNames: SlotClassNames<MenuSplitGroupSlots> = {\n root: 'fui-MenuSplitGroup',\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n [`& > .${menuItemClassNames.root}:nth-child(1)`]: {\n width: '100%',\n },\n [`& > .${menuItemClassNames.root}:nth-child(2)`]: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n marginLeft: 'auto',\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n },\n});\n\n/**\n * Apply styling to the MenuSplitGroup slots based on the state\n */\nexport const useMenuSplitGroupStyles_unstable = (state: MenuSplitGroupState): MenuSplitGroupState => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuSplitGroupClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ;AACzC,SAASC,MAAM,QAAQ;AACvB,SAASC,kBAAkB,QAAQ;AAInC,OAAO,MAAMC,wBAAA,GAAgE;EAC3EC,IAAA,EAAM;AACR;AACA;;;AAGA,MAAMC,SAAA,gBAAYN,QAAA;EAAAK,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAmBlB;AAEA;;;AAGA,OAAO,MAAMC,gCAAA,GAAoCC,KAAA,IAAoD;EACnG,MAAMC,MAAA,GAASd,SAAA;EACfa,KAAA,CAAMd,IAAI,CAACgB,SAAS,GAAGpB,YAAA,CAAaG,wBAAA,CAAyBC,IAAI,EAAEe,MAAA,CAAOf,IAAI,EAAEc,KAAA,CAAMd,IAAI,CAACgB,SAAS;EACpG,OAAOF,KAAA;AACT"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { useMenuTrigger_unstable } from './useMenuTrigger';
|
2
|
+
import { useMenuTrigger_unstable } from './useMenuTrigger.styles';
|
3
3
|
import { renderMenuTrigger_unstable } from './renderMenuTrigger';
|
4
4
|
/**
|
5
5
|
* Wraps a trigger element as an only child
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useMenuTrigger_unstable","renderMenuTrigger_unstable","MenuTrigger","props","state","displayName","isFluentTriggerComponent"],"sources":["../../../src/components/MenuTrigger/MenuTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(MenuTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAI3C;;;;AAIA,OAAO,MAAMC,WAAA,GAA0CC,KAAA,IAAS;EAC9D,MAAMC,KAAA,GAAQJ,uBAAA,CAAwBG,KAAA;EAEtC,OAAOF,0BAAA,CAA2BG,KAAA;AACpC;AAEAF,WAAA,CAAYG,WAAW,GAAG;AAC1B;AACCH,WAAA,CAAuCI,wBAAwB,GAAG,IAAI"}
|
1
|
+
{"version":3,"names":["React","useMenuTrigger_unstable","renderMenuTrigger_unstable","MenuTrigger","props","state","displayName","isFluentTriggerComponent"],"sources":["../../../src/components/MenuTrigger/MenuTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger.styles';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(MenuTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAI3C;;;;AAIA,OAAO,MAAMC,WAAA,GAA0CC,KAAA,IAAS;EAC9D,MAAMC,KAAA,GAAQJ,uBAAA,CAAwBG,KAAA;EAEtC,OAAOF,0BAAA,CAA2BG,KAAA;AACpC;AAEAF,WAAA,CAAYG,WAAW,GAAG;AAC1B;AACCH,WAAA,CAAuCI,wBAAwB,GAAG,IAAI"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/MenuTrigger/index.ts"],"sourcesContent":["export * from './MenuTrigger';\nexport * from './MenuTrigger.types';\nexport * from './renderMenuTrigger';\nexport * from './useMenuTrigger';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/MenuTrigger/index.ts"],"sourcesContent":["export * from './MenuTrigger';\nexport * from './MenuTrigger.types';\nexport * from './renderMenuTrigger';\nexport * from './useMenuTrigger.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","useMenuContext_unstable","useIsSubmenu","useFocusFinders","useFluent_unstable","useFluent","ArrowRight","ArrowLeft","Escape","ArrowDown","applyTriggerPropsToChildren","getTriggerChild","isHTMLElement","mergeCallbacks","useEventCallback","useMergedRefs","useARIAButtonProps","useMenuTrigger_unstable","props","children","disableButtonEnhancement","triggerRef","context","menuPopoverRef","setOpen","open","triggerId","openOnHover","openOnContext","isSubmenu","findFirstFocusable","focusFirst","useCallback","firstFocusable","current","focus","openedWithKeyboardRef","useRef","hasMouseMoved","dir","OpenArrowKey","child","onContextMenu","event","isTargetDisabled","preventDefault","keyboard","type","onClick","onKeyDown","key","onMouseEnter","onMouseMove","onMouseLeave","contextMenuProps","id","ref","triggerChildProps","undefined","ariaButtonTriggerChildProps","isDisabled","el","hasAttribute","getAttribute","target","currentTarget"],"sources":["../../../src/components/MenuTrigger/useMenuTrigger.styles.ts"],"sourcesContent":["import * as React from 'react';\nimport { MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n isHTMLElement,\n mergeCallbacks,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n\n/**\n * Create the state required to render MenuTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup menu\n *\n * @param props - props from this instance of MenuTrigger\n */\nexport const useMenuTrigger_unstable = (props: MenuTriggerProps): MenuTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n\n const triggerRef = useMenuContext_unstable(context => context.triggerRef);\n const menuPopoverRef = useMenuContext_unstable(context => context.menuPopoverRef);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const open = useMenuContext_unstable(context => context.open);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const openOnHover = useMenuContext_unstable(context => context.openOnHover);\n const openOnContext = useMenuContext_unstable(context => context.openOnContext);\n\n const isSubmenu = useIsSubmenu();\n\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, menuPopoverRef]);\n\n const openedWithKeyboardRef = React.useRef(false);\n const hasMouseMoved = React.useRef(false);\n\n const { dir } = useFluent();\n const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;\n\n const child = getTriggerChild(children);\n\n const onContextMenu = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n\n if (openOnContext) {\n event.preventDefault();\n setOpen(event, { open: true, keyboard: false, type: 'menuTriggerContextMenu', event });\n }\n };\n\n const onClick = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n\n if (!openOnContext) {\n setOpen(event, { open: !open, keyboard: openedWithKeyboardRef.current, type: 'menuTriggerClick', event });\n openedWithKeyboardRef.current = false;\n }\n };\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n\n const key = event.key;\n\n if (!openOnContext && ((isSubmenu && key === OpenArrowKey) || (!isSubmenu && key === ArrowDown))) {\n setOpen(event, { open: true, keyboard: true, type: 'menuTriggerKeyDown', event });\n }\n\n if (key === Escape && !isSubmenu) {\n setOpen(event, { open: false, keyboard: true, type: 'menuTriggerKeyDown', event });\n }\n\n // if menu is already open, can't rely on effects to focus\n if (open && key === OpenArrowKey && isSubmenu) {\n focusFirst();\n }\n };\n\n const onMouseEnter = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover && hasMouseMoved.current) {\n setOpen(event, { open: true, keyboard: false, type: 'menuTriggerMouseEnter', event });\n }\n };\n\n // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience\n // First time open the mouse using mousemove and then continue with mouseenter\n // Only use once to determine that the user is using the mouse since it is an expensive event to handle\n const onMouseMove = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover && !hasMouseMoved.current) {\n setOpen(event, { open: true, keyboard: false, type: 'menuTriggerMouseMove', event });\n hasMouseMoved.current = true;\n }\n };\n\n const onMouseLeave = (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n if (isTargetDisabled(event)) {\n return;\n }\n if (openOnHover) {\n setOpen(event, { open: false, keyboard: false, type: 'menuTriggerMouseLeave', event });\n }\n };\n\n const contextMenuProps = {\n id: triggerId,\n ...child?.props,\n ref: useMergedRefs(triggerRef, child?.ref),\n onMouseEnter: useEventCallback(mergeCallbacks(child?.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child?.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child?.props.onContextMenu, onContextMenu)),\n onMouseMove: useEventCallback(mergeCallbacks(child?.props.onMouseMove, onMouseMove)),\n };\n\n const triggerChildProps = {\n 'aria-haspopup': 'menu',\n 'aria-expanded': !open && !isSubmenu ? undefined : open,\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child?.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child?.props.onKeyDown, onKeyDown)),\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n triggerChildProps,\n );\n\n return {\n isSubmenu,\n children: applyTriggerPropsToChildren(\n children,\n openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n\nconst isTargetDisabled = (event: React.SyntheticEvent | Event) => {\n const isDisabled = (el: HTMLElement) =>\n el.hasAttribute('disabled') || (el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true');\n if (isHTMLElement(event.target) && isDisabled(event.target)) {\n return true;\n }\n\n return isHTMLElement(event.currentTarget) && isDisabled(event.currentTarget);\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,YAAY,QAAQ;AAC7B,SAASC,eAAe,QAAQ;AAChC,SAASC,kBAAA,IAAsBC,SAAS,QAAQ;AAChD,SAASC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,SAAS,QAAQ;AACzD,SACEC,2BAA2B,EAC3BC,eAAe,EACfC,aAAa,EACbC,cAAc,EACdC,gBAAgB,EAChBC,aAAa,QACR;AACP,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;AAMA,OAAO,MAAMC,uBAAA,GAA2BC,KAAA,IAA8C;EACpF,MAAM;IAAEC,QAAA;IAAUC,wBAAA,GAA2B;EAAK,CAAE,GAAGF,KAAA;EAEvD,MAAMG,UAAA,GAAapB,uBAAA,CAAwBqB,OAAA,IAAWA,OAAA,CAAQD,UAAU;EACxE,MAAME,cAAA,GAAiBtB,uBAAA,CAAwBqB,OAAA,IAAWA,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AAM,GAAG;IAC3D,OAAO,IAAI;EACb;EAEA,OAAOpD,aAAA,CAAc+B,KAAA,CAAMsB,aAAa,KAAKL,UAAA,CAAWjB,KAAA,CAAMsB,aAAa;AAC7E"}
|
package/lib/selectable/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/selectable/index.ts"],"sourcesContent":["export * from './useCheckmarkStyles';\nexport * from './types';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../src/selectable/index.ts"],"sourcesContent":["export * from './useCheckmarkStyles.styles';\nexport * from './types';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
|
@@ -22,4 +22,4 @@ export const useCheckmarkStyles_unstable = state => {
|
|
22
22
|
state.checkmark.className = mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);
|
23
23
|
}
|
24
24
|
};
|
25
|
-
//# sourceMappingURL=useCheckmarkStyles.js.map
|
25
|
+
//# sourceMappingURL=useCheckmarkStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["mergeClasses","__styles","useStyles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","useCheckmarkStyles_unstable","state","styles","checkmark","className","checked"],"sources":["../../src/selectable/useCheckmarkStyles.styles.ts"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { MenuItemSelectableState } from './types';\nimport type { MenuItemState } from '../components/MenuItem/MenuItem.types';\n\nconst useStyles = makeStyles({\n root: {\n width: '16px',\n height: '16px',\n visibility: 'hidden',\n },\n rootChecked: {\n visibility: 'visible',\n },\n});\n\n/**\n * Applies styles to a checkmark slot for selectable menu items\n *\n * @param state - should contain a `checkmark` slot\n */\nexport const useCheckmarkStyles_unstable = (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => {\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(\n styles.root,\n state.checked && styles.rootChecked,\n state.checkmark.className,\n );\n }\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAAC,QAAA,QAAoB;AAIzC,MAAMC,SAAA,gBAAYD,QAAA;EAAAE,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,WAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EASlB;AAEA;;;;;AAKA,OAAO,MAAMC,2BAAA,GAA+BC,KAAA,IAAsE;EAChH,MAAMC,MAAA,GAAST,SAAA;EACf,IAAIQ,KAAA,CAAME,SAAS,EAAE;IACnBF,KAAA,CAAME,SAAS,CAACC,SAAS,GAAGb,YAAA,CAC1BW,MAAA,CAAOR,IAAI,EACXO,KAAA,CAAMI,OAAO,IAAIH,MAAA,CAAOJ,WAAW,EACnCG,KAAA,CAAME,SAAS,CAACC,SAAS;EAE7B;AACF"}
|
@@ -259,12 +259,13 @@ const useMenuOpenState = (state)=>{
|
|
259
259
|
}
|
260
260
|
}
|
261
261
|
}
|
262
|
+
// firstMount change should not re-run this effect
|
263
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
262
264
|
}, [
|
263
265
|
state.triggerRef,
|
264
266
|
state.isSubmenu,
|
265
267
|
open,
|
266
268
|
focusFirst,
|
267
|
-
firstMount,
|
268
269
|
targetDocument,
|
269
270
|
state.menuPopoverRef
|
270
271
|
]);
|