@fluentui/react-nav 0.0.0-nightly-20250612-0406.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 +704 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/dist/index.d.ts +992 -0
- package/lib/AppItem.js +1 -0
- package/lib/AppItem.js.map +1 -0
- package/lib/AppItemStatic.js +1 -0
- package/lib/AppItemStatic.js.map +1 -0
- package/lib/Hamburger.js +1 -0
- package/lib/Hamburger.js.map +1 -0
- package/lib/Nav.js +3 -0
- package/lib/Nav.js.map +1 -0
- package/lib/NavCategory.js +1 -0
- package/lib/NavCategory.js.map +1 -0
- package/lib/NavDivider.js +1 -0
- package/lib/NavDivider.js.map +1 -0
- package/lib/NavDrawer.js +1 -0
- package/lib/NavDrawer.js.map +1 -0
- package/lib/NavDrawerBody.js +1 -0
- package/lib/NavDrawerBody.js.map +1 -0
- package/lib/NavDrawerFooter.js +1 -0
- package/lib/NavDrawerFooter.js.map +1 -0
- package/lib/NavDrawerHeader.js +1 -0
- package/lib/NavDrawerHeader.js.map +1 -0
- package/lib/NavItem.js +1 -0
- package/lib/NavItem.js.map +1 -0
- package/lib/NavSectionHeader.js +1 -0
- package/lib/NavSectionHeader.js.map +1 -0
- package/lib/NavSubItem.js +1 -0
- package/lib/NavSubItem.js.map +1 -0
- package/lib/NavSubItemGroup.js +1 -0
- package/lib/NavSubItemGroup.js.map +1 -0
- package/lib/SplitNavItem.js +1 -0
- package/lib/SplitNavItem.js.map +1 -0
- package/lib/components/AppItem/AppItem.js +20 -0
- package/lib/components/AppItem/AppItem.js.map +1 -0
- package/lib/components/AppItem/AppItem.types.js +3 -0
- package/lib/components/AppItem/AppItem.types.js.map +1 -0
- package/lib/components/AppItem/index.js +4 -0
- package/lib/components/AppItem/index.js.map +1 -0
- package/lib/components/AppItem/renderAppItem.js +13 -0
- package/lib/components/AppItem/renderAppItem.js.map +1 -0
- package/lib/components/AppItem/useAppItem.js +37 -0
- package/lib/components/AppItem/useAppItem.js.map +1 -0
- package/lib/components/AppItem/useAppItemStyles.styles.js +79 -0
- package/lib/components/AppItem/useAppItemStyles.styles.js.map +1 -0
- package/lib/components/AppItemStatic/AppItemStatic.js +20 -0
- package/lib/components/AppItemStatic/AppItemStatic.js.map +1 -0
- package/lib/components/AppItemStatic/AppItemStatic.types.js +3 -0
- package/lib/components/AppItemStatic/AppItemStatic.types.js.map +1 -0
- package/lib/components/AppItemStatic/index.js +4 -0
- package/lib/components/AppItemStatic/index.js.map +1 -0
- package/lib/components/AppItemStatic/renderAppItemStatic.js +13 -0
- package/lib/components/AppItemStatic/renderAppItemStatic.js.map +1 -0
- package/lib/components/AppItemStatic/useAppItemStatic.js +31 -0
- package/lib/components/AppItemStatic/useAppItemStatic.js.map +1 -0
- package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.js +38 -0
- package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.js.map +1 -0
- package/lib/components/Hamburger/Hamburger.js +15 -0
- package/lib/components/Hamburger/Hamburger.js.map +1 -0
- package/lib/components/Hamburger/Hamburger.types.js +3 -0
- package/lib/components/Hamburger/Hamburger.types.js.map +1 -0
- package/lib/components/Hamburger/index.js +3 -0
- package/lib/components/Hamburger/index.js.map +1 -0
- package/lib/components/Hamburger/useHamburger.js +15 -0
- package/lib/components/Hamburger/useHamburger.js.map +1 -0
- package/lib/components/Hamburger/useHamburgerStyles.styles.js +40 -0
- package/lib/components/Hamburger/useHamburgerStyles.styles.js.map +1 -0
- package/lib/components/Nav/Nav.js +14 -0
- package/lib/components/Nav/Nav.js.map +1 -0
- package/lib/components/Nav/Nav.types.js +1 -0
- package/lib/components/Nav/Nav.types.js.map +1 -0
- package/lib/components/Nav/index.js +4 -0
- package/lib/components/Nav/index.js.map +1 -0
- package/lib/components/Nav/renderNav.js +10 -0
- package/lib/components/Nav/renderNav.js.map +1 -0
- package/lib/components/Nav/useNav.js +134 -0
- package/lib/components/Nav/useNav.js.map +1 -0
- package/lib/components/Nav/useNavStyles.styles.js +27 -0
- package/lib/components/Nav/useNavStyles.styles.js.map +1 -0
- package/lib/components/NavCategory/NavCategory.js +12 -0
- package/lib/components/NavCategory/NavCategory.js.map +1 -0
- package/lib/components/NavCategory/NavCategory.types.js +1 -0
- package/lib/components/NavCategory/NavCategory.types.js.map +1 -0
- package/lib/components/NavCategory/index.js +3 -0
- package/lib/components/NavCategory/index.js.map +1 -0
- package/lib/components/NavCategory/renderNavCategory.js +9 -0
- package/lib/components/NavCategory/renderNavCategory.js.map +1 -0
- package/lib/components/NavCategory/useNavCategory.js +20 -0
- package/lib/components/NavCategory/useNavCategory.js.map +1 -0
- package/lib/components/NavCategoryContext.js +11 -0
- package/lib/components/NavCategoryContext.js.map +1 -0
- package/lib/components/NavCategoryItem/NavCategoryItem.js +18 -0
- package/lib/components/NavCategoryItem/NavCategoryItem.js.map +1 -0
- package/lib/components/NavCategoryItem/NavCategoryItem.types.js +3 -0
- package/lib/components/NavCategoryItem/NavCategoryItem.types.js.map +1 -0
- package/lib/components/NavCategoryItem/index.js +4 -0
- package/lib/components/NavCategoryItem/index.js.map +1 -0
- package/lib/components/NavCategoryItem/renderNavCategoryItem.js +18 -0
- package/lib/components/NavCategoryItem/renderNavCategoryItem.js.map +1 -0
- package/lib/components/NavCategoryItem/useNavCategoryItem.js +58 -0
- package/lib/components/NavCategoryItem/useNavCategoryItem.js.map +1 -0
- package/lib/components/NavCategoryItem/useNavCategoryItem.styles.js +60 -0
- package/lib/components/NavCategoryItem/useNavCategoryItem.styles.js.map +1 -0
- package/lib/components/NavCategoryItemContext.js +10 -0
- package/lib/components/NavCategoryItemContext.js.map +1 -0
- package/lib/components/NavContext.js +30 -0
- package/lib/components/NavContext.js.map +1 -0
- package/lib/components/NavContext.types.js +1 -0
- package/lib/components/NavContext.types.js.map +1 -0
- package/lib/components/NavDivider/NavDivider.js +15 -0
- package/lib/components/NavDivider/NavDivider.js.map +1 -0
- package/lib/components/NavDivider/NavDivider.types.js +3 -0
- package/lib/components/NavDivider/NavDivider.types.js.map +1 -0
- package/lib/components/NavDivider/index.js +3 -0
- package/lib/components/NavDivider/index.js.map +1 -0
- package/lib/components/NavDivider/useNavDivider.js +16 -0
- package/lib/components/NavDivider/useNavDivider.js.map +1 -0
- package/lib/components/NavDivider/useNavDividerStyles.styles.js +27 -0
- package/lib/components/NavDivider/useNavDividerStyles.styles.js.map +1 -0
- package/lib/components/NavDrawer/NavDrawer.js +18 -0
- package/lib/components/NavDrawer/NavDrawer.js.map +1 -0
- package/lib/components/NavDrawer/NavDrawer.types.js +3 -0
- package/lib/components/NavDrawer/NavDrawer.types.js.map +1 -0
- package/lib/components/NavDrawer/index.js +4 -0
- package/lib/components/NavDrawer/index.js.map +1 -0
- package/lib/components/NavDrawer/renderNavDrawer.js +10 -0
- package/lib/components/NavDrawer/renderNavDrawer.js.map +1 -0
- package/lib/components/NavDrawer/useNavDrawer.js +47 -0
- package/lib/components/NavDrawer/useNavDrawer.js.map +1 -0
- package/lib/components/NavDrawer/useNavDrawerStyles.styles.js +32 -0
- package/lib/components/NavDrawer/useNavDrawerStyles.styles.js.map +1 -0
- package/lib/components/NavDrawerBody/NavDrawerBody.js +15 -0
- package/lib/components/NavDrawerBody/NavDrawerBody.js.map +1 -0
- package/lib/components/NavDrawerBody/NavDrawerBody.types.js +3 -0
- package/lib/components/NavDrawerBody/NavDrawerBody.types.js.map +1 -0
- package/lib/components/NavDrawerBody/index.js +3 -0
- package/lib/components/NavDrawerBody/index.js.map +1 -0
- package/lib/components/NavDrawerBody/useNavDrawerBody.js +13 -0
- package/lib/components/NavDrawerBody/useNavDrawerBody.js.map +1 -0
- package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.js +39 -0
- package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.js.map +1 -0
- package/lib/components/NavDrawerFooter/NavDrawerFooter.js +15 -0
- package/lib/components/NavDrawerFooter/NavDrawerFooter.js.map +1 -0
- package/lib/components/NavDrawerFooter/NavDrawerFooter.types.js +3 -0
- package/lib/components/NavDrawerFooter/NavDrawerFooter.types.js.map +1 -0
- package/lib/components/NavDrawerFooter/index.js +3 -0
- package/lib/components/NavDrawerFooter/index.js.map +1 -0
- package/lib/components/NavDrawerFooter/useNavDrawerFooter.js +13 -0
- package/lib/components/NavDrawerFooter/useNavDrawerFooter.js.map +1 -0
- package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.js +36 -0
- package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.js.map +1 -0
- package/lib/components/NavDrawerHeader/NavDrawerHeader.js +15 -0
- package/lib/components/NavDrawerHeader/NavDrawerHeader.js.map +1 -0
- package/lib/components/NavDrawerHeader/NavDrawerHeader.types.js +3 -0
- package/lib/components/NavDrawerHeader/NavDrawerHeader.types.js.map +1 -0
- package/lib/components/NavDrawerHeader/index.js +3 -0
- package/lib/components/NavDrawerHeader/index.js.map +1 -0
- package/lib/components/NavDrawerHeader/useNavDrawerHeader.js +13 -0
- package/lib/components/NavDrawerHeader/useNavDrawerHeader.js.map +1 -0
- package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.js +38 -0
- package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.js.map +1 -0
- package/lib/components/NavItem/NavItem.js +16 -0
- package/lib/components/NavItem/NavItem.js.map +1 -0
- package/lib/components/NavItem/NavItem.types.js +3 -0
- package/lib/components/NavItem/NavItem.types.js.map +1 -0
- package/lib/components/NavItem/index.js +4 -0
- package/lib/components/NavItem/index.js.map +1 -0
- package/lib/components/NavItem/renderNavItem.js +13 -0
- package/lib/components/NavItem/renderNavItem.js.map +1 -0
- package/lib/components/NavItem/useNavItem.js +70 -0
- package/lib/components/NavItem/useNavItem.js.map +1 -0
- package/lib/components/NavItem/useNavItemStyles.styles.js +27 -0
- package/lib/components/NavItem/useNavItemStyles.styles.js.map +1 -0
- package/lib/components/NavSectionHeader/NavSectionHeader.js +15 -0
- package/lib/components/NavSectionHeader/NavSectionHeader.js.map +1 -0
- package/lib/components/NavSectionHeader/NavSectionHeader.types.js +4 -0
- package/lib/components/NavSectionHeader/NavSectionHeader.types.js.map +1 -0
- package/lib/components/NavSectionHeader/index.js +4 -0
- package/lib/components/NavSectionHeader/index.js.map +1 -0
- package/lib/components/NavSectionHeader/renderNavSectionHeader.js +8 -0
- package/lib/components/NavSectionHeader/renderNavSectionHeader.js.map +1 -0
- package/lib/components/NavSectionHeader/useNavSectionHeader.js +23 -0
- package/lib/components/NavSectionHeader/useNavSectionHeader.js.map +1 -0
- package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.js +34 -0
- package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.js.map +1 -0
- package/lib/components/NavSubItem/NavSubItem.js +16 -0
- package/lib/components/NavSubItem/NavSubItem.js.map +1 -0
- package/lib/components/NavSubItem/NavSubItem.types.js +3 -0
- package/lib/components/NavSubItem/NavSubItem.types.js.map +1 -0
- package/lib/components/NavSubItem/index.js +4 -0
- package/lib/components/NavSubItem/index.js.map +1 -0
- package/lib/components/NavSubItem/renderNavSubItem.js +8 -0
- package/lib/components/NavSubItem/renderNavSubItem.js.map +1 -0
- package/lib/components/NavSubItem/useNavSubItem.js +69 -0
- package/lib/components/NavSubItem/useNavSubItem.js.map +1 -0
- package/lib/components/NavSubItem/useNavSubItemStyles.styles.js +39 -0
- package/lib/components/NavSubItem/useNavSubItemStyles.styles.js.map +1 -0
- package/lib/components/NavSubItemContext.js +11 -0
- package/lib/components/NavSubItemContext.js.map +1 -0
- package/lib/components/NavSubItemGroup/NavSubItemGroup.js +16 -0
- package/lib/components/NavSubItemGroup/NavSubItemGroup.js.map +1 -0
- package/lib/components/NavSubItemGroup/NavSubItemGroup.types.js +3 -0
- package/lib/components/NavSubItemGroup/NavSubItemGroup.types.js.map +1 -0
- package/lib/components/NavSubItemGroup/index.js +4 -0
- package/lib/components/NavSubItemGroup/index.js.map +1 -0
- package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js +10 -0
- package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js.map +1 -0
- package/lib/components/NavSubItemGroup/useNavSubItemGroup.js +29 -0
- package/lib/components/NavSubItemGroup/useNavSubItemGroup.js.map +1 -0
- package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js +22 -0
- package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js.map +1 -0
- package/lib/components/SplitNavItem/SplitNavItem.js +20 -0
- package/lib/components/SplitNavItem/SplitNavItem.js.map +1 -0
- package/lib/components/SplitNavItem/SplitNavItem.types.js +3 -0
- package/lib/components/SplitNavItem/SplitNavItem.types.js.map +1 -0
- package/lib/components/SplitNavItem/index.js +4 -0
- package/lib/components/SplitNavItem/index.js.map +1 -0
- package/lib/components/SplitNavItem/renderSplitNavItem.js +24 -0
- package/lib/components/SplitNavItem/renderSplitNavItem.js.map +1 -0
- package/lib/components/SplitNavItem/useSplitNavItem.js +101 -0
- package/lib/components/SplitNavItem/useSplitNavItem.js.map +1 -0
- package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.js +98 -0
- package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.js.map +1 -0
- package/lib/components/sharedNavStyles.styles.js +147 -0
- package/lib/components/sharedNavStyles.styles.js.map +1 -0
- package/lib/components/useNavCategoryContextValues_unstable.js +14 -0
- package/lib/components/useNavCategoryContextValues_unstable.js.map +1 -0
- package/lib/components/useNavCategoryItemContextValues_unstable.js +14 -0
- package/lib/components/useNavCategoryItemContextValues_unstable.js.map +1 -0
- package/lib/components/useNavContextValues.js +30 -0
- package/lib/components/useNavContextValues.js.map +1 -0
- package/lib/index.js +22 -0
- package/lib/index.js.map +1 -0
- package/lib-commonjs/AppItem.js +31 -0
- package/lib-commonjs/AppItem.js.map +1 -0
- package/lib-commonjs/AppItemStatic.js +28 -0
- package/lib-commonjs/AppItemStatic.js.map +1 -0
- package/lib-commonjs/Hamburger.js +25 -0
- package/lib-commonjs/Hamburger.js.map +1 -0
- package/lib-commonjs/Nav.js +51 -0
- package/lib-commonjs/Nav.js.map +1 -0
- package/lib-commonjs/NavCategory.js +22 -0
- package/lib-commonjs/NavCategory.js.map +1 -0
- package/lib-commonjs/NavDivider.js +25 -0
- package/lib-commonjs/NavDivider.js.map +1 -0
- package/lib-commonjs/NavDrawer.js +28 -0
- package/lib-commonjs/NavDrawer.js.map +1 -0
- package/lib-commonjs/NavDrawerBody.js +25 -0
- package/lib-commonjs/NavDrawerBody.js.map +1 -0
- package/lib-commonjs/NavDrawerFooter.js +25 -0
- package/lib-commonjs/NavDrawerFooter.js.map +1 -0
- package/lib-commonjs/NavDrawerHeader.js +25 -0
- package/lib-commonjs/NavDrawerHeader.js.map +1 -0
- package/lib-commonjs/NavItem.js +28 -0
- package/lib-commonjs/NavItem.js.map +1 -0
- package/lib-commonjs/NavSectionHeader.js +28 -0
- package/lib-commonjs/NavSectionHeader.js.map +1 -0
- package/lib-commonjs/NavSubItem.js +28 -0
- package/lib-commonjs/NavSubItem.js.map +1 -0
- package/lib-commonjs/NavSubItemGroup.js +28 -0
- package/lib-commonjs/NavSubItemGroup.js.map +1 -0
- package/lib-commonjs/SplitNavItem.js +28 -0
- package/lib-commonjs/SplitNavItem.js.map +1 -0
- package/lib-commonjs/components/AppItem/AppItem.js +29 -0
- package/lib-commonjs/components/AppItem/AppItem.js.map +1 -0
- package/lib-commonjs/components/AppItem/AppItem.types.js +6 -0
- package/lib-commonjs/components/AppItem/AppItem.types.js.map +1 -0
- package/lib-commonjs/components/AppItem/index.js +34 -0
- package/lib-commonjs/components/AppItem/index.js.map +1 -0
- package/lib-commonjs/components/AppItem/renderAppItem.js +21 -0
- package/lib-commonjs/components/AppItem/renderAppItem.js.map +1 -0
- package/lib-commonjs/components/AppItem/useAppItem.js +40 -0
- package/lib-commonjs/components/AppItem/useAppItem.js.map +1 -0
- package/lib-commonjs/components/AppItem/useAppItemStyles.styles.js +133 -0
- package/lib-commonjs/components/AppItem/useAppItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.js +29 -0
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.js.map +1 -0
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.types.js +6 -0
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.types.js.map +1 -0
- package/lib-commonjs/components/AppItemStatic/index.js +31 -0
- package/lib-commonjs/components/AppItemStatic/index.js.map +1 -0
- package/lib-commonjs/components/AppItemStatic/renderAppItemStatic.js +21 -0
- package/lib-commonjs/components/AppItemStatic/renderAppItemStatic.js.map +1 -0
- package/lib-commonjs/components/AppItemStatic/useAppItemStatic.js +34 -0
- package/lib-commonjs/components/AppItemStatic/useAppItemStatic.js.map +1 -0
- package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.js +55 -0
- package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Hamburger/Hamburger.js +24 -0
- package/lib-commonjs/components/Hamburger/Hamburger.js.map +1 -0
- package/lib-commonjs/components/Hamburger/Hamburger.types.js +6 -0
- package/lib-commonjs/components/Hamburger/Hamburger.types.js.map +1 -0
- package/lib-commonjs/components/Hamburger/index.js +27 -0
- package/lib-commonjs/components/Hamburger/index.js.map +1 -0
- package/lib-commonjs/components/Hamburger/useHamburger.js +21 -0
- package/lib-commonjs/components/Hamburger/useHamburger.js.map +1 -0
- package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.js +69 -0
- package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Nav/Nav.js +23 -0
- package/lib-commonjs/components/Nav/Nav.js.map +1 -0
- package/lib-commonjs/components/Nav/Nav.types.js +6 -0
- package/lib-commonjs/components/Nav/Nav.types.js.map +1 -0
- package/lib-commonjs/components/Nav/index.js +31 -0
- package/lib-commonjs/components/Nav/index.js.map +1 -0
- package/lib-commonjs/components/Nav/renderNav.js +20 -0
- package/lib-commonjs/components/Nav/renderNav.js.map +1 -0
- package/lib-commonjs/components/Nav/useNav.js +137 -0
- package/lib-commonjs/components/Nav/useNav.js.map +1 -0
- package/lib-commonjs/components/Nav/useNavStyles.styles.js +43 -0
- package/lib-commonjs/components/Nav/useNavStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavCategory/NavCategory.js +21 -0
- package/lib-commonjs/components/NavCategory/NavCategory.js.map +1 -0
- package/lib-commonjs/components/NavCategory/NavCategory.types.js +6 -0
- package/lib-commonjs/components/NavCategory/NavCategory.types.js.map +1 -0
- package/lib-commonjs/components/NavCategory/index.js +24 -0
- package/lib-commonjs/components/NavCategory/index.js.map +1 -0
- package/lib-commonjs/components/NavCategory/renderNavCategory.js +18 -0
- package/lib-commonjs/components/NavCategory/renderNavCategory.js.map +1 -0
- package/lib-commonjs/components/NavCategory/useNavCategory.js +23 -0
- package/lib-commonjs/components/NavCategory/useNavCategory.js.map +1 -0
- package/lib-commonjs/components/NavCategoryContext.js +30 -0
- package/lib-commonjs/components/NavCategoryContext.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.js +25 -0
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.types.js +6 -0
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.types.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItem/index.js +31 -0
- package/lib-commonjs/components/NavCategoryItem/index.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItem/renderNavCategoryItem.js +26 -0
- package/lib-commonjs/components/NavCategoryItem/renderNavCategoryItem.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.js +61 -0
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.js +83 -0
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.js.map +1 -0
- package/lib-commonjs/components/NavCategoryItemContext.js +29 -0
- package/lib-commonjs/components/NavCategoryItemContext.js.map +1 -0
- package/lib-commonjs/components/NavContext.js +49 -0
- package/lib-commonjs/components/NavContext.js.map +1 -0
- package/lib-commonjs/components/NavContext.types.js +6 -0
- package/lib-commonjs/components/NavContext.types.js.map +1 -0
- package/lib-commonjs/components/NavDivider/NavDivider.js +24 -0
- package/lib-commonjs/components/NavDivider/NavDivider.js.map +1 -0
- package/lib-commonjs/components/NavDivider/NavDivider.types.js +6 -0
- package/lib-commonjs/components/NavDivider/NavDivider.types.js.map +1 -0
- package/lib-commonjs/components/NavDivider/index.js +27 -0
- package/lib-commonjs/components/NavDivider/index.js.map +1 -0
- package/lib-commonjs/components/NavDivider/useNavDivider.js +19 -0
- package/lib-commonjs/components/NavDivider/useNavDivider.js.map +1 -0
- package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.js +45 -0
- package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavDrawer/NavDrawer.js +26 -0
- package/lib-commonjs/components/NavDrawer/NavDrawer.js.map +1 -0
- package/lib-commonjs/components/NavDrawer/NavDrawer.types.js +6 -0
- package/lib-commonjs/components/NavDrawer/NavDrawer.types.js.map +1 -0
- package/lib-commonjs/components/NavDrawer/index.js +31 -0
- package/lib-commonjs/components/NavDrawer/index.js.map +1 -0
- package/lib-commonjs/components/NavDrawer/renderNavDrawer.js +20 -0
- package/lib-commonjs/components/NavDrawer/renderNavDrawer.js.map +1 -0
- package/lib-commonjs/components/NavDrawer/useNavDrawer.js +50 -0
- package/lib-commonjs/components/NavDrawer/useNavDrawer.js.map +1 -0
- package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.js +46 -0
- package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.js +24 -0
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.js.map +1 -0
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.types.js +6 -0
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.types.js.map +1 -0
- package/lib-commonjs/components/NavDrawerBody/index.js +27 -0
- package/lib-commonjs/components/NavDrawerBody/index.js.map +1 -0
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBody.js +16 -0
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBody.js.map +1 -0
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.js +67 -0
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.js +24 -0
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.js.map +1 -0
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.types.js +6 -0
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.types.js.map +1 -0
- package/lib-commonjs/components/NavDrawerFooter/index.js +27 -0
- package/lib-commonjs/components/NavDrawerFooter/index.js.map +1 -0
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooter.js +16 -0
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooter.js.map +1 -0
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.js +56 -0
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.js +24 -0
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.js.map +1 -0
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.types.js +6 -0
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.types.js.map +1 -0
- package/lib-commonjs/components/NavDrawerHeader/index.js +27 -0
- package/lib-commonjs/components/NavDrawerHeader/index.js.map +1 -0
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeader.js +16 -0
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeader.js.map +1 -0
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.js +61 -0
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavItem/NavItem.js +24 -0
- package/lib-commonjs/components/NavItem/NavItem.js.map +1 -0
- package/lib-commonjs/components/NavItem/NavItem.types.js +6 -0
- package/lib-commonjs/components/NavItem/NavItem.types.js.map +1 -0
- package/lib-commonjs/components/NavItem/index.js +31 -0
- package/lib-commonjs/components/NavItem/index.js.map +1 -0
- package/lib-commonjs/components/NavItem/renderNavItem.js +21 -0
- package/lib-commonjs/components/NavItem/renderNavItem.js.map +1 -0
- package/lib-commonjs/components/NavItem/useNavItem.js +73 -0
- package/lib-commonjs/components/NavItem/useNavItem.js.map +1 -0
- package/lib-commonjs/components/NavItem/useNavItemStyles.styles.js +38 -0
- package/lib-commonjs/components/NavItem/useNavItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.js +24 -0
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.js.map +1 -0
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.types.js +8 -0
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.types.js.map +1 -0
- package/lib-commonjs/components/NavSectionHeader/index.js +31 -0
- package/lib-commonjs/components/NavSectionHeader/index.js.map +1 -0
- package/lib-commonjs/components/NavSectionHeader/renderNavSectionHeader.js +16 -0
- package/lib-commonjs/components/NavSectionHeader/renderNavSectionHeader.js.map +1 -0
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeader.js +26 -0
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeader.js.map +1 -0
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.js +56 -0
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavSubItem/NavSubItem.js +24 -0
- package/lib-commonjs/components/NavSubItem/NavSubItem.js.map +1 -0
- package/lib-commonjs/components/NavSubItem/NavSubItem.types.js +6 -0
- package/lib-commonjs/components/NavSubItem/NavSubItem.types.js.map +1 -0
- package/lib-commonjs/components/NavSubItem/index.js +31 -0
- package/lib-commonjs/components/NavSubItem/index.js.map +1 -0
- package/lib-commonjs/components/NavSubItem/renderNavSubItem.js +16 -0
- package/lib-commonjs/components/NavSubItem/renderNavSubItem.js.map +1 -0
- package/lib-commonjs/components/NavSubItem/useNavSubItem.js +72 -0
- package/lib-commonjs/components/NavSubItem/useNavSubItem.js.map +1 -0
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.js +53 -0
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/NavSubItemContext.js +30 -0
- package/lib-commonjs/components/NavSubItemContext.js.map +1 -0
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.js +24 -0
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.js.map +1 -0
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.types.js +6 -0
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.types.js.map +1 -0
- package/lib-commonjs/components/NavSubItemGroup/index.js +31 -0
- package/lib-commonjs/components/NavSubItemGroup/index.js.map +1 -0
- package/lib-commonjs/components/NavSubItemGroup/renderNavSubItemGroup.js +18 -0
- package/lib-commonjs/components/NavSubItemGroup/renderNavSubItemGroup.js.map +1 -0
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.js +32 -0
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.js.map +1 -0
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js +35 -0
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.js +29 -0
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.js.map +1 -0
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.types.js +6 -0
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.types.js.map +1 -0
- package/lib-commonjs/components/SplitNavItem/index.js +31 -0
- package/lib-commonjs/components/SplitNavItem/index.js.map +1 -0
- package/lib-commonjs/components/SplitNavItem/renderSplitNavItem.js +32 -0
- package/lib-commonjs/components/SplitNavItem/renderSplitNavItem.js.map +1 -0
- package/lib-commonjs/components/SplitNavItem/useSplitNavItem.js +104 -0
- package/lib-commonjs/components/SplitNavItem/useSplitNavItem.js.map +1 -0
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.js +149 -0
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/sharedNavStyles.styles.js +242 -0
- package/lib-commonjs/components/sharedNavStyles.styles.js.map +1 -0
- package/lib-commonjs/components/useNavCategoryContextValues_unstable.js +25 -0
- package/lib-commonjs/components/useNavCategoryContextValues_unstable.js.map +1 -0
- package/lib-commonjs/components/useNavCategoryItemContextValues_unstable.js +25 -0
- package/lib-commonjs/components/useNavCategoryItemContextValues_unstable.js.map +1 -0
- package/lib-commonjs/components/useNavContextValues.js +41 -0
- package/lib-commonjs/components/useNavContextValues.js.map +1 -0
- package/lib-commonjs/index.js +280 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { NavSubItemGroup } from './NavSubItemGroup';
|
|
2
|
+
export { renderNavSubItemGroup_unstable } from './renderNavSubItemGroup';
|
|
3
|
+
export { useNavSubItemGroup_unstable } from './useNavSubItemGroup';
|
|
4
|
+
export { useNavSubItemGroupStyles_unstable, navSubItemGroupClassNames } from './useNavSubItemGroupStyles.styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/index.ts"],"sourcesContent":["export { NavSubItemGroup } from './NavSubItemGroup';\nexport type { NavSubItemGroupSlots, NavSubItemGroupProps, NavSubItemGroupState } from './NavSubItemGroup.types';\nexport { renderNavSubItemGroup_unstable } from './renderNavSubItemGroup';\nexport { useNavSubItemGroup_unstable } from './useNavSubItemGroup';\nexport { useNavSubItemGroupStyles_unstable, navSubItemGroupClassNames } from './useNavSubItemGroupStyles.styles';\n"],"names":["NavSubItemGroup","renderNavSubItemGroup_unstable","useNavSubItemGroup_unstable","useNavSubItemGroupStyles_unstable","navSubItemGroupClassNames"],"rangeMappings":";;;","mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,iCAAiC,EAAEC,yBAAyB,QAAQ,oCAAoC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of NavSubItemGroup
|
|
5
|
+
*/ export const renderNavSubItemGroup_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return state.open ? /*#__PURE__*/ _jsx(state.root, {
|
|
8
|
+
children: state.root.children
|
|
9
|
+
}) : null;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/renderNavSubItemGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { NavSubItemGroupState, NavSubItemGroupSlots } from './NavSubItemGroup.types';\n\n/**\n * Render the final JSX of NavSubItemGroup\n */\nexport const renderNavSubItemGroup_unstable = (state: NavSubItemGroupState) => {\n assertSlots<NavSubItemGroupSlots>(state);\n\n return state.open ? <state.root>{state.root.children}</state.root> : null;\n};\n"],"names":["assertSlots","renderNavSubItemGroup_unstable","state","open","root","children"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,OAAOA,MAAMC,IAAI,iBAAG,KAACD,MAAME,IAAI;kBAAEF,MAAME,IAAI,CAACC,QAAQ;SAAiB;AACvE,EAAE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
|
+
import { useNavCategoryContext_unstable } from '../NavCategoryContext';
|
|
4
|
+
/**
|
|
5
|
+
* Create the state required to render NavSubItemGroup.
|
|
6
|
+
*
|
|
7
|
+
* The returned state can be modified with hooks such as useNavSubItemGroupStyles_unstable,
|
|
8
|
+
* before being passed to renderNavSubItemGroup_unstable.
|
|
9
|
+
*
|
|
10
|
+
* @param props - props from this instance of NavSubItemGroup
|
|
11
|
+
* @param ref - reference to root HTMLDivElement of NavSubItemGroup
|
|
12
|
+
*/ export const useNavSubItemGroup_unstable = (props, ref)=>{
|
|
13
|
+
const { open } = useNavCategoryContext_unstable();
|
|
14
|
+
// copied over from accordion. todo - figure out how to handle.
|
|
15
|
+
// const focusableProps = useTabsterAttributes({ focusable: { excludeFromMover: true } });
|
|
16
|
+
// const navigation = useAccordionContext_unstable(ctx => ctx.navigation);
|
|
17
|
+
return {
|
|
18
|
+
open,
|
|
19
|
+
components: {
|
|
20
|
+
root: 'div'
|
|
21
|
+
},
|
|
22
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
23
|
+
...props,
|
|
24
|
+
ref
|
|
25
|
+
}), {
|
|
26
|
+
elementType: 'div'
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/useNavSubItemGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { NavSubItemGroupProps, NavSubItemGroupState } from './NavSubItemGroup.types';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\n\n/**\n * Create the state required to render NavSubItemGroup.\n *\n * The returned state can be modified with hooks such as useNavSubItemGroupStyles_unstable,\n * before being passed to renderNavSubItemGroup_unstable.\n *\n * @param props - props from this instance of NavSubItemGroup\n * @param ref - reference to root HTMLDivElement of NavSubItemGroup\n */\nexport const useNavSubItemGroup_unstable = (\n props: NavSubItemGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): NavSubItemGroupState => {\n const { open } = useNavCategoryContext_unstable();\n\n // copied over from accordion. todo - figure out how to handle.\n // const focusableProps = useTabsterAttributes({ focusable: { excludeFromMover: true } });\n // const navigation = useAccordionContext_unstable(ctx => ctx.navigation);\n\n return {\n open,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ...props,\n ref,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useNavCategoryContext_unstable","useNavSubItemGroup_unstable","props","ref","open","components","root","always","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,8BAA8B,QAAQ,wBAAwB;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGJ;IAEjB,+DAA+D;IAC/D,0FAA0F;IAC1F,0EAA0E;IAE1E,OAAO;QACLI;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,KAAKQ,MAAM,CACfT,yBAAyB,OAAO;YAC9B,GAAGI,KAAK;YACRC;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const navSubItemGroupClassNames = {
|
|
3
|
+
root: 'fui-NavSubItemGroup'
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Styles for the root slot
|
|
7
|
+
*/
|
|
8
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
9
|
+
root: {}
|
|
10
|
+
}, {});
|
|
11
|
+
/**
|
|
12
|
+
* Apply styling to the NavSubItemGroup slots based on the state
|
|
13
|
+
*/
|
|
14
|
+
export const useNavSubItemGroupStyles_unstable = state => {
|
|
15
|
+
'use no memo';
|
|
16
|
+
|
|
17
|
+
const styles = useStyles();
|
|
18
|
+
state.root.className = mergeClasses(navSubItemGroupClassNames.root, styles.root, state.root.className);
|
|
19
|
+
// TODO Add class names to slots, for example:
|
|
20
|
+
// state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
|
|
21
|
+
return state;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","navSubItemGroupClassNames","root","useStyles","useNavSubItemGroupStyles_unstable","state","styles","className"],"sources":["useNavSubItemGroupStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const navSubItemGroupClassNames = {\n root: 'fui-NavSubItemGroup'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n }\n});\n/**\n * Apply styling to the NavSubItemGroup slots based on the state\n */ export const useNavSubItemGroupStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(navSubItemGroupClassNames.root, styles.root, state.root.className);\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGJ,QAAA;EAAAG,IAAA;AAAA,KAGrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAME,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,aAAa;;EACb,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGP,YAAY,CAACC,yBAAyB,CAACC,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EACtG;EACA;EACA,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useSplitNavItem_unstable } from './useSplitNavItem';
|
|
3
|
+
import { renderSplitNavItem_unstable } from './renderSplitNavItem';
|
|
4
|
+
import { useSplitNavItemStyles_unstable } from './useSplitNavItemStyles.styles';
|
|
5
|
+
/**
|
|
6
|
+
* SplitNavItem component - TODO: add more docs
|
|
7
|
+
*/ export const SplitNavItem = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
8
|
+
const state = useSplitNavItem_unstable(props, ref);
|
|
9
|
+
useSplitNavItemStyles_unstable(state);
|
|
10
|
+
/**
|
|
11
|
+
* @see https://github.com/microsoft/fluentui/blob/master/docs/react-v9/contributing/rfcs/react-components/convergence/custom-styling.md
|
|
12
|
+
*
|
|
13
|
+
* TODO: 💡 once package will become stable (PR which will be part of promoting PREVIEW package to STABLE),
|
|
14
|
+
* - uncomment this line
|
|
15
|
+
* - update types {@link file://./../../../../../../../packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts#CustomStyleHooksContextValue}
|
|
16
|
+
* - verify that custom global style override works for your component
|
|
17
|
+
*/ // useCustomStyleHook_unstable('useSplitNavItemStyles_unstable')(state);
|
|
18
|
+
return renderSplitNavItem_unstable(state);
|
|
19
|
+
});
|
|
20
|
+
SplitNavItem.displayName = 'SplitNavItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitNavItem/SplitNavItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useSplitNavItem_unstable } from './useSplitNavItem';\nimport { renderSplitNavItem_unstable } from './renderSplitNavItem';\nimport { useSplitNavItemStyles_unstable } from './useSplitNavItemStyles.styles';\nimport type { SplitNavItemProps } from './SplitNavItem.types';\n\n/**\n * SplitNavItem component - TODO: add more docs\n */\nexport const SplitNavItem: ForwardRefComponent<SplitNavItemProps> = React.forwardRef((props, ref) => {\n const state = useSplitNavItem_unstable(props, ref);\n\n useSplitNavItemStyles_unstable(state);\n\n /**\n * @see https://github.com/microsoft/fluentui/blob/master/docs/react-v9/contributing/rfcs/react-components/convergence/custom-styling.md\n *\n * TODO: 💡 once package will become stable (PR which will be part of promoting PREVIEW package to STABLE),\n * - uncomment this line\n * - update types {@link file://./../../../../../../../packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts#CustomStyleHooksContextValue}\n * - verify that custom global style override works for your component\n */\n // useCustomStyleHook_unstable('useSplitNavItemStyles_unstable')(state);\n\n return renderSplitNavItem_unstable(state);\n});\n\nSplitNavItem.displayName = 'SplitNavItem';\n"],"names":["React","useSplitNavItem_unstable","renderSplitNavItem_unstable","useSplitNavItemStyles_unstable","SplitNavItem","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF;;CAEC,GACD,OAAO,MAAMC,6BAAuDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CJ,+BAA+BK;IAE/B;;;;;;;GAOC,GACD,wEAAwE;IAExE,OAAON,4BAA4BM;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitNavItem/SplitNavItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { NavItemProps } from '../NavItem/NavItem.types';\nimport { ButtonProps, MenuButtonProps, ToggleButtonProps } from '@fluentui/react-button';\nimport type { TooltipProps } from '@fluentui/react-tooltip';\nimport { NavDensity } from '../Nav/Nav.types';\nimport { NavSubItemProps } from '../NavSubItem/NavSubItem.types';\n\nexport type SplitNavItemSlots = {\n /**\n * Root of the component, wrapping the children.\n */\n root: Slot<'div'>;\n\n /**\n * The NavItem Slot.\n * Will behave as a SubNavItem if it's in an a SubGroup.\n */\n navItem?: NonNullable<Slot<NavItemProps & NavSubItemProps>>;\n\n /**\n * Basic button slot.\n */\n actionButton?: Slot<ButtonProps>;\n\n /**\n * Toggle button slot\n */\n toggleButton?: Slot<ToggleButtonProps>;\n\n /**\n * Menu button slot to stuff more things in when the other two aren't enough.\n */\n menuButton?: Slot<MenuButtonProps>;\n\n /**\n * Tooltip for the action button.\n */\n actionButtonTooltip?: Slot<TooltipProps>;\n\n /**\n * Tooltip for the toggle button.\n */\n toggleButtonTooltip?: Slot<TooltipProps>;\n\n /**\n * Tooltip for the menu button.\n */\n menuButtonTooltip?: Slot<TooltipProps>;\n};\n\n/**\n * SplitNavItem Props\n */\nexport type SplitNavItemProps = ComponentProps<SplitNavItemSlots>;\n\n/**\n * State used in rendering SplitNavItem\n */\nexport type SplitNavItemState = ComponentState<SplitNavItemSlots> & {\n /**\n * The density of the NavItem\n *\n * @default 'medium'\n */\n density: NavDensity;\n\n /**\n * A boolean that represents if the main item in the SplitNavItem is a SubNav item.\n * If false, it's a NavItem.\n */\n isSubNav: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAuDA;;CAEC,GACD,WAaE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SplitNavItem } from './SplitNavItem';
|
|
2
|
+
export { renderSplitNavItem_unstable } from './renderSplitNavItem';
|
|
3
|
+
export { useSplitNavItem_unstable } from './useSplitNavItem';
|
|
4
|
+
export { splitNavItemClassNames, useSplitNavItemStyles_unstable } from './useSplitNavItemStyles.styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitNavItem/index.ts"],"sourcesContent":["export { SplitNavItem } from './SplitNavItem';\nexport type { SplitNavItemProps, SplitNavItemSlots, SplitNavItemState } from './SplitNavItem.types';\nexport { renderSplitNavItem_unstable } from './renderSplitNavItem';\nexport { useSplitNavItem_unstable } from './useSplitNavItem';\nexport { splitNavItemClassNames, useSplitNavItemStyles_unstable } from './useSplitNavItemStyles.styles';\n"],"names":["SplitNavItem","renderSplitNavItem_unstable","useSplitNavItem_unstable","splitNavItemClassNames","useSplitNavItemStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAE9C,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,sBAAsB,EAAEC,8BAA8B,QAAQ,iCAAiC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of SplitNavItem
|
|
5
|
+
*/ export const renderSplitNavItem_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsxs(state.root, {
|
|
8
|
+
children: [
|
|
9
|
+
state.navItem && /*#__PURE__*/ _jsx(state.navItem, {}),
|
|
10
|
+
state.actionButton && state.actionButtonTooltip && /*#__PURE__*/ _jsx(state.actionButtonTooltip, {
|
|
11
|
+
children: /*#__PURE__*/ _jsx(state.actionButton, {})
|
|
12
|
+
}),
|
|
13
|
+
state.actionButton && !state.actionButtonTooltip && /*#__PURE__*/ _jsx(state.actionButton, {}),
|
|
14
|
+
state.toggleButton && state.toggleButtonTooltip && /*#__PURE__*/ _jsx(state.toggleButtonTooltip, {
|
|
15
|
+
children: /*#__PURE__*/ _jsx(state.toggleButton, {})
|
|
16
|
+
}),
|
|
17
|
+
state.toggleButton && !state.toggleButtonTooltip && /*#__PURE__*/ _jsx(state.toggleButton, {}),
|
|
18
|
+
state.menuButton && state.menuButtonTooltip && /*#__PURE__*/ _jsx(state.menuButtonTooltip, {
|
|
19
|
+
children: /*#__PURE__*/ _jsx(state.menuButton, {})
|
|
20
|
+
}),
|
|
21
|
+
state.menuButton && !state.menuButtonTooltip && /*#__PURE__*/ _jsx(state.menuButton, {})
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitNavItem/renderSplitNavItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { SplitNavItemState, SplitNavItemSlots } from './SplitNavItem.types';\n\n/**\n * Render the final JSX of SplitNavItem\n */\nexport const renderSplitNavItem_unstable = (state: SplitNavItemState) => {\n assertSlots<SplitNavItemSlots>(state);\n\n return (\n <state.root>\n {state.navItem && <state.navItem />}\n {state.actionButton && state.actionButtonTooltip && (\n <state.actionButtonTooltip>\n <state.actionButton />\n </state.actionButtonTooltip>\n )}\n {state.actionButton && !state.actionButtonTooltip && <state.actionButton />}\n\n {state.toggleButton && state.toggleButtonTooltip && (\n <state.toggleButtonTooltip>\n <state.toggleButton />\n </state.toggleButtonTooltip>\n )}\n {state.toggleButton && !state.toggleButtonTooltip && <state.toggleButton />}\n\n {state.menuButton && state.menuButtonTooltip && (\n <state.menuButtonTooltip>\n <state.menuButton />\n </state.menuButtonTooltip>\n )}\n {state.menuButton && !state.menuButtonTooltip && <state.menuButton />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSplitNavItem_unstable","state","root","navItem","actionButton","actionButtonTooltip","toggleButton","toggleButtonTooltip","menuButton","menuButtonTooltip"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,OAAO,kBAAI,KAACF,MAAME,OAAO;YAC/BF,MAAMG,YAAY,IAAIH,MAAMI,mBAAmB,kBAC9C,KAACJ,MAAMI,mBAAmB;0BACxB,cAAA,KAACJ,MAAMG,YAAY;;YAGtBH,MAAMG,YAAY,IAAI,CAACH,MAAMI,mBAAmB,kBAAI,KAACJ,MAAMG,YAAY;YAEvEH,MAAMK,YAAY,IAAIL,MAAMM,mBAAmB,kBAC9C,KAACN,MAAMM,mBAAmB;0BACxB,cAAA,KAACN,MAAMK,YAAY;;YAGtBL,MAAMK,YAAY,IAAI,CAACL,MAAMM,mBAAmB,kBAAI,KAACN,MAAMK,YAAY;YAEvEL,MAAMO,UAAU,IAAIP,MAAMQ,iBAAiB,kBAC1C,KAACR,MAAMQ,iBAAiB;0BACtB,cAAA,KAACR,MAAMO,UAAU;;YAGpBP,MAAMO,UAAU,IAAI,CAACP,MAAMQ,iBAAiB,kBAAI,KAACR,MAAMO,UAAU;;;AAGxE,EAAE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
|
+
import { Tooltip } from '@fluentui/react-tooltip';
|
|
4
|
+
import { useNavContext_unstable } from '../NavContext';
|
|
5
|
+
import { Button, MenuButton, ToggleButton } from '@fluentui/react-button';
|
|
6
|
+
import { MoreHorizontalFilled, Pin20Regular } from '@fluentui/react-icons';
|
|
7
|
+
import { NavItem } from '../NavItem/index';
|
|
8
|
+
import { NavSubItem } from '../NavSubItem/NavSubItem';
|
|
9
|
+
import { useNavCategoryContext_unstable } from '../NavCategoryContext';
|
|
10
|
+
/**
|
|
11
|
+
* Create the state required to render SplitNavItem.
|
|
12
|
+
*
|
|
13
|
+
* The returned state can be modified with hooks such as useSplitNavItemStyles_unstable,
|
|
14
|
+
* before being passed to renderSplitNavItem_unstable.
|
|
15
|
+
*
|
|
16
|
+
* @param props - props from this instance of SplitNavItem
|
|
17
|
+
* @param ref - reference to root HTMLDivElement of SplitNavItem
|
|
18
|
+
*/ export const useSplitNavItem_unstable = (props, ref)=>{
|
|
19
|
+
const { navItem, actionButton, toggleButton, menuButton, actionButtonTooltip, toggleButtonTooltip, menuButtonTooltip, children } = props;
|
|
20
|
+
const { density = 'medium' } = useNavContext_unstable();
|
|
21
|
+
const { value: potentialParenValue } = useNavCategoryContext_unstable();
|
|
22
|
+
const isSubNav = potentialParenValue.length > 0 ? true : false;
|
|
23
|
+
const navItemShorthand = slot.always(navItem, {
|
|
24
|
+
defaultProps: {
|
|
25
|
+
children
|
|
26
|
+
},
|
|
27
|
+
elementType: isSubNav ? NavSubItem : NavItem
|
|
28
|
+
});
|
|
29
|
+
const actionButtonShorthand = slot.optional(actionButton, {
|
|
30
|
+
defaultProps: {
|
|
31
|
+
icon: /*#__PURE__*/ React.createElement(Pin20Regular, null),
|
|
32
|
+
size: 'small',
|
|
33
|
+
appearance: 'transparent'
|
|
34
|
+
},
|
|
35
|
+
elementType: Button
|
|
36
|
+
});
|
|
37
|
+
const toggleButtonShorthand = slot.optional(toggleButton, {
|
|
38
|
+
defaultProps: {
|
|
39
|
+
icon: /*#__PURE__*/ React.createElement(Pin20Regular, null),
|
|
40
|
+
size: 'small',
|
|
41
|
+
appearance: 'transparent'
|
|
42
|
+
},
|
|
43
|
+
elementType: ToggleButton
|
|
44
|
+
});
|
|
45
|
+
const menuButtonShorthand = slot.optional(menuButton, {
|
|
46
|
+
defaultProps: {
|
|
47
|
+
icon: /*#__PURE__*/ React.createElement(MoreHorizontalFilled, null),
|
|
48
|
+
size: 'small',
|
|
49
|
+
appearance: 'transparent'
|
|
50
|
+
},
|
|
51
|
+
elementType: MenuButton
|
|
52
|
+
});
|
|
53
|
+
const actionButtonTooltipShorthand = slot.optional(actionButtonTooltip, {
|
|
54
|
+
defaultProps: {
|
|
55
|
+
relationship: 'label'
|
|
56
|
+
},
|
|
57
|
+
elementType: Tooltip
|
|
58
|
+
});
|
|
59
|
+
const toggleButtonTooltipShorthand = slot.optional(toggleButtonTooltip, {
|
|
60
|
+
defaultProps: {
|
|
61
|
+
relationship: 'label'
|
|
62
|
+
},
|
|
63
|
+
elementType: Tooltip
|
|
64
|
+
});
|
|
65
|
+
const menuButtonTooltipShorthand = slot.optional(menuButtonTooltip, {
|
|
66
|
+
defaultProps: {
|
|
67
|
+
relationship: 'label'
|
|
68
|
+
},
|
|
69
|
+
elementType: Tooltip
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
components: {
|
|
73
|
+
root: 'div',
|
|
74
|
+
navItem: isSubNav ? NavSubItem : NavItem,
|
|
75
|
+
actionButton: Button,
|
|
76
|
+
toggleButton: ToggleButton,
|
|
77
|
+
menuButton: MenuButton,
|
|
78
|
+
actionButtonTooltip: Tooltip,
|
|
79
|
+
toggleButtonTooltip: Tooltip,
|
|
80
|
+
menuButtonTooltip: Tooltip
|
|
81
|
+
},
|
|
82
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
83
|
+
ref,
|
|
84
|
+
...props,
|
|
85
|
+
// because we're passing in children to the NavItem,
|
|
86
|
+
// We can be explicit about the children prop here
|
|
87
|
+
children: null
|
|
88
|
+
}), {
|
|
89
|
+
elementType: 'div'
|
|
90
|
+
}),
|
|
91
|
+
navItem: navItemShorthand,
|
|
92
|
+
actionButton: actionButtonShorthand,
|
|
93
|
+
toggleButton: toggleButtonShorthand,
|
|
94
|
+
menuButton: menuButtonShorthand,
|
|
95
|
+
actionButtonTooltip: actionButtonTooltipShorthand,
|
|
96
|
+
toggleButtonTooltip: toggleButtonTooltipShorthand,
|
|
97
|
+
menuButtonTooltip: menuButtonTooltipShorthand,
|
|
98
|
+
density,
|
|
99
|
+
isSubNav
|
|
100
|
+
};
|
|
101
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitNavItem/useSplitNavItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { Tooltip } from '@fluentui/react-tooltip';\nimport type { SplitNavItemProps, SplitNavItemState } from './SplitNavItem.types';\nimport { useNavContext_unstable } from '../NavContext';\nimport { Button, MenuButton, ToggleButton } from '@fluentui/react-button';\nimport { MoreHorizontalFilled, Pin20Regular } from '@fluentui/react-icons';\nimport { NavItem } from '../NavItem/index';\nimport { NavSubItem } from '../NavSubItem/NavSubItem';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\n\n/**\n * Create the state required to render SplitNavItem.\n *\n * The returned state can be modified with hooks such as useSplitNavItemStyles_unstable,\n * before being passed to renderSplitNavItem_unstable.\n *\n * @param props - props from this instance of SplitNavItem\n * @param ref - reference to root HTMLDivElement of SplitNavItem\n */\nexport const useSplitNavItem_unstable = (\n props: SplitNavItemProps,\n ref: React.Ref<HTMLDivElement>,\n): SplitNavItemState => {\n const {\n navItem,\n actionButton,\n toggleButton,\n menuButton,\n actionButtonTooltip,\n toggleButtonTooltip,\n menuButtonTooltip,\n children,\n } = props;\n\n const { density = 'medium' } = useNavContext_unstable();\n\n const { value: potentialParenValue } = useNavCategoryContext_unstable();\n\n const isSubNav = potentialParenValue.length > 0 ? true : false;\n\n const navItemShorthand = slot.always(navItem, {\n defaultProps: {\n children,\n },\n elementType: isSubNav ? NavSubItem : NavItem,\n });\n\n const actionButtonShorthand = slot.optional(actionButton, {\n defaultProps: {\n icon: <Pin20Regular />,\n size: 'small',\n appearance: 'transparent',\n },\n elementType: Button,\n });\n\n const toggleButtonShorthand = slot.optional(toggleButton, {\n defaultProps: {\n icon: <Pin20Regular />,\n size: 'small',\n appearance: 'transparent',\n },\n elementType: ToggleButton,\n });\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n icon: <MoreHorizontalFilled />,\n size: 'small',\n appearance: 'transparent',\n },\n elementType: MenuButton,\n });\n\n const actionButtonTooltipShorthand = slot.optional(actionButtonTooltip, {\n defaultProps: { relationship: 'label' },\n elementType: Tooltip,\n });\n\n const toggleButtonTooltipShorthand = slot.optional(toggleButtonTooltip, {\n defaultProps: { relationship: 'label' },\n elementType: Tooltip,\n });\n\n const menuButtonTooltipShorthand = slot.optional(menuButtonTooltip, {\n defaultProps: { relationship: 'label' },\n elementType: Tooltip,\n });\n\n return {\n components: {\n root: 'div',\n navItem: isSubNav ? NavSubItem : NavItem,\n actionButton: Button,\n toggleButton: ToggleButton,\n menuButton: MenuButton,\n actionButtonTooltip: Tooltip,\n toggleButtonTooltip: Tooltip,\n menuButtonTooltip: Tooltip,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n // because we're passing in children to the NavItem,\n // We can be explicit about the children prop here\n children: null,\n }),\n { elementType: 'div' },\n ),\n navItem: navItemShorthand,\n actionButton: actionButtonShorthand,\n toggleButton: toggleButtonShorthand,\n menuButton: menuButtonShorthand,\n actionButtonTooltip: actionButtonTooltipShorthand,\n toggleButtonTooltip: toggleButtonTooltipShorthand,\n menuButtonTooltip: menuButtonTooltipShorthand,\n density,\n isSubNav,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","Tooltip","useNavContext_unstable","Button","MenuButton","ToggleButton","MoreHorizontalFilled","Pin20Regular","NavItem","NavSubItem","useNavCategoryContext_unstable","useSplitNavItem_unstable","props","ref","navItem","actionButton","toggleButton","menuButton","actionButtonTooltip","toggleButtonTooltip","menuButtonTooltip","children","density","value","potentialParenValue","isSubNav","length","navItemShorthand","always","defaultProps","elementType","actionButtonShorthand","optional","icon","size","appearance","toggleButtonShorthand","menuButtonShorthand","actionButtonTooltipShorthand","relationship","toggleButtonTooltipShorthand","menuButtonTooltipShorthand","components","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,OAAO,QAAQ,0BAA0B;AAElD,SAASC,sBAAsB,QAAQ,gBAAgB;AACvD,SAASC,MAAM,EAAEC,UAAU,EAAEC,YAAY,QAAQ,yBAAyB;AAC1E,SAASC,oBAAoB,EAAEC,YAAY,QAAQ,wBAAwB;AAC3E,SAASC,OAAO,QAAQ,mBAAmB;AAC3C,SAASC,UAAU,QAAQ,2BAA2B;AACtD,SAASC,8BAA8B,QAAQ,wBAAwB;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,MAAM,EACJC,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,UAAU,EACVC,mBAAmB,EACnBC,mBAAmB,EACnBC,iBAAiB,EACjBC,QAAQ,EACT,GAAGT;IAEJ,MAAM,EAAEU,UAAU,QAAQ,EAAE,GAAGpB;IAE/B,MAAM,EAAEqB,OAAOC,mBAAmB,EAAE,GAAGd;IAEvC,MAAMe,WAAWD,oBAAoBE,MAAM,GAAG,IAAI,OAAO;IAEzD,MAAMC,mBAAmB3B,KAAK4B,MAAM,CAACd,SAAS;QAC5Ce,cAAc;YACZR;QACF;QACAS,aAAaL,WAAWhB,aAAaD;IACvC;IAEA,MAAMuB,wBAAwB/B,KAAKgC,QAAQ,CAACjB,cAAc;QACxDc,cAAc;YACZI,oBAAM,oBAAC1B;YACP2B,MAAM;YACNC,YAAY;QACd;QACAL,aAAa3B;IACf;IAEA,MAAMiC,wBAAwBpC,KAAKgC,QAAQ,CAAChB,cAAc;QACxDa,cAAc;YACZI,oBAAM,oBAAC1B;YACP2B,MAAM;YACNC,YAAY;QACd;QACAL,aAAazB;IACf;IAEA,MAAMgC,sBAAsBrC,KAAKgC,QAAQ,CAACf,YAAY;QACpDY,cAAc;YACZI,oBAAM,oBAAC3B;YACP4B,MAAM;YACNC,YAAY;QACd;QACAL,aAAa1B;IACf;IAEA,MAAMkC,+BAA+BtC,KAAKgC,QAAQ,CAACd,qBAAqB;QACtEW,cAAc;YAAEU,cAAc;QAAQ;QACtCT,aAAa7B;IACf;IAEA,MAAMuC,+BAA+BxC,KAAKgC,QAAQ,CAACb,qBAAqB;QACtEU,cAAc;YAAEU,cAAc;QAAQ;QACtCT,aAAa7B;IACf;IAEA,MAAMwC,6BAA6BzC,KAAKgC,QAAQ,CAACZ,mBAAmB;QAClES,cAAc;YAAEU,cAAc;QAAQ;QACtCT,aAAa7B;IACf;IAEA,OAAO;QACLyC,YAAY;YACVC,MAAM;YACN7B,SAASW,WAAWhB,aAAaD;YACjCO,cAAcZ;YACda,cAAcX;YACdY,YAAYb;YACZc,qBAAqBjB;YACrBkB,qBAAqBlB;YACrBmB,mBAAmBnB;QACrB;QACA0C,MAAM3C,KAAK4B,MAAM,CACf7B,yBAAyB,OAAO;YAC9Bc;YACA,GAAGD,KAAK;YACR,oDAAoD;YACpD,kDAAkD;YAClDS,UAAU;QACZ,IACA;YAAES,aAAa;QAAM;QAEvBhB,SAASa;QACTZ,cAAcgB;QACdf,cAAcoB;QACdnB,YAAYoB;QACZnB,qBAAqBoB;QACrBnB,qBAAqBqB;QACrBpB,mBAAmBqB;QACnBnB;QACAG;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { navItemTokens, useRootDefaultClassName } from '../sharedNavStyles.styles';
|
|
3
|
+
import { tokens } from '@fluentui/react-theme';
|
|
4
|
+
export const splitNavItemClassNames = {
|
|
5
|
+
root: 'fui-SplitNavItem',
|
|
6
|
+
navItem: 'fui-SplitNavItem__navItem',
|
|
7
|
+
actionButton: 'fui-SplitNavItem__actionButton',
|
|
8
|
+
toggleButton: 'fui-SplitNavItem__toggleButton',
|
|
9
|
+
menuButton: 'fui-SplitNavItem__menuButton',
|
|
10
|
+
/**
|
|
11
|
+
* Tooltips don't have a class name prop, so this is just to satisfy the linter.
|
|
12
|
+
*/
|
|
13
|
+
actionButtonTooltip: 'fui-SplitNavItem__actionButtonTooltip',
|
|
14
|
+
toggleButtonTooltip: 'fui-SplitNavItem__toggleButtonTooltip',
|
|
15
|
+
menuButtonTooltip: 'fui-SplitNavItem__menuButtonTooltip'
|
|
16
|
+
};
|
|
17
|
+
// Don't use makeResetStyles here because the sub components call it once and
|
|
18
|
+
// This links says that makeResetStyles should only be called once per element
|
|
19
|
+
// https://griffel.js.org/react/api/make-reset-styles/#limitations
|
|
20
|
+
/**
|
|
21
|
+
* Styles for the root slot
|
|
22
|
+
*/
|
|
23
|
+
const useSplitNaveItemStyles = /*#__PURE__*/__styles({
|
|
24
|
+
baseRoot: {
|
|
25
|
+
mc9l5x: "f22iagw",
|
|
26
|
+
i8kkvl: 0,
|
|
27
|
+
Belr9w4: 0,
|
|
28
|
+
rmohyg: "fx80lhs",
|
|
29
|
+
Bt984gj: "f1q9h2pe",
|
|
30
|
+
Byoj8tv: 0,
|
|
31
|
+
uwmqm3: 0,
|
|
32
|
+
z189sj: 0,
|
|
33
|
+
z8tnut: 0,
|
|
34
|
+
B0ocmuz: "f19jm9xf",
|
|
35
|
+
fsow6f: "fgusgyc",
|
|
36
|
+
De3pzq: "f1ctqxl6",
|
|
37
|
+
B3o57yi: "fnsygzv",
|
|
38
|
+
Bkqvd7p: "f1e9ux7i",
|
|
39
|
+
Bmy1vo4: "f1xfaukr",
|
|
40
|
+
Jwef8y: "f11oyicx",
|
|
41
|
+
ecr2s2: "f9fof1w"
|
|
42
|
+
},
|
|
43
|
+
baseNavItem: {
|
|
44
|
+
mc9l5x: "f22iagw",
|
|
45
|
+
B9bfxx9: "f1cxpek8",
|
|
46
|
+
qb2dma: "f1ub7u0d",
|
|
47
|
+
fsow6f: ["f1o700av", "fes3tcz"],
|
|
48
|
+
qhf8xq: "f10pi13n",
|
|
49
|
+
Brf1p80: "f1s9ku6b",
|
|
50
|
+
i8kkvl: 0,
|
|
51
|
+
Belr9w4: 0,
|
|
52
|
+
rmohyg: "f1u2hskj",
|
|
53
|
+
De3pzq: "f3rmtva"
|
|
54
|
+
},
|
|
55
|
+
baseSecondary: {
|
|
56
|
+
Bf4jedk: "f107v6xj",
|
|
57
|
+
Bnt446c: "f1y335lp",
|
|
58
|
+
B1hrpyx: "f12pses1",
|
|
59
|
+
rjzwhg: "fibmr9j",
|
|
60
|
+
Bt984gj: "f1s2louj"
|
|
61
|
+
},
|
|
62
|
+
baseMedium: {
|
|
63
|
+
rjzwhg: "fjtod8q"
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
d: [".f22iagw{display:flex;}", [".fx80lhs{gap:unset;}", {
|
|
67
|
+
p: -1
|
|
68
|
+
}], ".f1q9h2pe{align-items:stretch;}", [".f19jm9xf{padding:unset;}", {
|
|
69
|
+
p: -1
|
|
70
|
+
}], ".fgusgyc{text-align:unset;}", ".f1ctqxl6{background-color:var(--colorNeutralBackground4);}", ".fnsygzv{transition-duration:var(--durationFaster);}", ".f1e9ux7i{transition-timing-function:var(--curveLinear);}", ".f1xfaukr{transition-property:background;}", ".f1cxpek8{text-transform:none;}", ".f1ub7u0d{align-self:stretch;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}", ".f10pi13n{position:relative;}", ".f1s9ku6b{justify-content:start;}", [".f1u2hskj{gap:var(--spacingVerticalL);}", {
|
|
71
|
+
p: -1
|
|
72
|
+
}], ".f3rmtva{background-color:transparent;}", ".f107v6xj{min-width:28px;}", ".f1y335lp{-webkit-padding-end:12px;padding-inline-end:12px;}", ".f12pses1{-webkit-padding-start:5px;padding-inline-start:5px;}", ".fibmr9j{padding-block-start:5px;}", ".f1s2louj{align-items:start;}", ".fjtod8q{padding-block-start:9px;}"],
|
|
73
|
+
h: [".f11oyicx:hover{background-color:var(--colorNeutralBackground4Hover);}"],
|
|
74
|
+
a: [".f9fof1w:active{background-color:var(--colorNeutralBackground4Pressed);}"]
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Apply styling to the SplitNavItem slots based on the state
|
|
78
|
+
*/
|
|
79
|
+
export const useSplitNavItemStyles_unstable = state => {
|
|
80
|
+
'use no memo';
|
|
81
|
+
|
|
82
|
+
const splitNavItemStyles = useSplitNaveItemStyles();
|
|
83
|
+
const sharedRootClassNames = useRootDefaultClassName();
|
|
84
|
+
state.root.className = mergeClasses(splitNavItemClassNames.root, sharedRootClassNames, splitNavItemStyles.baseRoot, state.root.className);
|
|
85
|
+
if (state.navItem) {
|
|
86
|
+
state.navItem.className = mergeClasses(splitNavItemClassNames.navItem, splitNavItemStyles.baseNavItem, state.navItem.className);
|
|
87
|
+
}
|
|
88
|
+
if (state.actionButton) {
|
|
89
|
+
state.actionButton.className = mergeClasses(splitNavItemClassNames.actionButton, splitNavItemStyles.baseSecondary, state.density === 'medium' && splitNavItemStyles.baseMedium, state.actionButton.className);
|
|
90
|
+
}
|
|
91
|
+
if (state.toggleButton) {
|
|
92
|
+
state.toggleButton.className = mergeClasses(splitNavItemClassNames.toggleButton, splitNavItemStyles.baseSecondary, state.density === 'medium' && splitNavItemStyles.baseMedium, state.toggleButton.className);
|
|
93
|
+
}
|
|
94
|
+
if (state.menuButton) {
|
|
95
|
+
state.menuButton.className = mergeClasses(splitNavItemClassNames.menuButton, splitNavItemStyles.baseSecondary, state.density === 'medium' && splitNavItemStyles.baseMedium, state.menuButton.className);
|
|
96
|
+
}
|
|
97
|
+
return state;
|
|
98
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","navItemTokens","useRootDefaultClassName","tokens","splitNavItemClassNames","root","navItem","actionButton","toggleButton","menuButton","actionButtonTooltip","toggleButtonTooltip","menuButtonTooltip","useSplitNaveItemStyles","baseRoot","mc9l5x","i8kkvl","Belr9w4","rmohyg","Bt984gj","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","fsow6f","De3pzq","B3o57yi","Bkqvd7p","Bmy1vo4","Jwef8y","ecr2s2","baseNavItem","B9bfxx9","qb2dma","qhf8xq","Brf1p80","baseSecondary","Bf4jedk","Bnt446c","B1hrpyx","rjzwhg","baseMedium","d","p","h","a","useSplitNavItemStyles_unstable","state","splitNavItemStyles","sharedRootClassNames","className","density"],"sources":["useSplitNavItemStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { navItemTokens, useRootDefaultClassName } from '../sharedNavStyles.styles';\nimport { tokens } from '@fluentui/react-theme';\nexport const splitNavItemClassNames = {\n root: 'fui-SplitNavItem',\n navItem: 'fui-SplitNavItem__navItem',\n actionButton: 'fui-SplitNavItem__actionButton',\n toggleButton: 'fui-SplitNavItem__toggleButton',\n menuButton: 'fui-SplitNavItem__menuButton',\n /**\n * Tooltips don't have a class name prop, so this is just to satisfy the linter.\n */ actionButtonTooltip: 'fui-SplitNavItem__actionButtonTooltip',\n toggleButtonTooltip: 'fui-SplitNavItem__toggleButtonTooltip',\n menuButtonTooltip: 'fui-SplitNavItem__menuButtonTooltip'\n};\n// Don't use makeResetStyles here because the sub components call it once and\n// This links says that makeResetStyles should only be called once per element\n// https://griffel.js.org/react/api/make-reset-styles/#limitations\n/**\n * Styles for the root slot\n */ const useSplitNaveItemStyles = makeStyles({\n baseRoot: {\n display: 'flex',\n gap: 'unset',\n alignItems: 'stretch',\n padding: 'unset',\n textAlign: 'unset',\n backgroundColor: navItemTokens.backgroundColor,\n ...navItemTokens.transitionTokens,\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover\n },\n ':active': {\n backgroundColor: navItemTokens.backgroundColorPressed\n }\n },\n baseNavItem: {\n // styles that we want to disagree with the default on\n display: 'flex',\n textTransform: 'none',\n alignSelf: 'stretch',\n textAlign: 'left',\n position: 'relative',\n justifyContent: 'start',\n gap: tokens.spacingVerticalL,\n backgroundColor: 'transparent'\n },\n baseSecondary: {\n minWidth: '28px',\n paddingInlineEnd: '12px',\n paddingInlineStart: '5px',\n paddingBlockStart: '5px',\n alignItems: 'start'\n },\n baseMedium: {\n paddingBlockStart: '9px'\n }\n});\n/**\n * Apply styling to the SplitNavItem slots based on the state\n */ export const useSplitNavItemStyles_unstable = (state)=>{\n 'use no memo';\n const splitNavItemStyles = useSplitNaveItemStyles();\n const sharedRootClassNames = useRootDefaultClassName();\n state.root.className = mergeClasses(splitNavItemClassNames.root, sharedRootClassNames, splitNavItemStyles.baseRoot, state.root.className);\n if (state.navItem) {\n state.navItem.className = mergeClasses(splitNavItemClassNames.navItem, splitNavItemStyles.baseNavItem, state.navItem.className);\n }\n if (state.actionButton) {\n state.actionButton.className = mergeClasses(splitNavItemClassNames.actionButton, splitNavItemStyles.baseSecondary, state.density === 'medium' && splitNavItemStyles.baseMedium, state.actionButton.className);\n }\n if (state.toggleButton) {\n state.toggleButton.className = mergeClasses(splitNavItemClassNames.toggleButton, splitNavItemStyles.baseSecondary, state.density === 'medium' && splitNavItemStyles.baseMedium, state.toggleButton.className);\n }\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(splitNavItemClassNames.menuButton, splitNavItemStyles.baseSecondary, state.density === 'medium' && splitNavItemStyles.baseMedium, state.menuButton.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,aAAa,EAAEC,uBAAuB,QAAQ,2BAA2B;AAClF,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAE,2BAA2B;EACpCC,YAAY,EAAE,gCAAgC;EAC9CC,YAAY,EAAE,gCAAgC;EAC9CC,UAAU,EAAE,8BAA8B;EAC1C;AACJ;AACA;EAAMC,mBAAmB,EAAE,uCAAuC;EAC9DC,mBAAmB,EAAE,uCAAuC;EAC5DC,iBAAiB,EAAE;AACvB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AAAI,MAAMC,sBAAsB,gBAAGd,QAAA;EAAAe,QAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,WAAA;IAAAjB,MAAA;IAAAkB,OAAA;IAAAC,MAAA;IAAAT,MAAA;IAAAU,MAAA;IAAAC,OAAA;IAAApB,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAQ,MAAA;EAAA;EAAAW,aAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAtB,OAAA;EAAA;EAAAuB,UAAA;IAAAD,MAAA;EAAA;AAAA;EAAAE,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;EAAAC,CAAA;EAAAC,CAAA;AAAA,CAqClC,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,aAAa;;EACb,MAAMC,kBAAkB,GAAGpC,sBAAsB,CAAC,CAAC;EACnD,MAAMqC,oBAAoB,GAAGhD,uBAAuB,CAAC,CAAC;EACtD8C,KAAK,CAAC3C,IAAI,CAAC8C,SAAS,GAAGnD,YAAY,CAACI,sBAAsB,CAACC,IAAI,EAAE6C,oBAAoB,EAAED,kBAAkB,CAACnC,QAAQ,EAAEkC,KAAK,CAAC3C,IAAI,CAAC8C,SAAS,CAAC;EACzI,IAAIH,KAAK,CAAC1C,OAAO,EAAE;IACf0C,KAAK,CAAC1C,OAAO,CAAC6C,SAAS,GAAGnD,YAAY,CAACI,sBAAsB,CAACE,OAAO,EAAE2C,kBAAkB,CAACjB,WAAW,EAAEgB,KAAK,CAAC1C,OAAO,CAAC6C,SAAS,CAAC;EACnI;EACA,IAAIH,KAAK,CAACzC,YAAY,EAAE;IACpByC,KAAK,CAACzC,YAAY,CAAC4C,SAAS,GAAGnD,YAAY,CAACI,sBAAsB,CAACG,YAAY,EAAE0C,kBAAkB,CAACZ,aAAa,EAAEW,KAAK,CAACI,OAAO,KAAK,QAAQ,IAAIH,kBAAkB,CAACP,UAAU,EAAEM,KAAK,CAACzC,YAAY,CAAC4C,SAAS,CAAC;EACjN;EACA,IAAIH,KAAK,CAACxC,YAAY,EAAE;IACpBwC,KAAK,CAACxC,YAAY,CAAC2C,SAAS,GAAGnD,YAAY,CAACI,sBAAsB,CAACI,YAAY,EAAEyC,kBAAkB,CAACZ,aAAa,EAAEW,KAAK,CAACI,OAAO,KAAK,QAAQ,IAAIH,kBAAkB,CAACP,UAAU,EAAEM,KAAK,CAACxC,YAAY,CAAC2C,SAAS,CAAC;EACjN;EACA,IAAIH,KAAK,CAACvC,UAAU,EAAE;IAClBuC,KAAK,CAACvC,UAAU,CAAC0C,SAAS,GAAGnD,YAAY,CAACI,sBAAsB,CAACK,UAAU,EAAEwC,kBAAkB,CAACZ,aAAa,EAAEW,KAAK,CAACI,OAAO,KAAK,QAAQ,IAAIH,kBAAkB,CAACP,UAAU,EAAEM,KAAK,CAACvC,UAAU,CAAC0C,SAAS,CAAC;EAC3M;EACA,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
|
|
2
|
+
import { tokens, typographyStyles } from '@fluentui/react-theme';
|
|
3
|
+
import { __resetStyles, __styles } from '@griffel/react';
|
|
4
|
+
// Styles shared by several nav components.
|
|
5
|
+
export const navItemTokens = {
|
|
6
|
+
defaultDrawerWidth: 260,
|
|
7
|
+
indicatorOffset: 16,
|
|
8
|
+
indicatorWidth: 4,
|
|
9
|
+
indicatorHeight: 20,
|
|
10
|
+
backgroundColor: tokens.colorNeutralBackground4,
|
|
11
|
+
backgroundColorHover: tokens.colorNeutralBackground4Hover,
|
|
12
|
+
backgroundColorPressed: tokens.colorNeutralBackground4Pressed,
|
|
13
|
+
animationTokens: {
|
|
14
|
+
animationDuration: tokens.durationFaster,
|
|
15
|
+
animationFillMode: 'both',
|
|
16
|
+
animationTimingFunction: tokens.curveLinear
|
|
17
|
+
},
|
|
18
|
+
transitionTokens: {
|
|
19
|
+
transitionDuration: tokens.durationFaster,
|
|
20
|
+
transitionTimingFunction: tokens.curveLinear,
|
|
21
|
+
transitionProperty: 'background'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Styles for the root slot
|
|
26
|
+
* Shared across NavItem, NavCategoryItem, NavSubItem, and AppItem
|
|
27
|
+
*/
|
|
28
|
+
export const useRootDefaultClassName = /*#__PURE__*/__resetStyles("rdi7s9k", "r94071", [".rdi7s9k{display:flex;text-transform:none;position:relative;justify-content:start;align-items:flex-start;text-align:left;gap:var(--spacingVerticalL);padding:var(--spacingVerticalMNudge) var(--spacingHorizontalS) var(--spacingVerticalMNudge) var(--spacingHorizontalMNudge);background-color:var(--colorNeutralBackground4);border-radius:var(--borderRadiusMedium);color:var(--colorNeutralForeground2);text-decoration-line:none;border:none;box-sizing:border-box;cursor:pointer;transition-duration:var(--durationFaster);transition-timing-function:var(--curveLinear);transition-property:background;width:100%;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}", ".rdi7s9k:hover{background-color:var(--colorNeutralBackground4Hover);}", ".rdi7s9k:focus-visible{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);outline-offset:calc(var(--strokeWidthThick) * -1);}", ".r94071{display:flex;text-transform:none;position:relative;justify-content:start;align-items:flex-start;text-align:right;gap:var(--spacingVerticalL);padding:var(--spacingVerticalMNudge) var(--spacingHorizontalMNudge) var(--spacingVerticalMNudge) var(--spacingHorizontalS);background-color:var(--colorNeutralBackground4);border-radius:var(--borderRadiusMedium);color:var(--colorNeutralForeground2);text-decoration-line:none;border:none;box-sizing:border-box;cursor:pointer;transition-duration:var(--durationFaster);transition-timing-function:var(--curveLinear);transition-property:background;width:100%;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}", ".r94071:hover{background-color:var(--colorNeutralBackground4Hover);}", ".r94071:focus-visible{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);outline-offset:calc(var(--strokeWidthThick) * -1);}"]);
|
|
29
|
+
export const useSmallStyles = /*#__PURE__*/__styles({
|
|
30
|
+
root: {
|
|
31
|
+
Byoj8tv: 0,
|
|
32
|
+
uwmqm3: 0,
|
|
33
|
+
z189sj: 0,
|
|
34
|
+
z8tnut: 0,
|
|
35
|
+
B0ocmuz: ["f1434i56", "f1jkyjtc"]
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
d: [[".f1434i56{padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalMNudge);}", {
|
|
39
|
+
p: -1
|
|
40
|
+
}], [".f1jkyjtc{padding:var(--spacingVerticalXS) var(--spacingHorizontalMNudge) var(--spacingVerticalXS) var(--spacingHorizontalS);}", {
|
|
41
|
+
p: -1
|
|
42
|
+
}]]
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Styles for the content slot (children)
|
|
46
|
+
* Shared across NavItem, NavCategoryItem, NavSubItem, and AppItem
|
|
47
|
+
*/
|
|
48
|
+
export const useContentStyles = /*#__PURE__*/__styles({
|
|
49
|
+
selected: {
|
|
50
|
+
Bahqtrf: "fk6fouc",
|
|
51
|
+
Be2twd7: "fkhj508",
|
|
52
|
+
Bhrd7zp: "fl43uef",
|
|
53
|
+
Bg96gwp: "f1i3iumi"
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* French fry styles
|
|
60
|
+
* Shared across NavItem, NavCategoryItem, and NavSubItem
|
|
61
|
+
*/
|
|
62
|
+
export const useIndicatorStyles = /*#__PURE__*/__styles({
|
|
63
|
+
base: {
|
|
64
|
+
E3zdtr: "f1mdlcz9",
|
|
65
|
+
xr36ep: "fpil94b",
|
|
66
|
+
B67388b: "f90z1up",
|
|
67
|
+
Bitv4sc: "f2ic3ny",
|
|
68
|
+
Br128sd: "f1xz7mvd",
|
|
69
|
+
rjyhj6: "f3i5gj0",
|
|
70
|
+
Bjyk6c5: "fi4v1pz",
|
|
71
|
+
Dlnsje: "f1tvrmnx",
|
|
72
|
+
a2br6o: "f1p1ggug",
|
|
73
|
+
d9w3h3: 0,
|
|
74
|
+
B3778ie: 0,
|
|
75
|
+
B4j8arr: 0,
|
|
76
|
+
Bl18szs: 0,
|
|
77
|
+
Blrzh8d: "f3b9emi",
|
|
78
|
+
Bsft5z2: "f13zj6fq",
|
|
79
|
+
faxfa8: 0,
|
|
80
|
+
bj685l: 0,
|
|
81
|
+
Bovfycw: 0,
|
|
82
|
+
B8cfl5i: "fl9mdp8",
|
|
83
|
+
Bg7zzdw: "f6174p6"
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
d: [".f1mdlcz9::after{position:absolute;}", ".fpil94b::after{animation-duration:var(--durationFaster);}", ".f90z1up::after{animation-fill-mode:both;}", ".f2ic3ny::after{animation-timing-function:var(--curveLinear);}", ".f1xz7mvd::after{animation-name:f1ayorr4;}", ".f3i5gj0::after{-webkit-margin-start:-16px;margin-inline-start:-16px;}", ".fi4v1pz::after{background-color:var(--colorCompoundBrandForeground1);}", ".f1tvrmnx::after{height:20px;}", ".f1p1ggug::after{width:4px;}", [".f3b9emi::after{border-radius:var(--borderRadiusCircular);}", {
|
|
87
|
+
p: -1
|
|
88
|
+
}], ".f13zj6fq::after{content:\"\";}"],
|
|
89
|
+
k: ["@keyframes f1ayorr4{0%{background:transparent;}100%{background:var(--colorCompoundBrandForeground1);}}"],
|
|
90
|
+
m: [["@media (forced-colors: active){.fl9mdp8::after{outline:solid 2px var(--colorTransparentStroke);}}", {
|
|
91
|
+
p: -1,
|
|
92
|
+
m: "(forced-colors: active)"
|
|
93
|
+
}], ["@media (forced-colors: active){.f6174p6::after{outline-offset:-2px;}}", {
|
|
94
|
+
m: "(forced-colors: active)"
|
|
95
|
+
}]]
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* Styles for the icon slot
|
|
99
|
+
* Shared across NavItem, NavCategoryItem, and NavSubItem
|
|
100
|
+
* We use the grid trick to stack the filled and regular icons on top of each other
|
|
101
|
+
*/
|
|
102
|
+
export const useIconStyles = /*#__PURE__*/__styles({
|
|
103
|
+
base: {
|
|
104
|
+
mc9l5x: "f13qh94s",
|
|
105
|
+
zoa1oz: "fngvled",
|
|
106
|
+
sshi5w: "f16gbxbe",
|
|
107
|
+
Bf4jedk: "f11u7vat",
|
|
108
|
+
Bt984gj: "f1w4ww9t",
|
|
109
|
+
Brf1p80: "f4d9j23",
|
|
110
|
+
B68tc82: 0,
|
|
111
|
+
Bmxbyg5: 0,
|
|
112
|
+
Bpg54ce: "f1a3p1vp",
|
|
113
|
+
B9gejnh: 0,
|
|
114
|
+
yr4pdu: 0,
|
|
115
|
+
Bvkmzld: 0,
|
|
116
|
+
mqdk8l: 0,
|
|
117
|
+
Gbjhqp: "f1uiug86",
|
|
118
|
+
obb2bi: "fwrh02z",
|
|
119
|
+
D0sxk3: "f16u1re",
|
|
120
|
+
Esdz9e: 0,
|
|
121
|
+
Bqil8sh: 0,
|
|
122
|
+
Bbom3er: 0,
|
|
123
|
+
djjtid: 0,
|
|
124
|
+
mz70lj: "f1jsjwoh",
|
|
125
|
+
t6yez3: "f8bsbmo"
|
|
126
|
+
},
|
|
127
|
+
selected: {
|
|
128
|
+
C9vb3z: "f5rs5gh",
|
|
129
|
+
ux3ctl: "f1ioc1t6",
|
|
130
|
+
Ba906uv: "fey0lwf",
|
|
131
|
+
D0sxk3: "fxoiby5",
|
|
132
|
+
hndn0g: "fnh0dvc",
|
|
133
|
+
cw2nnk: "fp7jrvw",
|
|
134
|
+
Bkztwl0: "fdt4y6x",
|
|
135
|
+
H8nmoi: "fvl64og",
|
|
136
|
+
ipgedg: "ffh1t26"
|
|
137
|
+
}
|
|
138
|
+
}, {
|
|
139
|
+
d: [".f13qh94s{display:grid;}", ".fngvled{grid-template-areas:overlay-area;}", ".f16gbxbe{min-height:20px;}", ".f11u7vat{min-width:20px;}", ".f1w4ww9t{align-items:top;}", ".f4d9j23{justify-content:center;}", [".f1a3p1vp{overflow:hidden;}", {
|
|
140
|
+
p: -1
|
|
141
|
+
}], [".f1uiug86 .fui-Icon-filled{grid-area:overlay-area;}", {
|
|
142
|
+
p: -1
|
|
143
|
+
}], ".fwrh02z .fui-Icon-filled{color:transparent;}", ".f16u1re .fui-Icon-filled{display:none;}", [".f1jsjwoh .fui-Icon-regular{grid-area:overlay-area;}", {
|
|
144
|
+
p: -1
|
|
145
|
+
}], ".f8bsbmo .fui-Icon-regular{display:inline;}", ".f5rs5gh .fui-Icon-filled{animation-duration:var(--durationFaster);}", ".f1ioc1t6 .fui-Icon-filled{animation-fill-mode:both;}", ".fey0lwf .fui-Icon-filled{animation-timing-function:var(--curveLinear);}", ".fxoiby5 .fui-Icon-filled{display:inline;}", ".fnh0dvc .fui-Icon-filled{animation-name:f9t3kp0;}", ".fp7jrvw .fui-Icon-regular{animation-duration:var(--durationFaster);}", ".fdt4y6x .fui-Icon-regular{animation-fill-mode:both;}", ".fvl64og .fui-Icon-regular{animation-timing-function:var(--curveLinear);}", ".ffh1t26 .fui-Icon-regular{animation-name:fvunsy5;}"],
|
|
146
|
+
k: ["@keyframes f9t3kp0{0%{opacity:0;color:transparent;}100%{opacity:1;color:var(--colorNeutralForeground2BrandSelected);}}", "@keyframes fvunsy5{0%{opacity:1;color:var(--colorNeutralForeground2);}100%{opacity:0;color:transparent;}}"]
|
|
147
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["iconFilledClassName","iconRegularClassName","tokens","typographyStyles","__resetStyles","__styles","navItemTokens","defaultDrawerWidth","indicatorOffset","indicatorWidth","indicatorHeight","backgroundColor","colorNeutralBackground4","backgroundColorHover","colorNeutralBackground4Hover","backgroundColorPressed","colorNeutralBackground4Pressed","animationTokens","animationDuration","durationFaster","animationFillMode","animationTimingFunction","curveLinear","transitionTokens","transitionDuration","transitionTimingFunction","transitionProperty","useRootDefaultClassName","useSmallStyles","root","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","d","p","useContentStyles","selected","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","useIndicatorStyles","base","E3zdtr","xr36ep","B67388b","Bitv4sc","Br128sd","rjyhj6","Bjyk6c5","Dlnsje","a2br6o","d9w3h3","B3778ie","B4j8arr","Bl18szs","Blrzh8d","Bsft5z2","faxfa8","bj685l","Bovfycw","B8cfl5i","Bg7zzdw","k","m","useIconStyles","mc9l5x","zoa1oz","sshi5w","Bf4jedk","Bt984gj","Brf1p80","B68tc82","Bmxbyg5","Bpg54ce","B9gejnh","yr4pdu","Bvkmzld","mqdk8l","Gbjhqp","obb2bi","D0sxk3","Esdz9e","Bqil8sh","Bbom3er","djjtid","mz70lj","t6yez3","C9vb3z","ux3ctl","Ba906uv","hndn0g","cw2nnk","Bkztwl0","H8nmoi","ipgedg"],"sources":["sharedNavStyles.styles.js"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles } from '@griffel/react';\n// Styles shared by several nav components.\nexport const navItemTokens = {\n defaultDrawerWidth: 260,\n indicatorOffset: 16,\n indicatorWidth: 4,\n indicatorHeight: 20,\n backgroundColor: tokens.colorNeutralBackground4,\n backgroundColorHover: tokens.colorNeutralBackground4Hover,\n backgroundColorPressed: tokens.colorNeutralBackground4Pressed,\n animationTokens: {\n animationDuration: tokens.durationFaster,\n animationFillMode: 'both',\n animationTimingFunction: tokens.curveLinear\n },\n transitionTokens: {\n transitionDuration: tokens.durationFaster,\n transitionTimingFunction: tokens.curveLinear,\n transitionProperty: 'background'\n }\n};\n/**\n * Styles for the root slot\n * Shared across NavItem, NavCategoryItem, NavSubItem, and AppItem\n */ export const useRootDefaultClassName = makeResetStyles({\n display: 'flex',\n textTransform: 'none',\n position: 'relative',\n justifyContent: 'start',\n alignItems: 'flex-start',\n textAlign: 'left',\n gap: tokens.spacingVerticalL,\n padding: `${tokens.spacingVerticalMNudge} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalMNudge} ${tokens.spacingHorizontalMNudge}`,\n backgroundColor: navItemTokens.backgroundColor,\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground2,\n textDecorationLine: 'none',\n border: 'none',\n // this element can change between a button and an anchor\n // so we need to reset box sizing to prevent horizontal overflow\n boxSizing: 'border-box',\n cursor: 'pointer',\n transitionDuration: navItemTokens.animationTokens.animationDuration,\n transitionTimingFunction: navItemTokens.animationTokens.animationTimingFunction,\n transitionProperty: 'background',\n width: '100%',\n ...typographyStyles.body1,\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover\n },\n // Use custom insert focus indicator\n '&:focus-visible': {\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n outlineOffset: `calc(${tokens.strokeWidthThick} * -1)`\n }\n});\nexport const useSmallStyles = makeStyles({\n root: {\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalMNudge}`\n }\n});\n/**\n * Styles for the content slot (children)\n * Shared across NavItem, NavCategoryItem, NavSubItem, and AppItem\n */ export const useContentStyles = makeStyles({\n selected: typographyStyles.body1Strong\n});\n/**\n * French fry styles\n * Shared across NavItem, NavCategoryItem, and NavSubItem\n */ export const useIndicatorStyles = makeStyles({\n base: {\n '::after': {\n position: 'absolute',\n ...navItemTokens.animationTokens,\n animationName: {\n '0%': {\n background: 'transparent'\n },\n '100%': {\n background: tokens.colorCompoundBrandForeground1\n }\n },\n marginInlineStart: `-${navItemTokens.indicatorOffset}px`,\n backgroundColor: tokens.colorCompoundBrandForeground1,\n height: `${navItemTokens.indicatorHeight}px`,\n width: `${navItemTokens.indicatorWidth}px`,\n borderRadius: tokens.borderRadiusCircular,\n content: '\"\"'\n },\n '@media (forced-colors: active)': {\n '::after': {\n outline: `solid 2px ${tokens.colorTransparentStroke}`,\n outlineOffset: '-2px'\n }\n }\n }\n});\n/**\n * Styles for the icon slot\n * Shared across NavItem, NavCategoryItem, and NavSubItem\n * We use the grid trick to stack the filled and regular icons on top of each other\n */ export const useIconStyles = makeStyles({\n base: {\n display: 'grid',\n gridTemplateAreas: 'overlay-area',\n minHeight: '20px',\n minWidth: '20px',\n alignItems: 'top',\n justifyContent: 'center',\n overflow: 'hidden',\n [`& .${iconFilledClassName}`]: {\n gridArea: 'overlay-area',\n color: 'transparent',\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n gridArea: 'overlay-area',\n display: 'inline'\n }\n },\n selected: {\n [`& .${iconFilledClassName}`]: {\n ...navItemTokens.animationTokens,\n display: 'inline',\n animationName: {\n '0%': {\n opacity: 0,\n color: 'transparent'\n },\n '100%': {\n opacity: 1,\n color: tokens.colorNeutralForeground2BrandSelected\n }\n }\n },\n [`& .${iconRegularClassName}`]: {\n ...navItemTokens.animationTokens,\n animationName: {\n '0%': {\n opacity: 1,\n color: tokens.colorNeutralForeground2\n },\n '100%': {\n opacity: 0,\n color: 'transparent'\n }\n }\n }\n }\n});\n"],"mappings":"AAAA,SAASA,mBAAmB,EAAEC,oBAAoB,QAAQ,uBAAuB;AACjF,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAAAC,aAAA,EAAAC,QAAA,QAA4C,gBAAgB;AAC5D;AACA,OAAO,MAAMC,aAAa,GAAG;EACzBC,kBAAkB,EAAE,GAAG;EACvBC,eAAe,EAAE,EAAE;EACnBC,cAAc,EAAE,CAAC;EACjBC,eAAe,EAAE,EAAE;EACnBC,eAAe,EAAET,MAAM,CAACU,uBAAuB;EAC/CC,oBAAoB,EAAEX,MAAM,CAACY,4BAA4B;EACzDC,sBAAsB,EAAEb,MAAM,CAACc,8BAA8B;EAC7DC,eAAe,EAAE;IACbC,iBAAiB,EAAEhB,MAAM,CAACiB,cAAc;IACxCC,iBAAiB,EAAE,MAAM;IACzBC,uBAAuB,EAAEnB,MAAM,CAACoB;EACpC,CAAC;EACDC,gBAAgB,EAAE;IACdC,kBAAkB,EAAEtB,MAAM,CAACiB,cAAc;IACzCM,wBAAwB,EAAEvB,MAAM,CAACoB,WAAW;IAC5CI,kBAAkB,EAAE;EACxB;AACJ,CAAC;AACD;AACA;AACA;AACA;AAAI,OAAO,MAAMC,uBAAuB,gBAAGvB,aAAA,w5DA+B1C,CAAC;AACF,OAAO,MAAMwB,cAAc,gBAAGvB,QAAA;EAAAwB,IAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAI7B,CAAC;AACF;AACA;AACA;AACA;AAAI,OAAO,MAAMC,gBAAgB,gBAAGhC,QAAA;EAAAiC,QAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAP,CAAA;AAAA,CAEnC,CAAC;AACF;AACA;AACA;AACA;AAAI,OAAO,MAAMQ,kBAAkB,gBAAGtC,QAAA;EAAAuC,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAA7B,CAAA;IAAAC,CAAA;EAAA;EAAA6B,CAAA;EAAAC,CAAA;IAAA9B,CAAA;IAAA8B,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CA2BrC,CAAC;AACF;AACA;AACA;AACA;AACA;AAAI,OAAO,MAAMC,aAAa,gBAAG9D,QAAA;EAAAuC,IAAA;IAAAwB,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAnD,QAAA;IAAAoD,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAT,MAAA;IAAAU,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;AAAA;EAAA9D,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;EAAA6B,CAAA;AAAA,CAgDhC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export function useNavCategoryContextValues_unstable(state) {
|
|
3
|
+
const { open, value } = state;
|
|
4
|
+
const navCategory = React.useMemo(()=>({
|
|
5
|
+
open,
|
|
6
|
+
value
|
|
7
|
+
}), [
|
|
8
|
+
open,
|
|
9
|
+
value
|
|
10
|
+
]);
|
|
11
|
+
return {
|
|
12
|
+
categoryValue: navCategory
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/useNavCategoryContextValues_unstable.ts"],"sourcesContent":["import * as React from 'react';\nimport { NavCategoryState } from '../NavCategory';\nimport { NavCategoryContextValue, NavCategoryContextValues } from './NavCategoryContext';\n\nexport function useNavCategoryContextValues_unstable(state: NavCategoryState): NavCategoryContextValues {\n const { open, value } = state;\n const navCategory = React.useMemo<NavCategoryContextValue>(() => ({ open, value }), [open, value]);\n\n return { categoryValue: navCategory };\n}\n"],"names":["React","useNavCategoryContextValues_unstable","state","open","value","navCategory","useMemo","categoryValue"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,OAAO,SAASC,qCAAqCC,KAAuB;IAC1E,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGF;IACxB,MAAMG,cAAcL,MAAMM,OAAO,CAA0B,IAAO,CAAA;YAAEH;YAAMC;QAAM,CAAA,GAAI;QAACD;QAAMC;KAAM;IAEjG,OAAO;QAAEG,eAAeF;IAAY;AACtC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export function useNavCategoryItemContextValues_unstable(state) {
|
|
3
|
+
const { open, value } = state;
|
|
4
|
+
const navCategoryItem = React.useMemo(()=>({
|
|
5
|
+
open,
|
|
6
|
+
value
|
|
7
|
+
}), [
|
|
8
|
+
open,
|
|
9
|
+
value
|
|
10
|
+
]);
|
|
11
|
+
return {
|
|
12
|
+
navCategoryItem
|
|
13
|
+
};
|
|
14
|
+
}
|