@fluentui/react-tabster 0.0.0-nightly-20221130-0423.1 → 0.0.0-nightly-20221201-0421.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/dist/index.d.ts +5 -2
- package/lib/focus/createCustomFocusIndicatorStyle.js +18 -16
- package/lib/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js +18 -16
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-tabster_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Thu, 01 Dec 2022 04:28:21 GMT",
|
6
|
+
"tag": "@fluentui/react-tabster_v0.0.0-nightly-20221201-0421.1",
|
7
|
+
"version": "0.0.0-nightly-20221201-0421.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,20 +16,20 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-tabster",
|
19
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221201-0421.1",
|
20
|
+
"commit": "faa4abbc22423e77539f79696a14d972ecc6a0c2"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-tabster",
|
25
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221201-0421.1",
|
26
|
+
"commit": "faa4abbc22423e77539f79696a14d972ecc6a0c2"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-tabster",
|
31
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221201-0421.1",
|
32
|
+
"commit": "faa4abbc22423e77539f79696a14d972ecc6a0c2"
|
33
33
|
}
|
34
34
|
]
|
35
35
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
# Change Log - @fluentui/react-tabster
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 01 Dec 2022 04:28:21 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20221201-0421.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v0.0.0-nightly-20221201-0421.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.3.1..@fluentui/react-tabster_v0.0.0-nightly-
|
9
|
+
Thu, 01 Dec 2022 04:28:21 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.3.1..@fluentui/react-tabster_v0.0.0-nightly-20221201-0421.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221201-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/faa4abbc22423e77539f79696a14d972ecc6a0c2) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20221201-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/faa4abbc22423e77539f79696a14d972ecc6a0c2) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20221201-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/faa4abbc22423e77539f79696a14d972ecc6a0c2) by beachball)
|
18
18
|
|
19
19
|
## [9.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.3.1)
|
20
20
|
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { GriffelStyle } from '@griffel/react';
|
2
|
+
import { makeResetStyles } from '@griffel/react';
|
2
3
|
import * as React_2 from 'react';
|
3
4
|
import type { RefObject } from 'react';
|
4
5
|
import { Types } from 'tabster';
|
@@ -14,10 +15,10 @@ export declare function applyFocusVisiblePolyfill(scope: HTMLElement, win: Windo
|
|
14
15
|
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
|
15
16
|
* Should be used only when @see createFocusOutlineStyle does not fit requirements
|
16
17
|
*
|
17
|
-
* @param style - styling applied on focus, defaults to @see
|
18
|
+
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
|
18
19
|
* @param options - Configure the style of the focus outline
|
19
20
|
*/
|
20
|
-
export declare
|
21
|
+
export declare function createCustomFocusIndicatorStyle<TStyle extends GriffelStyle | GriffelResetStyle>(style: TStyle, { selector, enableOutline, }?: CreateCustomFocusIndicatorStyleOptions): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle;
|
21
22
|
|
22
23
|
export declare interface CreateCustomFocusIndicatorStyleOptions {
|
23
24
|
selector?: 'focus' | 'focus-within';
|
@@ -54,6 +55,8 @@ export declare type FocusOutlineStyleOptions = {
|
|
54
55
|
outlineOffset?: string | FocusOutlineOffset;
|
55
56
|
};
|
56
57
|
|
58
|
+
declare type GriffelResetStyle = Parameters<typeof makeResetStyles>[0];
|
59
|
+
|
57
60
|
/**
|
58
61
|
* A hook that returns the necessary tabster attributes to support arrow key navigation
|
59
62
|
* @param options - Options to configure keyboard navigation
|
@@ -3,25 +3,27 @@ import { defaultOptions, FOCUS_VISIBLE_ATTR, FOCUS_WITHIN_ATTR } from './constan
|
|
3
3
|
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
|
4
4
|
* Should be used only when @see createFocusOutlineStyle does not fit requirements
|
5
5
|
*
|
6
|
-
* @param style - styling applied on focus, defaults to @see
|
6
|
+
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
|
7
7
|
* @param options - Configure the style of the focus outline
|
8
8
|
*/
|
9
9
|
|
10
|
-
export
|
10
|
+
export function createCustomFocusIndicatorStyle(style, {
|
11
11
|
selector = defaultOptions.selector,
|
12
12
|
enableOutline = false
|
13
|
-
} = defaultOptions)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
})
|
13
|
+
} = defaultOptions) {
|
14
|
+
return {
|
15
|
+
':focus': {
|
16
|
+
outlineStyle: enableOutline ? undefined : 'none'
|
17
|
+
},
|
18
|
+
':focus-visible': {
|
19
|
+
outlineStyle: enableOutline ? undefined : 'none'
|
20
|
+
},
|
21
|
+
...(selector === 'focus' && {
|
22
|
+
[`&[${FOCUS_VISIBLE_ATTR}]`]: style
|
23
|
+
}),
|
24
|
+
...(selector === 'focus-within' && {
|
25
|
+
[`&[${FOCUS_WITHIN_ATTR}]:${selector}`]: style
|
26
|
+
})
|
27
|
+
};
|
28
|
+
}
|
27
29
|
//# sourceMappingURL=createCustomFocusIndicatorStyle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts"],"names":[],"mappings":"AAAA,SAAS,cAAT,EAAyB,kBAAzB,EAA6C,iBAA7C,QAAsE,aAAtE;
|
1
|
+
{"version":3,"sources":["../../../../../../../../packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts"],"names":[],"mappings":"AAAA,SAAS,cAAT,EAAyB,kBAAzB,EAA6C,iBAA7C,QAAsE,aAAtE;AAiBA;;;;;;AAMG;;AACH,OAAM,SAAU,+BAAV,CACJ,KADI,EAEJ;EACE,QAAQ,GAAG,cAAc,CAAC,QAD5B;EAEE,aAAa,GAAG;AAFlB,IAG4C,cALxC,EAKsD;EAE1D,OAAO;IACL,UAAU;MACR,YAAY,EAAE,aAAa,GAAG,SAAH,GAAe;IADlC,CADL;IAIL,kBAAkB;MAChB,YAAY,EAAE,aAAa,GAAG,SAAH,GAAe;IAD1B,CAJb;IAQL,IAAI,QAAQ,KAAK,OAAb,IAAwB;MAC1B,CAAC,KAAK,kBAAkB,GAAxB,GAA8B;IADJ,CAA5B,CARK;IAWL,IAAI,QAAQ,KAAK,cAAb,IAA+B;MACjC,CAAC,KAAK,iBAAiB,KAAK,QAAQ,EAApC,GAAyC;IADR,CAAnC;EAXK,CAAP;AAeD","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 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"],"sourceRoot":""}
|
@@ -10,28 +10,30 @@ const constants_1 = /*#__PURE__*/require("./constants");
|
|
10
10
|
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
|
11
11
|
* Should be used only when @see createFocusOutlineStyle does not fit requirements
|
12
12
|
*
|
13
|
-
* @param style - styling applied on focus, defaults to @see
|
13
|
+
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
|
14
14
|
* @param options - Configure the style of the focus outline
|
15
15
|
*/
|
16
16
|
|
17
17
|
|
18
|
-
|
18
|
+
function createCustomFocusIndicatorStyle(style, {
|
19
19
|
selector = constants_1.defaultOptions.selector,
|
20
20
|
enableOutline = false
|
21
|
-
} = constants_1.defaultOptions)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
})
|
21
|
+
} = constants_1.defaultOptions) {
|
22
|
+
return {
|
23
|
+
':focus': {
|
24
|
+
outlineStyle: enableOutline ? undefined : 'none'
|
25
|
+
},
|
26
|
+
':focus-visible': {
|
27
|
+
outlineStyle: enableOutline ? undefined : 'none'
|
28
|
+
},
|
29
|
+
...(selector === 'focus' && {
|
30
|
+
[`&[${constants_1.FOCUS_VISIBLE_ATTR}]`]: style
|
31
|
+
}),
|
32
|
+
...(selector === 'focus-within' && {
|
33
|
+
[`&[${constants_1.FOCUS_WITHIN_ATTR}]:${selector}`]: style
|
34
|
+
})
|
35
|
+
};
|
36
|
+
}
|
35
37
|
|
36
38
|
exports.createCustomFocusIndicatorStyle = createCustomFocusIndicatorStyle;
|
37
39
|
//# sourceMappingURL=createCustomFocusIndicatorStyle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;
|
1
|
+
{"version":3,"sources":["../../../../../../../../packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAiBA;;;;;;AAMG;;;AACH,SAAgB,+BAAhB,CACE,KADF,EAEE;EACE,QAAQ,GAAG,WAAA,CAAA,cAAA,CAAe,QAD5B;EAEE,aAAa,GAAG;AAFlB,IAG4C,WAAA,CAAA,cAL9C,EAK4D;EAE1D,OAAO;IACL,UAAU;MACR,YAAY,EAAE,aAAa,GAAG,SAAH,GAAe;IADlC,CADL;IAIL,kBAAkB;MAChB,YAAY,EAAE,aAAa,GAAG,SAAH,GAAe;IAD1B,CAJb;IAQL,IAAI,QAAQ,KAAK,OAAb,IAAwB;MAC1B,CAAC,KAAK,WAAA,CAAA,kBAAkB,GAAxB,GAA8B;IADJ,CAA5B,CARK;IAWL,IAAI,QAAQ,KAAK,cAAb,IAA+B;MACjC,CAAC,KAAK,WAAA,CAAA,iBAAiB,KAAK,QAAQ,EAApC,GAAyC;IADR,CAAnC;EAXK,CAAP;AAeD;;AAtBD,OAAA,CAAA,+BAAA,GAAA,+BAAA","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 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"],"sourceRoot":""}
|
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-20221201-0421.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",
|
@@ -31,9 +31,9 @@
|
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
33
|
"@griffel/react": "^1.4.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-20221201-0421.1",
|
35
|
+
"@fluentui/react-theme": "0.0.0-nightly-20221201-0421.1",
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20221201-0421.1",
|
37
37
|
"keyborg": "^1.2.1",
|
38
38
|
"tabster": "^3.0.4",
|
39
39
|
"tslib": "^2.1.0"
|