@atlaskit/status 3.0.3 → 3.0.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 +8 -0
- package/dist/cjs/components/analytics.js +1 -1
- package/dist/cjs/components/internal/color-palette.js +32 -14
- package/dist/es2019/components/analytics.js +1 -1
- package/dist/es2019/components/internal/color-palette.js +32 -14
- package/dist/esm/components/analytics.js +1 -1
- package/dist/esm/components/internal/color-palette.js +32 -14
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/status
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139065](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139065)
|
|
8
|
+
[`4fafc5395faa3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4fafc5395faa3) -
|
|
9
|
+
[A11Y-10038] Updated deprecated status picker color palette use of event.keyCode to event.key
|
|
10
|
+
|
|
3
11
|
## 3.0.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
var ELEMENTS_CHANNEL = exports.ELEMENTS_CHANNEL = 'fabric-elements';
|
|
12
12
|
var packageName = "@atlaskit/status";
|
|
13
|
-
var packageVersion = "3.0.
|
|
13
|
+
var packageVersion = "3.0.4";
|
|
14
14
|
var createStatusAnalyticsAndFire = exports.createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
15
15
|
return function (payload) {
|
|
16
16
|
var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
|
|
@@ -52,20 +52,38 @@ var _default = exports.default = function _default(_ref) {
|
|
|
52
52
|
var previousColor = function previousColor() {
|
|
53
53
|
return currentFocusedColor - 1 < 0 ? palette.length - 1 : currentFocusedColor - 1;
|
|
54
54
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
if ((0, _platformFeatureFlags.fg)('editor_a11y_arrow_key_status_colour_palette')) {
|
|
56
|
+
switch (e.key) {
|
|
57
|
+
case 'ArrowRight':
|
|
58
|
+
case 'ArrowDown':
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
newColorIndex = nextColor();
|
|
61
|
+
break;
|
|
62
|
+
case 'ArrowLeft':
|
|
63
|
+
case 'ArrowUp':
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
newColorIndex = previousColor();
|
|
66
|
+
break;
|
|
67
|
+
case 'Tab':
|
|
68
|
+
setCurrentFocusedColor(0);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
switch (e.keyCode) {
|
|
73
|
+
case VK_RIGHT:
|
|
74
|
+
case VK_DOWN:
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
newColorIndex = nextColor();
|
|
77
|
+
break;
|
|
78
|
+
case VK_LEFT:
|
|
79
|
+
case VK_UP:
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
newColorIndex = previousColor();
|
|
82
|
+
break;
|
|
83
|
+
case VK_TAB:
|
|
84
|
+
setCurrentFocusedColor(0);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
69
87
|
}
|
|
70
88
|
if (newColorIndex === null) {
|
|
71
89
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const ELEMENTS_CHANNEL = 'fabric-elements';
|
|
2
2
|
const packageName = "@atlaskit/status";
|
|
3
|
-
const packageVersion = "3.0.
|
|
3
|
+
const packageVersion = "3.0.4";
|
|
4
4
|
export const createStatusAnalyticsAndFire = createAnalyticsEvent => payload => {
|
|
5
5
|
const statusPayload = {
|
|
6
6
|
...payload,
|
|
@@ -32,20 +32,38 @@ export default (({
|
|
|
32
32
|
let newColorIndex = null;
|
|
33
33
|
const nextColor = () => currentFocusedColor + 1 > palette.length - 1 ? 0 : currentFocusedColor + 1;
|
|
34
34
|
const previousColor = () => currentFocusedColor - 1 < 0 ? palette.length - 1 : currentFocusedColor - 1;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
if (fg('editor_a11y_arrow_key_status_colour_palette')) {
|
|
36
|
+
switch (e.key) {
|
|
37
|
+
case 'ArrowRight':
|
|
38
|
+
case 'ArrowDown':
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
newColorIndex = nextColor();
|
|
41
|
+
break;
|
|
42
|
+
case 'ArrowLeft':
|
|
43
|
+
case 'ArrowUp':
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
newColorIndex = previousColor();
|
|
46
|
+
break;
|
|
47
|
+
case 'Tab':
|
|
48
|
+
setCurrentFocusedColor(0);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
switch (e.keyCode) {
|
|
53
|
+
case VK_RIGHT:
|
|
54
|
+
case VK_DOWN:
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
newColorIndex = nextColor();
|
|
57
|
+
break;
|
|
58
|
+
case VK_LEFT:
|
|
59
|
+
case VK_UP:
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
newColorIndex = previousColor();
|
|
62
|
+
break;
|
|
63
|
+
case VK_TAB:
|
|
64
|
+
setCurrentFocusedColor(0);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
49
67
|
}
|
|
50
68
|
if (newColorIndex === null) {
|
|
51
69
|
return;
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
export var ELEMENTS_CHANNEL = 'fabric-elements';
|
|
5
5
|
var packageName = "@atlaskit/status";
|
|
6
|
-
var packageVersion = "3.0.
|
|
6
|
+
var packageVersion = "3.0.4";
|
|
7
7
|
export var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
8
8
|
return function (payload) {
|
|
9
9
|
var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
|
|
@@ -42,20 +42,38 @@ export default (function (_ref) {
|
|
|
42
42
|
var previousColor = function previousColor() {
|
|
43
43
|
return currentFocusedColor - 1 < 0 ? palette.length - 1 : currentFocusedColor - 1;
|
|
44
44
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
if (fg('editor_a11y_arrow_key_status_colour_palette')) {
|
|
46
|
+
switch (e.key) {
|
|
47
|
+
case 'ArrowRight':
|
|
48
|
+
case 'ArrowDown':
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
newColorIndex = nextColor();
|
|
51
|
+
break;
|
|
52
|
+
case 'ArrowLeft':
|
|
53
|
+
case 'ArrowUp':
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
newColorIndex = previousColor();
|
|
56
|
+
break;
|
|
57
|
+
case 'Tab':
|
|
58
|
+
setCurrentFocusedColor(0);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
switch (e.keyCode) {
|
|
63
|
+
case VK_RIGHT:
|
|
64
|
+
case VK_DOWN:
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
newColorIndex = nextColor();
|
|
67
|
+
break;
|
|
68
|
+
case VK_LEFT:
|
|
69
|
+
case VK_UP:
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
newColorIndex = previousColor();
|
|
72
|
+
break;
|
|
73
|
+
case VK_TAB:
|
|
74
|
+
setCurrentFocusedColor(0);
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
59
77
|
}
|
|
60
78
|
if (newColorIndex === null) {
|
|
61
79
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/status",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Fabric Status React Components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
31
|
-
"@atlaskit/icon": "^25.
|
|
31
|
+
"@atlaskit/icon": "^25.5.0",
|
|
32
32
|
"@atlaskit/lozenge": "^12.2.0",
|
|
33
33
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
35
|
-
"@atlaskit/primitives": "^14.
|
|
35
|
+
"@atlaskit/primitives": "^14.4.0",
|
|
36
36
|
"@atlaskit/textfield": "^8.0.0",
|
|
37
|
-
"@atlaskit/tokens": "^4.
|
|
37
|
+
"@atlaskit/tokens": "^4.7.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"@compiled/react": "^0.18.3",
|
|
40
40
|
"@emotion/react": "^11.7.1"
|
|
@@ -88,6 +88,9 @@
|
|
|
88
88
|
"platform-feature-flags": {
|
|
89
89
|
"platform-component-visual-refresh": {
|
|
90
90
|
"type": "boolean"
|
|
91
|
+
},
|
|
92
|
+
"editor_a11y_arrow_key_status_colour_palette": {
|
|
93
|
+
"type": "boolean"
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
}
|