@fluentui/react-tabster 9.13.2 → 9.13.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 +38 -2
- package/CHANGELOG.md +22 -3
- package/dist/index.d.ts +23 -0
- package/lib/focus/createCustomFocusIndicatorStyle.js +23 -0
- package/lib/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,43 @@
|
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Thu, 05 Oct 2023 15:17:59 GMT",
|
6
|
+
"tag": "@fluentui/react-tabster_v9.13.4",
|
7
|
+
"version": "9.13.4",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
12
|
+
"package": "@fluentui/react-tabster",
|
13
|
+
"commit": "face7fef2060504eb2c5f27c9c7b1de1ff6cab76",
|
14
|
+
"comment": "chore: adds comments on createCustomFocusIndicatorStyle to explain that the default outline style is not removed"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-tabster",
|
19
|
+
"comment": "Bump @fluentui/react-utilities to v9.14.1",
|
20
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"date": "Wed, 04 Oct 2023 08:45:47 GMT",
|
27
|
+
"tag": "@fluentui/react-tabster_v9.13.3",
|
28
|
+
"version": "9.13.3",
|
29
|
+
"comments": {
|
30
|
+
"patch": [
|
31
|
+
{
|
32
|
+
"author": "beachball",
|
33
|
+
"package": "@fluentui/react-tabster",
|
34
|
+
"comment": "Bump @fluentui/react-utilities to v9.14.0",
|
35
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
36
|
+
}
|
37
|
+
]
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"date": "Mon, 02 Oct 2023 08:56:05 GMT",
|
6
42
|
"tag": "@fluentui/react-tabster_v9.13.2",
|
7
43
|
"version": "9.13.2",
|
8
44
|
"comments": {
|
@@ -11,7 +47,7 @@
|
|
11
47
|
"author": "beachball",
|
12
48
|
"package": "@fluentui/react-tabster",
|
13
49
|
"comment": "Bump @fluentui/react-shared-contexts to v9.9.2",
|
14
|
-
"commit": "
|
50
|
+
"commit": "da9a08817e5de95639e2dd7aa6d6709d47faa7f4"
|
15
51
|
}
|
16
52
|
]
|
17
53
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,17 +1,36 @@
|
|
1
1
|
# Change Log - @fluentui/react-tabster
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 05 Oct 2023 15:17:59 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.13.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.13.4)
|
8
|
+
|
9
|
+
Thu, 05 Oct 2023 15:17:59 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.13.3..@fluentui/react-tabster_v9.13.4)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- chore: adds comments on createCustomFocusIndicatorStyle to explain that the default outline style is not removed ([PR #29336](https://github.com/microsoft/fluentui/pull/29336) by bernardo.sunderhus@gmail.com)
|
15
|
+
- Bump @fluentui/react-utilities to v9.14.1 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
16
|
+
|
17
|
+
## [9.13.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.13.3)
|
18
|
+
|
19
|
+
Wed, 04 Oct 2023 08:45:47 GMT
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.13.2..@fluentui/react-tabster_v9.13.3)
|
21
|
+
|
22
|
+
### Patches
|
23
|
+
|
24
|
+
- Bump @fluentui/react-utilities to v9.14.0 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
25
|
+
|
7
26
|
## [9.13.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.13.2)
|
8
27
|
|
9
|
-
Mon, 02 Oct 2023 08:
|
28
|
+
Mon, 02 Oct 2023 08:56:05 GMT
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.13.1..@fluentui/react-tabster_v9.13.2)
|
11
30
|
|
12
31
|
### Patches
|
13
32
|
|
14
|
-
- Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #
|
33
|
+
- Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #29301](https://github.com/microsoft/fluentui/pull/29301) by beachball)
|
15
34
|
|
16
35
|
## [9.13.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.13.1)
|
17
36
|
|
package/dist/index.d.ts
CHANGED
@@ -15,6 +15,29 @@ export declare function applyFocusVisiblePolyfill(scope: HTMLElement, targetWind
|
|
15
15
|
* Creates a style for @see makeStyles that includes the necessary selectors for focus.
|
16
16
|
* Should be used only when @see createFocusOutlineStyle does not fit requirements
|
17
17
|
*
|
18
|
+
* If you're using `createCustomFocusIndicatorStyle` instead of `createFocusOutlineStyle`
|
19
|
+
* keep in mind that the default outline style is not going to be removed
|
20
|
+
* (as it is in `createFocusOutlineStyle`),
|
21
|
+
* and is your responsibility to manually remove it from your styles.
|
22
|
+
*
|
23
|
+
* @example
|
24
|
+
* ```ts
|
25
|
+
* // Link styles
|
26
|
+
* const useStyles = makeStyles({
|
27
|
+
focusIndicator: createCustomFocusIndicatorStyle({
|
28
|
+
textDecorationColor: tokens.colorStrokeFocus2,
|
29
|
+
textDecorationLine: 'underline',
|
30
|
+
textDecorationStyle: 'double',
|
31
|
+
outlineStyle: 'none',
|
32
|
+
}),
|
33
|
+
// Common styles.
|
34
|
+
root: {
|
35
|
+
// ❗️ DO NOT FORGET TO REMOVE THE DEFAULT OUTLINE STYLE
|
36
|
+
':focus-visible': {
|
37
|
+
outlineStyle: 'none',
|
38
|
+
},
|
39
|
+
* ```
|
40
|
+
*
|
18
41
|
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
|
19
42
|
* @param options - Configure the style of the focus outline
|
20
43
|
*/
|
@@ -3,6 +3,29 @@ 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
|
+
* If you're using `createCustomFocusIndicatorStyle` instead of `createFocusOutlineStyle`
|
7
|
+
* keep in mind that the default outline style is not going to be removed
|
8
|
+
* (as it is in `createFocusOutlineStyle`),
|
9
|
+
* and is your responsibility to manually remove it from your styles.
|
10
|
+
*
|
11
|
+
* @example
|
12
|
+
* ```ts
|
13
|
+
* // Link styles
|
14
|
+
* const useStyles = makeStyles({
|
15
|
+
focusIndicator: createCustomFocusIndicatorStyle({
|
16
|
+
textDecorationColor: tokens.colorStrokeFocus2,
|
17
|
+
textDecorationLine: 'underline',
|
18
|
+
textDecorationStyle: 'double',
|
19
|
+
outlineStyle: 'none',
|
20
|
+
}),
|
21
|
+
// Common styles.
|
22
|
+
root: {
|
23
|
+
// ❗️ DO NOT FORGET TO REMOVE THE DEFAULT OUTLINE STYLE
|
24
|
+
':focus-visible': {
|
25
|
+
outlineStyle: 'none',
|
26
|
+
},
|
27
|
+
* ```
|
28
|
+
*
|
6
29
|
* @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
|
7
30
|
* @param options - Configure the style of the focus outline
|
8
31
|
*/ export function createCustomFocusIndicatorStyle(style, { selector: selectorType = defaultOptions.selector, customizeSelector = defaultOptions.customizeSelector } = defaultOptions) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["createCustomFocusIndicatorStyle.ts"],"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 * @alias selectorType\n */\n selector?: 'focus' | 'focus-within';\n /**\n * Customizes the selector provided based on the selector type.\n */\n customizeSelector?: (selector: string) => string;\n /**\n * Enables the browser default outline style\n * @deprecated The custom focus indicator no longer affects outline styles. Outline is overridden\n * in the default focus indicator function, `createFocusOutlineStyle`.\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: selectorType = defaultOptions.selector,\n customizeSelector = defaultOptions.customizeSelector,\n }: CreateCustomFocusIndicatorStyleOptions = defaultOptions,\n): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle {\n return { [customizeSelector(createBaseSelector(selectorType))]: style };\n}\n\nfunction createBaseSelector(selectorType: 'focus' | 'focus-within'): string {\n switch (selectorType) {\n case 'focus':\n return `&[${FOCUS_VISIBLE_ATTR}]`;\n case 'focus-within':\n return `&[${FOCUS_WITHIN_ATTR}]:focus-within`;\n }\n}\n"],"names":["defaultOptions","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR","createCustomFocusIndicatorStyle","style","selector","selectorType","customizeSelector","createBaseSelector"],"mappings":"AAAA,SAASA,cAAc,EAAEC,kBAAkB,EAAEC,iBAAiB,QAAQ,cAAc;AA4BpF
|
1
|
+
{"version":3,"sources":["createCustomFocusIndicatorStyle.ts"],"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 * @alias selectorType\n */\n selector?: 'focus' | 'focus-within';\n /**\n * Customizes the selector provided based on the selector type.\n */\n customizeSelector?: (selector: string) => string;\n /**\n * Enables the browser default outline style\n * @deprecated The custom focus indicator no longer affects outline styles. Outline is overridden\n * in the default focus indicator function, `createFocusOutlineStyle`.\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 * If you're using `createCustomFocusIndicatorStyle` instead of `createFocusOutlineStyle`\n * keep in mind that the default outline style is not going to be removed\n * (as it is in `createFocusOutlineStyle`),\n * and is your responsibility to manually remove it from your styles.\n *\n * @example\n * ```ts\n * // Link styles\n * const useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n outlineStyle: 'none',\n }),\n // Common styles.\n root: {\n // ❗️ DO NOT FORGET TO REMOVE THE DEFAULT OUTLINE STYLE\n ':focus-visible': {\n outlineStyle: 'none',\n },\n * ```\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: selectorType = defaultOptions.selector,\n customizeSelector = defaultOptions.customizeSelector,\n }: CreateCustomFocusIndicatorStyleOptions = defaultOptions,\n): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle {\n return { [customizeSelector(createBaseSelector(selectorType))]: style };\n}\n\nfunction createBaseSelector(selectorType: 'focus' | 'focus-within'): string {\n switch (selectorType) {\n case 'focus':\n return `&[${FOCUS_VISIBLE_ATTR}]`;\n case 'focus-within':\n return `&[${FOCUS_WITHIN_ATTR}]:focus-within`;\n }\n}\n"],"names":["defaultOptions","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR","createCustomFocusIndicatorStyle","style","selector","selectorType","customizeSelector","createBaseSelector"],"mappings":"AAAA,SAASA,cAAc,EAAEC,kBAAkB,EAAEC,iBAAiB,QAAQ,cAAc;AA4BpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,SAASC,gCACdC,KAAa,EACb,EACEC,UAAUC,eAAeN,eAAeK,QAAQ,EAChDE,oBAAoBP,eAAeO,iBAAiB,EACb,GAAGP,cAAc;IAE1D,OAAO;QAAE,CAACO,kBAAkBC,mBAAmBF,eAAe,EAAEF;IAAM;AACxE;AAEA,SAASI,mBAAmBF,YAAsC;IAChE,OAAQA;QACN,KAAK;YACH,OAAO,CAAC,EAAE,EAAEL,mBAAmB,CAAC,CAAC;QACnC,KAAK;YACH,OAAO,CAAC,EAAE,EAAEC,kBAAkB,cAAc,CAAC;IACjD;AACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["createCustomFocusIndicatorStyle.js"],"sourcesContent":["import { defaultOptions, FOCUS_VISIBLE_ATTR, FOCUS_WITHIN_ATTR } from './constants';\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 */ export function createCustomFocusIndicatorStyle(style, { selector: selectorType = defaultOptions.selector, customizeSelector = defaultOptions.customizeSelector } = defaultOptions) {\n return {\n [customizeSelector(createBaseSelector(selectorType))]: style\n };\n}\nfunction createBaseSelector(selectorType) {\n switch(selectorType){\n case 'focus':\n return `&[${FOCUS_VISIBLE_ATTR}]`;\n case 'focus-within':\n return `&[${FOCUS_WITHIN_ATTR}]:focus-within`;\n }\n}\n"],"names":["createCustomFocusIndicatorStyle","style","selector","selectorType","defaultOptions","customizeSelector","createBaseSelector","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR"],"mappings":";;;;+
|
1
|
+
{"version":3,"sources":["createCustomFocusIndicatorStyle.js"],"sourcesContent":["import { defaultOptions, FOCUS_VISIBLE_ATTR, FOCUS_WITHIN_ATTR } from './constants';\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 * If you're using `createCustomFocusIndicatorStyle` instead of `createFocusOutlineStyle`\n * keep in mind that the default outline style is not going to be removed\n * (as it is in `createFocusOutlineStyle`),\n * and is your responsibility to manually remove it from your styles.\n *\n * @example\n * ```ts\n * // Link styles\n * const useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n outlineStyle: 'none',\n }),\n // Common styles.\n root: {\n // ❗️ DO NOT FORGET TO REMOVE THE DEFAULT OUTLINE STYLE\n ':focus-visible': {\n outlineStyle: 'none',\n },\n * ```\n *\n * @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles\n * @param options - Configure the style of the focus outline\n */ export function createCustomFocusIndicatorStyle(style, { selector: selectorType = defaultOptions.selector, customizeSelector = defaultOptions.customizeSelector } = defaultOptions) {\n return {\n [customizeSelector(createBaseSelector(selectorType))]: style\n };\n}\nfunction createBaseSelector(selectorType) {\n switch(selectorType){\n case 'focus':\n return `&[${FOCUS_VISIBLE_ATTR}]`;\n case 'focus-within':\n return `&[${FOCUS_WITHIN_ATTR}]:focus-within`;\n }\n}\n"],"names":["createCustomFocusIndicatorStyle","style","selector","selectorType","defaultOptions","customizeSelector","createBaseSelector","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR"],"mappings":";;;;+BA8BoBA;;;eAAAA;;;2BA9BkD;AA8B3D,SAASA,gCAAgCC,KAAK,EAAE,EAAEC,UAAUC,eAAeC,yBAAc,CAACF,QAAQ,EAAEG,oBAAoBD,yBAAc,CAACC,iBAAiB,EAAE,GAAGD,yBAAc;IAClL,OAAO;QACH,CAACC,kBAAkBC,mBAAmBH,eAAe,EAAEF;IAC3D;AACJ;AACA,SAASK,mBAAmBH,YAAY;IACpC,OAAOA;QACH,KAAK;YACD,OAAO,CAAC,EAAE,EAAEI,6BAAkB,CAAC,CAAC,CAAC;QACrC,KAAK;YACD,OAAO,CAAC,EAAE,EAAEC,4BAAiB,CAAC,cAAc,CAAC;IACrD;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "9.13.
|
3
|
+
"version": "9.13.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",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"dependencies": {
|
34
34
|
"@fluentui/react-shared-contexts": "^9.9.2",
|
35
35
|
"@fluentui/react-theme": "^9.1.14",
|
36
|
-
"@fluentui/react-utilities": "^9.
|
36
|
+
"@fluentui/react-utilities": "^9.14.1",
|
37
37
|
"@griffel/react": "^1.5.14",
|
38
38
|
"@swc/helpers": "^0.5.1",
|
39
39
|
"keyborg": "^2.0.0",
|