@atlaskit/focus-ring 1.3.2 → 1.3.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,5 +1,17 @@
1
1
  # @atlaskit/focus-ring
2
2
 
3
+ ## 1.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ce22a54e852`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ce22a54e852) - [ux] update focus ring outline border.focused fallback to B200 to meet contrast
8
+
9
+ ## 1.3.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
14
+
3
15
  ## 1.3.2
4
16
 
5
17
  ### Patch Changes
@@ -10,14 +10,16 @@ var _react2 = require("@emotion/react");
10
10
 
11
11
  var BORDER_WIDTH = 2;
12
12
  var baseFocusOutsideStyles = (0, _react2.css)({
13
- outline: "".concat(BORDER_WIDTH, "px solid ", "var(--ds-border-focused, #4C9AFF)"),
13
+ outline: "".concat(BORDER_WIDTH, "px solid ", "var(--ds-border-focused, #2684FF)"),
14
14
  outlineOffset: BORDER_WIDTH
15
15
  });
16
16
  var baseInsetStyles = (0, _react2.css)({
17
- outlineColor: "var(--ds-border-focused, #4C9AFF)",
17
+ outlineColor: "var(--ds-border-focused, #2684FF)",
18
18
  outlineOffset: -BORDER_WIDTH,
19
19
  outlineStyle: 'solid',
20
- outlineWidth: BORDER_WIDTH
20
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
21
+ // TODO Delete this comment after verifying space token -> previous value `BORDER_WIDTH`
22
+ outlineWidth: "var(--ds-border-width, 2px)"
21
23
  });
22
24
  var focusRingStyles = (0, _react2.css)({
23
25
  '&:focus-visible': baseFocusOutsideStyles,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "sideEffects": false
5
5
  }
@@ -3,14 +3,16 @@ import { Children, cloneElement, memo } from 'react';
3
3
  import { ClassNames, css, jsx } from '@emotion/react';
4
4
  const BORDER_WIDTH = 2;
5
5
  const baseFocusOutsideStyles = css({
6
- outline: `${BORDER_WIDTH}px solid ${"var(--ds-border-focused, #4C9AFF)"}`,
6
+ outline: `${BORDER_WIDTH}px solid ${"var(--ds-border-focused, #2684FF)"}`,
7
7
  outlineOffset: BORDER_WIDTH
8
8
  });
9
9
  const baseInsetStyles = css({
10
- outlineColor: "var(--ds-border-focused, #4C9AFF)",
10
+ outlineColor: "var(--ds-border-focused, #2684FF)",
11
11
  outlineOffset: -BORDER_WIDTH,
12
12
  outlineStyle: 'solid',
13
- outlineWidth: BORDER_WIDTH
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
+ // TODO Delete this comment after verifying space token -> previous value `BORDER_WIDTH`
15
+ outlineWidth: "var(--ds-border-width, 2px)"
14
16
  });
15
17
  const focusRingStyles = css({
16
18
  '&:focus-visible': baseFocusOutsideStyles,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "sideEffects": false
5
5
  }
@@ -3,14 +3,16 @@ import { Children, cloneElement, memo } from 'react';
3
3
  import { ClassNames, css, jsx } from '@emotion/react';
4
4
  var BORDER_WIDTH = 2;
5
5
  var baseFocusOutsideStyles = css({
6
- outline: "".concat(BORDER_WIDTH, "px solid ", "var(--ds-border-focused, #4C9AFF)"),
6
+ outline: "".concat(BORDER_WIDTH, "px solid ", "var(--ds-border-focused, #2684FF)"),
7
7
  outlineOffset: BORDER_WIDTH
8
8
  });
9
9
  var baseInsetStyles = css({
10
- outlineColor: "var(--ds-border-focused, #4C9AFF)",
10
+ outlineColor: "var(--ds-border-focused, #2684FF)",
11
11
  outlineOffset: -BORDER_WIDTH,
12
12
  outlineStyle: 'solid',
13
- outlineWidth: BORDER_WIDTH
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
+ // TODO Delete this comment after verifying space token -> previous value `BORDER_WIDTH`
15
+ outlineWidth: "var(--ds-border-width, 2px)"
14
16
  });
15
17
  var focusRingStyles = css({
16
18
  '&:focus-visible': baseFocusOutsideStyles,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "A focus ring is used to indicate the currently focused item.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Design System Team",
12
- "releaseModel": "scheduled",
12
+ "releaseModel": "continuous",
13
13
  "website": {
14
14
  "name": "Focus ring",
15
15
  "category": "Components"
@@ -34,7 +34,7 @@
34
34
  ".": "./src/index.tsx"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/tokens": "^1.4.0",
37
+ "@atlaskit/tokens": "^1.13.0",
38
38
  "@babel/runtime": "^7.0.0",
39
39
  "@emotion/react": "^11.7.1"
40
40
  },
@@ -42,15 +42,7 @@
42
42
  "react": "^16.8.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@atlaskit/button": "^16.7.0",
46
- "@atlaskit/docs": "*",
47
- "@atlaskit/progress-indicator": "^9.5.0",
48
- "@atlaskit/section-message": "^6.4.0",
49
- "@atlaskit/ssr": "*",
50
- "@atlaskit/textfield": "^5.4.0",
51
45
  "@atlaskit/visual-regression": "*",
52
- "@atlaskit/visually-hidden": "^1.2.0",
53
- "@atlaskit/webdriver-runner": "*",
54
46
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
55
47
  "@testing-library/react": "^12.1.5",
56
48
  "react-dom": "^16.8.0",
@@ -72,7 +64,8 @@
72
64
  "ui-components": "lite-mode",
73
65
  "analytics": "analytics-next",
74
66
  "design-tokens": [
75
- "color"
67
+ "color",
68
+ "spacing"
76
69
  ],
77
70
  "deprecation": "no-deprecated-imports"
78
71
  }
@@ -0,0 +1,41 @@
1
+ ## API Report File for "@atlaskit/focus-ring"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { FC } from 'react';
8
+ import type { FocusEventHandler } from 'react';
9
+ import type { ReactElement } from 'react';
10
+
11
+ // @public (undocumented)
12
+ export interface FocusEventHandlers {
13
+ // (undocumented)
14
+ onBlur: FocusEventHandler;
15
+ // (undocumented)
16
+ onFocus: FocusEventHandler;
17
+ }
18
+
19
+ // @public
20
+ const FocusRing: FC<FocusRingProps>;
21
+ export default FocusRing;
22
+
23
+ // @public (undocumented)
24
+ export interface FocusRingProps {
25
+ children: ReactElement;
26
+ focus?: FocusState;
27
+ isInset?: boolean;
28
+ }
29
+
30
+ // @public (undocumented)
31
+ export type FocusState = 'off' | 'on';
32
+
33
+ // @public
34
+ export const useFocusRing: (initialState?: FocusState) => {
35
+ readonly focusState: "off" | "on";
36
+ readonly focusProps: FocusEventHandlers;
37
+ };
38
+
39
+ // (No @packageDocumentation comment for this package)
40
+
41
+ ```