@atlaskit/primitives 16.0.2 → 16.1.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 +12 -0
- package/dist/cjs/compiled/components/anchor.js +1 -1
- package/dist/cjs/compiled/components/focusable.js +1 -7
- package/dist/cjs/compiled/components/pressable.js +1 -1
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/es2019/compiled/components/anchor.js +1 -1
- package/dist/es2019/compiled/components/focusable.js +1 -7
- package/dist/es2019/compiled/components/pressable.js +1 -1
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/esm/compiled/components/anchor.js +1 -1
- package/dist/esm/compiled/components/focusable.js +1 -7
- package/dist/esm/compiled/components/pressable.js +1 -1
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/pressable.js +1 -1
- package/package.json +3 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c9b86863a2583`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c9b86863a2583) -
|
|
8
|
+
The Focusable component now resets the outline style when the element matches the pseudo-class
|
|
9
|
+
`:focus` but not `:focus-visible`. This is to ensure the focus ring is not applied when it should
|
|
10
|
+
not be. Some apps have global styles targeting all buttons and anchors, adding an outline on
|
|
11
|
+
`:focus`. This will unset that style.
|
|
12
|
+
|
|
13
|
+
This change was previously behind a feature flag, which has now been removed.
|
|
14
|
+
|
|
3
15
|
## 16.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -70,7 +70,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
70
70
|
action: 'clicked',
|
|
71
71
|
componentName: componentName || 'Anchor',
|
|
72
72
|
packageName: "@atlaskit/primitives",
|
|
73
|
-
packageVersion: "
|
|
73
|
+
packageVersion: "16.0.2",
|
|
74
74
|
analyticsData: analyticsContext,
|
|
75
75
|
actionSubject: 'link'
|
|
76
76
|
});
|
|
@@ -13,17 +13,11 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _excluded = ["as", "children", "isInset", "testId", "style", "xcss"],
|
|
18
17
|
_excluded2 = ["className"];
|
|
19
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
19
|
var focusRingStyles = null;
|
|
21
20
|
var insetFocusRingStyles = null;
|
|
22
|
-
|
|
23
|
-
// This is added to override and reset global styles that apps might be applying - for example,
|
|
24
|
-
// at the time of writing, Jira has global styles that targets all button and anchor elements,
|
|
25
|
-
// adding an outline on :focus.
|
|
26
|
-
var outlineResetStyles = null;
|
|
27
21
|
/**
|
|
28
22
|
* __Focus ring__
|
|
29
23
|
*
|
|
@@ -46,7 +40,7 @@ var Focusable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
46
40
|
return /*#__PURE__*/React.createElement(Component, (0, _extends2.default)({}, safeHtmlAttributes, {
|
|
47
41
|
// @ts-ignore Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
|
|
48
42
|
ref: ref,
|
|
49
|
-
className: (0, _runtime.ax)(["_mizu194a _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y", isInset && "_1ah31gjf _2mwq1gjf",
|
|
43
|
+
className: (0, _runtime.ax)(["_ymio1r31 _ypr0glyw _zcxs1o36 _mizu194a _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y", isInset && "_1ah31gjf _2mwq1gjf", xcss])
|
|
50
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
51
45
|
,
|
|
52
46
|
style: style,
|
|
@@ -61,7 +61,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
61
61
|
action: 'clicked',
|
|
62
62
|
componentName: componentName || 'Pressable',
|
|
63
63
|
packageName: "@atlaskit/primitives",
|
|
64
|
-
packageVersion: "
|
|
64
|
+
packageVersion: "16.0.2",
|
|
65
65
|
analyticsData: analyticsContext,
|
|
66
66
|
actionSubject: 'button'
|
|
67
67
|
});
|
|
@@ -105,7 +105,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
105
105
|
action: 'clicked',
|
|
106
106
|
componentName: componentName || 'Anchor',
|
|
107
107
|
packageName: "@atlaskit/primitives",
|
|
108
|
-
packageVersion: "
|
|
108
|
+
packageVersion: "16.0.2",
|
|
109
109
|
analyticsData: analyticsContext,
|
|
110
110
|
actionSubject: 'link'
|
|
111
111
|
});
|
|
@@ -97,7 +97,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
97
97
|
action: 'clicked',
|
|
98
98
|
componentName: componentName || 'Pressable',
|
|
99
99
|
packageName: "@atlaskit/primitives",
|
|
100
|
-
packageVersion: "
|
|
100
|
+
packageVersion: "16.0.2",
|
|
101
101
|
analyticsData: analyticsContext,
|
|
102
102
|
actionSubject: 'button'
|
|
103
103
|
});
|
|
@@ -56,7 +56,7 @@ const AnchorNoRef = ({
|
|
|
56
56
|
action: 'clicked',
|
|
57
57
|
componentName: componentName || 'Anchor',
|
|
58
58
|
packageName: "@atlaskit/primitives",
|
|
59
|
-
packageVersion: "
|
|
59
|
+
packageVersion: "16.0.2",
|
|
60
60
|
analyticsData: analyticsContext,
|
|
61
61
|
actionSubject: 'link'
|
|
62
62
|
});
|
|
@@ -4,14 +4,8 @@ import "./focusable.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
const focusRingStyles = null;
|
|
9
8
|
const insetFocusRingStyles = null;
|
|
10
|
-
|
|
11
|
-
// This is added to override and reset global styles that apps might be applying - for example,
|
|
12
|
-
// at the time of writing, Jira has global styles that targets all button and anchor elements,
|
|
13
|
-
// adding an outline on :focus.
|
|
14
|
-
const outlineResetStyles = null;
|
|
15
9
|
/**
|
|
16
10
|
* __Focus ring__
|
|
17
11
|
*
|
|
@@ -36,7 +30,7 @@ const Focusable = /*#__PURE__*/forwardRef(({
|
|
|
36
30
|
return /*#__PURE__*/React.createElement(Component, _extends({}, safeHtmlAttributes, {
|
|
37
31
|
// @ts-ignore Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
|
|
38
32
|
ref: ref,
|
|
39
|
-
className: ax(["_mizu194a _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y", isInset && "_1ah31gjf _2mwq1gjf",
|
|
33
|
+
className: ax(["_ymio1r31 _ypr0glyw _zcxs1o36 _mizu194a _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y", isInset && "_1ah31gjf _2mwq1gjf", xcss])
|
|
40
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
41
35
|
,
|
|
42
36
|
style: style,
|
|
@@ -48,7 +48,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
48
48
|
action: 'clicked',
|
|
49
49
|
componentName: componentName || 'Pressable',
|
|
50
50
|
packageName: "@atlaskit/primitives",
|
|
51
|
-
packageVersion: "
|
|
51
|
+
packageVersion: "16.0.2",
|
|
52
52
|
analyticsData: analyticsContext,
|
|
53
53
|
actionSubject: 'button'
|
|
54
54
|
});
|
|
@@ -94,7 +94,7 @@ const AnchorNoRef = ({
|
|
|
94
94
|
action: 'clicked',
|
|
95
95
|
componentName: componentName || 'Anchor',
|
|
96
96
|
packageName: "@atlaskit/primitives",
|
|
97
|
-
packageVersion: "
|
|
97
|
+
packageVersion: "16.0.2",
|
|
98
98
|
analyticsData: analyticsContext,
|
|
99
99
|
actionSubject: 'link'
|
|
100
100
|
});
|
|
@@ -86,7 +86,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
86
86
|
action: 'clicked',
|
|
87
87
|
componentName: componentName || 'Pressable',
|
|
88
88
|
packageName: "@atlaskit/primitives",
|
|
89
|
-
packageVersion: "
|
|
89
|
+
packageVersion: "16.0.2",
|
|
90
90
|
analyticsData: analyticsContext,
|
|
91
91
|
actionSubject: 'button'
|
|
92
92
|
});
|
|
@@ -61,7 +61,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
61
61
|
action: 'clicked',
|
|
62
62
|
componentName: componentName || 'Anchor',
|
|
63
63
|
packageName: "@atlaskit/primitives",
|
|
64
|
-
packageVersion: "
|
|
64
|
+
packageVersion: "16.0.2",
|
|
65
65
|
analyticsData: analyticsContext,
|
|
66
66
|
actionSubject: 'link'
|
|
67
67
|
});
|
|
@@ -7,14 +7,8 @@ import "./focusable.compiled.css";
|
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
9
9
|
import { forwardRef } from 'react';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
var focusRingStyles = null;
|
|
12
11
|
var insetFocusRingStyles = null;
|
|
13
|
-
|
|
14
|
-
// This is added to override and reset global styles that apps might be applying - for example,
|
|
15
|
-
// at the time of writing, Jira has global styles that targets all button and anchor elements,
|
|
16
|
-
// adding an outline on :focus.
|
|
17
|
-
var outlineResetStyles = null;
|
|
18
12
|
/**
|
|
19
13
|
* __Focus ring__
|
|
20
14
|
*
|
|
@@ -37,7 +31,7 @@ var Focusable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
37
31
|
return /*#__PURE__*/React.createElement(Component, _extends({}, safeHtmlAttributes, {
|
|
38
32
|
// @ts-ignore Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
|
|
39
33
|
ref: ref,
|
|
40
|
-
className: ax(["_mizu194a _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y", isInset && "_1ah31gjf _2mwq1gjf",
|
|
34
|
+
className: ax(["_ymio1r31 _ypr0glyw _zcxs1o36 _mizu194a _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y", isInset && "_1ah31gjf _2mwq1gjf", xcss])
|
|
41
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
42
36
|
,
|
|
43
37
|
style: style,
|
|
@@ -52,7 +52,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
52
52
|
action: 'clicked',
|
|
53
53
|
componentName: componentName || 'Pressable',
|
|
54
54
|
packageName: "@atlaskit/primitives",
|
|
55
|
-
packageVersion: "
|
|
55
|
+
packageVersion: "16.0.2",
|
|
56
56
|
analyticsData: analyticsContext,
|
|
57
57
|
actionSubject: 'button'
|
|
58
58
|
});
|
|
@@ -99,7 +99,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
99
99
|
action: 'clicked',
|
|
100
100
|
componentName: componentName || 'Anchor',
|
|
101
101
|
packageName: "@atlaskit/primitives",
|
|
102
|
-
packageVersion: "
|
|
102
|
+
packageVersion: "16.0.2",
|
|
103
103
|
analyticsData: analyticsContext,
|
|
104
104
|
actionSubject: 'link'
|
|
105
105
|
});
|
|
@@ -91,7 +91,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
91
91
|
action: 'clicked',
|
|
92
92
|
componentName: componentName || 'Pressable',
|
|
93
93
|
packageName: "@atlaskit/primitives",
|
|
94
|
-
packageVersion: "
|
|
94
|
+
packageVersion: "16.0.2",
|
|
95
95
|
analyticsData: analyticsContext,
|
|
96
96
|
actionSubject: 'button'
|
|
97
97
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"@atlaskit/avatar": "^25.5.0",
|
|
159
159
|
"@atlaskit/button": "^23.5.0",
|
|
160
160
|
"@atlaskit/checkbox": "^17.1.0",
|
|
161
|
-
"@atlaskit/code": "^17.
|
|
161
|
+
"@atlaskit/code": "^17.3.0",
|
|
162
162
|
"@atlaskit/docs": "^11.2.0",
|
|
163
163
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
164
164
|
"@atlaskit/flag": "^17.5.0",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@atlaskit/lozenge": "^13.0.0",
|
|
173
173
|
"@atlaskit/motion": "^5.3.0",
|
|
174
174
|
"@atlaskit/range": "^9.2.0",
|
|
175
|
-
"@atlaskit/section-message": "^8.
|
|
175
|
+
"@atlaskit/section-message": "^8.8.0",
|
|
176
176
|
"@atlaskit/textfield": "^8.0.0",
|
|
177
177
|
"@atlaskit/toggle": "^15.1.0",
|
|
178
178
|
"@atlaskit/tooltip": "^20.6.0",
|
|
@@ -222,10 +222,5 @@
|
|
|
222
222
|
"dist/types-ts4.5/index.d.ts"
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
|
-
},
|
|
226
|
-
"platform-feature-flags": {
|
|
227
|
-
"platform_dst_compiled_primitives_outline_reset": {
|
|
228
|
-
"type": "boolean"
|
|
229
|
-
}
|
|
230
225
|
}
|
|
231
226
|
}
|