@fluentui/react-nav 9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 → 9.75.2-experimental.css-modules.20261113-ba13c87438.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +27 -18
  2. package/README.md +2 -2
  3. package/lib/components/AppItem/AppItem.module.css +21 -21
  4. package/lib/components/AppItemStatic/AppItemStatic.module.css +8 -10
  5. package/lib/components/Hamburger/Hamburger.module.css +15 -13
  6. package/lib/components/Nav/Nav.module.css +3 -5
  7. package/lib/components/NavCategoryItem/NavCategoryItem.module.css +7 -8
  8. package/lib/components/NavCategoryItem/useNavCategoryItem.js +1 -0
  9. package/lib/components/NavCategoryItem/useNavCategoryItem.js.map +1 -1
  10. package/lib/components/NavDivider/NavDivider.module.css +3 -5
  11. package/lib/components/NavDrawer/NavDrawer.module.css +6 -8
  12. package/lib/components/NavDrawerBody/NavDrawerBody.module.css +7 -8
  13. package/lib/components/NavDrawerFooter/NavDrawerFooter.module.css +7 -6
  14. package/lib/components/NavDrawerHeader/NavDrawerHeader.module.css +5 -6
  15. package/lib/components/NavItem/NavItem.module.css +1 -1
  16. package/lib/components/NavSectionHeader/NavSectionHeader.module.css +8 -9
  17. package/lib/components/NavSubItem/NavSubItem.module.css +8 -9
  18. package/lib/components/NavSubItemGroup/NavSubItemGroup.module.css +4 -6
  19. package/lib/components/SplitNavItem/SplitNavItem.module.css +50 -51
  20. package/lib/components/sharedNavStyles.module.css +128 -114
  21. package/lib-commonjs/components/AppItem/AppItem.module.css +21 -21
  22. package/lib-commonjs/components/AppItemStatic/AppItemStatic.module.css +8 -10
  23. package/lib-commonjs/components/Hamburger/Hamburger.module.css +15 -13
  24. package/lib-commonjs/components/Nav/Nav.module.css +3 -5
  25. package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.module.css +7 -8
  26. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.cjs +1 -0
  27. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.cjs.map +1 -1
  28. package/lib-commonjs/components/NavDivider/NavDivider.module.css +3 -5
  29. package/lib-commonjs/components/NavDrawer/NavDrawer.module.css +6 -8
  30. package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.module.css +7 -8
  31. package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.module.css +7 -6
  32. package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.module.css +5 -6
  33. package/lib-commonjs/components/NavItem/NavItem.module.css +1 -1
  34. package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.module.css +8 -9
  35. package/lib-commonjs/components/NavSubItem/NavSubItem.module.css +8 -9
  36. package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.module.css +4 -6
  37. package/lib-commonjs/components/SplitNavItem/SplitNavItem.module.css +50 -51
  38. package/lib-commonjs/components/sharedNavStyles.module.css +128 -114
  39. package/package.json +14 -14
package/CHANGELOG.md CHANGED
@@ -1,30 +1,39 @@
1
1
  # Change Log - @fluentui/react-nav
2
2
 
3
- <!-- This log was last generated on Tue, 03 Nov 2026 14:02:54 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Fri, 13 Nov 2026 20:37:19 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0)
7
+ ## [9.75.2-experimental.css-modules.20261113-ba13c87438.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.75.2-experimental.css-modules.20261113-ba13c87438.0)
8
8
 
