@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
|
@@ -1,88 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTooltip = exports.getAccessibilityLabel = exports.MenuItem = void 0;
|
|
4
|
-
const jsx_runtime_1 = require(
|
|
5
|
-
const react_native_1 = require(
|
|
6
|
-
const framework_1 = require(
|
|
7
|
-
const icon_1 = require(
|
|
8
|
-
const text_1 = require(
|
|
9
|
-
const react_native_svg_1 = require(
|
|
10
|
-
const MenuItem_styling_1 = require(
|
|
11
|
-
const MenuItem_types_1 = require(
|
|
12
|
-
const useMenuItem_1 = require(
|
|
4
|
+
const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const framework_1 = require("@fluentui-react-native/framework");
|
|
7
|
+
const icon_1 = require("@fluentui-react-native/icon");
|
|
8
|
+
const text_1 = require("@fluentui-react-native/text");
|
|
9
|
+
const react_native_svg_1 = require("react-native-svg");
|
|
10
|
+
const MenuItem_styling_1 = require("./MenuItem.styling");
|
|
11
|
+
const MenuItem_types_1 = require("./MenuItem.types");
|
|
12
|
+
const useMenuItem_1 = require("./useMenuItem");
|
|
13
13
|
exports.MenuItem = (0, framework_1.compose)({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
displayName: MenuItem_types_1.menuItemName,
|
|
15
|
+
...MenuItem_styling_1.stylingSettings,
|
|
16
|
+
slots: {
|
|
17
|
+
root: react_native_1.Pressable,
|
|
18
|
+
checkmark: react_native_1.View,
|
|
19
|
+
content: text_1.TextV1,
|
|
20
|
+
iconPlaceholder: react_native_1.View,
|
|
21
|
+
imgIcon: react_native_1.Image,
|
|
22
|
+
fontOrSvgIcon: icon_1.IconV1,
|
|
23
|
+
submenuIndicator: react_native_svg_1.SvgXml,
|
|
24
|
+
},
|
|
25
|
+
useRender: (userProps, useSlots) => {
|
|
26
|
+
const menuItem = (0, useMenuItem_1.useMenuItem)(userProps);
|
|
27
|
+
const Slots = useSlots(userProps, (layer) => menuItem.state[layer] || userProps[layer]);
|
|
28
|
+
return (final, children) => {
|
|
29
|
+
const { accessibilityLabel, icon, tooltip, ...mergedProps } = (0, framework_1.mergeProps)(menuItem.props, final);
|
|
30
|
+
const chevronXml = react_native_1.I18nManager.isRTL
|
|
31
|
+
? `
|
|
32
32
|
<svg>
|
|
33
33
|
<path fill='currentColor' d="M10.2603 3.20041C10.5639 3.48226 10.5814 3.95681 10.2996 4.26034L6.77348 8L10.2996 11.7397C10.5814 12.0432 10.5639 12.5177 10.2603 12.7996C9.9568 13.0815 9.48226 13.0639 9.2004 12.7603L5.2004 8.51034C4.9332 8.22258 4.9332 7.77743 5.2004 7.48966L9.20041 3.23966C9.48226 2.93613 9.95681 2.91856 10.2603 3.20041Z"/>
|
|
34
34
|
</svg>`
|
|
35
|
-
|
|
35
|
+
: `
|
|
36
36
|
<svg>
|
|
37
37
|
<path fill='currentColor' d="M5.73966 3.20041C5.43613 3.48226 5.41856 3.95681 5.70041 4.26034L9.22652 8L5.70041 11.7397C5.41856 12.0432 5.43613 12.5177 5.73967 12.7996C6.0432 13.0815 6.51775 13.0639 6.7996 12.7603L10.7996 8.51034C11.0668 8.22258 11.0668 7.77743 10.7996 7.48966L6.7996 3.23966C6.51775 2.93613 6.0432 2.91856 5.73966 3.20041Z"/>
|
|
38
38
|
</svg>`;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: [
|
|
46
|
-
menuItem.state.hasCheckmarks && jsx_runtime_1.jsx(Slots.checkmark, { accessible: false }),
|
|
47
|
-
(icon || menuItem.state.hasIcons) &&
|
|
48
|
-
jsx_runtime_1.jsxs(Slots.iconPlaceholder, {
|
|
49
|
-
accessible: false,
|
|
50
|
-
children: [
|
|
51
|
-
icon && icon.source && jsx_runtime_1.jsx(Slots.imgIcon, { accessible: false, ...icon }),
|
|
52
|
-
icon && (icon.svgSource || icon.fontSource) && jsx_runtime_1.jsx(Slots.fontOrSvgIcon, { accessible: false, ...icon }),
|
|
53
|
-
],
|
|
54
|
-
}),
|
|
55
|
-
children &&
|
|
56
|
-
jsx_runtime_1.jsx(Slots.content, {
|
|
57
|
-
accessible: false,
|
|
58
|
-
tooltip: tooltipResult,
|
|
59
|
-
...(tooltipResult && { alwaysShowToolTip: true }),
|
|
60
|
-
children: children,
|
|
61
|
-
}),
|
|
62
|
-
menuItem.state.hasSubmenu && jsx_runtime_1.jsx(Slots.submenuIndicator, { accessible: false, xml: chevronXml }),
|
|
63
|
-
],
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
},
|
|
39
|
+
// We only automatically support the one child string.
|
|
40
|
+
const label = (0, exports.getAccessibilityLabel)(accessibilityLabel, children[0]);
|
|
41
|
+
const tooltipResult = (0, exports.getTooltip)(tooltip, menuItem.state.hasTooltips, children[0]);
|
|
42
|
+
return (jsx_runtime_1.jsxs(Slots.root, { ...mergedProps, accessibilityLabel: label, children: [menuItem.state.hasCheckmarks && jsx_runtime_1.jsx(Slots.checkmark, { accessible: false }), (icon || menuItem.state.hasIcons) && (jsx_runtime_1.jsxs(Slots.iconPlaceholder, { accessible: false, children: [icon && icon.source && jsx_runtime_1.jsx(Slots.imgIcon, { accessible: false, ...icon }), icon && (icon.svgSource || icon.fontSource) && jsx_runtime_1.jsx(Slots.fontOrSvgIcon, { accessible: false, ...icon })] })), children && (jsx_runtime_1.jsx(Slots.content, { accessible: false, tooltip: tooltipResult, ...(tooltipResult && { alwaysShowToolTip: true }), children: children })), menuItem.state.hasSubmenu && jsx_runtime_1.jsx(Slots.submenuIndicator, { accessible: false, xml: chevronXml })] }));
|
|
43
|
+
};
|
|
44
|
+
},
|
|
67
45
|
});
|
|
68
46
|
const getAccessibilityLabelWorker = (accessibilityLabel, child) => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
47
|
+
if (accessibilityLabel !== undefined) {
|
|
48
|
+
return accessibilityLabel;
|
|
49
|
+
}
|
|
50
|
+
if (typeof child === 'string') {
|
|
51
|
+
return child;
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
76
54
|
};
|
|
77
55
|
exports.getAccessibilityLabel = (0, framework_1.memoize)(getAccessibilityLabelWorker);
|
|
78
56
|
const getTooltipWorker = (tooltip, hasTooltips, child) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
57
|
+
if (tooltip !== undefined) {
|
|
58
|
+
return tooltip;
|
|
59
|
+
}
|
|
60
|
+
if (hasTooltips && typeof child === 'string') {
|
|
61
|
+
return child;
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
86
64
|
};
|
|
87
65
|
exports.getTooltip = (0, framework_1.memoize)(getTooltipWorker);
|
|
88
|
-
//# sourceMappingURL=MenuItem.js.map
|
|
66
|
+
//# sourceMappingURL=MenuItem.js.map
|
|
@@ -2,4 +2,4 @@ import type { UseStylingOptions } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { MenuItemProps, MenuItemTokens, MenuItemSlotProps } from './MenuItem.types';
|
|
3
3
|
export declare const menuItemStates: (keyof MenuItemTokens)[];
|
|
4
4
|
export declare const stylingSettings: UseStylingOptions<MenuItemProps, MenuItemSlotProps, MenuItemTokens>;
|
|
5
|
-
//# sourceMappingURL=MenuItem.styling.d.ts.map
|
|
5
|
+
//# sourceMappingURL=MenuItem.styling.d.ts.map
|
|
@@ -1,84 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stylingSettings = exports.menuItemStates = void 0;
|
|
4
|
-
const react_native_1 = require(
|
|
5
|
-
const framework_1 = require(
|
|
6
|
-
const tokens_1 = require(
|
|
7
|
-
const MenuItem_types_1 = require(
|
|
8
|
-
const MenuItemTokens_1 = require(
|
|
4
|
+
const react_native_1 = require("react-native");
|
|
5
|
+
const framework_1 = require("@fluentui-react-native/framework");
|
|
6
|
+
const tokens_1 = require("@fluentui-react-native/tokens");
|
|
7
|
+
const MenuItem_types_1 = require("./MenuItem.types");
|
|
8
|
+
const MenuItemTokens_1 = require("./MenuItemTokens");
|
|
9
9
|
exports.menuItemStates = ['hovered', 'focused', 'pressed', 'disabled'];
|
|
10
10
|
exports.stylingSettings = {
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
(tokens) => ({
|
|
63
|
-
style: { tintColor: tokens.iconColor, height: tokens.iconSize, width: tokens.iconSize },
|
|
64
|
-
}),
|
|
65
|
-
['gap', 'iconColor', 'iconSize'],
|
|
66
|
-
),
|
|
67
|
-
fontOrSvgIcon: (0, framework_1.buildProps)(
|
|
68
|
-
(tokens) => ({ color: tokens.iconColor, size: tokens.iconSize }),
|
|
69
|
-
['gap', 'iconColor', 'iconSize'],
|
|
70
|
-
),
|
|
71
|
-
submenuIndicator: (0, framework_1.buildProps)(
|
|
72
|
-
(tokens) => {
|
|
73
|
-
return {
|
|
74
|
-
color: tokens.submenuIndicatorColor,
|
|
75
|
-
height: tokens.submenuIndicatorSize,
|
|
76
|
-
width: tokens.submenuIndicatorSize,
|
|
77
|
-
viewBox: `0 0 ${tokens.submenuIndicatorSize} ${tokens.submenuIndicatorSize}`,
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
['submenuIndicatorColor', 'submenuIndicatorPadding', 'submenuIndicatorSize'],
|
|
81
|
-
),
|
|
82
|
-
},
|
|
11
|
+
tokens: [MenuItemTokens_1.defaultMenuItemTokens, MenuItem_types_1.menuItemName],
|
|
12
|
+
states: exports.menuItemStates,
|
|
13
|
+
slotProps: {
|
|
14
|
+
root: (0, framework_1.buildProps)((tokens, theme) => ({
|
|
15
|
+
style: {
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
backgroundColor: tokens.backgroundColor,
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexDirection: 'row',
|
|
20
|
+
...tokens_1.layoutStyles.from(tokens, theme),
|
|
21
|
+
...tokens_1.borderStyles.from(tokens, theme),
|
|
22
|
+
},
|
|
23
|
+
}), ['backgroundColor', ...tokens_1.borderStyles.keys, ...tokens_1.layoutStyles.keys]),
|
|
24
|
+
checkmark: (0, framework_1.buildProps)((tokens) => ({
|
|
25
|
+
style: {
|
|
26
|
+
height: tokens.checkmarkSize,
|
|
27
|
+
width: tokens.checkmarkSize,
|
|
28
|
+
marginEnd: react_native_1.Platform.OS === 'android' ? tokens.marginEndForCheckedAndroid : tokens.gap,
|
|
29
|
+
},
|
|
30
|
+
}), ['checkmarkSize', 'gap']),
|
|
31
|
+
content: (0, framework_1.buildProps)((tokens, theme) => {
|
|
32
|
+
return {
|
|
33
|
+
color: tokens.color,
|
|
34
|
+
style: {
|
|
35
|
+
flexGrow: 1,
|
|
36
|
+
...tokens_1.fontStyles.from(tokens, theme),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}, ['color', ...tokens_1.fontStyles.keys]),
|
|
40
|
+
iconPlaceholder: (0, framework_1.buildProps)((tokens) => ({
|
|
41
|
+
style: {
|
|
42
|
+
minHeight: tokens.iconSize,
|
|
43
|
+
minWidth: tokens.iconSize,
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
marginEnd: tokens.gap,
|
|
47
|
+
},
|
|
48
|
+
}), ['checkmarkSize', 'gap']),
|
|
49
|
+
imgIcon: (0, framework_1.buildProps)((tokens) => ({
|
|
50
|
+
style: { tintColor: tokens.iconColor, height: tokens.iconSize, width: tokens.iconSize },
|
|
51
|
+
}), ['gap', 'iconColor', 'iconSize']),
|
|
52
|
+
fontOrSvgIcon: (0, framework_1.buildProps)((tokens) => ({ color: tokens.iconColor, size: tokens.iconSize }), ['gap', 'iconColor', 'iconSize']),
|
|
53
|
+
submenuIndicator: (0, framework_1.buildProps)((tokens) => {
|
|
54
|
+
return {
|
|
55
|
+
color: tokens.submenuIndicatorColor,
|
|
56
|
+
height: tokens.submenuIndicatorSize,
|
|
57
|
+
width: tokens.submenuIndicatorSize,
|
|
58
|
+
viewBox: `0 0 ${tokens.submenuIndicatorSize} ${tokens.submenuIndicatorSize}`,
|
|
59
|
+
};
|
|
60
|
+
}, ['submenuIndicatorColor', 'submenuIndicatorPadding', 'submenuIndicatorSize']),
|
|
61
|
+
},
|
|
83
62
|
};
|
|
84
|
-
//# sourceMappingURL=MenuItem.styling.js.map
|
|
63
|
+
//# 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,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.menuItemName = void 0;
|
|
4
4
|
exports.menuItemName = 'MenuItem';
|
|
5
|
-
//# sourceMappingURL=MenuItem.types.js.map
|
|
5
|
+
//# 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,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultMenuItemTokens = void 0;
|
|
4
|
-
const theme_tokens_1 = require(
|
|
4
|
+
const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
|
|
5
5
|
const defaultMenuItemTokens = (t) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
color: t.colors.neutralForeground1,
|
|
7
|
+
variant: 'body1',
|
|
8
|
+
paddingHorizontal: theme_tokens_1.globalTokens.size160,
|
|
9
|
+
paddingVertical: theme_tokens_1.globalTokens.size60,
|
|
10
|
+
iconColor: t.colors.neutralForeground3,
|
|
11
|
+
iconSize: theme_tokens_1.globalTokens.size240,
|
|
12
|
+
marginEndForCheckedAndroid: theme_tokens_1.globalTokens.size360,
|
|
13
|
+
pressed: {
|
|
14
|
+
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
backgroundColor: t.colors.neutralBackground1,
|
|
18
|
+
color: t.colors.neutralForegroundDisabled1,
|
|
19
|
+
iconColor: t.colors.disabledText,
|
|
20
|
+
},
|
|
21
|
+
gap: theme_tokens_1.globalTokens.size160,
|
|
22
22
|
});
|
|
23
23
|
exports.defaultMenuItemTokens = defaultMenuItemTokens;
|
|
24
|
-
//# sourceMappingURL=MenuItemTokens.android.js.map
|
|
24
|
+
//# 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,43 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultMenuItemTokens = void 0;
|
|
4
|
-
const theme_tokens_1 = require(
|
|
4
|
+
const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
|
|
5
5
|
const defaultMenuItemTokens = (t) => ({
|
|
6
|
-
backgroundColor: t.colors.neutralBackground1,
|
|
7
|
-
borderRadius: theme_tokens_1.globalTokens.corner.radius40,
|
|
8
|
-
checkmarkSize: 16,
|
|
9
|
-
color: t.colors.neutralForeground2,
|
|
10
|
-
fontFamily: t.typography.families.primary,
|
|
11
|
-
fontSize: theme_tokens_1.globalTokens.font.size300,
|
|
12
|
-
fontWeight: theme_tokens_1.globalTokens.font.weight.regular,
|
|
13
|
-
gap: theme_tokens_1.globalTokens.size40,
|
|
14
|
-
iconColor: t.colors.neutralForeground2,
|
|
15
|
-
iconSize: 16,
|
|
16
|
-
minHeight: 32,
|
|
17
|
-
minWidth: 128,
|
|
18
|
-
maxWidth: 300,
|
|
19
|
-
padding: theme_tokens_1.globalTokens.size60,
|
|
20
|
-
submenuIndicatorColor: t.colors.neutralForeground2,
|
|
21
|
-
submenuIndicatorPadding: theme_tokens_1.globalTokens.sizeNone,
|
|
22
|
-
submenuIndicatorSize: 16,
|
|
23
|
-
hovered: {
|
|
24
|
-
backgroundColor: t.colors.neutralBackground1Hover,
|
|
25
|
-
color: t.colors.neutralForeground2Hover,
|
|
26
|
-
iconColor: t.colors.neutralForeground2Hover,
|
|
27
|
-
submenuIndicatorColor: t.colors.neutralForeground2Hover,
|
|
28
|
-
},
|
|
29
|
-
pressed: {
|
|
30
|
-
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
31
|
-
color: t.colors.neutralForeground2Pressed,
|
|
32
|
-
iconColor: t.colors.neutralForeground2Pressed,
|
|
33
|
-
submenuIndicatorColor: t.colors.neutralForeground2Pressed,
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
6
|
backgroundColor: t.colors.neutralBackground1,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
7
|
+
borderRadius: theme_tokens_1.globalTokens.corner.radius40,
|
|
8
|
+
checkmarkSize: 16,
|
|
9
|
+
color: t.colors.neutralForeground2,
|
|
10
|
+
fontFamily: t.typography.families.primary,
|
|
11
|
+
fontSize: theme_tokens_1.globalTokens.font.size300,
|
|
12
|
+
fontWeight: theme_tokens_1.globalTokens.font.weight.regular,
|
|
13
|
+
gap: theme_tokens_1.globalTokens.size40,
|
|
14
|
+
iconColor: t.colors.neutralForeground2,
|
|
15
|
+
iconSize: 16,
|
|
16
|
+
minHeight: 32,
|
|
17
|
+
minWidth: 128,
|
|
18
|
+
maxWidth: 300,
|
|
19
|
+
padding: theme_tokens_1.globalTokens.size60,
|
|
20
|
+
submenuIndicatorColor: t.colors.neutralForeground2,
|
|
21
|
+
submenuIndicatorPadding: theme_tokens_1.globalTokens.sizeNone,
|
|
22
|
+
submenuIndicatorSize: 16,
|
|
23
|
+
hovered: {
|
|
24
|
+
backgroundColor: t.colors.neutralBackground1Hover,
|
|
25
|
+
color: t.colors.neutralForeground2Hover,
|
|
26
|
+
iconColor: t.colors.neutralForeground2Hover,
|
|
27
|
+
submenuIndicatorColor: t.colors.neutralForeground2Hover,
|
|
28
|
+
},
|
|
29
|
+
pressed: {
|
|
30
|
+
backgroundColor: t.colors.neutralBackground1Pressed,
|
|
31
|
+
color: t.colors.neutralForeground2Pressed,
|
|
32
|
+
iconColor: t.colors.neutralForeground2Pressed,
|
|
33
|
+
submenuIndicatorColor: t.colors.neutralForeground2Pressed,
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
backgroundColor: t.colors.neutralBackground1,
|
|
37
|
+
color: t.colors.neutralForegroundDisabled,
|
|
38
|
+
iconColor: t.colors.neutralForegroundDisabled,
|
|
39
|
+
submenuIndicatorColor: t.colors.neutralForegroundDisabled,
|
|
40
|
+
},
|
|
41
41
|
});
|
|
42
42
|
exports.defaultMenuItemTokens = defaultMenuItemTokens;
|
|
43
|
-
//# sourceMappingURL=MenuItemTokens.js.map
|
|
43
|
+
//# 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
|