@fluentui/react-table 9.10.14 → 9.10.16

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,25 +1,52 @@
1
1
  # Change Log - @fluentui/react-table
2
2
 
3
- This log was last generated on Thu, 14 Dec 2023 09:51:37 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 18 Dec 2023 17:47:04 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.10.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.16)
8
+
9
+ Mon, 18 Dec 2023 17:47:04 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.10.15..@fluentui/react-table_v9.10.16)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-avatar to v9.6.2 ([PR #30010](https://github.com/microsoft/fluentui/pull/30010) by beachball)
15
+
16
+ ## [9.10.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.15)
17
+
18
+ Mon, 18 Dec 2023 14:40:46 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.10.14..@fluentui/react-table_v9.10.15)
20
+
21
+ ### Patches
22
+
23
+ - chore: adopts useARIAButtonProps instead of deprecated method useARIAButtonShorthand ([PR #29735](https://github.com/microsoft/fluentui/pull/29735) by bernardo.sunderhus@gmail.com)
24
+ - Bump @fluentui/react-aria to v9.6.0 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
25
+ - Bump @fluentui/react-avatar to v9.6.1 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
26
+ - Bump @fluentui/react-checkbox to v9.2.3 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
27
+ - Bump @fluentui/react-context-selector to v9.1.44 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
28
+ - Bump @fluentui/react-radio to v9.1.60 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
29
+ - Bump @fluentui/react-shared-contexts to v9.13.2 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.16.0 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
31
+ - Bump @fluentui/react-utilities to v9.15.4 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
32
+ - Bump @fluentui/react-jsx-runtime to v9.0.22 ([PR #30103](https://github.com/microsoft/fluentui/pull/30103) by beachball)
33
+
7
34
  ## [9.10.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.14)
8
35
 
9
- Thu, 14 Dec 2023 09:51:37 GMT
36
+ Thu, 14 Dec 2023 09:58:46 GMT
10
37
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.10.13..@fluentui/react-table_v9.10.14)
11
38
 
12
39
  ### Patches
13
40
 
14
- - Bump @fluentui/react-aria to v9.5.0 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
15
- - Bump @fluentui/react-avatar to v9.6.0 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
16
- - Bump @fluentui/react-checkbox to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
17
- - Bump @fluentui/react-context-selector to v9.1.43 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
18
- - Bump @fluentui/react-radio to v9.1.59 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
19
- - Bump @fluentui/react-shared-contexts to v9.13.1 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
20
- - Bump @fluentui/react-tabster to v9.15.1 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
21
- - Bump @fluentui/react-utilities to v9.15.3 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
22
- - Bump @fluentui/react-jsx-runtime to v9.0.21 ([commit](https://github.com/microsoft/fluentui/commit/80a1b02be2fbbdde916ac87fbf760e442a2295c4) by beachball)
41
+ - Bump @fluentui/react-aria to v9.5.0 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
42
+ - Bump @fluentui/react-avatar to v9.6.0 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
43
+ - Bump @fluentui/react-checkbox to v9.2.2 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
44
+ - Bump @fluentui/react-context-selector to v9.1.43 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
45
+ - Bump @fluentui/react-radio to v9.1.59 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
46
+ - Bump @fluentui/react-shared-contexts to v9.13.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
47
+ - Bump @fluentui/react-tabster to v9.15.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
48
+ - Bump @fluentui/react-utilities to v9.15.3 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
49
+ - Bump @fluentui/react-jsx-runtime to v9.0.21 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
23
50
 
24
51
  ## [9.10.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.13)
25
52
 
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';
3
3
  import { useFocusWithin } from '@fluentui/react-tabster';
4
4
  import { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';
5
- import { useARIAButtonShorthand } from '@fluentui/react-aria';
5
+ import { useARIAButtonProps } from '@fluentui/react-aria';
6
6
  import { useTableContext } from '../../contexts/tableContext';
7
7
  const sortIcons = {
8
8
  ascending: /*#__PURE__*/ React.createElement(ArrowUpRegular, {
@@ -25,6 +25,16 @@ const sortIcons = {
25
25
  const { sortable = contextSortable } = props;
26
26
  var _props_as;
27
27
  const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'th';
28
+ const buttonSlot = slot.always(props.button, {
29
+ elementType: 'div',
30
+ defaultProps: {
31
+ as: 'div',
32
+ ...!sortable && {
33
+ role: 'presentation',
34
+ tabIndex: undefined
35
+ }
36
+ }
37
+ });
28
38
  var _props_sortDirection;
29
39
  return {
30
40
  components: {
@@ -54,18 +64,7 @@ const sortIcons = {
54
64
  },
55
65
  elementType: 'span'
56
66
  }),
57
- button: slot.always(useARIAButtonShorthand(props.button, {
58
- required: true,
59
- defaultProps: {
60
- as: 'div',
61
- ...!sortable && {
62
- role: 'presentation',
63
- tabIndex: undefined
64
- }
65
- }
66
- }), {
67
- elementType: 'div'
68
- }),
67
+ button: useARIAButtonProps(buttonSlot.as, buttonSlot),
69
68
  sortable,
70
69
  noNativeElements
71
70
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular fontSize={12} />,\n descending: <ArrowDownRegular fontSize={12} />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n } as const),\n { elementType: rootComponent },\n ),\n aside: slot.optional(props.aside, { elementType: 'span' }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n elementType: 'span',\n }),\n button: slot.always(\n useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n as: 'div',\n ...(!sortable && {\n role: 'presentation',\n tabIndex: undefined,\n }),\n },\n }),\n { elementType: 'div' },\n ),\n sortable,\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useARIAButtonShorthand","useTableContext","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","contextSortable","rootComponent","as","components","root","button","sortIcon","aside","always","role","undefined","sortDirection","elementType","optional","renderByDefault","defaultProps","children","required","tabIndex"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B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,CAAC,GAAGD;YAAU;YAC3FE,aAAa;QACf;QACAP,QAAQpB,KAAKuB,MAAM,CACjBnB,uBAAuBO,MAAMS,MAAM,EAAE;YACnCY,UAAU;YACVF,cAAc;gBACZb,IAAI;gBACJ,GAAI,CAACH,YAAY;oBACfU,MAAM;oBACNS,UAAUR;gBACZ,CAAC;YACH;QACF,IACA;YAAEE,aAAa;QAAM;QAEvBb;QACAD;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { ARIAButtonSlotProps, useARIAButtonProps } from '@fluentui/react-aria';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular fontSize={12} />,\n descending: <ArrowDownRegular fontSize={12} />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n\n const buttonSlot = slot.always<ARIAButtonSlotProps>(props.button, {\n elementType: 'div',\n defaultProps: {\n as: 'div',\n ...(!sortable && {\n role: 'presentation',\n tabIndex: undefined,\n }),\n },\n });\n\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n } as const),\n { elementType: rootComponent },\n ),\n aside: slot.optional(props.aside, { elementType: 'span' }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n elementType: 'span',\n }),\n button: useARIAButtonProps(buttonSlot.as, buttonSlot),\n sortable,\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useARIAButtonProps","useTableContext","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","contextSortable","rootComponent","as","buttonSlot","always","button","elementType","defaultProps","role","tabIndex","undefined","components","root","sortIcon","aside","sortDirection","optional","renderByDefault","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,wBAAwB;AACzE,SAA8BC,kBAAkB,QAAQ,uBAAuB;AAE/E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,YAAY;IAChBC,yBAAW,oBAACL;QAAeM,UAAU;;IACrCC,0BAAY,oBAACN;QAAiBK,UAAU;;AAC1C;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGV;IACxD,MAAM,EAAES,WAAWC,eAAe,EAAE,GAAGJ;QAEjBA;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,cAARN,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,MAAMK,aAAalB,KAAKmB,MAAM,CAAsBR,MAAMS,MAAM,EAAE;QAChEC,aAAa;QACbC,cAAc;YACZL,IAAI;YACJ,GAAI,CAACH,YAAY;gBACfS,MAAM;gBACNC,UAAUC;YACZ,CAAC;QACH;IACF;QAgB8Bd;IAd9B,OAAO;QACLe,YAAY;YACVC,MAAMX;YACNI,QAAQ;YACRQ,UAAU;YACVC,OAAO;QACT;QACAF,MAAM3B,KAAKmB,MAAM,CACfrB,yBAAyBkB,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKb,cAAca,KAAKX;YACxBsB,MAAMP,kBAAkB,QAAQ,iBAAiBS;YACjD,aAAaX,WAAWH,CAAAA,uBAAAA,MAAMmB,aAAa,cAAnBnB,kCAAAA,uBAAuB,SAASc;YACxD,GAAGd,KAAK;QACV,IACA;YAAEU,aAAaL;QAAc;QAE/Ba,OAAO7B,KAAK+B,QAAQ,CAACpB,MAAMkB,KAAK,EAAE;YAAER,aAAa;QAAO;QACxDO,UAAU5B,KAAK+B,QAAQ,CAACpB,MAAMiB,QAAQ,EAAE;YACtCI,iBAAiB,CAAC,CAACrB,MAAMmB,aAAa;YACtCR,cAAc;gBAAEW,UAAUtB,MAAMmB,aAAa,GAAGxB,SAAS,CAACK,MAAMmB,aAAa,CAAC,GAAGL;YAAU;YAC3FJ,aAAa;QACf;QACAD,QAAQhB,mBAAmBc,WAAWD,EAAE,EAAEC;QAC1CJ;QACAD;IACF;AACF,EAAE"}
@@ -28,6 +28,16 @@ const useTableHeaderCell_unstable = (props, ref)=>{
28
28
  const { sortable = contextSortable } = props;
29
29
  var _props_as;
30
30
  const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'th';
31
+ const buttonSlot = _reactutilities.slot.always(props.button, {
32
+ elementType: 'div',
33
+ defaultProps: {
34
+ as: 'div',
35
+ ...!sortable && {
36
+ role: 'presentation',
37
+ tabIndex: undefined
38
+ }
39
+ }
40
+ });
31
41
  var _props_sortDirection;
32
42
  return {
33
43
  components: {
@@ -57,18 +67,7 @@ const useTableHeaderCell_unstable = (props, ref)=>{
57
67
  },
58
68
  elementType: 'span'
59
69
  }),
60
- button: _reactutilities.slot.always((0, _reactaria.useARIAButtonShorthand)(props.button, {
61
- required: true,
62
- defaultProps: {
63
- as: 'div',
64
- ...!sortable && {
65
- role: 'presentation',
66
- tabIndex: undefined
67
- }
68
- }
69
- }), {
70
- elementType: 'div'
71
- }),
70
+ button: (0, _reactaria.useARIAButtonProps)(buttonSlot.as, buttonSlot),
72
71
  sortable,
73
72
  noNativeElements
74
73
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableHeaderCell.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { useTableContext } from '../../contexts/tableContext';\nconst sortIcons = {\n ascending: /*#__PURE__*/ React.createElement(ArrowUpRegular, {\n fontSize: 12\n }),\n descending: /*#__PURE__*/ React.createElement(ArrowDownRegular, {\n fontSize: 12\n })\n};\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */ export const useTableHeaderCell_unstable = (props, ref)=>{\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'th';\n var _props_sortDirection;\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span'\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()),\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? (_props_sortDirection = props.sortDirection) !== null && _props_sortDirection !== void 0 ? _props_sortDirection : 'none' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n aside: slot.optional(props.aside, {\n elementType: 'span'\n }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: {\n children: props.sortDirection ? sortIcons[props.sortDirection] : undefined\n },\n elementType: 'span'\n }),\n button: slot.always(useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n as: 'div',\n ...!sortable && {\n role: 'presentation',\n tabIndex: undefined\n }\n }\n }), {\n elementType: 'div'\n }),\n sortable,\n noNativeElements\n };\n};\n"],"names":["useTableHeaderCell_unstable","sortIcons","ascending","React","createElement","ArrowUpRegular","fontSize","descending","ArrowDownRegular","props","ref","noNativeElements","sortable","contextSortable","useTableContext","_props_as","rootComponent","as","_props_sortDirection","components","root","button","sortIcon","aside","slot","always","getIntrinsicElementProps","useMergedRefs","useFocusWithin","role","undefined","sortDirection","elementType","optional","renderByDefault","defaultProps","children","useARIAButtonShorthand","required","tabIndex"],"mappings":";;;;+BAsBiBA;;;eAAAA;;;;iEAtBM;gCACuC;8BAC/B;4BACkB;2BACV;8BACP;AAChC,MAAMC,YAAY;IACdC,WAAW,WAAW,GAAGC,OAAMC,aAAa,CAACC,0BAAc,EAAE;QACzDC,UAAU;IACd;IACAC,YAAY,WAAW,GAAGJ,OAAMC,aAAa,CAACI,4BAAgB,EAAE;QAC5DF,UAAU;IACd;AACJ;AASW,MAAMN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U,UAAUT;gBACd,CAAC;YACL;QACJ,IAAI;YACAE,aAAa;QACjB;QACApB;QACAD;IACJ;AACJ"}
1
+ {"version":3,"sources":["useTableHeaderCell.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useTableContext } from '../../contexts/tableContext';\nconst sortIcons = {\n ascending: /*#__PURE__*/ React.createElement(ArrowUpRegular, {\n fontSize: 12\n }),\n descending: /*#__PURE__*/ React.createElement(ArrowDownRegular, {\n fontSize: 12\n })\n};\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */ export const useTableHeaderCell_unstable = (props, ref)=>{\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'th';\n const buttonSlot = slot.always(props.button, {\n elementType: 'div',\n defaultProps: {\n as: 'div',\n ...!sortable && {\n role: 'presentation',\n tabIndex: undefined\n }\n }\n });\n var _props_sortDirection;\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span'\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()),\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? (_props_sortDirection = props.sortDirection) !== null && _props_sortDirection !== void 0 ? _props_sortDirection : 'none' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n aside: slot.optional(props.aside, {\n elementType: 'span'\n }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: {\n children: props.sortDirection ? sortIcons[props.sortDirection] : undefined\n },\n elementType: 'span'\n }),\n button: useARIAButtonProps(buttonSlot.as, buttonSlot),\n sortable,\n noNativeElements\n };\n};\n"],"names":["useTableHeaderCell_unstable","sortIcons","ascending","React","createElement","ArrowUpRegular","fontSize","descending","ArrowDownRegular","props","ref","noNativeElements","sortable","contextSortable","useTableContext","_props_as","rootComponent","as","buttonSlot","slot","always","button","elementType","defaultProps","role","tabIndex","undefined","_props_sortDirection","components","root","sortIcon","aside","getIntrinsicElementProps","useMergedRefs","useFocusWithin","sortDirection","optional","renderByDefault","children","useARIAButtonProps"],"mappings":";;;;+BAsBiBA;;;eAAAA;;;;iEAtBM;gCACuC;8BAC/B;4BACkB;2BACd;8BACH;AAChC,MAAMC,YAAY;IACdC,WAAW,WAAW,GAAGC,OAAMC,aAAa,CAACC,0BAAc,EAAE;QACzDC,UAAU;IACd;IACAC,YAAY,WAAW,GAAGJ,OAAMC,aAAa,CAACI,4BAAgB,EAAE;QAC5DF,UAAU;IACd;AACJ;AASW,MAAMN,8BAA8B,CAACS,OAAOC;IACnD,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGC,IAAAA,6BAAe;IACvE,MAAM,EAAEF,WAAWC,eAAe,EAAE,GAAGJ;IACvC,IAAIM;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYN,MAAMQ,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYJ,gBAAe,IAAK,QAAQ;IACzH,MAAMO,aAAaC,oBAAI,CAACC,MAAM,CAACX,MAAMY,MAAM,EAAE;QACzCC,aAAa;QACbC,cAAc;YACVN,IAAI;YACJ,GAAG,CAACL,YAAY;gBACZY,MAAM;gBACNC,UAAUC;YACd,CAAC;QACL;IACJ;IACA,IAAIC;IACJ,OAAO;QACHC,YAAY;YACRC,MAAMb;YACNK,QAAQ;YACRS,UAAU;YACVC,OAAO;QACX;QACAF,MAAMV,oBAAI,CAACC,MAAM,CAACY,IAAAA,wCAAwB,EAAChB,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FN,KAAKuB,IAAAA,6BAAa,EAACvB,KAAKwB,IAAAA,4BAAc;YACtCV,MAAMR,kBAAkB,QAAQ,iBAAiBU;YACjD,aAAad,WAAW,AAACe,CAAAA,uBAAuBlB,MAAM0B,aAAa,AAAD,MAAO,QAAQR,yBAAyB,KAAK,IAAIA,uBAAuB,SAASD;YACnJ,GAAGjB,KAAK;QACZ,IAAI;YACAa,aAAaN;QACjB;QACAe,OAAOZ,oBAAI,CAACiB,QAAQ,CAAC3B,MAAMsB,KAAK,EAAE;YAC9BT,aAAa;QACjB;QACAQ,UAAUX,oBAAI,CAACiB,QAAQ,CAAC3B,MAAMqB,QAAQ,EAAE;YACpCO,iBAAiB,CAAC,CAAC5B,MAAM0B,aAAa;YACtCZ,cAAc;gBACVe,UAAU7B,MAAM0B,aAAa,GAAGlC,SAAS,CAACQ,MAAM0B,aAAa,CAAC,GAAGT;YACrE;YACAJ,aAAa;QACjB;QACAD,QAAQkB,IAAAA,6BAAkB,EAACrB,WAAWD,EAAE,EAAEC;QAC1CN;QACAD;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-table",
3
- "version": "9.10.14",
3
+ "version": "9.10.16",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -36,17 +36,17 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@fluentui/keyboard-keys": "^9.0.7",
39
- "@fluentui/react-aria": "^9.5.0",
40
- "@fluentui/react-avatar": "^9.6.0",
41
- "@fluentui/react-checkbox": "^9.2.2",
42
- "@fluentui/react-context-selector": "^9.1.43",
39
+ "@fluentui/react-aria": "^9.6.0",
40
+ "@fluentui/react-avatar": "^9.6.2",
41
+ "@fluentui/react-checkbox": "^9.2.3",
42
+ "@fluentui/react-context-selector": "^9.1.44",
43
43
  "@fluentui/react-icons": "^2.0.217",
44
- "@fluentui/react-radio": "^9.1.59",
45
- "@fluentui/react-shared-contexts": "^9.13.1",
46
- "@fluentui/react-tabster": "^9.15.1",
44
+ "@fluentui/react-radio": "^9.1.60",
45
+ "@fluentui/react-shared-contexts": "^9.13.2",
46
+ "@fluentui/react-tabster": "^9.16.0",
47
47
  "@fluentui/react-theme": "^9.1.16",
48
- "@fluentui/react-utilities": "^9.15.3",
49
- "@fluentui/react-jsx-runtime": "^9.0.21",
48
+ "@fluentui/react-utilities": "^9.15.4",
49
+ "@fluentui/react-jsx-runtime": "^9.0.22",
50
50
  "@griffel/react": "^1.5.14",
51
51
  "@swc/helpers": "^0.5.1"
52
52
  },