@atlaskit/focus-ring 1.2.4 → 1.2.5

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,11 @@
1
1
  # @atlaskit/focus-ring
2
2
 
3
+ ## 1.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7f5f23dcb68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7f5f23dcb68) - Introduce shape tokens to some packages.
8
+
3
9
  ## 1.2.4
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Focus ring
2
2
 
3
- A focus ring is used indicate the currently focused item.
3
+ A focus ring is used to visually indicate the currently focused item.
4
+
5
+ This component has accessibility issues that we are working to resolve. Do not use without support from the Atlassian Design System accessibility team.
4
6
 
5
7
  ## Usage
6
8
 
@@ -46,7 +46,10 @@ var insetFocusRingStyles = (0, _react2.css)({
46
46
  /**
47
47
  * __Focus ring__
48
48
  *
49
- * A focus ring is used indicate the currently focused item.
49
+ * A focus ring visually indicates the currently focused item.
50
+ *
51
+ * There are known accessibility issues with this component.
52
+ * Do not use without assisitance from the Design System accessibility team.
50
53
  *
51
54
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
52
55
  *
@@ -10,30 +10,12 @@ var _react = require("react");
10
10
  /**
11
11
  * __Use focus ring__
12
12
  *
13
- * The `useFocusRing` hook is designed to manage focus for the `FocusRing` in cases where the `FocusRing`'s visual application
14
- * and the element that takes focus, differ. See the `focus` prop of `FocusRing` for more information.
13
+ * This component has accessibility issues that we are working to resolve.
14
+ * Do not use without support from the Atlassian Design System accessibility team.
15
15
  *
16
- * @example
17
- * ```jsx
18
- * import VisuallyHidden from '@atlaskit/visuall-hidden';
19
- * import FocusRing, { useFocusRing } from '@atlaskit/focus-ring';
16
+ * The useFocusRing hook manages focus in the rare cases where the focus ring’s visual application and the element that takes focus differ.
17
+ * This is not typically a good practice for accessibility, so don’t do this unless you’ve consulted with the accessibility team.
20
18
  *
21
- * const InteractiveComponent = () => {
22
- * const { focusState, focusProps } = useFocusRing();
23
- *
24
- * return (
25
- * <div>
26
- * <VisuallHidden>
27
- * <input {...focusProps} />
28
- * </VisuallyHidden>
29
- * <FocusRing focus={focusState}>
30
- * <div role="button">Hello</div>
31
- * </FocusRing>
32
- * </div>
33
- * );
34
- *
35
- * }
36
- * ```
37
19
  */
38
20
  var useFocusRing = function useFocusRing() {
39
21
  var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'off';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "sideEffects": false
5
5
  }
@@ -39,7 +39,10 @@ const insetFocusRingStyles = css({
39
39
  /**
40
40
  * __Focus ring__
41
41
  *
42
- * A focus ring is used indicate the currently focused item.
42
+ * A focus ring visually indicates the currently focused item.
43
+ *
44
+ * There are known accessibility issues with this component.
45
+ * Do not use without assisitance from the Design System accessibility team.
43
46
  *
44
47
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
45
48
  *
@@ -2,30 +2,12 @@ import { useRef, useState } from 'react';
2
2
  /**
3
3
  * __Use focus ring__
4
4
  *
5
- * The `useFocusRing` hook is designed to manage focus for the `FocusRing` in cases where the `FocusRing`'s visual application
6
- * and the element that takes focus, differ. See the `focus` prop of `FocusRing` for more information.
5
+ * This component has accessibility issues that we are working to resolve.
6
+ * Do not use without support from the Atlassian Design System accessibility team.
7
7
  *
8
- * @example
9
- * ```jsx
10
- * import VisuallyHidden from '@atlaskit/visuall-hidden';
11
- * import FocusRing, { useFocusRing } from '@atlaskit/focus-ring';
8
+ * The useFocusRing hook manages focus in the rare cases where the focus ring’s visual application and the element that takes focus differ.
9
+ * This is not typically a good practice for accessibility, so don’t do this unless you’ve consulted with the accessibility team.
12
10
  *
13
- * const InteractiveComponent = () => {
14
- * const { focusState, focusProps } = useFocusRing();
15
- *
16
- * return (
17
- * <div>
18
- * <VisuallHidden>
19
- * <input {...focusProps} />
20
- * </VisuallyHidden>
21
- * <FocusRing focus={focusState}>
22
- * <div role="button">Hello</div>
23
- * </FocusRing>
24
- * </div>
25
- * );
26
- *
27
- * }
28
- * ```
29
11
  */
30
12
  const useFocusRing = (initialState = 'off') => {
31
13
  const [focusState, setFocusState] = useState(initialState);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "sideEffects": false
5
5
  }
@@ -39,7 +39,10 @@ var insetFocusRingStyles = css({
39
39
  /**
40
40
  * __Focus ring__
41
41
  *
42
- * A focus ring is used indicate the currently focused item.
42
+ * A focus ring visually indicates the currently focused item.
43
+ *
44
+ * There are known accessibility issues with this component.
45
+ * Do not use without assisitance from the Design System accessibility team.
43
46
  *
44
47
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
45
48
  *
@@ -3,30 +3,12 @@ import { useRef, useState } from 'react';
3
3
  /**
4
4
  * __Use focus ring__
5
5
  *
6
- * The `useFocusRing` hook is designed to manage focus for the `FocusRing` in cases where the `FocusRing`'s visual application
7
- * and the element that takes focus, differ. See the `focus` prop of `FocusRing` for more information.
6
+ * This component has accessibility issues that we are working to resolve.
7
+ * Do not use without support from the Atlassian Design System accessibility team.
8
8
  *
9
- * @example
10
- * ```jsx
11
- * import VisuallyHidden from '@atlaskit/visuall-hidden';
12
- * import FocusRing, { useFocusRing } from '@atlaskit/focus-ring';
9
+ * The useFocusRing hook manages focus in the rare cases where the focus ring’s visual application and the element that takes focus differ.
10
+ * This is not typically a good practice for accessibility, so don’t do this unless you’ve consulted with the accessibility team.
13
11
  *
14
- * const InteractiveComponent = () => {
15
- * const { focusState, focusProps } = useFocusRing();
16
- *
17
- * return (
18
- * <div>
19
- * <VisuallHidden>
20
- * <input {...focusProps} />
21
- * </VisuallyHidden>
22
- * <FocusRing focus={focusState}>
23
- * <div role="button">Hello</div>
24
- * </FocusRing>
25
- * </div>
26
- * );
27
- *
28
- * }
29
- * ```
30
12
  */
31
13
  var useFocusRing = function useFocusRing() {
32
14
  var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'off';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,10 @@ import type { FocusRingProps } from './types';
4
4
  /**
5
5
  * __Focus ring__
6
6
  *
7
- * A focus ring is used indicate the currently focused item.
7
+ * A focus ring visually indicates the currently focused item.
8
+ *
9
+ * There are known accessibility issues with this component.
10
+ * Do not use without assisitance from the Design System accessibility team.
8
11
  *
9
12
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
10
13
  *
@@ -2,30 +2,12 @@ import type { FocusEventHandlers, FocusState } from './types';
2
2
  /**
3
3
  * __Use focus ring__
4
4
  *
5
- * The `useFocusRing` hook is designed to manage focus for the `FocusRing` in cases where the `FocusRing`'s visual application
6
- * and the element that takes focus, differ. See the `focus` prop of `FocusRing` for more information.
5
+ * This component has accessibility issues that we are working to resolve.
6
+ * Do not use without support from the Atlassian Design System accessibility team.
7
7
  *
8
- * @example
9
- * ```jsx
10
- * import VisuallyHidden from '@atlaskit/visuall-hidden';
11
- * import FocusRing, { useFocusRing } from '@atlaskit/focus-ring';
8
+ * The useFocusRing hook manages focus in the rare cases where the focus ring’s visual application and the element that takes focus differ.
9
+ * This is not typically a good practice for accessibility, so don’t do this unless you’ve consulted with the accessibility team.
12
10
  *
13
- * const InteractiveComponent = () => {
14
- * const { focusState, focusProps } = useFocusRing();
15
- *
16
- * return (
17
- * <div>
18
- * <VisuallHidden>
19
- * <input {...focusProps} />
20
- * </VisuallyHidden>
21
- * <FocusRing focus={focusState}>
22
- * <div role="button">Hello</div>
23
- * </FocusRing>
24
- * </div>
25
- * );
26
- *
27
- * }
28
- * ```
29
11
  */
30
12
  declare const useFocusRing: (initialState?: FocusState) => {
31
13
  readonly focusState: "on" | "off";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/focus-ring",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
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",
@@ -27,7 +27,7 @@
27
27
  ".": "./src/index.tsx"
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/tokens": "^1.0.0",
30
+ "@atlaskit/tokens": "^1.2.0",
31
31
  "@babel/runtime": "^7.0.0",
32
32
  "@emotion/react": "^11.7.1"
33
33
  },
@@ -38,6 +38,7 @@
38
38
  "@atlaskit/button": "^16.5.0",
39
39
  "@atlaskit/docs": "*",
40
40
  "@atlaskit/progress-indicator": "^9.4.0",
41
+ "@atlaskit/section-message": "^6.3.10",
41
42
  "@atlaskit/ssr": "*",
42
43
  "@atlaskit/textfield": "^5.3.0",
43
44
  "@atlaskit/visual-regression": "*",
@@ -63,7 +64,9 @@
63
64
  ],
64
65
  "ui-components": "lite-mode",
65
66
  "analytics": "analytics-next",
66
- "theming": "tokens",
67
+ "design-tokens": [
68
+ "color"
69
+ ],
67
70
  "deprecation": "no-deprecated-imports"
68
71
  }
69
72
  },