@fluentui/react-nav 0.0.0-nightly-20250704-0407.1 → 9.0.0
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 +2 -118
- package/dist/index.d.ts +11 -37
- package/lib/components/AppItem/AppItem.js +9 -3
- package/lib/components/AppItem/AppItem.js.map +1 -1
- package/lib/components/AppItemStatic/AppItemStatic.js +9 -3
- package/lib/components/AppItemStatic/AppItemStatic.js.map +1 -1
- package/lib/components/Hamburger/Hamburger.js +5 -4
- package/lib/components/Hamburger/Hamburger.js.map +1 -1
- package/lib/components/Nav/Nav.js +0 -2
- package/lib/components/Nav/Nav.js.map +1 -1
- package/lib/components/NavCategory/NavCategory.js +1 -1
- package/lib/components/NavCategory/NavCategory.js.map +1 -1
- package/lib/components/NavCategory/renderNavCategory.js.map +1 -1
- package/lib/components/NavCategoryItem/NavCategoryItem.js +3 -2
- package/lib/components/NavCategoryItem/NavCategoryItem.js.map +1 -1
- package/lib/components/NavCategoryItem/NavCategoryItem.types.js.map +1 -1
- package/lib/components/NavCategoryItem/renderNavCategoryItem.js +1 -13
- package/lib/components/NavCategoryItem/renderNavCategoryItem.js.map +1 -1
- package/lib/components/NavCategoryItem/useNavCategoryItem.js +3 -37
- package/lib/components/NavCategoryItem/useNavCategoryItem.js.map +1 -1
- package/lib/components/NavCategoryItem/useNavCategoryItem.styles.js +1 -2
- package/lib/components/NavCategoryItem/useNavCategoryItem.styles.js.map +1 -1
- package/lib/components/NavDivider/NavDivider.js +5 -4
- package/lib/components/NavDivider/NavDivider.js.map +1 -1
- package/lib/components/NavDrawer/NavDrawer.js +5 -3
- package/lib/components/NavDrawer/NavDrawer.js.map +1 -1
- package/lib/components/NavDrawerBody/NavDrawerBody.js +3 -2
- package/lib/components/NavDrawerBody/NavDrawerBody.js.map +1 -1
- package/lib/components/NavDrawerFooter/NavDrawerFooter.js +3 -2
- package/lib/components/NavDrawerFooter/NavDrawerFooter.js.map +1 -1
- package/lib/components/NavDrawerHeader/NavDrawerHeader.js +5 -4
- package/lib/components/NavDrawerHeader/NavDrawerHeader.js.map +1 -1
- package/lib/components/NavItem/NavItem.js +5 -3
- package/lib/components/NavItem/NavItem.js.map +1 -1
- package/lib/components/NavSectionHeader/NavSectionHeader.js +3 -2
- package/lib/components/NavSectionHeader/NavSectionHeader.js.map +1 -1
- package/lib/components/NavSubItem/NavSubItem.js +5 -3
- package/lib/components/NavSubItem/NavSubItem.js.map +1 -1
- package/lib/components/NavSubItem/useNavSubItemStyles.styles.js +1 -2
- package/lib/components/NavSubItem/useNavSubItemStyles.styles.js.map +1 -1
- package/lib/components/NavSubItemGroup/NavSubItemGroup.js +5 -3
- package/lib/components/NavSubItemGroup/NavSubItemGroup.js.map +1 -1
- package/lib/components/NavSubItemGroup/NavSubItemGroup.types.js.map +1 -1
- package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js +3 -3
- package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js.map +1 -1
- package/lib/components/NavSubItemGroup/useNavSubItemGroup.js +4 -50
- package/lib/components/NavSubItemGroup/useNavSubItemGroup.js.map +1 -1
- package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js +4 -11
- package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js.map +1 -1
- package/lib/components/SplitNavItem/SplitNavItem.js +8 -2
- package/lib/components/SplitNavItem/SplitNavItem.js.map +1 -1
- package/lib/components/SplitNavItem/renderSplitNavItem.js +12 -19
- package/lib/components/SplitNavItem/renderSplitNavItem.js.map +1 -1
- package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.js +6 -41
- package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.js.map +1 -1
- package/lib/components/useNavContextValues.js +3 -5
- package/lib/components/useNavContextValues.js.map +1 -1
- package/lib-commonjs/components/AppItem/AppItem.js +8 -2
- package/lib-commonjs/components/AppItem/AppItem.js.map +1 -1
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.js +8 -2
- package/lib-commonjs/components/AppItemStatic/AppItemStatic.js.map +1 -1
- package/lib-commonjs/components/Hamburger/Hamburger.js +4 -3
- package/lib-commonjs/components/Hamburger/Hamburger.js.map +1 -1
- package/lib-commonjs/components/Nav/Nav.js +0 -2
- package/lib-commonjs/components/Nav/Nav.js.map +1 -1
- package/lib-commonjs/components/NavCategory/NavCategory.js.map +1 -1
- package/lib-commonjs/components/NavCategory/renderNavCategory.js.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.js +2 -2
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.js.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.types.js.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/renderNavCategoryItem.js +1 -13
- package/lib-commonjs/components/NavCategoryItem/renderNavCategoryItem.js.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.js +2 -36
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.js.map +1 -1
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.js +1 -2
- package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.js.map +1 -1
- package/lib-commonjs/components/NavDivider/NavDivider.js +4 -3
- package/lib-commonjs/components/NavDivider/NavDivider.js.map +1 -1
- package/lib-commonjs/components/NavDrawer/NavDrawer.js +3 -2
- package/lib-commonjs/components/NavDrawer/NavDrawer.js.map +1 -1
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.js +3 -2
- package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.js.map +1 -1
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.js +3 -2
- package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.js.map +1 -1
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.js +5 -4
- package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.js.map +1 -1
- package/lib-commonjs/components/NavItem/NavItem.js +3 -2
- package/lib-commonjs/components/NavItem/NavItem.js.map +1 -1
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.js +3 -2
- package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.js.map +1 -1
- package/lib-commonjs/components/NavSubItem/NavSubItem.js +3 -2
- package/lib-commonjs/components/NavSubItem/NavSubItem.js.map +1 -1
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.js +1 -2
- package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.js +3 -2
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.js.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.types.js.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/renderNavSubItemGroup.js +3 -3
- package/lib-commonjs/components/NavSubItemGroup/renderNavSubItemGroup.js.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.js +4 -50
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.js.map +1 -1
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js +4 -17
- package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.js +8 -2
- package/lib-commonjs/components/SplitNavItem/SplitNavItem.js.map +1 -1
- package/lib-commonjs/components/SplitNavItem/renderSplitNavItem.js +12 -20
- package/lib-commonjs/components/SplitNavItem/renderSplitNavItem.js.map +1 -1
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.js +5 -55
- package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/useNavContextValues.js +3 -5
- package/lib-commonjs/components/useNavContextValues.js.map +1 -1
- package/package.json +20 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavCategoryItem/useNavCategoryItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/NavCategoryItem/useNavCategoryItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport { ChevronRight20Regular } from '@fluentui/react-icons';\nimport { NavCategoryItemProps, NavCategoryItemState } from './NavCategoryItem.types';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\nimport { useNavContext_unstable } from '../NavContext';\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 { onClick, expandIcon, icon } = props;\n\n const { open, value } = useNavCategoryContext_unstable();\n\n const { onRequestNavCategoryItemToggle, selectedCategoryValue, density = 'medium' } = 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 children: <ChevronRight20Regular />,\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n icon: slot.optional(icon, {\n elementType: 'span',\n }),\n density,\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useEventCallback","ChevronRight20Regular","useNavCategoryContext_unstable","useNavContext_unstable","useNavCategoryItem_unstable","props","ref","onClick","expandIcon","icon","open","value","onRequestNavCategoryItemToggle","selectedCategoryValue","density","onNavCategoryItemClick","event","type","categoryValue","selected","validAriaCurrent","components","root","always","elementType","defaultProps","children","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC7G,SAASC,qBAAqB,QAAQ,wBAAwB;AAE9D,SAASC,8BAA8B,QAAQ,wBAAwB;AACvE,SAASC,sBAAsB,QAAQ,gBAAgB;AAEvD;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAE,GAAGJ;IAEtC,MAAM,EAAEK,IAAI,EAAEC,KAAK,EAAE,GAAGT;IAExB,MAAM,EAAEU,8BAA8B,EAAEC,qBAAqB,EAAEC,UAAU,QAAQ,EAAE,GAAGX;IAEtF,MAAMY,yBAAyBf,iBAC7BF,eAAeS,SAASS,CAAAA,QACtBJ,+BAA+BI,OAAO;YAAEC,MAAM;YAASD;YAAOL,OAAO;YAAIO,eAAeP;QAAM;IAIlG,qCAAqC;IACrC,MAAMQ,WAAWN,0BAA0BF,SAAS,CAACD;IACrD,+GAA+G;IAC/G,MAAMU,mBAAqCD,YAAY,CAACT,OAAO,SAAS;IAExE,OAAO;QACLA;QACAC;QACAQ;QACAE,YAAY;YACVC,MAAM;YACNb,MAAM;YACND,YAAY;QACd;QACAc,MAAMvB,KAAKwB,MAAM,CACf1B,yBAAyB,UAAU;YACjCS;YACA,gBAAgBc;YAChB,iBAAiBV;YACjB,GAAGL,KAAK;YACRE,SAASQ;QACX,IACA;YAAES,aAAa;QAAS;QAE1BhB,YAAYT,KAAKwB,MAAM,CAACf,YAAY;YAClCiB,cAAc;gBACZC,wBAAU,oBAACzB;gBACX,eAAe;YACjB;YACAuB,aAAa;QACf;QACAf,MAAMV,KAAK4B,QAAQ,CAAClB,MAAM;YACxBe,aAAa;QACf;QACAV;IACF;AACF,EAAE"}
|
|
@@ -4,8 +4,7 @@ import { useContentStyles, useIconStyles, useIndicatorStyles, useRootDefaultClas
|
|
|
4
4
|
export const navCategoryItemClassNames = {
|
|
5
5
|
root: 'fui-NavCategoryItem',
|
|
6
6
|
icon: 'fui-NavCategoryItem__icon',
|
|
7
|
-
expandIcon: 'fui-NavCategoryItem__expandIcon'
|
|
8
|
-
expandIconMotion: 'fui-NavCategoryItem__expandIconMotion'
|
|
7
|
+
expandIcon: 'fui-NavCategoryItem__expandIcon'
|
|
9
8
|
};
|
|
10
9
|
const useExpandIconStyles = /*#__PURE__*/__styles({
|
|
11
10
|
base: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","typographyStyles","useContentStyles","useIconStyles","useIndicatorStyles","useRootDefaultClassName","useSmallStyles","navCategoryItemClassNames","root","icon","expandIcon","
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","typographyStyles","useContentStyles","useIconStyles","useIndicatorStyles","useRootDefaultClassName","useSmallStyles","navCategoryItemClassNames","root","icon","expandIcon","useExpandIconStyles","base","Jyy4pa","Bqenvij","open","Bz10aip","selected","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useRootStyles","a9b677","useNavCategoryItemStyles_unstable","state","rootStyles","smallStyles","defaultRootClassName","contentStyles","indicatorStyles","iconStyles","expandIconStyles","density","className"],"sources":["useNavCategoryItem.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { useContentStyles, useIconStyles, useIndicatorStyles, useRootDefaultClassName, useSmallStyles } from '../sharedNavStyles.styles';\nexport const navCategoryItemClassNames = {\n root: 'fui-NavCategoryItem',\n icon: 'fui-NavCategoryItem__icon',\n expandIcon: 'fui-NavCategoryItem__expandIcon'\n};\nconst useExpandIconStyles = makeStyles({\n base: {\n marginInlineStart: 'auto',\n height: '20px'\n },\n open: {\n transform: 'rotate(90deg)'\n },\n selected: typographyStyles.body1Strong\n});\n/**\n * Styles for the root slot\n */ export const useRootStyles = makeStyles({\n base: {\n width: '100%'\n }\n});\n/**\n * Apply styling to the NavCategoryItem slots based on the state\n */ export const useNavCategoryItemStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n const smallStyles = useSmallStyles();\n const defaultRootClassName = useRootDefaultClassName();\n const contentStyles = useContentStyles();\n const indicatorStyles = useIndicatorStyles();\n const iconStyles = useIconStyles();\n const expandIconStyles = useExpandIconStyles();\n const { selected, open, density } = state;\n state.root.className = mergeClasses(navCategoryItemClassNames.root, defaultRootClassName, rootStyles.base, density === 'small' && smallStyles.root, selected && open === false && indicatorStyles.base, selected && open === false && contentStyles.selected, state.root.className);\n state.expandIcon.className = mergeClasses(navCategoryItemClassNames.expandIcon, expandIconStyles.base, state.open && expandIconStyles.open, state.expandIcon.className);\n if (state.icon) {\n state.icon.className = mergeClasses(navCategoryItemClassNames.icon, iconStyles.base, selected && iconStyles.selected, state.icon.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,gBAAgB,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,uBAAuB,EAAEC,cAAc,QAAQ,2BAA2B;AACxI,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE,qBAAqB;EAC3BC,IAAI,EAAE,2BAA2B;EACjCC,UAAU,EAAE;AAChB,CAAC;AACD,MAAMC,mBAAmB,gBAAGZ,QAAA;EAAAa,IAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,IAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAS3B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,aAAa,gBAAGxB,QAAA;EAAAa,IAAA;IAAAY,MAAA;EAAA;AAAA;EAAAF,CAAA;AAAA,CAIhC,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMG,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,aAAa;;EACb,MAAMC,UAAU,GAAGJ,aAAa,CAAC,CAAC;EAClC,MAAMK,WAAW,GAAGtB,cAAc,CAAC,CAAC;EACpC,MAAMuB,oBAAoB,GAAGxB,uBAAuB,CAAC,CAAC;EACtD,MAAMyB,aAAa,GAAG5B,gBAAgB,CAAC,CAAC;EACxC,MAAM6B,eAAe,GAAG3B,kBAAkB,CAAC,CAAC;EAC5C,MAAM4B,UAAU,GAAG7B,aAAa,CAAC,CAAC;EAClC,MAAM8B,gBAAgB,GAAGtB,mBAAmB,CAAC,CAAC;EAC9C,MAAM;IAAEM,QAAQ;IAAEF,IAAI;IAAEmB;EAAQ,CAAC,GAAGR,KAAK;EACzCA,KAAK,CAAClB,IAAI,CAAC2B,SAAS,GAAGnC,YAAY,CAACO,yBAAyB,CAACC,IAAI,EAAEqB,oBAAoB,EAAEF,UAAU,CAACf,IAAI,EAAEsB,OAAO,KAAK,OAAO,IAAIN,WAAW,CAACpB,IAAI,EAAES,QAAQ,IAAIF,IAAI,KAAK,KAAK,IAAIgB,eAAe,CAACnB,IAAI,EAAEK,QAAQ,IAAIF,IAAI,KAAK,KAAK,IAAIe,aAAa,CAACb,QAAQ,EAAES,KAAK,CAAClB,IAAI,CAAC2B,SAAS,CAAC;EACnRT,KAAK,CAAChB,UAAU,CAACyB,SAAS,GAAGnC,YAAY,CAACO,yBAAyB,CAACG,UAAU,EAAEuB,gBAAgB,CAACrB,IAAI,EAAEc,KAAK,CAACX,IAAI,IAAIkB,gBAAgB,CAAClB,IAAI,EAAEW,KAAK,CAAChB,UAAU,CAACyB,SAAS,CAAC;EACvK,IAAIT,KAAK,CAACjB,IAAI,EAAE;IACZiB,KAAK,CAACjB,IAAI,CAAC0B,SAAS,GAAGnC,YAAY,CAACO,yBAAyB,CAACE,IAAI,EAAEuB,UAAU,CAACpB,IAAI,EAAEK,QAAQ,IAAIe,UAAU,CAACf,QAAQ,EAAES,KAAK,CAACjB,IAAI,CAAC0B,SAAS,CAAC;EAC/I;EACA,OAAOT,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { renderDivider_unstable } from '@fluentui/react-divider';
|
|
3
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
4
2
|
import { useNavDivider_unstable } from './useNavDivider';
|
|
5
3
|
import { useNavDividerStyles_unstable } from './useNavDividerStyles.styles';
|
|
4
|
+
import { renderDivider_unstable } from '@fluentui/react-divider';
|
|
6
5
|
/**
|
|
7
|
-
* NavDivider component -
|
|
6
|
+
* NavDivider component - TODO: add more docs
|
|
8
7
|
*/ export const NavDivider = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
8
|
const state = useNavDivider_unstable(props, ref);
|
|
10
9
|
useNavDividerStyles_unstable(state);
|
|
11
|
-
|
|
10
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
11
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
12
|
+
// useCustomStyleHook_unstable('useNavDividerStyles_unstable')(state);
|
|
12
13
|
return renderDivider_unstable(state);
|
|
13
14
|
});
|
|
14
15
|
NavDivider.displayName = 'NavDivider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavDivider/NavDivider.tsx"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/NavDivider/NavDivider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useNavDivider_unstable } from './useNavDivider';\nimport { useNavDividerStyles_unstable } from './useNavDividerStyles.styles';\nimport { renderDivider_unstable } from '@fluentui/react-divider';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavDividerProps } from './NavDivider.types';\n\n/**\n * NavDivider component - TODO: add more docs\n */\nexport const NavDivider: ForwardRefComponent<NavDividerProps> = React.forwardRef((props, ref) => {\n const state = useNavDivider_unstable(props, ref);\n\n useNavDividerStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavDividerStyles_unstable')(state);\n return renderDivider_unstable(state);\n});\n\nNavDivider.displayName = 'NavDivider';\n"],"names":["React","useNavDivider_unstable","useNavDividerStyles_unstable","renderDivider_unstable","NavDivider","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,4BAA4B,QAAQ,+BAA+B;AAC5E,SAASC,sBAAsB,QAAQ,0BAA0B;AAKjE;;CAEC,GACD,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CL,6BAA6BM;IAC7B,8HAA8H;IAC9H,wGAAwG;IACxG,sEAAsE;IACtE,OAAOL,uBAAuBK;AAChC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
|
+
// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
3
3
|
import { useNavDrawer_unstable } from './useNavDrawer';
|
|
4
4
|
import { renderNavDrawer_unstable } from './renderNavDrawer';
|
|
5
5
|
import { useNavDrawerStyles_unstable } from './useNavDrawerStyles.styles';
|
|
6
6
|
import { useNavContextValues_unstable } from '../useNavContextValues';
|
|
7
7
|
/**
|
|
8
|
-
* NavDrawer component -
|
|
8
|
+
* NavDrawer component - TODO: add more docs
|
|
9
9
|
*/ export const NavDrawer = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
10
10
|
const state = useNavDrawer_unstable(props, ref);
|
|
11
11
|
const contextValues = useNavContextValues_unstable(state);
|
|
12
12
|
useNavDrawerStyles_unstable(state);
|
|
13
|
-
|
|
13
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
14
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
15
|
+
// useCustomStyleHook_unstable('useNavDrawerStyles_unstable')(state);
|
|
14
16
|
return renderNavDrawer_unstable(state, contextValues);
|
|
15
17
|
});
|
|
16
18
|
NavDrawer.displayName = 'NavDrawer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavDrawer/NavDrawer.tsx"],"sourcesContent":["import * as React from 'react';\
|
|
1
|
+
{"version":3,"sources":["../src/components/NavDrawer/NavDrawer.tsx"],"sourcesContent":["import * as React from 'react';\n// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useNavDrawer_unstable } from './useNavDrawer';\nimport { renderNavDrawer_unstable } from './renderNavDrawer';\nimport { useNavDrawerStyles_unstable } from './useNavDrawerStyles.styles';\nimport { useNavContextValues_unstable } from '../useNavContextValues';\nimport { NavState } from '../Nav/Nav.types';\n\nimport type { NavDrawerProps } from './NavDrawer.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * NavDrawer component - TODO: add more docs\n */\nexport const NavDrawer: ForwardRefComponent<NavDrawerProps> = React.forwardRef((props, ref) => {\n const state = useNavDrawer_unstable(props, ref);\n const contextValues = useNavContextValues_unstable(state as NavState);\n\n useNavDrawerStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavDrawerStyles_unstable')(state);\n return renderNavDrawer_unstable(state, contextValues);\n});\n\nNavDrawer.displayName = 'NavDrawer';\n"],"names":["React","useNavDrawer_unstable","renderNavDrawer_unstable","useNavDrawerStyles_unstable","useNavContextValues_unstable","NavDrawer","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,iFAAiF;AACjF,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAC1E,SAASC,4BAA4B,QAAQ,yBAAyB;AAMtE;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAC3C,MAAME,gBAAgBN,6BAA6BK;IAEnDN,4BAA4BM;IAC5B,8HAA8H;IAC9H,wGAAwG;IACxG,qEAAqE;IACrE,OAAOP,yBAAyBO,OAAOC;AACzC,GAAG;AAEHL,UAAUM,WAAW,GAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { renderDrawerBody_unstable } from '@fluentui/react-drawer';
|
|
3
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
4
3
|
import { useNavDrawerBody_unstable } from './useNavDrawerBody';
|
|
5
4
|
import { useNavDrawerBodyStyles_unstable } from './useNavDrawerBodyStyles.styles';
|
|
6
5
|
/**
|
|
@@ -8,7 +7,9 @@ import { useNavDrawerBodyStyles_unstable } from './useNavDrawerBodyStyles.styles
|
|
|
8
7
|
*/ export const NavDrawerBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
8
|
const state = useNavDrawerBody_unstable(props, ref);
|
|
10
9
|
useNavDrawerBodyStyles_unstable(state);
|
|
11
|
-
|
|
10
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
11
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
12
|
+
// useCustomStyleHook_unstable('useNavDrawerBodyStyles_unstable')(state);
|
|
12
13
|
return renderDrawerBody_unstable(state);
|
|
13
14
|
});
|
|
14
15
|
NavDrawerBody.displayName = 'NavDrawerBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavDrawerBody/NavDrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderDrawerBody_unstable } from '@fluentui/react-drawer';\nimport
|
|
1
|
+
{"version":3,"sources":["../src/components/NavDrawerBody/NavDrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderDrawerBody_unstable } from '@fluentui/react-drawer';\nimport { useNavDrawerBody_unstable } from './useNavDrawerBody';\nimport { useNavDrawerBodyStyles_unstable } from './useNavDrawerBodyStyles.styles';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavDrawerBodyProps } from './NavDrawerBody.types';\n\n/**\n * NavDrawerBody component\n */\nexport const NavDrawerBody: ForwardRefComponent<NavDrawerBodyProps> = React.forwardRef((props, ref) => {\n const state = useNavDrawerBody_unstable(props, ref);\n\n useNavDrawerBodyStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavDrawerBodyStyles_unstable')(state);\n return renderDrawerBody_unstable(state);\n});\n\nNavDrawerBody.displayName = 'NavDrawerBody';\n"],"names":["React","renderDrawerBody_unstable","useNavDrawerBody_unstable","useNavDrawerBodyStyles_unstable","NavDrawerBody","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,yBAAyB;AACnE,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,+BAA+B,QAAQ,kCAAkC;AAKlF;;CAEC,GACD,OAAO,MAAMC,8BAAyDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQN,0BAA0BI,OAAOC;IAE/CJ,gCAAgCK;IAChC,8HAA8H;IAC9H,wGAAwG;IACxG,yEAAyE;IACzE,OAAOP,0BAA0BO;AACnC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { renderDrawerFooter_unstable } from '@fluentui/react-drawer';
|
|
3
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
4
3
|
import { useNavDrawerFooter_unstable } from './useNavDrawerFooter';
|
|
5
4
|
import { useNavDrawerFooterStyles_unstable } from './useNavDrawerFooterStyles.styles';
|
|
6
5
|
/**
|
|
@@ -8,7 +7,9 @@ import { useNavDrawerFooterStyles_unstable } from './useNavDrawerFooterStyles.st
|
|
|
8
7
|
*/ export const NavDrawerFooter = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
8
|
const state = useNavDrawerFooter_unstable(props, ref);
|
|
10
9
|
useNavDrawerFooterStyles_unstable(state);
|
|
11
|
-
|
|
10
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
11
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
12
|
+
// useCustomStyleHook_unstable('useNavDrawerFooterStyles_unstable')(state);
|
|
12
13
|
return renderDrawerFooter_unstable(state);
|
|
13
14
|
});
|
|
14
15
|
NavDrawerFooter.displayName = 'NavDrawerFooter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavDrawerFooter/NavDrawerFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderDrawerFooter_unstable } from '@fluentui/react-drawer';\nimport
|
|
1
|
+
{"version":3,"sources":["../src/components/NavDrawerFooter/NavDrawerFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderDrawerFooter_unstable } from '@fluentui/react-drawer';\nimport { useNavDrawerFooter_unstable } from './useNavDrawerFooter';\nimport { useNavDrawerFooterStyles_unstable } from './useNavDrawerFooterStyles.styles';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavDrawerFooterProps } from './NavDrawerFooter.types';\n\n/**\n * NavDrawerFooter component\n */\nexport const NavDrawerFooter: ForwardRefComponent<NavDrawerFooterProps> = React.forwardRef((props, ref) => {\n const state = useNavDrawerFooter_unstable(props, ref);\n\n useNavDrawerFooterStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavDrawerFooterStyles_unstable')(state);\n return renderDrawerFooter_unstable(state);\n});\n\nNavDrawerFooter.displayName = 'NavDrawerFooter';\n"],"names":["React","renderDrawerFooter_unstable","useNavDrawerFooter_unstable","useNavDrawerFooterStyles_unstable","NavDrawerFooter","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,yBAAyB;AACrE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,iCAAiC,QAAQ,oCAAoC;AAKtF;;CAEC,GACD,OAAO,MAAMC,gCAA6DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQN,4BAA4BI,OAAOC;IAEjDJ,kCAAkCK;IAClC,8HAA8H;IAC9H,wGAAwG;IACxG,2EAA2E;IAC3E,OAAOP,4BAA4BO;AACrC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { renderDrawerHeader_unstable } from '@fluentui/react-drawer';
|
|
3
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
4
|
-
import { useNavDrawerHeaderStyles_unstable } from './useNavDrawerHeaderStyles.styles';
|
|
5
2
|
import { useNavDrawerHeader_unstable } from './useNavDrawerHeader';
|
|
3
|
+
import { useNavDrawerHeaderStyles_unstable } from './useNavDrawerHeaderStyles.styles';
|
|
4
|
+
import { renderDrawerHeader_unstable } from '@fluentui/react-drawer';
|
|
6
5
|
/**
|
|
7
6
|
* NavDrawerHeader component
|
|
8
7
|
*/ export const NavDrawerHeader = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
8
|
const state = useNavDrawerHeader_unstable(props, ref);
|
|
10
9
|
useNavDrawerHeaderStyles_unstable(state);
|
|
11
|
-
|
|
10
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
11
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
12
|
+
// useCustomStyleHook_unstable('useNavDrawerHeaderStyles_unstable')(state);
|
|
12
13
|
return renderDrawerHeader_unstable(state);
|
|
13
14
|
});
|
|
14
15
|
NavDrawerHeader.displayName = 'NavDrawerHeader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavDrawerHeader/NavDrawerHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/NavDrawerHeader/NavDrawerHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useNavDrawerHeader_unstable } from './useNavDrawerHeader';\nimport { useNavDrawerHeaderStyles_unstable } from './useNavDrawerHeaderStyles.styles';\nimport { renderDrawerHeader_unstable } from '@fluentui/react-drawer';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavDrawerHeaderProps } from './NavDrawerHeader.types';\n\n/**\n * NavDrawerHeader component\n */\nexport const NavDrawerHeader: ForwardRefComponent<NavDrawerHeaderProps> = React.forwardRef((props, ref) => {\n const state = useNavDrawerHeader_unstable(props, ref);\n\n useNavDrawerHeaderStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavDrawerHeaderStyles_unstable')(state);\n return renderDrawerHeader_unstable(state);\n});\n\nNavDrawerHeader.displayName = 'NavDrawerHeader';\n"],"names":["React","useNavDrawerHeader_unstable","useNavDrawerHeaderStyles_unstable","renderDrawerHeader_unstable","NavDrawerHeader","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,iCAAiC,QAAQ,oCAAoC;AACtF,SAASC,2BAA2B,QAAQ,yBAAyB;AAKrE;;CAEC,GACD,OAAO,MAAMC,gCAA6DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQP,4BAA4BK,OAAOC;IAEjDL,kCAAkCM;IAClC,8HAA8H;IAC9H,wGAAwG;IACxG,2EAA2E;IAC3E,OAAOL,4BAA4BK;AACrC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
|
+
// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
3
3
|
import { useNavItem_unstable } from './useNavItem';
|
|
4
4
|
import { renderNavItem_unstable } from './renderNavItem';
|
|
5
5
|
import { useNavItemStyles_unstable } from './useNavItemStyles.styles';
|
|
6
6
|
/**
|
|
7
|
-
* NavItem component -
|
|
7
|
+
* NavItem component - TODO: add more docs
|
|
8
8
|
*/ export const NavItem = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
9
|
const state = useNavItem_unstable(props, ref);
|
|
10
10
|
useNavItemStyles_unstable(state);
|
|
11
|
-
|
|
11
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
12
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
13
|
+
// useCustomStyleHook_unstable('useNavItemStyles_unstable')(state);
|
|
12
14
|
return renderNavItem_unstable(state);
|
|
13
15
|
});
|
|
14
16
|
NavItem.displayName = 'NavItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavItem/NavItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\
|
|
1
|
+
{"version":3,"sources":["../src/components/NavItem/NavItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useNavItem_unstable } from './useNavItem';\nimport { renderNavItem_unstable } from './renderNavItem';\nimport { useNavItemStyles_unstable } from './useNavItemStyles.styles';\nimport type { NavItemProps } from './NavItem.types';\n\n/**\n * NavItem component - TODO: add more docs\n */\nexport const NavItem: ForwardRefComponent<NavItemProps> = React.forwardRef((props, ref) => {\n const state = useNavItem_unstable(props, ref);\n\n useNavItemStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavItemStyles_unstable')(state);\n return renderNavItem_unstable(state);\n});\n\nNavItem.displayName = 'NavItem';\n"],"names":["React","useNavItem_unstable","renderNavItem_unstable","useNavItemStyles_unstable","NavItem","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,iFAAiF;AACjF,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,4BAA4B;AAGtE;;CAEC,GACD,OAAO,MAAMC,wBAA6CJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACjF,MAAMC,QAAQP,oBAAoBK,OAAOC;IAEzCJ,0BAA0BK;IAC1B,8HAA8H;IAC9H,wGAAwG;IACxG,mEAAmE;IACnE,OAAON,uBAAuBM;AAChC,GAAG;AAEHJ,QAAQK,WAAW,GAAG"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
3
2
|
import { useNavSectionHeader_unstable } from './useNavSectionHeader';
|
|
4
3
|
import { renderNavSectionHeader_unstable } from './renderNavSectionHeader';
|
|
5
4
|
import { useNavSectionHeaderStyles_unstable } from './useNavSectionHeaderStyles.styles';
|
|
@@ -8,7 +7,9 @@ import { useNavSectionHeaderStyles_unstable } from './useNavSectionHeaderStyles.
|
|
|
8
7
|
*/ export const NavSectionHeader = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
8
|
const state = useNavSectionHeader_unstable(props, ref);
|
|
10
9
|
useNavSectionHeaderStyles_unstable(state);
|
|
11
|
-
|
|
10
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
11
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
12
|
+
// useCustomStyleHook_unstable('useNavSectionHeaderStyles_unstable')(state);
|
|
12
13
|
return renderNavSectionHeader_unstable(state);
|
|
13
14
|
});
|
|
14
15
|
NavSectionHeader.displayName = 'NavSectionHeader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavSectionHeader/NavSectionHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSectionHeader/NavSectionHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useNavSectionHeader_unstable } from './useNavSectionHeader';\nimport { renderNavSectionHeader_unstable } from './renderNavSectionHeader';\nimport { useNavSectionHeaderStyles_unstable } from './useNavSectionHeaderStyles.styles';\nimport type { NavSectionHeaderProps } from './NavSectionHeader.types';\n\n/**\n * NavSectionHeader component\n */\nexport const NavSectionHeader: ForwardRefComponent<NavSectionHeaderProps> = React.forwardRef((props, ref) => {\n const state = useNavSectionHeader_unstable(props, ref);\n\n useNavSectionHeaderStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavSectionHeaderStyles_unstable')(state);\n return renderNavSectionHeader_unstable(state);\n});\n\nNavSectionHeader.displayName = 'NavSectionHeader';\n"],"names":["React","useNavSectionHeader_unstable","renderNavSectionHeader_unstable","useNavSectionHeaderStyles_unstable","NavSectionHeader","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,qCAAqC;AAGxF;;CAEC,GACD,OAAO,MAAMC,iCAA+DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQP,6BAA6BK,OAAOC;IAElDJ,mCAAmCK;IACnC,8HAA8H;IAC9H,wGAAwG;IACxG,4EAA4E;IAC5E,OAAON,gCAAgCM;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
|
+
// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
3
3
|
import { useNavSubItem_unstable } from './useNavSubItem';
|
|
4
4
|
import { renderNavSubItem_unstable } from './renderNavSubItem';
|
|
5
5
|
import { useNavSubItemStyles_unstable } from './useNavSubItemStyles.styles';
|
|
6
6
|
/**
|
|
7
|
-
* NavSubItem component -
|
|
7
|
+
* NavSubItem component - TODO: add more docs
|
|
8
8
|
*/ export const NavSubItem = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
9
|
const state = useNavSubItem_unstable(props, ref);
|
|
10
10
|
useNavSubItemStyles_unstable(state);
|
|
11
|
-
|
|
11
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
12
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
13
|
+
// useCustomStyleHook_unstable('useNavSubItemStyles_unstable')(state);
|
|
12
14
|
return renderNavSubItem_unstable(state);
|
|
13
15
|
});
|
|
14
16
|
NavSubItem.displayName = 'NavSubItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavSubItem/NavSubItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItem/NavSubItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useNavSubItem_unstable } from './useNavSubItem';\nimport { renderNavSubItem_unstable } from './renderNavSubItem';\nimport { useNavSubItemStyles_unstable } from './useNavSubItemStyles.styles';\nimport type { NavSubItemProps } from './NavSubItem.types';\n\n/**\n * NavSubItem component - TODO: add more docs\n */\nexport const NavSubItem: ForwardRefComponent<NavSubItemProps> = React.forwardRef((props, ref) => {\n const state = useNavSubItem_unstable(props, ref);\n\n useNavSubItemStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavSubItemStyles_unstable')(state);\n return renderNavSubItem_unstable(state);\n});\n\nNavSubItem.displayName = 'NavSubItem';\n"],"names":["React","useNavSubItem_unstable","renderNavSubItem_unstable","useNavSubItemStyles_unstable","NavSubItem","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,iFAAiF;AACjF,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E;;CAEC,GACD,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,8HAA8H;IAC9H,wGAAwG;IACxG,sEAAsE;IACtE,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
|
|
@@ -34,7 +34,6 @@ export const useNavSubItemStyles_unstable = state => {
|
|
|
34
34
|
selected,
|
|
35
35
|
density
|
|
36
36
|
} = state;
|
|
37
|
-
|
|
38
|
-
state.root.className = mergeClasses(navSubItemClassNames.root, rootDefaultClassName, isSmallDensity && smallStyles.root, isSmallDensity && navSubItemSpecificStyles.smallBase, navSubItemSpecificStyles.base, selected && indicatorStyles.base, selected && contentStyles.selected, selected && navSubItemSpecificStyles.selectedIndicator, state.root.className);
|
|
37
|
+
state.root.className = mergeClasses(navSubItemClassNames.root, rootDefaultClassName, density === 'small' && smallStyles.root, density === 'small' && navSubItemSpecificStyles.smallBase, navSubItemSpecificStyles.base, selected && indicatorStyles.base, selected && contentStyles.selected, selected && navSubItemSpecificStyles.selectedIndicator, state.root.className);
|
|
39
38
|
return state;
|
|
40
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","navItemTokens","useContentStyles","useIndicatorStyles","useRootDefaultClassName","useSmallStyles","navSubItemClassNames","root","useNavSubItemSpecificStyles","base","B1hrpyx","smallBase","selectedIndicator","rjyhj6","d","useNavSubItemStyles_unstable","state","rootDefaultClassName","smallStyles","contentStyles","indicatorStyles","navSubItemSpecificStyles","selected","density","
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","navItemTokens","useContentStyles","useIndicatorStyles","useRootDefaultClassName","useSmallStyles","navSubItemClassNames","root","useNavSubItemSpecificStyles","base","B1hrpyx","smallBase","selectedIndicator","rjyhj6","d","useNavSubItemStyles_unstable","state","rootDefaultClassName","smallStyles","contentStyles","indicatorStyles","navSubItemSpecificStyles","selected","density","className"],"sources":["useNavSubItemStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { navItemTokens, useContentStyles, useIndicatorStyles, useRootDefaultClassName, useSmallStyles } from '../sharedNavStyles.styles';\nexport const navSubItemClassNames = {\n root: 'fui-NavSubItem'\n};\n/**\n * Styles for the content slot (children)\n */ const useNavSubItemSpecificStyles = makeStyles({\n base: {\n paddingInlineStart: '46px'\n },\n smallBase: {\n paddingInlineStart: '40px'\n },\n selectedIndicator: {\n '::after': {\n marginInlineStart: `-${navItemTokens.indicatorOffset + 36}px`\n }\n }\n});\n/**\n * Apply styling to the NavSubItem slots based on the state\n */ export const useNavSubItemStyles_unstable = (state)=>{\n 'use no memo';\n const rootDefaultClassName = useRootDefaultClassName();\n const smallStyles = useSmallStyles();\n const contentStyles = useContentStyles();\n const indicatorStyles = useIndicatorStyles();\n const navSubItemSpecificStyles = useNavSubItemSpecificStyles();\n const { selected, density } = state;\n state.root.className = mergeClasses(navSubItemClassNames.root, rootDefaultClassName, density === 'small' && smallStyles.root, density === 'small' && navSubItemSpecificStyles.smallBase, navSubItemSpecificStyles.base, selected && indicatorStyles.base, selected && contentStyles.selected, selected && navSubItemSpecificStyles.selectedIndicator, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,aAAa,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAEC,uBAAuB,EAAEC,cAAc,QAAQ,2BAA2B;AACxI,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,2BAA2B,gBAAGT,QAAA;EAAAU,IAAA;IAAAC,OAAA;EAAA;EAAAC,SAAA;IAAAD,OAAA;EAAA;EAAAE,iBAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAYvC,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,4BAA4B,GAAIC,KAAK,IAAG;EACrD,aAAa;;EACb,MAAMC,oBAAoB,GAAGb,uBAAuB,CAAC,CAAC;EACtD,MAAMc,WAAW,GAAGb,cAAc,CAAC,CAAC;EACpC,MAAMc,aAAa,GAAGjB,gBAAgB,CAAC,CAAC;EACxC,MAAMkB,eAAe,GAAGjB,kBAAkB,CAAC,CAAC;EAC5C,MAAMkB,wBAAwB,GAAGb,2BAA2B,CAAC,CAAC;EAC9D,MAAM;IAAEc,QAAQ;IAAEC;EAAQ,CAAC,GAAGP,KAAK;EACnCA,KAAK,CAACT,IAAI,CAACiB,SAAS,GAAGxB,YAAY,CAACM,oBAAoB,CAACC,IAAI,EAAEU,oBAAoB,EAAEM,OAAO,KAAK,OAAO,IAAIL,WAAW,CAACX,IAAI,EAAEgB,OAAO,KAAK,OAAO,IAAIF,wBAAwB,CAACV,SAAS,EAAEU,wBAAwB,CAACZ,IAAI,EAAEa,QAAQ,IAAIF,eAAe,CAACX,IAAI,EAAEa,QAAQ,IAAIH,aAAa,CAACG,QAAQ,EAAEA,QAAQ,IAAID,wBAAwB,CAACT,iBAAiB,EAAEI,KAAK,CAACT,IAAI,CAACiB,SAAS,CAAC;EAC3W,OAAOR,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
|
+
// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
3
3
|
import { useNavSubItemGroup_unstable } from './useNavSubItemGroup';
|
|
4
4
|
import { renderNavSubItemGroup_unstable } from './renderNavSubItemGroup';
|
|
5
5
|
import { useNavSubItemGroupStyles_unstable } from './useNavSubItemGroupStyles.styles';
|
|
6
6
|
/**
|
|
7
|
-
* NavSubItemGroup component -
|
|
7
|
+
* NavSubItemGroup component - TODO: add more docs
|
|
8
8
|
*/ export const NavSubItemGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
9
|
const state = useNavSubItemGroup_unstable(props, ref);
|
|
10
10
|
useNavSubItemGroupStyles_unstable(state);
|
|
11
|
-
|
|
11
|
+
// TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts
|
|
12
|
+
// https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md
|
|
13
|
+
// useCustomStyleHook_unstable('useNavSubItemGroupStyles_unstable')(state);
|
|
12
14
|
return renderNavSubItemGroup_unstable(state);
|
|
13
15
|
});
|
|
14
16
|
NavSubItemGroup.displayName = 'NavSubItemGroup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavSubItemGroup/NavSubItemGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/NavSubItemGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n// import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useNavSubItemGroup_unstable } from './useNavSubItemGroup';\nimport { renderNavSubItemGroup_unstable } from './renderNavSubItemGroup';\nimport { useNavSubItemGroupStyles_unstable } from './useNavSubItemGroupStyles.styles';\nimport type { NavSubItemGroupProps } from './NavSubItemGroup.types';\n\n/**\n * NavSubItemGroup component - TODO: add more docs\n */\nexport const NavSubItemGroup: ForwardRefComponent<NavSubItemGroupProps> = React.forwardRef((props, ref) => {\n const state = useNavSubItemGroup_unstable(props, ref);\n\n useNavSubItemGroupStyles_unstable(state);\n // TODO update types in packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts\n // https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/custom-styling.md\n // useCustomStyleHook_unstable('useNavSubItemGroupStyles_unstable')(state);\n return renderNavSubItemGroup_unstable(state);\n});\n\nNavSubItemGroup.displayName = 'NavSubItemGroup';\n"],"names":["React","useNavSubItemGroup_unstable","renderNavSubItemGroup_unstable","useNavSubItemGroupStyles_unstable","NavSubItemGroup","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,iFAAiF;AACjF,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AAGtF;;CAEC,GACD,OAAO,MAAMC,gCAA6DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQP,4BAA4BK,OAAOC;IAEjDJ,kCAAkCK;IAClC,8HAA8H;IAC9H,wGAAwG;IACxG,2EAA2E;IAC3E,OAAON,+BAA+BM;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavSubItemGroup/NavSubItemGroup.types.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/NavSubItemGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type NavSubItemGroupSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/**\n * NavSubItemGroup Props\n */\nexport type NavSubItemGroupProps = ComponentProps<NavSubItemGroupSlots>;\n\n/**\n * State used in rendering NavSubItemGroup\n */\nexport type NavSubItemGroupState = ComponentState<NavSubItemGroupSlots> & {\n /**\n * Internal open state, provided by context.\n */\n open: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC,GACD,WAKE"}
|
|
@@ -4,7 +4,7 @@ import { assertSlots } from '@fluentui/react-utilities';
|
|
|
4
4
|
* Render the final JSX of NavSubItemGroup
|
|
5
5
|
*/ export const renderNavSubItemGroup_unstable = (state)=>{
|
|
6
6
|
assertSlots(state);
|
|
7
|
-
return state.
|
|
8
|
-
children:
|
|
9
|
-
}) :
|
|
7
|
+
return state.open ? /*#__PURE__*/ _jsx(state.root, {
|
|
8
|
+
children: state.root.children
|
|
9
|
+
}) : null;
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavSubItemGroup/renderNavSubItemGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { NavSubItemGroupState, NavSubItemGroupSlots } from './NavSubItemGroup.types';\n\n/**\n * Render the final JSX of NavSubItemGroup\n */\nexport const renderNavSubItemGroup_unstable = (state: NavSubItemGroupState) => {\n assertSlots<NavSubItemGroupSlots>(state);\n\n return state.
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/renderNavSubItemGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { NavSubItemGroupState, NavSubItemGroupSlots } from './NavSubItemGroup.types';\n\n/**\n * Render the final JSX of NavSubItemGroup\n */\nexport const renderNavSubItemGroup_unstable = (state: NavSubItemGroupState) => {\n assertSlots<NavSubItemGroupSlots>(state);\n\n return state.open ? <state.root>{state.root.children}</state.root> : null;\n};\n"],"names":["assertSlots","renderNavSubItemGroup_unstable","state","open","root","children"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,OAAOA,MAAMC,IAAI,iBAAG,KAACD,MAAME,IAAI;kBAAEF,MAAME,IAAI,CAACC,QAAQ;SAAiB;AACvE,EAAE"}
|
|
@@ -1,44 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
|
-
import { createPresenceComponent, motionTokens, presenceMotionSlot } from '@fluentui/react-motion';
|
|
4
3
|
import { useNavCategoryContext_unstable } from '../NavCategoryContext';
|
|
5
|
-
import { useNavContext_unstable } from '../NavContext';
|
|
6
|
-
const smallSize = 28; // 28px for small density
|
|
7
|
-
const largeSize = 40; // 40px for large density
|
|
8
|
-
const NavGroupMotion = createPresenceComponent(({ items, density })=>{
|
|
9
|
-
const isSmallDensity = density === 'small';
|
|
10
|
-
const height = items ? isSmallDensity ? items * smallSize : items * largeSize : 0;
|
|
11
|
-
const durationPerItem = isSmallDensity ? 15 : 25; // 15ms per item for small, 25ms for large
|
|
12
|
-
const keyframes = [
|
|
13
|
-
{
|
|
14
|
-
opacity: 0,
|
|
15
|
-
minHeight: 0,
|
|
16
|
-
height: 0
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
opacity: 1,
|
|
20
|
-
minHeight: `${height}px`,
|
|
21
|
-
height: `${height}px`
|
|
22
|
-
}
|
|
23
|
-
];
|
|
24
|
-
const baseDuration = motionTokens.durationFast + (items || 0) * durationPerItem;
|
|
25
|
-
const maxDuration = motionTokens.durationUltraSlow;
|
|
26
|
-
const duration = baseDuration > maxDuration ? maxDuration : baseDuration;
|
|
27
|
-
return {
|
|
28
|
-
enter: {
|
|
29
|
-
keyframes,
|
|
30
|
-
duration,
|
|
31
|
-
easing: motionTokens.curveDecelerateMid
|
|
32
|
-
},
|
|
33
|
-
exit: {
|
|
34
|
-
keyframes: [
|
|
35
|
-
...keyframes
|
|
36
|
-
].reverse(),
|
|
37
|
-
duration,
|
|
38
|
-
easing: motionTokens.curveAccelerateMin
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
4
|
/**
|
|
43
5
|
* Create the state required to render NavSubItemGroup.
|
|
44
6
|
*
|
|
@@ -49,27 +11,19 @@ const NavGroupMotion = createPresenceComponent(({ items, density })=>{
|
|
|
49
11
|
* @param ref - reference to root HTMLDivElement of NavSubItemGroup
|
|
50
12
|
*/ export const useNavSubItemGroup_unstable = (props, ref)=>{
|
|
51
13
|
const { open } = useNavCategoryContext_unstable();
|
|
52
|
-
|
|
14
|
+
// copied over from accordion. todo - figure out how to handle.
|
|
15
|
+
// const focusableProps = useTabsterAttributes({ focusable: { excludeFromMover: true } });
|
|
16
|
+
// const navigation = useAccordionContext_unstable(ctx => ctx.navigation);
|
|
53
17
|
return {
|
|
54
18
|
open,
|
|
55
19
|
components: {
|
|
56
|
-
root: 'div'
|
|
57
|
-
collapseMotion: NavGroupMotion
|
|
20
|
+
root: 'div'
|
|
58
21
|
},
|
|
59
22
|
root: slot.always(getIntrinsicElementProps('div', {
|
|
60
23
|
...props,
|
|
61
24
|
ref
|
|
62
25
|
}), {
|
|
63
26
|
elementType: 'div'
|
|
64
|
-
}),
|
|
65
|
-
collapseMotion: presenceMotionSlot(props.collapseMotion, {
|
|
66
|
-
elementType: NavGroupMotion,
|
|
67
|
-
defaultProps: {
|
|
68
|
-
visible: open,
|
|
69
|
-
unmountOnExit: true,
|
|
70
|
-
items: React.Children.count(props.children),
|
|
71
|
-
density
|
|
72
|
-
}
|
|
73
27
|
})
|
|
74
28
|
};
|
|
75
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/NavSubItemGroup/useNavSubItemGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/NavSubItemGroup/useNavSubItemGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { NavSubItemGroupProps, NavSubItemGroupState } from './NavSubItemGroup.types';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\n\n/**\n * Create the state required to render NavSubItemGroup.\n *\n * The returned state can be modified with hooks such as useNavSubItemGroupStyles_unstable,\n * before being passed to renderNavSubItemGroup_unstable.\n *\n * @param props - props from this instance of NavSubItemGroup\n * @param ref - reference to root HTMLDivElement of NavSubItemGroup\n */\nexport const useNavSubItemGroup_unstable = (\n props: NavSubItemGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): NavSubItemGroupState => {\n const { open } = useNavCategoryContext_unstable();\n\n // copied over from accordion. todo - figure out how to handle.\n // const focusableProps = useTabsterAttributes({ focusable: { excludeFromMover: true } });\n // const navigation = useAccordionContext_unstable(ctx => ctx.navigation);\n\n return {\n open,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ...props,\n ref,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useNavCategoryContext_unstable","useNavSubItemGroup_unstable","props","ref","open","components","root","always","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,8BAA8B,QAAQ,wBAAwB;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGJ;IAEjB,+DAA+D;IAC/D,0FAA0F;IAC1F,0EAA0E;IAE1E,OAAO;QACLI;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,KAAKQ,MAAM,CACfT,yBAAyB,OAAO;YAC9B,GAAGI,KAAK;YACRC;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -6,17 +6,8 @@ export const navSubItemGroupClassNames = {
|
|
|
6
6
|
* Styles for the root slot
|
|
7
7
|
*/
|
|
8
8
|
const useStyles = /*#__PURE__*/__styles({
|
|
9
|
-
root: {
|
|
10
|
-
|
|
11
|
-
B68tc82: 0,
|
|
12
|
-
Bmxbyg5: 0,
|
|
13
|
-
Bpg54ce: "f1a3p1vp"
|
|
14
|
-
}
|
|
15
|
-
}, {
|
|
16
|
-
d: [".f1yj8dow{transform:translateZ(0);}", [".f1a3p1vp{overflow:hidden;}", {
|
|
17
|
-
p: -1
|
|
18
|
-
}]]
|
|
19
|
-
});
|
|
9
|
+
root: {}
|
|
10
|
+
}, {});
|
|
20
11
|
/**
|
|
21
12
|
* Apply styling to the NavSubItemGroup slots based on the state
|
|
22
13
|
*/
|
|
@@ -25,5 +16,7 @@ export const useNavSubItemGroupStyles_unstable = state => {
|
|
|
25
16
|
|
|
26
17
|
const styles = useStyles();
|
|
27
18
|
state.root.className = mergeClasses(navSubItemGroupClassNames.root, styles.root, state.root.className);
|
|
19
|
+
// TODO Add class names to slots, for example:
|
|
20
|
+
// state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
|
|
28
21
|
return state;
|
|
29
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","navSubItemGroupClassNames","root","useStyles","
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","navSubItemGroupClassNames","root","useStyles","useNavSubItemGroupStyles_unstable","state","styles","className"],"sources":["useNavSubItemGroupStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const navSubItemGroupClassNames = {\n root: 'fui-NavSubItemGroup'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n }\n});\n/**\n * Apply styling to the NavSubItemGroup slots based on the state\n */ export const useNavSubItemGroupStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(navSubItemGroupClassNames.root, styles.root, state.root.className);\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGJ,QAAA;EAAAG,IAAA;AAAA,KAGrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAME,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,aAAa;;EACb,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGP,YAAY,CAACC,yBAAyB,CAACC,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EACtG;EACA;EACA,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|