@atlaskit/status 1.2.1 → 1.2.2
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 +6 -0
- package/dist/cjs/components/Status.js +20 -9
- package/dist/cjs/components/analytics.js +1 -1
- package/dist/cjs/components/internal/color.js +1 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Status.js +20 -3
- package/dist/es2019/components/analytics.js +1 -1
- package/dist/es2019/components/internal/color.js +1 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Status.js +19 -3
- package/dist/esm/components/analytics.js +1 -1
- package/dist/esm/components/internal/color.js +1 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Status.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/status
|
|
2
2
|
|
|
3
|
+
## 1.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5d2eeac35f7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5d2eeac35f7) - Fixes a browser specific bug that occurred in android chromium that led to the component losing focus unexpectedly when selected for editing.
|
|
8
|
+
|
|
3
9
|
## 1.2.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -23,7 +21,9 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
23
21
|
|
|
24
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
23
|
|
|
26
|
-
var _react =
|
|
24
|
+
var _react = require("react");
|
|
25
|
+
|
|
26
|
+
var _react2 = require("@emotion/react");
|
|
27
27
|
|
|
28
28
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
29
29
|
|
|
@@ -33,10 +33,6 @@ var _analytics = require("./analytics");
|
|
|
33
33
|
|
|
34
34
|
var _constants = require("./constants");
|
|
35
35
|
|
|
36
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
-
|
|
38
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
|
|
40
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
41
37
|
|
|
42
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -54,6 +50,20 @@ var colorToLozengeAppearanceMap = {
|
|
|
54
50
|
|
|
55
51
|
var DEFAULT_APPEARANCE = 'default';
|
|
56
52
|
var MAX_WIDTH = 200;
|
|
53
|
+
/**
|
|
54
|
+
* This is to account for a bug in android chromium and should be removed
|
|
55
|
+
* when the editor fixes its focus handling with respect to Status.
|
|
56
|
+
*
|
|
57
|
+
* See DSP-7701 for additional context.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
var inlineBlockStyles = (0, _react2.css)({
|
|
61
|
+
'& > *': {
|
|
62
|
+
display: 'inline-block !important'
|
|
63
|
+
}
|
|
64
|
+
}); // eg. Version/4.0 Chrome/95.0.4638.50
|
|
65
|
+
|
|
66
|
+
var isAndroidChromium = typeof window !== 'undefined' && /Version\/.* Chrome\/.*/.test(window.navigator.userAgent);
|
|
57
67
|
|
|
58
68
|
var StatusInternal = /*#__PURE__*/function (_PureComponent) {
|
|
59
69
|
(0, _inherits2.default)(StatusInternal, _PureComponent);
|
|
@@ -109,7 +119,8 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
109
119
|
|
|
110
120
|
var appearance = colorToLozengeAppearanceMap[color] || DEFAULT_APPEARANCE; // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
|
|
111
121
|
|
|
112
|
-
return
|
|
122
|
+
return (0, _react2.jsx)("span", {
|
|
123
|
+
css: isAndroidChromium ? inlineBlockStyles : undefined,
|
|
113
124
|
className: "status-lozenge-span",
|
|
114
125
|
onClick: onClick,
|
|
115
126
|
onMouseEnter: this.handleMouseEnter,
|
|
@@ -118,7 +129,7 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
118
129
|
"data-color": color,
|
|
119
130
|
"data-style": style,
|
|
120
131
|
role: role
|
|
121
|
-
},
|
|
132
|
+
}, (0, _react2.jsx)(_lozenge.default, {
|
|
122
133
|
appearance: appearance,
|
|
123
134
|
maxWidth: MAX_WIDTH
|
|
124
135
|
}, text));
|
|
@@ -16,7 +16,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
16
|
var ELEMENTS_CHANNEL = 'fabric-elements';
|
|
17
17
|
exports.ELEMENTS_CHANNEL = ELEMENTS_CHANNEL;
|
|
18
18
|
var packageName = "@atlaskit/status";
|
|
19
|
-
var packageVersion = "1.2.
|
|
19
|
+
var packageVersion = "1.2.2";
|
|
20
20
|
|
|
21
21
|
var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
22
22
|
return function (payload) {
|
|
@@ -109,7 +109,6 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
109
109
|
borderColor = _this$props2.borderColor,
|
|
110
110
|
value = _this$props2.value,
|
|
111
111
|
setRef = _this$props2.setRef;
|
|
112
|
-
var borderStyle = "1px solid ".concat(borderColor);
|
|
113
112
|
return (0, _react2.jsx)("span", {
|
|
114
113
|
css: buttonWrapperStyles
|
|
115
114
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages["".concat(value, "Color")], function (labels) {
|
|
@@ -129,7 +128,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
129
128
|
"aria-pressed": isSelected,
|
|
130
129
|
style: {
|
|
131
130
|
backgroundColor: backgroundColor || 'transparent',
|
|
132
|
-
|
|
131
|
+
borderColor: borderColor
|
|
133
132
|
},
|
|
134
133
|
ref: setRef
|
|
135
134
|
}, isSelected && (0, _react2.jsx)(_done.default, {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import { PureComponent } from 'react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import Lozenge from '@atlaskit/lozenge';
|
|
5
7
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
8
|
import { createStatusAnalyticsAndFire } from './analytics';
|
|
@@ -19,6 +21,20 @@ const colorToLozengeAppearanceMap = {
|
|
|
19
21
|
|
|
20
22
|
const DEFAULT_APPEARANCE = 'default';
|
|
21
23
|
const MAX_WIDTH = 200;
|
|
24
|
+
/**
|
|
25
|
+
* This is to account for a bug in android chromium and should be removed
|
|
26
|
+
* when the editor fixes its focus handling with respect to Status.
|
|
27
|
+
*
|
|
28
|
+
* See DSP-7701 for additional context.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const inlineBlockStyles = css({
|
|
32
|
+
'& > *': {
|
|
33
|
+
display: 'inline-block !important'
|
|
34
|
+
}
|
|
35
|
+
}); // eg. Version/4.0 Chrome/95.0.4638.50
|
|
36
|
+
|
|
37
|
+
const isAndroidChromium = typeof window !== 'undefined' && /Version\/.* Chrome\/.*/.test(window.navigator.userAgent);
|
|
22
38
|
|
|
23
39
|
class StatusInternal extends PureComponent {
|
|
24
40
|
constructor(...args) {
|
|
@@ -63,7 +79,8 @@ class StatusInternal extends PureComponent {
|
|
|
63
79
|
|
|
64
80
|
const appearance = colorToLozengeAppearanceMap[color] || DEFAULT_APPEARANCE; // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
|
|
65
81
|
|
|
66
|
-
return
|
|
82
|
+
return jsx("span", {
|
|
83
|
+
css: isAndroidChromium ? inlineBlockStyles : undefined,
|
|
67
84
|
className: "status-lozenge-span",
|
|
68
85
|
onClick: onClick,
|
|
69
86
|
onMouseEnter: this.handleMouseEnter,
|
|
@@ -72,7 +89,7 @@ class StatusInternal extends PureComponent {
|
|
|
72
89
|
"data-color": color,
|
|
73
90
|
"data-style": style,
|
|
74
91
|
role: role
|
|
75
|
-
},
|
|
92
|
+
}, jsx(Lozenge, {
|
|
76
93
|
appearance: appearance,
|
|
77
94
|
maxWidth: MAX_WIDTH
|
|
78
95
|
}, text));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const ELEMENTS_CHANNEL = 'fabric-elements';
|
|
2
2
|
const packageName = "@atlaskit/status";
|
|
3
|
-
const packageVersion = "1.2.
|
|
3
|
+
const packageVersion = "1.2.2";
|
|
4
4
|
export const createStatusAnalyticsAndFire = createAnalyticsEvent => payload => {
|
|
5
5
|
const statusPayload = { ...payload,
|
|
6
6
|
eventType: 'ui'
|
|
@@ -79,7 +79,6 @@ export default class Color extends PureComponent {
|
|
|
79
79
|
value,
|
|
80
80
|
setRef
|
|
81
81
|
} = this.props;
|
|
82
|
-
const borderStyle = `1px solid ${borderColor}`;
|
|
83
82
|
return jsx("span", {
|
|
84
83
|
css: buttonWrapperStyles
|
|
85
84
|
}, jsx(FormattedMessage, messages[`${value}Color`], labels => jsx("button", {
|
|
@@ -98,7 +97,7 @@ export default class Color extends PureComponent {
|
|
|
98
97
|
"aria-pressed": isSelected,
|
|
99
98
|
style: {
|
|
100
99
|
backgroundColor: backgroundColor || 'transparent',
|
|
101
|
-
|
|
100
|
+
borderColor
|
|
102
101
|
},
|
|
103
102
|
ref: setRef
|
|
104
103
|
}, isSelected && jsx(EditorDoneIcon, {
|
package/dist/es2019/version.json
CHANGED
|
@@ -10,8 +10,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/** @jsx jsx */
|
|
14
14
|
import { PureComponent } from 'react';
|
|
15
|
+
import { css, jsx } from '@emotion/react';
|
|
15
16
|
import Lozenge from '@atlaskit/lozenge';
|
|
16
17
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
18
|
import { createStatusAnalyticsAndFire } from './analytics';
|
|
@@ -30,6 +31,20 @@ var colorToLozengeAppearanceMap = {
|
|
|
30
31
|
|
|
31
32
|
var DEFAULT_APPEARANCE = 'default';
|
|
32
33
|
var MAX_WIDTH = 200;
|
|
34
|
+
/**
|
|
35
|
+
* This is to account for a bug in android chromium and should be removed
|
|
36
|
+
* when the editor fixes its focus handling with respect to Status.
|
|
37
|
+
*
|
|
38
|
+
* See DSP-7701 for additional context.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
var inlineBlockStyles = css({
|
|
42
|
+
'& > *': {
|
|
43
|
+
display: 'inline-block !important'
|
|
44
|
+
}
|
|
45
|
+
}); // eg. Version/4.0 Chrome/95.0.4638.50
|
|
46
|
+
|
|
47
|
+
var isAndroidChromium = typeof window !== 'undefined' && /Version\/.* Chrome\/.*/.test(window.navigator.userAgent);
|
|
33
48
|
|
|
34
49
|
var StatusInternal = /*#__PURE__*/function (_PureComponent) {
|
|
35
50
|
_inherits(StatusInternal, _PureComponent);
|
|
@@ -89,7 +104,8 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
89
104
|
|
|
90
105
|
var appearance = colorToLozengeAppearanceMap[color] || DEFAULT_APPEARANCE; // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
|
|
91
106
|
|
|
92
|
-
return
|
|
107
|
+
return jsx("span", {
|
|
108
|
+
css: isAndroidChromium ? inlineBlockStyles : undefined,
|
|
93
109
|
className: "status-lozenge-span",
|
|
94
110
|
onClick: onClick,
|
|
95
111
|
onMouseEnter: this.handleMouseEnter,
|
|
@@ -98,7 +114,7 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
98
114
|
"data-color": color,
|
|
99
115
|
"data-style": style,
|
|
100
116
|
role: role
|
|
101
|
-
},
|
|
117
|
+
}, jsx(Lozenge, {
|
|
102
118
|
appearance: appearance,
|
|
103
119
|
maxWidth: MAX_WIDTH
|
|
104
120
|
}, text));
|
|
@@ -6,7 +6,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
export var ELEMENTS_CHANNEL = 'fabric-elements';
|
|
8
8
|
var packageName = "@atlaskit/status";
|
|
9
|
-
var packageVersion = "1.2.
|
|
9
|
+
var packageVersion = "1.2.2";
|
|
10
10
|
export var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
11
11
|
return function (payload) {
|
|
12
12
|
var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
|
|
@@ -86,7 +86,6 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
86
86
|
borderColor = _this$props2.borderColor,
|
|
87
87
|
value = _this$props2.value,
|
|
88
88
|
setRef = _this$props2.setRef;
|
|
89
|
-
var borderStyle = "1px solid ".concat(borderColor);
|
|
90
89
|
return jsx("span", {
|
|
91
90
|
css: buttonWrapperStyles
|
|
92
91
|
}, jsx(FormattedMessage, messages["".concat(value, "Color")], function (labels) {
|
|
@@ -106,7 +105,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
106
105
|
"aria-pressed": isSelected,
|
|
107
106
|
style: {
|
|
108
107
|
backgroundColor: backgroundColor || 'transparent',
|
|
109
|
-
|
|
108
|
+
borderColor: borderColor
|
|
110
109
|
},
|
|
111
110
|
ref: setRef
|
|
112
111
|
}, isSelected && jsx(EditorDoneIcon, {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
export declare type Color = 'neutral' | 'purple' | 'blue' | 'red' | 'yellow' | 'green';
|
|
4
4
|
export declare type StatusStyle = 'bold' | 'subtle';
|
|
@@ -12,4 +12,4 @@ export interface OwnProps {
|
|
|
12
12
|
role?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare type Props = OwnProps & WithAnalyticsEventsProps;
|
|
15
|
-
export declare const Status:
|
|
15
|
+
export declare const Status: import("react").ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any>>;
|