@fluentui/react-tabster 0.0.0-nightly-20230223-2115.1 → 0.0.0-nightly-20230228-0425.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.json +9 -9
- package/CHANGELOG.md +7 -7
- package/lib/focus/constants.js.map +1 -1
- package/lib/focus/createCustomFocusIndicatorStyle.js +4 -5
- package/lib/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/lib/focus/createFocusOutlineStyle.js +17 -19
- package/lib/focus/createFocusOutlineStyle.js.map +1 -1
- 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 +2 -3
- package/lib/hooks/useArrowNavigationGroup.js.map +1 -1
- package/lib/hooks/useFocusFinders.js +12 -20
- package/lib/hooks/useFocusFinders.js.map +1 -1
- 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 +1 -2
- 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 +17 -23
- package/lib-commonjs/focus/constants.js.map +1 -1
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js +31 -24
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/lib-commonjs/focus/createFocusOutlineStyle.js +57 -45
- package/lib-commonjs/focus/createFocusOutlineStyle.js.map +1 -1
- package/lib-commonjs/focus/focusVisiblePolyfill.js +71 -68
- package/lib-commonjs/focus/focusVisiblePolyfill.js.map +1 -1
- package/lib-commonjs/focus/focusWithinPolyfill.js +47 -44
- package/lib-commonjs/focus/focusWithinPolyfill.js.map +1 -1
- package/lib-commonjs/focus/index.js +7 -8
- package/lib-commonjs/focus/index.js.map +1 -1
- package/lib-commonjs/hooks/index.js +11 -12
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useArrowNavigationGroup.js +51 -43
- package/lib-commonjs/hooks/useArrowNavigationGroup.js.map +1 -1
- package/lib-commonjs/hooks/useFocusFinders.js +58 -72
- package/lib-commonjs/hooks/useFocusFinders.js.map +1 -1
- package/lib-commonjs/hooks/useFocusVisible.js +18 -22
- package/lib-commonjs/hooks/useFocusVisible.js.map +1 -1
- package/lib-commonjs/hooks/useFocusWithin.js +23 -22
- package/lib-commonjs/hooks/useFocusWithin.js.map +1 -1
- package/lib-commonjs/hooks/useFocusableGroup.js +32 -30
- package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardNavAttribute.js +38 -37
- package/lib-commonjs/hooks/useKeyboardNavAttribute.js.map +1 -1
- package/lib-commonjs/hooks/useModalAttributes.js +44 -36
- package/lib-commonjs/hooks/useModalAttributes.js.map +1 -1
- package/lib-commonjs/hooks/useTabster.js +38 -36
- package/lib-commonjs/hooks/useTabster.js.map +1 -1
- package/lib-commonjs/hooks/useTabsterAttributes.js +16 -14
- package/lib-commonjs/hooks/useTabsterAttributes.js.map +1 -1
- package/lib-commonjs/index.js +73 -25
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +6 -6
- package/.swcrc +0 -33
@@ -1,41 +1,49 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "useModalAttributes", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>useModalAttributes
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
exports.useModalAttributes = void 0;
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
8
|
+
const useTabsterAttributes_1 = /*#__PURE__*/require("./useTabsterAttributes");
|
9
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
10
|
+
const useTabster_1 = /*#__PURE__*/require("./useTabster");
|
11
|
+
/**
|
12
|
+
* Applies modal dialog behaviour through DOM attributes
|
13
|
+
* Modal element will focus trap and hide other content on the page
|
14
|
+
* The trigger element will be focused if focus is lost after the modal element is removed
|
15
|
+
*
|
16
|
+
* @returns DOM attributes to apply to the modal element and its trigger
|
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
|
21
38
|
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
const triggerAttributes = (0, _useTabsterAttributes.useTabsterAttributes)({
|
33
|
-
deloser: {}
|
34
|
-
});
|
35
|
-
return {
|
36
|
-
modalAttributes,
|
37
|
-
triggerAttributes
|
38
|
-
};
|
39
|
-
}; //# sourceMappingURL=useModalAttributes.js.map
|
40
|
-
|
39
|
+
});
|
40
|
+
const triggerAttributes = useTabsterAttributes_1.useTabsterAttributes({
|
41
|
+
deloser: {}
|
42
|
+
});
|
43
|
+
return {
|
44
|
+
modalAttributes,
|
45
|
+
triggerAttributes
|
46
|
+
};
|
47
|
+
};
|
48
|
+
exports.useModalAttributes = useModalAttributes;
|
41
49
|
//# sourceMappingURL=useModalAttributes.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AA8BA;;;;;;;AAOO,MAAMA,kBAAkB,GAAG,CAChCC,UAAqC,EAAE,KACuE;EAC9G,MAAM;IAAEC,SAAS;IAAEC,eAAe;IAAEC;EAAe,CAAE,GAAGH,OAAO;EAC/D,MAAMI,OAAO,GAAGC,uBAAU,EAAE;EAC5B;EACA,IAAID,OAAO,EAAE;IACXE,sBAAY,CAACF,OAAO,CAAC;IACrBE,oBAAU,CAACF,OAAO,CAAC;;EAGrB,MAAMG,EAAE,GAAGC,uBAAK,CAAC,QAAQ,EAAER,OAAO,CAACO,EAAE,CAAC;EACtC,MAAME,eAAe,GAAGC,2CAAoB,CAAC;IAC3CC,OAAO,EAAE,EAAE;IACXC,SAAS,EAAE;MACTL,EAAE;MACFM,kBAAkB,EAAE,CAACZ,SAAS;MAC9Ba,kBAAkB,EAAEZ,eAAe;MACnCa,SAAS,EAAEZ;;GAEd,CAAC;EAEF,MAAMa,iBAAiB,GAAGN,2CAAoB,CAAC;IAC7CC,OAAO,EAAE;GACV,CAAC;EAEF,OAAO;IAAEF,eAAe;IAAEO;EAAiB,CAAE;AAC/C,CAAC;AA3BYC,0BAAkB","names":["useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","useTabster_1","tabster_1","id","react_utilities_1","modalAttributes","useTabsterAttributes_1","deloser","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","exports"],"sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-tabster/src/hooks/useModalAttributes.ts"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getDeloser, getModalizer, Types as TabsterTypes } 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 deloser APIs\n if (tabster) {\n getModalizer(tabster);\n getDeloser(tabster);\n }\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,\n },\n });\n\n const triggerAttributes = useTabsterAttributes({\n deloser: {},\n });\n\n return { modalAttributes, triggerAttributes };\n};\n"]}
|
@@ -1,40 +1,42 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "useTabster", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>useTabster
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const
|
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
|
-
|
39
|
-
|
6
|
+
exports.useTabster = void 0;
|
7
|
+
const React = /*#__PURE__*/require("react");
|
8
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
9
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
+
/**
|
12
|
+
* Tries to get a tabster instance on the current window or creates a new one
|
13
|
+
* Since Tabster is single instance only, feel free to call this hook to ensure Tabster exists if necessary
|
14
|
+
*
|
15
|
+
* @internal
|
16
|
+
* @returns Tabster core instance
|
17
|
+
*/
|
18
|
+
const useTabster = () => {
|
19
|
+
const {
|
20
|
+
targetDocument
|
21
|
+
} = react_shared_contexts_1.useFluent_unstable();
|
22
|
+
const defaultView = (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) || undefined;
|
23
|
+
const tabster = React.useMemo(() => {
|
24
|
+
if (!defaultView) {
|
25
|
+
return null;
|
26
|
+
}
|
27
|
+
return tabster_1.createTabster(defaultView, {
|
28
|
+
autoRoot: {},
|
29
|
+
controlTab: false
|
30
|
+
});
|
31
|
+
}, [defaultView]);
|
32
|
+
react_utilities_1.useIsomorphicLayoutEffect(() => {
|
33
|
+
return () => {
|
34
|
+
if (tabster) {
|
35
|
+
tabster_1.disposeTabster(tabster);
|
36
|
+
}
|
37
|
+
};
|
38
|
+
}, [tabster]);
|
39
|
+
return tabster;
|
40
|
+
};
|
41
|
+
exports.useTabster = useTabster;
|
40
42
|
//# sourceMappingURL=useTabster.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAEA;;;;;;;AAOO,MAAMA,UAAU,GAAG,MAAsC;EAC9D,MAAM;IAAEC;EAAc,CAAE,GAAGC,0CAAS,EAAE;EAEtC,MAAMC,WAAW,GAAG,eAAc,aAAdF,cAAc,uBAAdA,cAAc,CAAEE,WAAW,KAAIC,SAAS;EAC5D,MAAMC,OAAO,GAAGC,KAAK,CAACC,OAAO,CAAC,MAAK;IACjC,IAAI,CAACJ,WAAW,EAAE;MAChB,OAAO,IAAI;;IAGb,OAAOK,uBAAa,CAACL,WAAW,EAAE;MAAEM,QAAQ,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAK,CAAE,CAAC;EACxE,CAAC,EAAE,CAACP,WAAW,CAAC,CAAC;EAEjBQ,2CAAyB,CAAC,MAAK;IAC7B,OAAO,MAAK;MACV,IAAIN,OAAO,EAAE;QACXG,wBAAc,CAACH,OAAO,CAAC;;IAE3B,CAAC;EACH,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAOA,OAAO;AAChB,CAAC;AArBYO,kBAAU","names":["useTabster","targetDocument","react_shared_contexts_1","defaultView","undefined","tabster","React","useMemo","tabster_1","autoRoot","controlTab","react_utilities_1","exports"],"sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-tabster/src/hooks/useTabster.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { createTabster, disposeTabster, Types as TabsterTypes } from 'tabster';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\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 = (): TabsterTypes.TabsterCore | null => {\n const { targetDocument } = useFluent();\n\n const defaultView = targetDocument?.defaultView || undefined;\n const tabster = React.useMemo(() => {\n if (!defaultView) {\n return null;\n }\n\n return createTabster(defaultView, { autoRoot: {}, controlTab: false });\n }, [defaultView]);\n\n useIsomorphicLayoutEffect(() => {\n return () => {\n if (tabster) {\n disposeTabster(tabster);\n }\n };\n }, [tabster]);\n\n return tabster;\n};\n"]}
|
@@ -1,18 +1,20 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "useTabsterAttributes", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>useTabsterAttributes
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
exports.useTabsterAttributes = void 0;
|
7
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
8
|
+
const useTabster_1 = /*#__PURE__*/require("./useTabster");
|
9
|
+
/**
|
10
|
+
* @internal
|
11
|
+
* Hook that returns tabster attributes while ensuring tabster exists
|
12
|
+
*/
|
13
|
+
const useTabsterAttributes = props => {
|
14
|
+
// A tabster instance is not necessary to generate tabster attributes
|
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;
|
18
20
|
//# sourceMappingURL=useTabsterAttributes.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;;;;AAIO,MAAMA,oBAAoB,GAAIC,KAAyC,IAAsC;EAClH;EACA;EACAC,uBAAU,EAAE;EAEZ,OAAOC,6BAAmB,CAACF,KAAK,CAAC;AACnC,CAAC;AANYG,4BAAoB","names":["useTabsterAttributes","props","useTabster_1","tabster_1","exports"],"sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-tabster/src/hooks/useTabsterAttributes.ts"],"sourcesContent":["import { getTabsterAttribute, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\n/**\n * @internal\n * Hook that returns tabster attributes while ensuring tabster exists\n */\nexport const useTabsterAttributes = (props: TabsterTypes.TabsterAttributeProps): TabsterTypes.TabsterDOMAttribute => {\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\n return getTabsterAttribute(props);\n};\n"]}
|
package/lib-commonjs/index.js
CHANGED
@@ -1,28 +1,76 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
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
2
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.applyFocusVisiblePolyfill = exports.createFocusOutlineStyle = exports.createCustomFocusIndicatorStyle = exports.useTabsterAttributes = exports.useModalAttributes = exports.useKeyboardNavAttribute = exports.useFocusWithin = exports.useFocusVisible = exports.useFocusFinders = exports.useFocusableGroup = exports.useArrowNavigationGroup = void 0;
|
7
|
+
var index_1 = /*#__PURE__*/require("./hooks/index");
|
8
|
+
Object.defineProperty(exports, "useArrowNavigationGroup", {
|
9
|
+
enumerable: true,
|
10
|
+
get: function () {
|
11
|
+
return index_1.useArrowNavigationGroup;
|
12
|
+
}
|
13
|
+
});
|
14
|
+
Object.defineProperty(exports, "useFocusableGroup", {
|
15
|
+
enumerable: true,
|
16
|
+
get: function () {
|
17
|
+
return index_1.useFocusableGroup;
|
18
|
+
}
|
19
|
+
});
|
20
|
+
Object.defineProperty(exports, "useFocusFinders", {
|
21
|
+
enumerable: true,
|
22
|
+
get: function () {
|
23
|
+
return index_1.useFocusFinders;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
Object.defineProperty(exports, "useFocusVisible", {
|
27
|
+
enumerable: true,
|
28
|
+
get: function () {
|
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
|
+
});
|
28
76
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,sCAAuB;EAAA;AAAA;AACvBF;EAAAC;EAAAC;IAAA,gCAAiB;EAAA;AAAA;AACjBF;EAAAC;EAAAC;IAAA,8BAAe;EAAA;AAAA;AACfF;EAAAC;EAAAC;IAAA,8BAAe;EAAA;AAAA;AACfF;EAAAC;EAAAC;IAAA,6BAAc;EAAA;AAAA;AACdF;EAAAC;EAAAC;IAAA,sCAAuB;EAAA;AAAA;AACvBF;EAAAC;EAAAC;IAAA,iCAAkB;EAAA;AAAA;AAClBF;EAAAC;EAAAC;IAAA,mCAAoB;EAAA;AAAA;AAQtB;AAASF;EAAAC;EAAAC;IAAA,8CAA+B;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,sCAAuB;EAAA;AAAA;AASjE;AAASF;EAAAC;EAAAC;IAAA,wCAAyB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-tabster/src/index.ts"],"sourcesContent":["export {\n useArrowNavigationGroup,\n useFocusableGroup,\n useFocusFinders,\n useFocusVisible,\n useFocusWithin,\n useKeyboardNavAttribute,\n useModalAttributes,\n useTabsterAttributes,\n} from './hooks/index';\nexport type {\n UseArrowNavigationGroupOptions,\n UseFocusableGroupOptions,\n UseModalAttributesOptions,\n} from './hooks/index';\n\nexport { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';\n\nexport type {\n CreateCustomFocusIndicatorStyleOptions,\n CreateFocusOutlineStyleOptions,\n FocusOutlineOffset,\n FocusOutlineStyleOptions,\n} from './focus/index';\n\nexport { applyFocusVisiblePolyfill } from './focus/index';\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230228-0425.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": "just-scripts
|
24
|
+
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
|
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": "0.0.0-nightly-
|
35
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
36
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
34
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230228-0425.1",
|
35
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230228-0425.1",
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230228-0425.1",
|
37
37
|
"keyborg": "^2.0.0",
|
38
38
|
"tabster": "^4.1.1",
|
39
|
-
"
|
39
|
+
"tslib": "^2.1.0"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|
42
42
|
"@types/react": ">=16.8.0 <19.0.0",
|
package/.swcrc
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
-
"env": {
|
4
|
-
"targets": {
|
5
|
-
"chrome": "84",
|
6
|
-
"edge": "84",
|
7
|
-
"firefox": "75",
|
8
|
-
"opera": "73",
|
9
|
-
"safari": "14.1"
|
10
|
-
}
|
11
|
-
},
|
12
|
-
"exclude": [
|
13
|
-
"/testing",
|
14
|
-
"/**/*.cy.ts",
|
15
|
-
"/**/*.cy.tsx",
|
16
|
-
"/**/*.spec.ts",
|
17
|
-
"/**/*.spec.tsx",
|
18
|
-
"/**/*.test.ts",
|
19
|
-
"/**/*.test.tsx"
|
20
|
-
],
|
21
|
-
"jsc": {
|
22
|
-
"parser": {
|
23
|
-
"syntax": "typescript",
|
24
|
-
"tsx": true,
|
25
|
-
"decorators": false,
|
26
|
-
"dynamicImport": false
|
27
|
-
},
|
28
|
-
"target": "es2019",
|
29
|
-
"externalHelpers": true
|
30
|
-
},
|
31
|
-
"minify": false,
|
32
|
-
"sourceMaps": true
|
33
|
-
}
|