9
- Tue, 03 Nov 2026 14:02:54 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-nav_v9.4.9..@fluentui/react-nav_v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0)
9
+ Fri, 13 Nov 2026 20:37:19 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-nav_v9.4.10..@fluentui/react-nav_v9.75.2-experimental.css-modules.20261113-ba13c87438.0)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release 9.75.1-experimental.css-modules.20261103-d6c85ee2a9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
- - Bump @fluentui/react-aria to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
- - Bump @fluentui/react-button to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
- - Bump @fluentui/react-context-selector to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-divider to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
- - Bump @fluentui/react-drawer to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
- - Bump @fluentui/react-jsx-runtime to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
- - Bump @fluentui/react-motion to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
22
- - Bump @fluentui/react-motion-components-preview to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
23
- - Bump @fluentui/react-shared-contexts to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
24
- - Bump @fluentui/react-tabster to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
25
- - Bump @fluentui/react-theme to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
26
- - Bump @fluentui/react-tooltip to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
27
- - Bump @fluentui/react-utilities to v9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
14
+ - Release 9.75.2-experimental.css-modules.20261113-ba13c87438 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
+ - Bump @fluentui/react-aria to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-button to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-context-selector to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-divider to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-drawer to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+ - Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
+ - Bump @fluentui/react-motion to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
22
+ - Bump @fluentui/react-motion-components-preview to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
23
+ - Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
24
+ - Bump @fluentui/react-tabster to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
25
+ - Bump @fluentui/react-theme to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
26
+ - Bump @fluentui/react-tooltip to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
27
+ - Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
28
+
29
+ ## [9.4.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.4.10)
30
+
31
+ Tue, 10 Nov 2026 16:50:23 GMT
32
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-nav_v9.4.9..@fluentui/react-nav_v9.4.10)
33
+
34
+ ### Patches
35
+
36
+ - fix: NavCategoryItem renders type="button" so it does not submit an enclosing form ([PR #37114](https://github.com/microsoft/fluentui/pull/37114) by dmytrokirpa@microsoft.com)
28
37
 
29
38
  ## [9.4.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-nav_v9.4.9)
30
39
 
package/README.md CHANGED
@@ -6,8 +6,8 @@ These are not production-ready components and **should never be used in product*
6
6
 
7
7
  ## Opt-in CSS Modules styles
8
8
 
9
- The style hooks have sibling `.styles.css.ts` alternatives and CSS assets in the
10
- `fluentui` layer. Griffel remains the default. Opt-in bundler selection must
9
+ The style hooks have sibling `.styles.css.ts` alternatives and unlayered CSS assets.
10
+ Griffel remains the default. Opt-in bundler selection must
11
11
  replace both `.styles` source imports and `.styles.js` published imports, including
12
12
  the shared nav style module and composed Button/Divider/Drawer hooks. Shared package-local
13
13
  hooks explicitly compose their CSS alternatives. Use the CSS/headless icon entry
@@ -1,22 +1,22 @@
1
- @layer fluent {
2
- .root {
3
- margin-inline-start: calc(-1 * var(--spacingHorizontalSNudge));
4
- margin-inline-end: 0;
5
- width: revert;
6
- align-items: center;
7
- gap: var(--spacingHorizontalMNudge);
8
- padding: var(--spacingVerticalS) var(--spacingHorizontalS) var(--spacingVerticalS) var(--spacingHorizontalMNudge);
9
- font-family: var(--fontFamilyBase);
10
- font-size: var(--fontSizeBase400);
11
- font-weight: var(--fontWeightSemibold);
12
- line-height: var(--lineHeightBase400);
13
- }
14
- .small {
15
- padding: var(--spacingVerticalS) var(--spacingHorizontalS) var(--spacingVerticalS)
16
- calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));
17
- gap: calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));
18
- }
19
- .absentIconRootAdjustment {
20
- padding-inline-start: var(--spacingHorizontalL);
21
- }
1
+ /* @griffel-buckets logical: margin-inline-start, margin-inline-end, padding-inline-start */
2
+ .root {
3
+ margin-inline-start: calc(-1 * var(--spacingHorizontalSNudge));
4
+ margin-inline-end: 0;
5
+ width: revert;
6
+ align-items: center;
7
+ gap: var(--spacingHorizontalMNudge);
8
+ padding-block: var(--spacingVerticalS);
9
+ padding-inline: var(--spacingHorizontalMNudge) var(--spacingHorizontalS);
10
+ font-family: var(--fontFamilyBase);
11
+ font-size: var(--fontSizeBase400);
12
+ font-weight: var(--fontWeightSemibold);
13
+ line-height: var(--lineHeightBase400);
14
+ }
15
+ .small {
16
+ padding-block: var(--spacingVerticalS);
17
+ padding-inline: calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS)) var(--spacingHorizontalS);
18
+ gap: calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));
19
+ }
20
+ .absentIconRootAdjustment {
21
+ padding-inline-start: var(--spacingHorizontalL);
22
22
  }
