@fluentui/react-menu-grid-preview 0.0.0-nightly-20250923-0853.1 → 0.0.0-nightly-20250925-0407.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 +14 -13
- package/lib/components/MenuGridCell/useMenuGridCell.js +14 -3
- package/lib/components/MenuGridCell/useMenuGridCell.js.map +1 -1
- package/lib-commonjs/components/MenuGridCell/useMenuGridCell.js +13 -2
- package/lib-commonjs/components/MenuGridCell/useMenuGridCell.js.map +1 -1
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-menu-grid-preview
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 25 Sep 2025 04:21:42 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-20250925-0407.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.0.0-nightly-20250925-0407.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu-grid-preview_v0.1.1..@fluentui/react-menu-grid-preview_v0.0.0-nightly-
|
|
9
|
+
Thu, 25 Sep 2025 04:21:42 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu-grid-preview_v0.1.1..@fluentui/react-menu-grid-preview_v0.0.0-nightly-20250925-0407.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/
|
|
16
|
-
- Bump @fluentui/react-
|
|
17
|
-
- Bump @fluentui/react-
|
|
18
|
-
- Bump @fluentui/react-
|
|
19
|
-
- Bump @fluentui/react-
|
|
20
|
-
- Bump @fluentui/react-
|
|
21
|
-
- Bump @fluentui/react-
|
|
22
|
-
- Bump @fluentui/react-
|
|
23
|
-
- Bump @fluentui/react-conformance
|
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
16
|
+
- Bump @fluentui/react-menu to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
17
|
+
- Bump @fluentui/react-table to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
19
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
20
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
23
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
24
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250925-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/da3380c5421daaea0900936aa7b7a263d684ec80) by beachball)
|
|
24
25
|
|
|
25
26
|
## [0.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.1.1)
|
|
26
27
|
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
|
|
3
|
+
import { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';
|
|
4
|
+
import { useMergedRefs, useEventCallback, mergeCallbacks, getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
5
|
import { useValidateNesting } from '../../utils/useValidateNesting';
|
|
4
6
|
/**
|
|
5
7
|
* Given user props, returns state and render function for a MenuGridCell.
|
|
6
8
|
*/ export function useMenuGridCell_unstable(props, ref) {
|
|
7
|
-
const validateNestingRef = useValidateNesting('MenuGridCell');
|
|
8
9
|
const { visuallyHidden } = props;
|
|
10
|
+
const validateNestingRef = useValidateNesting('MenuGridCell');
|
|
11
|
+
const { dir } = useFluent();
|
|
12
|
+
const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;
|
|
13
|
+
const onKeyDownWithPrevent = useEventCallback((event)=>{
|
|
14
|
+
if (event.key === CloseArrowKey) {
|
|
15
|
+
event.preventDefault();
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const onKeyDown = useEventCallback(mergeCallbacks(props.onKeyDown, onKeyDownWithPrevent));
|
|
9
19
|
return {
|
|
10
20
|
visuallyHidden,
|
|
11
21
|
components: {
|
|
@@ -14,7 +24,8 @@ import { useValidateNesting } from '../../utils/useValidateNesting';
|
|
|
14
24
|
root: slot.always(getIntrinsicElementProps('div', {
|
|
15
25
|
ref: useMergedRefs(ref, validateNestingRef),
|
|
16
26
|
role: 'gridcell',
|
|
17
|
-
...props
|
|
27
|
+
...props,
|
|
28
|
+
onKeyDown
|
|
18
29
|
}), {
|
|
19
30
|
elementType: 'div'
|
|
20
31
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport { MenuGridCellProps, MenuGridCellState } from './MenuGridCell.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridCell.\n */\nexport function useMenuGridCell_unstable(props: MenuGridCellProps, ref: React.Ref<HTMLDivElement>): MenuGridCellState {\n const { visuallyHidden } = props;\n const validateNestingRef = useValidateNesting('MenuGridCell');\n const { dir } = useFluent();\n\n const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;\n const onKeyDownWithPrevent = useEventCallback((event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === CloseArrowKey) {\n event.preventDefault();\n }\n });\n const onKeyDown = useEventCallback(mergeCallbacks(props.onKeyDown, onKeyDownWithPrevent));\n\n return {\n visuallyHidden,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef),\n role: 'gridcell',\n ...props,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowLeft","ArrowRight","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useValidateNesting","useMenuGridCell_unstable","props","ref","visuallyHidden","validateNestingRef","dir","CloseArrowKey","onKeyDownWithPrevent","event","key","preventDefault","onKeyDown","components","root","always","role","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,SAAS,EAAEC,UAAU,QAAQ,0BAA0B;AAChE,SACEC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,wBAAwB,EACxBC,IAAI,QACC,4BAA4B;AAEnC,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;CAEC,GACD,OAAO,SAASC,yBAAyBC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EAAEC,cAAc,EAAE,GAAGF;IAC3B,MAAMG,qBAAqBL,mBAAmB;IAC9C,MAAM,EAAEM,GAAG,EAAE,GAAGd;IAEhB,MAAMe,gBAAgBD,QAAQ,QAAQb,YAAYC;IAClD,MAAMc,uBAAuBZ,iBAAiB,CAACa;QAC7C,IAAIA,MAAMC,GAAG,KAAKH,eAAe;YAC/BE,MAAME,cAAc;QACtB;IACF;IACA,MAAMC,YAAYhB,iBAAiBC,eAAeK,MAAMU,SAAS,EAAEJ;IAEnE,OAAO;QACLJ;QACAS,YAAY;YACVC,MAAM;QACR;QACAA,MAAMf,KAAKgB,MAAM,CACfjB,yBAAyB,OAAO;YAC9BK,KAAKR,cAAcQ,KAAKE;YACxBW,MAAM;YACN,GAAGd,KAAK;YACRU;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF"}
|
|
@@ -10,11 +10,21 @@ Object.defineProperty(exports, "useMenuGridCell_unstable", {
|
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
14
|
+
const _keyboardkeys = require("@fluentui/keyboard-keys");
|
|
13
15
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
14
16
|
const _useValidateNesting = require("../../utils/useValidateNesting");
|
|
15
17
|
function useMenuGridCell_unstable(props, ref) {
|
|
16
|
-
const validateNestingRef = (0, _useValidateNesting.useValidateNesting)('MenuGridCell');
|
|
17
18
|
const { visuallyHidden } = props;
|
|
19
|
+
const validateNestingRef = (0, _useValidateNesting.useValidateNesting)('MenuGridCell');
|
|
20
|
+
const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
|
|
21
|
+
const CloseArrowKey = dir === 'ltr' ? _keyboardkeys.ArrowLeft : _keyboardkeys.ArrowRight;
|
|
22
|
+
const onKeyDownWithPrevent = (0, _reactutilities.useEventCallback)((event)=>{
|
|
23
|
+
if (event.key === CloseArrowKey) {
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const onKeyDown = (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(props.onKeyDown, onKeyDownWithPrevent));
|
|
18
28
|
return {
|
|
19
29
|
visuallyHidden,
|
|
20
30
|
components: {
|
|
@@ -23,7 +33,8 @@ function useMenuGridCell_unstable(props, ref) {
|
|
|
23
33
|
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
|
24
34
|
ref: (0, _reactutilities.useMergedRefs)(ref, validateNestingRef),
|
|
25
35
|
role: 'gridcell',
|
|
26
|
-
...props
|
|
36
|
+
...props,
|
|
37
|
+
onKeyDown
|
|
27
38
|
}), {
|
|
28
39
|
elementType: 'div'
|
|
29
40
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport { MenuGridCellProps, MenuGridCellState } from './MenuGridCell.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridCell.\n */\nexport function useMenuGridCell_unstable(props: MenuGridCellProps, ref: React.Ref<HTMLDivElement>): MenuGridCellState {\n const { visuallyHidden } = props;\n const validateNestingRef = useValidateNesting('MenuGridCell');\n const { dir } = useFluent();\n\n const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;\n const onKeyDownWithPrevent = useEventCallback((event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === CloseArrowKey) {\n event.preventDefault();\n }\n });\n const onKeyDown = useEventCallback(mergeCallbacks(props.onKeyDown, onKeyDownWithPrevent));\n\n return {\n visuallyHidden,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef),\n role: 'gridcell',\n ...props,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowLeft","ArrowRight","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useValidateNesting","useMenuGridCell_unstable","props","ref","visuallyHidden","validateNestingRef","dir","CloseArrowKey","onKeyDownWithPrevent","event","key","preventDefault","onKeyDown","components","root","always","role","elementType"],"mappings":";;;;+BAgBgBW;;;;;;;iEAhBO,QAAQ;qCACiB,kCAAkC;8BAC5C,0BAA0B;gCAOzD,4BAA4B;oCAEA,iCAAiC;AAK7D,kCAAkCC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EAAEC,cAAc,EAAE,GAAGF;IAC3B,MAAMG,yBAAqBL,sCAAAA,EAAmB;IAC9C,MAAM,EAAEM,GAAG,EAAE,GAAGd,2CAAAA;IAEhB,MAAMe,gBAAgBD,QAAQ,QAAQb,uBAAAA,GAAYC,wBAAAA;IAClD,MAAMc,2BAAuBZ,gCAAAA,EAAiB,CAACa;QAC7C,IAAIA,MAAMC,GAAG,KAAKH,eAAe;YAC/BE,MAAME,cAAc;QACtB;IACF;IACA,MAAMC,gBAAYhB,gCAAAA,MAAiBC,8BAAAA,EAAeK,MAAMU,SAAS,EAAEJ;IAEnE,OAAO;QACLJ;QACAS,YAAY;YACVC,MAAM;QACR;QACAA,MAAMf,oBAAAA,CAAKgB,MAAM,KACfjB,wCAAAA,EAAyB,OAAO;YAC9BK,SAAKR,6BAAAA,EAAcQ,KAAKE;YACxBW,MAAM;YACN,GAAGd,KAAK;YACRU;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-menu-grid-preview",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250925-0407.1",
|
|
4
4
|
"description": "New fluentui react package",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -19,18 +19,19 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@fluentui/eslint-plugin": "*",
|
|
22
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
23
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
22
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20250925-0407.1",
|
|
23
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20250925-0407.1",
|
|
24
24
|
"@fluentui/scripts-api-extractor": "*"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@fluentui/
|
|
28
|
-
"@fluentui/react-
|
|
29
|
-
"@fluentui/react-
|
|
30
|
-
"@fluentui/react-
|
|
31
|
-
"@fluentui/react-
|
|
32
|
-
"@fluentui/react-
|
|
33
|
-
"@fluentui/react-
|
|
27
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20250925-0407.1",
|
|
28
|
+
"@fluentui/react-menu": "0.0.0-nightly-20250925-0407.1",
|
|
29
|
+
"@fluentui/react-table": "0.0.0-nightly-20250925-0407.1",
|
|
30
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20250925-0407.1",
|
|
31
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20250925-0407.1",
|
|
32
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20250925-0407.1",
|
|
33
|
+
"@fluentui/react-theme": "0.0.0-nightly-20250925-0407.1",
|
|
34
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20250925-0407.1",
|
|
34
35
|
"@griffel/react": "^1.5.22",
|
|
35
36
|
"@swc/helpers": "^0.5.1"
|
|
36
37
|
},
|