@fluentui-react-native/menu 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/SPEC.md +8 -4
- package/lib/Menu/Menu.d.ts +2 -2
- package/lib/Menu/Menu.js +12 -12
- package/lib/Menu/Menu.types.d.ts +47 -47
- package/lib/Menu/Menu.types.js +4 -4
- package/lib/Menu/index.d.ts +1 -1
- package/lib/Menu/index.js +1 -1
- package/lib/Menu/renderMenu.android.d.ts +2 -6
- package/lib/Menu/renderMenu.android.js +10 -17
- package/lib/Menu/renderMenu.d.ts +2 -6
- package/lib/Menu/renderMenu.js +5 -8
- package/lib/Menu/useMenu.android.d.ts +1 -1
- package/lib/Menu/useMenu.android.js +245 -251
- package/lib/Menu/useMenu.d.ts +1 -1
- package/lib/Menu/useMenu.js +70 -75
- package/lib/Menu/useMenuContextValue.d.ts +1 -1
- package/lib/Menu/useMenuContextValue.js +4 -4
- package/lib/MenuCallout/MenuCallout.android.d.ts +2 -2
- package/lib/MenuCallout/MenuCallout.android.js +19 -39
- package/lib/MenuCallout/MenuCallout.d.ts +2 -2
- package/lib/MenuCallout/MenuCallout.js +7 -7
- package/lib/MenuCallout/MenuCallout.types.d.ts +13 -13
- package/lib/MenuCallout/MenuCallout.types.d.ts.map +1 -1
- package/lib/MenuCallout/MenuCallout.types.js +1 -1
- package/lib/MenuCallout/index.d.ts +1 -1
- package/lib/MenuCallout/index.js +1 -1
- package/lib/MenuDivider/MenuDivider.d.ts +2 -7
- package/lib/MenuDivider/MenuDivider.js +13 -13
- package/lib/MenuDivider/MenuDivider.styling.d.ts +1 -1
- package/lib/MenuDivider/MenuDivider.styling.js +16 -19
- package/lib/MenuDivider/MenuDivider.types.d.ts +12 -12
- package/lib/MenuDivider/MenuDivider.types.js +1 -1
- package/lib/MenuDivider/MenuDividerTokens.android.d.ts +1 -1
- package/lib/MenuDivider/MenuDividerTokens.android.js +4 -4
- package/lib/MenuDivider/MenuDividerTokens.d.ts +1 -1
- package/lib/MenuDivider/MenuDividerTokens.js +4 -4
- package/lib/MenuDivider/MenuDividerTokens.macos.d.ts +1 -1
- package/lib/MenuDivider/MenuDividerTokens.macos.js +4 -4
- package/lib/MenuDivider/MenuDividerTokens.win32.d.ts +1 -1
- package/lib/MenuDivider/MenuDividerTokens.win32.js +4 -4
- package/lib/MenuDivider/index.d.ts +1 -1
- package/lib/MenuDivider/index.js +1 -1
- package/lib/MenuGroup/MenuGroup.d.ts +2 -7
- package/lib/MenuGroup/MenuGroup.js +51 -63
- package/lib/MenuGroup/MenuGroup.types.d.ts +7 -7
- package/lib/MenuGroup/MenuGroup.types.js +1 -1
- package/lib/MenuGroup/index.d.ts +1 -1
- package/lib/MenuGroup/index.js +1 -1
- package/lib/MenuGroupHeader/MenuGroupHeader.d.ts +2 -7
- package/lib/MenuGroupHeader/MenuGroupHeader.js +14 -14
- package/lib/MenuGroupHeader/MenuGroupHeader.styling.d.ts +1 -1
- package/lib/MenuGroupHeader/MenuGroupHeader.styling.js +13 -16
- package/lib/MenuGroupHeader/MenuGroupHeader.types.d.ts +7 -7
- package/lib/MenuGroupHeader/MenuGroupHeader.types.js +1 -1
- package/lib/MenuGroupHeader/MenuGroupHeaderTokens.d.ts +1 -1
- package/lib/MenuGroupHeader/MenuGroupHeaderTokens.js +7 -7
- package/lib/MenuGroupHeader/MenuGroupHeaderTokens.macos.d.ts +1 -1
- package/lib/MenuGroupHeader/MenuGroupHeaderTokens.macos.js +8 -8
- package/lib/MenuGroupHeader/index.d.ts +1 -1
- package/lib/MenuGroupHeader/index.js +1 -1
- package/lib/MenuItem/MenuItem.d.ts +2 -7
- package/lib/MenuItem/MenuItem.js +41 -63
- package/lib/MenuItem/MenuItem.styling.d.ts +1 -1
- package/lib/MenuItem/MenuItem.styling.js +52 -70
- package/lib/MenuItem/MenuItem.types.d.ts +83 -83
- package/lib/MenuItem/MenuItem.types.js +1 -1
- package/lib/MenuItem/MenuItemTokens.android.d.ts +1 -1
- package/lib/MenuItem/MenuItemTokens.android.js +17 -17
- package/lib/MenuItem/MenuItemTokens.d.ts +1 -1
- package/lib/MenuItem/MenuItemTokens.js +35 -35
- package/lib/MenuItem/MenuItemTokens.macos.d.ts +1 -1
- package/lib/MenuItem/MenuItemTokens.macos.js +34 -34
- package/lib/MenuItem/MenuItemTokens.win32.d.ts +1 -1
- package/lib/MenuItem/MenuItemTokens.win32.js +36 -36
- package/lib/MenuItem/index.d.ts +1 -1
- package/lib/MenuItem/index.js +1 -1
- package/lib/MenuItem/useMenuItem.d.ts +1 -1
- package/lib/MenuItem/useMenuItem.js +101 -111
- package/lib/MenuItemCheckbox/MenuItemCheckbox.d.ts +3 -11
- package/lib/MenuItemCheckbox/MenuItemCheckbox.js +26 -54
- package/lib/MenuItemCheckbox/MenuItemCheckbox.styling.d.ts +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckbox.styling.js +62 -81
- package/lib/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +89 -90
- package/lib/MenuItemCheckbox/MenuItemCheckbox.types.d.ts.map +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckbox.types.js +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.android.d.ts +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.android.js +35 -35
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.d.ts +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.js +44 -44
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.macos.d.ts +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.macos.js +42 -42
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.win32.d.ts +1 -1
- package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.win32.js +45 -45
- package/lib/MenuItemCheckbox/index.d.ts +2 -8
- package/lib/MenuItemCheckbox/index.js +1 -1
- package/lib/MenuItemCheckbox/useMenuItemCheckbox.d.ts +2 -5
- package/lib/MenuItemCheckbox/useMenuItemCheckbox.js +104 -129
- package/lib/MenuItemRadio/MenuItemRadio.d.ts +3 -11
- package/lib/MenuItemRadio/MenuItemRadio.js +26 -54
- package/lib/MenuItemRadio/MenuItemRadio.styling.android.d.ts +1 -1
- package/lib/MenuItemRadio/MenuItemRadio.styling.android.js +60 -78
- package/lib/MenuItemRadio/MenuItemRadio.styling.d.ts +1 -1
- package/lib/MenuItemRadio/MenuItemRadio.styling.js +44 -59
- package/lib/MenuItemRadio/MenuItemRadio.types.d.ts +120 -121
- package/lib/MenuItemRadio/MenuItemRadio.types.d.ts.map +1 -1
- package/lib/MenuItemRadio/MenuItemRadio.types.js +1 -1
- package/lib/MenuItemRadio/MenuItemRadioTokens.android.d.ts +1 -1
- package/lib/MenuItemRadio/MenuItemRadioTokens.android.js +38 -38
- package/lib/MenuItemRadio/MenuItemRadioTokens.d.ts +1 -1
- package/lib/MenuItemRadio/MenuItemRadioTokens.js +45 -45
- package/lib/MenuItemRadio/MenuItemRadioTokens.macos.d.ts +1 -1
- package/lib/MenuItemRadio/MenuItemRadioTokens.macos.js +43 -43
- package/lib/MenuItemRadio/index.d.ts +2 -8
- package/lib/MenuItemRadio/index.js +1 -1
- package/lib/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
- package/lib/MenuItemRadio/useMenuItemRadio.js +23 -26
- package/lib/MenuList/MenuList.d.ts +2 -7
- package/lib/MenuList/MenuList.js +54 -70
- package/lib/MenuList/MenuList.styling.d.ts +1 -1
- package/lib/MenuList/MenuList.styling.js +21 -27
- package/lib/MenuList/MenuList.types.d.ts +72 -72
- package/lib/MenuList/MenuList.types.js +1 -1
- package/lib/MenuList/MenuListTokens.android.d.ts +1 -1
- package/lib/MenuList/MenuListTokens.android.js +4 -4
- package/lib/MenuList/MenuListTokens.d.ts +1 -1
- package/lib/MenuList/MenuListTokens.js +6 -6
- package/lib/MenuList/MenuListTokens.macos.d.ts +1 -1
- package/lib/MenuList/MenuListTokens.macos.js +4 -4
- package/lib/MenuList/MenuListTokens.win32.d.ts +1 -1
- package/lib/MenuList/MenuListTokens.win32.js +9 -9
- package/lib/MenuList/index.d.ts +1 -1
- package/lib/MenuList/index.js +1 -1
- package/lib/MenuList/useMenuList.d.ts +1 -1
- package/lib/MenuList/useMenuList.js +142 -159
- package/lib/MenuList/useMenuListContextValue.d.ts +1 -1
- package/lib/MenuList/useMenuListContextValue.js +2 -2
- package/lib/MenuPopover/MenuPopover.d.ts +3 -9
- package/lib/MenuPopover/MenuPopover.d.ts.map +1 -1
- package/lib/MenuPopover/MenuPopover.js +35 -35
- package/lib/MenuPopover/MenuPopover.types.d.ts +14 -14
- package/lib/MenuPopover/MenuPopover.types.d.ts.map +1 -1
- package/lib/MenuPopover/MenuPopover.types.js +1 -1
- package/lib/MenuPopover/MenuPopoverTokens.android.d.ts +3 -7
- package/lib/MenuPopover/MenuPopoverTokens.android.d.ts.map +1 -1
- package/lib/MenuPopover/MenuPopoverTokens.android.js +3 -6
- package/lib/MenuPopover/MenuPopoverTokens.d.ts +3 -7
- package/lib/MenuPopover/MenuPopoverTokens.d.ts.map +1 -1
- package/lib/MenuPopover/MenuPopoverTokens.js +2 -5
- package/lib/MenuPopover/MenuPopoverTokens.macos.d.ts +3 -7
- package/lib/MenuPopover/MenuPopoverTokens.macos.d.ts.map +1 -1
- package/lib/MenuPopover/MenuPopoverTokens.macos.js +7 -10
- package/lib/MenuPopover/MenuPopoverTokens.macos.js.map +1 -1
- package/lib/MenuPopover/index.d.ts +1 -1
- package/lib/MenuPopover/index.js +1 -1
- package/lib/MenuPopover/useMenuPopover.d.ts +2 -2
- package/lib/MenuPopover/useMenuPopover.js +79 -96
- package/lib/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/MenuTrigger/MenuTrigger.d.ts +3 -3
- package/lib/MenuTrigger/MenuTrigger.js +16 -16
- package/lib/MenuTrigger/MenuTrigger.types.d.ts +13 -13
- package/lib/MenuTrigger/MenuTrigger.types.js +1 -1
- package/lib/MenuTrigger/index.d.ts +1 -1
- package/lib/MenuTrigger/index.js +1 -1
- package/lib/MenuTrigger/useMenuTrigger.d.ts +1 -1
- package/lib/MenuTrigger/useMenuTrigger.js +70 -99
- package/lib/MenuTrigger/useMergeRefs.d.ts +1 -1
- package/lib/MenuTrigger/useMergeRefs.js +14 -16
- package/lib/__tests__/Menu.test.d.ts +1 -1
- package/lib/__tests__/Menu.test.js +122 -230
- package/lib/consts.d.ts +1 -1
- package/lib/consts.js +3 -3
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.js +1 -1
- package/lib/context/menuContext.d.ts +5 -5
- package/lib/context/menuContext.js +15 -15
- package/lib/context/menuListContext.d.ts +4 -4
- package/lib/context/menuListContext.js +12 -12
- package/lib/context/menuTriggerContext.d.ts +1 -1
- package/lib/context/menuTriggerContext.js +1 -1
- package/lib/index.d.ts +4 -26
- package/lib/index.js +2 -12
- package/lib-commonjs/Menu/Menu.d.ts +2 -2
- package/lib-commonjs/Menu/Menu.js +23 -25
- package/lib-commonjs/Menu/Menu.types.d.ts +47 -47
- package/lib-commonjs/Menu/Menu.types.js +6 -6
- package/lib-commonjs/Menu/index.d.ts +1 -1
- package/lib-commonjs/Menu/index.js +11 -31
- package/lib-commonjs/Menu/renderMenu.android.d.ts +2 -6
- package/lib-commonjs/Menu/renderMenu.android.js +14 -26
- package/lib-commonjs/Menu/renderMenu.d.ts +2 -6
- package/lib-commonjs/Menu/renderMenu.js +8 -11
- package/lib-commonjs/Menu/useMenu.android.d.ts +1 -1
- package/lib-commonjs/Menu/useMenu.android.js +280 -303
- package/lib-commonjs/Menu/useMenu.d.ts +1 -1
- package/lib-commonjs/Menu/useMenu.js +79 -86
- package/lib-commonjs/Menu/useMenuContextValue.d.ts +1 -1
- package/lib-commonjs/Menu/useMenuContextValue.js +10 -12
- package/lib-commonjs/MenuCallout/MenuCallout.android.d.ts +2 -2
- package/lib-commonjs/MenuCallout/MenuCallout.android.js +25 -48
- package/lib-commonjs/MenuCallout/MenuCallout.d.ts +2 -2
- package/lib-commonjs/MenuCallout/MenuCallout.js +12 -12
- package/lib-commonjs/MenuCallout/MenuCallout.types.d.ts +13 -13
- package/lib-commonjs/MenuCallout/MenuCallout.types.d.ts.map +1 -1
- package/lib-commonjs/MenuCallout/MenuCallout.types.js +3 -3
- package/lib-commonjs/MenuCallout/index.d.ts +1 -1
- package/lib-commonjs/MenuCallout/index.js +7 -17
- package/lib-commonjs/MenuDivider/MenuDivider.d.ts +2 -7
- package/lib-commonjs/MenuDivider/MenuDivider.js +19 -19
- package/lib-commonjs/MenuDivider/MenuDivider.styling.d.ts +1 -1
- package/lib-commonjs/MenuDivider/MenuDivider.styling.js +22 -25
- package/lib-commonjs/MenuDivider/MenuDivider.types.d.ts +12 -12
- package/lib-commonjs/MenuDivider/MenuDivider.types.js +3 -3
- package/lib-commonjs/MenuDivider/MenuDividerTokens.android.d.ts +1 -1
- package/lib-commonjs/MenuDivider/MenuDividerTokens.android.js +7 -7
- package/lib-commonjs/MenuDivider/MenuDividerTokens.d.ts +1 -1
- package/lib-commonjs/MenuDivider/MenuDividerTokens.js +7 -7
- package/lib-commonjs/MenuDivider/MenuDividerTokens.macos.d.ts +1 -1
- package/lib-commonjs/MenuDivider/MenuDividerTokens.macos.js +7 -7
- package/lib-commonjs/MenuDivider/MenuDividerTokens.win32.d.ts +1 -1
- package/lib-commonjs/MenuDivider/MenuDividerTokens.win32.js +7 -7
- package/lib-commonjs/MenuDivider/index.d.ts +1 -1
- package/lib-commonjs/MenuDivider/index.js +7 -17
- package/lib-commonjs/MenuGroup/MenuGroup.d.ts +2 -7
- package/lib-commonjs/MenuGroup/MenuGroup.js +62 -78
- package/lib-commonjs/MenuGroup/MenuGroup.types.d.ts +7 -7
- package/lib-commonjs/MenuGroup/MenuGroup.types.js +3 -3
- package/lib-commonjs/MenuGroup/index.d.ts +1 -1
- package/lib-commonjs/MenuGroup/index.js +7 -17
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeader.d.ts +2 -7
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeader.js +20 -20
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeader.styling.d.ts +1 -1
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeader.styling.js +19 -22
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeader.types.d.ts +7 -7
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeader.types.js +3 -3
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeaderTokens.d.ts +1 -1
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeaderTokens.js +10 -10
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeaderTokens.macos.d.ts +1 -1
- package/lib-commonjs/MenuGroupHeader/MenuGroupHeaderTokens.macos.js +11 -11
- package/lib-commonjs/MenuGroupHeader/index.d.ts +1 -1
- package/lib-commonjs/MenuGroupHeader/index.js +7 -17
- package/lib-commonjs/MenuItem/MenuItem.d.ts +2 -7
- package/lib-commonjs/MenuItem/MenuItem.js +51 -73
- package/lib-commonjs/MenuItem/MenuItem.styling.d.ts +1 -1
- package/lib-commonjs/MenuItem/MenuItem.styling.js +59 -80
- package/lib-commonjs/MenuItem/MenuItem.types.d.ts +83 -83
- package/lib-commonjs/MenuItem/MenuItem.types.js +3 -3
- package/lib-commonjs/MenuItem/MenuItemTokens.android.d.ts +1 -1
- package/lib-commonjs/MenuItem/MenuItemTokens.android.js +20 -20
- package/lib-commonjs/MenuItem/MenuItemTokens.d.ts +1 -1
- package/lib-commonjs/MenuItem/MenuItemTokens.js +38 -38
- package/lib-commonjs/MenuItem/MenuItemTokens.macos.d.ts +1 -1
- package/lib-commonjs/MenuItem/MenuItemTokens.macos.js +37 -37
- package/lib-commonjs/MenuItem/MenuItemTokens.win32.d.ts +1 -1
- package/lib-commonjs/MenuItem/MenuItemTokens.win32.js +39 -39
- package/lib-commonjs/MenuItem/index.d.ts +1 -1
- package/lib-commonjs/MenuItem/index.js +9 -24
- package/lib-commonjs/MenuItem/useMenuItem.d.ts +1 -1
- package/lib-commonjs/MenuItem/useMenuItem.js +140 -169
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.d.ts +3 -11
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.js +37 -65
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.styling.d.ts +1 -1
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.styling.js +69 -91
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +89 -90
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.types.d.ts.map +1 -1
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckbox.types.js +3 -3
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.android.d.ts +1 -1
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.android.js +38 -38
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.d.ts +1 -1
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.js +47 -47
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.macos.d.ts +1 -1
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.macos.js +45 -45
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.win32.d.ts +1 -1
- package/lib-commonjs/MenuItemCheckbox/MenuItemCheckboxTokens.win32.js +48 -48
- package/lib-commonjs/MenuItemCheckbox/index.d.ts +2 -8
- package/lib-commonjs/MenuItemCheckbox/index.js +10 -30
- package/lib-commonjs/MenuItemCheckbox/useMenuItemCheckbox.d.ts +2 -5
- package/lib-commonjs/MenuItemCheckbox/useMenuItemCheckbox.js +143 -185
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.d.ts +3 -11
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.js +37 -65
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.styling.android.d.ts +1 -1
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.styling.android.js +67 -88
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.styling.d.ts +1 -1
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.styling.js +51 -69
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.types.d.ts +120 -121
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.types.d.ts.map +1 -1
- package/lib-commonjs/MenuItemRadio/MenuItemRadio.types.js +3 -3
- package/lib-commonjs/MenuItemRadio/MenuItemRadioTokens.android.d.ts +1 -1
- package/lib-commonjs/MenuItemRadio/MenuItemRadioTokens.android.js +41 -41
- package/lib-commonjs/MenuItemRadio/MenuItemRadioTokens.d.ts +1 -1
- package/lib-commonjs/MenuItemRadio/MenuItemRadioTokens.js +48 -48
- package/lib-commonjs/MenuItemRadio/MenuItemRadioTokens.macos.d.ts +1 -1
- package/lib-commonjs/MenuItemRadio/MenuItemRadioTokens.macos.js +46 -46
- package/lib-commonjs/MenuItemRadio/index.d.ts +2 -8
- package/lib-commonjs/MenuItemRadio/index.js +9 -24
- package/lib-commonjs/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
- package/lib-commonjs/MenuItemRadio/useMenuItemRadio.js +58 -78
- package/lib-commonjs/MenuList/MenuList.d.ts +2 -7
- package/lib-commonjs/MenuList/MenuList.js +69 -87
- package/lib-commonjs/MenuList/MenuList.styling.d.ts +1 -1
- package/lib-commonjs/MenuList/MenuList.styling.js +28 -34
- package/lib-commonjs/MenuList/MenuList.types.d.ts +72 -72
- package/lib-commonjs/MenuList/MenuList.types.js +3 -3
- package/lib-commonjs/MenuList/MenuListTokens.android.d.ts +1 -1
- package/lib-commonjs/MenuList/MenuListTokens.android.js +7 -7
- package/lib-commonjs/MenuList/MenuListTokens.d.ts +1 -1
- package/lib-commonjs/MenuList/MenuListTokens.js +9 -9
- package/lib-commonjs/MenuList/MenuListTokens.macos.d.ts +1 -1
- package/lib-commonjs/MenuList/MenuListTokens.macos.js +7 -7
- package/lib-commonjs/MenuList/MenuListTokens.win32.d.ts +1 -1
- package/lib-commonjs/MenuList/MenuListTokens.win32.js +12 -12
- package/lib-commonjs/MenuList/index.d.ts +1 -1
- package/lib-commonjs/MenuList/index.js +11 -31
- package/lib-commonjs/MenuList/useMenuList.d.ts +1 -1
- package/lib-commonjs/MenuList/useMenuList.js +151 -170
- package/lib-commonjs/MenuList/useMenuListContextValue.d.ts +1 -1
- package/lib-commonjs/MenuList/useMenuListContextValue.js +4 -4
- package/lib-commonjs/MenuPopover/MenuPopover.d.ts +3 -9
- package/lib-commonjs/MenuPopover/MenuPopover.d.ts.map +1 -1
- package/lib-commonjs/MenuPopover/MenuPopover.js +48 -50
- package/lib-commonjs/MenuPopover/MenuPopover.types.d.ts +14 -14
- package/lib-commonjs/MenuPopover/MenuPopover.types.d.ts.map +1 -1
- package/lib-commonjs/MenuPopover/MenuPopover.types.js +3 -3
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.android.d.ts +3 -7
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.android.d.ts.map +1 -1
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.android.js +9 -12
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.d.ts +3 -7
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.d.ts.map +1 -1
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.js +6 -9
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.macos.d.ts +3 -7
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.macos.d.ts.map +1 -1
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.macos.js +12 -15
- package/lib-commonjs/MenuPopover/MenuPopoverTokens.macos.js.map +1 -1
- package/lib-commonjs/MenuPopover/index.d.ts +1 -1
- package/lib-commonjs/MenuPopover/index.js +9 -24
- package/lib-commonjs/MenuPopover/useMenuPopover.d.ts +2 -2
- package/lib-commonjs/MenuPopover/useMenuPopover.js +87 -106
- package/lib-commonjs/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/MenuTrigger/MenuTrigger.d.ts +3 -3
- package/lib-commonjs/MenuTrigger/MenuTrigger.js +52 -69
- package/lib-commonjs/MenuTrigger/MenuTrigger.types.d.ts +13 -13
- package/lib-commonjs/MenuTrigger/MenuTrigger.types.js +3 -3
- package/lib-commonjs/MenuTrigger/index.d.ts +1 -1
- package/lib-commonjs/MenuTrigger/index.js +9 -24
- package/lib-commonjs/MenuTrigger/useMenuTrigger.d.ts +1 -1
- package/lib-commonjs/MenuTrigger/useMenuTrigger.js +80 -111
- package/lib-commonjs/MenuTrigger/useMergeRefs.d.ts +1 -1
- package/lib-commonjs/MenuTrigger/useMergeRefs.js +46 -65
- package/lib-commonjs/__tests__/Menu.test.d.ts +1 -1
- package/lib-commonjs/__tests__/Menu.test.js +169 -333
- package/lib-commonjs/consts.d.ts +1 -1
- package/lib-commonjs/consts.js +6 -6
- package/lib-commonjs/context/index.d.ts +1 -1
- package/lib-commonjs/context/index.js +16 -70
- package/lib-commonjs/context/menuContext.d.ts +5 -5
- package/lib-commonjs/context/menuContext.js +47 -64
- package/lib-commonjs/context/menuListContext.d.ts +4 -4
- package/lib-commonjs/context/menuListContext.js +44 -61
- package/lib-commonjs/context/menuTriggerContext.d.ts +1 -1
- package/lib-commonjs/context/menuTriggerContext.js +7 -9
- package/lib-commonjs/index.d.ts +4 -26
- package/lib-commonjs/index.js +56 -296
- package/package.json +28 -27
- package/src/MenuCallout/MenuCallout.types.ts +12 -13
- package/src/MenuItemCheckbox/MenuItemCheckbox.types.ts +4 -2
- package/src/MenuItemRadio/MenuItemRadio.types.ts +4 -2
- package/src/MenuPopover/MenuPopover.types.ts +12 -13
- package/src/MenuPopover/MenuPopoverTokens.macos.ts +2 -2
- package/src/MenuPopover/useMenuPopover.ts +1 -1
|
@@ -5,74 +5,56 @@ import { menuItemName } from './MenuItem.types';
|
|
|
5
5
|
import { defaultMenuItemTokens } from './MenuItemTokens';
|
|
6
6
|
export const menuItemStates = ['hovered', 'focused', 'pressed', 'disabled'];
|
|
7
7
|
export const stylingSettings = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
(tokens) => ({
|
|
60
|
-
style: { tintColor: tokens.iconColor, height: tokens.iconSize, width: tokens.iconSize },
|
|
61
|
-
}),
|
|
62
|
-
['gap', 'iconColor', 'iconSize'],
|
|
63
|
-
),
|
|
64
|
-
fontOrSvgIcon: buildProps((tokens) => ({ color: tokens.iconColor, size: tokens.iconSize }), ['gap', 'iconColor', 'iconSize']),
|
|
65
|
-
submenuIndicator: buildProps(
|
|
66
|
-
(tokens) => {
|
|
67
|
-
return {
|
|
68
|
-
color: tokens.submenuIndicatorColor,
|
|
69
|
-
height: tokens.submenuIndicatorSize,
|
|
70
|
-
width: tokens.submenuIndicatorSize,
|
|
71
|
-
viewBox: `0 0 ${tokens.submenuIndicatorSize} ${tokens.submenuIndicatorSize}`,
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
['submenuIndicatorColor', 'submenuIndicatorPadding', 'submenuIndicatorSize'],
|
|
75
|
-
),
|
|
76
|
-
},
|
|
8
|
+
tokens: [defaultMenuItemTokens, menuItemName],
|
|
9
|
+
states: menuItemStates,
|
|
10
|
+
slotProps: {
|
|
11
|
+
root: buildProps((tokens, theme) => ({
|
|
12
|
+
style: {
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
backgroundColor: tokens.backgroundColor,
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
...layoutStyles.from(tokens, theme),
|
|
18
|
+
...borderStyles.from(tokens, theme),
|
|
19
|
+
},
|
|
20
|
+
}), ['backgroundColor', ...borderStyles.keys, ...layoutStyles.keys]),
|
|
21
|
+
checkmark: buildProps((tokens) => ({
|
|
22
|
+
style: {
|
|
23
|
+
height: tokens.checkmarkSize,
|
|
24
|
+
width: tokens.checkmarkSize,
|
|
25
|
+
marginEnd: Platform.OS === 'android' ? tokens.marginEndForCheckedAndroid : tokens.gap,
|
|
26
|
+
},
|
|
27
|
+
}), ['checkmarkSize', 'gap']),
|
|
28
|
+
content: buildProps((tokens, theme) => {
|
|
29
|
+
return {
|
|
30
|
+
color: tokens.color,
|
|
31
|
+
style: {
|
|
32
|
+
flexGrow: 1,
|
|
33
|
+
...fontStyles.from(tokens, theme),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}, ['color', ...fontStyles.keys]),
|
|
37
|
+
iconPlaceholder: buildProps((tokens) => ({
|
|
38
|
+
style: {
|
|
39
|
+
minHeight: tokens.iconSize,
|
|
40
|
+
minWidth: tokens.iconSize,
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
justifyContent: 'center',
|
|
43
|
+
marginEnd: tokens.gap,
|
|
44
|
+
},
|
|
45
|
+
}), ['checkmarkSize', 'gap']),
|
|
46
|
+
imgIcon: buildProps((tokens) => ({
|
|
47
|
+
style: { tintColor: tokens.iconColor, height: tokens.iconSize, width: tokens.iconSize },
|
|
48
|
+
}), ['gap', 'iconColor', 'iconSize']),
|
|
49
|
+
fontOrSvgIcon: buildProps((tokens) => ({ color: tokens.iconColor, size: tokens.iconSize }), ['gap', 'iconColor', 'iconSize']),
|
|
50
|
+
submenuIndicator: buildProps((tokens) => {
|
|
51
|
+
return {
|
|
52
|
+
color: tokens.submenuIndicatorColor,
|
|
53
|
+
height: tokens.submenuIndicatorSize,
|
|
54
|
+
width: tokens.submenuIndicatorSize,
|
|
55
|
+
viewBox: `0 0 ${tokens.submenuIndicatorSize} ${tokens.submenuIndicatorSize}`,
|
|
56
|
+
};
|
|
57
|
+
}, ['submenuIndicatorColor', 'submenuIndicatorPadding', 'submenuIndicatorSize']),
|
|
58
|
+
},
|
|
77
59
|
};
|
|
78
|
-
//# sourceMappingURL=MenuItem.styling.js.map
|
|
60
|
+
//# sourceMappingURL=MenuItem.styling.js.map
|
|
@@ -6,98 +6,98 @@ import type { IFocusable, InteractionEvent, PressablePropsExtended, PressableSta
|
|
|
6
6
|
import type { TextProps } from '@fluentui-react-native/text';
|
|
7
7
|
import type { FontTokens, IBorderTokens, IColorTokens, LayoutTokens } from '@fluentui-react-native/tokens';
|
|
8
8
|
import type { XmlProps } from 'react-native-svg';
|
|
9
|
-
export declare const menuItemName =
|
|
9
|
+
export declare const menuItemName = "MenuItem";
|
|
10
10
|
export interface MenuItemTokens extends LayoutTokens, FontTokens, IBorderTokens, IColorTokens {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Height and width in pixels of the space that is reserved to align the item's text with other items which have checkmarks
|
|
13
|
+
*/
|
|
14
|
+
checkmarkSize?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Space between parts of the item control in pixels
|
|
17
|
+
*/
|
|
18
|
+
gap?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Color of the icon
|
|
21
|
+
*/
|
|
22
|
+
iconColor?: ColorValue;
|
|
23
|
+
/**
|
|
24
|
+
* Size of the icon. Pixels for SVG and points for font icon.
|
|
25
|
+
*/
|
|
26
|
+
iconSize?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Amount of space in pixels at the end of the item control that is reserved to align the item's text with other items which have checkmarks
|
|
29
|
+
* @platform android
|
|
30
|
+
*/
|
|
31
|
+
marginEndForCheckedAndroid?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Color of the indicator that shows that an item has a submenu
|
|
34
|
+
*/
|
|
35
|
+
submenuIndicatorColor?: ColorValue;
|
|
36
|
+
/**
|
|
37
|
+
* Amount of space in pixels around the indicator that shows that an item has a submenu
|
|
38
|
+
*/
|
|
39
|
+
submenuIndicatorPadding?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Height and width in pixels of the indicator that shows that an item has a submenu
|
|
42
|
+
*/
|
|
43
|
+
submenuIndicatorSize?: number;
|
|
44
|
+
/**
|
|
45
|
+
* States of the item control
|
|
46
|
+
*/
|
|
47
|
+
disabled?: MenuItemTokens;
|
|
48
|
+
focused?: MenuItemTokens;
|
|
49
|
+
hovered?: MenuItemTokens;
|
|
50
|
+
pressed?: MenuItemTokens;
|
|
51
51
|
}
|
|
52
52
|
export interface MenuItemProps extends Omit<PressablePropsExtended, 'onPress'> {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
/**
|
|
54
|
+
* A RefObject to access the IButton interface. Use this to access the public methods and properties of the component.
|
|
55
|
+
*/
|
|
56
|
+
componentRef?: React.RefObject<IFocusable>;
|
|
57
|
+
icon?: IconProps | ImageProps;
|
|
58
|
+
/**
|
|
59
|
+
* A callback to call on button click event
|
|
60
|
+
*/
|
|
61
|
+
onClick?: (e: InteractionEvent) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Do not dismiss the menu when a menu item is clicked
|
|
64
|
+
*/
|
|
65
|
+
persistOnClick?: boolean;
|
|
66
66
|
}
|
|
67
67
|
export interface MenuItemState extends PressableState {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Whether Menu has other items that are checkbox or radio.
|
|
70
|
+
*/
|
|
71
|
+
hasCheckmarks?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Whether Menu has items with icons.
|
|
74
|
+
*/
|
|
75
|
+
hasIcons?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* If the menu item is a trigger for a submenu
|
|
78
|
+
*/
|
|
79
|
+
hasSubmenu?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* States that menu items all have tooltips with its text by default.
|
|
82
|
+
*/
|
|
83
|
+
hasTooltips?: boolean;
|
|
84
84
|
}
|
|
85
85
|
export interface MenuItemInfo {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
props: MenuItemProps & React.ComponentPropsWithRef<any>;
|
|
87
|
+
state: MenuItemState;
|
|
88
88
|
}
|
|
89
89
|
export interface MenuItemSlotProps {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
root: React.PropsWithRef<PressablePropsExtended>;
|
|
91
|
+
content?: TextProps;
|
|
92
|
+
checkmark?: React.PropsWithRef<IViewProps>;
|
|
93
|
+
iconPlaceholder?: React.PropsWithRef<IViewProps>;
|
|
94
|
+
imgIcon?: ImageProps;
|
|
95
|
+
fontOrSvgIcon?: IconProps;
|
|
96
|
+
submenuIndicator?: XmlProps;
|
|
97
97
|
}
|
|
98
98
|
export interface MenuItemType {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
props: MenuItemProps;
|
|
100
|
+
tokens: MenuItemTokens;
|
|
101
|
+
slotProps: MenuItemSlotProps;
|
|
102
102
|
}
|
|
103
|
-
//# sourceMappingURL=MenuItem.types.d.ts.map
|
|
103
|
+
//# sourceMappingURL=MenuItem.types.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const menuItemName = 'MenuItem';
|
|
2
|
-
//# sourceMappingURL=MenuItem.types.js.map
|
|
2
|
+
//# sourceMappingURL=MenuItem.types.js.map
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { MenuItemTokens } from './MenuItem.types';
|
|
4
4
|
export declare const defaultMenuItemTokens: TokenSettings<MenuItemTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=MenuItemTokens.android.d.ts.map
|
|
5
|
+
//# sourceMappingURL=MenuItemTokens.android.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
2
|
export const defaultMenuItemTokens = (t) => ({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
color: t.colors.neutralForeground1,
|
|
4
|
+
variant: 'body1',
|
|
5
|
+
paddingHorizontal: globalTokens.size160,
|
|
6
|
+
paddingVertical: globalTokens.size60,
|
|
7
|
+
iconColor: t.colors.neutralForeground3,
|
|
8
|
+
iconSize: globalTokens.size240,
|
|
9
|
+
marginEndForCheckedAndroid: globalTokens.size360,
|
|
10
|
+
pressed: {
|
|
11
|
+
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
12
|
+
},
|
|
13
|
+
disabled: {
|
|
14
|
+
backgroundColor: t.colors.neutralBackground1,
|
|
15
|
+
color: t.colors.neutralForegroundDisabled1,
|
|
16
|
+
iconColor: t.colors.disabledText,
|
|
17
|
+
},
|
|
18
|
+
gap: globalTokens.size160,
|
|
19
19
|
});
|
|
20
|
-
//# sourceMappingURL=MenuItemTokens.android.js.map
|
|
20
|
+
//# sourceMappingURL=MenuItemTokens.android.js.map
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { MenuItemTokens } from './MenuItem.types';
|
|
4
4
|
export declare const defaultMenuItemTokens: TokenSettings<MenuItemTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=MenuItemTokens.d.ts.map
|
|
5
|
+
//# sourceMappingURL=MenuItemTokens.d.ts.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
2
|
export const defaultMenuItemTokens = (t) => ({
|
|
3
|
-
backgroundColor: t.colors.neutralBackground1,
|
|
4
|
-
borderRadius: globalTokens.corner.radius40,
|
|
5
|
-
checkmarkSize: 16,
|
|
6
|
-
color: t.colors.neutralForeground2,
|
|
7
|
-
fontFamily: t.typography.families.primary,
|
|
8
|
-
fontSize: globalTokens.font.size300,
|
|
9
|
-
fontWeight: globalTokens.font.weight.regular,
|
|
10
|
-
gap: globalTokens.size40,
|
|
11
|
-
iconColor: t.colors.neutralForeground2,
|
|
12
|
-
iconSize: 16,
|
|
13
|
-
minHeight: 32,
|
|
14
|
-
minWidth: 128,
|
|
15
|
-
maxWidth: 300,
|
|
16
|
-
padding: globalTokens.size60,
|
|
17
|
-
submenuIndicatorColor: t.colors.neutralForeground2,
|
|
18
|
-
submenuIndicatorPadding: globalTokens.sizeNone,
|
|
19
|
-
submenuIndicatorSize: 16,
|
|
20
|
-
hovered: {
|
|
21
|
-
backgroundColor: t.colors.neutralBackground1Hover,
|
|
22
|
-
color: t.colors.neutralForeground2Hover,
|
|
23
|
-
iconColor: t.colors.neutralForeground2Hover,
|
|
24
|
-
submenuIndicatorColor: t.colors.neutralForeground2Hover,
|
|
25
|
-
},
|
|
26
|
-
pressed: {
|
|
27
|
-
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
28
|
-
color: t.colors.neutralForeground2Pressed,
|
|
29
|
-
iconColor: t.colors.neutralForeground2Pressed,
|
|
30
|
-
submenuIndicatorColor: t.colors.neutralForeground2Pressed,
|
|
31
|
-
},
|
|
32
|
-
disabled: {
|
|
33
3
|
backgroundColor: t.colors.neutralBackground1,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
4
|
+
borderRadius: globalTokens.corner.radius40,
|
|
5
|
+
checkmarkSize: 16,
|
|
6
|
+
color: t.colors.neutralForeground2,
|
|
7
|
+
fontFamily: t.typography.families.primary,
|
|
8
|
+
fontSize: globalTokens.font.size300,
|
|
9
|
+
fontWeight: globalTokens.font.weight.regular,
|
|
10
|
+
gap: globalTokens.size40,
|
|
11
|
+
iconColor: t.colors.neutralForeground2,
|
|
12
|
+
iconSize: 16,
|
|
13
|
+
minHeight: 32,
|
|
14
|
+
minWidth: 128,
|
|
15
|
+
maxWidth: 300,
|
|
16
|
+
padding: globalTokens.size60,
|
|
17
|
+
submenuIndicatorColor: t.colors.neutralForeground2,
|
|
18
|
+
submenuIndicatorPadding: globalTokens.sizeNone,
|
|
19
|
+
submenuIndicatorSize: 16,
|
|
20
|
+
hovered: {
|
|
21
|
+
backgroundColor: t.colors.neutralBackground1Hover,
|
|
22
|
+
color: t.colors.neutralForeground2Hover,
|
|
23
|
+
iconColor: t.colors.neutralForeground2Hover,
|
|
24
|
+
submenuIndicatorColor: t.colors.neutralForeground2Hover,
|
|
25
|
+
},
|
|
26
|
+
pressed: {
|
|
27
|
+
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
28
|
+
color: t.colors.neutralForeground2Pressed,
|
|
29
|
+
iconColor: t.colors.neutralForeground2Pressed,
|
|
30
|
+
submenuIndicatorColor: t.colors.neutralForeground2Pressed,
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
backgroundColor: t.colors.neutralBackground1,
|
|
34
|
+
color: t.colors.neutralForegroundDisabled,
|
|
35
|
+
iconColor: t.colors.neutralForegroundDisabled,
|
|
36
|
+
submenuIndicatorColor: t.colors.neutralForegroundDisabled,
|
|
37
|
+
},
|
|
38
38
|
});
|
|
39
|
-
//# sourceMappingURL=MenuItemTokens.js.map
|
|
39
|
+
//# sourceMappingURL=MenuItemTokens.js.map
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { MenuItemTokens } from './MenuItem.types';
|
|
4
4
|
export declare const defaultMenuItemTokens: TokenSettings<MenuItemTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=MenuItemTokens.macos.d.ts.map
|
|
5
|
+
//# sourceMappingURL=MenuItemTokens.macos.d.ts.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
2
|
export const defaultMenuItemTokens = (t) => ({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
backgroundColor: t.colors.transparentBackground,
|
|
4
|
+
borderRadius: 5, // hardcoded for now to match NSMenu
|
|
5
|
+
checkmarkSize: 16,
|
|
6
|
+
color: t.colors.neutralForeground1,
|
|
7
|
+
fontFamily: t.typography.families.primary,
|
|
8
|
+
fontSize: 13, // aligning with NSMenu font size
|
|
9
|
+
fontWeight: globalTokens.font.weight.regular,
|
|
10
|
+
gap: globalTokens.size40,
|
|
11
|
+
iconColor: t.colors.neutralForeground1,
|
|
12
|
+
iconSize: 16,
|
|
13
|
+
paddingHorizontal: 5, // hardcoded for now to match NSMenu
|
|
14
|
+
paddingVertical: 3, // hardcoded for now to match NSMenu
|
|
15
|
+
submenuIndicatorColor: t.colors.neutralForeground1,
|
|
16
|
+
submenuIndicatorPadding: globalTokens.sizeNone,
|
|
17
|
+
submenuIndicatorSize: 16,
|
|
18
|
+
focused: {
|
|
19
|
+
backgroundColor: t.colors.menuItemBackgroundHovered,
|
|
20
|
+
color: t.colors.menuItemTextHovered,
|
|
21
|
+
iconColor: t.colors.menuItemTextHovered,
|
|
22
|
+
submenuIndicatorColor: t.colors.menuItemTextHovered,
|
|
23
|
+
},
|
|
24
|
+
pressed: {
|
|
25
|
+
backgroundColor: t.colors.menuItemBackgroundPressed,
|
|
26
|
+
color: t.colors.menuItemTextHovered,
|
|
27
|
+
iconColor: t.colors.menuItemTextHovered,
|
|
28
|
+
submenuIndicatorColor: t.colors.menuItemTextHovered,
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
backgroundColor: t.colors.menuBackground,
|
|
32
|
+
color: t.colors.disabledText,
|
|
33
|
+
iconColor: t.colors.disabledText,
|
|
34
|
+
submenuIndicatorColor: t.colors.disabledText,
|
|
35
|
+
},
|
|
36
36
|
});
|
|
37
|
-
//# sourceMappingURL=MenuItemTokens.macos.js.map
|
|
37
|
+
//# sourceMappingURL=MenuItemTokens.macos.js.map
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { MenuItemTokens } from './MenuItem.types';
|
|
4
4
|
export declare const defaultMenuItemTokens: TokenSettings<MenuItemTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=MenuItemTokens.win32.d.ts.map
|
|
5
|
+
//# sourceMappingURL=MenuItemTokens.win32.d.ts.map
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
2
|
export const defaultMenuItemTokens = (t) => ({
|
|
3
|
-
backgroundColor: t.colors.neutralBackground1,
|
|
4
|
-
borderRadius: globalTokens.corner.radiusNone,
|
|
5
|
-
checkmarkSize: 16,
|
|
6
|
-
color: t.colors.neutralForeground1,
|
|
7
|
-
fontFamily: t.typography.families.primary,
|
|
8
|
-
fontSize: globalTokens.font.size200,
|
|
9
|
-
fontWeight: globalTokens.font.weight.regular,
|
|
10
|
-
gap: globalTokens.size40,
|
|
11
|
-
iconColor: t.colors.neutralForeground1,
|
|
12
|
-
iconSize: 16,
|
|
13
|
-
minHeight: 24,
|
|
14
|
-
minWidth: 128,
|
|
15
|
-
maxWidth: 300,
|
|
16
|
-
padding: globalTokens.size40,
|
|
17
|
-
paddingHorizontal: globalTokens.size80,
|
|
18
|
-
submenuIndicatorColor: t.colors.neutralForeground1,
|
|
19
|
-
submenuIndicatorPadding: globalTokens.size20,
|
|
20
|
-
submenuIndicatorSize: 16,
|
|
21
|
-
pressed: {
|
|
22
|
-
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
23
|
-
color: t.colors.neutralForeground1Pressed,
|
|
24
|
-
iconColor: t.colors.neutralForeground1Pressed,
|
|
25
|
-
submenuIndicatorColor: t.colors.neutralForeground1Pressed,
|
|
26
|
-
},
|
|
27
|
-
disabled: {
|
|
28
3
|
backgroundColor: t.colors.neutralBackground1,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
iconColor: t.colors.
|
|
37
|
-
|
|
38
|
-
|
|
4
|
+
borderRadius: globalTokens.corner.radiusNone,
|
|
5
|
+
checkmarkSize: 16,
|
|
6
|
+
color: t.colors.neutralForeground1,
|
|
7
|
+
fontFamily: t.typography.families.primary,
|
|
8
|
+
fontSize: globalTokens.font.size200,
|
|
9
|
+
fontWeight: globalTokens.font.weight.regular,
|
|
10
|
+
gap: globalTokens.size40,
|
|
11
|
+
iconColor: t.colors.neutralForeground1,
|
|
12
|
+
iconSize: 16,
|
|
13
|
+
minHeight: 24,
|
|
14
|
+
minWidth: 128,
|
|
15
|
+
maxWidth: 300,
|
|
16
|
+
padding: globalTokens.size40,
|
|
17
|
+
paddingHorizontal: globalTokens.size80,
|
|
18
|
+
submenuIndicatorColor: t.colors.neutralForeground1,
|
|
19
|
+
submenuIndicatorPadding: globalTokens.size20,
|
|
20
|
+
submenuIndicatorSize: 16,
|
|
21
|
+
pressed: {
|
|
22
|
+
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
23
|
+
color: t.colors.neutralForeground1Pressed,
|
|
24
|
+
iconColor: t.colors.neutralForeground1Pressed,
|
|
25
|
+
submenuIndicatorColor: t.colors.neutralForeground1Pressed,
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
backgroundColor: t.colors.neutralBackground1,
|
|
29
|
+
color: t.colors.neutralForegroundDisabled,
|
|
30
|
+
iconColor: t.colors.neutralForegroundDisabled,
|
|
31
|
+
submenuIndicatorColor: t.colors.neutralForegroundDisabled,
|
|
32
|
+
},
|
|
33
|
+
focused: {
|
|
34
|
+
backgroundColor: t.colors.neutralBackground1Hover,
|
|
35
|
+
color: t.colors.neutralForeground1Hover,
|
|
36
|
+
iconColor: t.colors.neutralForeground1Hover,
|
|
37
|
+
submenuIndicatorColor: t.colors.neutralForeground1Hover,
|
|
38
|
+
},
|
|
39
39
|
});
|
|
40
|
-
//# sourceMappingURL=MenuItemTokens.win32.js.map
|
|
40
|
+
//# sourceMappingURL=MenuItemTokens.win32.js.map
|
package/lib/MenuItem/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { MenuItem } from './MenuItem';
|
|
|
2
2
|
export { menuItemName } from './MenuItem.types';
|
|
3
3
|
export type { MenuItemProps, MenuItemState, MenuItemInfo, MenuItemTokens, MenuItemSlotProps, MenuItemType } from './MenuItem.types';
|
|
4
4
|
export { useMenuItem } from './useMenuItem';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/MenuItem/index.js
CHANGED
|
@@ -4,4 +4,4 @@ export declare const triggerKeys: string[];
|
|
|
4
4
|
export declare const submenuTriggerKeys: string[];
|
|
5
5
|
export declare const useMenuItem: (props: MenuItemProps) => MenuItemInfo;
|
|
6
6
|
export declare const useHoverFocusEffect: (hovered: boolean, componentRef: React.MutableRefObject<any>) => void;
|
|
7
|
-
//# sourceMappingURL=useMenuItem.d.ts.map
|
|
7
|
+
//# sourceMappingURL=useMenuItem.d.ts.map
|