@@ -1,11 +1,9 @@
1
- @layer fluent {
2
- .root {
3
- cursor: default;
4
- }
5
- .root:hover {
6
- background-color: unset;
7
- }
8
- .root:active {
9
- background-color: unset;
10
- }
1
+ .root {
2
+ cursor: default;
3
+ }
4
+ .root:hover {
5
+ background-color: unset;
6
+ }
7
+ .root:active {
8
+ background-color: unset;
11
9
  }
@@ -1,17 +1,19 @@
1
- @layer fluent {
1
+ .root {
2
+ text-decoration-line: none;
3
+ border: none;
4
+ }
5
+ /* Griffel applies these colors in forced colors too; Button's forced colors rules still win for the excluded states. */
6
+ .root:where(:not(:disabled, [aria-disabled='true'])) {
7
+ background-color: var(--colorNeutralBackground4);
8
+ }
9
+ @media (forced-colors: none) {
2
10
  .root {
3
- text-decoration-line: none;
4
- border: none;
11
+ background-color: var(--colorNeutralBackground4);
12
+ }
13
+ .root:hover {
14
+ background-color: var(--colorNeutralBackground4Hover);
5
15
  }
6
- @media (forced-colors: none) {
7
- .root {
8
- background-color: var(--colorNeutralBackground4);
9
- }
10
- .root:hover {
11
- background-color: var(--colorNeutralBackground4Hover);
12
- }
13
- .root:active {
14
- background-color: var(--colorNeutralBackground4Pressed);
15
- }
16
+ .root:active {
17
+ background-color: var(--colorNeutralBackground4Pressed);
16
18
  }
17
19
  }
@@ -1,6 +1,4 @@
1
- @layer fluent {
2
- .root {
3
- display: flex;
4
- flex-direction: column;
5
- }
1
+ .root {
2
+ display: flex;
3
+ flex-direction: column;
6
4
  }
@@ -1,9 +1,8 @@
1
- @layer fluent {
2
- .root {
3
- width: 100%;
4
- }
5
- .expandIcon {
6
- margin-inline-start: auto;
7
- height: var(--spacingVerticalXL);
8
- }
1
+ /* @griffel-buckets logical: margin-inline-start */
2
+ .root {
3
+ width: 100%;
4
+ }
5
+ .expandIcon {
6
+ margin-inline-start: auto;
7
+ height: var(--spacingVerticalXL);
9
8
  }
@@ -77,6 +77,7 @@ const ExpandIconMotion = createPresenceComponentVariant(Rotate, {
77
77
  },
78
78
  root: slot.always(getIntrinsicElementProps('button', {
79
79
  ref,
80
+ type: 'button',
80
81
  'aria-current': validAriaCurrent,
81
82
  'aria-expanded': open,
82
83
  ...props,
@@ -1 +1 @@
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":"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,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"}
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 type: 'button',\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;YAC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E"}
@@ -1,6 +1,4 @@
1
- @layer fluent {
2
- .root {
3
- flex-grow: 0;
4
- margin-block: var(--spacingVerticalXS);
5
- }
1
+ .root {
2
+ flex-grow: 0;
3
+ margin-block: var(--spacingVerticalXS);
6
4
  }
@@ -1,9 +1,7 @@
1
- @layer fluent {
2
- .root {
3
- background-color: var(--colorNeutralBackground4);
4
- align-items: unset;
5
- }
6
- .defaultWidth {
7
- width: calc(8 * var(--spacingHorizontalXXXL) + var(--spacingHorizontalXS));
8
- }
1
+ .root {
2
+ background-color: var(--colorNeutralBackground4);
3
+ align-items: unset;
4
+ }
5
+ .defaultWidth {
6
+ width: calc(8 * var(--spacingHorizontalXXXL) + var(--spacingHorizontalXS));
9
7
  }
@@ -1,9 +1,8 @@
1
- @layer fluent {
2
- .root {
3
- padding: 0 var(--spacingHorizontalXS) 0 var(--spacingHorizontalMNudge);
4
- align-items: unset;
5
- display: flex;
6
- flex-direction: column;
7
- row-gap: var(--spacingVerticalXXS);
8
- }
1
+ .root {
2
+ padding-block: 0;
3
+ padding-inline: var(--spacingHorizontalMNudge) var(--spacingHorizontalXS);
4
+ align-items: unset;
5
+ display: flex;
6
+ flex-direction: column;
7
+ row-gap: var(--spacingVerticalXXS);
9
8
  }
@@ -1,7 +1,8 @@
1
- @layer fluent {
2
- .root {
3
- display: flex;
4
- flex-direction: column;
5
- row-gap: var(--spacingVerticalXXS);
6
- }
1
+ .root {
2
+ /* The Griffel original declares an invalid five-value `padding`, which replaces DrawerFooter's padding in the
3
+ atomic merge and is then dropped by the browser: the rendered footer has no padding. */
4
+ padding: 0;
5
+ display: flex;
6
+ flex-direction: column;
7
+ row-gap: var(--spacingVerticalXXS);
7
8
  }
@@ -1,7 +1,6 @@
1
- @layer fluent {
2
- .root {
3
- margin: unset;
4
- padding-inline-start: calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));
5
- padding-block: calc(var(--spacingVerticalXS) + var(--strokeWidthThin));
6
- }
1
+ /* @griffel-buckets logical: padding-inline-start, padding-block */
2
+ .root {
3
+ margin: unset;
4
+ padding-inline-start: calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));
5
+ padding-block: calc(var(--spacingVerticalXS) + var(--strokeWidthThin));
7
6
  }
@@ -1 +1 @@
1
- @layer fluent;
1
+ /* Intentionally empty: this component adds no styles beyond its composed base. */
@@ -1,10 +1,9 @@
1
- @layer fluent {
2
- .root {
3
- margin-inline-start: var(--spacingHorizontalMNudge);
4
- margin-block: var(--spacingVerticalS);
5
- font-family: var(--fontFamilyBase);
6
- font-size: var(--fontSizeBase200);
7
- font-weight: var(--fontWeightSemibold);
8
- line-height: var(--lineHeightBase200);
9
- }
1
+ /* @griffel-buckets logical: margin-inline-start, margin-block */
2
+ .root {
3
+ margin-inline-start: var(--spacingHorizontalMNudge);
4
+ margin-block: var(--spacingVerticalS);
5
+ font-family: var(--fontFamilyBase);
6
+ font-size: var(--fontSizeBase200);
7
+ font-weight: var(--fontWeightSemibold);
8
+ line-height: var(--lineHeightBase200);
10
9
  }
@@ -1,10 +1,9 @@
1
- @layer fluent {
2
- .root {
3
- padding-inline-start: calc(
4
- var(--spacingHorizontalXXXL) + var(--spacingHorizontalMNudge) + var(--spacingHorizontalXS)
5
- );
6
- }
7
- .root:where(.selected)::after {
8
- margin-inline-start: calc(-1 * (var(--spacingHorizontalXXXL) + var(--spacingHorizontalXL)));
9
- }
1
+ /* @griffel-buckets logical: padding-inline-start, margin-inline-start */
2
+ .root {
3
+ padding-inline-start: calc(
4
+ var(--spacingHorizontalXXXL) + var(--spacingHorizontalMNudge) + var(--spacingHorizontalXS)
5
+ );
6
+ }
7
+ .root:where(.selected)::after {
8
+ margin-inline-start: calc(-1 * (var(--spacingHorizontalXXXL) + var(--spacingHorizontalXL)));
10
9
  }
@@ -1,7 +1,5 @@
1
- @layer fluent {
2
- .root {
3
- flex-shrink: 0;
4
- transform: translateZ(0);
5
- overflow: hidden;
6
- }
1
+ .root {
2
+ flex-shrink: 0;
3
+ transform: translateZ(0);
4
+ overflow: hidden;
7
5
  }
@@ -1,52 +1,51 @@
1
- @layer fluent {
2
- .root {
3
- display: flex;
4
- gap: unset;
5
- align-items: stretch;
6
- padding: unset;
7
- text-align: unset;
8
- background-color: var(--colorNeutralBackground4);
9
- transition-duration: var(--durationFaster);
10
- transition-timing-function: var(--curveLinear);
11
- transition-property: background;
12
- }
13
- .root:hover {
14
- background-color: var(--colorNeutralBackground4Hover);
15
- }
16
- .root:hover :global(.fui-SplitNavItem__actionButton),
17
- .root:hover :global(.fui-SplitNavItem__toggleButton),
18
- .root:hover :global(.fui-SplitNavItem__menuButton),
19
- .root:focus-within :global(.fui-SplitNavItem__actionButton),
20
- .root:focus-within :global(.fui-SplitNavItem__toggleButton),
21
- .root:focus-within :global(.fui-SplitNavItem__menuButton) {
22
- opacity: 1;
23
- pointer-events: auto;
24
- }
25
- .root:active {
26
- background-color: var(--colorNeutralBackground4Pressed);
27
- }
28
- .navItem {
29
- display: flex;
30
- text-transform: none;
31
- align-self: stretch;
32
- text-align: start;
33
- position: relative;
34
- justify-content: start;
35
- gap: var(--spacingVerticalL);
36
- background-color: transparent;
37
- }
38
- .secondary {
39
- min-width: calc(var(--spacingHorizontalXXL) + var(--spacingHorizontalXS));
40
- padding-inline-end: var(--spacingHorizontalM);
41
- padding-inline-start: calc(var(--spacingHorizontalXS) + var(--strokeWidthThin));
42
- padding-block-start: calc(var(--spacingVerticalXS) + var(--strokeWidthThin));
43
- align-items: start;
44
- opacity: 0;
45
- pointer-events: none;
46
- transition: opacity var(--durationFast) var(--curveEasyEase);
47
- will-change: opacity;
48
- }
49
- :where(.medium) > .secondary {
50
- padding-block-start: calc(var(--spacingVerticalS) + var(--strokeWidthThin));
51
- }
1
+ /* @griffel-buckets logical: padding-inline-end, padding-inline-start, padding-block-start */
2
+ .root {
3
+ display: flex;
4
+ gap: unset;
5
+ align-items: stretch;
6
+ padding: unset;
7
+ text-align: unset;
8
+ background-color: var(--colorNeutralBackground4);
9
+ transition-duration: var(--durationFaster);
10
+ transition-timing-function: var(--curveLinear);
11
+ transition-property: background;
12
+ }
13
+ .root:hover {
14
+ background-color: var(--colorNeutralBackground4Hover);
15
+ }
16
+ .root:hover :global(.fui-SplitNavItem__actionButton),
17
+ .root:hover :global(.fui-SplitNavItem__toggleButton),
18
+ .root:hover :global(.fui-SplitNavItem__menuButton),
19
+ .root:focus-within :global(.fui-SplitNavItem__actionButton),
20
+ .root:focus-within :global(.fui-SplitNavItem__toggleButton),
21
+ .root:focus-within :global(.fui-SplitNavItem__menuButton) {
22
+ opacity: 1;
23
+ pointer-events: auto;
24
+ }
25
+ .root:active {
26
+ background-color: var(--colorNeutralBackground4Pressed);
27
+ }
28
+ .navItem {
29
+ display: flex;
30
+ text-transform: none;
31
+ align-self: stretch;
32
+ text-align: start;
33
+ position: relative;
34
+ justify-content: start;
35
+ gap: var(--spacingVerticalL);
36
+ background-color: transparent;
37
+ }
38
+ .secondary {
39
+ min-width: calc(var(--spacingHorizontalXXL) + var(--spacingHorizontalXS));
40
+ padding-inline-end: var(--spacingHorizontalM);
41
+ padding-inline-start: calc(var(--spacingHorizontalXS) + var(--strokeWidthThin));
42
+ padding-block-start: calc(var(--spacingVerticalXS) + var(--strokeWidthThin));
43
+ align-items: start;
44
+ opacity: 0;
45
+ pointer-events: none;
46
+ transition: opacity var(--durationFast) var(--curveEasyEase);
47
+ will-change: opacity;
48
+ }
49
+ :where(.medium) > .secondary {
50
+ padding-block-start: calc(var(--spacingVerticalS) + var(--strokeWidthThin));
52
51
  }