@fluentui/react-tabster 9.6.5 → 9.7.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 CHANGED
@@ -2,7 +2,79 @@
2
2
  "name": "@fluentui/react-tabster",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 17 Apr 2023 17:50:13 GMT",
5
+ "date": "Thu, 18 May 2023 00:35:47 GMT",
6
+ "tag": "@fluentui/react-tabster_v9.7.1",
7
+ "version": "9.7.1",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-tabster",
13
+ "commit": "06cd515eda59a3078bfe32f9cc7c1f281cd20208",
14
+ "comment": "chore: add test-ssr script to v9 packages"
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@fluentui/react-tabster",
21
+ "comment": "Bump @fluentui/react-utilities to v9.9.0",
22
+ "commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "date": "Fri, 12 May 2023 20:27:53 GMT",
29
+ "tag": "@fluentui/react-tabster_v9.7.0",
30
+ "version": "9.7.0",
31
+ "comments": {
32
+ "none": [
33
+ {
34
+ "author": "martinhochel@microsoft.com",
35
+ "package": "@fluentui/react-tabster",
36
+ "commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
37
+ "comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
38
+ }
39
+ ],
40
+ "patch": [
41
+ {
42
+ "author": "olfedias@microsoft.com",
43
+ "package": "@fluentui/react-tabster",
44
+ "commit": "c28decb23d191a0daaaf6d5d1832429715102129",
45
+ "comment": "chore: exclude .swcrc from being published"
46
+ }
47
+ ],
48
+ "minor": [
49
+ {
50
+ "author": "sarah.higley@microsoft.com",
51
+ "package": "@fluentui/react-tabster",
52
+ "commit": "81b87f41557964f9c9f5601a3eec84434eb74f35",
53
+ "comment": "fix: move `outlineStyle: none` out of createCustomFocusIndicatorStyle and to createFocusOutlineStyle"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-tabster",
58
+ "comment": "Bump @fluentui/react-shared-contexts to v9.4.0",
59
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-tabster",
64
+ "comment": "Bump @fluentui/react-theme to v9.1.8",
65
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-tabster",
70
+ "comment": "Bump @fluentui/react-utilities to v9.8.1",
71
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Mon, 17 Apr 2023 17:54:02 GMT",
6
78
  "tag": "@fluentui/react-tabster_v9.6.5",
7
79
  "version": "9.6.5",
8
80
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,37 @@
1
1
  # Change Log - @fluentui/react-tabster
2
2
 
3
- This log was last generated on Mon, 17 Apr 2023 17:50:13 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 18 May 2023 00:35:47 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.7.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.7.1)
8
+
9
+ Thu, 18 May 2023 00:35:47 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.7.0..@fluentui/react-tabster_v9.7.1)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-utilities to v9.9.0 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
15
+
16
+ ## [9.7.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.7.0)
17
+
18
+ Fri, 12 May 2023 20:27:53 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.6.5..@fluentui/react-tabster_v9.7.0)
20
+
21
+ ### Minor changes
22
+
23
+ - fix: move `outlineStyle: none` out of createCustomFocusIndicatorStyle and to createFocusOutlineStyle ([PR #26089](https://github.com/microsoft/fluentui/pull/26089) by sarah.higley@microsoft.com)
24
+ - Bump @fluentui/react-shared-contexts to v9.4.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
25
+ - Bump @fluentui/react-theme to v9.1.8 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
26
+ - Bump @fluentui/react-utilities to v9.8.1 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
27
+
28
+ ### Patches
29
+
30
+ - chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
31
+
7
32
  ## [9.6.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.6.5)
8
33
 
9
- Mon, 17 Apr 2023 17:50:13 GMT
34
+ Mon, 17 Apr 2023 17:54:02 GMT
10
35
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.6.4..@fluentui/react-tabster_v9.6.5)
11
36
 
12
37
  ### Patches
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare function applyFocusVisiblePolyfill(scope: HTMLElement, targetWind
18
18
  * @param style - styling applied on focus, defaults to @see getDefaultFocusOutlineStyles
19
19
  * @param options - Configure the style of the focus outline
20
20
  */
21
- export declare function createCustomFocusIndicatorStyle<TStyle extends GriffelStyle | GriffelResetStyle>(style: TStyle, { selector, enableOutline, }?: CreateCustomFocusIndicatorStyleOptions): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle;
21
+ export declare function createCustomFocusIndicatorStyle<TStyle extends GriffelStyle | GriffelResetStyle>(style: TStyle, { selector }?: CreateCustomFocusIndicatorStyleOptions): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle;
22
22
 
23
23
  export declare interface CreateCustomFocusIndicatorStyleOptions {
24
24
  /**
@@ -29,7 +29,8 @@ export declare interface CreateCustomFocusIndicatorStyleOptions {
29
29
  selector?: 'focus' | 'focus-within';
30
30
  /**
31
31
  * Enables the browser default outline style
32
- * @default false
32
+ * @deprecated The custom focus indicator no longer affects outline styles. Outline is overridden
33
+ * in the default focus indicator function, `createFocusOutlineStyle`.
33
34
  */
34
35
  enableOutline?: boolean;
35
36
  }
@@ -41,10 +42,14 @@ export declare interface CreateCustomFocusIndicatorStyleOptions {
41
42
  * @param options - Configure the style of the focus outline
42
43
  * @returns focus outline styles object for @see makeStyles
43
44
  */
44
- export declare const createFocusOutlineStyle: ({ selector, style, }?: CreateFocusOutlineStyleOptions) => GriffelStyle;
45
+ export declare const createFocusOutlineStyle: ({ enableOutline, selector, style, }?: CreateFocusOutlineStyleOptions) => GriffelStyle;
45
46
 
46
- export declare interface CreateFocusOutlineStyleOptions extends CreateCustomFocusIndicatorStyleOptions {
47
+ export declare interface CreateFocusOutlineStyleOptions extends Omit<CreateCustomFocusIndicatorStyleOptions, 'enableOutline'> {
47
48
  style?: Partial<FocusOutlineStyleOptions>;
49
+ /**
50
+ * Enables the browser default outline style
51
+ */
52
+ enableOutline?: boolean;
48
53
  }
49
54
 
50
55
  export declare type FocusOutlineOffset = Record<'top' | 'bottom' | 'left' | 'right', string>;
@@ -7,16 +7,9 @@ import { defaultOptions, FOCUS_VISIBLE_ATTR, FOCUS_WITHIN_ATTR } from './constan
7
7
  * @param options - Configure the style of the focus outline
8
8
  */
9
9
  export function createCustomFocusIndicatorStyle(style, {
10
- selector = defaultOptions.selector,
11
- enableOutline = false
10
+ selector = defaultOptions.selector
12
11
  } = defaultOptions) {
13
12
  return {
14
- ':focus': {
15
- outlineStyle: enableOutline ? undefined : 'none'
16
- },
17
- ':focus-visible': {
18
- outlineStyle: enableOutline ? undefined : 'none'
19
- },
20
13
  ...(selector === 'focus' && {
21
14
  [`&[${FOCUS_VISIBLE_ATTR}]`]: style
22
15
  }),
@@ -1 +1 @@
1
- {"version":3,"names":["defaultOptions","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR","createCustomFocusIndicatorStyle","style","selector","enableOutline","outlineStyle","undefined"],"sources":["../../src/focus/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 */\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"],"mappings":"AAAA,SAASA,cAAc,EAAEC,kBAAkB,EAAEC,iBAAiB,QAAQ;AAsBtE;;;;;;;AAOA,OAAO,SAASC,gCACdC,KAAa,EACb;EACEC,QAAA,GAAWL,cAAA,CAAeK,QAAQ;EAClCC,aAAA,GAAgB;AAAK,CACkB,GAAGN,cAAc,EACM;EAChE,OAAO;IACL,UAAU;MACRO,YAAA,EAAcD,aAAA,GAAgBE,SAAA,GAAY;IAC5C;IACA,kBAAkB;MAChBD,YAAA,EAAcD,aAAA,GAAgBE,SAAA,GAAY;IAC5C;IAEA,IAAIH,QAAA,KAAa,WAAW;MAC1B,CAAE,KAAIJ,kBAAmB,GAAE,GAAGG;IAChC,CAAC;IACD,IAAIC,QAAA,KAAa,kBAAkB;MACjC,CAAE,KAAIH,iBAAkB,KAAIG,QAAS,EAAC,GAAGD;IAC3C,CAAC;EACH;AACF"}
1
+ {"version":3,"names":["defaultOptions","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR","createCustomFocusIndicatorStyle","style","selector"],"sources":["../../src/focus/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 */\n selector?: 'focus' | 'focus-within';\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 { selector = defaultOptions.selector }: CreateCustomFocusIndicatorStyleOptions = defaultOptions,\n): TStyle extends GriffelStyle ? GriffelStyle : GriffelResetStyle {\n return {\n ...(selector === 'focus' && {\n [`&[${FOCUS_VISIBLE_ATTR}]`]: style,\n }),\n ...(selector === 'focus-within' && {\n [`&[${FOCUS_WITHIN_ATTR}]:${selector}`]: style,\n }),\n };\n}\n"],"mappings":"AAAA,SAASA,cAAc,EAAEC,kBAAkB,EAAEC,iBAAiB,QAAQ;AAuBtE;;;;;;;AAOA,OAAO,SAASC,gCACdC,KAAa,EACb;EAAEC,QAAA,GAAWL,cAAA,CAAeK;AAAQ,CAA0C,GAAGL,cAAc,EAC/B;EAChE,OAAO;IACL,IAAIK,QAAA,KAAa,WAAW;MAC1B,CAAE,KAAIJ,kBAAmB,GAAE,GAAGG;IAChC,CAAC;IACD,IAAIC,QAAA,KAAa,kBAAkB;MACjC,CAAE,KAAIH,iBAAkB,KAAIG,QAAS,EAAC,GAAGD;IAC3C,CAAC;EACH;AACF"}
@@ -46,15 +46,24 @@ const getFocusOutlineStyles = options => {
46
46
  * @returns focus outline styles object for @see makeStyles
47
47
  */
48
48
  export const createFocusOutlineStyle = ({
49
+ enableOutline = false,
49
50
  selector = defaultOptions.selector,
50
51
  style = defaultOptions.style
51
- } = defaultOptions) => createCustomFocusIndicatorStyle(getFocusOutlineStyles({
52
- outlineColor: tokens.colorStrokeFocus2,
53
- outlineRadius: tokens.borderRadiusMedium,
54
- // FIXME: tokens.strokeWidthThick causes some weird bugs
55
- outlineWidth: '2px',
56
- ...style
57
- }), {
58
- selector
52
+ } = defaultOptions) => ({
53
+ ':focus': {
54
+ outlineStyle: enableOutline ? undefined : 'none'
55
+ },
56
+ ':focus-visible': {
57
+ outlineStyle: enableOutline ? undefined : 'none'
58
+ },
59
+ ...createCustomFocusIndicatorStyle(getFocusOutlineStyles({
60
+ outlineColor: tokens.colorStrokeFocus2,
61
+ outlineRadius: tokens.borderRadiusMedium,
62
+ // FIXME: tokens.strokeWidthThick causes some weird bugs
63
+ outlineWidth: '2px',
64
+ ...style
65
+ }), {
66
+ selector
67
+ })
59
68
  });
60
69
  //# sourceMappingURL=createFocusOutlineStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tokens","shorthands","createCustomFocusIndicatorStyle","defaultOptions","getFocusOutlineStyles","options","outlineRadius","outlineColor","outlineOffset","outlineWidth","outlineOffsetTop","top","outlineOffsetBottom","bottom","outlineOffsetLeft","left","outlineOffsetRight","right","borderColor","content","position","pointerEvents","zIndex","borderStyle","borderWidth","borderRadius","createFocusOutlineStyle","selector","style","colorStrokeFocus2","borderRadiusMedium"],"sources":["../../src/focus/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 CreateCustomFocusIndicatorStyleOptions {\n style?: Partial<FocusOutlineStyleOptions>;\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, 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 ...shorthands.borderColor('transparent'),\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(outlineWidth),\n ...shorthands.borderRadius(outlineRadius),\n ...shorthands.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\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 selector = defaultOptions.selector,\n style = defaultOptions.style,\n}: CreateFocusOutlineStyleOptions = defaultOptions): GriffelStyle =>\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 },\n );\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ;AACvB,SAASC,UAAU,QAAQ;AAE3B,SACEC,+BAA+B,QAE1B;AACP,SAASC,cAAc,QAAQ;AAiB/B;;;;;;;AAOA,MAAMC,qBAAA,GAAyBC,OAAA,IAAoD;EACjF,MAAM;IAAEC,aAAA;IAAeC,Y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A,OAAO,MAAMU,uBAAA,GAA0BA,CAAC;EACtCC,QAAA,GAAWxB,cAAA,CAAewB,QAAQ;EAClCC,KAAA,GAAQzB,cAAA,CAAeyB;AAAK,CACG,GAAGzB,cAAc,KAChDD,+BAAA,CACEE,qBAAA,CAAsB;EACpBG,YAAA,EAAcP,MAAA,CAAO6B,iBAAiB;EACtCvB,aAAA,EAAeN,MAAA,CAAO8B,kBAAkB;EACxC;EACArB,YAAA,EAAc;EACd,GAAGmB;AACL,IACA;EAAED;AAAS"}
1
+ {"version":3,"names":["tokens","shorthands","createCustomFocusIndicatorStyle","defaultOptions","getFocusOutlineStyles","options","outlineRadius","outlineColor","outlineOffset","outlineWidth","outlineOffsetTop","top","outlineOffsetBottom","bottom","outlineOffsetLeft","left","outlineOffsetRight","right","borderColor","content","position","pointerEvents","zIndex","borderStyle","borderWidth","borderRadius","createFocusOutlineStyle","enableOutline","selector","style","outlineStyle","undefined","colorStrokeFocus2","borderRadiusMedium"],"sources":["../../src/focus/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 * 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, 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 ...shorthands.borderColor('transparent'),\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(outlineWidth),\n ...shorthands.borderRadius(outlineRadius),\n ...shorthands.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\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 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: t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L,aAAA,GAAiB,IAAGC,YAAa,EAAC,GAAI,cAAaA,YAAa,MAAKG,mBAAoB,GAAE;MACpGG,IAAA,EAAM,CAACP,aAAA,GAAiB,IAAGC,YAAa,EAAC,GAAI,cAAaA,YAAa,MAAKK,iBAAkB,GAAE;MAChGG,KAAA,EAAO,CAACT,aAAA,GAAiB,IAAGC,YAAa,EAAC,GAAI,cAAaA,YAAa,MAAKO,kBAAmB;IAClG;EACF;AACF;AAEA;;;;;;;AAOA,OAAO,MAAMU,uBAAA,GAA0BA,CAAC;EACtCC,aAAA,GAAgB,KAAK;EACrBC,QAAA,GAAWzB,cAAA,CAAeyB,QAAQ;EAClCC,KAAA,GAAQ1B,cAAA,CAAe0B;AAAK,CACG,GAAG1B,cAAc,MAAoB;EACpE,UAAU;IACR2B,YAAA,EAAcH,aAAA,GAAgBI,SAAA,GAAY;EAC5C;EACA,kBAAkB;IAChBD,YAAA,EAAcH,aAAA,GAAgBI,SAAA,GAAY;EAC5C;EAEA,GAAG7B,+BAAA,CACDE,qBAAA,CAAsB;IACpBG,YAAA,EAAcP,MAAA,CAAOgC,iBAAiB;IACtC1B,aAAA,EAAeN,MAAA,CAAOiC,kBAAkB;IACxC;IACAxB,YAAA,EAAc;IACd,GAAGoB;EACL,IACA;IAAED;EAAS;AAEf"}
@@ -7,14 +7,8 @@ Object.defineProperty(exports, "createCustomFocusIndicatorStyle", {
7
7
  get: ()=>createCustomFocusIndicatorStyle
8
8
  });
9
9
  const _constants = require("./constants");
10
- function createCustomFocusIndicatorStyle(style, { selector =_constants.defaultOptions.selector , enableOutline =false } = _constants.defaultOptions) {
10
+ function createCustomFocusIndicatorStyle(style, { selector =_constants.defaultOptions.selector } = _constants.defaultOptions) {
11
11
  return {
12
- ':focus': {
13
- outlineStyle: enableOutline ? undefined : 'none'
14
- },
15
- ':focus-visible': {
16
- outlineStyle: enableOutline ? undefined : 'none'
17
- },
18
12
  ...selector === 'focus' && {
19
13
  [`&[${_constants.FOCUS_VISIBLE_ATTR}]`]: style
20
14
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/focus/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 */\nexport function createCustomFocusIndicatorStyle(style, {\n selector = defaultOptions.selector,\n enableOutline = false\n} = defaultOptions) {\n return {\n ':focus': {\n outlineStyle: enableOutline ? undefined : 'none'\n },\n ':focus-visible': {\n outlineStyle: enableOutline ? undefined : 'none'\n },\n ...(selector === 'focus' && {\n [`&[${FOCUS_VISIBLE_ATTR}]`]: style\n }),\n ...(selector === 'focus-within' && {\n [`&[${FOCUS_WITHIN_ATTR}]:${selector}`]: style\n })\n };\n}\n//# sourceMappingURL=createCustomFocusIndicatorStyle.js.map"],"names":["createCustomFocusIndicatorStyle","style","selector","defaultOptions","enableOutline","outlineStyle","undefined","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR"],"mappings":";;;;+BAQgBA;;aAAAA;;2BARsD;AAQ/D,SAASA,gCAAgCC,KAAK,EAAE,EACrDC,UAAWC,yBAAc,CAACD,QAAQ,CAAA,EAClCE,eAAgB,KAAK,CAAA,EACtB,GAAGD,yBAAc,EAAE;IAClB,OAAO;QACL,UAAU;YACRE,cAAcD,gBAAgBE,YAAY,MAAM;QAClD;QACA,kBAAkB;YAChBD,cAAcD,gBAAgBE,YAAY,MAAM;QAClD;QACA,GAAIJ,aAAa,WAAW;YAC1B,CAAC,CAAC,EAAE,EAAEK,6BAAkB,CAAC,CAAC,CAAC,CAAC,EAAEN;QAChC,CAAC;QACD,GAAIC,aAAa,kBAAkB;YACjC,CAAC,CAAC,EAAE,EAAEM,4BAAiB,CAAC,EAAE,EAAEN,SAAS,CAAC,CAAC,EAAED;QAC3C,CAAC;IACH;AACF,EACA,2DAA2D"}
1
+ {"version":3,"sources":["../../lib/focus/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 */\nexport function createCustomFocusIndicatorStyle(style, {\n selector = defaultOptions.selector\n} = defaultOptions) {\n return {\n ...(selector === 'focus' && {\n [`&[${FOCUS_VISIBLE_ATTR}]`]: style\n }),\n ...(selector === 'focus-within' && {\n [`&[${FOCUS_WITHIN_ATTR}]:${selector}`]: style\n })\n };\n}\n//# sourceMappingURL=createCustomFocusIndicatorStyle.js.map"],"names":["createCustomFocusIndicatorStyle","style","selector","defaultOptions","FOCUS_VISIBLE_ATTR","FOCUS_WITHIN_ATTR"],"mappings":";;;;+BAQgBA;;aAAAA;;2BARsD;AAQ/D,SAASA,gCAAgCC,KAAK,EAAE,EACrDC,UAAWC,yBAAc,CAACD,QAAQ,CAAA,EACnC,GAAGC,yBAAc,EAAE;IAClB,OAAO;QACL,GAAID,aAAa,WAAW;YAC1B,CAAC,CAAC,EAAE,EAAEE,6BAAkB,CAAC,CAAC,CAAC,CAAC,EAAEH;QAChC,CAAC;QACD,GAAIC,aAAa,kBAAkB;YACjC,CAAC,CAAC,EAAE,EAAEG,4BAAiB,CAAC,EAAE,EAAEH,SAAS,CAAC,CAAC,EAAED;QAC3C,CAAC;IACH;AACF,EACA,2DAA2D"}
@@ -40,14 +40,22 @@ const _constants = require("./constants");
40
40
  }
41
41
  };
42
42
  };
43
- const createFocusOutlineStyle = ({ selector =_constants.defaultOptions.selector , style =_constants.defaultOptions.style } = _constants.defaultOptions)=>(0, _createCustomFocusIndicatorStyle.createCustomFocusIndicatorStyle)(getFocusOutlineStyles({
44
- outlineColor: _reactTheme.tokens.colorStrokeFocus2,
45
- outlineRadius: _reactTheme.tokens.borderRadiusMedium,
46
- // FIXME: tokens.strokeWidthThick causes some weird bugs
47
- outlineWidth: '2px',
48
- ...style
49
- }), {
50
- selector
43
+ const createFocusOutlineStyle = ({ enableOutline =false , selector =_constants.defaultOptions.selector , style =_constants.defaultOptions.style } = _constants.defaultOptions)=>({
44
+ ':focus': {
45
+ outlineStyle: enableOutline ? undefined : 'none'
46
+ },
47
+ ':focus-visible': {
48
+ outlineStyle: enableOutline ? undefined : 'none'
49
+ },
50
+ ...(0, _createCustomFocusIndicatorStyle.createCustomFocusIndicatorStyle)(getFocusOutlineStyles({
51
+ outlineColor: _reactTheme.tokens.colorStrokeFocus2,
52
+ outlineRadius: _reactTheme.tokens.borderRadiusMedium,
53
+ // FIXME: tokens.strokeWidthThick causes some weird bugs
54
+ outlineWidth: '2px',
55
+ ...style
56
+ }), {
57
+ selector
58
+ })
51
59
  }); //# sourceMappingURL=createFocusOutlineStyle.js.map
52
60
 
53
61
  //# sourceMappingURL=createFocusOutlineStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/focus/createFocusOutlineStyle.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from './createCustomFocusIndicatorStyle';\nimport { defaultOptions } from './constants';\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 => {\n const {\n outlineRadius,\n outlineColor,\n outlineOffset,\n outlineWidth\n } = options;\n const outlineOffsetTop = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.top) || outlineOffset;\n const outlineOffsetBottom = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.bottom) || outlineOffset;\n const outlineOffsetLeft = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.left) || outlineOffset;\n const outlineOffsetRight = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.right) || outlineOffset;\n return {\n ...shorthands.borderColor('transparent'),\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(outlineWidth),\n ...shorthands.borderRadius(outlineRadius),\n ...shorthands.borderColor(outlineColor),\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/**\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 selector = defaultOptions.selector,\n style = defaultOptions.style\n} = defaultOptions) => 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});\n//# sourceMappingURL=createFocusOutlineStyle.js.map"],"names":["createFocusOutlineStyle","getFocusOutlineStyles","options","outlineRadius","outlineColor","outlineOffset","outlineWidth","outlineOffsetTop","top","outlineOffsetBottom","bottom","outlineOffsetLeft","left","outlineOffsetRight","right","shorthands","borderColor","content","position","pointerEvents","zIndex","borderStyle","borderWidth","borderRadius","selector","defaultOptions","style","createCustomFocusIndicatorStyle","tokens","colorStrokeFocus2","borderRadiusMedium"],"mappings":";;;;+BA+CaA;;a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Aa,CAAC,GAAG,CAAC,WAAW,EAAEA,aAAa,GAAG,EAAEK,kBAAkB,CAAC,CAAC;YAChGG,OAAO,CAACT,gBAAgB,CAAC,CAAC,EAAEC,aAAa,CAAC,GAAG,CAAC,WAAW,EAAEA,aAAa,GAAG,EAAEO,mBAAmB,CAAC,CAAC;QACpG;IACF;AACF;AAQO,MAAMb,0BAA0B,CAAC,EACtCwB,UAAWC,yBAAc,CAACD,QAAQ,CAAA,EAClCE,OAAQD,yBAAc,CAACC,KAAK,CAAA,EAC7B,GAAGD,yBAAc,GAAKE,IAAAA,gEAA+B,EAAC1B,sBAAsB;QAC3EG,cAAcwB,kBAAM,CAACC,iBAAiB;QACtC1B,eAAeyB,kBAAM,CAACE,kBAAkB;QACxC,wDAAwD;QACxDxB,cAAc;QACd,GAAGoB,KAAK;IACV,IAAI;QACFF;IACF,IACA,mDAAmD"}
1
+ {"version":3,"sources":["../../lib/focus/createFocusOutlineStyle.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from './createCustomFocusIndicatorStyle';\nimport { defaultOptions } from './constants';\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 => {\n const {\n outlineRadius,\n outlineColor,\n outlineOffset,\n outlineWidth\n } = options;\n const outlineOffsetTop = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.top) || outlineOffset;\n const outlineOffsetBottom = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.bottom) || outlineOffset;\n const outlineOffsetLeft = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.left) || outlineOffset;\n const outlineOffsetRight = (outlineOffset === null || outlineOffset === void 0 ? void 0 : outlineOffset.right) || outlineOffset;\n return {\n ...shorthands.borderColor('transparent'),\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(outlineWidth),\n ...shorthands.borderRadius(outlineRadius),\n ...shorthands.borderColor(outlineColor),\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/**\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 style = defaultOptions.style\n} = 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 })\n});\n//# sourceMappingURL=createFocusOutlineStyle.js.map"],"names":["createFocusOutlineStyle","getFocusOutlineStyles","options","outlineRadius","outlineColor","outlineOffset","outlineWidth","outlineOffsetTop","top","outlineOffsetBottom","bottom","outlineOffsetLeft","left","outlineOffsetRight","right","shorthands","borderColor","content","position","pointerEvents","zIndex","borderStyle","borderWidth","borderRadius","enableOutline","selector","defaultOptions","style","outlineStyle","undefined","createCustomFocusIndicatorStyle","tokens","colorStrokeFocus2","borderRadiusMedium"],"mappings":";;;;+BA+CaA;;aAAAA;;4BA/CU;uBACI;iDACqB;2B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EA,aAAa,GAAG,EAAEK,kBAAkB,CAAC,CAAC;YAChGG,OAAO,CAACT,gBAAgB,CAAC,CAAC,EAAEC,aAAa,CAAC,GAAG,CAAC,WAAW,EAAEA,aAAa,GAAG,EAAEO,mBAAmB,CAAC,CAAC;QACpG;IACF;AACF;AAQO,MAAMb,0BAA0B,CAAC,EACtCwB,eAAgB,KAAK,CAAA,EACrBC,UAAWC,yBAAc,CAACD,QAAQ,CAAA,EAClCE,OAAQD,yBAAc,CAACC,KAAK,CAAA,EAC7B,GAAGD,yBAAc,GAAM,CAAA;QACtB,UAAU;YACRE,cAAcJ,gBAAgBK,YAAY,MAAM;QAClD;QACA,kBAAkB;YAChBD,cAAcJ,gBAAgBK,YAAY,MAAM;QAClD;QACA,GAAGC,IAAAA,gEAA+B,EAAC7B,sBAAsB;YACvDG,cAAc2B,kBAAM,CAACC,iBAAiB;YACtC7B,eAAe4B,kBAAM,CAACE,kBAAkB;YACxC,wDAAwD;YACxD3B,cAAc;YACd,GAAGqB,KAAK;QACV,IAAI;YACFF;QACF,EAAE;IACJ,CAAA,GACA,mDAAmD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tabster",
3
- "version": "9.6.5",
3
+ "version": "9.7.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,8 @@
21
21
  "lint": "just-scripts lint",
22
22
  "test": "jest --passWithNoTests",
23
23
  "type-check": "tsc -b tsconfig.json",
24
- "generate-api": "just-scripts generate-api"
24
+ "generate-api": "just-scripts generate-api",
25
+ "test-ssr": "test-ssr ./stories/**/*.stories.tsx"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@fluentui/eslint-plugin": "*",
@@ -31,9 +32,9 @@
31
32
  },
32
33
  "dependencies": {
33
34
  "@griffel/react": "^1.5.2",
34
- "@fluentui/react-shared-contexts": "^9.3.3",
35
- "@fluentui/react-theme": "^9.1.7",
36
- "@fluentui/react-utilities": "^9.8.0",
35
+ "@fluentui/react-shared-contexts": "^9.4.0",
36
+ "@fluentui/react-theme": "^9.1.8",
37
+ "@fluentui/react-utilities": "^9.9.0",
37
38
  "@swc/helpers": "^0.4.14",
38
39
  "keyborg": "^2.0.0",
39
40
  "tabster": "^4.1.1"
package/.swcrc DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/swcrc",
3
- "exclude": [
4
- "/testing",
5
- "/**/*.cy.ts",
6
- "/**/*.cy.tsx",
7
- "/**/*.spec.ts",
8
- "/**/*.spec.tsx",
9
- "/**/*.test.ts",
10
- "/**/*.test.tsx"
11
- ],
12
- "jsc": {
13
- "parser": {
14
- "syntax": "typescript",
15
- "tsx": true,
16
- "decorators": false,
17
- "dynamicImport": false
18
- },
19
- "externalHelpers": true,
20
- "transform": {
21
- "react": {
22
- "runtime": "classic",
23
- "useSpread": true
24
- }
25
- },
26
- "target": "es2019"
27
- },
28
- "minify": false,
29
- "sourceMaps": true
30
- }