@fluentui/react-tabster 9.22.0 → 9.22.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,12 +1,22 @@
1
1
  # Change Log - @fluentui/react-tabster
2
2
 
3
- This log was last generated on Mon, 17 Jun 2024 07:31:07 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 01 Jul 2024 20:25:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.22.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.22.1)
8
+
9
+ Mon, 01 Jul 2024 20:25:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.22.0..@fluentui/react-tabster_v9.22.1)
11
+
12
+ ### Patches
13
+
14
+ - chore: add eslint react-compiler ([PR #31457](https://github.com/microsoft/fluentui/pull/31457) by seanmonahan@microsoft.com)
15
+ - Bump @fluentui/react-utilities to v9.18.11 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
16
+
7
17
  ## [9.22.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.22.0)
8
18
 
9
- Mon, 17 Jun 2024 07:31:07 GMT
19
+ Mon, 17 Jun 2024 07:34:17 GMT
10
20
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.21.5..@fluentui/react-tabster_v9.22.0)
11
21
 
12
22
  ### Minor changes
package/dist/index.d.ts CHANGED
@@ -1470,16 +1470,15 @@ export declare const useModalAttributes: (options?: UseModalAttributesOptions) =
1470
1470
  export declare interface UseModalAttributesOptions {
1471
1471
  /**
1472
1472
  * Traps focus inside the elements the attributes are applied.
1473
- * Prefer this to `legacyTrapFocus`
1474
1473
  * it forbids users to tab out of the focus trap into the actual browser.
1475
1474
  */
1476
1475
  trapFocus?: boolean;
1477
1476
  /**
1478
1477
  * Traps focus inside the elements the attributes are applied.
1479
- * This prop enables legacy behavior to match previous versions of Fluent and is not
1480
- * recommended for general use.
1481
- * Enabling `legacyTrapFocus` prevents users from tabbing out of the focus trap and into
1482
- * the actual browser. Prefer using `trapFocus` instead of this prop.
1478
+ * This prop enables traditional force-focus behavior to match previous versions of Fluent.
1479
+ * Without this, users can tab out of the focus trap and into the browser chrome.
1480
+ * This matches the behavior of the native <dialog> element and inert.
1481
+ * We recommend setting this to true based on user feedback and consistency.
1483
1482
  */
1484
1483
  legacyTrapFocus?: boolean;
1485
1484
  /**
@@ -8,6 +8,7 @@ import { TABSTER_ATTRIBUTE_NAME } from 'tabster';
8
8
  * @param attributes - collection of tabster attributes from other react-tabster hooks
9
9
  * @returns single merged tabster attribute
10
10
  */ export const useMergedTabsterAttributes_unstable = (...attributes)=>{
11
+ 'use no memo';
11
12
  const stringAttributes = attributes.map((attribute)=>attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean);
12
13
  return React.useMemo(()=>{
13
14
  let attribute = stringAttributes[0];
@@ -1 +1 @@
1
- {"version":3,"sources":["useMergeTabsterAttributes.ts"],"sourcesContent":["import * as React from 'react';\nimport { Types, TABSTER_ATTRIBUTE_NAME } from 'tabster';\n\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */\nexport const useMergedTabsterAttributes_unstable: (\n ...attributes: Types.TabsterDOMAttribute[]\n) => Types.TabsterDOMAttribute = (...attributes) => {\n const stringAttributes = attributes.map(attribute => attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean) as string[];\n\n return React.useMemo(() => {\n let attribute = stringAttributes[0];\n attributes.shift();\n\n for (const attr of stringAttributes) {\n attribute = mergeAttributes(attribute, attr);\n }\n\n return { [TABSTER_ATTRIBUTE_NAME]: attribute };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\n\nfunction mergeAttributes(a: string, b?: string): string {\n if (!b) {\n return a;\n }\n\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n return JSON.stringify({ ...aParsed, ...bParsed });\n}\n"],"names":["React","TABSTER_ATTRIBUTE_NAME","useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","filter","Boolean","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAAgBC,sBAAsB,QAAQ,UAAU;AAExD;;;;;;;CAOC,GACD,OAAO,MAAMC,sCAEoB,CAAC,GAAGC;IACnC,MAAMC,mBAAmBD,WAAWE,GAAG,CAACC,CAAAA,YAAaA,SAAS,CAACL,uBAAuB,EAAEM,MAAM,CAACC;IAE/F,OAAOR,MAAMS,OAAO,CAAC;QACnB,IAAIH,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWO,KAAK;QAEhB,KAAK,MAAMC,QAAQP,iBAAkB;YACnCE,YAAYM,gBAAgBN,WAAWK;QACzC;QAEA,OAAO;YAAE,CAACV,uBAAuB,EAAEK;QAAU;IAC7C,uDAAuD;IACzD,GAAGF;AACL,EAAE;AAEF,SAASQ,gBAAgBC,CAAS,EAAEC,CAAU;IAC5C,IAAI,CAACA,GAAG;QACN,OAAOD;IACT;IAEA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACL,IAAI;YACFE,UAAUE,KAAKC,KAAK,CAACL;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,IAAIC,GAAG;QACL,IAAI;YACFE,UAAUC,KAAKC,KAAK,CAACJ;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,OAAOG,KAAKE,SAAS,CAAC;QAAE,GAAGJ,OAAO;QAAE,GAAGC,OAAO;IAAC;AACjD"}
1
+ {"version":3,"sources":["useMergeTabsterAttributes.ts"],"sourcesContent":["import * as React from 'react';\nimport { Types, TABSTER_ATTRIBUTE_NAME } from 'tabster';\n\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */\nexport const useMergedTabsterAttributes_unstable: (\n ...attributes: Types.TabsterDOMAttribute[]\n) => Types.TabsterDOMAttribute = (...attributes) => {\n 'use no memo';\n\n const stringAttributes = attributes.map(attribute => attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean) as string[];\n\n return React.useMemo(() => {\n let attribute = stringAttributes[0];\n attributes.shift();\n\n for (const attr of stringAttributes) {\n attribute = mergeAttributes(attribute, attr);\n }\n\n return { [TABSTER_ATTRIBUTE_NAME]: attribute };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\n\nfunction mergeAttributes(a: string, b?: string): string {\n if (!b) {\n return a;\n }\n\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n return JSON.stringify({ ...aParsed, ...bParsed });\n}\n"],"names":["React","TABSTER_ATTRIBUTE_NAME","useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","filter","Boolean","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAAgBC,sBAAsB,QAAQ,UAAU;AAExD;;;;;;;CAOC,GACD,OAAO,MAAMC,sCAEoB,CAAC,GAAGC;IACnC;IAEA,MAAMC,mBAAmBD,WAAWE,GAAG,CAACC,CAAAA,YAAaA,SAAS,CAACL,uBAAuB,EAAEM,MAAM,CAACC;IAE/F,OAAOR,MAAMS,OAAO,CAAC;QACnB,IAAIH,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWO,KAAK;QAEhB,KAAK,MAAMC,QAAQP,iBAAkB;YACnCE,YAAYM,gBAAgBN,WAAWK;QACzC;QAEA,OAAO;YAAE,CAACV,uBAAuB,EAAEK;QAAU;IAC7C,uDAAuD;IACzD,GAAGF;AACL,EAAE;AAEF,SAASQ,gBAAgBC,CAAS,EAAEC,CAAU;IAC5C,IAAI,CAACA,GAAG;QACN,OAAOD;IACT;IAEA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACL,IAAI;YACFE,UAAUE,KAAKC,KAAK,CAACL;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,IAAIC,GAAG;QACL,IAAI;YACFE,UAAUC,KAAKC,KAAK,CAACJ;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,OAAOG,KAAKE,SAAS,CAAC;QAAE,GAAGJ,OAAO;QAAE,GAAGC,OAAO;IAAC;AACjD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useModalAttributes.ts"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getModalizer, getRestorer, Types as TabsterTypes, RestorerTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\nexport interface UseModalAttributesOptions {\n /**\n * Traps focus inside the elements the attributes are applied.\n * Prefer this to `legacyTrapFocus`\n * it forbids users to tab out of the focus trap into the actual browser.\n */\n trapFocus?: boolean;\n\n /**\n * Traps focus inside the elements the attributes are applied.\n * This prop enables legacy behavior to match previous versions of Fluent and is not\n * recommended for general use.\n * Enabling `legacyTrapFocus` prevents users from tabbing out of the focus trap and into\n * the actual browser. Prefer using `trapFocus` instead of this prop.\n */\n legacyTrapFocus?: boolean;\n\n /**\n * Always reachabled in Tab order\n */\n alwaysFocusable?: boolean;\n\n /**\n * Id to use for the modalizer. An id will be generated if not provided.\n */\n id?: string;\n}\n\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */\nexport const useModalAttributes = (\n options: UseModalAttributesOptions = {},\n): { modalAttributes: TabsterTypes.TabsterDOMAttribute; triggerAttributes: TabsterTypes.TabsterDOMAttribute } => {\n const { trapFocus, alwaysFocusable, legacyTrapFocus } = options;\n const tabster = useTabster();\n // Initializes the modalizer and restorer APIs\n if (tabster) {\n getModalizer(tabster);\n getRestorer(tabster);\n }\n\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n restorer: { type: RestorerTypes.Source },\n ...(trapFocus && {\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus,\n },\n }),\n });\n\n const triggerAttributes = useTabsterAttributes({\n restorer: { type: RestorerTypes.Target },\n });\n\n return { modalAttributes, triggerAttributes };\n};\n"],"names":["useId","useTabsterAttributes","getModalizer","getRestorer","RestorerTypes","useTabster","useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","id","modalAttributes","restorer","type","Source","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","Target"],"mappings":"AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAClD,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,YAAY,EAAEC,WAAW,EAAyBC,aAAa,QAAQ,UAAU;AAC1F,SAASC,UAAU,QAAQ,eAAe;AA8B1C;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGH;IACxD,MAAMI,UAAUN;IAChB,8CAA8C;IAC9C,IAAIM,SAAS;QACXT,aAAaS;QACbR,YAAYQ;IACd;IAEA,MAAMC,KAAKZ,MAAM,UAAUO,QAAQK,EAAE;IACrC,MAAMC,kBAAkBZ,qBAAqB;QAC3Ca,UAAU;YAAEC,MAAMX,cAAcY,MAAM;QAAC;QACvC,GAAIR,aAAa;YACfS,WAAW;gBACTL;gBACAM,oBAAoB,CAACV;gBACrBW,oBAAoBV;gBACpBW,WAAWV,mBAAmBF;YAChC;QACF,CAAC;IACH;IAEA,MAAMa,oBAAoBpB,qBAAqB;QAC7Ca,UAAU;YAAEC,MAAMX,cAAckB,MAAM;QAAC;IACzC;IAEA,OAAO;QAAET;QAAiBQ;IAAkB;AAC9C,EAAE"}
1
+ {"version":3,"sources":["useModalAttributes.ts"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getModalizer, getRestorer, Types as TabsterTypes, RestorerTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\nexport interface UseModalAttributesOptions {\n /**\n * Traps focus inside the elements the attributes are applied.\n * it forbids users to tab out of the focus trap into the actual browser.\n */\n trapFocus?: boolean;\n\n /**\n * Traps focus inside the elements the attributes are applied.\n * This prop enables traditional force-focus behavior to match previous versions of Fluent.\n * Without this, users can tab out of the focus trap and into the browser chrome.\n * This matches the behavior of the native <dialog> element and inert.\n * We recommend setting this to true based on user feedback and consistency.\n */\n legacyTrapFocus?: boolean;\n\n /**\n * Always reachabled in Tab order\n */\n alwaysFocusable?: boolean;\n\n /**\n * Id to use for the modalizer. An id will be generated if not provided.\n */\n id?: string;\n}\n\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */\nexport const useModalAttributes = (\n options: UseModalAttributesOptions = {},\n): { modalAttributes: TabsterTypes.TabsterDOMAttribute; triggerAttributes: TabsterTypes.TabsterDOMAttribute } => {\n const { trapFocus, alwaysFocusable, legacyTrapFocus } = options;\n const tabster = useTabster();\n // Initializes the modalizer and restorer APIs\n if (tabster) {\n getModalizer(tabster);\n getRestorer(tabster);\n }\n\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n restorer: { type: RestorerTypes.Source },\n ...(trapFocus && {\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus,\n },\n }),\n });\n\n const triggerAttributes = useTabsterAttributes({\n restorer: { type: RestorerTypes.Target },\n });\n\n return { modalAttributes, triggerAttributes };\n};\n"],"names":["useId","useTabsterAttributes","getModalizer","getRestorer","RestorerTypes","useTabster","useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","id","modalAttributes","restorer","type","Source","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","Target"],"mappings":"AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAClD,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,YAAY,EAAEC,WAAW,EAAyBC,aAAa,QAAQ,UAAU;AAC1F,SAASC,UAAU,QAAQ,eAAe;AA6B1C;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGH;IACxD,MAAMI,UAAUN;IAChB,8CAA8C;IAC9C,IAAIM,SAAS;QACXT,aAAaS;QACbR,YAAYQ;IACd;IAEA,MAAMC,KAAKZ,MAAM,UAAUO,QAAQK,EAAE;IACrC,MAAMC,kBAAkBZ,qBAAqB;QAC3Ca,UAAU;YAAEC,MAAMX,cAAcY,MAAM;QAAC;QACvC,GAAIR,aAAa;YACfS,WAAW;gBACTL;gBACAM,oBAAoB,CAACV;gBACrBW,oBAAoBV;gBACpBW,WAAWV,mBAAmBF;YAChC;QACF,CAAC;IACH;IAEA,MAAMa,oBAAoBpB,qBAAqB;QAC7Ca,UAAU;YAAEC,MAAMX,cAAckB,MAAM;QAAC;IACzC;IAEA,OAAO;QAAET;QAAiBQ;IAAkB;AAC9C,EAAE"}
@@ -12,6 +12,7 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _tabster = require("tabster");
14
14
  const useMergedTabsterAttributes_unstable = (...attributes)=>{
15
+ 'use no memo';
15
16
  const stringAttributes = attributes.map((attribute)=>attribute[_tabster.TABSTER_ATTRIBUTE_NAME]).filter(Boolean);
16
17
  return _react.useMemo(()=>{
17
18
  let attribute = stringAttributes[0];
@@ -1 +1 @@
1
- {"version":3,"sources":["useMergeTabsterAttributes.js"],"sourcesContent":["import * as React from 'react';\nimport { TABSTER_ATTRIBUTE_NAME } from 'tabster';\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */ export const useMergedTabsterAttributes_unstable = (...attributes)=>{\n const stringAttributes = attributes.map((attribute)=>attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean);\n return React.useMemo(()=>{\n let attribute = stringAttributes[0];\n attributes.shift();\n for (const attr of stringAttributes){\n attribute = mergeAttributes(attribute, attr);\n }\n return {\n [TABSTER_ATTRIBUTE_NAME]: attribute\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\nfunction mergeAttributes(a, b) {\n if (!b) {\n return a;\n }\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n return JSON.stringify({\n ...aParsed,\n ...bParsed\n });\n}\n"],"names":["useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","TABSTER_ATTRIBUTE_NAME","filter","Boolean","React","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;yBACgB;AAQ5B,MAAMA,sCAAsC,CAAC,GAAGC;IACvD,MAAMC,mBAAmBD,WAAWE,GAAG,CAAC,CAACC,YAAYA,SAAS,CAACC,+BAAsB,CAAC,EAAEC,MAAM,CAACC;IAC/F,OAAOC,OAAMC,OAAO,CAAC;QACjB,IAAIL,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWS,KAAK;QAChB,KAAK,MAAMC,QAAQT,iBAAiB;YAChCE,YAAYQ,gBAAgBR,WAAWO;QAC3C;QACA,OAAO;YACH,CAACN,+BAAsB,CAAC,EAAED;QAC9B;IACJ,uDAAuD;IACvD,GAAGF;AACP;AACA,SAASU,gBAAgBC,CAAC,EAAEC,CAAC;IACzB,IAAI,CAACA,GAAG;QACJ,OAAOD;IACX;IACA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACH,IAAI;YACAE,UAAUE,KAAKC,KAAK,CAACL;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,IAAIC,GAAG;QACH,IAAI;YACAE,UAAUC,KAAKC,KAAK,CAACJ;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,OAAOG,KAAKE,SAAS,CAAC;QAClB,GAAGJ,OAAO;QACV,GAAGC,OAAO;IACd;AACJ"}
1
+ {"version":3,"sources":["useMergeTabsterAttributes.js"],"sourcesContent":["import * as React from 'react';\nimport { TABSTER_ATTRIBUTE_NAME } from 'tabster';\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */ export const useMergedTabsterAttributes_unstable = (...attributes)=>{\n 'use no memo';\n const stringAttributes = attributes.map((attribute)=>attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean);\n return React.useMemo(()=>{\n let attribute = stringAttributes[0];\n attributes.shift();\n for (const attr of stringAttributes){\n attribute = mergeAttributes(attribute, attr);\n }\n return {\n [TABSTER_ATTRIBUTE_NAME]: attribute\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\nfunction mergeAttributes(a, b) {\n if (!b) {\n return a;\n }\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n return JSON.stringify({\n ...aParsed,\n ...bParsed\n });\n}\n"],"names":["useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","TABSTER_ATTRIBUTE_NAME","filter","Boolean","React","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;yBACgB;AAQ5B,MAAMA,sCAAsC,CAAC,GAAGC;IACvD;IACA,MAAMC,mBAAmBD,WAAWE,GAAG,CAAC,CAACC,YAAYA,SAAS,CAACC,+BAAsB,CAAC,EAAEC,MAAM,CAACC;IAC/F,OAAOC,OAAMC,OAAO,CAAC;QACjB,IAAIL,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWS,KAAK;QAChB,KAAK,MAAMC,QAAQT,iBAAiB;YAChCE,YAAYQ,gBAAgBR,WAAWO;QAC3C;QACA,OAAO;YACH,CAACN,+BAAsB,CAAC,EAAED;QAC9B;IACJ,uDAAuD;IACvD,GAAGF;AACP;AACA,SAASU,gBAAgBC,CAAC,EAAEC,CAAC;IACzB,IAAI,CAACA,GAAG;QACJ,OAAOD;IACX;IACA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACH,IAAI;YACAE,UAAUE,KAAKC,KAAK,CAACL;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,IAAIC,GAAG;QACH,IAAI;YACAE,UAAUC,KAAKC,KAAK,CAACJ;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,OAAOG,KAAKE,SAAS,CAAC;QAClB,GAAGJ,OAAO;QACV,GAAGC,OAAO;IACd;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tabster",
3
- "version": "9.22.0",
3
+ "version": "9.22.1",
4
4
  "description": "Utilities for focus management and facade for tabster",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@fluentui/react-shared-contexts": "^9.19.0",
35
35
  "@fluentui/react-theme": "^9.1.19",
36
- "@fluentui/react-utilities": "^9.18.10",
36
+ "@fluentui/react-utilities": "^9.18.11",
37
37
  "@griffel/react": "^1.5.22",
38
38
  "@swc/helpers": "^0.5.1",
39
39
  "keyborg": "^2.6.0",