@fluentui/react-menu 0.0.0-nightly-20250924-0412.1 → 0.0.0-nightly-20250926-0406.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-menu
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 26 Sep 2025 04:21:24 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20250926-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v0.0.0-nightly-20250926-0406.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.19.6..@fluentui/react-menu_v0.0.0-nightly-
|
|
9
|
+
Fri, 26 Sep 2025 04:21:24 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.19.6..@fluentui/react-menu_v0.0.0-nightly-20250926-0406.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-aria to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-context-selector to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-portal to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-positioning to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
24
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
25
|
-
- Bump @fluentui/react-provider to v0.0.0-nightly-
|
|
26
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
27
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
16
|
+
- Bump @fluentui/react-aria to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
17
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
18
|
+
- Bump @fluentui/react-portal to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
19
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
20
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
21
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
22
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
23
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
24
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
25
|
+
- Bump @fluentui/react-provider to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
26
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
27
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250926-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/e96bd2bc13e0c107fb06cdfdf1c9837abc5d6565) by beachball)
|
|
28
28
|
|
|
29
29
|
## [9.19.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.19.6)
|
|
30
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/useValidateNesting.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nimport type { MenuContextValue } from '../contexts/menuContext';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\n\ntype NestingComponentName = 'MenuList' | 'MenuItem' | 'MenuItemCheckbox' | 'MenuItemRadio';\n\nexport const useValidateNesting = (componentName: NestingComponentName): React.RefObject<HTMLElement> => {\n 'use no memo';\n\n const { targetDocument } = useFluent();\n const triggerRef = useMenuContext_unstable((context: MenuContextValue) => context.triggerRef);\n const inline = useMenuContext_unstable((context: MenuContextValue) => context.inline);\n const ref = React.useRef<HTMLElement>(null);\n\n if (process.env.NODE_ENV !== 'production') {\n // This check should run only in development mode\n // It's okay to disable the ESLint rule because we ar checking env variable statically (not at runtime)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n let ancestor = ref.current;\n let ancestorComponentName = '';\n do {\n ancestor = ancestor?.parentElement ?? null;\n if (ancestor?.classList.contains('fui-MenuList')) {\n break;\n } else if (ancestor?.classList.contains('fui-MenuGrid')) {\n ancestorComponentName = 'MenuGrid';\n } else if (ancestor?.classList.contains('fui-MenuGridItem')) {\n ancestorComponentName = 'MenuGridItem';\n } else if (ancestor?.classList.contains('fui-MenuGridRow')) {\n ancestorComponentName = 'MenuGridRow';\n } else if (ancestor?.classList.contains('fui-MenuGridCell')) {\n ancestorComponentName = 'MenuGridCell';\n }\n if (['MenuItem', 'MenuItemCheckbox', 'MenuItemRadio'].includes(componentName)) {\n if (['MenuGrid', 'MenuGridItem', 'MenuGridRow', 'MenuGridCell'].includes(ancestorComponentName)) {\n throw new Error(\n `${componentName} is incorrectly nested within ${ancestorComponentName}. You probably want to wrap it in a MenuList instead.`,\n );\n }\n } else if (componentName === 'MenuList') {\n if (ancestorComponentName === 'MenuGridCell') {\n if (inline && getCellOfTrigger(triggerRef.current, targetDocument) === ancestor) {\n break;\n }\n throw new Error(`MenuList is incorrectly nested within MenuGridCell.`);\n } else if (['MenuGrid', 'MenuGridItem', 'MenuGridRow'].includes(ancestorComponentName)) {\n throw new Error(`MenuList is incorrectly nested within ${ancestorComponentName}.`);\n }\n }\n } while (ancestor && ancestor !== targetDocument?.body);\n }, [componentName, ref, triggerRef, inline, targetDocument]);\n }\n return ref;\n};\n\nconst getCellOfTrigger = (trigger: HTMLElement | null, targetDocument?: Document): HTMLElement | null => {\n let ancestor = trigger?.parentElement;\n while (ancestor && ancestor !== targetDocument?.body) {\n if (ancestor?.classList.contains('fui-MenuGridCell')) {\n return ancestor;\n }\n ancestor = ancestor?.parentElement ?? null;\n }\n return null;\n};\n"],"names":["React","useFluent_unstable","useFluent","useMenuContext_unstable","useValidateNesting","componentName","targetDocument","triggerRef","context","inline","ref","useRef","process","env","NODE_ENV","useEffect","ancestor","current","ancestorComponentName","parentElement","classList","contains","includes","Error","getCellOfTrigger","body","trigger"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAGlF,SAASC,uBAAuB,QAAQ,0BAA0B;AAIlE,OAAO,MAAMC,qBAAqB,CAACC;IACjC;IAEA,MAAM,EAAEC,cAAc,EAAE,GAAGJ;IAC3B,MAAMK,aAAaJ,wBAAwB,CAACK,UAA8BA,QAAQD,UAAU;IAC5F,MAAME,SAASN,wBAAwB,CAACK,UAA8BA,QAAQC,MAAM;IACpF,MAAMC,MAAMV,MAAMW,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/utils/useValidateNesting.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nimport type { MenuContextValue } from '../contexts/menuContext';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\n\ntype NestingComponentName = 'MenuList' | 'MenuItem' | 'MenuItemCheckbox' | 'MenuItemRadio';\n\nexport const useValidateNesting = (componentName: NestingComponentName): React.RefObject<HTMLElement | null> => {\n 'use no memo';\n\n const { targetDocument } = useFluent();\n const triggerRef = useMenuContext_unstable((context: MenuContextValue) => context.triggerRef);\n const inline = useMenuContext_unstable((context: MenuContextValue) => context.inline);\n const ref = React.useRef<HTMLElement | null>(null);\n\n if (process.env.NODE_ENV !== 'production') {\n // This check should run only in development mode\n // It's okay to disable the ESLint rule because we ar checking env variable statically (not at runtime)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n let ancestor = ref.current;\n let ancestorComponentName = '';\n do {\n ancestor = ancestor?.parentElement ?? null;\n if (ancestor?.classList.contains('fui-MenuList')) {\n break;\n } else if (ancestor?.classList.contains('fui-MenuGrid')) {\n ancestorComponentName = 'MenuGrid';\n } else if (ancestor?.classList.contains('fui-MenuGridItem')) {\n ancestorComponentName = 'MenuGridItem';\n } else if (ancestor?.classList.contains('fui-MenuGridRow')) {\n ancestorComponentName = 'MenuGridRow';\n } else if (ancestor?.classList.contains('fui-MenuGridCell')) {\n ancestorComponentName = 'MenuGridCell';\n }\n if (['MenuItem', 'MenuItemCheckbox', 'MenuItemRadio'].includes(componentName)) {\n if (['MenuGrid', 'MenuGridItem', 'MenuGridRow', 'MenuGridCell'].includes(ancestorComponentName)) {\n throw new Error(\n `${componentName} is incorrectly nested within ${ancestorComponentName}. You probably want to wrap it in a MenuList instead.`,\n );\n }\n } else if (componentName === 'MenuList') {\n if (ancestorComponentName === 'MenuGridCell') {\n if (inline && getCellOfTrigger(triggerRef.current, targetDocument) === ancestor) {\n break;\n }\n throw new Error(`MenuList is incorrectly nested within MenuGridCell.`);\n } else if (['MenuGrid', 'MenuGridItem', 'MenuGridRow'].includes(ancestorComponentName)) {\n throw new Error(`MenuList is incorrectly nested within ${ancestorComponentName}.`);\n }\n }\n } while (ancestor && ancestor !== targetDocument?.body);\n }, [componentName, ref, triggerRef, inline, targetDocument]);\n }\n return ref;\n};\n\nconst getCellOfTrigger = (trigger: HTMLElement | null, targetDocument?: Document): HTMLElement | null => {\n let ancestor = trigger?.parentElement;\n while (ancestor && ancestor !== targetDocument?.body) {\n if (ancestor?.classList.contains('fui-MenuGridCell')) {\n return ancestor;\n }\n ancestor = ancestor?.parentElement ?? null;\n }\n return null;\n};\n"],"names":["React","useFluent_unstable","useFluent","useMenuContext_unstable","useValidateNesting","componentName","targetDocument","triggerRef","context","inline","ref","useRef","process","env","NODE_ENV","useEffect","ancestor","current","ancestorComponentName","parentElement","classList","contains","includes","Error","getCellOfTrigger","body","trigger"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAGlF,SAASC,uBAAuB,QAAQ,0BAA0B;A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jI;gBACF,OAAO,IAAIb,kBAAkB,YAAY;oBACvC,IAAIa,0BAA0B,gBAAgB;wBAC5C,IAAIT,UAAUe,iBAAiBjB,WAAWU,OAAO,EAAEX,oBAAoBU,UAAU;4BAC/E;wBACF;wBACA,MAAM,IAAIO,MAAM,CAAC,mDAAmD,CAAC;oBACvE,OAAO,IAAI;wBAAC;wBAAY;wBAAgB;qBAAc,CAACD,QAAQ,CAACJ,wBAAwB;wBACtF,MAAM,IAAIK,MAAM,CAAC,sCAAsC,EAAEL,sBAAsB,CAAC,CAAC;oBACnF;gBACF;YACF,QAASF,YAAYA,cAAaV,2BAAAA,qCAAAA,eAAgBmB,IAAI,EAAE;QAC1D,GAAG;YAACpB;YAAeK;YAAKH;YAAYE;YAAQH;SAAe;IAC7D;IACA,OAAOI;AACT,EAAE;AAEF,MAAMc,mBAAmB,CAACE,SAA6BpB;IACrD,IAAIU,WAAWU,oBAAAA,8BAAAA,QAASP,aAAa;IACrC,MAAOH,YAAYA,cAAaV,2BAAAA,qCAAAA,eAAgBmB,IAAI,EAAE;QACpD,IAAIT,qBAAAA,+BAAAA,SAAUI,SAAS,CAACC,QAAQ,CAAC,qBAAqB;YACpD,OAAOL;QACT;YACWA;QAAXA,WAAWA,CAAAA,0BAAAA,qBAAAA,+BAAAA,SAAUG,aAAa,cAAvBH,qCAAAA,0BAA2B;IACxC;IACA,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/useValidateNesting.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nimport type { MenuContextValue } from '../contexts/menuContext';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\n\ntype NestingComponentName = 'MenuList' | 'MenuItem' | 'MenuItemCheckbox' | 'MenuItemRadio';\n\nexport const useValidateNesting = (componentName: NestingComponentName): React.RefObject<HTMLElement> => {\n 'use no memo';\n\n const { targetDocument } = useFluent();\n const triggerRef = useMenuContext_unstable((context: MenuContextValue) => context.triggerRef);\n const inline = useMenuContext_unstable((context: MenuContextValue) => context.inline);\n const ref = React.useRef<HTMLElement>(null);\n\n if (process.env.NODE_ENV !== 'production') {\n // This check should run only in development mode\n // It's okay to disable the ESLint rule because we ar checking env variable statically (not at runtime)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n let ancestor = ref.current;\n let ancestorComponentName = '';\n do {\n ancestor = ancestor?.parentElement ?? null;\n if (ancestor?.classList.contains('fui-MenuList')) {\n break;\n } else if (ancestor?.classList.contains('fui-MenuGrid')) {\n ancestorComponentName = 'MenuGrid';\n } else if (ancestor?.classList.contains('fui-MenuGridItem')) {\n ancestorComponentName = 'MenuGridItem';\n } else if (ancestor?.classList.contains('fui-MenuGridRow')) {\n ancestorComponentName = 'MenuGridRow';\n } else if (ancestor?.classList.contains('fui-MenuGridCell')) {\n ancestorComponentName = 'MenuGridCell';\n }\n if (['MenuItem', 'MenuItemCheckbox', 'MenuItemRadio'].includes(componentName)) {\n if (['MenuGrid', 'MenuGridItem', 'MenuGridRow', 'MenuGridCell'].includes(ancestorComponentName)) {\n throw new Error(\n `${componentName} is incorrectly nested within ${ancestorComponentName}. You probably want to wrap it in a MenuList instead.`,\n );\n }\n } else if (componentName === 'MenuList') {\n if (ancestorComponentName === 'MenuGridCell') {\n if (inline && getCellOfTrigger(triggerRef.current, targetDocument) === ancestor) {\n break;\n }\n throw new Error(`MenuList is incorrectly nested within MenuGridCell.`);\n } else if (['MenuGrid', 'MenuGridItem', 'MenuGridRow'].includes(ancestorComponentName)) {\n throw new Error(`MenuList is incorrectly nested within ${ancestorComponentName}.`);\n }\n }\n } while (ancestor && ancestor !== targetDocument?.body);\n }, [componentName, ref, triggerRef, inline, targetDocument]);\n }\n return ref;\n};\n\nconst getCellOfTrigger = (trigger: HTMLElement | null, targetDocument?: Document): HTMLElement | null => {\n let ancestor = trigger?.parentElement;\n while (ancestor && ancestor !== targetDocument?.body) {\n if (ancestor?.classList.contains('fui-MenuGridCell')) {\n return ancestor;\n }\n ancestor = ancestor?.parentElement ?? null;\n }\n return null;\n};\n"],"names":["React","useFluent_unstable","useFluent","useMenuContext_unstable","useValidateNesting","componentName","targetDocument","triggerRef","context","inline","ref","useRef","process","env","NODE_ENV","useEffect","ancestor","current","ancestorComponentName","parentElement","classList","contains","includes","Error","getCellOfTrigger","body","trigger"],"mappings":";;;;+BAQaI;;;;;;;iEARU,QAAQ;qCACiB,kCAAkC;6BAG1C,0BAA0B;AAI3D,2BAA2B,CAACC;IACjC;IAEA,MAAM,EAAEC,cAAc,EAAE,OAAGJ,uCAAAA;IAC3B,MAAMK,iBAAaJ,oCAAAA,EAAwB,CAACK,UAA8BA,QAAQD,UAAU;IAC5F,MAAME,SAASN,wCAAAA,EAAwB,CAACK,UAA8BA,QAAQC,MAAM;IACpF,MAAMC,MAAMV,OAAMW,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/utils/useValidateNesting.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nimport type { MenuContextValue } from '../contexts/menuContext';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\n\ntype NestingComponentName = 'MenuList' | 'MenuItem' | 'MenuItemCheckbox' | 'MenuItemRadio';\n\nexport const useValidateNesting = (componentName: NestingComponentName): React.RefObject<HTMLElement | null> => {\n 'use no memo';\n\n const { targetDocument } = useFluent();\n const triggerRef = useMenuContext_unstable((context: MenuContextValue) => context.triggerRef);\n const inline = useMenuContext_unstable((context: MenuContextValue) => context.inline);\n const ref = React.useRef<HTMLElement | null>(null);\n\n if (process.env.NODE_ENV !== 'production') {\n // This check should run only in development mode\n // It's okay to disable the ESLint rule because we ar checking env variable statically (not at runtime)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n let ancestor = ref.current;\n let ancestorComponentName = '';\n do {\n ancestor = ancestor?.parentElement ?? null;\n if (ancestor?.classList.contains('fui-MenuList')) {\n break;\n } else if (ancestor?.classList.contains('fui-MenuGrid')) {\n ancestorComponentName = 'MenuGrid';\n } else if (ancestor?.classList.contains('fui-MenuGridItem')) {\n ancestorComponentName = 'MenuGridItem';\n } else if (ancestor?.classList.contains('fui-MenuGridRow')) {\n ancestorComponentName = 'MenuGridRow';\n } else if (ancestor?.classList.contains('fui-MenuGridCell')) {\n ancestorComponentName = 'MenuGridCell';\n }\n if (['MenuItem', 'MenuItemCheckbox', 'MenuItemRadio'].includes(componentName)) {\n if (['MenuGrid', 'MenuGridItem', 'MenuGridRow', 'MenuGridCell'].includes(ancestorComponentName)) {\n throw new Error(\n `${componentName} is incorrectly nested within ${ancestorComponentName}. You probably want to wrap it in a MenuList instead.`,\n );\n }\n } else if (componentName === 'MenuList') {\n if (ancestorComponentName === 'MenuGridCell') {\n if (inline && getCellOfTrigger(triggerRef.current, targetDocument) === ancestor) {\n break;\n }\n throw new Error(`MenuList is incorrectly nested within MenuGridCell.`);\n } else if (['MenuGrid', 'MenuGridItem', 'MenuGridRow'].includes(ancestorComponentName)) {\n throw new Error(`MenuList is incorrectly nested within ${ancestorComponentName}.`);\n }\n }\n } while (ancestor && ancestor !== targetDocument?.body);\n }, [componentName, ref, triggerRef, inline, targetDocument]);\n }\n return ref;\n};\n\nconst getCellOfTrigger = (trigger: HTMLElement | null, targetDocument?: Document): HTMLElement | null => {\n let ancestor = trigger?.parentElement;\n while (ancestor && ancestor !== targetDocument?.body) {\n if (ancestor?.classList.contains('fui-MenuGridCell')) {\n return ancestor;\n }\n ancestor = ancestor?.parentElement ?? null;\n }\n return null;\n};\n"],"names":["React","useFluent_unstable","useFluent","useMenuContext_unstable","useValidateNesting","componentName","targetDocument","triggerRef","context","inline","ref","useRef","process","env","NODE_ENV","useEffect","ancestor","current","ancestorComponentName","parentElement","classList","contains","includes","Error","getCellOfTrigger","body","trigger"],"mappings":";;;;+BAQaI;;;;;;;iEARU,QAAQ;qCACiB,kCAAkC;6BAG1C,0BAA0B;AAI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UG,aAAAA,AAAa,MAAA,QAAvBH,4BAAAA,KAAAA,IAAAA,0BAA2B;IACxC;IACA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-menu",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250926-0406.1",
|
|
4
4
|
"description": "Fluent UI menu component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@fluentui/react-provider": "0.0.0-nightly-
|
|
15
|
+
"@fluentui/react-provider": "0.0.0-nightly-20250926-0406.1",
|
|
16
16
|
"@fluentui/eslint-plugin": "*",
|
|
17
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
18
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
17
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20250926-0406.1",
|
|
18
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20250926-0406.1",
|
|
19
19
|
"@fluentui/scripts-api-extractor": "*",
|
|
20
20
|
"@fluentui/scripts-cypress": "*"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
|
24
|
-
"@fluentui/react-aria": "0.0.0-nightly-
|
|
25
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
|
23
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20250926-0406.1",
|
|
24
|
+
"@fluentui/react-aria": "0.0.0-nightly-20250926-0406.1",
|
|
25
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20250926-0406.1",
|
|
26
26
|
"@fluentui/react-icons": "^2.0.245",
|
|
27
|
-
"@fluentui/react-portal": "0.0.0-nightly-
|
|
28
|
-
"@fluentui/react-positioning": "0.0.0-nightly-
|
|
29
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
30
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
|
31
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
32
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
33
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
|
27
|
+
"@fluentui/react-portal": "0.0.0-nightly-20250926-0406.1",
|
|
28
|
+
"@fluentui/react-positioning": "0.0.0-nightly-20250926-0406.1",
|
|
29
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20250926-0406.1",
|
|
30
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20250926-0406.1",
|
|
31
|
+
"@fluentui/react-theme": "0.0.0-nightly-20250926-0406.1",
|
|
32
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20250926-0406.1",
|
|
33
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20250926-0406.1",
|
|
34
34
|
"@griffel/react": "^1.5.22",
|
|
35
35
|
"@swc/helpers": "^0.5.1"
|
|
36
36
|
},
|