@fluentui/react-utilities 9.1.2 → 9.2.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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@fluentui/react-utilities",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 20 Oct 2022 08:35:33 GMT",
5
+ "date": "Wed, 02 Nov 2022 11:55:07 GMT",
6
+ "tag": "@fluentui/react-utilities_v9.2.0",
7
+ "version": "9.2.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-utilities",
13
+ "commit": "ee9ca8f32362b41776a26e4eea182b39f378b6ee",
14
+ "comment": "feat: exposes internal methods that are used in the API surface"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 25 Oct 2022 00:35:39 GMT",
21
+ "tag": "@fluentui/react-utilities_v9.1.2",
22
+ "version": "9.1.2",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "miroslav.stastny@microsoft.com",
27
+ "package": "@fluentui/react-utilities",
28
+ "commit": "6ced976a8d0e6a0e2e207da8fe0eb810e2bd19bc",
29
+ "comment": "Update package readme"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Thu, 20 Oct 2022 08:39:56 GMT",
6
36
  "tag": "@fluentui/react-utilities_v9.1.2",
7
37
  "version": "9.1.2",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-utilities
2
2
 
3
- This log was last generated on Thu, 20 Oct 2022 08:35:33 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 02 Nov 2022 11:55:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.2.0)
8
+
9
+ Wed, 02 Nov 2022 11:55:07 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.1.2..@fluentui/react-utilities_v9.2.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: exposes internal methods that are used in the API surface ([PR #25406](https://github.com/microsoft/fluentui/pull/25406) by bernardo.sunderhus@gmail.com)
15
+
7
16
  ## [9.1.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.1.2)
8
17
 
9
- Thu, 20 Oct 2022 08:35:33 GMT
18
+ Thu, 20 Oct 2022 08:39:56 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.1.1..@fluentui/react-utilities_v9.1.2)
11
20
 
12
21
  ### Patches
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
1
  # @fluentui/react-utilities
2
2
 
3
3
  **React Utilities for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui) components**
4
-
5
- These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
package/dist/index.d.ts CHANGED
@@ -285,7 +285,6 @@ declare type ObscureEventName = 'onLostPointerCaptureCapture';
285
285
  declare type PropsWithoutRef<P> = 'ref' extends keyof P ? (P extends unknown ? Omit<P, 'ref'> : P) : P;
286
286
 
287
287
  /**
288
- * @internal
289
288
  * A Ref function which can be treated like a ref object in that it has an attached
290
289
  * current property, which will be updated as the ref is evaluated.
291
290
  */
