@fluentui/react-tabster 9.5.7 → 9.6.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/.swcrc +30 -0
- package/CHANGELOG.json +61 -1
- package/CHANGELOG.md +25 -2
- package/dist/index.d.ts +7 -3
- package/lib/focus/constants.js.map +1 -1
- package/lib/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/lib/focus/createFocusOutlineStyle.js +4 -5
- package/lib/focus/createFocusOutlineStyle.js.map +1 -1
- package/lib/focus/focusVisiblePolyfill.js +4 -9
- package/lib/focus/focusVisiblePolyfill.js.map +1 -1
- package/lib/focus/focusWithinPolyfill.js.map +1 -1
- package/lib/focus/index.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useArrowNavigationGroup.js.map +1 -1
- package/lib/hooks/useFocusFinders.js +16 -10
- package/lib/hooks/useFocusFinders.js.map +1 -1
- package/lib/hooks/useFocusVisible.js +4 -4
- package/lib/hooks/useFocusVisible.js.map +1 -1
- package/lib/hooks/useFocusWithin.js.map +1 -1
- package/lib/hooks/useFocusableGroup.js.map +1 -1
- package/lib/hooks/useKeyboardNavAttribute.js.map +1 -1
- package/lib/hooks/useModalAttributes.js.map +1 -1
- package/lib/hooks/useTabster.js.map +1 -1
- package/lib/hooks/useTabsterAttributes.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/focus/constants.js +23 -17
- package/lib-commonjs/focus/constants.js.map +1 -1
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js +23 -31
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/lib-commonjs/focus/createFocusOutlineStyle.js +42 -57
- package/lib-commonjs/focus/createFocusOutlineStyle.js.map +1 -1
- package/lib-commonjs/focus/focusVisiblePolyfill.js +66 -74
- package/lib-commonjs/focus/focusVisiblePolyfill.js.map +1 -1
- package/lib-commonjs/focus/focusWithinPolyfill.js +44 -47
- package/lib-commonjs/focus/focusWithinPolyfill.js.map +1 -1
- package/lib-commonjs/focus/index.js +8 -7
- package/lib-commonjs/focus/index.js.map +1 -1
- package/lib-commonjs/hooks/index.js +12 -11
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useArrowNavigationGroup.js +42 -51
- package/lib-commonjs/hooks/useArrowNavigationGroup.js.map +1 -1
- package/lib-commonjs/hooks/useFocusFinders.js +70 -58
- package/lib-commonjs/hooks/useFocusFinders.js.map +1 -1
- package/lib-commonjs/hooks/useFocusVisible.js +25 -19
- package/lib-commonjs/hooks/useFocusVisible.js.map +1 -1
- package/lib-commonjs/hooks/useFocusWithin.js +22 -23
- package/lib-commonjs/hooks/useFocusWithin.js.map +1 -1
- package/lib-commonjs/hooks/useFocusableGroup.js +30 -32
- package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardNavAttribute.js +37 -38
- package/lib-commonjs/hooks/useKeyboardNavAttribute.js.map +1 -1
- package/lib-commonjs/hooks/useModalAttributes.js +35 -44
- package/lib-commonjs/hooks/useModalAttributes.js.map +1 -1
- package/lib-commonjs/hooks/useTabster.js +36 -38
- package/lib-commonjs/hooks/useTabster.js.map +1 -1
- package/lib-commonjs/hooks/useTabsterAttributes.js +14 -16
- package/lib-commonjs/hooks/useTabsterAttributes.js.map +1 -1
- package/lib-commonjs/index.js +25 -73
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -7
- package/lib-amd/focus/constants.js +0 -20
- package/lib-amd/focus/constants.js.map +0 -1
- package/lib-amd/focus/createCustomFocusIndicatorStyle.js +0 -27
- package/lib-amd/focus/createCustomFocusIndicatorStyle.js.map +0 -1
- package/lib-amd/focus/createFocusOutlineStyle.js +0 -36
- package/lib-amd/focus/createFocusOutlineStyle.js.map +0 -1
- package/lib-amd/focus/focusVisiblePolyfill.js +0 -82
- package/lib-amd/focus/focusVisiblePolyfill.js.map +0 -1
- package/lib-amd/focus/focusWithinPolyfill.js +0 -55
- package/lib-amd/focus/focusWithinPolyfill.js.map +0 -1
- package/lib-amd/focus/index.js +0 -9
- package/lib-amd/focus/index.js.map +0 -1
- package/lib-amd/hooks/index.js +0 -13
- package/lib-amd/hooks/index.js.map +0 -1
- package/lib-amd/hooks/useArrowNavigationGroup.js +0 -45
- package/lib-amd/hooks/useArrowNavigationGroup.js.map +0 -1
- package/lib-amd/hooks/useFocusFinders.js +0 -43
- package/lib-amd/hooks/useFocusFinders.js.map +0 -1
- package/lib-amd/hooks/useFocusVisible.js +0 -17
- package/lib-amd/hooks/useFocusVisible.js.map +0 -1
- package/lib-amd/hooks/useFocusWithin.js +0 -22
- package/lib-amd/hooks/useFocusWithin.js.map +0 -1
- package/lib-amd/hooks/useFocusableGroup.js +0 -34
- package/lib-amd/hooks/useFocusableGroup.js.map +0 -1
- package/lib-amd/hooks/useKeyboardNavAttribute.js +0 -39
- package/lib-amd/hooks/useKeyboardNavAttribute.js.map +0 -1
- package/lib-amd/hooks/useModalAttributes.js +0 -38
- package/lib-amd/hooks/useModalAttributes.js.map +0 -1
- package/lib-amd/hooks/useTabster.js +0 -32
- package/lib-amd/hooks/useTabster.js.map +0 -1
- package/lib-amd/hooks/useTabsterAttributes.js +0 -17
- package/lib-amd/hooks/useTabsterAttributes.js.map +0 -1
- package/lib-amd/index.js +0 -17
- package/lib-amd/index.js.map +0 -1
@@ -1,45 +1,44 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useKeyboardNavAttribute", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useKeyboardNavAttribute
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
11
|
-
/**
|
12
|
-
* Instantiates [keyborg](https://github.com/microsoft/keyborg) and adds `data-keyboard-nav`
|
13
|
-
* attribute to a referenced element to ensure keyboard navigation awareness
|
14
|
-
* synced to keyborg logic without having to cause a re-render on react tree.
|
15
|
-
*/
|
9
|
+
const _keyborg = require("keyborg");
|
10
|
+
const _react = require("react");
|
11
|
+
const _constants = require("../focus/constants");
|
12
|
+
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
16
13
|
function useKeyboardNavAttribute() {
|
17
|
-
|
18
|
-
targetDocument
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
14
|
+
const { targetDocument } = (0, _reactSharedContexts.useFluent_unstable)();
|
15
|
+
const keyborg = (0, _react.useMemo)(()=>targetDocument && (0, _keyborg.createKeyborg)(targetDocument.defaultView), [
|
16
|
+
targetDocument
|
17
|
+
]);
|
18
|
+
const ref = (0, _react.useRef)(null);
|
19
|
+
(0, _react.useEffect)(()=>{
|
20
|
+
if (keyborg) {
|
21
|
+
setBooleanAttribute(ref, _constants.KEYBOARD_NAV_ATTRIBUTE, keyborg.isNavigatingWithKeyboard());
|
22
|
+
const cb = (next)=>{
|
23
|
+
setBooleanAttribute(ref, _constants.KEYBOARD_NAV_ATTRIBUTE, next);
|
24
|
+
};
|
25
|
+
keyborg.subscribe(cb);
|
26
|
+
return ()=>keyborg.unsubscribe(cb);
|
27
|
+
}
|
28
|
+
}, [
|
29
|
+
keyborg
|
30
|
+
]);
|
31
|
+
return ref;
|
33
32
|
}
|
34
|
-
exports.useKeyboardNavAttribute = useKeyboardNavAttribute;
|
35
33
|
function setBooleanAttribute(elementRef, attribute, value) {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
34
|
+
if (!elementRef.current) {
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
if (value) {
|
38
|
+
elementRef.current.setAttribute(attribute, '');
|
39
|
+
} else {
|
40
|
+
elementRef.current.removeAttribute(attribute);
|
41
|
+
}
|
42
|
+
} //# sourceMappingURL=useKeyboardNavAttribute.js.map
|
43
|
+
|
45
44
|
//# sourceMappingURL=useKeyboardNavAttribute.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/hooks/useKeyboardNavAttribute.js"],"sourcesContent":["import { createKeyborg } from 'keyborg';\nimport { useEffect, useMemo, useRef } from 'react';\nimport { KEYBOARD_NAV_ATTRIBUTE } from '../focus/constants';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n/**\n * Instantiates [keyborg](https://github.com/microsoft/keyborg) and adds `data-keyboard-nav`\n * attribute to a referenced element to ensure keyboard navigation awareness\n * synced to keyborg logic without having to cause a re-render on react tree.\n */\nexport function useKeyboardNavAttribute() {\n const {\n targetDocument\n } = useFluent();\n const keyborg = useMemo(() => targetDocument && createKeyborg(targetDocument.defaultView), [targetDocument]);\n const ref = useRef(null);\n useEffect(() => {\n if (keyborg) {\n setBooleanAttribute(ref, KEYBOARD_NAV_ATTRIBUTE, keyborg.isNavigatingWithKeyboard());\n const cb = next => {\n setBooleanAttribute(ref, KEYBOARD_NAV_ATTRIBUTE, next);\n };\n keyborg.subscribe(cb);\n return () => keyborg.unsubscribe(cb);\n }\n }, [keyborg]);\n return ref;\n}\nfunction setBooleanAttribute(elementRef, attribute, value) {\n if (!elementRef.current) {\n return;\n }\n if (value) {\n elementRef.current.setAttribute(attribute, '');\n } else {\n elementRef.current.removeAttribute(attribute);\n }\n}\n//# sourceMappingURL=useKeyboardNavAttribute.js.map"],"names":["useKeyboardNavAttribute","targetDocument","useFluent","keyborg","useMemo","createKeyborg","defaultView","ref","useRef","useEffect","setBooleanAttribute","KEYBOARD_NAV_ATTRIBUTE","isNavigatingWithKeyboard","cb","next","subscribe","unsubscribe","elementRef","attribute","value","current","setAttribute","removeAttribute"],"mappings":";;;;+BASgBA;;aAAAA;;yBATc;uBACa;2BACJ;qCACS;AAMzC,SAASA,0BAA0B;IACxC,MAAM,EACJC,eAAc,EACf,GAAGC,IAAAA,uCAAS;IACb,MAAMC,UAAUC,IAAAA,cAAO,EAAC,IAAMH,kBAAkBI,IAAAA,sBAAa,EAACJ,eAAeK,WAAW,GAAG;QAACL;KAAe;IAC3G,MAAMM,MAAMC,IAAAA,aAAM,EAAC,IAAI;IACvBC,IAAAA,gBAAS,EAAC,IAAM;QACd,IAAIN,SAAS;YACXO,oBAAoBH,KAAKI,iCAAsB,EAAER,QAAQS,wBAAwB;YACjF,MAAMC,KAAKC,CAAAA,OAAQ;gBACjBJ,oBAAoBH,KAAKI,iCAAsB,EAAEG;YACnD;YACAX,QAAQY,SAAS,CAACF;YAClB,OAAO,IAAMV,QAAQa,WAAW,CAACH;QACnC,CAAC;IACH,GAAG;QAACV;KAAQ;IACZ,OAAOI;AACT;AACA,SAASG,oBAAoBO,UAAU,EAAEC,SAAS,EAAEC,KAAK,EAAE;IACzD,IAAI,CAACF,WAAWG,OAAO,EAAE;QACvB;IACF,CAAC;IACD,IAAID,OAAO;QACTF,WAAWG,OAAO,CAACC,YAAY,CAACH,WAAW;IAC7C,OAAO;QACLD,WAAWG,OAAO,CAACE,eAAe,CAACJ;IACrC,CAAC;AACH,EACA,mDAAmD"}
|
@@ -1,49 +1,40 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useModalAttributes", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useModalAttributes
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
*/
|
18
|
-
const useModalAttributes = (options = {}) => {
|
19
|
-
const {
|
20
|
-
trapFocus,
|
21
|
-
alwaysFocusable,
|
22
|
-
legacyTrapFocus
|
23
|
-
} = options;
|
24
|
-
const tabster = useTabster_1.useTabster();
|
25
|
-
// Initializes the modalizer and deloser APIs
|
26
|
-
if (tabster) {
|
27
|
-
tabster_1.getModalizer(tabster);
|
28
|
-
tabster_1.getDeloser(tabster);
|
29
|
-
}
|
30
|
-
const id = react_utilities_1.useId('modal-', options.id);
|
31
|
-
const modalAttributes = useTabsterAttributes_1.useTabsterAttributes({
|
32
|
-
deloser: {},
|
33
|
-
modalizer: {
|
34
|
-
id,
|
35
|
-
isOthersAccessible: !trapFocus,
|
36
|
-
isAlwaysAccessible: alwaysFocusable,
|
37
|
-
isTrapped: legacyTrapFocus && trapFocus
|
9
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
10
|
+
const _useTabsterAttributes = require("./useTabsterAttributes");
|
11
|
+
const _tabster = require("tabster");
|
12
|
+
const _useTabster = require("./useTabster");
|
13
|
+
const useModalAttributes = (options = {})=>{
|
14
|
+
const { trapFocus , alwaysFocusable , legacyTrapFocus } = options;
|
15
|
+
const tabster = (0, _useTabster.useTabster)();
|
16
|
+
// Initializes the modalizer and deloser APIs
|
17
|
+
if (tabster) {
|
18
|
+
(0, _tabster.getModalizer)(tabster);
|
19
|
+
(0, _tabster.getDeloser)(tabster);
|
38
20
|
}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
48
|
-
|
21
|
+
const id = (0, _reactUtilities.useId)('modal-', options.id);
|
22
|
+
const modalAttributes = (0, _useTabsterAttributes.useTabsterAttributes)({
|
23
|
+
deloser: {},
|
24
|
+
modalizer: {
|
25
|
+
id,
|
26
|
+
isOthersAccessible: !trapFocus,
|
27
|
+
isAlwaysAccessible: alwaysFocusable,
|
28
|
+
isTrapped: legacyTrapFocus && trapFocus
|
29
|
+
}
|
30
|
+
});
|
31
|
+
const triggerAttributes = (0, _useTabsterAttributes.useTabsterAttributes)({
|
32
|
+
deloser: {}
|
33
|
+
});
|
34
|
+
return {
|
35
|
+
modalAttributes,
|
36
|
+
triggerAttributes
|
37
|
+
};
|
38
|
+
}; //# sourceMappingURL=useModalAttributes.js.map
|
39
|
+
|
49
40
|
//# sourceMappingURL=useModalAttributes.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/hooks/useModalAttributes.js"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getDeloser, getModalizer } from 'tabster';\nimport { useTabster } from './useTabster';\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 = (options = {}) => {\n const {\n trapFocus,\n alwaysFocusable,\n legacyTrapFocus\n } = options;\n const tabster = useTabster();\n // Initializes the modalizer and deloser APIs\n if (tabster) {\n getModalizer(tabster);\n getDeloser(tabster);\n }\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n deloser: {},\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus\n }\n });\n const triggerAttributes = useTabsterAttributes({\n deloser: {}\n });\n return {\n modalAttributes,\n triggerAttributes\n };\n};\n//# sourceMappingURL=useModalAttributes.js.map"],"names":["useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","useTabster","getModalizer","getDeloser","id","useId","modalAttributes","useTabsterAttributes","deloser","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes"],"mappings":";;;;+BAWaA;;aAAAA;;gCAXS;sCACe;yBACI;4BACd;AAQpB,MAAMA,qBAAqB,CAACC,UAAU,CAAC,CAAC,GAAK;IAClD,MAAM,EACJC,UAAS,EACTC,gBAAe,EACfC,gBAAe,EAChB,GAAGH;IACJ,MAAMI,UAAUC,IAAAA,sBAAU;IAC1B,6CAA6C;IAC7C,IAAID,SAAS;QACXE,IAAAA,qBAAY,EAACF;QACbG,IAAAA,mBAAU,EAACH;IACb,CAAC;IACD,MAAMI,KAAKC,IAAAA,qBAAK,EAAC,UAAUT,QAAQQ,EAAE;IACrC,MAAME,kBAAkBC,IAAAA,0CAAoB,EAAC;QAC3CC,SAAS,CAAC;QACVC,WAAW;YACTL;YACAM,oBAAoB,CAACb;YACrBc,oBAAoBb;YACpBc,WAAWb,mBAAmBF;QAChC;IACF;IACA,MAAMgB,oBAAoBN,IAAAA,0CAAoB,EAAC;QAC7CC,SAAS,CAAC;IACZ;IACA,OAAO;QACLF;QACAO;IACF;AACF,GACA,8CAA8C"}
|
@@ -1,42 +1,40 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useTabster", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useTabster
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
};
|
38
|
-
}, [tabster]);
|
39
|
-
return tabster;
|
40
|
-
};
|
41
|
-
exports.useTabster = useTabster;
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
|
+
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
12
|
+
const _tabster = require("tabster");
|
13
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
14
|
+
const useTabster = ()=>{
|
15
|
+
const { targetDocument } = (0, _reactSharedContexts.useFluent_unstable)();
|
16
|
+
const defaultView = (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) || undefined;
|
17
|
+
const tabster = _react.useMemo(()=>{
|
18
|
+
if (!defaultView) {
|
19
|
+
return null;
|
20
|
+
}
|
21
|
+
return (0, _tabster.createTabster)(defaultView, {
|
22
|
+
autoRoot: {},
|
23
|
+
controlTab: false
|
24
|
+
});
|
25
|
+
}, [
|
26
|
+
defaultView
|
27
|
+
]);
|
28
|
+
(0, _reactUtilities.useIsomorphicLayoutEffect)(()=>{
|
29
|
+
return ()=>{
|
30
|
+
if (tabster) {
|
31
|
+
(0, _tabster.disposeTabster)(tabster);
|
32
|
+
}
|
33
|
+
};
|
34
|
+
}, [
|
35
|
+
tabster
|
36
|
+
]);
|
37
|
+
return tabster;
|
38
|
+
}; //# sourceMappingURL=useTabster.js.map
|
39
|
+
|
42
40
|
//# sourceMappingURL=useTabster.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/hooks/useTabster.js"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { createTabster, disposeTabster } from 'tabster';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n/**\n * Tries to get a tabster instance on the current window or creates a new one\n * Since Tabster is single instance only, feel free to call this hook to ensure Tabster exists if necessary\n *\n * @internal\n * @returns Tabster core instance\n */\nexport const useTabster = () => {\n const {\n targetDocument\n } = useFluent();\n const defaultView = (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) || undefined;\n const tabster = React.useMemo(() => {\n if (!defaultView) {\n return null;\n }\n return createTabster(defaultView, {\n autoRoot: {},\n controlTab: false\n });\n }, [defaultView]);\n useIsomorphicLayoutEffect(() => {\n return () => {\n if (tabster) {\n disposeTabster(tabster);\n }\n };\n }, [tabster]);\n return tabster;\n};\n//# sourceMappingURL=useTabster.js.map"],"names":["useTabster","targetDocument","useFluent","defaultView","undefined","tabster","React","useMemo","createTabster","autoRoot","controlTab","useIsomorphicLayoutEffect","disposeTabster"],"mappings":";;;;+BAWaA;;aAAAA;;;6DAXU;qCACyB;yBACF;gCACJ;AAQnC,MAAMA,aAAa,IAAM;IAC9B,MAAM,EACJC,eAAc,EACf,GAAGC,IAAAA,uCAAS;IACb,MAAMC,cAAc,AAACF,CAAAA,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeE,WAAW,AAAD,KAAMC;IACpH,MAAMC,UAAUC,OAAMC,OAAO,CAAC,IAAM;QAClC,IAAI,CAACJ,aAAa;YAChB,OAAO,IAAI;QACb,CAAC;QACD,OAAOK,IAAAA,sBAAa,EAACL,aAAa;YAChCM,UAAU,CAAC;YACXC,YAAY,KAAK;QACnB;IACF,GAAG;QAACP;KAAY;IAChBQ,IAAAA,yCAAyB,EAAC,IAAM;QAC9B,OAAO,IAAM;YACX,IAAIN,SAAS;gBACXO,IAAAA,uBAAc,EAACP;YACjB,CAAC;QACH;IACF,GAAG;QAACA;KAAQ;IACZ,OAAOA;AACT,GACA,sCAAsC"}
|
@@ -1,20 +1,18 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useTabsterAttributes", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useTabsterAttributes
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
// but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same
|
16
|
-
useTabster_1.useTabster();
|
17
|
-
return tabster_1.getTabsterAttribute(props);
|
18
|
-
};
|
19
|
-
exports.useTabsterAttributes = useTabsterAttributes;
|
9
|
+
const _tabster = require("tabster");
|
10
|
+
const _useTabster = require("./useTabster");
|
11
|
+
const useTabsterAttributes = (props)=>{
|
12
|
+
// A tabster instance is not necessary to generate tabster attributes
|
13
|
+
// but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same
|
14
|
+
(0, _useTabster.useTabster)();
|
15
|
+
return (0, _tabster.getTabsterAttribute)(props);
|
16
|
+
}; //# sourceMappingURL=useTabsterAttributes.js.map
|
17
|
+
|
20
18
|
//# sourceMappingURL=useTabsterAttributes.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/hooks/useTabsterAttributes.js"],"sourcesContent":["import { getTabsterAttribute } from 'tabster';\nimport { useTabster } from './useTabster';\n/**\n * @internal\n * Hook that returns tabster attributes while ensuring tabster exists\n */\nexport const useTabsterAttributes = props => {\n // A tabster instance is not necessary to generate tabster attributes\n // but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same\n useTabster();\n return getTabsterAttribute(props);\n};\n//# sourceMappingURL=useTabsterAttributes.js.map"],"names":["useTabsterAttributes","props","useTabster","getTabsterAttribute"],"mappings":";;;;+BAMaA;;aAAAA;;yBANuB;4BACT;AAKpB,MAAMA,uBAAuBC,CAAAA,QAAS;IAC3C,qEAAqE;IACrE,iHAAiH;IACjHC,IAAAA,sBAAU;IACV,OAAOC,IAAAA,4BAAmB,EAACF;AAC7B,GACA,gDAAgD"}
|
package/lib-commonjs/index.js
CHANGED
@@ -1,76 +1,28 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
5
|
-
});
|
6
|
-
|
7
|
-
var
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
return index_1.useFocusVisible;
|
30
|
-
}
|
31
|
-
});
|
32
|
-
Object.defineProperty(exports, "useFocusWithin", {
|
33
|
-
enumerable: true,
|
34
|
-
get: function () {
|
35
|
-
return index_1.useFocusWithin;
|
36
|
-
}
|
37
|
-
});
|
38
|
-
Object.defineProperty(exports, "useKeyboardNavAttribute", {
|
39
|
-
enumerable: true,
|
40
|
-
get: function () {
|
41
|
-
return index_1.useKeyboardNavAttribute;
|
42
|
-
}
|
43
|
-
});
|
44
|
-
Object.defineProperty(exports, "useModalAttributes", {
|
45
|
-
enumerable: true,
|
46
|
-
get: function () {
|
47
|
-
return index_1.useModalAttributes;
|
48
|
-
}
|
49
|
-
});
|
50
|
-
Object.defineProperty(exports, "useTabsterAttributes", {
|
51
|
-
enumerable: true,
|
52
|
-
get: function () {
|
53
|
-
return index_1.useTabsterAttributes;
|
54
|
-
}
|
55
|
-
});
|
56
|
-
var index_2 = /*#__PURE__*/require("./focus/index");
|
57
|
-
Object.defineProperty(exports, "createCustomFocusIndicatorStyle", {
|
58
|
-
enumerable: true,
|
59
|
-
get: function () {
|
60
|
-
return index_2.createCustomFocusIndicatorStyle;
|
61
|
-
}
|
62
|
-
});
|
63
|
-
Object.defineProperty(exports, "createFocusOutlineStyle", {
|
64
|
-
enumerable: true,
|
65
|
-
get: function () {
|
66
|
-
return index_2.createFocusOutlineStyle;
|
67
|
-
}
|
68
|
-
});
|
69
|
-
var index_3 = /*#__PURE__*/require("./focus/index");
|
70
|
-
Object.defineProperty(exports, "applyFocusVisiblePolyfill", {
|
71
|
-
enumerable: true,
|
72
|
-
get: function () {
|
73
|
-
return index_3.applyFocusVisiblePolyfill;
|
74
|
-
}
|
75
|
-
});
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
useArrowNavigationGroup: ()=>_index.useArrowNavigationGroup,
|
13
|
+
useFocusableGroup: ()=>_index.useFocusableGroup,
|
14
|
+
useFocusFinders: ()=>_index.useFocusFinders,
|
15
|
+
useFocusVisible: ()=>_index.useFocusVisible,
|
16
|
+
useFocusWithin: ()=>_index.useFocusWithin,
|
17
|
+
useKeyboardNavAttribute: ()=>_index.useKeyboardNavAttribute,
|
18
|
+
useModalAttributes: ()=>_index.useModalAttributes,
|
19
|
+
useTabsterAttributes: ()=>_index.useTabsterAttributes,
|
20
|
+
createCustomFocusIndicatorStyle: ()=>_index1.createCustomFocusIndicatorStyle,
|
21
|
+
createFocusOutlineStyle: ()=>_index1.createFocusOutlineStyle,
|
22
|
+
applyFocusVisiblePolyfill: ()=>_index1.applyFocusVisiblePolyfill
|
23
|
+
});
|
24
|
+
const _index = require("./hooks/index");
|
25
|
+
const _index1 = require("./focus/index");
|
26
|
+
//# sourceMappingURL=index.js.map
|
27
|
+
|
76
28
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { useArrowNavigationGroup, useFocusableGroup, useFocusFinders, useFocusVisible, useFocusWithin, useKeyboardNavAttribute, useModalAttributes, useTabsterAttributes } from './hooks/index';\nexport { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';\nexport { applyFocusVisiblePolyfill } from './focus/index';\n//# sourceMappingURL=index.js.map"],"names":["useArrowNavigationGroup","useFocusableGroup","useFocusFinders","useFocusVisible","useFocusWithin","useKeyboardNavAttribute","useModalAttributes","useTabsterAttributes","createCustomFocusIndicatorStyle","createFocusOutlineStyle","applyFocusVisiblePolyfill"],"mappings":";;;;;;;;;;;IAASA,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,cAAc,MAAdA,qBAAc;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,kBAAkB,MAAlBA,yBAAkB;IAAEC,oBAAoB,MAApBA,2BAAoB;IAC/JC,+BAA+B,MAA/BA,uCAA+B;IAAEC,uBAAuB,MAAvBA,+BAAuB;IACxDC,yBAAyB,MAAzBA,iCAAyB;;uBAF8I;wBACvG;CAEzE,iCAAiC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.6.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",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"lint": "just-scripts lint",
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"type-check": "tsc -b tsconfig.json",
|
24
|
-
"generate-api": "
|
24
|
+
"generate-api": "just-scripts generate-api"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@fluentui/eslint-plugin": "*",
|
@@ -31,12 +31,12 @@
|
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
33
|
"@griffel/react": "^1.5.2",
|
34
|
-
"@fluentui/react-shared-contexts": "^9.3.
|
35
|
-
"@fluentui/react-theme": "^9.1.
|
36
|
-
"@fluentui/react-utilities": "^9.7.
|
34
|
+
"@fluentui/react-shared-contexts": "^9.3.2",
|
35
|
+
"@fluentui/react-theme": "^9.1.7",
|
36
|
+
"@fluentui/react-utilities": "^9.7.2",
|
37
|
+
"@swc/helpers": "^0.4.14",
|
37
38
|
"keyborg": "^2.0.0",
|
38
|
-
"tabster": "^4.1.1"
|
39
|
-
"tslib": "^2.1.0"
|
39
|
+
"tabster": "^4.1.1"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|
42
42
|
"@types/react": ">=16.8.0 <19.0.0",
|
@@ -53,6 +53,7 @@
|
|
53
53
|
"exports": {
|
54
54
|
".": {
|
55
55
|
"types": "./dist/index.d.ts",
|
56
|
+
"node": "./lib-commonjs/index.js",
|
56
57
|
"import": "./lib/index.js",
|
57
58
|
"require": "./lib-commonjs/index.js"
|
58
59
|
},
|
@@ -1,20 +0,0 @@
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.defaultOptions = exports.FOCUS_WITHIN_ATTR = exports.FOCUS_VISIBLE_ATTR = exports.KEYBOARD_NAV_SELECTOR = exports.KEYBOARD_NAV_ATTRIBUTE = void 0;
|
5
|
-
exports.KEYBOARD_NAV_ATTRIBUTE = 'data-keyboard-nav';
|
6
|
-
exports.KEYBOARD_NAV_SELECTOR = ":global([" + exports.KEYBOARD_NAV_ATTRIBUTE + "])";
|
7
|
-
/**
|
8
|
-
* @internal
|
9
|
-
*/
|
10
|
-
exports.FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';
|
11
|
-
/**
|
12
|
-
* @internal
|
13
|
-
*/
|
14
|
-
exports.FOCUS_WITHIN_ATTR = 'data-fui-focus-within';
|
15
|
-
exports.defaultOptions = {
|
16
|
-
style: {},
|
17
|
-
selector: 'focus',
|
18
|
-
};
|
19
|
-
});
|
20
|
-
//# sourceMappingURL=constants.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-tabster/src/focus/constants.ts"],"names":[],"mappings":";;;;IAAa,QAAA,sBAAsB,GAAG,mBAA4B,CAAC;IACtD,QAAA,qBAAqB,GAAG,cAAY,8BAAsB,OAAa,CAAC;IAErF;;OAEG;IACU,QAAA,kBAAkB,GAAG,wBAAwB,CAAC;IAE3D;;OAEG;IACU,QAAA,iBAAiB,GAAG,uBAAuB,CAAC;IAC5C,QAAA,cAAc,GAAG;QAC5B,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,OAAO;KACT,CAAC","sourcesContent":["export const KEYBOARD_NAV_ATTRIBUTE = 'data-keyboard-nav' as const;\nexport const KEYBOARD_NAV_SELECTOR = `:global([${KEYBOARD_NAV_ATTRIBUTE}])` as const;\n\n/**\n * @internal\n */\nexport const FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';\n\n/**\n * @internal\n */\nexport const FOCUS_WITHIN_ATTR = 'data-fui-focus-within';\nexport const defaultOptions = {\n style: {},\n selector: 'focus',\n} as const;\n"]}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./constants"], function (require, exports, tslib_1, constants_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.createCustomFocusIndicatorStyle = void 0;
|
5
|
-
/**
|
6
|
-
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
|
7
|
-
* Should be used only when @see createFocusOutlineStyle does not fit requirements
|
8
|
-
*
|
9
|
-
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
|
10
|
-
* @param options - Configure the style of the focus outline
|
11
|
-
*/
|
12
|
-
function createCustomFocusIndicatorStyle(style, _a) {
|
13
|
-
var _b, _c;
|
14
|
-
var _d = _a === void 0 ? constants_1.defaultOptions : _a, _e = _d.selector, selector = _e === void 0 ? constants_1.defaultOptions.selector : _e, _f = _d.enableOutline, enableOutline = _f === void 0 ? false : _f;
|
15
|
-
return tslib_1.__assign(tslib_1.__assign({ ':focus': {
|
16
|
-
outlineStyle: enableOutline ? undefined : 'none',
|
17
|
-
}, ':focus-visible': {
|
18
|
-
outlineStyle: enableOutline ? undefined : 'none',
|
19
|
-
} }, (selector === 'focus' && (_b = {},
|
20
|
-
_b["&[" + constants_1.FOCUS_VISIBLE_ATTR + "]"] = style,
|
21
|
-
_b))), (selector === 'focus-within' && (_c = {},
|
22
|
-
_c["&[" + constants_1.FOCUS_WITHIN_ATTR + "]:" + selector] = style,
|
23
|
-
_c)));
|
24
|
-
}
|
25
|
-
exports.createCustomFocusIndicatorStyle = createCustomFocusIndicatorStyle;
|
26
|
-
});
|
27
|
-
//# sourceMappingURL=createCustomFocusIndicatorStyle.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createCustomFocusIndicatorStyle.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts"],"names":[],"mappings":";;;;IAsBA;;;;;;OAMG;IACH,SAAgB,+BAA+B,CAC7C,KAAa,EACb,EAG0D;;YAH1D,qBAG4C,0BAAc,KAAA,EAFxD,gBAAkC,EAAlC,QAAQ,mBAAG,0BAAc,CAAC,QAAQ,KAAA,EAClC,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA;QAGvB,2CACE,QAAQ,EAAE;gBACR,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;aACjD,EACD,gBAAgB,EAAE;gBAChB,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;aACjD,IAEE,CAAC,QAAQ,KAAK,OAAO;YACtB,GAAC,OAAK,8BAAkB,MAAG,IAAG,KAAK;eACpC,CAAC,GACC,CAAC,QAAQ,KAAK,cAAc;YAC7B,GAAC,OAAK,6BAAiB,UAAK,QAAU,IAAG,KAAK;eAC/C,CAAC,EACF;IACJ,CAAC;IAtBD,0EAsBC","sourcesContent":["import { defaultOptions, FOCUS_VISIBLE_ATTR, FOCUS_WITHIN_ATTR } from './constants';\nimport { makeResetStyles } from '@griffel/react';\nimport type { GriffelStyle } from '@griffel/react';\n\n// TODO: Use the type directly from @griffel/react\n// https://github.com/microsoft/griffel/pull/278\ntype GriffelResetStyle = Parameters<typeof makeResetStyles>[0];\n\nexport interface CreateCustomFocusIndicatorStyleOptions {\n /**\n * Control if the indicator appears when the corresponding element is focused,\n * or any child is focused within the corresponding element.\n * @default 'focus'\n */\n selector?: 'focus' | 'focus-within';\n /**\n * Enables the browser default outline style\n * @default false\n */\n enableOutline?: boolean;\n}\n\n/**\n * Creates a style for @see makeStyles that includes the necessary selectors for focus.\n * Should be used only when @see createFocusOutlineStyle does not fit requirements\n *\n * @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles\n * @param options - Configure the style of the focus outline\n */\nexport function createCustomFocusIndicatorStyle<TStyle extends GriffelStyle | GriffelResetStyle>(\n style: TStyle,\n {\n selector = defaultOptions.selector,\n enableOutline = false,\n }: CreateCustomFocusIndicatorStyleOptions = defaultOptions,\n): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle {\n return {\n ':focus': {\n outlineStyle: enableOutline ? undefined : 'none',\n },\n ':focus-visible': {\n outlineStyle: enableOutline ? undefined : 'none',\n },\n\n ...(selector === 'focus' && {\n [`&[${FOCUS_VISIBLE_ATTR}]`]: style,\n }),\n ...(selector === 'focus-within' && {\n [`&[${FOCUS_WITHIN_ATTR}]:${selector}`]: style,\n }),\n };\n}\n"]}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "@fluentui/react-theme", "@griffel/react", "./createCustomFocusIndicatorStyle", "./constants"], function (require, exports, tslib_1, react_theme_1, react_1, createCustomFocusIndicatorStyle_1, constants_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.createFocusOutlineStyle = void 0;
|
5
|
-
/**
|
6
|
-
* NOTE: the element with the focus outline needs to have `position: relative` so that the
|
7
|
-
* pseudo element can be properly positioned.
|
8
|
-
*
|
9
|
-
* @param options - Configures the style of the focus outline
|
10
|
-
* @returns focus outline styles object
|
11
|
-
*/
|
12
|
-
var getFocusOutlineStyles = function (options) {
|
13
|
-
var _a, _b, _c, _d;
|
14
|
-
var outlineRadius = options.outlineRadius, outlineColor = options.outlineColor, outlineOffset = options.outlineOffset, outlineWidth = options.outlineWidth;
|
15
|
-
var outlineOffsetTop = ((_a = outlineOffset) === null || _a === void 0 ? void 0 : _a.top) || outlineOffset;
|
16
|
-
var outlineOffsetBottom = ((_b = outlineOffset) === null || _b === void 0 ? void 0 : _b.bottom) || outlineOffset;
|
17
|
-
var outlineOffsetLeft = ((_c = outlineOffset) === null || _c === void 0 ? void 0 : _c.left) || outlineOffset;
|
18
|
-
var outlineOffsetRight = ((_d = outlineOffset) === null || _d === void 0 ? void 0 : _d.right) || outlineOffset;
|
19
|
-
return tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor('transparent')), { '::after': tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ content: '""', position: 'absolute', pointerEvents: 'none', zIndex: 1 }, react_1.shorthands.borderStyle('solid')), react_1.shorthands.borderWidth(outlineWidth)), react_1.shorthands.borderRadius(outlineRadius)), react_1.shorthands.borderColor(outlineColor)), { top: !outlineOffset ? "-" + outlineWidth : "calc(0px - " + outlineWidth + " - " + outlineOffsetTop + ")", bottom: !outlineOffset ? "-" + outlineWidth : "calc(0px - " + outlineWidth + " - " + outlineOffsetBottom + ")", left: !outlineOffset ? "-" + outlineWidth : "calc(0px - " + outlineWidth + " - " + outlineOffsetLeft + ")", right: !outlineOffset ? "-" + outlineWidth : "calc(0px - " + outlineWidth + " - " + outlineOffsetRight + ")" }) });
|
20
|
-
};
|
21
|
-
/**
|
22
|
-
* NOTE: The element with the focus outline needs to have `position: relative` so that the
|
23
|
-
* pseudo element can be properly positioned.
|
24
|
-
*
|
25
|
-
* @param options - Configure the style of the focus outline
|
26
|
-
* @returns focus outline styles object for @see makeStyles
|
27
|
-
*/
|
28
|
-
var createFocusOutlineStyle = function (_a) {
|
29
|
-
var _b = _a === void 0 ? constants_1.defaultOptions : _a, _c = _b.selector, selector = _c === void 0 ? constants_1.defaultOptions.selector : _c, _d = _b.style, style = _d === void 0 ? constants_1.defaultOptions.style : _d;
|
30
|
-
return createCustomFocusIndicatorStyle_1.createCustomFocusIndicatorStyle(getFocusOutlineStyles(tslib_1.__assign({ outlineColor: react_theme_1.tokens.colorStrokeFocus2, outlineRadius: react_theme_1.tokens.borderRadiusMedium,
|
31
|
-
// FIXME: tokens.strokeWidthThick causes some weird bugs
|
32
|
-
outlineWidth: '2px' }, style)), { selector: selector });
|
33
|
-
};
|
34
|
-
exports.createFocusOutlineStyle = createFocusOutlineStyle;
|
35
|
-
});
|
36
|
-
//# sourceMappingURL=createFocusOutlineStyle.js.map
|