@atlaskit/focus-ring 3.0.14 → 4.0.0
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 +37 -0
- package/dist/cjs/entry-points/focus-ring.js +13 -0
- package/dist/cjs/entry-points/types.js +1 -0
- package/dist/cjs/entry-points/use-focus-ring.js +13 -0
- package/dist/es2019/entry-points/focus-ring.js +1 -0
- package/dist/es2019/entry-points/types.js +0 -0
- package/dist/es2019/entry-points/use-focus-ring.js +1 -0
- package/dist/esm/entry-points/focus-ring.js +1 -0
- package/dist/esm/entry-points/types.js +0 -0
- package/dist/esm/entry-points/use-focus-ring.js +1 -0
- package/dist/types/entry-points/focus-ring.d.ts +1 -0
- package/dist/types/entry-points/types.d.ts +1 -0
- package/dist/types/entry-points/use-focus-ring.d.ts +1 -0
- package/focus-ring/package.json +10 -0
- package/package.json +7 -14
- package/types/package.json +10 -0
- package/use-focus-ring/package.json +10 -0
- package/dist/types-ts4.5/focus-ring.d.ts +0 -26
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/types.d.ts +0 -22
- package/dist/types-ts4.5/use-focus-ring.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @atlaskit/focus-ring
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 3.1.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- [`e9ea3d59f41a8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e9ea3d59f41a8) -
|
|
34
|
+
Autofix: add explicit package exports (barrel removal)
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
|
|
3
40
|
## 3.0.14
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _focusRing.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _focusRing = _interopRequireDefault(require("../focus-ring"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "useFocusRing", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _useFocusRing.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _useFocusRing = _interopRequireDefault(require("../use-focus-ring"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../focus-ring';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useFocusRing } from '../use-focus-ring';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../focus-ring';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useFocusRing } from '../use-focus-ring';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../focus-ring';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { FocusRingProps, FocusEventHandlers, FocusState } from '../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useFocusRing } from '../use-focus-ring';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/focus-ring/focus-ring",
|
|
3
|
+
"main": "../dist/cjs/entry-points/focus-ring.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/focus-ring.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/focus-ring.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/focus-ring.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/focus-ring",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "A focus ring clearly indicates which item has keyboard focus.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,20 +36,12 @@
|
|
|
36
36
|
"module": "dist/esm/index.js",
|
|
37
37
|
"module:es2019": "dist/es2019/index.js",
|
|
38
38
|
"types": "dist/types/index.d.ts",
|
|
39
|
-
"typesVersions": {
|
|
40
|
-
">=4.5 <4.9": {
|
|
41
|
-
"*": [
|
|
42
|
-
"dist/types-ts4.5/*",
|
|
43
|
-
"dist/types-ts4.5/index.d.ts"
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
39
|
"sideEffects": [
|
|
48
40
|
"**/*.compiled.css"
|
|
49
41
|
],
|
|
50
42
|
"atlaskit:src": "src/index.tsx",
|
|
51
43
|
"dependencies": {
|
|
52
|
-
"@atlaskit/tokens": "^
|
|
44
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
53
45
|
"@babel/runtime": "^7.0.0",
|
|
54
46
|
"@emotion/react": "^11.7.1"
|
|
55
47
|
},
|
|
@@ -60,12 +52,13 @@
|
|
|
60
52
|
"@af/accessibility-testing": "workspace:^",
|
|
61
53
|
"@af/integration-testing": "workspace:^",
|
|
62
54
|
"@af/visual-regression": "workspace:^",
|
|
63
|
-
"@atlaskit/button": "^
|
|
64
|
-
"@atlaskit/docs": "^
|
|
65
|
-
"@atlaskit/primitives": "^
|
|
66
|
-
"@atlaskit/textfield": "^
|
|
55
|
+
"@atlaskit/button": "^24.0.0",
|
|
56
|
+
"@atlaskit/docs": "^12.0.0",
|
|
57
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
58
|
+
"@atlaskit/textfield": "^9.0.0",
|
|
67
59
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
68
60
|
"@testing-library/react": "^16.3.0",
|
|
61
|
+
"react": "^18.2.0",
|
|
69
62
|
"react-dom": "^18.2.0"
|
|
70
63
|
},
|
|
71
64
|
"techstack": {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/focus-ring/types",
|
|
3
|
+
"main": "../dist/cjs/entry-points/types.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/types.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/types.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/focus-ring/use-focus-ring",
|
|
3
|
+
"main": "../dist/cjs/entry-points/use-focus-ring.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/use-focus-ring.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/use-focus-ring.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/use-focus-ring.d.ts"
|
|
10
|
+
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type FC } from 'react';
|
|
6
|
-
import type { FocusRingProps } from './types';
|
|
7
|
-
/**
|
|
8
|
-
* __Focus ring__
|
|
9
|
-
*
|
|
10
|
-
* A focus ring visually indicates the currently focused item.
|
|
11
|
-
*
|
|
12
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```jsx
|
|
16
|
-
* import FocusRing from '@atlaskit/focus-ring';
|
|
17
|
-
*
|
|
18
|
-
* const InteractiveComponent = () => (
|
|
19
|
-
* <FocusRing>
|
|
20
|
-
* <button type="button">Hello</button>
|
|
21
|
-
* </FocusRing>
|
|
22
|
-
* )
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare const FocusRing: FC<FocusRingProps>;
|
|
26
|
-
export default FocusRing;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { FocusEventHandler, ReactElement } from 'react';
|
|
2
|
-
export interface FocusEventHandlers {
|
|
3
|
-
onFocus: FocusEventHandler;
|
|
4
|
-
onBlur: FocusEventHandler;
|
|
5
|
-
}
|
|
6
|
-
export type FocusState = 'on' | 'off';
|
|
7
|
-
export interface FocusRingProps {
|
|
8
|
-
/**
|
|
9
|
-
* Makes the `FocusRing` a controlled component (opting out of native focus behavior). The focus ring
|
|
10
|
-
* will apply the visual focus indicator when the `focus` prop is set to `on`. This prop should be used
|
|
11
|
-
* in conjunction with `useFocusRing`.
|
|
12
|
-
*/
|
|
13
|
-
focus?: FocusState;
|
|
14
|
-
/**
|
|
15
|
-
* Controls whether the focus ring should be applied around or within the composed element.
|
|
16
|
-
*/
|
|
17
|
-
isInset?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* The focusable element to be rendered within the `FocusRing`.
|
|
20
|
-
*/
|
|
21
|
-
children: ReactElement;
|
|
22
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { FocusEventHandlers, FocusState } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* __Use focus ring__
|
|
4
|
-
*
|
|
5
|
-
* The useFocusRing hook manages focus in the rare cases where the focus ring’s visual application and the element that takes focus differ.
|
|
6
|
-
* This is not typically a good practice for accessibility, so don’t do this unless you’ve consulted with the accessibility team.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
declare const useFocusRing: (initialState?: FocusState) => {
|
|
10
|
-
readonly focusState: "on" | "off";
|
|
11
|
-
readonly focusProps: FocusEventHandlers;
|
|
12
|
-
};
|
|
13
|
-
export default useFocusRing;
|