@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
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-nav
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Thu, 22 Oct 2026 11:24:50 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.4.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.4.9)
|
|
8
|
+
|
|
9
|
+
Thu, 22 Oct 2026 11:24:50 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-nav_v9.4.8..@fluentui/react-nav_v9.4.9)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-button to v9.11.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
15
|
+
|
|
16
|
+
## [9.4.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.4.8)
|
|
17
|
+
|
|
18
|
+
Mon, 19 Oct 2026 16:49:01 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-nav_v9.4.7..@fluentui/react-nav_v9.4.8)
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- Bump @fluentui/react-aria to v9.17.16 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
24
|
+
- Bump @fluentui/react-button to v9.11.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
|
+
- Bump @fluentui/react-context-selector to v9.2.21 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
26
|
+
- Bump @fluentui/react-divider to v9.7.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
27
|
+
- Bump @fluentui/react-drawer to v9.13.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
28
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
29
|
+
- Bump @fluentui/react-motion to v9.16.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
30
|
+
- Bump @fluentui/react-motion-components-preview to v0.15.10 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
31
|
+
- Bump @fluentui/react-tabster to v9.26.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
32
|
+
- Bump @fluentui/react-tooltip to v9.10.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
33
|
+
- Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
34
|
+
|
|
7
35
|
## [9.4.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.4.7)
|
|
8
36
|
|
|
9
|
-
Wed, 23 Sep 2026 09:
|
|
37
|
+
Wed, 23 Sep 2026 09:04:33 GMT
|
|
10
38
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-nav_v9.4.6..@fluentui/react-nav_v9.4.7)
|
|
11
39
|
|
|
12
40
|
### Patches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItem/AppItem.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 { useAppItem_unstable } from './useAppItem';\nimport { renderAppItem_unstable } from './renderAppItem';\nimport { useAppItemStyles_unstable } from './useAppItemStyles.styles';\nimport type { AppItemProps } from './AppItem.types';\n\n/**\n * AppItem component - Application item in the navigation menu.\n */\nexport const AppItem: ForwardRefComponent<AppItemProps> = React.forwardRef((props, ref) => {\n const state = useAppItem_unstable(props, ref);\n\n useAppItemStyles_unstable(state);\n useCustomStyleHook_unstable('useAppItemStyles_unstable')(state);\n\n return renderAppItem_unstable(state);\n});\n\nAppItem.displayName = 'AppItem';\n"],"names":["React","useCustomStyleHook_unstable","useAppItem_unstable","renderAppItem_unstable","useAppItemStyles_unstable","AppItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,yBAAyB,QAAQ,+BAA4B;AAGtE;;CAEC,GACD,OAAO,MAAMC,wBAA6CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjF,MAAMC,QAAQP,oBAAoBK,OAAOC;IAEzCJ,0BAA0BK;IAC1BR,4BAA4B,6BAA6BQ;IAEzD,OAAON,uBAAuBM;AAChC,GAAG;AAEHJ,QAAQK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItem/AppItem.types.ts"],"sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { NavDensity } from '../Nav/Nav.types';\n\nexport type AppItemSlots = {\n /**\n * The root element of the AppItem.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * AppItem Props\n */\nexport type AppItemProps = ComponentProps<AppItemSlots> & { href?: string };\n\nexport type AppItemBaseProps = AppItemProps;\n\n/**\n * State used in rendering AppItem\n */\nexport type AppItemState = ComponentState<AppItemSlots> & {\n /**\n * The density of the NavItem\n *\n * @default 'medium'\n */\n density: NavDensity;\n};\n\nexport type AppItemBaseState = Omit<AppItemState, 'density'>;\n"],"names":[],"mappings":"AAmCA,WAA6D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItem/index.ts"],"sourcesContent":["export { AppItem } from './AppItem';\nexport type { AppItemProps, AppItemSlots, AppItemState, AppItemBaseProps, AppItemBaseState } from './AppItem.types';\nexport { renderAppItem_unstable } from './renderAppItem';\nexport { useAppItem_unstable, useAppItemBase_unstable } from './useAppItem';\nexport { appItemClassNames, useAppItemStyles, useAppItemStyles_unstable } from './useAppItemStyles.styles';\n"],"names":["AppItem","renderAppItem_unstable","useAppItem_unstable","useAppItemBase_unstable","appItemClassNames","useAppItemStyles","useAppItemStyles_unstable"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAY;AAEpC,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,kBAAe;AAC5E,SAASC,iBAAiB,EAAEC,gBAAgB,EAAEC,yBAAyB,QAAQ,+BAA4B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of AppItem
|
|
5
5
|
*/ export const renderAppItem_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItem/renderAppItem.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 type { AppItemState, AppItemSlots } from './AppItem.types';\n\n/**\n * Render the final JSX of AppItem\n */\nexport const renderAppItem_unstable = (state: AppItemState): JSXElement => {\n assertSlots<AppItemSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAppItem_unstable","state","root","icon","children"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrCF,YAA0BE;IAE1B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMC,IAAI,CAACE,QAAQ;;;AAG1B,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItem/useAppItem.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { AppItemBaseProps, AppItemBaseState, AppItemProps, AppItemState } from './AppItem.types';\nimport type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useNavContext_unstable } from '../NavContext';\n\n/**\n * Create the state required to render AppItem.\n *\n * The returned state can be modified with hooks such as useAppItemStyles_unstable,\n * before being passed to renderAppItem_unstable.\n *\n * @param props - props from this instance of AppItem\n * @param ref - reference to root HTMLDivElement of AppItem\n */\nexport const useAppItem_unstable = (\n props: AppItemProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): AppItemState => {\n const { density = 'medium' } = useNavContext_unstable();\n const state = useAppItemBase_unstable(props, ref);\n\n return {\n ...state,\n density,\n };\n};\n\n/**\n * Create the base state required to render AppItem.\n *\n * The returned state can be modified with hooks such as useAppItemStyles_unstable,\n * before being passed to renderAppItem_unstable.\n *\n * @param props - props from this instance of AppItem\n * @param ref - reference to root HTMLDivElement of AppItem\n * @returns The base state of AppItem\n */\nexport const useAppItemBase_unstable = (\n props: AppItemBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): AppItemBaseState => {\n const { icon, as, href } = props;\n const rootElementType = as || (href ? 'a' : 'button');\n\n const root = slot.always<ARIAButtonSlotProps<'a'>>(\n getIntrinsicElementProps(\n rootElementType,\n useARIAButtonProps(rootElementType, {\n ...props,\n }),\n ),\n {\n elementType: rootElementType,\n defaultProps: {\n ref: ref as React.Ref<HTMLButtonElement & HTMLAnchorElement>,\n type: rootElementType,\n },\n },\n );\n\n return {\n components: {\n root: rootElementType,\n icon: 'span',\n },\n root,\n icon: slot.optional(icon, {\n elementType: 'span',\n }),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useARIAButtonProps","useNavContext_unstable","useAppItem_unstable","props","ref","density","state","useAppItemBase_unstable","icon","as","href","rootElementType","root","always","elementType","defaultProps","type","components","optional"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,sBAAsB,QAAQ,mBAAgB;AAEvD;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CACjCC,OACAC;IAEA,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGJ;IAC/B,MAAMK,QAAQC,wBAAwBJ,OAAOC;IAE7C,OAAO;QACL,GAAGE,KAAK;QACRD;IACF;AACF,EAAE;AAEF;;;;;;;;;CASC,GACD,OAAO,MAAME,0BAA0B,CACrCJ,OACAC;IAEA,MAAM,EAAEI,IAAI,EAAEC,EAAE,EAAEC,IAAI,EAAE,GAAGP;IAC3B,MAAMQ,kBAAkBF,MAAOC,CAAAA,OAAO,MAAM,QAAO;IAEnD,MAAME,OAAOb,KAAKc,MAAM,CACtBf,yBACEa,iBACAX,mBAAmBW,iBAAiB;QAClC,GAAGR,KAAK;IACV,KAEF;QACEW,aAAaH;QACbI,cAAc;YACZX,KAAKA;YACLY,MAAML;QACR;IACF;IAGF,OAAO;QACLM,YAAY;YACVL,MAAMD;YACNH,MAAM;QACR;QACAI;QACAJ,MAAMT,KAAKmB,QAAQ,CAACV,MAAM;YACxBM,aAAa;QACf;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItem/useAppItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { AppItemSlots, AppItemState } from './AppItem.types';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useIconStyles, useRootDefaultClassName } from '../sharedNavStyles.styles';\n\nexport const appItemClassNames: SlotClassNames<AppItemSlots> = {\n root: 'fui-AppItem',\n icon: 'fui-AppItem__icon',\n};\n\n/**\n * Styles for the root slot\n */\nexport const useAppItemStyles = makeStyles({\n root: {\n marginInline: '4px',\n width: 'revert',\n alignItems: 'center',\n gap: '10px',\n marginInlineStart: '-6px',\n marginInlineEnd: '0px',\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalS} ${tokens.spacingHorizontalMNudge}`,\n ...typographyStyles.subtitle2,\n },\n small: {\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalS} 14px`,\n gap: '14px',\n },\n absentIconRootAdjustment: {\n paddingInlineStart: '16px',\n },\n});\n\n/**\n * Apply styling to the AppItem slots based on the state\n */\nexport const useAppItemStyles_unstable = (state: AppItemState): AppItemState => {\n const rootDefaultClassName = useRootDefaultClassName();\n const iconStyles = useIconStyles();\n const appItemSpecificStyles = useAppItemStyles();\n\n const { density, icon } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n rootDefaultClassName,\n appItemClassNames.root,\n appItemSpecificStyles.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(appItemClassNames.icon, iconStyles.base, state.icon.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","useIconStyles","useRootDefaultClassName","appItemClassNames","root","icon","useAppItemStyles","marginInline","width","alignItems","gap","marginInlineStart","marginInlineEnd","padding","spacingVerticalS","spacingHorizontalS","spacingHorizontalMNudge","subtitle2","small","absentIconRootAdjustment","paddingInlineStart","useAppItemStyles_unstable","state","rootDefaultClassName","iconStyles","appItemSpecificStyles","density","className","base"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,aAAa,EAAEC,uBAAuB,QAAQ,+BAA4B;AAEnF,OAAO,MAAMC,oBAAkD;IAC7DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMC,mBAAmBT,WAAW;IACzCO,MAAM;QACJG,cAAc;QACdC,OAAO;QACPC,YAAY;QACZC,KAAK;QACLC,mBAAmB;QACnBC,iBAAiB;QACjBC,SAAS,GAAGd,OAAOe,gBAAgB,CAAC,CAAC,EAAEf,OAAOgB,kBAAkB,CAAC,CAAC,EAAEhB,OAAOe,gBAAgB,CAAC,CAAC,EAAEf,OAAOiB,uBAAuB,EAAE;QAC/H,GAAGhB,iBAAiBiB,SAAS;IAC/B;IACAC,OAAO;QACLL,SAAS,GAAGd,OAAOe,gBAAgB,CAAC,CAAC,EAAEf,OAAOgB,kBAAkB,CAAC,CAAC,EAAEhB,OAAOe,gBAAgB,CAAC,KAAK,CAAC;QAClGJ,KAAK;IACP;IACAS,0BAA0B;QACxBC,oBAAoB;IACtB;AACF,GAAG;AAEH;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAMC,uBAAuBrB;IAC7B,MAAMsB,aAAavB;IACnB,MAAMwB,wBAAwBnB;IAE9B,MAAM,EAAEoB,OAAO,EAAErB,IAAI,EAAE,GAAGiB;IAE1B,oDAAoD;IACpDA,MAAMlB,IAAI,CAACuB,SAAS,GAAG7B,aACrByB,sBACApB,kBAAkBC,IAAI,EACtBqB,sBAAsBrB,IAAI,EAC1BsB,YAAY,WAAWD,sBAAsBP,KAAK,EAClD,CAACb,QAAQoB,sBAAsBN,wBAAwB,EACvDG,MAAMlB,IAAI,CAACuB,SAAS;IAGtB,IAAIL,MAAMjB,IAAI,EAAE;QACd,oDAAoD;QACpDiB,MAAMjB,IAAI,CAACsB,SAAS,GAAG7B,aAAaK,kBAAkBE,IAAI,EAAEmB,WAAWI,IAAI,EAAEN,MAAMjB,IAAI,CAACsB,SAAS;IACnG;IAEA,OAAOL;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItemStatic/AppItemStatic.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 { useAppItemStatic_unstable } from './useAppItemStatic';\nimport { renderAppItemStatic_unstable } from './renderAppItemStatic';\nimport { useAppItemStaticStyles_unstable } from './useAppItemStaticStyles.styles';\nimport type { AppItemStaticProps } from './AppItemStatic.types';\n\n/**\n * AppItemStatic component - Static application item in the navigation menu.\n */\nexport const AppItemStatic: ForwardRefComponent<AppItemStaticProps> = React.forwardRef((props, ref) => {\n const state = useAppItemStatic_unstable(props, ref);\n\n useAppItemStaticStyles_unstable(state);\n useCustomStyleHook_unstable('useAppItemStaticStyles_unstable')(state);\n\n return renderAppItemStatic_unstable(state);\n});\n\nAppItemStatic.displayName = 'AppItemStatic';\n"],"names":["React","useCustomStyleHook_unstable","useAppItemStatic_unstable","renderAppItemStatic_unstable","useAppItemStaticStyles_unstable","AppItemStatic","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,qCAAkC;AAGlF;;CAEC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQP,0BAA0BK,OAAOC;IAE/CJ,gCAAgCK;IAChCR,4BAA4B,mCAAmCQ;IAE/D,OAAON,6BAA6BM;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItemStatic/AppItemStatic.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { NavDensity } from '../Nav/Nav.types';\n\nexport type AppItemStaticSlots = {\n /**\n * The root element of the AppItemStatic.\n */\n root: Slot<'div'>;\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * AppItemStatic Props\n */\nexport type AppItemStaticProps = ComponentProps<AppItemStaticSlots>;\n\nexport type AppItemStaticBaseProps = AppItemStaticProps;\n\n/**\n * State used in rendering AppItemStatic\n */\nexport type AppItemStaticState = ComponentState<AppItemStaticSlots> & {\n /**\n * The density of the Nav\n *\n * @default 'medium'\n */\n density: NavDensity;\n};\n\nexport type AppItemStaticBaseState = Omit<AppItemStaticState, 'density'>;\n"],"names":[],"mappings":"AAiCA,WAAyE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItemStatic/index.ts"],"sourcesContent":["export { AppItemStatic } from './AppItemStatic';\nexport type {\n AppItemStaticProps,\n AppItemStaticSlots,\n AppItemStaticState,\n AppItemStaticBaseProps,\n AppItemStaticBaseState,\n} from './AppItemStatic.types';\nexport { renderAppItemStatic_unstable } from './renderAppItemStatic';\nexport { useAppItemStatic_unstable, useAppItemStaticBase_unstable } from './useAppItemStatic';\nexport { appItemStaticClassNames, useAppItemStaticStyles_unstable } from './useAppItemStaticStyles.styles';\n"],"names":["AppItemStatic","renderAppItemStatic_unstable","useAppItemStatic_unstable","useAppItemStaticBase_unstable","appItemStaticClassNames","useAppItemStaticStyles_unstable"],"mappings":"AAAA,SAASA,aAAa,QAAQ,qBAAkB;AAQhD,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,yBAAyB,EAAEC,6BAA6B,QAAQ,wBAAqB;AAC9F,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,qCAAkC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of AppItemStatic
|
|
5
5
|
*/ export const renderAppItemStatic_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItemStatic/renderAppItemStatic.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 type { AppItemStaticState, AppItemStaticSlots } from './AppItemStatic.types';\n\n/**\n * Render the final JSX of AppItemStatic\n */\nexport const renderAppItemStatic_unstable = (state: AppItemStaticState): JSXElement => {\n assertSlots<AppItemStaticSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAppItemStatic_unstable","state","root","icon","children"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMC,IAAI,CAACE,QAAQ;;;AAG1B,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AppItemStatic/useAppItemStatic.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type {\n AppItemStaticBaseProps,\n AppItemStaticBaseState,\n AppItemStaticProps,\n AppItemStaticState,\n} from './AppItemStatic.types';\nimport { useNavContext_unstable } from '../NavContext';\n\n/**\n * Create the state required to render AppItemStatic.\n *\n * The returned state can be modified with hooks such as useAppItemStaticStyles_unstable,\n * before being passed to renderAppItemStatic_unstable.\n *\n * @param props - props from this instance of AppItemStatic\n * @param ref - reference to root HTMLDivElement of AppItemStatic\n */\nexport const useAppItemStatic_unstable = (\n props: AppItemStaticProps,\n ref: React.Ref<HTMLDivElement>,\n): AppItemStaticState => {\n const { density = 'medium' } = useNavContext_unstable();\n const state = useAppItemStaticBase_unstable(props, ref);\n\n return {\n ...state,\n density,\n };\n};\n\nexport const useAppItemStaticBase_unstable = (\n props: AppItemStaticBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): AppItemStaticBaseState => {\n const { icon } = props;\n\n return {\n components: {\n root: 'div',\n icon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(icon, {\n elementType: 'span',\n }),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useNavContext_unstable","useAppItemStatic_unstable","props","ref","density","state","useAppItemStaticBase_unstable","icon","components","root","always","elementType","optional"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAO3E,SAASC,sBAAsB,QAAQ,mBAAgB;AAEvD;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGJ;IAC/B,MAAMK,QAAQC,8BAA8BJ,OAAOC;IAEnD,OAAO;QACL,GAAGE,KAAK;QACRD;IACF;AACF,EAAE;AAEF,OAAO,MAAME,gCAAgC,CAC3CJ,OACAC;IAEA,MAAM,EAAEI,IAAI,EAAE,GAAGL;IAEjB,OAAO;QACLM,YAAY;YACVC,MAAM;YACNF,MAAM;QACR;QACAE,MAAMV,KAAKW,MAAM,CACfZ,yBAAyB,OAAO;YAC9BK;YACA,GAAGD,KAAK;QACV,IACA;YAAES,aAAa;QAAM;QAEvBJ,MAAMR,KAAKa,QAAQ,CAACL,MAAM;YACxBI,aAAa;QACf;IACF;AACF,EAAE"}
|
|
@@ -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;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,gBAAgB,QAAQ,wCAAqC;AACtE,SAASC,aAAa,EAAEC,uBAAuB,QAAQ,+BAA4B;AAEnF,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,MAAMC,yBAAyBR,WAAW;IACxCM,MAAM;QACJG,QAAQ;QACR,UAAU;YACRC,iBAAiB;QACnB;QACA,WAAW;YACTA,iBAAiB;QACnB;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9C,MAAMC,uBAAuBT;IAC7B,MAAMU,aAAaX;IACnB,MAAMY,wBAAwBb;IAC9B,MAAMc,sBAAsBR;IAE5B,MAAM,EAAES,OAAO,EAAEV,IAAI,EAAE,GAAGK;IAE1B,oDAAoD;IACpDA,MAAMN,IAAI,CAACY,SAAS,GAAGjB,aACrBY,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,GAAGjB,aAAaI,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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,2BAA2B,QAAQ,iCAA8B;AAG1E;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQN,sBAAsBI,OAAOC;IAE3CJ,4BAA4BK;IAC5BP,4BAA4B,+BAA+BO;IAE3D,OAAOR,sBAAsBQ;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"}
|
|
@@ -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":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AAExC,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,mBAAmB,EAAEC,2BAA2B,QAAQ,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;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,kBAAkB,QAAQ,wBAAwB;AAG3D;;;;;CAKC,GACD,OAAO,MAAMC,wBAAwB,CACnCC,OACAC;IAEA,OAAOJ,mBAAmB;QAAEK,oBAAM,oBAACJ;QAAuBK,YAAY;QAAe,GAAGH,KAAK;IAAC,GAAGC;AACnG,EAAE"}
|
|
@@ -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;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,wBAAwB,QAAQ,yBAAyB;AAGlE,SAASC,aAAa,QAAQ,+BAA4B;AAE1D,OAAO,MAAMC,sBAAmD;IAC9DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,oBAAoB;QACpBC,iBAAiBN,cAAcM,eAAe;QAC9CC,QAAQ;QACR,UAAU;YACRD,iBAAiBN,cAAcQ,oBAAoB;QACrD;QACA,WAAW;YACTF,iBAAiBN,cAAcS,sBAAsB;QACvD;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CZ,yBAAyBY;IACzB,MAAMC,SAASR;IAEf,oDAAoD;IACpDO,MAAMT,IAAI,CAACW,SAAS,GAAGf,aAAaG,oBAAoBC,IAAI,EAAEU,OAAOV,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAE/F,IAAIF,MAAMR,IAAI,EAAE;QACd,oDAAoD;QACpDQ,MAAMR,IAAI,CAACU,SAAS,GAAGf,aAAaG,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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,eAAe,QAAQ,cAAW;AAC3C,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,qBAAqB,QAAQ,2BAAwB;AAC9D,SAASC,4BAA4B,QAAQ,4BAAyB;AAGtE;;CAEC,GACD,OAAO,MAAMC,oBAAqCN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACzE,MAAMC,QAAQR,gBAAgBM,OAAOC;IAErC,MAAME,gBAAgBN,6BAA6BK;IAEnDN,sBAAsBM;IACtBT,4BAA4B,+BAA+BS;IAE3D,OAAOP,mBAAmBO,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":"AA0GA,WAAkE"}
|
|
@@ -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":"AAAA,SAASA,GAAG,QAAQ,WAAQ;AAU5B,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,cAAW;AAChE,SAASC,qBAAqB,EAAEC,aAAa,QAAQ,2BAAwB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { NavProvider } from "../NavContext.js";
|
|
4
4
|
export const renderNav_unstable = (state, contextValues)=>{
|
|
5
5
|
assertSlots(state);
|
|
@@ -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":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,WAAW,QAAQ,mBAAgB;AAI5C,OAAO,MAAMC,qBAAqB,CAACC,OAAiBC;IAClDJ,YAAsBG;IAEtB,qBACE,KAACF;QAAYI,OAAOD,cAAcE,GAAG;kBACnC,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -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":"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"}
|
|
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":"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"}
|
|
@@ -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;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,gBAA0C;IACrDC,MAAM;AAGR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,SAAS;QACTC,eAAe;IACjB;AAGF;AAEA;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpC,MAAMC,SAASL;IACf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,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;AAEA,YAAYA,WAAW,QAAQ;AAK/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,oCAAoC,QAAQ,6CAA0C;AAE/F;;CAEC,GACD,OAAO,MAAMC,4BAAqDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQP,wBAAwBK,OAAOC;IAC7C,MAAME,gBAAgBN,qCAAqCK;IAE3D,OAAON,2BAA2BM,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"}
|
|
@@ -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":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,uBAAuB,QAAQ,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":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,mBAAmB,QAAQ,2BAAwB;AAI5D;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,qBAAO,oBAACH;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;AAGA,SAASA,sBAAsB,QAAQ,mBAAgB;AAIvD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGH;IAE5B,MAAM,EAAEI,cAAc,EAAE,GAAGN;IAE3B,MAAMO,OAAgBD,2BAAAA,qCAAAA,eAAgBE,QAAQ,CAACJ;IAE/C,OAAO;QACLG;QACAH;QACAC,QAAQ,EAAEA,qBAAAA,sBAAAA,WAAY;IACxB;AACF,EAAE"}
|
|
@@ -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;AAEA,YAAYA,WAAW,QAAQ;AAc/B,MAAMC,qBAAqBD,MAAME,aAAa,CAC5CC;AAGF,MAAMC,iCAA0D;IAC9DC,MAAM;IACNC,OAAO;AACT;AAEA,OAAO,MAAM,EAAEC,UAAUC,mBAAmB,EAAE,GAAGP,mBAAmB;AAEpE,OAAO,MAAMQ,iCAAiC;QACrCT;IAAP,QAAOA,oBAAAA,MAAMU,UAAU,CAACT,iCAAjBD,+BAAAA,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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AAEzE,SAASC,iCAAiC,QAAQ,iCAA8B;AAChF,SAASC,wCAAwC,QAAQ,iDAA8C;AAEvG;;;CAGC,GACD,OAAO,MAAMC,gCAA6DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IACjD,MAAME,gBAAgBN,yCAAyCK;IAE/DN,kCAAkCM;IAClCT,4BAA4B,4BAA4BS;IAExD,OAAOP,+BAA+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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategoryItem/index.ts"],"sourcesContent":["export { NavCategoryItem } from './NavCategoryItem';\nexport type {\n NavCategoryItemSlots,\n NavCategoryItemProps,\n NavCategoryItemState,\n NavCategoryItemBaseProps,\n NavCategoryItemBaseSlots,\n NavCategoryItemBaseState,\n} from './NavCategoryItem.types';\nexport { renderNavCategoryItem_unstable } from './renderNavCategoryItem';\nexport { useNavCategoryItem_unstable, useNavCategoryItemBase_unstable } from './useNavCategoryItem';\nexport { useNavCategoryItemStyles_unstable, navCategoryItemClassNames } from './useNavCategoryItem.styles';\n"],"names":["NavCategoryItem","renderNavCategoryItem_unstable","useNavCategoryItem_unstable","useNavCategoryItemBase_unstable","useNavCategoryItemStyles_unstable","navCategoryItemClassNames"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AASpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,iCAAiC,EAAEC,yBAAyB,QAAQ,iCAA8B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { NavCategoryItemProvider } from "../NavCategoryItemContext.js";
|
|
4
4
|
const getExpandIcon = (state)=>{
|
|
5
5
|
assertSlots(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategoryItem/renderNavCategoryItem.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 type { NavCategoryItemState, NavCategoryItemSlots, NavCategoryItemContextValues } from './NavCategoryItem.types';\nimport { NavCategoryItemProvider } from '../NavCategoryItemContext';\n\nconst getExpandIcon = (state: NavCategoryItemState) => {\n assertSlots<NavCategoryItemSlots>(state);\n\n if (!state.expandIcon) {\n return null;\n }\n\n if (!state.expandIconMotion) {\n return <state.expandIcon />;\n }\n\n return (\n <state.expandIconMotion>\n <state.expandIcon />\n </state.expandIconMotion>\n );\n};\n\n/**\n * Render the final JSX of NavCategoryItem\n */\nexport const renderNavCategoryItem_unstable = (\n state: NavCategoryItemState,\n contextValues: NavCategoryItemContextValues,\n): JSXElement => {\n assertSlots<NavCategoryItemSlots>(state);\n\n return (\n <NavCategoryItemProvider value={contextValues.navCategoryItem}>\n <state.root>\n {state.icon && <state.icon />}\n {state.root.children}\n {getExpandIcon(state)}\n </state.root>\n </NavCategoryItemProvider>\n );\n};\n"],"names":["assertSlots","NavCategoryItemProvider","getExpandIcon","state","expandIcon","expandIconMotion","renderNavCategoryItem_unstable","contextValues","value","navCategoryItem","root","icon","children"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,uBAAuB,QAAQ,+BAA4B;AAEpE,MAAMC,gBAAgB,CAACC;IACrBH,YAAkCG;IAElC,IAAI,CAACA,MAAMC,UAAU,EAAE;QACrB,OAAO;IACT;IAEA,IAAI,CAACD,MAAME,gBAAgB,EAAE;QAC3B,qBAAO,KAACF,MAAMC,UAAU;IAC1B;IAEA,qBACE,KAACD,MAAME,gBAAgB;kBACrB,cAAA,KAACF,MAAMC,UAAU;;AAGvB;AAEA;;CAEC,GACD,OAAO,MAAME,iCAAiC,CAC5CH,OACAI;IAEAP,YAAkCG;IAElC,qBACE,KAACF;QAAwBO,OAAOD,cAAcE,eAAe;kBAC3D,cAAA,MAACN,MAAMO,IAAI;;gBACRP,MAAMQ,IAAI,kBAAI,KAACR,MAAMQ,IAAI;gBACzBR,MAAMO,IAAI,CAACE,QAAQ;gBACnBV,cAAcC;;;;AAIvB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NavCategoryItem/useNavCategoryItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport { ChevronDown20Regular } from '@fluentui/react-icons';\nimport { createPresenceComponentVariant, motionTokens, presenceMotionSlot } from '@fluentui/react-motion';\n\nimport type {\n NavCategoryItemBaseProps,\n NavCategoryItemBaseState,\n NavCategoryItemProps,\n NavCategoryItemState,\n} from './NavCategoryItem.types';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\nimport { useNavContext_unstable } from '../NavContext';\nimport { Rotate } from '@fluentui/react-motion-components-preview';\n\nconst ExpandIconMotion = createPresenceComponentVariant(Rotate, {\n duration: motionTokens.durationFast,\n easing: motionTokens.curveEasyEase,\n animateOpacity: false, // Don't fade out the icon\n outAngle: 0,\n inAngle: 180,\n});\n\n/**\n * Create the state required to render NavCategoryItem.\n *\n * The returned state can be modified with hooks such as useNavCategoryItemStyles,\n * before being passed to renderNavCategoryItem.\n *\n * @param props - props from this instance of NavCategoryItem\n * @param ref - reference to root HTMLButtonElement of NavCategoryItem\n */\nexport const useNavCategoryItem_unstable = (\n props: NavCategoryItemProps,\n ref: React.Ref<HTMLButtonElement>,\n): NavCategoryItemState => {\n const { density = 'medium' } = useNavContext_unstable();\n\n const state = useNavCategoryItemBase_unstable(props, ref);\n\n return {\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n expandIconMotion: ExpandIconMotion,\n },\n expandIcon: slot.always(props.expandIcon, {\n defaultProps: {\n children: <ChevronDown20Regular />,\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n expandIconMotion: presenceMotionSlot(props.expandIconMotion, {\n elementType: ExpandIconMotion,\n defaultProps: {\n visible: state.open,\n },\n }),\n density,\n };\n};\n\n/**\n * Create the base state required to render NavCategoryItem.\n *\n * @param props - props from this instance of NavCategoryItem\n * @param ref - reference to root HTMLButtonElement of NavCategoryItem\n */\nexport const useNavCategoryItemBase_unstable = (\n props: NavCategoryItemBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): NavCategoryItemBaseState => {\n const { onClick, expandIcon, icon } = props;\n\n const { open, value } = useNavCategoryContext_unstable();\n\n const { onRequestNavCategoryItemToggle, selectedCategoryValue } = useNavContext_unstable();\n\n const onNavCategoryItemClick = useEventCallback(\n mergeCallbacks(onClick, event =>\n onRequestNavCategoryItemToggle(event, { type: 'click', event, value: '', categoryValue: value }),\n ),\n );\n\n // don't fill the icon when it's open\n const selected = selectedCategoryValue === value && !open;\n // there's more than 2 possible values for aria-current, but this is the only one that's used in this component\n const validAriaCurrent: 'page' | 'false' = selected && !open ? 'page' : 'false';\n\n return {\n open,\n value,\n selected,\n components: {\n root: 'button',\n icon: 'span',\n expandIcon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-current': validAriaCurrent,\n 'aria-expanded': open,\n ...props,\n onClick: onNavCategoryItemClick,\n }),\n { elementType: 'button' },\n ),\n expandIcon: slot.always(expandIcon, {\n defaultProps: {\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n icon: slot.optional(icon, {\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useEventCallback","ChevronDown20Regular","createPresenceComponentVariant","motionTokens","presenceMotionSlot","useNavCategoryContext_unstable","useNavContext_unstable","Rotate","ExpandIconMotion","duration","durationFast","easing","curveEasyEase","animateOpacity","outAngle","inAngle","useNavCategoryItem_unstable","props","ref","density","state","useNavCategoryItemBase_unstable","components","expandIconMotion","expandIcon","always","defaultProps","children","elementType","visible","open","onClick","icon","value","onRequestNavCategoryItemToggle","selectedCategoryValue","onNavCategoryItemClick","event","type","categoryValue","selected","validAriaCurrent","root","optional"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC7G,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,8BAA8B,EAAEC,YAAY,EAAEC,kBAAkB,QAAQ,yBAAyB;AAQ1G,SAASC,8BAA8B,QAAQ,2BAAwB;AACvE,SAASC,sBAAsB,QAAQ,mBAAgB;AACvD,SAASC,MAAM,QAAQ,4CAA4C;AAEnE,MAAMC,mBAAmBN,+BAA+BK,QAAQ;IAC9DE,UAAUN,aAAaO,YAAY;IACnCC,QAAQR,aAAaS,aAAa;IAClCC,gBAAgB;IAChBC,UAAU;IACVC,SAAS;AACX;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGb;IAE/B,MAAMc,QAAQC,gCAAgCJ,OAAOC;IAErD,OAAO;QACL,GAAGE,KAAK;QACRE,YAAY;YACV,4DAA4D;YAC5D,GAAGF,MAAME,UAAU;YACnBC,kBAAkBf;QACpB;QACAgB,YAAYzB,KAAK0B,MAAM,CAACR,MAAMO,UAAU,EAAE;YACxCE,cAAc;gBACZC,wBAAU,oBAAC1B;gBACX,eAAe;YACjB;YACA2B,aAAa;QACf;QACAL,kBAAkBnB,mBAAmBa,MAAMM,gBAAgB,EAAE;YAC3DK,aAAapB;YACbkB,cAAc;gBACZG,SAAST,MAAMU,IAAI;YACrB;QACF;QACAX;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAME,kCAAkC,CAC7CJ,OACAC;IAEA,MAAM,EAAEa,OAAO,EAAEP,UAAU,EAAEQ,IAAI,EAAE,GAAGf;IAEtC,MAAM,EAAEa,IAAI,EAAEG,KAAK,EAAE,GAAG5B;IAExB,MAAM,EAAE6B,8BAA8B,EAAEC,qBAAqB,EAAE,GAAG7B;IAElE,MAAM8B,yBAAyBpC,iBAC7BF,eAAeiC,SAASM,CAAAA,QACtBH,+BAA+BG,OAAO;YAAEC,MAAM;YAASD;YAAOJ,OAAO;YAAIM,eAAeN;QAAM;IAIlG,qCAAqC;IACrC,MAAMO,WAAWL,0BAA0BF,SAAS,CAACH;IACrD,+GAA+G;IAC/G,MAAMW,mBAAqCD,YAAY,CAACV,OAAO,SAAS;IAExE,OAAO;QACLA;QACAG;QACAO;QACAlB,YAAY;YACVoB,MAAM;YACNV,MAAM;YACNR,YAAY;QACd;QACAkB,MAAM3C,KAAK0B,MAAM,CACf5B,yBAAyB,UAAU;YACjCqB;YACA,gBAAgBuB;YAChB,iBAAiBX;YACjB,GAAGb,KAAK;YACRc,SAASK;QACX,IACA;YAAER,aAAa;QAAS;QAE1BJ,YAAYzB,KAAK0B,MAAM,CAACD,YAAY;YAClCE,cAAc;gBACZ,eAAe;YACjB;YACAE,aAAa;QACf;QACAI,MAAMjC,KAAK4C,QAAQ,CAACX,MAAM;YACxBJ,aAAa;QACf;IACF;AACF,EAAE"}
|