@fluentui/react-tabster 9.21.3 → 9.21.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.md
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
# Change Log - @fluentui/react-tabster
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 23 May 2024 07:58:01 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.21.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.21.4)
|
8
|
+
|
9
|
+
Thu, 23 May 2024 07:58:01 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.21.3..@fluentui/react-tabster_v9.21.4)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix: bump tabster to 7.1.4 containing fix for https://github.com/microsoft/tabster/issues/374. ([PR #31413](https://github.com/microsoft/fluentui/pull/31413) by marata@microsoft.com)
|
15
|
+
- chore: replace usage of .shorthands() in styles ([PR #31432](https://github.com/microsoft/fluentui/pull/31432) by olfedias@microsoft.com)
|
16
|
+
|
7
17
|
## [9.21.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.21.3)
|
8
18
|
|
9
|
-
Mon, 20 May 2024 12:
|
19
|
+
Mon, 20 May 2024 12:45:06 GMT
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.21.2..@fluentui/react-tabster_v9.21.3)
|
11
21
|
|
12
22
|
### Patches
|
@@ -35,11 +35,9 @@ import { defaultOptions } from './constants';
|
|
35
35
|
position: 'absolute',
|
36
36
|
pointerEvents: 'none',
|
37
37
|
zIndex: 1,
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
...shorthands.borderColor(outlineColor),
|
42
|
-
/* eslint-enable deprecation/deprecation */ top: getOutlinePosition(options, 'top'),
|
38
|
+
border: `${outlineWidth} solid ${outlineColor}`,
|
39
|
+
borderRadius: outlineRadius,
|
40
|
+
top: getOutlinePosition(options, 'top'),
|
43
41
|
right: getOutlinePosition(options, 'right'),
|
44
42
|
bottom: getOutlinePosition(options, 'bottom'),
|
45
43
|
left: getOutlinePosition(options, 'left')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["createFocusOutlineStyle.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands } from '@griffel/react';\nimport type { GriffelStyle } from '@griffel/react';\nimport {\n createCustomFocusIndicatorStyle,\n CreateCustomFocusIndicatorStyleOptions,\n} from './createCustomFocusIndicatorStyle';\nimport { defaultOptions } from './constants';\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};\nexport interface CreateFocusOutlineStyleOptions extends Omit<CreateCustomFocusIndicatorStyleOptions, 'enableOutline'> {\n style?: Partial<FocusOutlineStyleOptions>;\n\n /**\n * Enables the browser default outline style\n */\n enableOutline?: boolean;\n}\n\n/**\n * Get the position of the focus outline\n *\n * @param options - Configures the style of the focus outline\n * @param position - The position of the focus outline\n * @returns CSS value for the position of the focus outline\n */\nfunction getOutlinePosition(\n { outlineWidth, outlineOffset }: FocusOutlineStyleOptions,\n position: 'top' | 'bottom' | 'left' | 'right',\n) {\n const offsetValue = (outlineOffset as FocusOutlineOffset)?.[position] || outlineOffset;\n\n if (!outlineOffset) {\n return `calc(${outlineWidth} * -1)`;\n }\n\n return `calc(0px - ${outlineWidth} - ${offsetValue})`;\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): GriffelStyle => {\n const { outlineRadius, outlineColor, outlineWidth } = options;\n\n return {\n ...shorthands.borderColor('transparent'),\n '@media (forced-colors: active)': {\n '::after': {\n ...shorthands.borderColor('Highlight'),\n },\n },\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n
|
1
|
+
{"version":3,"sources":["createFocusOutlineStyle.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands } from '@griffel/react';\nimport type { GriffelStyle } from '@griffel/react';\nimport {\n createCustomFocusIndicatorStyle,\n CreateCustomFocusIndicatorStyleOptions,\n} from './createCustomFocusIndicatorStyle';\nimport { defaultOptions } from './constants';\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};\nexport interface CreateFocusOutlineStyleOptions extends Omit<CreateCustomFocusIndicatorStyleOptions, 'enableOutline'> {\n style?: Partial<FocusOutlineStyleOptions>;\n\n /**\n * Enables the browser default outline style\n */\n enableOutline?: boolean;\n}\n\n/**\n * Get the position of the focus outline\n *\n * @param options - Configures the style of the focus outline\n * @param position - The position of the focus outline\n * @returns CSS value for the position of the focus outline\n */\nfunction getOutlinePosition(\n { outlineWidth, outlineOffset }: FocusOutlineStyleOptions,\n position: 'top' | 'bottom' | 'left' | 'right',\n) {\n const offsetValue = (outlineOffset as FocusOutlineOffset)?.[position] || outlineOffset;\n\n if (!outlineOffset) {\n return `calc(${outlineWidth} * -1)`;\n }\n\n return `calc(0px - ${outlineWidth} - ${offsetValue})`;\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): GriffelStyle => {\n const { outlineRadius, outlineColor, outlineWidth } = options;\n\n return {\n ...shorthands.borderColor('transparent'),\n '@media (forced-colors: active)': {\n '::after': {\n ...shorthands.borderColor('Highlight'),\n },\n },\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n border: `${outlineWidth} solid ${outlineColor}`,\n borderRadius: outlineRadius,\n\n top: getOutlinePosition(options, 'top'),\n right: getOutlinePosition(options, 'right'),\n bottom: getOutlinePosition(options, 'bottom'),\n left: getOutlinePosition(options, 'left'),\n },\n };\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 - Configure the style of the focus outline\n * @returns focus outline styles object for @see makeStyles\n */\nexport const createFocusOutlineStyle = ({\n enableOutline = false,\n selector = defaultOptions.selector,\n customizeSelector,\n style = defaultOptions.style,\n}: CreateFocusOutlineStyleOptions = defaultOptions): GriffelStyle => ({\n ':focus': {\n outlineStyle: enableOutline ? undefined : 'none',\n },\n ':focus-visible': {\n outlineStyle: enableOutline ? undefined : 'none',\n },\n\n ...createCustomFocusIndicatorStyle(\n getFocusOutlineStyles({\n outlineColor: tokens.colorStrokeFocus2,\n outlineRadius: tokens.borderRadiusMedium,\n // FIXME: tokens.strokeWidthThick causes some weird bugs\n outlineWidth: '2px',\n ...style,\n }),\n { selector, customizeSelector },\n ),\n});\n"],"names":["tokens","shorthands","createCustomFocusIndicatorStyle","defaultOptions","getOutlinePosition","outlineWidth","outlineOffset","position","offsetValue","getFocusOutlineStyles","options","outlineRadius","outlineColor","borderColor","content","pointerEvents","zIndex","border","borderRadius","top","right","bottom","left","createFocusOutlineStyle","enableOutline","selector","customizeSelector","style","outlineStyle","undefined","colorStrokeFocus2","borderRadiusMedium"],"mappings":"AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,UAAU,QAAQ,iBAAiB;AAE5C,SACEC,+BAA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eAAeX,OAAO+B,kBAAkB;YACxC,wDAAwD;YACxD1B,cAAc;YACd,GAAGsB,KAAK;QACV,IACA;YAAEF;YAAUC;QAAkB,EAC/B;IACH,CAAA,EAAG"}
|
@@ -45,11 +45,9 @@ const _constants = require("./constants");
|
|
45
45
|
position: 'absolute',
|
46
46
|
pointerEvents: 'none',
|
47
47
|
zIndex: 1,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
..._react.shorthands.borderColor(outlineColor),
|
52
|
-
/* eslint-enable deprecation/deprecation */ top: getOutlinePosition(options, 'top'),
|
48
|
+
border: `${outlineWidth} solid ${outlineColor}`,
|
49
|
+
borderRadius: outlineRadius,
|
50
|
+
top: getOutlinePosition(options, 'top'),
|
53
51
|
right: getOutlinePosition(options, 'right'),
|
54
52
|
bottom: getOutlinePosition(options, 'bottom'),
|
55
53
|
left: getOutlinePosition(options, 'left')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["createFocusOutlineStyle.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from './createCustomFocusIndicatorStyle';\nimport { defaultOptions } from './constants';\n/**\n * Get the position of the focus outline\n *\n * @param options - Configures the style of the focus outline\n * @param position - The position of the focus outline\n * @returns CSS value for the position of the focus outline\n */ function getOutlinePosition({ outlineWidth, outlineOffset }, position) {\n const offsetValue = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset[position]) || outlineOffset;\n if (!outlineOffset) {\n return `calc(${outlineWidth} * -1)`;\n }\n return `calc(0px - ${outlineWidth} - ${offsetValue})`;\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 */ const getFocusOutlineStyles = (options)=>{\n const { outlineRadius, outlineColor, outlineWidth } = options;\n return {\n ...shorthands.borderColor('transparent'),\n '@media (forced-colors: active)': {\n '::after': {\n ...shorthands.borderColor('Highlight')\n }\n },\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n
|
1
|
+
{"version":3,"sources":["createFocusOutlineStyle.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from './createCustomFocusIndicatorStyle';\nimport { defaultOptions } from './constants';\n/**\n * Get the position of the focus outline\n *\n * @param options - Configures the style of the focus outline\n * @param position - The position of the focus outline\n * @returns CSS value for the position of the focus outline\n */ function getOutlinePosition({ outlineWidth, outlineOffset }, position) {\n const offsetValue = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset[position]) || outlineOffset;\n if (!outlineOffset) {\n return `calc(${outlineWidth} * -1)`;\n }\n return `calc(0px - ${outlineWidth} - ${offsetValue})`;\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 */ const getFocusOutlineStyles = (options)=>{\n const { outlineRadius, outlineColor, outlineWidth } = options;\n return {\n ...shorthands.borderColor('transparent'),\n '@media (forced-colors: active)': {\n '::after': {\n ...shorthands.borderColor('Highlight')\n }\n },\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n border: `${outlineWidth} solid ${outlineColor}`,\n borderRadius: outlineRadius,\n top: getOutlinePosition(options, 'top'),\n right: getOutlinePosition(options, 'right'),\n bottom: getOutlinePosition(options, 'bottom'),\n left: getOutlinePosition(options, 'left')\n }\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 - Configure the style of the focus outline\n * @returns focus outline styles object for @see makeStyles\n */ export const createFocusOutlineStyle = ({ enableOutline = false, selector = defaultOptions.selector, customizeSelector, style = defaultOptions.style } = defaultOptions)=>({\n ':focus': {\n outlineStyle: enableOutline ? undefined : 'none'\n },\n ':focus-visible': {\n outlineStyle: enableOutline ? undefined : 'none'\n },\n ...createCustomFocusIndicatorStyle(getFocusOutlineStyles({\n outlineColor: tokens.colorStrokeFocus2,\n outlineRadius: tokens.borderRadiusMedium,\n // FIXME: tokens.strokeWidthThick causes some weird bugs\n outlineWidth: '2px',\n ...style\n }), {\n selector,\n customizeSelector\n })\n });\n"],"names":["createFocusOutlineStyle","getOutlinePosition","outlineWidth","outlineOffset","position","offsetValue","getFocusOutlineStyles","options","outlineRadius","outlineColor","shorthands","borderColor","content","pointerEvents","zIndex","border","borderRadius","top","right","bottom","left","enableOutline","selector","defaultOptions","customizeSelector","style","outlineStyle","undefined","createCustomFocusIndicatorStyle","tokens","colorStrokeFocus2","borderRadiusMedium"],"mappings":";;;;+BAoDiBA;;;eAAAA;;;4BApDM;uBACI;iDACqB;2BACjB;AAC/B;;;;;;CAMC,GAAG,SAASC,mBAAmB,EAAEC,YAAY,EAAEC,aAAa,EAAE,EAAEC,QAAQ;IACrE,MAAMC,cAAc,AAACF,CAAAA,kBAAkB,QAAQA,kBAAkB,KAAK,IAAI,KAAK,IAAIA,aAAa,CAACC,SAAS,AAAD,KAAMD;IAC/G,IAAI,CAACA,eAAe;QAChB,OAAO,CAAC,KAAK,EAAED,aAAa,MAAM,CAAC;IACvC;IACA,OAAO,CAAC,WAAW,EAAEA,aAAa,GAAG,EAAEG,YAAY,CAAC,CAAC;AACzD;AACA;;;;;;CAMC,GAAG,MAAMC,wBAAwB,CAACC;IAC/B,MAAM,EAAEC,aAAa,EAAEC,YAAY,EAAEP,YAAY,EAAE,GAAGK;IACtD,OAAO;QACH,GAAGG,iBAAU,CAACC,WAAW,CAAC,cAAc;QACxC,kCAAkC;YAC9B,WAAW;gBACP,GAAGD,iBAAU,CAACC,WAAW,CAAC,YAAY;YAC1C;QACJ;QACA,WAAW;YACPC,SAAS;YACTR,UAAU;YACVS,eAAe;YACfC,QAAQ;YACRC,QAAQ,CAAC,EAAEb,aAAa,OAAO,EAAEO,aAAa,CAAC;YAC/CO,cAAcR;YACdS,KAAKhB,mBAAmBM,SAAS;YACjCW,OAAOjB,mBAAmBM,SAAS;YACnCY,QAAQlB,mBAAmBM,SAAS;YACpCa,MAAMnB,mBAAmBM,SAAS;QACtC;IACJ;AACJ;AAOW,MAAMP,0BAA0B,CAAC,EAAEqB,gBAAgB,KAAK,EAAEC,WAAWC,yBAAc,CAACD,QAAQ,EAAEE,iBAAiB,EAAEC,QAAQF,yBAAc,CAACE,KAAK,EAAE,GAAGF,yBAAc,GAAI,CAAA;QACvK,UAAU;YACNG,cAAcL,gBAAgBM,YAAY;QAC9C;QACA,kBAAkB;YACdD,cAAcL,gBAAgBM,YAAY;QAC9C;QACA,GAAGC,IAAAA,gEAA+B,EAACtB,sBAAsB;YACrDG,cAAcoB,kBAAM,CAACC,iBAAiB;YACtCtB,eAAeqB,kBAAM,CAACE,kBAAkB;YACxC,wDAAwD;YACxD7B,cAAc;YACd,GAAGuB,KAAK;QACZ,IAAI;YACAH;YACAE;QACJ,EAAE;IACN,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "9.21.
|
3
|
+
"version": "9.21.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",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"@griffel/react": "^1.5.22",
|
38
38
|
"@swc/helpers": "^0.5.1",
|
39
39
|
"keyborg": "^2.6.0",
|
40
|
-
"tabster": "^7.1.
|
40
|
+
"tabster": "^7.1.4"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
43
|
"@types/react": ">=16.14.0 <19.0.0",
|