@fluentui/react-nav 9.4.7 → 9.4.9
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 +30 -2
- package/lib/components/AppItem/AppItem.js.map +1 -1
- package/lib/components/AppItem/AppItem.types.js.map +1 -1
- package/lib/components/AppItem/index.js.map +1 -1
- package/lib/components/AppItem/renderAppItem.js +2 -2
- package/lib/components/AppItem/renderAppItem.js.map +1 -1
- package/lib/components/AppItem/useAppItem.js.map +1 -1
- package/lib/components/AppItem/useAppItemStyles.styles.raw.js.map +1 -1
- package/lib/components/AppItemStatic/AppItemStatic.js.map +1 -1
- package/lib/components/AppItemStatic/AppItemStatic.types.js.map +1 -1
- package/lib/components/AppItemStatic/index.js.map +1 -1
- package/lib/components/AppItemStatic/renderAppItemStatic.js +2 -2
- package/lib/components/AppItemStatic/renderAppItemStatic.js.map +1 -1
- package/lib/components/AppItemStatic/useAppItemStatic.js.map +1 -1
- package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.raw.js.map +1 -1
- package/lib/components/Hamburger/Hamburger.js.map +1 -1
- package/lib/components/Hamburger/Hamburger.types.js.map +1 -1
- package/lib/components/Hamburger/index.js.map +1 -1
- package/lib/components/Hamburger/useHamburger.js.map +1 -1
- package/lib/components/Hamburger/useHamburgerStyles.styles.raw.js.map +1 -1
- package/lib/components/Nav/Nav.js.map +1 -1
- package/lib/components/Nav/Nav.types.js.map +1 -1
- package/lib/components/Nav/index.js.map +1 -1
- package/lib/components/Nav/renderNav.js +2 -2
- package/lib/components/Nav/renderNav.js.map +1 -1
- package/lib/components/Nav/useNav.js.map +1 -1
- package/lib/components/Nav/useNavStyles.styles.raw.js.map +1 -1
- package/lib/components/NavCategory/NavCategory.js.map +1 -1
- package/lib/components/NavCategory/NavCategory.types.js.map +1 -1
- package/lib/components/NavCategory/index.js.map +1 -1
- package/lib/components/NavCategory/renderNavCategory.js.map +1 -1
- package/lib/components/NavCategory/useNavCategory.js.map +1 -1
- package/lib/components/NavCategoryContext.js.map +1 -1
- package/lib/components/NavCategoryItem/NavCategoryItem.js.map +1 -1
- package/lib/components/NavCategoryItem/NavCategoryItem.types.js.map +1 -1
- package/lib/components/NavCategoryItem/index.js.map +1 -1
- package/lib/components/NavCategoryItem/renderNavCategoryItem.js +2 -2
- package/lib/components/NavCategoryItem/renderNavCategoryItem.js.map +1 -1
- package/lib/components/NavCategoryItem/useNavCategoryItem.js.map +1 -1
- package/lib/components/NavCategoryItem/useNavCategoryItem.styles.raw.js.map +1 -1
- package/lib/components/NavCategoryItemContext.js.map +1 -1
- package/lib/components/NavContext.js.map +1 -1
- package/lib/components/NavContext.types.js.map +1 -1
- package/lib/components/NavDivider/NavDivider.js.map +1 -1
- package/lib/components/NavDivider/NavDivider.types.js.map +1 -1
- package/lib/components/NavDivider/index.js.map +1 -1
- package/lib/components/NavDivider/useNavDivider.js.map +1 -1
- package/lib/components/NavDivider/useNavDividerStyles.styles.raw.js.map +1 -1
- package/lib/components/NavDrawer/NavDrawer.js.map +1 -1
- package/lib/components/NavDrawer/NavDrawer.types.js.map +1 -1
- package/lib/components/NavDrawer/index.js.map +1 -1
- package/lib/components/NavDrawer/renderNavDrawer.js +2 -2
- package/lib/components/NavDrawer/renderNavDrawer.js.map +1 -1
- package/lib/components/NavDrawer/useNavDrawer.js.map +1 -1
- package/lib/components/NavDrawer/useNavDrawerStyles.styles.raw.js.map +1 -1
- package/lib/components/NavDrawerBody/NavDrawerBody.js.map +1 -1
- package/lib/components/NavDrawerBody/NavDrawerBody.types.js.map +1 -1
- package/lib/components/NavDrawerBody/index.js.map +1 -1
- package/lib/components/NavDrawerBody/useNavDrawerBody.js.map +1 -1
- package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.js.map +1 -1
- package/lib/components/NavDrawerFooter/NavDrawerFooter.js.map +1 -1
- package/lib/components/NavDrawerFooter/NavDrawerFooter.types.js.map +1 -1
- package/lib/components/NavDrawerFooter/index.js.map +1 -1
- package/lib/components/NavDrawerFooter/useNavDrawerFooter.js.map +1 -1
- package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.js.map +1 -1
- package/lib/components/NavDrawerHeader/NavDrawerHeader.js.map +1 -1
- package/lib/components/NavDrawerHeader/NavDrawerHeader.types.js.map +1 -1
- package/lib/components/NavDrawerHeader/index.js.map +1 -1
- package/lib/components/NavDrawerHeader/useNavDrawerHeader.js.map +1 -1
- package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.js.map +1 -1
- package/lib/components/NavItem/NavItem.js.map +1 -1
- package/lib/components/NavItem/NavItem.types.js.map +1 -1
- package/lib/components/NavItem/index.js.map +1 -1
- package/lib/components/NavItem/renderNavItem.js +2 -2
- package/lib/components/NavItem/renderNavItem.js.map +1 -1
- package/lib/components/NavItem/useNavItem.js.map +1 -1
- package/lib/components/NavItem/useNavItemStyles.styles.raw.js.map +1 -1
- package/lib/components/NavSectionHeader/NavSectionHeader.js.map +1 -1
- package/lib/components/NavSectionHeader/NavSectionHeader.types.js.map +1 -1
- package/lib/components/NavSectionHeader/index.js.map +1 -1
- package/lib/components/NavSectionHeader/renderNavSectionHeader.js +2 -2
- package/lib/components/NavSectionHeader/renderNavSectionHeader.js.map +1 -1
- package/lib/components/NavSectionHeader/useNavSectionHeader.js.map +1 -1
- package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.js.map +1 -1
- package/lib/components/NavSubItem/NavSubItem.js.map +1 -1
- package/lib/components/NavSubItem/NavSubItem.types.js.map +1 -1
- package/lib/components/NavSubItem/index.js.map +1 -1
- package/lib/components/NavSubItem/renderNavSubItem.js +2 -2
- package/lib/components/NavSubItem/renderNavSubItem.js.map +1 -1
- package/lib/components/NavSubItem/useNavSubItem.js.map +1 -1
- package/lib/components/NavSubItem/useNavSubItemStyles.styles.raw.js.map +1 -1
- package/lib/components/NavSubItemContext.js.map +1 -1
- package/lib/components/NavSubItemGroup/NavSubItemGroup.js.map +1 -1
- package/lib/components/NavSubItemGroup/NavSubItemGroup.types.js.map +1 -1
- package/lib/components/NavSubItemGroup/index.js.map +1 -1
- package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js +2 -2
- package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js.map +1 -1
- package/lib/components/NavSubItemGroup/useNavSubItemGroup.js.map +1 -1
- package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.js.map +1 -1
- package/lib/components/SplitNavItem/SplitNavItem.js.map +1 -1
- package/lib/components/SplitNavItem/SplitNavItem.types.js.map +1 -1
- package/lib/components/SplitNavItem/index.js.map +1 -1
- package/lib/components/SplitNavItem/renderSplitNavItem.js +2 -2
- package/lib/components/SplitNavItem/renderSplitNavItem.js.map +1 -1
- package/lib/components/SplitNavItem/useSplitNavItem.js.map +1 -1
- package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.raw.js.map +1 -1
- package/lib/components/sharedNavStyles.styles.raw.js.map +1 -1
- package/lib/components/useNavCategoryContextValues_unstable.js.map +1 -1
- package/lib/components/useNavCategoryItemContextValues_unstable.js.map +1 -1
- package/lib/components/useNavContextValues.js.map +1 -1
- package/lib-commonjs/AppItem.cjs +8 -8
- package/lib-commonjs/AppItemStatic.cjs +7 -7
- package/lib-commonjs/Hamburger.cjs +5 -5
- package/lib-commonjs/Nav.cjs +15 -15
- package/lib-commonjs/Nav.cjs.map +1 -1
- package/lib-commonjs/NavCategory.cjs +4 -4
- package/lib-commonjs/NavDivider.cjs +5 -5
- package/lib-commonjs/NavDrawer.cjs +6 -6
- package/lib-commonjs/NavDrawerBody.cjs +5 -5
- package/lib-commonjs/NavDrawerFooter.cjs +5 -5
- package/lib-commonjs/NavDrawerHeader.cjs +5 -5
- package/lib-commonjs/NavItem.cjs +7 -7
- package/lib-commonjs/NavSectionHeader.cjs +6 -6
- package/lib-commonjs/NavSubItem.cjs +7 -7
- package/lib-commonjs/NavSubItemGroup.cjs +7 -7
- package/lib-commonjs/SplitNavItem.cjs +6 -6
- package/lib-commonjs/components/AppItem/AppItem.cjs.map +1 -1
- package/lib-commonjs/components/AppItem/AppItem.types.cjs.map +1 -1
- package/lib-commonjs/components/AppItem/index.cjs +8 -8
- package/lib-commonjs/components/AppItem/index.cjs.map +1 -1
- package/lib-commonjs/components/AppItem/renderAppItem.cjs.map +1 -1
- package/lib-commonjs/components/AppItem/useAppItem.cjs +3 -3
- package/lib-commonjs/components/AppItem/useAppItem.cjs.map +1 -1
- package/lib-commonjs/components/AppItem/useAppItemStyles.styles.cjs +4 -4
- package/lib-commonjs/components/AppItem/useAppItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/AppItem/useAppItemStyles.styles.raw.cjs +4 -4
- package/lib-commonjs/components/AppItem/useAppItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.types.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/index.cjs +7 -7
- package/lib-commonjs/components/AppItemStatic/index.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/renderAppItemStatic.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/useAppItemStatic.cjs +3 -3
- package/lib-commonjs/components/AppItemStatic/useAppItemStatic.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.cjs +3 -3
- package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Hamburger/Hamburger.cjs.map +1 -1
- package/lib-commonjs/components/Hamburger/Hamburger.types.cjs.map +1 -1
- package/lib-commonjs/components/Hamburger/index.cjs +5 -5
- package/lib-commonjs/components/Hamburger/index.cjs.map +1 -1
- package/lib-commonjs/components/Hamburger/useHamburger.cjs.map +1 -1
- package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Nav/Nav.cjs.map +1 -1
- package/lib-commonjs/components/Nav/Nav.types.cjs.map +1 -1
- package/lib-commonjs/components/Nav/index.cjs +7 -7
- package/lib-commonjs/components/Nav/index.cjs.map +1 -1
- package/lib-commonjs/components/Nav/renderNav.cjs.map +1 -1
- package/lib-commonjs/components/Nav/useNav.cjs +3 -3
- package/lib-commonjs/components/Nav/useNav.cjs.map +1 -1
- package/lib-commonjs/components/Nav/useNavStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Nav/useNavStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Nav/useNavStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Nav/useNavStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavCategory/NavCategory.cjs.map +1 -1
- package/lib-commonjs/components/NavCategory/NavCategory.types.cjs.map +1 -1
- package/lib-commonjs/components/NavCategory/index.cjs +4 -4
- package/lib-commonjs/components/NavCategory/index.cjs.map +1 -1
- package/lib-commonjs/components/NavCategory/renderNavCategory.cjs.map +1 -1
- package/lib-commonjs/components/NavCategory/useNavCategory.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryContext.cjs +3 -3
- package/lib-commonjs/components/NavCategoryContext.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.types.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/index.cjs +7 -7
- package/lib-commonjs/components/NavCategoryItem/index.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/renderNavCategoryItem.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.cjs +3 -3
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.cjs +4 -4
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.raw.cjs +4 -4
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavCategoryItemContext.cjs +3 -3
- package/lib-commonjs/components/NavCategoryItemContext.cjs.map +1 -1
- package/lib-commonjs/components/NavContext.cjs +3 -3
- package/lib-commonjs/components/NavContext.cjs.map +1 -1
- package/lib-commonjs/components/NavContext.types.cjs.map +1 -1
- package/lib-commonjs/components/NavDivider/NavDivider.cjs.map +1 -1
- package/lib-commonjs/components/NavDivider/NavDivider.types.cjs.map +1 -1
- package/lib-commonjs/components/NavDivider/index.cjs +5 -5
- package/lib-commonjs/components/NavDivider/index.cjs.map +1 -1
- package/lib-commonjs/components/NavDivider/useNavDivider.cjs.map +1 -1
- package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/NavDrawer.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/NavDrawer.types.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/index.cjs +6 -6
- package/lib-commonjs/components/NavDrawer/index.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/renderNavDrawer.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/useNavDrawer.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.types.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/index.cjs +5 -5
- package/lib-commonjs/components/NavDrawerBody/index.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBody.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.types.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/index.cjs +5 -5
- package/lib-commonjs/components/NavDrawerFooter/index.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooter.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.types.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/index.cjs +5 -5
- package/lib-commonjs/components/NavDrawerHeader/index.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeader.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/NavItem.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/NavItem.types.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/index.cjs +7 -7
- package/lib-commonjs/components/NavItem/index.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/renderNavItem.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/useNavItem.cjs +3 -3
- package/lib-commonjs/components/NavItem/useNavItem.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/useNavItemStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavItem/useNavItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavItem/useNavItemStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavItem/useNavItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.types.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/index.cjs +6 -6
- package/lib-commonjs/components/NavSectionHeader/index.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/renderNavSectionHeader.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeader.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/NavSubItem.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/NavSubItem.types.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/index.cjs +7 -7
- package/lib-commonjs/components/NavSubItem/index.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/renderNavSubItem.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/useNavSubItem.cjs +3 -3
- package/lib-commonjs/components/NavSubItem/useNavSubItem.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemContext.cjs +3 -3
- package/lib-commonjs/components/NavSubItemContext.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.types.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/index.cjs +7 -7
- package/lib-commonjs/components/NavSubItemGroup/index.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/renderNavSubItemGroup.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.cjs +3 -3
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.cjs +3 -3
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.types.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/index.cjs +6 -6
- package/lib-commonjs/components/SplitNavItem/index.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/renderSplitNavItem.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/useSplitNavItem.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.cjs +3 -3
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/sharedNavStyles.styles.cjs +7 -7
- package/lib-commonjs/components/sharedNavStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/sharedNavStyles.styles.raw.cjs +7 -7
- package/lib-commonjs/components/sharedNavStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/useNavCategoryContextValues_unstable.cjs.map +1 -1
- package/lib-commonjs/components/useNavCategoryItemContextValues_unstable.cjs.map +1 -1
- package/lib-commonjs/components/useNavContextValues.cjs.map +1 -1
- package/lib-commonjs/index.cjs +90 -90
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +12 -12
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
appItemStaticClassNames
|
|
13
|
+
get appItemStaticClassNames () {
|
|
14
14
|
return appItemStaticClassNames;
|
|
15
15
|
},
|
|
16
|
-
useAppItemStaticStyles_unstable
|
|
16
|
+
get useAppItemStaticStyles_unstable () {
|
|
17
17
|
return useAppItemStaticStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAppItemStaticStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { useAppItemStyles } from \"../AppItem/useAppItemStyles.styles.js\";\nimport { useIconStyles, useRootDefaultClassName } from \"../sharedNavStyles.styles.js\";\nexport const appItemStaticClassNames = {\n root: 'fui-AppItemStatic',\n icon: 'fui-AppItemStatic__icon'\n};\nconst useAppItemStaticStyles = makeStyles({\n root: {\n cursor: 'default',\n ':hover': {\n backgroundColor: 'unset'\n },\n ':active': {\n backgroundColor: 'unset'\n }\n }\n});\n/**\n * Apply styling to the AppItemStatic slots based on the state\n */ export const useAppItemStaticStyles_unstable = (state)=>{\n const rootDefaultClassName = useRootDefaultClassName();\n const iconStyles = useIconStyles();\n const appItemSpecificStyles = useAppItemStyles();\n const appItemStaticStyles = useAppItemStaticStyles();\n const { density, icon } = state;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(rootDefaultClassName, appItemStaticClassNames.root, appItemSpecificStyles.root, appItemStaticStyles.root, density === 'small' && appItemSpecificStyles.small, !icon && appItemSpecificStyles.absentIconRootAdjustment, state.root.className);\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(appItemStaticClassNames.icon, iconStyles.base, state.icon.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","useAppItemStyles","useIconStyles","useRootDefaultClassName","appItemStaticClassNames","root","icon","useAppItemStaticStyles","Bceei9c","Jwef8y","ecr2s2","d","h","a","useAppItemStaticStyles_unstable","state","rootDefaultClassName","iconStyles","appItemSpecificStyles","appItemStaticStyles","density","className","small","absentIconRootAdjustment","base"],"mappings":"AAAA,YAAY;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["useAppItemStaticStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { useAppItemStyles } from \"../AppItem/useAppItemStyles.styles.js\";\nimport { useIconStyles, useRootDefaultClassName } from \"../sharedNavStyles.styles.js\";\nexport const appItemStaticClassNames = {\n root: 'fui-AppItemStatic',\n icon: 'fui-AppItemStatic__icon'\n};\nconst useAppItemStaticStyles = makeStyles({\n root: {\n cursor: 'default',\n ':hover': {\n backgroundColor: 'unset'\n },\n ':active': {\n backgroundColor: 'unset'\n }\n }\n});\n/**\n * Apply styling to the AppItemStatic slots based on the state\n */ export const useAppItemStaticStyles_unstable = (state)=>{\n const rootDefaultClassName = useRootDefaultClassName();\n const iconStyles = useIconStyles();\n const appItemSpecificStyles = useAppItemStyles();\n const appItemStaticStyles = useAppItemStaticStyles();\n const { density, icon } = state;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(rootDefaultClassName, appItemStaticClassNames.root, appItemSpecificStyles.root, appItemStaticStyles.root, density === 'small' && appItemSpecificStyles.small, !icon && appItemSpecificStyles.absentIconRootAdjustment, state.root.className);\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(appItemStaticClassNames.icon, iconStyles.base, state.icon.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","useAppItemStyles","useIconStyles","useRootDefaultClassName","appItemStaticClassNames","root","icon","useAppItemStaticStyles","Bceei9c","Jwef8y","ecr2s2","d","h","a","useAppItemStaticStyles_unstable","state","rootDefaultClassName","iconStyles","appItemSpecificStyles","appItemStaticStyles","density","className","small","absentIconRootAdjustment","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AACe,SAAS,CAAC;IAC5G;IACA,OAAON,KAAK;AAChB,CAAC"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
appItemStaticClassNames
|
|
13
|
+
get appItemStaticClassNames () {
|
|
14
14
|
return appItemStaticClassNames;
|
|
15
15
|
},
|
|
16
|
-
useAppItemStaticStyles_unstable
|
|
16
|
+
get useAppItemStaticStyles_unstable () {
|
|
17
17
|
return useAppItemStaticStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItemStatic/useAppItemStaticStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { AppItemStaticSlots, AppItemStaticState } from './AppItemStatic.types';\nimport { useAppItemStyles } from '../AppItem/useAppItemStyles.styles';\nimport { useIconStyles, useRootDefaultClassName } from '../sharedNavStyles.styles';\n\nexport const appItemStaticClassNames: SlotClassNames<AppItemStaticSlots> = {\n root: 'fui-AppItemStatic',\n icon: 'fui-AppItemStatic__icon',\n};\n\nconst useAppItemStaticStyles = makeStyles({\n root: {\n cursor: 'default',\n ':hover': {\n backgroundColor: 'unset',\n },\n ':active': {\n backgroundColor: 'unset',\n },\n },\n});\n\n/**\n * Apply styling to the AppItemStatic slots based on the state\n */\nexport const useAppItemStaticStyles_unstable = (state: AppItemStaticState): AppItemStaticState => {\n const rootDefaultClassName = useRootDefaultClassName();\n const iconStyles = useIconStyles();\n const appItemSpecificStyles = useAppItemStyles();\n const appItemStaticStyles = useAppItemStaticStyles();\n\n const { density, icon } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n rootDefaultClassName,\n appItemStaticClassNames.root,\n appItemSpecificStyles.root,\n appItemStaticStyles.root,\n density === 'small' && appItemSpecificStyles.small,\n !icon && appItemSpecificStyles.absentIconRootAdjustment,\n state.root.className,\n );\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(appItemStaticClassNames.icon, iconStyles.base, state.icon.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useAppItemStyles","useIconStyles","useRootDefaultClassName","appItemStaticClassNames","root","icon","useAppItemStaticStyles","cursor","backgroundColor","useAppItemStaticStyles_unstable","state","rootDefaultClassName","iconStyles","appItemSpecificStyles","appItemStaticStyles","density","className","small","absentIconRootAdjustment","base"],"mappings":"AAAA;;;;;;;;;;;;QAQaK;;;;eAoBAM;;;uBA1B4B,iBAAiB;wCAGzB,wCAAqC;uCACf,+BAA4B;AAE5E,gCAAoE;IACzEL,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,MAAMC,6BAAyBR,iBAAAA,EAAW;IACxCM,MAAM;QACJG,QAAQ;QACR,UAAU;YACRC,iBAAiB;QACnB;QACA,WAAW;YACTA,iBAAiB;QACnB;IACF;AACF;AAKO,wCAAwC,CAACE;IAC9C,MAAMC,2BAAuBT,8CAAAA;IAC7B,MAAMU,iBAAaX,oCAAAA;IACnB,MAAMY,4BAAwBb,wCAAAA;IAC9B,MAAMc,sBAAsBR;IAE5B,MAAM,EAAES,OAAO,EAAEV,IAAI,EAAE,GAAGK;IAE1B,oDAAoD;IACpDA,MAAMN,IAAI,CAACY,SAAS,OAAGjB,mBAAAA,EACrBY,sBACAR,wBAAwBC,IAAI,EAC5BS,sBAAsBT,IAAI,EAC1BU,oBAAoBV,IAAI,EACxBW,YAAY,WAAWF,sBAAsBI,KAAK,EAClD,CAACZ,QAAQQ,sBAAsBK,wBAAwB,EACvDR,MAAMN,IAAI,CAACY,SAAS;IAGtB,IAAIN,MAAML,IAAI,EAAE;QACd,oDAAoD;QACpDK,MAAML,IAAI,CAACW,SAAS,OAAGjB,mBAAAA,EAAaI,wBAAwBE,IAAI,EAAEO,WAAWO,IAAI,EAAET,MAAML,IAAI,CAACW,SAAS;IACzG;IAEA,OAAON;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Hamburger/Hamburger.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderButton_unstable } from '@fluentui/react-button';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useHamburger_unstable } from './useHamburger';\nimport { useHamburgerStyles_unstable } from './useHamburgerStyles.styles';\nimport type { HamburgerProps } from './Hamburger.types';\n\n/**\n * Hamburger component - a button that toggles a menu or navigation drawer.\n */\nexport const Hamburger: ForwardRefComponent<HamburgerProps> = React.forwardRef((props, ref) => {\n const state = useHamburger_unstable(props, ref);\n\n useHamburgerStyles_unstable(state);\n useCustomStyleHook_unstable('useHamburgerStyles_unstable')(state);\n\n return renderButton_unstable(state);\n}) as ForwardRefComponent<HamburgerProps>;\n\nHamburger.displayName = 'Hamburger';\n"],"names":["React","renderButton_unstable","useCustomStyleHook_unstable","useHamburger_unstable","useHamburgerStyles_unstable","Hamburger","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BAEO,yBAAyB;qCACnB,kCAAkC;8BAExC,oBAAiB;0CACX,iCAA8B;AAMnE,MAAMK,YAAAA,WAAAA,GAAiDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,YAAQN,mCAAAA,EAAsBI,OAAOC;QAE3CJ,qDAAAA,EAA4BK;QAC5BP,gDAAAA,EAA4B,+BAA+BO;IAE3D,WAAOR,kCAAAA,EAAsBQ;AAC/B,GAA0C;AAE1CJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Hamburger/Hamburger.types.ts"],"sourcesContent":["import type { ButtonProps, ButtonState } from '@fluentui/react-button';\n\n/**\n * Hamburger Props\n */\nexport type HamburgerProps = ButtonProps;\n\n/**\n * State used in rendering Hamburger\n */\nexport type HamburgerState = ButtonState;\n"],"names":[],"mappings":"AAOA;;CAEC,GACD,WAAyC"}
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Hamburger
|
|
12
|
+
get Hamburger () {
|
|
13
13
|
return _Hamburger.Hamburger;
|
|
14
14
|
},
|
|
15
|
-
hamburgerClassNames
|
|
15
|
+
get hamburgerClassNames () {
|
|
16
16
|
return _useHamburgerStylesstyles.hamburgerClassNames;
|
|
17
17
|
},
|
|
18
|
-
useHamburgerStyles_unstable
|
|
18
|
+
get useHamburgerStyles_unstable () {
|
|
19
19
|
return _useHamburgerStylesstyles.useHamburgerStyles_unstable;
|
|
20
20
|
},
|
|
21
|
-
useHamburger_unstable
|
|
21
|
+
get useHamburger_unstable () {
|
|
22
22
|
return _useHamburger.useHamburger_unstable;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Hamburger/index.ts"],"sourcesContent":["export { Hamburger } from './Hamburger';\nexport type { HamburgerProps, HamburgerState } from './Hamburger.types';\nexport { useHamburger_unstable } from './useHamburger';\nexport { hamburgerClassNames, useHamburgerStyles_unstable } from './useHamburgerStyles.styles';\n"],"names":["Hamburger","useHamburger_unstable","hamburgerClassNames","useHamburgerStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oBAAS;;;eAGTE,6CAAmB;;;eAAEC,qDAA2B;;;eADhDF,mCAAqB;;;2BAFJ,iBAAc;8BAEF,oBAAiB;0CACU,iCAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Hamburger/useHamburger.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useButton_unstable } from '@fluentui/react-button';\nimport { Navigation20Filled } from '@fluentui/react-icons';\nimport type { HamburgerProps, HamburgerState } from './Hamburger.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useHamburger_unstable = (\n props: HamburgerProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): HamburgerState => {\n return useButton_unstable({ icon: <Navigation20Filled />, appearance: 'transparent', ...props }, ref);\n};\n"],"names":["React","useButton_unstable","Navigation20Filled","useHamburger_unstable","props","ref","icon","appearance"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BACI,yBAAyB;4BACzB,wBAAwB;AASpD,MAAMG,wBAAwB,CACnCC,OACAC;IAEA,WAAOJ,+BAAAA,EAAmB;QAAEK,MAAAA,WAAAA,GAAM,OAAA,aAAA,CAACJ,8BAAAA,EAAAA;QAAuBK,YAAY;QAAe,GAAGH,KAAK;IAAC,GAAGC;AACnG,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
hamburgerClassNames
|
|
13
|
+
get hamburgerClassNames () {
|
|
14
14
|
return hamburgerClassNames;
|
|
15
15
|
},
|
|
16
|
-
useHamburgerStyles_unstable
|
|
16
|
+
get useHamburgerStyles_unstable () {
|
|
17
17
|
return useHamburgerStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useHamburgerStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { useButtonStyles_unstable } from \"@fluentui/react-button\";\nimport { navItemTokens } from \"../sharedNavStyles.styles.js\";\nexport const hamburgerClassNames = {\n root: 'fui-Hamburger',\n icon: 'fui-Hamburger__icon'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n textDecorationLine: 'none',\n backgroundColor: navItemTokens.backgroundColor,\n border: 'none',\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover\n },\n ':active': {\n backgroundColor: navItemTokens.backgroundColorPressed\n }\n }\n});\n/**\n * Apply styling to the Hamburger slots based on the state\n */ export const useHamburgerStyles_unstable = (state)=>{\n useButtonStyles_unstable(state);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(hamburgerClassNames.root, styles.root, state.root.className);\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(hamburgerClassNames.icon, state.icon.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","useButtonStyles_unstable","navItemTokens","hamburgerClassNames","root","icon","useStyles","w71qe1","De3pzq","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Jwef8y","ecr2s2","d","p","h","a","useHamburgerStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["useHamburgerStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { useButtonStyles_unstable } from \"@fluentui/react-button\";\nimport { navItemTokens } from \"../sharedNavStyles.styles.js\";\nexport const hamburgerClassNames = {\n root: 'fui-Hamburger',\n icon: 'fui-Hamburger__icon'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n textDecorationLine: 'none',\n backgroundColor: navItemTokens.backgroundColor,\n border: 'none',\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover\n },\n ':active': {\n backgroundColor: navItemTokens.backgroundColorPressed\n }\n }\n});\n/**\n * Apply styling to the Hamburger slots based on the state\n */ export const useHamburgerStyles_unstable = (state)=>{\n useButtonStyles_unstable(state);\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(hamburgerClassNames.root, styles.root, state.root.className);\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(hamburgerClassNames.icon, state.icon.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","useButtonStyles_unstable","navItemTokens","hamburgerClassNames","root","icon","useStyles","w71qe1","De3pzq","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Jwef8y","ecr2s2","d","p","h","a","useHamburgerStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;QAICI,mBAAmB;;;QAqBf6B,2BAA2B;;;;uBAxBH,gBAAgB;6BAChB,wBAAwB;AAE1D,4BAA4B;IAC/B5B,IAAI,EAAE,eAAe;IACrBC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,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
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
hamburgerClassNames
|
|
13
|
+
get hamburgerClassNames () {
|
|
14
14
|
return hamburgerClassNames;
|
|
15
15
|
},
|
|
16
|
-
useHamburgerStyles_unstable
|
|
16
|
+
get useHamburgerStyles_unstable () {
|
|
17
17
|
return useHamburgerStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Hamburger/useHamburgerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { ButtonSlots } from '@fluentui/react-button';\nimport { useButtonStyles_unstable } from '@fluentui/react-button';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { HamburgerState } from './Hamburger.types';\nimport { navItemTokens } from '../sharedNavStyles.styles';\n\nexport const hamburgerClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Hamburger',\n icon: 'fui-Hamburger__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n textDecorationLine: 'none',\n backgroundColor: navItemTokens.backgroundColor,\n border: 'none',\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover,\n },\n ':active': {\n backgroundColor: navItemTokens.backgroundColorPressed,\n },\n },\n});\n\n/**\n * Apply styling to the Hamburger slots based on the state\n */\nexport const useHamburgerStyles_unstable = (state: HamburgerState): HamburgerState => {\n useButtonStyles_unstable(state);\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(hamburgerClassNames.root, styles.root, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(hamburgerClassNames.icon, state.icon.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useButtonStyles_unstable","navItemTokens","hamburgerClassNames","root","icon","useStyles","textDecorationLine","backgroundColor","border","backgroundColorHover","backgroundColorPressed","useHamburgerStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;QASaI;;;;eAyBAS;;;uBAhC4B,iBAAiB;6BAEjB,yBAAyB;uCAGpC,+BAA4B;AAEnD,4BAAyD;IAC9DR,MAAM;IACNC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,iBAAAA,EAAW;IAC3BK,MAAM;QACJG,oBAAoB;QACpBC,iBAAiBN,oCAAAA,CAAcM,eAAe;QAC9CC,QAAQ;QACR,UAAU;YACRD,iBAAiBN,oCAAAA,CAAcQ,oBAAoB;QACrD;QACA,WAAW;YACTF,iBAAiBN,oCAAAA,CAAcS,sBAAsB;QACvD;IACF;AACF;AAKO,oCAAoC,CAACE;QAC1CZ,qCAAAA,EAAyBY;IACzB,MAAMC,SAASR;IAEf,oDAAoD;IACpDO,MAAMT,IAAI,CAACW,SAAS,OAAGf,mBAAAA,EAAaG,oBAAoBC,IAAI,EAAEU,OAAOV,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAE/F,IAAIF,MAAMR,IAAI,EAAE;QACd,oDAAoD;QACpDQ,MAAMR,IAAI,CAACU,SAAS,OAAGf,mBAAAA,EAAaG,oBAAoBE,IAAI,EAAEQ,MAAMR,IAAI,CAACU,SAAS;IACpF;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Nav/Nav.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNav_unstable } from './useNav';\nimport { renderNav_unstable } from './renderNav';\nimport { useNavStyles_unstable } from './useNavStyles.styles';\nimport { useNavContextValues_unstable } from '../useNavContextValues';\nimport type { NavProps } from './Nav.types';\n\n/**\n * Nav - A component that provides up to two levels of nesting for navigation.\n */\nexport const Nav: ForwardRefComponent<NavProps> = React.forwardRef((props, ref) => {\n const state = useNav_unstable(props, ref);\n\n const contextValues = useNavContextValues_unstable(state);\n\n useNavStyles_unstable(state);\n useCustomStyleHook_unstable('useHamburgerStyles_unstable')(state);\n\n return renderNav_unstable(state, contextValues);\n});\n\nNav.displayName = 'Nav';\n"],"names":["React","useCustomStyleHook_unstable","useNav_unstable","renderNav_unstable","useNavStyles_unstable","useNavContextValues_unstable","Nav","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;qCAEa,kCAAkC;wBAE9C,cAAW;2BACR,iBAAc;oCACX,2BAAwB;qCACjB,4BAAyB;AAM/D,MAAMM,MAAAA,WAAAA,GAAqCN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IACzE,MAAMC,YAAQR,uBAAAA,EAAgBM,OAAOC;IAErC,MAAME,oBAAgBN,iDAAAA,EAA6BK;QAEnDN,yCAAAA,EAAsBM;QACtBT,gDAAAA,EAA4B,+BAA+BS;IAE3D,WAAOP,6BAAAA,EAAmBO,OAAOC;AACnC,GAAG;AAEHL,IAAIM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Nav/Nav.types.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport type { ComponentProps, ComponentState, EventData, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { NavContextValue, NavItemValue } from '../NavContext.types';\n\nexport type NavSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/***\n * Indicates the vertical density of the Nav content.\n * This does not affect horizontal spacing.\n */\nexport type NavDensity = 'small' | 'medium';\n\n/**\n * Nav Props\n */\nexport type NavProps = ComponentProps<NavSlots> & {\n /**\n * The value of the navItem to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n * Mutually exclusive with selectedValue.\n * Empty string indicates no selection.\n */\n defaultSelectedValue?: NavItemValue;\n\n /**\n * The value of the navCategory to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n * Mutually exclusive with selectedValue.\n * Empty string indicates no selection.\n */\n defaultSelectedCategoryValue?: NavItemValue;\n\n /**\n * Set of categories that are opened by default.\n * Typically useful when the openCategories is uncontrolled.\n */\n defaultOpenCategories?: NavItemValue[];\n\n /**\n * Controls the open categories.\n * For use in controlled scenarios.\n */\n openCategories?: NavItemValue[];\n\n /**\n * Raised when a navItem is selected.\n * If the navItem is child of a category, the categoryValue will be provided\n */\n onNavItemSelect?: EventHandler<OnNavItemSelectData>;\n\n /**\n * The value of the currently selected navItem.\n * Mutually exclusive with defaultSelectedValue.\n * @default undefined\n */\n selectedValue?: NavItemValue;\n\n /**\n * Indicates a category that has a selected child\n * Will show the category as selected if it is closed.\n * @default undefined\n */\n selectedCategoryValue?: NavItemValue;\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n * @default true, indicating that multiple categories can be open at the same time.\n */\n multiple?: boolean;\n\n /**\n * Callback raised when a NavCategoryItem is toggled.\n */\n onNavCategoryItemToggle?: EventHandler<OnNavItemSelectData>;\n\n /**\n * The vertical density of the Nav and it's children\n * @default 'medium'\n */\n density?: NavDensity;\n};\n\nexport type NavBaseProps = Omit<NavProps, 'density'>;\n\nexport type OnNavItemSelectData = EventData<'click', React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>> & {\n /**\n * The value of the selected navItem.\n * In the case of a category selection, this will be the value of the selected category.\n */\n value: NavItemValue;\n\n /**\n * The parent value of the selected navSubItem\n * Null if not a child of a category\n */\n categoryValue?: NavItemValue;\n};\n\n/**\n * State used in rendering Nav\n */\nexport type NavState = ComponentState<NavSlots> & NavContextValue;\n\nexport type NavBaseState = Omit<NavState, 'density' | 'tabbable'>;\n"],"names":[],"mappings":""}
|
|
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Nav
|
|
12
|
+
get Nav () {
|
|
13
13
|
return _Nav.Nav;
|
|
14
14
|
},
|
|
15
|
-
navClassNames
|
|
15
|
+
get navClassNames () {
|
|
16
16
|
return _useNavStylesstyles.navClassNames;
|
|
17
17
|
},
|
|
18
|
-
renderNav_unstable
|
|
18
|
+
get renderNav_unstable () {
|
|
19
19
|
return _renderNav.renderNav_unstable;
|
|
20
20
|
},
|
|
21
|
-
useNavBase_unstable
|
|
21
|
+
get useNavBase_unstable () {
|
|
22
22
|
return _useNav.useNavBase_unstable;
|
|
23
23
|
},
|
|
24
|
-
useNavStyles_unstable
|
|
24
|
+
get useNavStyles_unstable () {
|
|
25
25
|
return _useNavStylesstyles.useNavStyles_unstable;
|
|
26
26
|
},
|
|
27
|
-
useNav_unstable
|
|
27
|
+
get useNav_unstable () {
|
|
28
28
|
return _useNav.useNav_unstable;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Nav/index.ts"],"sourcesContent":["export { Nav } from './Nav';\nexport type {\n NavSlots,\n NavProps,\n OnNavItemSelectData,\n NavState,\n NavDensity,\n NavBaseProps,\n NavBaseState,\n} from './Nav.types';\nexport { renderNav_unstable } from './renderNav';\nexport { useNav_unstable, useNavBase_unstable } from './useNav';\nexport { useNavStyles_unstable, navClassNames } from './useNavStyles.styles';\n"],"names":["Nav","renderNav_unstable","useNav_unstable","useNavBase_unstable","useNavStyles_unstable","navClassNames"],"mappings":";;;;;;;;;;;;eAASA,QAAG;;;eAYoBK,iCAAa;;;eAFpCJ,6BAAkB;;;eACDE,2BAAmB;;;eACpCC,yCAAqB;;;eADrBF,uBAAe;;;qBAXJ,WAAQ;2BAUO,iBAAc;wBACI,cAAW;oCACX,2BAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Nav/renderNav.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { NavProvider } from '../NavContext';\nimport type { NavState, NavSlots } from './Nav.types';\nimport type { NavContextValues } from '../NavContext.types';\n\nexport const renderNav_unstable = (state: NavState, contextValues: NavContextValues): JSXElement => {\n assertSlots<NavSlots>(state);\n\n return (\n <NavProvider value={contextValues.nav}>\n <state.root />\n </NavProvider>\n );\n};\n"],"names":["assertSlots","NavProvider","renderNav_unstable","state","contextValues","value","nav","root"],"mappings":";;;;+BASaE;;;;;;;gCARb,gDAAiD,GAEjD,SAASF,WAAW,QAAQ,4BAA4B;4BAE5B,mBAAgB;AAIrC,2BAA2B,CAACG,OAAiBC;QAClDJ,2BAAAA,EAAsBG;IAEtB,OAAA,WAAA,OACE,eAAA,EAACF,uBAAAA,EAAAA;QAAYI,OAAOD,cAAcE,GAAG;kBACnC,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
useNavBase_unstable
|
|
13
|
+
get useNavBase_unstable () {
|
|
14
14
|
return useNavBase_unstable;
|
|
15
15
|
},
|
|
16
|
-
useNav_unstable
|
|
16
|
+
get useNav_unstable () {
|
|
17
17
|
return useNav_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Nav/useNav.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { EventHandler } from '@fluentui/react-utilities';\nimport {\n useControllableState,\n useEventCallback,\n useMergedRefs,\n slot,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport type { NavBaseProps, NavBaseState, NavProps, NavState, OnNavItemSelectData } from './Nav.types';\nimport type { NavItemRegisterData, NavItemValue } from '../NavContext.types';\n\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */\nfunction initializeUncontrolledOpenCategories({\n defaultOpenCategories,\n multiple,\n}: Pick<NavProps, 'defaultOpenCategories' | 'multiple'>): NavItemValue[] | undefined {\n if (defaultOpenCategories !== undefined) {\n if (Array.isArray(defaultOpenCategories)) {\n return multiple ? defaultOpenCategories : [defaultOpenCategories[0]];\n }\n return [defaultOpenCategories];\n }\n return undefined;\n}\n\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Nav supports open categories at the same time\n */\nconst updateOpenCategories = (value: NavItemValue, previousOpenItems: NavItemValue[], multiple: boolean) => {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n return previousOpenItems.filter(i => i !== value);\n } else {\n return [...previousOpenItems, value];\n }\n }\n\n return previousOpenItems[0] === value ? [] : [value];\n};\n\n/**\n * Create the state required to render Nav.\n *\n * The returned state can be modified with hooks such as useNavStyles,\n * before being passed to renderNav.\n *\n * @param props - props from this instance of Nav\n * @param ref - reference to root HTMLDivElement of Nav\n */\nexport const useNav_unstable = (props: NavProps, ref: React.Ref<HTMLDivElement>): NavState => {\n const { density = 'medium' } = props;\n\n const state = useNavBase_unstable(props, ref);\n\n return {\n ...state,\n density,\n tabbable: false,\n };\n};\n\nexport const useNavBase_unstable = (props: NavBaseProps, ref: React.Ref<HTMLDivElement>): NavBaseState => {\n const {\n onNavItemSelect,\n onNavCategoryItemToggle,\n multiple = true,\n openCategories: controlledOpenCategoryItems,\n selectedCategoryValue: controlledSelectedCategoryValue,\n selectedValue: controlledSelectedValue,\n defaultOpenCategories,\n defaultSelectedValue,\n defaultSelectedCategoryValue,\n } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const [openCategories, setOpenCategories] = useControllableState({\n state: controlledOpenCategoryItems,\n defaultState: initializeUncontrolledOpenCategories({ defaultOpenCategories, multiple }),\n initialState: [],\n });\n\n const [selectedCategoryValue, setSelectedCategoryValue] = useControllableState({\n state: controlledSelectedCategoryValue,\n defaultState: defaultSelectedCategoryValue,\n initialState: undefined,\n });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: controlledSelectedValue,\n defaultState: defaultSelectedValue,\n initialState: undefined,\n });\n\n // considered usePrevious, but it is sensitive to re-renders\n // this could cause the previous to move to current in the case where the navItem list re-renders.\n // these refs avoid getRegisteredNavItems changing when selectedValue changes and causing\n // renders for navItems that have not changed.\n const currentSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n\n const currentSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedValue.current !== selectedValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedValue.current = currentSelectedValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedValue.current = selectedValue;\n }\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedCategoryValue.current !== selectedCategoryValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedCategoryValue.current = currentSelectedCategoryValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedCategoryValue.current = selectedCategoryValue;\n }\n\n // used for NavItems and NavSubItems\n const onSelect: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n setSelectedValue(data.value);\n setSelectedCategoryValue(data.categoryValue ? data.categoryValue : '');\n onNavItemSelect?.(event, data);\n });\n\n // used for NavCategoryItems\n const onRequestNavCategoryItemToggle: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n if (data.categoryValue !== undefined) {\n const nextOpenCategories = updateOpenCategories(data.categoryValue, openCategories ?? [], multiple);\n onNavCategoryItemToggle?.(event, data);\n setOpenCategories(nextOpenCategories);\n }\n });\n\n const registeredNavItems = React.useRef<Record<string, NavItemRegisterData>>({});\n\n const onRegister = React.useCallback((data: NavItemRegisterData) => {\n registeredNavItems.current[JSON.stringify(data.value)] = data;\n }, []);\n\n const onUnregister = React.useCallback((data: NavItemRegisterData) => {\n delete registeredNavItems.current[JSON.stringify(data.value)];\n }, []);\n\n const getRegisteredNavItems = React.useCallback(() => {\n return {\n selectedValue: currentSelectedValue.current,\n previousSelectedValue: previousSelectedValue.current,\n selectedCategoryValue: currentSelectedCategoryValue.current,\n previousSelectedCategoryValue: previousSelectedCategoryValue.current,\n registeredNavItems: registeredNavItems.current,\n };\n }, []);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, innerRef) as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n openCategories,\n selectedValue,\n selectedCategoryValue,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredNavItems,\n onRequestNavCategoryItemToggle,\n multiple,\n };\n};\n"],"names":["React","useControllableState","useEventCallback","useMergedRefs","slot","getIntrinsicElementProps","initializeUncontrolledOpenCategories","defaultOpenCategories","multiple","undefined","Array","isArray","updateOpenCategories","value","previousOpenItems","includes","filter","i","useNav_unstable","props","ref","density","state","useNavBase_unstable","tabbable","onNavItemSelect","onNavCategoryItemToggle","openCategories","controlledOpenCategoryItems","selectedCategoryValue","controlledSelectedCategoryValue","selectedValue","controlledSelectedValue","defaultSelectedValue","defaultSelectedCategoryValue","innerRef","useRef","setOpenCategories","defaultState","initialState","setSelectedCategoryValue","setSelectedValue","currentSelectedValue","previousSelectedValue","currentSelectedCategoryValue","previousSelectedCategoryValue","current","onSelect","event","data","categoryValue","onRequestNavCategoryItemToggle","nextOpenCategories","registeredNavItems","onRegister","useCallback","JSON","stringify","onUnregister","getRegisteredNavItems","components","root","always","elementType"],"mappings":"AAAA;;;;;;;;;;;;IAsEauB,mBAAAA;;;mBAZAL;eAAAA;;;;iEAxDU,QAAQ;gCAQxB,4BAA4B;AAKnC;;CAEC,GACD,SAASZ,qCAAqC,EAC5CC,qBAAqB,EACrBC,QAAQ,EAC6C;IACrD,IAAID,0BAA0BE,WAAW;QACvC,IAAIC,MAAMC,OAAO,CAACJ,wBAAwB;YACxC,OAAOC,WAAWD,wBAAwB;gBAACA,qBAAqB,CAAC,EAAE;aAAC;QACtE;QACA,OAAO;YAACA;SAAsB;IAChC;IACA,OAAOE;AACT;AAEA;;;;;CAKC,GACD,MAAMG,uBAAuB,CAACC,OAAqBC,mBAAmCN;IACpF,IAAIA,UAAU;QACZ,IAAIM,kBAAkBC,QAAQ,CAACF,QAAQ;YACrC,OAAOC,kBAAkBE,MAAM,CAACC,CAAAA,IAAKA,MAAMJ;QAC7C,OAAO;YACL,OAAO;mBAAIC;gBAAmBD;aAAM;QACtC;IACF;IAEA,OAAOC,iBAAiB,CAAC,EAAE,KAAKD,QAAQ,EAAE,GAAG;QAACA;KAAM;AACtD;AAWO,wBAAwB,CAACM,OAAiBC;IAC/C,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGF;IAE/B,MAAMG,QAAQC,oBAAoBJ,OAAOC;IAEzC,OAAO;QACL,GAAGE,KAAK;QACRD;QACAG,UAAU;IACZ;AACF,EAAE;AAEK,4BAA4B,CAACL,OAAqBC;IACvD,MAAM,EAC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KACfzD,wCAAAA,EAAyB,OAAO;YAC9Be,SAAKjB,6BAAAA,EAAciB,KAAKe;YACxB,GAAGhB,KAAK;QACV,IACA;YAAE4C,aAAa;QAAM;QAEvBpC;QACAI;QACAF;QACAyB;QACAI;QACAX;QACAY;QACAR;QACA3C;IACF;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Nav/useNav.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { EventHandler } from '@fluentui/react-utilities';\nimport {\n useControllableState,\n useEventCallback,\n useMergedRefs,\n slot,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport type { NavBaseProps, NavBaseState, NavProps, NavState, OnNavItemSelectData } from './Nav.types';\nimport type { NavItemRegisterData, NavItemValue } from '../NavContext.types';\n\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */\nfunction initializeUncontrolledOpenCategories({\n defaultOpenCategories,\n multiple,\n}: Pick<NavProps, 'defaultOpenCategories' | 'multiple'>): NavItemValue[] | undefined {\n if (defaultOpenCategories !== undefined) {\n if (Array.isArray(defaultOpenCategories)) {\n return multiple ? defaultOpenCategories : [defaultOpenCategories[0]];\n }\n return [defaultOpenCategories];\n }\n return undefined;\n}\n\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Nav supports open categories at the same time\n */\nconst updateOpenCategories = (value: NavItemValue, previousOpenItems: NavItemValue[], multiple: boolean) => {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n return previousOpenItems.filter(i => i !== value);\n } else {\n return [...previousOpenItems, value];\n }\n }\n\n return previousOpenItems[0] === value ? [] : [value];\n};\n\n/**\n * Create the state required to render Nav.\n *\n * The returned state can be modified with hooks such as useNavStyles,\n * before being passed to renderNav.\n *\n * @param props - props from this instance of Nav\n * @param ref - reference to root HTMLDivElement of Nav\n */\nexport const useNav_unstable = (props: NavProps, ref: React.Ref<HTMLDivElement>): NavState => {\n const { density = 'medium' } = props;\n\n const state = useNavBase_unstable(props, ref);\n\n return {\n ...state,\n density,\n tabbable: false,\n };\n};\n\nexport const useNavBase_unstable = (props: NavBaseProps, ref: React.Ref<HTMLDivElement>): NavBaseState => {\n const {\n onNavItemSelect,\n onNavCategoryItemToggle,\n multiple = true,\n openCategories: controlledOpenCategoryItems,\n selectedCategoryValue: controlledSelectedCategoryValue,\n selectedValue: controlledSelectedValue,\n defaultOpenCategories,\n defaultSelectedValue,\n defaultSelectedCategoryValue,\n } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const [openCategories, setOpenCategories] = useControllableState({\n state: controlledOpenCategoryItems,\n defaultState: initializeUncontrolledOpenCategories({ defaultOpenCategories, multiple }),\n initialState: [],\n });\n\n const [selectedCategoryValue, setSelectedCategoryValue] = useControllableState({\n state: controlledSelectedCategoryValue,\n defaultState: defaultSelectedCategoryValue,\n initialState: undefined,\n });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: controlledSelectedValue,\n defaultState: defaultSelectedValue,\n initialState: undefined,\n });\n\n // considered usePrevious, but it is sensitive to re-renders\n // this could cause the previous to move to current in the case where the navItem list re-renders.\n // these refs avoid getRegisteredNavItems changing when selectedValue changes and causing\n // renders for navItems that have not changed.\n const currentSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n\n const currentSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedValue.current !== selectedValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedValue.current = currentSelectedValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedValue.current = selectedValue;\n }\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedCategoryValue.current !== selectedCategoryValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedCategoryValue.current = currentSelectedCategoryValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedCategoryValue.current = selectedCategoryValue;\n }\n\n // used for NavItems and NavSubItems\n const onSelect: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n setSelectedValue(data.value);\n setSelectedCategoryValue(data.categoryValue ? data.categoryValue : '');\n onNavItemSelect?.(event, data);\n });\n\n // used for NavCategoryItems\n const onRequestNavCategoryItemToggle: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n if (data.categoryValue !== undefined) {\n const nextOpenCategories = updateOpenCategories(data.categoryValue, openCategories ?? [], multiple);\n onNavCategoryItemToggle?.(event, data);\n setOpenCategories(nextOpenCategories);\n }\n });\n\n const registeredNavItems = React.useRef<Record<string, NavItemRegisterData>>({});\n\n const onRegister = React.useCallback((data: NavItemRegisterData) => {\n registeredNavItems.current[JSON.stringify(data.value)] = data;\n }, []);\n\n const onUnregister = React.useCallback((data: NavItemRegisterData) => {\n delete registeredNavItems.current[JSON.stringify(data.value)];\n }, []);\n\n const getRegisteredNavItems = React.useCallback(() => {\n return {\n selectedValue: currentSelectedValue.current,\n previousSelectedValue: previousSelectedValue.current,\n selectedCategoryValue: currentSelectedCategoryValue.current,\n previousSelectedCategoryValue: previousSelectedCategoryValue.current,\n registeredNavItems: registeredNavItems.current,\n };\n }, []);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, innerRef) as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n openCategories,\n selectedValue,\n selectedCategoryValue,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredNavItems,\n onRequestNavCategoryItemToggle,\n multiple,\n };\n};\n"],"names":["React","useControllableState","useEventCallback","useMergedRefs","slot","getIntrinsicElementProps","initializeUncontrolledOpenCategories","defaultOpenCategories","multiple","undefined","Array","isArray","updateOpenCategories","value","previousOpenItems","includes","filter","i","useNav_unstable","props","ref","density","state","useNavBase_unstable","tabbable","onNavItemSelect","onNavCategoryItemToggle","openCategories","controlledOpenCategoryItems","selectedCategoryValue","controlledSelectedCategoryValue","selectedValue","controlledSelectedValue","defaultSelectedValue","defaultSelectedCategoryValue","innerRef","useRef","setOpenCategories","defaultState","initialState","setSelectedCategoryValue","setSelectedValue","currentSelectedValue","previousSelectedValue","currentSelectedCategoryValue","previousSelectedCategoryValue","current","onSelect","event","data","categoryValue","onRequestNavCategoryItemToggle","nextOpenCategories","registeredNavItems","onRegister","useCallback","JSON","stringify","onUnregister","getRegisteredNavItems","components","root","always","elementType"],"mappings":"AAAA;;;;;;;;;;;;QAsEauB;;;QAZAL;;;;;iEAxDU,QAAQ;gCAQxB,4BAA4B;AAKnC;;CAEC,GACD,SAASZ,qCAAqC,EAC5CC,qBAAqB,EACrBC,QAAQ,EAC6C;IACrD,IAAID,0BAA0BE,WAAW;QACvC,IAAIC,MAAMC,OAAO,CAACJ,wBAAwB;YACxC,OAAOC,WAAWD,wBAAwB;gBAACA,qBAAqB,CAAC,EAAE;aAAC;QACtE;QACA,OAAO;YAACA;SAAsB;IAChC;IACA,OAAOE;AACT;AAEA;;;;;CAKC,GACD,MAAMG,uBAAuB,CAACC,OAAqBC,mBAAmCN;IACpF,IAAIA,UAAU;QACZ,IAAIM,kBAAkBC,QAAQ,CAACF,QAAQ;YACrC,OAAOC,kBAAkBE,MAAM,CAACC,CAAAA,IAAKA,MAAMJ;QAC7C,OAAO;YACL,OAAO;mBAAIC;gBAAmBD;aAAM;QACtC;IACF;IAEA,OAAOC,iBAAiB,CAAC,EAAE,KAAKD,QAAQ,EAAE,GAAG;QAACA;KAAM;AACtD;AAWO,wBAAwB,CAACM,OAAiBC;IAC/C,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGF;IAE/B,MAAMG,QAAQC,oBAAoBJ,OAAOC;IAEzC,OAAO;QACL,GAAGE,KAAK;QACRD;QACAG,UAAU;IACZ;AACF,EAAE;AAEK,4BAA4B,CAACL,OAAqBC;IACvD,MAAM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AM,KACfzD,wCAAAA,EAAyB,OAAO;YAC9Be,SAAKjB,6BAAAA,EAAciB,KAAKe;YACxB,GAAGhB,KAAK;QACV,IACA;YAAE4C,aAAa;QAAM;QAEvBpC;QACAI;QACAF;QACAyB;QACAI;QACAX;QACAY;QACAR;QACA3C;IACF;AACF,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
navClassNames
|
|
13
|
+
get navClassNames () {
|
|
14
14
|
return navClassNames;
|
|
15
15
|
},
|
|
16
|
-
useNavStyles_unstable
|
|
16
|
+
get useNavStyles_unstable () {
|
|
17
17
|
return useNavStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useNavStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nexport const navClassNames = {\n root: 'fui-Nav'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column'\n }\n});\n/**\n * Apply styling to the Nav slots based on the state\n */ export const useNavStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(navClassNames.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"],"names":["__styles","mergeClasses","navClassNames","root","useStyles","mc9l5x","Beiy3e4","d","useNavStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["useNavStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nexport const navClassNames = {\n root: 'fui-Nav'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column'\n }\n});\n/**\n * Apply styling to the Nav slots based on the state\n */ export const useNavStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(navClassNames.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"],"names":["__styles","mergeClasses","navClassNames","root","useStyles","mc9l5x","Beiy3e4","d","useNavStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;QAECE,aAAa;;;;eAaTM,qBAAqB;;;uBAdG,gBAAgB;AAClD,sBAAsB;IACzBL,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGJ,eAAA,EAAA;IAAAG,IAAA,EAAA;QAAAE,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAKrB,CAAC;AAGS,8BAA+BE,KAAK,IAAG;IAC9C,MAAMC,MAAM,GAAGN,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAK,KAAK,CAACN,IAAI,CAACQ,SAAS,OAAGV,mBAAY,EAACC,aAAa,CAACC,IAAI,EAAEO,MAAM,CAACP,IAAI,EAAEM,KAAK,CAACN,IAAI,CAACQ,SAAS,CAAC;IAC1F,8CAAA;IACA,gFAAA;IACA,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
navClassNames
|
|
13
|
+
get navClassNames () {
|
|
14
14
|
return navClassNames;
|
|
15
15
|
},
|
|
16
|
-
useNavStyles_unstable
|
|
16
|
+
get useNavStyles_unstable () {
|
|
17
17
|
return useNavStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Nav/useNavStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavSlots, NavState } from './Nav.types';\n\nexport const navClassNames: SlotClassNames<NavSlots> = {\n root: 'fui-Nav',\n // TODO: add class names for all slots on NavSlots.\n // Should be of the form `<slotName>: 'fui-Nav__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the Nav slots based on the state\n */\nexport const useNavStyles_unstable = (state: NavState): NavState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(navClassNames.root, styles.root, state.root.className);\n\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","navClassNames","root","useStyles","display","flexDirection","useNavStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;;;;QA2BaO;;;;uBAzB4B,iBAAiB;AAInD,MAAML,gBAA0C;IACrDC,MAAM;AAGR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYJ,iBAAAA,EAAW;IAC3BG,MAAM;QACJE,SAAS;QACTC,eAAe;IACjB;AAGF;AAKO,8BAA8B,CAACE;IACpC,MAAMC,SAASL;IACf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,uBAAAA,EAAaC,cAAcC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;IAEzF,8CAA8C;IAC9C,gFAAgF;IAEhF,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategory/NavCategory.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavCategoryProps } from './NavCategory.types';\n\nimport { useNavCategory_unstable } from './useNavCategory';\nimport { renderNavCategory_unstable } from './renderNavCategory';\nimport { useNavCategoryContextValues_unstable } from '../useNavCategoryContextValues_unstable';\n\n/**\n * NavCategory component - a category in the navigation menu that can contain multiple items.\n */\nexport const NavCategory: ForwardRefComponent<NavCategoryProps> = React.forwardRef((props, ref) => {\n const state = useNavCategory_unstable(props, ref);\n const contextValues = useNavCategoryContextValues_unstable(state);\n\n return renderNavCategory_unstable(state, contextValues);\n});\n\nNavCategory.displayName = 'NavCategory';\n"],"names":["React","useNavCategory_unstable","renderNavCategory_unstable","useNavCategoryContextValues_unstable","NavCategory","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCAKS,sBAAmB;mCAChB,yBAAsB;sDACZ,6CAA0C;AAKxF,MAAMI,cAAAA,WAAAA,GAAqDJ,OAAMK,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQP,2CAAAA,EAAwBK,OAAOC;IAC7C,MAAME,oBAAgBN,0EAAAA,EAAqCK;IAE3D,WAAON,6CAAAA,EAA2BM,OAAOC;AAC3C,GAAG;AAEHL,YAAYM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategory/NavCategory.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { NavItemValue } from '../NavContext.types';\nimport type { NavCategoryContextValue } from '../NavCategoryContext';\n\n/**\n * NavCategory Props\n */\nexport type NavCategoryProps = {\n /**\n * Required value that identifies this item inside an Nav component.\n */\n value: NavItemValue;\n\n /**\n * Children of the NavCategory\n */\n children?: React.ReactNode | null;\n};\n\n/**\n * State used in rendering NavCategory\n */\nexport type NavCategoryState = NavCategoryContextValue & Required<NavCategoryProps>;\n"],"names":[],"mappings":"AAmBA;;CAEC,GACD,WAAoF"}
|
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
NavCategory
|
|
12
|
+
get NavCategory () {
|
|
13
13
|
return _NavCategory.NavCategory;
|
|
14
14
|
},
|
|
15
|
-
renderNavCategory_unstable
|
|
15
|
+
get renderNavCategory_unstable () {
|
|
16
16
|
return _renderNavCategory.renderNavCategory_unstable;
|
|
17
17
|
},
|
|
18
|
-
useNavCategory_unstable
|
|
18
|
+
get useNavCategory_unstable () {
|
|
19
19
|
return _useNavCategory.useNavCategory_unstable;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategory/index.ts"],"sourcesContent":["export { NavCategory } from './NavCategory';\nexport type { NavCategoryProps, NavCategoryState } from './NavCategory.types';\nexport { renderNavCategory_unstable } from './renderNavCategory';\nexport { useNavCategory_unstable } from './useNavCategory';\n"],"names":["NavCategory","renderNavCategory_unstable","useNavCategory_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAEXC,6CAA0B;;;eAC1BC,uCAAuB;;;6BAHJ,mBAAgB;mCAED,yBAAsB;gCACzB,sBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategory/renderNavCategory.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { NavCategoryContextValues } from '../NavCategoryContext';\nimport { NavCategoryProvider } from '../NavCategoryContext';\n\nimport type { NavCategoryState } from './NavCategory.types';\n\n/**\n * Render the final JSX of NavCategory\n */\nexport const renderNavCategory_unstable = (\n state: NavCategoryState,\n contextValues: NavCategoryContextValues,\n): JSXElement => {\n return <NavCategoryProvider value={contextValues.categoryValue}>{state.children}</NavCategoryProvider>;\n};\n"],"names":["React","NavCategoryProvider","renderNavCategory_unstable","state","contextValues","value","categoryValue","children"],"mappings":";;;;;;;;;;;iEAAuB,QAAQ;oCAGK,2BAAwB;AAOrD,MAAME,6BAA6B,CACxCC,OACAC;IAEA,OAAA,WAAA,GAAO,OAAA,aAAA,CAACH,uCAAAA,EAAAA;QAAoBI,OAAOD,cAAcE,aAAa;OAAGH,MAAMI,QAAQ;AACjF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategory/useNavCategory.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useNavContext_unstable } from '../NavContext';\n\nimport type { NavCategoryProps, NavCategoryState } from './NavCategory.types';\n\n/**\n * Create the state required to render NavCategory.\n *\n * The returned state can be modified with hooks such as useNavCategoryStyles_unstable,\n * before being passed to renderNavCategory_unstable.\n *\n * @param props - props from this instance of NavCategory\n * @param ref - reference to root HTMLDivElement of NavCategory\n */\nexport const useNavCategory_unstable = (props: NavCategoryProps, ref: React.Ref<HTMLDivElement>): NavCategoryState => {\n const { value, children } = props;\n\n const { openCategories } = useNavContext_unstable();\n\n const open: boolean = openCategories?.includes(value);\n\n return {\n open,\n value,\n children: children ?? null,\n };\n};\n"],"names":["useNavContext_unstable","useNavCategory_unstable","props","ref","value","children","openCategories","open","includes"],"mappings":"AAAA;;;;;;;;;;;4BAGuC,mBAAgB;AAahD,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGH;IAE5B,MAAM,EAAEI,cAAc,EAAE,OAAGN,kCAAAA;IAE3B,MAAMO,OAAgBD,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBE,QAAQ,CAACJ;IAE/C,OAAO;QACLG;QACAH;QACAC,QAAQ,EAAEA,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,WAAY;IACxB;AACF,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
NavCategoryProvider
|
|
13
|
+
get NavCategoryProvider () {
|
|
14
14
|
return NavCategoryProvider;
|
|
15
15
|
},
|
|
16
|
-
useNavCategoryContext_unstable
|
|
16
|
+
get useNavCategoryContext_unstable () {
|
|
17
17
|
return useNavCategoryContext_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../src/components/NavCategoryContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavItemValue } from './NavContext.types';\n\n// This context is analogous to AccordionItemContext\n\nexport type NavCategoryContextValues = {\n categoryValue: NavCategoryContextValue;\n};\n\nexport type NavCategoryContextValue = {\n open: boolean;\n value: NavItemValue;\n};\n\nconst NavCategoryContext = React.createContext<NavCategoryContextValue | undefined>(\n undefined,\n) as React.Context<NavCategoryContextValue>;\n\nconst navCategoryContextDefaultValue: NavCategoryContextValue = {\n open: false,\n value: '',\n};\n\nexport const { Provider: NavCategoryProvider } = NavCategoryContext;\n\nexport const useNavCategoryContext_unstable = (): NavCategoryContextValue => {\n return React.useContext(NavCategoryContext) ?? navCategoryContextDefaultValue;\n};\n"],"names":["React","NavCategoryContext","createContext","undefined","navCategoryContextDefaultValue","open","value","Provider","NavCategoryProvider","useNavCategoryContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;iEAEuB,QAAQ;AAc/B,MAAMC,mCAAqBD,OAAME,aAAa,CAC5CC;AAGF,MAAMC,iCAA0D;IAC9DC,MAAM;IACNC,OAAO;AACT;AAEO,MAAM,EAAEC,UAAUC,mBAAmB,EAAE,GAAGP,mBAAmB;AAE7D,MAAMQ,iCAAiC;QACrCT;IAAP,OAAA,CAAOA,oBAAAA,OAAMU,UAAU,CAACT,mBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAwCI;AACjD,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategoryItem/NavCategoryItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNavCategoryItem_unstable } from './useNavCategoryItem';\nimport { renderNavCategoryItem_unstable } from './renderNavCategoryItem';\nimport type { NavCategoryItemProps } from './NavCategoryItem.types';\nimport { useNavCategoryItemStyles_unstable } from './useNavCategoryItem.styles';\nimport { useNavCategoryItemContextValues_unstable } from '../useNavCategoryItemContextValues_unstable';\n\n/**\n * A Nav Category Item provides provides a clickable accordion like header that exposes\n * a list of NavSubItems to take users to a new destination.\n */\nexport const NavCategoryItem: ForwardRefComponent<NavCategoryItemProps> = React.forwardRef((props, ref) => {\n const state = useNavCategoryItem_unstable(props, ref);\n const contextValues = useNavCategoryItemContextValues_unstable(state);\n\n useNavCategoryItemStyles_unstable(state);\n useCustomStyleHook_unstable('useNavCategoryItemStyles')(state);\n\n return renderNavCategoryItem_unstable(state, contextValues);\n});\n\nNavCategoryItem.displayName = 'NavCategoryItem';\n"],"names":["React","useCustomStyleHook_unstable","useNavCategoryItem_unstable","renderNavCategoryItem_unstable","useNavCategoryItemStyles_unstable","useNavCategoryItemContextValues_unstable","NavCategoryItem","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;qCAEa,kCAAkC;oCAElC,0BAAuB;uCACpB,6BAA0B;0CAEvB,iCAA8B;0DACvB,iDAA8C;AAMhG,MAAMM,kBAAAA,WAAAA,GAA6DN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,YAAQR,+CAAAA,EAA4BM,OAAOC;IACjD,MAAME,oBAAgBN,kFAAAA,EAAyCK;QAE/DN,2DAAAA,EAAkCM;QAClCT,gDAAAA,EAA4B,4BAA4BS;IAExD,WAAOP,qDAAAA,EAA+BO,OAAOC;AAC/C,GAAG;AAEHL,gBAAgBM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategoryItem/NavCategoryItem.types.ts"],"sourcesContent":["import type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { NavDensity } from '../Nav/Nav.types';\nimport type { NavCategoryItemContextValue } from '../NavCategoryItemContext';\n\nexport type NavCategoryItemContextValues = {\n navCategoryItem: NavCategoryItemContextValue;\n};\n\nexport type NavCategoryItemSlots = {\n /**\n * The root element\n */\n root: NonNullable<Slot<'button'>>;\n\n /**\n * Icon that renders before the content.\n * Should be specific to each Category\n */\n icon?: Slot<'span'>;\n\n /**\n * Expand icon slot rendered after the content to indicate an open and closed state.\n */\n expandIcon: NonNullable<Slot<'span'>>;\n\n /**\n * Expand icon motion slot.\n */\n expandIconMotion?: Slot<PresenceMotionSlotProps>;\n};\n\n/**\n * Base slots for NavCategoryItem, excluding design/animation-specific slots.\n */\nexport type NavCategoryItemBaseSlots = Omit<NavCategoryItemSlots, 'expandIconMotion'>;\n\n/**\n * navCategoryItem Props\n */\nexport type NavCategoryItemProps = ComponentProps<Partial<NavCategoryItemSlots>>;\n\n/**\n * Base NavCategoryItemProps, excluding design/animation-specific props.\n */\nexport type NavCategoryItemBaseProps = ComponentProps<Partial<NavCategoryItemBaseSlots>>;\n\n/**\n * State used in rendering NavCategoryItem\n */\nexport type NavCategoryItemState = ComponentState<NavCategoryItemSlots> &\n NavCategoryItemContextValue & {\n /**\n * If this navCategoryItem is selected\n */\n selected: boolean;\n /**\n * The density of the NavItem\n *\n * @default 'medium'\n */\n density: NavDensity;\n };\n\n/**\n * State used in rendering NavCategoryItem, excluding design/animation-specific state.\n */\nexport type NavCategoryItemBaseState = ComponentState<NavCategoryItemBaseSlots> &\n Pick<NavCategoryItemState, 'open' | 'value' | 'selected'>;\n"],"names":[],"mappings":"AAgEA;;CAEC,GACD,WAC4D"}
|