@atlaskit/focus-ring 1.7.0 → 2.0.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.md +14 -0
- package/package.json +6 -6
- package/compiled/package.json +0 -17
- package/dist/cjs/compiled/index.compiled.css +0 -12
- package/dist/cjs/compiled/index.js +0 -64
- package/dist/es2019/compiled/index.compiled.css +0 -12
- package/dist/es2019/compiled/index.js +0 -56
- package/dist/esm/compiled/index.compiled.css +0 -12
- package/dist/esm/compiled/index.js +0 -55
- package/dist/types/compiled/index.d.ts +0 -26
- package/dist/types-ts4.5/compiled/index.d.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/focus-ring
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#170214](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170214)
|
|
14
|
+
[`ed07db7789d4e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ed07db7789d4e) -
|
|
15
|
+
Remove Compiled variant.
|
|
16
|
+
|
|
3
17
|
## 1.7.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/focus-ring",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
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",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"team": "Design System Team",
|
|
12
12
|
"website": {
|
|
13
13
|
"name": "Focus ring",
|
|
14
|
-
"category": "
|
|
14
|
+
"category": "Forms and input"
|
|
15
15
|
},
|
|
16
16
|
"runReact18": true
|
|
17
17
|
},
|
|
@@ -33,11 +33,10 @@
|
|
|
33
33
|
],
|
|
34
34
|
"atlaskit:src": "src/index.tsx",
|
|
35
35
|
"af:exports": {
|
|
36
|
-
".": "./src/index.tsx"
|
|
37
|
-
"./compiled": "./src/compiled/index.tsx"
|
|
36
|
+
".": "./src/index.tsx"
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
40
|
-
"@atlaskit/tokens": "^
|
|
39
|
+
"@atlaskit/tokens": "^3.0.0",
|
|
41
40
|
"@babel/runtime": "^7.0.0",
|
|
42
41
|
"@compiled/react": "^0.18.1",
|
|
43
42
|
"@emotion/react": "^11.7.1"
|
|
@@ -47,8 +46,9 @@
|
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@af/accessibility-testing": "*",
|
|
49
|
+
"@af/integration-testing": "*",
|
|
50
50
|
"@af/visual-regression": "*",
|
|
51
|
-
"@atlaskit/textfield": "^6.
|
|
51
|
+
"@atlaskit/textfield": "^6.7.0",
|
|
52
52
|
"@testing-library/react": "^12.1.5",
|
|
53
53
|
"react-dom": "^16.8.0",
|
|
54
54
|
"typescript": "~5.4.2",
|
package/compiled/package.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/focus-ring/compiled",
|
|
3
|
-
"main": "../dist/cjs/compiled/index.js",
|
|
4
|
-
"module": "../dist/esm/compiled/index.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/compiled/index.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"**/*.compiled.css"
|
|
8
|
-
],
|
|
9
|
-
"types": "../dist/types/compiled/index.d.ts",
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.4": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/compiled/index.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
._10gjnqa1>*{outline-style:solid}
|
|
2
|
-
._1159194a>*{outline-color:var(--ds-border-focused,#2684ff)}
|
|
3
|
-
._1arnyh40:has(:focus-visible)>*{outline-width:2px}
|
|
4
|
-
._1e0c1bgi{display:contents}
|
|
5
|
-
._1lyn12gs:has(:focus-visible)>*{outline-offset:-2px}
|
|
6
|
-
._1lynyh40:has(:focus-visible)>*{outline-offset:2px}
|
|
7
|
-
._1ohenqa1:has(:focus-visible)>*{outline-style:solid}
|
|
8
|
-
._1ppw194a:has(:focus-visible)>*{outline-color:var(--ds-border-focused,#2684ff)}
|
|
9
|
-
._mt5712gs>*{outline-offset:-2px}
|
|
10
|
-
._mt57yh40>*{outline-offset:2px}
|
|
11
|
-
._vm9zyh40>*{outline-width:2px}
|
|
12
|
-
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._16kx12gs:has(:focus-visible)>*{outline-offset:-2px}._hln4nqa1:has(:focus-visible)>*{outline-style:solid}._8ja6t94y:has(:focus-visible)>*{outline-width:1px}}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
require("./index.compiled.css");
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var React = _react;
|
|
12
|
-
var _runtime = require("@compiled/react/runtime");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
-
var BORDER_WIDTH = 2;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* This exists as a workaround so that we can add a wrapping element
|
|
19
|
-
* without affecting the layout of the children
|
|
20
|
-
* and avoids us having to use `cloneElement`, which causes funky behavior
|
|
21
|
-
* with Compiled classnames :)
|
|
22
|
-
*/
|
|
23
|
-
var wrapperStyles = null;
|
|
24
|
-
var controlledStyles = null;
|
|
25
|
-
var controlledInsetStyles = null;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* We are using `:has()` to target the children of the wrapping div
|
|
29
|
-
* https://larsmagnus.co/blog/focus-visible-within-the-missing-pseudo-class#using-has-to-emulate-focus-visible-within
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
var uncontrolledStyles = null;
|
|
33
|
-
var uncontrolledInsetStyles = null;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* __Focus ring__
|
|
37
|
-
*
|
|
38
|
-
* A focus ring visually indicates the currently focused item.
|
|
39
|
-
*
|
|
40
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```jsx
|
|
44
|
-
* import FocusRing from '@atlaskit/focus-ring';
|
|
45
|
-
*
|
|
46
|
-
* const InteractiveComponent = () => (
|
|
47
|
-
* <FocusRing>
|
|
48
|
-
* <button type="button">Hello</button>
|
|
49
|
-
* </FocusRing>
|
|
50
|
-
* )
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
var FocusRing = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
54
|
-
var children = _ref.children,
|
|
55
|
-
isInset = _ref.isInset,
|
|
56
|
-
focus = _ref.focus;
|
|
57
|
-
var isUncontrolled = typeof focus === 'undefined';
|
|
58
|
-
var isControlledFocus = !isUncontrolled && focus === 'on';
|
|
59
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: (0, _runtime.ax)(["_1e0c1bgi", isControlledFocus && "_1159194a _mt57yh40 _10gjnqa1 _vm9zyh40", isControlledFocus && isInset && "_mt5712gs", isUncontrolled && "_1ppw194a _1lynyh40 _1ohenqa1 _1arnyh40 _hln4nqa1 _8ja6t94y", isUncontrolled && isInset && "_1lyn12gs _16kx12gs"])
|
|
61
|
-
}, children);
|
|
62
|
-
});
|
|
63
|
-
FocusRing.displayName = 'FocusRing';
|
|
64
|
-
var _default = exports.default = FocusRing;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
._10gjnqa1>*{outline-style:solid}
|
|
2
|
-
._1159194a>*{outline-color:var(--ds-border-focused,#2684ff)}
|
|
3
|
-
._1arnyh40:has(:focus-visible)>*{outline-width:2px}
|
|
4
|
-
._1e0c1bgi{display:contents}
|
|
5
|
-
._1lyn12gs:has(:focus-visible)>*{outline-offset:-2px}
|
|
6
|
-
._1lynyh40:has(:focus-visible)>*{outline-offset:2px}
|
|
7
|
-
._1ohenqa1:has(:focus-visible)>*{outline-style:solid}
|
|
8
|
-
._1ppw194a:has(:focus-visible)>*{outline-color:var(--ds-border-focused,#2684ff)}
|
|
9
|
-
._mt5712gs>*{outline-offset:-2px}
|
|
10
|
-
._mt57yh40>*{outline-offset:2px}
|
|
11
|
-
._vm9zyh40>*{outline-width:2px}
|
|
12
|
-
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._16kx12gs:has(:focus-visible)>*{outline-offset:-2px}._hln4nqa1:has(:focus-visible)>*{outline-style:solid}._8ja6t94y:has(:focus-visible)>*{outline-width:1px}}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
-
import "./index.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
const BORDER_WIDTH = 2;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This exists as a workaround so that we can add a wrapping element
|
|
10
|
-
* without affecting the layout of the children
|
|
11
|
-
* and avoids us having to use `cloneElement`, which causes funky behavior
|
|
12
|
-
* with Compiled classnames :)
|
|
13
|
-
*/
|
|
14
|
-
const wrapperStyles = null;
|
|
15
|
-
const controlledStyles = null;
|
|
16
|
-
const controlledInsetStyles = null;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* We are using `:has()` to target the children of the wrapping div
|
|
20
|
-
* https://larsmagnus.co/blog/focus-visible-within-the-missing-pseudo-class#using-has-to-emulate-focus-visible-within
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
const uncontrolledStyles = null;
|
|
24
|
-
const uncontrolledInsetStyles = null;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* __Focus ring__
|
|
28
|
-
*
|
|
29
|
-
* A focus ring visually indicates the currently focused item.
|
|
30
|
-
*
|
|
31
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```jsx
|
|
35
|
-
* import FocusRing from '@atlaskit/focus-ring';
|
|
36
|
-
*
|
|
37
|
-
* const InteractiveComponent = () => (
|
|
38
|
-
* <FocusRing>
|
|
39
|
-
* <button type="button">Hello</button>
|
|
40
|
-
* </FocusRing>
|
|
41
|
-
* )
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
const FocusRing = /*#__PURE__*/memo(({
|
|
45
|
-
children,
|
|
46
|
-
isInset,
|
|
47
|
-
focus
|
|
48
|
-
}) => {
|
|
49
|
-
const isUncontrolled = typeof focus === 'undefined';
|
|
50
|
-
const isControlledFocus = !isUncontrolled && focus === 'on';
|
|
51
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: ax(["_1e0c1bgi", isControlledFocus && "_1159194a _mt57yh40 _10gjnqa1 _vm9zyh40", isControlledFocus && isInset && "_mt5712gs", isUncontrolled && "_1ppw194a _1lynyh40 _1ohenqa1 _1arnyh40 _hln4nqa1 _8ja6t94y", isUncontrolled && isInset && "_1lyn12gs _16kx12gs"])
|
|
53
|
-
}, children);
|
|
54
|
-
});
|
|
55
|
-
FocusRing.displayName = 'FocusRing';
|
|
56
|
-
export default FocusRing;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
._10gjnqa1>*{outline-style:solid}
|
|
2
|
-
._1159194a>*{outline-color:var(--ds-border-focused,#2684ff)}
|
|
3
|
-
._1arnyh40:has(:focus-visible)>*{outline-width:2px}
|
|
4
|
-
._1e0c1bgi{display:contents}
|
|
5
|
-
._1lyn12gs:has(:focus-visible)>*{outline-offset:-2px}
|
|
6
|
-
._1lynyh40:has(:focus-visible)>*{outline-offset:2px}
|
|
7
|
-
._1ohenqa1:has(:focus-visible)>*{outline-style:solid}
|
|
8
|
-
._1ppw194a:has(:focus-visible)>*{outline-color:var(--ds-border-focused,#2684ff)}
|
|
9
|
-
._mt5712gs>*{outline-offset:-2px}
|
|
10
|
-
._mt57yh40>*{outline-offset:2px}
|
|
11
|
-
._vm9zyh40>*{outline-width:2px}
|
|
12
|
-
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._16kx12gs:has(:focus-visible)>*{outline-offset:-2px}._hln4nqa1:has(:focus-visible)>*{outline-style:solid}._8ja6t94y:has(:focus-visible)>*{outline-width:1px}}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
-
import "./index.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
var BORDER_WIDTH = 2;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This exists as a workaround so that we can add a wrapping element
|
|
10
|
-
* without affecting the layout of the children
|
|
11
|
-
* and avoids us having to use `cloneElement`, which causes funky behavior
|
|
12
|
-
* with Compiled classnames :)
|
|
13
|
-
*/
|
|
14
|
-
var wrapperStyles = null;
|
|
15
|
-
var controlledStyles = null;
|
|
16
|
-
var controlledInsetStyles = null;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* We are using `:has()` to target the children of the wrapping div
|
|
20
|
-
* https://larsmagnus.co/blog/focus-visible-within-the-missing-pseudo-class#using-has-to-emulate-focus-visible-within
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
var uncontrolledStyles = null;
|
|
24
|
-
var uncontrolledInsetStyles = null;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* __Focus ring__
|
|
28
|
-
*
|
|
29
|
-
* A focus ring visually indicates the currently focused item.
|
|
30
|
-
*
|
|
31
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/focus-ring)
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```jsx
|
|
35
|
-
* import FocusRing from '@atlaskit/focus-ring';
|
|
36
|
-
*
|
|
37
|
-
* const InteractiveComponent = () => (
|
|
38
|
-
* <FocusRing>
|
|
39
|
-
* <button type="button">Hello</button>
|
|
40
|
-
* </FocusRing>
|
|
41
|
-
* )
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
var FocusRing = /*#__PURE__*/memo(function (_ref) {
|
|
45
|
-
var children = _ref.children,
|
|
46
|
-
isInset = _ref.isInset,
|
|
47
|
-
focus = _ref.focus;
|
|
48
|
-
var isUncontrolled = typeof focus === 'undefined';
|
|
49
|
-
var isControlledFocus = !isUncontrolled && focus === 'on';
|
|
50
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: ax(["_1e0c1bgi", isControlledFocus && "_1159194a _mt57yh40 _10gjnqa1 _vm9zyh40", isControlledFocus && isInset && "_mt5712gs", isUncontrolled && "_1ppw194a _1lynyh40 _1ohenqa1 _1arnyh40 _hln4nqa1 _8ja6t94y", isUncontrolled && isInset && "_1lyn12gs _16kx12gs"])
|
|
52
|
-
}, children);
|
|
53
|
-
});
|
|
54
|
-
FocusRing.displayName = 'FocusRing';
|
|
55
|
-
export default FocusRing;
|
|
@@ -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,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;
|