@@ -392,7 +391,6 @@ export declare type SlotShorthandValue = React_2.ReactChild | React_2.ReactNode[
392
391
  export declare const SSRProvider: React_2.FC;
393
392
 
394
393
  /**
395
- * @internal
396
394
  * A trigger may have a children that could be either:
397
395
  * 1. A single element
398
396
  * 2. A render function that will receive properties and must return a valid element or null
@@ -499,7 +497,6 @@ export declare function useForceUpdate(): DispatchWithoutAction;
499
497
  export declare function useId(prefix?: string, providedId?: string): string;
500
498
 
501
499
  /**
502
- * @internal
503
500
  * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally
504
501
  * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to
505
502
  * ensure we don't get a render flash for certain operations, but we may also need affected components to render on
@@ -517,7 +514,6 @@ export declare const useIsomorphicLayoutEffect: typeof React_2.useEffect;
517
514
  export declare function useIsSSR(): boolean;
518
515
 
519
516
  /**
520
- * @internal
521
517
  * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that
522
518
  * updates all provided refs
523
519
  * @param refs - Refs to collectively update with one ref value.
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { canUseDOM } from '../ssr/index';
3
3
  /**
4
- * @internal
5
4
  * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally
6
5
  * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to
7
6
  * ensure we don't get a render flash for certain operations, but we may also need affected components to render on
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,SAAT,QAA0B,cAA1B;AAEA;;;;;;;;;AASG;AACH;;AACA,OAAO,MAAM,yBAAyB,GAA2B,aAAA,SAAS,KAAK,KAAK,CAAC,eAAX,GAA6B,KAAK,CAAC,SAAtG","sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '../ssr/index';\n\n/**\n * @internal\n * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally\n * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also need affected components to render on\n * the server.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n */\n// eslint-disable-next-line no-restricted-properties\nexport const useIsomorphicLayoutEffect: typeof React.useEffect = canUseDOM() ? React.useLayoutEffect : React.useEffect;\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,SAAT,QAA0B,cAA1B;AAEA;;;;;;;;AAQG;AACH;;AACA,OAAO,MAAM,yBAAyB,GAA2B,aAAA,SAAS,KAAK,KAAK,CAAC,eAAX,GAA6B,KAAK,CAAC,SAAtG","sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '../ssr/index';\n\n/**\n * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally\n * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also need affected components to render on\n * the server.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n */\n// eslint-disable-next-line no-restricted-properties\nexport const useIsomorphicLayoutEffect: typeof React.useEffect = canUseDOM() ? React.useLayoutEffect : React.useEffect;\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  /**
3
- * @internal
4
3
  * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that
5
4
  * updates all provided refs
6
5
  * @param refs - Refs to collectively update with one ref value.
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks/useMergedRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AASA;;;;;;AAMG;;AACH,OAAM,SAAU,aAAV,CAA2B,GAAG,IAA9B,EAAgE;EACpE,MAAM,cAAc,GAA0B,KAAK,CAAC,WAAN,CAC3C,KAAD,IAAa;IACX;IACE,cAAwD,CAAC,OAAzD,GAAmE,KAAnE;;IAEF,KAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;MACtB,IAAI,OAAO,GAAP,KAAe,UAAnB,EAA+B;QAC7B,GAAG,CAAC,KAAD,CAAH;MACD,CAFD,MAEO,IAAI,GAAJ,EAAS;QACd;QACE,GAA6C,CAAC,OAA9C,GAAwD,KAAxD;MACH;IACF;EACF,CAb2C,EAc5C;EACA,CAAC,GAAG,IAAJ,CAf4C,CAA9C;EAkBA,OAAO,cAAP;AACD","sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * A Ref function which can be treated like a ref object in that it has an attached\n * current property, which will be updated as the ref is evaluated.\n */\nexport type RefObjectFunction<T> = React.RefObject<T> & ((value: T) => void);\n\n/**\n * @internal\n * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that\n * updates all provided refs\n * @param refs - Refs to collectively update with one ref value.\n * @returns A function with an attached \"current\" prop, so that it can be treated like a RefObject.\n */\nexport function useMergedRefs<T>(...refs: (React.Ref<T> | undefined)[]): RefObjectFunction<T> {\n const mergedCallback: RefObjectFunction<T> = (React.useCallback(\n (value: T) => {\n // Update the \"current\" prop hanging on the function.\n ((mergedCallback as unknown) as React.MutableRefObject<T>).current = value;\n\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n // work around the immutability of the React.Ref type\n ((ref as unknown) as React.MutableRefObject<T>).current = value;\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- already exhaustive\n [...refs],\n ) as unknown) as RefObjectFunction<T>;\n\n return mergedCallback;\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["hooks/useMergedRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAQA;;;;;AAKG;;AACH,OAAM,SAAU,aAAV,CAA2B,GAAG,IAA9B,EAAgE;EACpE,MAAM,cAAc,GAA0B,KAAK,CAAC,WAAN,CAC3C,KAAD,IAAa;IACX;IACE,cAAwD,CAAC,OAAzD,GAAmE,KAAnE;;IAEF,KAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;MACtB,IAAI,OAAO,GAAP,KAAe,UAAnB,EAA+B;QAC7B,GAAG,CAAC,KAAD,CAAH;MACD,CAFD,MAEO,IAAI,GAAJ,EAAS;QACd;QACE,GAA6C,CAAC,OAA9C,GAAwD,KAAxD;MACH;IACF;EACF,CAb2C,EAc5C;EACA,CAAC,GAAG,IAAJ,CAf4C,CAA9C;EAkBA,OAAO,cAAP;AACD","sourcesContent":["import * as React from 'react';\n\n/**\n * A Ref function which can be treated like a ref object in that it has an attached\n * current property, which will be updated as the ref is evaluated.\n */\nexport type RefObjectFunction<T> = React.RefObject<T> & ((value: T) => void);\n\n/**\n * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that\n * updates all provided refs\n * @param refs - Refs to collectively update with one ref value.\n * @returns A function with an attached \"current\" prop, so that it can be treated like a RefObject.\n */\nexport function useMergedRefs<T>(...refs: (React.Ref<T> | undefined)[]): RefObjectFunction<T> {\n const mergedCallback: RefObjectFunction<T> = (React.useCallback(\n (value: T) => {\n // Update the \"current\" prop hanging on the function.\n ((mergedCallback as unknown) as React.MutableRefObject<T>).current = value;\n\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n // work around the immutability of the React.Ref type\n ((ref as unknown) as React.MutableRefObject<T>).current = value;\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- already exhaustive\n [...refs],\n ) as unknown) as RefObjectFunction<T>;\n\n return mergedCallback;\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"../src/","sources":["trigger/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * Allows a component to be tagged as a FluentUI trigger component.\n *\n * Triggers are special-case components: they attach event listeners and other props on their child,\n * and use them to trigger another component to show. Examples include `MenuTrigger` and `Tooltip`.\n *\n * A component can be tagged as a trigger as follows:\n * ```ts\n * const MyComponent: React.FC<MyComponentProps> & FluentTriggerComponent = ...;\n *\n * MyComponent.isFluentTriggerComponent = true; // MUST also set this to true\n * ```\n */\nexport type FluentTriggerComponent = {\n isFluentTriggerComponent?: boolean;\n};\n\n/**\n * @internal\n * A trigger may have a children that could be either:\n * 1. A single element\n * 2. A render function that will receive properties and must return a valid element or null\n * 3. null or undefined\n */\nexport type TriggerProps<TriggerChildProps = unknown> = {\n children?: React.ReactElement | ((props: TriggerChildProps) => React.ReactElement | null) | null;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"../src/","sources":["trigger/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * Allows a component to be tagged as a FluentUI trigger component.\n *\n * Triggers are special-case components: they attach event listeners and other props on their child,\n * and use them to trigger another component to show. Examples include `MenuTrigger` and `Tooltip`.\n *\n * A component can be tagged as a trigger as follows:\n * ```ts\n * const MyComponent: React.FC<MyComponentProps> & FluentTriggerComponent = ...;\n *\n * MyComponent.isFluentTriggerComponent = true; // MUST also set this to true\n * ```\n */\nexport type FluentTriggerComponent = {\n isFluentTriggerComponent?: boolean;\n};\n\n/**\n * A trigger may have a children that could be either:\n * 1. A single element\n * 2. A render function that will receive properties and must return a valid element or null\n * 3. null or undefined\n */\nexport type TriggerProps<TriggerChildProps = unknown> = {\n children?: React.ReactElement | ((props: TriggerChildProps) => React.ReactElement | null) | null;\n};\n"]}
@@ -9,7 +9,6 @@ const React = /*#__PURE__*/require("react");
9
9
 
10
10
  const index_1 = /*#__PURE__*/require("../ssr/index");
11
11
  /**
12
- * @internal
13
12
  * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally
14
13
  * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to
15
14
  * ensure we don't get a render flash for certain operations, but we may also need affected components to render on
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAEA;;;;;;;;;AASG;AACH;;;AACa,OAAA,CAAA,yBAAA,GAAoD,aAAA,OAAA,CAAA,SAAA,KAAc,KAAK,CAAC,eAApB,GAAsC,KAAK,CAAC,SAAhG","sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '../ssr/index';\n\n/**\n * @internal\n * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally\n * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also need affected components to render on\n * the server.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n */\n// eslint-disable-next-line no-restricted-properties\nexport const useIsomorphicLayoutEffect: typeof React.useEffect = canUseDOM() ? React.useLayoutEffect : React.useEffect;\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAEA;;;;;;;;AAQG;AACH;;;AACa,OAAA,CAAA,yBAAA,GAAoD,aAAA,OAAA,CAAA,SAAA,KAAc,KAAK,CAAC,eAApB,GAAsC,KAAK,CAAC,SAAhG","sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '../ssr/index';\n\n/**\n * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally\n * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also need affected components to render on\n * the server.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n */\n// eslint-disable-next-line no-restricted-properties\nexport const useIsomorphicLayoutEffect: typeof React.useEffect = canUseDOM() ? React.useLayoutEffect : React.useEffect;\n"],"sourceRoot":"../src/"}
@@ -7,7 +7,6 @@ exports.useMergedRefs = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
  /**
10
- * @internal
11
10
  * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that
12
11
  * updates all provided refs
13
12
  * @param refs - Refs to collectively update with one ref value.
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks/useMergedRefs.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AASA;;;;;;AAMG;;;AACH,SAAgB,aAAhB,CAAiC,GAAG,IAApC,EAAsE;EACpE,MAAM,cAAc,GAA0B,KAAK,CAAC,WAAN,CAC3C,KAAD,IAAa;IACX;IACE,cAAwD,CAAC,OAAzD,GAAmE,KAAnE;;IAEF,KAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;MACtB,IAAI,OAAO,GAAP,KAAe,UAAnB,EAA+B;QAC7B,GAAG,CAAC,KAAD,CAAH;MACD,CAFD,MAEO,IAAI,GAAJ,EAAS;QACd;QACE,GAA6C,CAAC,OAA9C,GAAwD,KAAxD;MACH;IACF;EACF,CAb2C,EAc5C;EACA,CAAC,GAAG,IAAJ,CAf4C,CAA9C;EAkBA,OAAO,cAAP;AACD;;AApBD,OAAA,CAAA,aAAA,GAAA,aAAA","sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * A Ref function which can be treated like a ref object in that it has an attached\n * current property, which will be updated as the ref is evaluated.\n */\nexport type RefObjectFunction<T> = React.RefObject<T> & ((value: T) => void);\n\n/**\n * @internal\n * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that\n * updates all provided refs\n * @param refs - Refs to collectively update with one ref value.\n * @returns A function with an attached \"current\" prop, so that it can be treated like a RefObject.\n */\nexport function useMergedRefs<T>(...refs: (React.Ref<T> | undefined)[]): RefObjectFunction<T> {\n const mergedCallback: RefObjectFunction<T> = (React.useCallback(\n (value: T) => {\n // Update the \"current\" prop hanging on the function.\n ((mergedCallback as unknown) as React.MutableRefObject<T>).current = value;\n\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n // work around the immutability of the React.Ref type\n ((ref as unknown) as React.MutableRefObject<T>).current = value;\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- already exhaustive\n [...refs],\n ) as unknown) as RefObjectFunction<T>;\n\n return mergedCallback;\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["hooks/useMergedRefs.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAQA;;;;;AAKG;;;AACH,SAAgB,aAAhB,CAAiC,GAAG,IAApC,EAAsE;EACpE,MAAM,cAAc,GAA0B,KAAK,CAAC,WAAN,CAC3C,KAAD,IAAa;IACX;IACE,cAAwD,CAAC,OAAzD,GAAmE,KAAnE;;IAEF,KAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;MACtB,IAAI,OAAO,GAAP,KAAe,UAAnB,EAA+B;QAC7B,GAAG,CAAC,KAAD,CAAH;MACD,CAFD,MAEO,IAAI,GAAJ,EAAS;QACd;QACE,GAA6C,CAAC,OAA9C,GAAwD,KAAxD;MACH;IACF;EACF,CAb2C,EAc5C;EACA,CAAC,GAAG,IAAJ,CAf4C,CAA9C;EAkBA,OAAO,cAAP;AACD;;AApBD,OAAA,CAAA,aAAA,GAAA,aAAA","sourcesContent":["import * as React from 'react';\n\n/**\n * A Ref function which can be treated like a ref object in that it has an attached\n * current property, which will be updated as the ref is evaluated.\n */\nexport type RefObjectFunction<T> = React.RefObject<T> & ((value: T) => void);\n\n/**\n * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that\n * updates all provided refs\n * @param refs - Refs to collectively update with one ref value.\n * @returns A function with an attached \"current\" prop, so that it can be treated like a RefObject.\n */\nexport function useMergedRefs<T>(...refs: (React.Ref<T> | undefined)[]): RefObjectFunction<T> {\n const mergedCallback: RefObjectFunction<T> = (React.useCallback(\n (value: T) => {\n // Update the \"current\" prop hanging on the function.\n ((mergedCallback as unknown) as React.MutableRefObject<T>).current = value;\n\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n // work around the immutability of the React.Ref type\n ((ref as unknown) as React.MutableRefObject<T>).current = value;\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- already exhaustive\n [...refs],\n ) as unknown) as RefObjectFunction<T>;\n\n return mergedCallback;\n}\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-utilities",
3
- "version": "9.1.2",
3
+ "version": "9.2.0",
4
4
  "description": "A set of general React-specific utilities.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",