@fluentui/react-table 9.18.4 → 9.18.5
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 +20 -2
- package/dist/index.d.ts +0 -2
- package/lib/hooks/useTableCompositeNavigation.js +8 -2
- package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib-commonjs/hooks/useTableCompositeNavigation.js +7 -1
- package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-table
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 21 Aug 2025 12:20:24 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.18.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.18.5)
|
|
8
|
+
|
|
9
|
+
Thu, 21 Aug 2025 12:20:24 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.18.4..@fluentui/react-table_v9.18.5)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- feat(react-table): Allow Left arrow to focus back to row in composite navigation ([PR #34984](https://github.com/microsoft/fluentui/pull/34984) by lingfangao@hotmail.com)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.16.4 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
16
|
+
- Bump @fluentui/react-avatar to v9.9.5 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
17
|
+
- Bump @fluentui/react-checkbox to v9.5.4 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
18
|
+
- Bump @fluentui/react-context-selector to v9.2.6 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
19
|
+
- Bump @fluentui/react-radio to v9.5.4 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
20
|
+
- Bump @fluentui/react-shared-contexts to v9.25.0 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
21
|
+
- Bump @fluentui/react-tabster to v9.26.4 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v9.24.0 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
23
|
+
- Bump @fluentui/react-jsx-runtime to v9.1.6 ([PR #35055](https://github.com/microsoft/fluentui/pull/35055) by beachball)
|
|
24
|
+
|
|
7
25
|
## [9.18.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.18.4)
|
|
8
26
|
|
|
9
|
-
Thu, 07 Aug 2025
|
|
27
|
+
Thu, 07 Aug 2025 10:03:28 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.18.3..@fluentui/react-table_v9.18.4)
|
|
11
29
|
|
|
12
30
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
|
|
3
|
-
import { ArrowDown, ArrowRight, ArrowUp } from '@fluentui/keyboard-keys';
|
|
3
|
+
import { ArrowDown, ArrowRight, ArrowUp, ArrowLeft } from '@fluentui/keyboard-keys';
|
|
4
4
|
import { useArrowNavigationGroup, useFocusableGroup, useMergedTabsterAttributes_unstable, useFocusFinders, GroupperMoveFocusEvent, MoverMoveFocusEvent, GroupperMoveFocusActions, MoverKeys } from '@fluentui/react-tabster';
|
|
5
5
|
import { isHTMLElement } from '@fluentui/react-utilities';
|
|
6
6
|
export function useTableCompositeNavigation() {
|
|
@@ -44,7 +44,13 @@ export function useTableCompositeNavigation() {
|
|
|
44
44
|
}
|
|
45
45
|
return false;
|
|
46
46
|
})();
|
|
47
|
-
// Escape groupper focus trap before arrow down
|
|
47
|
+
// Escape groupper focus trap before arrow left, arrow down or arrow up
|
|
48
|
+
if (e.key === ArrowLeft && isInCell) {
|
|
49
|
+
activeElement.dispatchEvent(new GroupperMoveFocusEvent({
|
|
50
|
+
action: GroupperMoveFocusActions.Escape
|
|
51
|
+
}));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
48
54
|
if ((e.key === ArrowDown || e.key === ArrowUp) && isInCell) {
|
|
49
55
|
activeElement.dispatchEvent(new GroupperMoveFocusEvent({
|
|
50
56
|
action: GroupperMoveFocusActions.Escape
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useTableCompositeNavigation.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowDown, ArrowRight, ArrowUp } from '@fluentui/keyboard-keys';\nimport {\n useArrowNavigationGroup,\n useFocusableGroup,\n useMergedTabsterAttributes_unstable,\n TabsterDOMAttribute,\n useFocusFinders,\n GroupperMoveFocusEvent,\n MoverMoveFocusEvent,\n GroupperMoveFocusActions,\n MoverKeys,\n} from '@fluentui/react-tabster';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useTableCompositeNavigation(): {\n onTableKeyDown: React.KeyboardEventHandler;\n tableTabsterAttribute: TabsterDOMAttribute;\n tableRowTabsterAttribute: TabsterDOMAttribute;\n} {\n const horizontalAttr = useArrowNavigationGroup({ axis: 'horizontal' });\n const gridAttr = useArrowNavigationGroup({ axis: 'grid' });\n const groupperAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent();\n\n const rowAttr = useMergedTabsterAttributes_unstable(horizontalAttr, groupperAttr);\n\n const onKeyDown: React.KeyboardEventHandler = React.useCallback(\n e => {\n if (!targetDocument) {\n return;\n }\n\n let activeElement = targetDocument.activeElement;\n if (!activeElement || !e.currentTarget.contains(activeElement)) {\n return;\n }\n const activeElementRole = activeElement.getAttribute('role');\n\n // Enter groupper when in row focus mode to navigate cells\n if (e.key === ArrowRight && activeElementRole === 'row' && isHTMLElement(activeElement)) {\n findFirstFocusable(activeElement)?.focus();\n }\n\n if (activeElementRole === 'row') {\n return;\n }\n\n const isInCell = (() => {\n let cur = isHTMLElement(activeElement) ? activeElement : null;\n while (cur) {\n const curRole = cur.getAttribute('role');\n if (curRole === 'cell' || curRole === 'gridcell') {\n return true;\n }\n\n cur = cur.parentElement;\n }\n\n return false;\n })();\n\n // Escape groupper focus trap before arrow down\n if ((e.key === ArrowDown || e.key === ArrowUp) && isInCell) {\n activeElement.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape }));\n\n activeElement = targetDocument.activeElement;\n\n if (activeElement) {\n activeElement.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys[e.key] }));\n }\n }\n },\n [targetDocument, findFirstFocusable],\n );\n\n return {\n onTableKeyDown: onKeyDown,\n tableTabsterAttribute: gridAttr,\n tableRowTabsterAttribute: rowAttr,\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowDown","ArrowRight","ArrowUp","useArrowNavigationGroup","useFocusableGroup","useMergedTabsterAttributes_unstable","useFocusFinders","GroupperMoveFocusEvent","MoverMoveFocusEvent","GroupperMoveFocusActions","MoverKeys","isHTMLElement","useTableCompositeNavigation","horizontalAttr","axis","gridAttr","groupperAttr","tabBehavior","findFirstFocusable","targetDocument","rowAttr","onKeyDown","useCallback","e","activeElement","currentTarget","contains","activeElementRole","getAttribute","key","focus","isInCell","cur","curRole","parentElement","dispatchEvent","action","Escape","onTableKeyDown","tableTabsterAttribute","tableRowTabsterAttribute"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,SAAS,EAAEC,UAAU,EAAEC,OAAO,QAAQ,0BAA0B;
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useTableCompositeNavigation.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowDown, ArrowRight, ArrowUp, ArrowLeft } from '@fluentui/keyboard-keys';\nimport {\n useArrowNavigationGroup,\n useFocusableGroup,\n useMergedTabsterAttributes_unstable,\n TabsterDOMAttribute,\n useFocusFinders,\n GroupperMoveFocusEvent,\n MoverMoveFocusEvent,\n GroupperMoveFocusActions,\n MoverKeys,\n} from '@fluentui/react-tabster';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useTableCompositeNavigation(): {\n onTableKeyDown: React.KeyboardEventHandler;\n tableTabsterAttribute: TabsterDOMAttribute;\n tableRowTabsterAttribute: TabsterDOMAttribute;\n} {\n const horizontalAttr = useArrowNavigationGroup({ axis: 'horizontal' });\n const gridAttr = useArrowNavigationGroup({ axis: 'grid' });\n const groupperAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent();\n\n const rowAttr = useMergedTabsterAttributes_unstable(horizontalAttr, groupperAttr);\n\n const onKeyDown: React.KeyboardEventHandler = React.useCallback(\n e => {\n if (!targetDocument) {\n return;\n }\n\n let activeElement = targetDocument.activeElement;\n if (!activeElement || !e.currentTarget.contains(activeElement)) {\n return;\n }\n const activeElementRole = activeElement.getAttribute('role');\n\n // Enter groupper when in row focus mode to navigate cells\n if (e.key === ArrowRight && activeElementRole === 'row' && isHTMLElement(activeElement)) {\n findFirstFocusable(activeElement)?.focus();\n }\n\n if (activeElementRole === 'row') {\n return;\n }\n\n const isInCell = (() => {\n let cur = isHTMLElement(activeElement) ? activeElement : null;\n while (cur) {\n const curRole = cur.getAttribute('role');\n if (curRole === 'cell' || curRole === 'gridcell') {\n return true;\n }\n\n cur = cur.parentElement;\n }\n\n return false;\n })();\n\n // Escape groupper focus trap before arrow left, arrow down or arrow up\n if (e.key === ArrowLeft && isInCell) {\n activeElement.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape }));\n return;\n }\n if ((e.key === ArrowDown || e.key === ArrowUp) && isInCell) {\n activeElement.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape }));\n\n activeElement = targetDocument.activeElement;\n\n if (activeElement) {\n activeElement.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys[e.key] }));\n }\n }\n },\n [targetDocument, findFirstFocusable],\n );\n\n return {\n onTableKeyDown: onKeyDown,\n tableTabsterAttribute: gridAttr,\n tableRowTabsterAttribute: rowAttr,\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowDown","ArrowRight","ArrowUp","ArrowLeft","useArrowNavigationGroup","useFocusableGroup","useMergedTabsterAttributes_unstable","useFocusFinders","GroupperMoveFocusEvent","MoverMoveFocusEvent","GroupperMoveFocusActions","MoverKeys","isHTMLElement","useTableCompositeNavigation","horizontalAttr","axis","gridAttr","groupperAttr","tabBehavior","findFirstFocusable","targetDocument","rowAttr","onKeyDown","useCallback","e","activeElement","currentTarget","contains","activeElementRole","getAttribute","key","focus","isInCell","cur","curRole","parentElement","dispatchEvent","action","Escape","onTableKeyDown","tableTabsterAttribute","tableRowTabsterAttribute"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,SAAS,EAAEC,UAAU,EAAEC,OAAO,EAAEC,SAAS,QAAQ,0BAA0B;AACpF,SACEC,uBAAuB,EACvBC,iBAAiB,EACjBC,mCAAmC,EAEnCC,eAAe,EACfC,sBAAsB,EACtBC,mBAAmB,EACnBC,wBAAwB,EACxBC,SAAS,QACJ,0BAA0B;AACjC,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,OAAO,SAASC;IAKd,MAAMC,iBAAiBV,wBAAwB;QAAEW,MAAM;IAAa;IACpE,MAAMC,WAAWZ,wBAAwB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AyB4B,MAAM;YAAC;YAEjGb,gBAAgBL,eAAeK,aAAa;YAE5C,IAAIA,eAAe;gBACjBA,cAAcW,aAAa,CAAC,IAAI3B,oBAAoB;oBAAEqB,KAAKnB,SAAS,CAACa,EAAEM,GAAG,CAAC;gBAAC;YAC9E;QACF;IACF,GACA;QAACV;QAAgBD;KAAmB;IAGtC,OAAO;QACLoB,gBAAgBjB;QAChBkB,uBAAuBxB;QACvByB,0BAA0BpB;IAC5B;AACF"}
|
|
@@ -55,7 +55,13 @@ function useTableCompositeNavigation() {
|
|
|
55
55
|
}
|
|
56
56
|
return false;
|
|
57
57
|
})();
|
|
58
|
-
// Escape groupper focus trap before arrow down
|
|
58
|
+
// Escape groupper focus trap before arrow left, arrow down or arrow up
|
|
59
|
+
if (e.key === _keyboardkeys.ArrowLeft && isInCell) {
|
|
60
|
+
activeElement.dispatchEvent(new _reacttabster.GroupperMoveFocusEvent({
|
|
61
|
+
action: _reacttabster.GroupperMoveFocusActions.Escape
|
|
62
|
+
}));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
59
65
|
if ((e.key === _keyboardkeys.ArrowDown || e.key === _keyboardkeys.ArrowUp) && isInCell) {
|
|
60
66
|
activeElement.dispatchEvent(new _reacttabster.GroupperMoveFocusEvent({
|
|
61
67
|
action: _reacttabster.GroupperMoveFocusActions.Escape
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useTableCompositeNavigation.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowDown, ArrowRight, ArrowUp } from '@fluentui/keyboard-keys';\nimport {\n useArrowNavigationGroup,\n useFocusableGroup,\n useMergedTabsterAttributes_unstable,\n TabsterDOMAttribute,\n useFocusFinders,\n GroupperMoveFocusEvent,\n MoverMoveFocusEvent,\n GroupperMoveFocusActions,\n MoverKeys,\n} from '@fluentui/react-tabster';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useTableCompositeNavigation(): {\n onTableKeyDown: React.KeyboardEventHandler;\n tableTabsterAttribute: TabsterDOMAttribute;\n tableRowTabsterAttribute: TabsterDOMAttribute;\n} {\n const horizontalAttr = useArrowNavigationGroup({ axis: 'horizontal' });\n const gridAttr = useArrowNavigationGroup({ axis: 'grid' });\n const groupperAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent();\n\n const rowAttr = useMergedTabsterAttributes_unstable(horizontalAttr, groupperAttr);\n\n const onKeyDown: React.KeyboardEventHandler = React.useCallback(\n e => {\n if (!targetDocument) {\n return;\n }\n\n let activeElement = targetDocument.activeElement;\n if (!activeElement || !e.currentTarget.contains(activeElement)) {\n return;\n }\n const activeElementRole = activeElement.getAttribute('role');\n\n // Enter groupper when in row focus mode to navigate cells\n if (e.key === ArrowRight && activeElementRole === 'row' && isHTMLElement(activeElement)) {\n findFirstFocusable(activeElement)?.focus();\n }\n\n if (activeElementRole === 'row') {\n return;\n }\n\n const isInCell = (() => {\n let cur = isHTMLElement(activeElement) ? activeElement : null;\n while (cur) {\n const curRole = cur.getAttribute('role');\n if (curRole === 'cell' || curRole === 'gridcell') {\n return true;\n }\n\n cur = cur.parentElement;\n }\n\n return false;\n })();\n\n // Escape groupper focus trap before arrow down\n if ((e.key === ArrowDown || e.key === ArrowUp) && isInCell) {\n activeElement.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape }));\n\n activeElement = targetDocument.activeElement;\n\n if (activeElement) {\n activeElement.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys[e.key] }));\n }\n }\n },\n [targetDocument, findFirstFocusable],\n );\n\n return {\n onTableKeyDown: onKeyDown,\n tableTabsterAttribute: gridAttr,\n tableRowTabsterAttribute: rowAttr,\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowDown","ArrowRight","ArrowUp","useArrowNavigationGroup","useFocusableGroup","useMergedTabsterAttributes_unstable","useFocusFinders","GroupperMoveFocusEvent","MoverMoveFocusEvent","GroupperMoveFocusActions","MoverKeys","isHTMLElement","useTableCompositeNavigation","horizontalAttr","axis","gridAttr","groupperAttr","tabBehavior","findFirstFocusable","targetDocument","rowAttr","onKeyDown","useCallback","e","activeElement","currentTarget","contains","activeElementRole","getAttribute","key","focus","isInCell","cur","curRole","parentElement","dispatchEvent","action","Escape","onTableKeyDown","tableTabsterAttribute","tableRowTabsterAttribute"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useTableCompositeNavigation.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowDown, ArrowRight, ArrowUp, ArrowLeft } from '@fluentui/keyboard-keys';\nimport {\n useArrowNavigationGroup,\n useFocusableGroup,\n useMergedTabsterAttributes_unstable,\n TabsterDOMAttribute,\n useFocusFinders,\n GroupperMoveFocusEvent,\n MoverMoveFocusEvent,\n GroupperMoveFocusActions,\n MoverKeys,\n} from '@fluentui/react-tabster';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useTableCompositeNavigation(): {\n onTableKeyDown: React.KeyboardEventHandler;\n tableTabsterAttribute: TabsterDOMAttribute;\n tableRowTabsterAttribute: TabsterDOMAttribute;\n} {\n const horizontalAttr = useArrowNavigationGroup({ axis: 'horizontal' });\n const gridAttr = useArrowNavigationGroup({ axis: 'grid' });\n const groupperAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent();\n\n const rowAttr = useMergedTabsterAttributes_unstable(horizontalAttr, groupperAttr);\n\n const onKeyDown: React.KeyboardEventHandler = React.useCallback(\n e => {\n if (!targetDocument) {\n return;\n }\n\n let activeElement = targetDocument.activeElement;\n if (!activeElement || !e.currentTarget.contains(activeElement)) {\n return;\n }\n const activeElementRole = activeElement.getAttribute('role');\n\n // Enter groupper when in row focus mode to navigate cells\n if (e.key === ArrowRight && activeElementRole === 'row' && isHTMLElement(activeElement)) {\n findFirstFocusable(activeElement)?.focus();\n }\n\n if (activeElementRole === 'row') {\n return;\n }\n\n const isInCell = (() => {\n let cur = isHTMLElement(activeElement) ? activeElement : null;\n while (cur) {\n const curRole = cur.getAttribute('role');\n if (curRole === 'cell' || curRole === 'gridcell') {\n return true;\n }\n\n cur = cur.parentElement;\n }\n\n return false;\n })();\n\n // Escape groupper focus trap before arrow left, arrow down or arrow up\n if (e.key === ArrowLeft && isInCell) {\n activeElement.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape }));\n return;\n }\n if ((e.key === ArrowDown || e.key === ArrowUp) && isInCell) {\n activeElement.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape }));\n\n activeElement = targetDocument.activeElement;\n\n if (activeElement) {\n activeElement.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys[e.key] }));\n }\n }\n },\n [targetDocument, findFirstFocusable],\n );\n\n return {\n onTableKeyDown: onKeyDown,\n tableTabsterAttribute: gridAttr,\n tableRowTabsterAttribute: rowAttr,\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowDown","ArrowRight","ArrowUp","ArrowLeft","useArrowNavigationGroup","useFocusableGroup","useMergedTabsterAttributes_unstable","useFocusFinders","GroupperMoveFocusEvent","MoverMoveFocusEvent","GroupperMoveFocusActions","MoverKeys","isHTMLElement","useTableCompositeNavigation","horizontalAttr","axis","gridAttr","groupperAttr","tabBehavior","findFirstFocusable","targetDocument","rowAttr","onKeyDown","useCallback","e","activeElement","currentTarget","contains","activeElementRole","getAttribute","key","focus","isInCell","cur","curRole","parentElement","dispatchEvent","action","Escape","onTableKeyDown","tableTabsterAttribute","tableRowTabsterAttribute"],"mappings":";;;;+BAgBgBgB;;;;;;;iEAhBO,QAAQ;qCACiB,kCAAkC;8BACxB,0BAA0B;8BAW7E,0BAA0B;gCACH,4BAA4B;AAEnD;IAKL,M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sCAAAA,CAAyB4B,MAAM;YAAC;YACjG;QACF;QACA,IAAKd,CAAAA,EAAEM,GAAG,KAAK9B,uBAAAA,IAAawB,EAAEM,GAAG,KAAK5B,qBAAAA,AAAM,KAAM8B,UAAU;YAC1DP,cAAcW,aAAa,CAAC,IAAI5B,oCAAAA,CAAuB;gBAAE6B,QAAQ3B,sCAAAA,CAAyB4B,MAAM;YAAC;YAEjGb,gBAAgBL,eAAeK,aAAa;YAE5C,IAAIA,eAAe;gBACjBA,cAAcW,aAAa,CAAC,IAAI3B,iCAAAA,CAAoB;oBAAEqB,KAAKnB,uBAAS,CAACa,EAAEM,GAAG,CAAC;gBAAC;YAC9E;QACF;IACF,GACA;QAACV;QAAgBD;KAAmB;IAGtC,OAAO;QACLoB,gBAAgBjB;QAChBkB,uBAAuBxB;QACvByB,0BAA0BpB;IAC5B;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-table",
|
|
3
|
-
"version": "9.18.
|
|
3
|
+
"version": "9.18.5",
|
|
4
4
|
"description": "React components for building web experiences",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@fluentui/keyboard-keys": "^9.0.8",
|
|
24
|
-
"@fluentui/react-aria": "^9.16.
|
|
25
|
-
"@fluentui/react-avatar": "^9.9.
|
|
26
|
-
"@fluentui/react-checkbox": "^9.5.
|
|
27
|
-
"@fluentui/react-context-selector": "^9.2.
|
|
24
|
+
"@fluentui/react-aria": "^9.16.4",
|
|
25
|
+
"@fluentui/react-avatar": "^9.9.5",
|
|
26
|
+
"@fluentui/react-checkbox": "^9.5.4",
|
|
27
|
+
"@fluentui/react-context-selector": "^9.2.6",
|
|
28
28
|
"@fluentui/react-icons": "^2.0.245",
|
|
29
|
-
"@fluentui/react-radio": "^9.5.
|
|
30
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
31
|
-
"@fluentui/react-tabster": "^9.26.
|
|
29
|
+
"@fluentui/react-radio": "^9.5.4",
|
|
30
|
+
"@fluentui/react-shared-contexts": "^9.25.0",
|
|
31
|
+
"@fluentui/react-tabster": "^9.26.4",
|
|
32
32
|
"@fluentui/react-theme": "^9.2.0",
|
|
33
|
-
"@fluentui/react-utilities": "^9.
|
|
34
|
-
"@fluentui/react-jsx-runtime": "^9.1.
|
|
33
|
+
"@fluentui/react-utilities": "^9.24.0",
|
|
34
|
+
"@fluentui/react-jsx-runtime": "^9.1.6",
|
|
35
35
|
"@griffel/react": "^1.5.22",
|
|
36
36
|
"@swc/helpers": "^0.5.1"
|
|
37
37
|
},
|