@fluentui/react-tabster 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4
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 +254 -13
- package/CHANGELOG.md +75 -9
- package/dist/react-tabster.d.ts +10 -27
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useArrowNavigationGroup.js +2 -2
- package/lib/hooks/useArrowNavigationGroup.js.map +1 -1
- package/lib/hooks/useFocusFinders.d.ts +3 -2
- package/lib/hooks/useFocusFinders.js +25 -33
- package/lib/hooks/useFocusFinders.js.map +1 -1
- package/lib/hooks/useFocusIndicatorStyle.d.ts +6 -7
- package/lib/hooks/useFocusIndicatorStyle.js +40 -52
- package/lib/hooks/useFocusIndicatorStyle.js.map +1 -1
- package/lib/hooks/useFocusableGroup.d.ts +2 -16
- package/lib/hooks/useFocusableGroup.js +19 -22
- package/lib/hooks/useFocusableGroup.js.map +1 -1
- package/lib/hooks/useKeyboardNavAttribute.js +9 -11
- package/lib/hooks/useKeyboardNavAttribute.js.map +1 -1
- package/lib/hooks/useModalAttributes.js +12 -14
- package/lib/hooks/useModalAttributes.js.map +1 -1
- package/lib/hooks/useTabster.js +8 -5
- package/lib/hooks/useTabster.js.map +1 -1
- package/lib/hooks/useTabsterAttributes.js +1 -1
- package/lib/hooks/useTabsterAttributes.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/symbols.js +2 -2
- package/lib/symbols.js.map +1 -1
- package/lib-commonjs/hooks/index.js +1 -1
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useArrowNavigationGroup.js +5 -5
- package/lib-commonjs/hooks/useArrowNavigationGroup.js.map +1 -1
- package/lib-commonjs/hooks/useFocusFinders.d.ts +3 -2
- package/lib-commonjs/hooks/useFocusFinders.js +27 -35
- package/lib-commonjs/hooks/useFocusFinders.js.map +1 -1
- package/lib-commonjs/hooks/useFocusIndicatorStyle.d.ts +6 -7
- package/lib-commonjs/hooks/useFocusIndicatorStyle.js +41 -53
- package/lib-commonjs/hooks/useFocusIndicatorStyle.js.map +1 -1
- package/lib-commonjs/hooks/useFocusableGroup.d.ts +2 -16
- package/lib-commonjs/hooks/useFocusableGroup.js +23 -26
- package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardNavAttribute.js +13 -15
- package/lib-commonjs/hooks/useKeyboardNavAttribute.js.map +1 -1
- package/lib-commonjs/hooks/useModalAttributes.js +16 -18
- package/lib-commonjs/hooks/useModalAttributes.js.map +1 -1
- package/lib-commonjs/hooks/useTabster.js +10 -7
- package/lib-commonjs/hooks/useTabster.js.map +1 -1
- package/lib-commonjs/hooks/useTabsterAttributes.js +3 -3
- package/lib-commonjs/hooks/useTabsterAttributes.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/symbols.js +1 -1
- package/lib-commonjs/symbols.js.map +1 -1
- package/package.json +11 -11
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.createCustomFocusIndicatorStyle = exports.createFocusOutlineStyle = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
9
|
|
10
|
-
|
10
|
+
const symbols_1 = /*#__PURE__*/require("../symbols");
|
11
11
|
/**
|
12
12
|
* NOTE: the element with the focus outline needs to have `position: relative` so that the
|
13
13
|
* pseudo element can be properly positioned.
|
@@ -17,17 +17,19 @@ var symbols_1 = /*#__PURE__*/require("../symbols");
|
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
|
20
|
+
const getFocusOutlineStyles = options => {
|
21
21
|
var _a, _b, _c, _d;
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
23
|
+
const {
|
24
|
+
outlineRadius,
|
25
|
+
outlineColor,
|
26
|
+
outlineOffset,
|
27
|
+
outlineWidth
|
28
|
+
} = options;
|
29
|
+
const outlineOffsetTop = ((_a = outlineOffset) === null || _a === void 0 ? void 0 : _a.top) || outlineOffset;
|
30
|
+
const outlineOffsetBottom = ((_b = outlineOffset) === null || _b === void 0 ? void 0 : _b.bottom) || outlineOffset;
|
31
|
+
const outlineOffsetLeft = ((_c = outlineOffset) === null || _c === void 0 ? void 0 : _c.left) || outlineOffset;
|
32
|
+
const outlineOffsetRight = ((_d = outlineOffset) === null || _d === void 0 ? void 0 : _d.right) || outlineOffset;
|
31
33
|
return {
|
32
34
|
borderColor: 'transparent',
|
33
35
|
':after': {
|
@@ -40,15 +42,15 @@ var getFocusOutlineStyles = function (options) {
|
|
40
42
|
borderWidth: outlineWidth,
|
41
43
|
borderRadius: outlineRadius,
|
42
44
|
borderColor: outlineColor,
|
43
|
-
top: !outlineOffset ?
|
44
|
-
bottom: !outlineOffset ?
|
45
|
-
left: !outlineOffset ?
|
46
|
-
right: !outlineOffset ?
|
45
|
+
top: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetTop})`,
|
46
|
+
bottom: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetBottom})`,
|
47
|
+
left: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetLeft})`,
|
48
|
+
right: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetRight})`
|
47
49
|
}
|
48
50
|
};
|
49
51
|
};
|
50
52
|
|
51
|
-
|
53
|
+
const defaultOptions = {
|
52
54
|
selector: 'focus'
|
53
55
|
};
|
54
56
|
/**
|
@@ -60,50 +62,36 @@ var defaultOptions = {
|
|
60
62
|
* @returns focus outline styles object for @see makeStyles
|
61
63
|
*/
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
}
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
}
|
77
|
-
|
78
|
-
outlineRadius: theme.borderRadiusMedium,
|
79
|
-
// FIXME: theme.global.strokeWidth.thick causes some weird bugs
|
80
|
-
outlineWidth: '2px'
|
81
|
-
}, options.style)), _a;
|
82
|
-
};
|
65
|
+
const createFocusOutlineStyle = (options = {
|
66
|
+
style: {},
|
67
|
+
...defaultOptions
|
68
|
+
}) => ({
|
69
|
+
':focus-visible': {
|
70
|
+
outlineStyle: 'none'
|
71
|
+
},
|
72
|
+
[`${symbols_1.KEYBOARD_NAV_SELECTOR} :${options.selector || defaultOptions.selector}`]: getFocusOutlineStyles({
|
73
|
+
outlineColor: react_theme_1.tokens.colorStrokeFocus2,
|
74
|
+
outlineRadius: react_theme_1.tokens.borderRadiusMedium,
|
75
|
+
// FIXME: tokens.strokeWidthThick causes some weird bugs
|
76
|
+
outlineWidth: '2px',
|
77
|
+
...options.style
|
78
|
+
})
|
79
|
+
});
|
83
80
|
|
84
81
|
exports.createFocusOutlineStyle = createFocusOutlineStyle;
|
85
82
|
/**
|
86
|
-
* Creates a style
|
83
|
+
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
|
87
84
|
* Should be used only when @see createFocusOutlineStyle does not fit requirements
|
88
85
|
*
|
89
|
-
* @param
|
86
|
+
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyes
|
90
87
|
*/
|
91
88
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
}
|
96
|
-
|
97
|
-
|
98
|
-
var _a;
|
99
|
-
|
100
|
-
return _a = {
|
101
|
-
':focus-visible': {
|
102
|
-
outline: 'none'
|
103
|
-
}
|
104
|
-
}, _a[symbols_1.KEYBOARD_NAV_SELECTOR + " :" + (options.selector || defaultOptions.selector)] = typeof rule === 'function' ? rule(theme) : rule, _a;
|
105
|
-
};
|
106
|
-
};
|
89
|
+
const createCustomFocusIndicatorStyle = (style, options = defaultOptions) => ({
|
90
|
+
':focus-visible': {
|
91
|
+
outlineStyle: 'none'
|
92
|
+
},
|
93
|
+
[`${symbols_1.KEYBOARD_NAV_SELECTOR} :${options.selector || defaultOptions.selector}`]: style
|
94
|
+
});
|
107
95
|
|
108
96
|
exports.createCustomFocusIndicatorStyle = createCustomFocusIndicatorStyle;
|
109
97
|
//# sourceMappingURL=useFocusIndicatorStyle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hooks/useFocusIndicatorStyle.ts"],"names":[],"mappings":"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","sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { KEYBOARD_NAV_SELECTOR } from '../symbols';\nimport type { GriffelStyle } from '@griffel/react';\n\nexport type FocusOutlineOffset = Record<'top' | 'bottom' | 'left' | 'right', string>;\nexport type FocusOutlineStyleOptions = {\n /**\n * Only property not supported by the native CSS `outline`, if this is no longer needed\n * we can just go native instead\n */\n outlineRadius: string;\n outlineColor: string;\n outlineWidth: string;\n outlineOffset?: string | FocusOutlineOffset;\n};\n\n/**\n * NOTE: the element with the focus outline needs to have `position: relative` so that the\n * pseudo element can be properly positioned.\n *\n * @param options - Configures the style of the focus outline\n * @returns focus outline styles object\n */\nconst getFocusOutlineStyles = (options: FocusOutlineStyleOptions) => {\n const { outlineRadius, outlineColor, outlineOffset, outlineWidth } = options;\n\n const outlineOffsetTop = (outlineOffset as FocusOutlineOffset)?.top || outlineOffset;\n const outlineOffsetBottom = (outlineOffset as FocusOutlineOffset)?.bottom || outlineOffset;\n const outlineOffsetLeft = (outlineOffset as FocusOutlineOffset)?.left || outlineOffset;\n const outlineOffsetRight = (outlineOffset as FocusOutlineOffset)?.right || outlineOffset;\n\n return {\n borderColor: 'transparent',\n ':after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n boxSizing: 'outline-box',\n zIndex: 1,\n\n borderStyle: 'solid',\n borderWidth: outlineWidth,\n borderRadius: outlineRadius,\n borderColor: outlineColor,\n\n top: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetTop})`,\n bottom: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetBottom})`,\n left: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetLeft})`,\n right: !outlineOffset ? `-${outlineWidth}` : `calc(0px - ${outlineWidth} - ${outlineOffsetRight})`,\n },\n };\n};\n\nexport interface CreateFocusIndicatorStyleRuleOptions {\n selector?: 'focus' | 'focus-within';\n}\n\nconst defaultOptions: CreateFocusIndicatorStyleRuleOptions = {\n selector: 'focus',\n};\n\n/**\n * NOTE: The element with the focus outline needs to have `position: relative` so that the\n * pseudo element can be properly positioned.\n *\n * @param theme - Theme used in @see makeStyles\n * @param options - Configure the style of the focus outline\n * @returns focus outline styles object for @see makeStyles\n */\nexport const createFocusOutlineStyle = (\n options: {\n style: Partial<FocusOutlineStyleOptions>;\n } & CreateFocusIndicatorStyleRuleOptions = { style: {}, ...defaultOptions },\n): GriffelStyle => ({\n ':focus-visible': {\n outlineStyle: 'none',\n },\n [`${KEYBOARD_NAV_SELECTOR} :${options.selector || defaultOptions.selector}`]: getFocusOutlineStyles({\n outlineColor: tokens.colorStrokeFocus2,\n outlineRadius: tokens.borderRadiusMedium,\n // FIXME: tokens.strokeWidthThick causes some weird bugs\n outlineWidth: '2px',\n ...options.style,\n }),\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 getDefaultFocusOutlineStyes\n */\nexport const createCustomFocusIndicatorStyle = (\n style: GriffelStyle,\n options: CreateFocusIndicatorStyleRuleOptions = defaultOptions,\n): GriffelStyle => ({\n ':focus-visible': {\n outlineStyle: 'none',\n },\n [`${KEYBOARD_NAV_SELECTOR} :${options.selector || defaultOptions.selector}`]: style,\n});\n"],"sourceRoot":"../src/"}
|
@@ -1,23 +1,9 @@
|
|
1
1
|
import { Types } from 'tabster';
|
2
|
-
export declare enum FocusableGroupTabBehavior {
|
3
|
-
/**
|
4
|
-
* Tab will cycle into and out of the groupper content.
|
5
|
-
*/
|
6
|
-
Unlimited,
|
7
|
-
/**
|
8
|
-
* Tab will cycle out of the container, but not into it.
|
9
|
-
*/
|
10
|
-
Limited,
|
11
|
-
/**
|
12
|
-
* Tab only cycles the inner elements.
|
13
|
-
*/
|
14
|
-
LimitedTrapFocus
|
15
|
-
}
|
16
2
|
export interface UseFocusableGroupOptions {
|
17
3
|
/**
|
18
|
-
*
|
4
|
+
* Behavior for the Tab key.
|
19
5
|
*/
|
20
|
-
tabBehavior?:
|
6
|
+
tabBehavior?: 'unlimited' | 'limited' | 'limitedTrapFocus';
|
21
7
|
}
|
22
8
|
/**
|
23
9
|
* A hook that returns the necessary tabster attributes to support groupping.
|
@@ -3,40 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.useFocusableGroup =
|
6
|
+
exports.useFocusableGroup = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
9
9
|
|
10
|
-
|
10
|
+
const useTabsterAttributes_1 = /*#__PURE__*/require("./useTabsterAttributes");
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
var FocusableGroupTabBehavior;
|
15
|
-
|
16
|
-
(function (FocusableGroupTabBehavior) {
|
17
|
-
/**
|
18
|
-
* Tab will cycle into and out of the groupper content.
|
19
|
-
*/
|
20
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["Unlimited"] = tabster_1.Types.GroupperTabbabilities.Unlimited] = "Unlimited";
|
21
|
-
/**
|
22
|
-
* Tab will cycle out of the container, but not into it.
|
23
|
-
*/
|
24
|
-
|
25
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["Limited"] = tabster_1.Types.GroupperTabbabilities.Limited] = "Limited";
|
26
|
-
/**
|
27
|
-
* Tab only cycles the inner elements.
|
28
|
-
*/
|
29
|
-
|
30
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["LimitedTrapFocus"] = tabster_1.Types.GroupperTabbabilities.LimitedTrapFocus] = "LimitedTrapFocus";
|
31
|
-
})(FocusableGroupTabBehavior = exports.FocusableGroupTabBehavior || (exports.FocusableGroupTabBehavior = {}));
|
12
|
+
const useTabster_1 = /*#__PURE__*/require("./useTabster");
|
32
13
|
/**
|
33
14
|
* A hook that returns the necessary tabster attributes to support groupping.
|
34
15
|
* @param options - Options to configure keyboard navigation
|
35
16
|
*/
|
36
17
|
|
37
18
|
|
38
|
-
|
39
|
-
|
19
|
+
const useFocusableGroup = options => {
|
20
|
+
const tabster = useTabster_1.useTabster();
|
40
21
|
|
41
22
|
if (tabster) {
|
42
23
|
tabster_1.getGroupper(tabster);
|
@@ -44,10 +25,26 @@ var useFocusableGroup = function (options) {
|
|
44
25
|
|
45
26
|
return useTabsterAttributes_1.useTabsterAttributes({
|
46
27
|
groupper: {
|
47
|
-
tabbability: options === null || options === void 0 ? void 0 : options.tabBehavior
|
28
|
+
tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)
|
48
29
|
}
|
49
30
|
});
|
50
31
|
};
|
51
32
|
|
52
33
|
exports.useFocusableGroup = useFocusableGroup;
|
34
|
+
|
35
|
+
const getTabbability = tabBehavior => {
|
36
|
+
switch (tabBehavior) {
|
37
|
+
case 'unlimited':
|
38
|
+
return tabster_1.Types.GroupperTabbabilities.Unlimited;
|
39
|
+
|
40
|
+
case 'limited':
|
41
|
+
return tabster_1.Types.GroupperTabbabilities.Limited;
|
42
|
+
|
43
|
+
case 'limitedTrapFocus':
|
44
|
+
return tabster_1.Types.GroupperTabbabilities.LimitedTrapFocus;
|
45
|
+
|
46
|
+
default:
|
47
|
+
return undefined;
|
48
|
+
}
|
49
|
+
};
|
53
50
|
//# sourceMappingURL=useFocusableGroup.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hooks/useFocusableGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AASA;;;AAGG;;;AACI,MAAM,iBAAiB,GAAI,OAAD,IAAuC;AACtE,QAAM,OAAO,GAAG,YAAA,CAAA,UAAA,EAAhB;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,SAAA,CAAA,WAAA,CAAY,OAAZ;AACD;;AAED,SAAO,sBAAA,CAAA,oBAAA,CAAqB;AAC1B,IAAA,QAAQ,EAAE;AACR,MAAA,WAAW,EAAE,cAAc,CAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,WAAV;AADnB;AADgB,GAArB,CAAP;AAKD,CAZM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB;;AAcb,MAAM,cAAc,GAClB,WADqB,IAEoB;AACzC,UAAQ,WAAR;AACE,SAAK,WAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,qBAAN,CAA4B,SAAnC;;AACF,SAAK,SAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,qBAAN,CAA4B,OAAnC;;AACF,SAAK,kBAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,qBAAN,CAA4B,gBAAnC;;AACF;AACE,aAAO,SAAP;AARJ;AAUD,CAbD","sourcesContent":["import { Types, getGroupper } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseFocusableGroupOptions {\n /**\n * Behavior for the Tab key.\n */\n tabBehavior?: 'unlimited' | 'limited' | 'limitedTrapFocus';\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support groupping.\n * @param options - Options to configure keyboard navigation\n */\nexport const useFocusableGroup = (options?: UseFocusableGroupOptions) => {\n const tabster = useTabster();\n\n if (tabster) {\n getGroupper(tabster);\n }\n\n return useTabsterAttributes({\n groupper: {\n tabbability: getTabbability(options?.tabBehavior),\n },\n });\n};\n\nconst getTabbability = (\n tabBehavior?: UseFocusableGroupOptions['tabBehavior'],\n): Types.GroupperTabbability | undefined => {\n switch (tabBehavior) {\n case 'unlimited':\n return Types.GroupperTabbabilities.Unlimited;\n case 'limited':\n return Types.GroupperTabbabilities.Limited;\n case 'limitedTrapFocus':\n return Types.GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"sourceRoot":"../src/"}
|
@@ -5,36 +5,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useKeyboardNavAttribute = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const keyborg_1 = /*#__PURE__*/require("keyborg");
|
9
9
|
|
10
|
-
|
10
|
+
const react_1 = /*#__PURE__*/require("react");
|
11
11
|
|
12
|
-
|
12
|
+
const symbols_1 = /*#__PURE__*/require("../symbols");
|
13
13
|
|
14
|
-
|
14
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
15
15
|
/**
|
16
16
|
* instantiates keyborg and add attribute to ensure focus indicator synced to keyborg logic
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
20
|
function useKeyboardNavAttribute() {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
react_1.useEffect(
|
21
|
+
const {
|
22
|
+
targetDocument
|
23
|
+
} = react_shared_contexts_1.useFluent();
|
24
|
+
const keyborg = react_1.useMemo(() => targetDocument && keyborg_1.createKeyborg(targetDocument.defaultView), [targetDocument]);
|
25
|
+
const ref = react_1.useRef(null);
|
26
|
+
react_1.useEffect(() => {
|
27
27
|
if (keyborg) {
|
28
28
|
setBooleanAttribute(ref, symbols_1.KEYBOARD_NAV_ATTRIBUTE, keyborg.isNavigatingWithKeyboard());
|
29
29
|
|
30
|
-
|
30
|
+
const cb = next => {
|
31
31
|
setBooleanAttribute(ref, symbols_1.KEYBOARD_NAV_ATTRIBUTE, next);
|
32
32
|
};
|
33
33
|
|
34
|
-
keyborg.subscribe(
|
35
|
-
return
|
36
|
-
return keyborg.unsubscribe(cb_1);
|
37
|
-
};
|
34
|
+
keyborg.subscribe(cb);
|
35
|
+
return () => keyborg.unsubscribe(cb);
|
38
36
|
}
|
39
37
|
}, [keyborg]);
|
40
38
|
return ref;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hooks/useKeyboardNavAttribute.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;AAIA;;AAEG;;;AACH,SAAgB,uBAAhB,GAAuC;AACrC,QAAM;AAAE,IAAA;AAAF,MAAqB,uBAAA,CAAA,SAAA,EAA3B;AACA,QAAM,OAAO,GAAG,OAAA,CAAA,OAAA,CAAQ,MAAM,cAAc,IAAI,SAAA,CAAA,aAAA,CAAc,cAAc,CAAC,WAA7B,CAAhC,EAA4E,CAAC,cAAD,CAA5E,CAAhB;AACA,QAAM,GAAG,GAAG,OAAA,CAAA,MAAA,CAAU,IAAV,CAAZ;AACA,EAAA,OAAA,CAAA,SAAA,CAAU,MAAK;AACb,QAAI,OAAJ,EAAa;AACX,MAAA,mBAAmB,CAAC,GAAD,EAAM,SAAA,CAAA,sBAAN,EAA8B,OAAO,CAAC,wBAAR,EAA9B,CAAnB;;AACA,YAAM,EAAE,GAAoB,IAAI,IAAG;AACjC,QAAA,mBAAmB,CAAC,GAAD,EAAM,SAAA,CAAA,sBAAN,EAA8B,IAA9B,CAAnB;AACD,OAFD;;AAGA,MAAA,OAAO,CAAC,SAAR,CAAkB,EAAlB;AACA,aAAO,MAAM,OAAO,CAAC,WAAR,CAAoB,EAApB,CAAb;AACD;AACF,GATD,EASG,CAAC,OAAD,CATH;AAUA,SAAO,GAAP;AACD;;AAfD,OAAA,CAAA,uBAAA,GAAA,uBAAA;;AAiBA,SAAS,mBAAT,CAA6B,UAA7B,EAAiE,SAAjE,EAAoF,KAApF,EAAkG;AAChG,MAAI,CAAC,UAAU,CAAC,OAAhB,EAAyB;AACvB;AACD;;AACD,MAAI,KAAJ,EAAW;AACT,IAAA,UAAU,CAAC,OAAX,CAAmB,YAAnB,CAAgC,SAAhC,EAA2C,EAA3C;AACD,GAFD,MAEO;AACL,IAAA,UAAU,CAAC,OAAX,CAAmB,eAAnB,CAAmC,SAAnC;AACD;AACF","sourcesContent":["import { createKeyborg } from 'keyborg';\nimport { useEffect, useMemo, useRef } from 'react';\nimport { KEYBOARD_NAV_ATTRIBUTE } from '../symbols';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport type { KeyborgCallback } from 'keyborg/dist/Keyborg';\nimport type { RefObject } from 'react';\n\n/**\n * instantiates keyborg and add attribute to ensure focus indicator synced to keyborg logic\n */\nexport function useKeyboardNavAttribute<E extends HTMLElement>() {\n const { targetDocument } = useFluent();\n const keyborg = useMemo(() => targetDocument && createKeyborg(targetDocument.defaultView!), [targetDocument]);\n const ref = useRef<E>(null);\n useEffect(() => {\n if (keyborg) {\n setBooleanAttribute(ref, KEYBOARD_NAV_ATTRIBUTE, keyborg.isNavigatingWithKeyboard());\n const cb: KeyborgCallback = 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}\n\nfunction setBooleanAttribute(elementRef: RefObject<HTMLElement>, attribute: string, value: boolean) {\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"],"sourceRoot":"../src/"}
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useModalAttributes = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
9
|
|
10
|
-
|
10
|
+
const useTabsterAttributes_1 = /*#__PURE__*/require("./useTabsterAttributes");
|
11
11
|
|
12
|
-
|
12
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
13
13
|
|
14
|
-
|
14
|
+
const useTabster_1 = /*#__PURE__*/require("./useTabster");
|
15
15
|
/**
|
16
16
|
* Applies modal dialog behaviour through DOM attributes
|
17
17
|
* Modal element will focus trap and hide other content on the page
|
@@ -21,35 +21,33 @@ var useTabster_1 = /*#__PURE__*/require("./useTabster");
|
|
21
21
|
*/
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
alwaysFocusable = options.alwaysFocusable;
|
31
|
-
var tabster = useTabster_1.useTabster(); // Initializes the modalizer and deloser APIs
|
24
|
+
const useModalAttributes = (options = {}) => {
|
25
|
+
const {
|
26
|
+
trapFocus,
|
27
|
+
alwaysFocusable
|
28
|
+
} = options;
|
29
|
+
const tabster = useTabster_1.useTabster(); // Initializes the modalizer and deloser APIs
|
32
30
|
|
33
31
|
if (tabster) {
|
34
32
|
tabster_1.getModalizer(tabster);
|
35
33
|
tabster_1.getDeloser(tabster);
|
36
34
|
}
|
37
35
|
|
38
|
-
|
39
|
-
|
36
|
+
const id = react_utilities_1.useId('modal-');
|
37
|
+
const modalAttributes = useTabsterAttributes_1.useTabsterAttributes({
|
40
38
|
deloser: {},
|
41
39
|
modalizer: {
|
42
|
-
id
|
40
|
+
id,
|
43
41
|
isOthersAccessible: !trapFocus,
|
44
42
|
isAlwaysAccessible: alwaysFocusable
|
45
43
|
}
|
46
44
|
});
|
47
|
-
|
45
|
+
const triggerAttributes = useTabsterAttributes_1.useTabsterAttributes({
|
48
46
|
deloser: {}
|
49
47
|
});
|
50
48
|
return {
|
51
|
-
modalAttributes
|
52
|
-
triggerAttributes
|
49
|
+
modalAttributes,
|
50
|
+
triggerAttributes
|
53
51
|
};
|
54
52
|
};
|
55
53
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hooks/useModalAttributes.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAcA;;;;;;AAMG;;;AACI,MAAM,kBAAkB,GAAG,CAChC,OAAA,GAAqC,EADL,KAE8E;AAC9G,QAAM;AAAE,IAAA,SAAF;AAAa,IAAA;AAAb,MAAiC,OAAvC;AACA,QAAM,OAAO,GAAG,YAAA,CAAA,UAAA,EAAhB,CAF8G,CAG9G;;AACA,MAAI,OAAJ,EAAa;AACX,IAAA,SAAA,CAAA,YAAA,CAAa,OAAb;AACA,IAAA,SAAA,CAAA,UAAA,CAAW,OAAX;AACD;;AAED,QAAM,EAAE,GAAG,iBAAA,CAAA,KAAA,CAAM,QAAN,CAAX;AACA,QAAM,eAAe,GAAG,sBAAA,CAAA,oBAAA,CAAqB;AAC3C,IAAA,OAAO,EAAE,EADkC;AAE3C,IAAA,SAAS,EAAE;AAAE,MAAA,EAAF;AAAM,MAAA,kBAAkB,EAAE,CAAC,SAA3B;AAAsC,MAAA,kBAAkB,EAAE;AAA1D;AAFgC,GAArB,CAAxB;AAKA,QAAM,iBAAiB,GAAG,sBAAA,CAAA,oBAAA,CAAqB;AAC7C,IAAA,OAAO,EAAE;AADoC,GAArB,CAA1B;AAIA,SAAO;AAAE,IAAA,eAAF;AAAmB,IAAA;AAAnB,GAAP;AACD,CAtBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","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 */\n trapFocus?: boolean;\n\n /**\n * Always reachabled in Tab order\n */\n alwaysFocusable?: boolean;\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 } = 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-');\n const modalAttributes = useTabsterAttributes({\n deloser: {},\n modalizer: { id, isOthersAccessible: !trapFocus, isAlwaysAccessible: alwaysFocusable },\n });\n\n const triggerAttributes = useTabsterAttributes({\n deloser: {},\n });\n\n return { modalAttributes, triggerAttributes };\n};\n"],"sourceRoot":"../src/"}
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useTabster = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
9
9
|
|
10
|
-
|
10
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
11
11
|
/**
|
12
12
|
* Tries to get a tabster instance on the current window or creates a new one
|
13
13
|
* Since Tabster is single instance only, feel free to call this hook to ensure Tabster exists if necessary
|
@@ -17,13 +17,16 @@ var tabster_1 = /*#__PURE__*/require("tabster");
|
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
|
20
|
+
const useTabster = () => {
|
21
21
|
var _a;
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
const {
|
24
|
+
targetDocument
|
25
|
+
} = react_shared_contexts_1.useFluent();
|
26
|
+
const defaultView = (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) || undefined;
|
27
|
+
const tabsterOptions = {
|
28
|
+
autoRoot: {},
|
29
|
+
controlTab: false
|
27
30
|
};
|
28
31
|
|
29
32
|
if (!defaultView) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hooks/useTabster.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;AAEA;;;;;;AAMG;;;AACI,MAAM,UAAU,GAAG,MAAsC;;;AAC9D,QAAM;AAAE,IAAA;AAAF,MAAqB,uBAAA,CAAA,SAAA,EAA3B;AAEA,QAAM,WAAW,GAAG,CAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,WAAhB,KAA+B,SAAnD;AACA,QAAM,cAAc,GAAkC;AAAE,IAAA,QAAQ,EAAE,EAAZ;AAAgB,IAAA,UAAU,EAAE;AAA5B,GAAtD;;AAEA,MAAI,CAAC,WAAL,EAAkB;AAChB,WAAO,IAAP;AACD,GAR6D,CAU9D;;;AACA,SAAO,CAAA,EAAA,GAAA,SAAA,CAAA,iBAAA,CAAkB,WAAlB,CAAA,MAA8B,IAA9B,IAA8B,EAAA,KAAA,KAAA,CAA9B,GAA8B,EAA9B,GAAkC,SAAA,CAAA,aAAA,CAAc,WAAd,EAA2B,cAA3B,CAAzC;AACD,CAZM;;AAAM,OAAA,CAAA,UAAA,GAAU,UAAV","sourcesContent":["import { useFluent } from '@fluentui/react-shared-contexts';\nimport { getCurrentTabster, createTabster, Types as TabsterTypes } from 'tabster';\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 tabsterOptions: TabsterTypes.TabsterCoreProps = { autoRoot: {}, controlTab: false };\n\n if (!defaultView) {\n return null;\n }\n\n // TODO: worth memoizing once more tabster options are used\n return getCurrentTabster(defaultView) ?? createTabster(defaultView, tabsterOptions);\n};\n"],"sourceRoot":"../src/"}
|
@@ -5,15 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useTabsterAttributes = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const tabster_1 = /*#__PURE__*/require("tabster");
|
9
9
|
|
10
|
-
|
10
|
+
const useTabster_1 = /*#__PURE__*/require("./useTabster");
|
11
11
|
/**
|
12
12
|
* Hook that returns tabster attributes while ensuring tabster exists
|
13
13
|
*/
|
14
14
|
|
15
15
|
|
16
|
-
|
16
|
+
const useTabsterAttributes = props => {
|
17
17
|
// A tabster instance is not necessary to generate tabster attributes
|
18
18
|
// but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same
|
19
19
|
useTabster_1.useTabster();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hooks/useTabsterAttributes.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAEA;;AAEG;;;AACI,MAAM,oBAAoB,GAAI,KAAD,IAAgF;AAClH;AACA;AACA,EAAA,YAAA,CAAA,UAAA;AAEA,SAAO,SAAA,CAAA,mBAAA,CAAoB,KAApB,CAAP;AACD,CANM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import { getTabsterAttribute, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\n/**\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"],"sourceRoot":"../src/"}
|
package/lib-commonjs/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './hooks/index';\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/symbols.js
CHANGED
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.KEYBOARD_NAV_SELECTOR = exports.KEYBOARD_NAV_ATTRIBUTE = void 0;
|
7
7
|
exports.KEYBOARD_NAV_ATTRIBUTE = 'data-keyboard-nav';
|
8
|
-
exports.KEYBOARD_NAV_SELECTOR =
|
8
|
+
exports.KEYBOARD_NAV_SELECTOR = `:global([${exports.KEYBOARD_NAV_ATTRIBUTE}])`;
|
9
9
|
//# sourceMappingURL=symbols.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["symbols.ts"],"names":[],"mappings":";;;;;;AAAa,OAAA,CAAA,sBAAA,GAAyB,mBAAzB;AACA,OAAA,CAAA,qBAAA,GAAwB,YAAY,OAAA,CAAA,sBAAsB,IAA1D","sourcesContent":["export const KEYBOARD_NAV_ATTRIBUTE = 'data-keyboard-nav' as const;\nexport const KEYBOARD_NAV_SELECTOR = `:global([${KEYBOARD_NAV_ATTRIBUTE}])` as const;\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "9.0.0-
|
3
|
+
"version": "9.0.0-rc.4",
|
4
4
|
"description": "Utilities for focus management and facade for tabster",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -17,11 +17,12 @@
|
|
17
17
|
"code-style": "just-scripts code-style",
|
18
18
|
"just": "just-scripts",
|
19
19
|
"lint": "just-scripts lint",
|
20
|
-
"storybook": "
|
20
|
+
"storybook": "node ../../scripts/storybook/runner",
|
21
21
|
"test": "jest --passWithNoTests",
|
22
22
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
23
|
-
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-tabster/src && yarn docs",
|
24
|
-
"start": "yarn storybook"
|
23
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-tabster/src && yarn docs",
|
24
|
+
"start": "yarn storybook",
|
25
|
+
"type-check": "tsc -b tsconfig.json"
|
25
26
|
},
|
26
27
|
"devDependencies": {
|
27
28
|
"@fluentui/eslint-plugin": "*",
|
@@ -34,12 +35,12 @@
|
|
34
35
|
"react-test-renderer": "^16.3.0"
|
35
36
|
},
|
36
37
|
"dependencies": {
|
37
|
-
"@
|
38
|
-
"@fluentui/react-
|
39
|
-
"@fluentui/react-
|
40
|
-
"@fluentui/react-utilities": "9.0.0-
|
41
|
-
"keyborg": "^1.
|
42
|
-
"tabster": "^1.
|
38
|
+
"@griffel/react": "1.0.0",
|
39
|
+
"@fluentui/react-shared-contexts": "9.0.0-rc.3",
|
40
|
+
"@fluentui/react-theme": "9.0.0-rc.3",
|
41
|
+
"@fluentui/react-utilities": "9.0.0-rc.4",
|
42
|
+
"keyborg": "^1.1.0",
|
43
|
+
"tabster": "^1.1.1",
|
43
44
|
"tslib": "^2.1.0"
|
44
45
|
},
|
45
46
|
"peerDependencies": {
|
@@ -49,7 +50,6 @@
|
|
49
50
|
"react-dom": ">=16.8.0 <18.0.0"
|
50
51
|
},
|
51
52
|
"beachball": {
|
52
|
-
"tag": "beta",
|
53
53
|
"disallowedChangeTypes": [
|
54
54
|
"major",
|
55
55
|
"minor",
|