@atlaskit/status 1.2.2 → 1.2.3
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/analytics.js +1 -1
- package/dist/cjs/components/internal/color-palette.js +5 -4
- package/dist/cjs/components/internal/color.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/analytics.js +1 -1
- package/dist/es2019/components/internal/color-palette.js +4 -4
- package/dist/es2019/components/internal/color.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/analytics.js +1 -1
- package/dist/esm/components/internal/color-palette.js +6 -5
- package/dist/esm/components/internal/color.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/internal/color.d.ts +1 -0
- package/package.json +1 -1
- package/report.api.md +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/status
|
|
2
2
|
|
|
3
|
+
## 1.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a6900fd8727`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a6900fd8727) - DSP-6671 - Separates icon and border color and adds semantic tokens to status color palette. Updated appearances only visible in applications configured to use the new Tokens API (currently in alpha).
|
|
8
|
+
|
|
3
9
|
## 1.2.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -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.3";
|
|
20
20
|
|
|
21
21
|
var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
22
22
|
return function (payload) {
|
|
@@ -31,8 +31,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
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; }
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
var palette = [['neutral', (0, _tokens.token)('color.background.neutral', colors.N40), (0, _tokens.token)('color.text', colors.N400)], ['purple', (0, _tokens.token)('color.background.discovery', colors.P50), (0, _tokens.token)('color.text.discovery', colors.P400)], ['blue', (0, _tokens.token)('color.background.information', colors.B50), (0, _tokens.token)('color.text.information', colors.B400)], ['red', (0, _tokens.token)('color.background.danger', colors.R50), (0, _tokens.token)('color.text.danger', colors.R400)], ['yellow', (0, _tokens.token)('color.background.warning', colors.Y50), (0, _tokens.token)('color.text.warning', colors.Y400)], ['green', (0, _tokens.token)('color.background.success', colors.G50), (0, _tokens.token)('color.text.success', colors.G400)]];
|
|
34
|
+
var palette = [['neutral', (0, _tokens.token)('color.background.neutral', colors.N40), (0, _tokens.token)('color.border.bold', colors.N400), (0, _tokens.token)('color.icon', colors.N400)], ['purple', (0, _tokens.token)('color.background.discovery', colors.P50), (0, _tokens.token)('color.border.discovery', colors.P400), (0, _tokens.token)('color.icon.discovery', colors.P400)], ['blue', (0, _tokens.token)('color.background.information', colors.B50), (0, _tokens.token)('color.border.information', colors.B400), (0, _tokens.token)('color.icon.information', colors.B400)], ['red', (0, _tokens.token)('color.background.danger', colors.R50), (0, _tokens.token)('color.border.danger', colors.R400), (0, _tokens.token)('color.icon.danger', colors.R400)], ['yellow', (0, _tokens.token)('color.background.warning', colors.Y50), (0, _tokens.token)('color.border.warning', colors.Y400), (0, _tokens.token)('color.icon.warning', colors.Y400)], ['green', (0, _tokens.token)('color.background.success', colors.G50), (0, _tokens.token)('color.border.success', colors.G400), (0, _tokens.token)('color.icon.success', colors.G400)]];
|
|
36
35
|
var colorPaletteWrapperStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: ", "px ", "px 0 ", "px;\n /* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */\n display: flex;\n flex-wrap: wrap;\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), (0, _constants.gridSize)());
|
|
37
36
|
var VK_LEFT = 37; //ArrowLeft
|
|
38
37
|
|
|
@@ -123,16 +122,18 @@ var _default = function _default(_ref) {
|
|
|
123
122
|
},
|
|
124
123
|
onKeyDown: memoizedHandleKeyDown
|
|
125
124
|
}, palette.map(function (_ref4, i) {
|
|
126
|
-
var _ref5 = (0, _slicedToArray2.default)(_ref4,
|
|
125
|
+
var _ref5 = (0, _slicedToArray2.default)(_ref4, 4),
|
|
127
126
|
colorValue = _ref5[0],
|
|
128
127
|
backgroundColor = _ref5[1],
|
|
129
|
-
borderColor = _ref5[2]
|
|
128
|
+
borderColor = _ref5[2],
|
|
129
|
+
iconColor = _ref5[3];
|
|
130
130
|
|
|
131
131
|
return (0, _react2.jsx)(_color.default, {
|
|
132
132
|
key: colorValue,
|
|
133
133
|
value: colorValue,
|
|
134
134
|
backgroundColor: backgroundColor,
|
|
135
135
|
borderColor: borderColor,
|
|
136
|
+
iconColor: iconColor,
|
|
136
137
|
onClick: onClick,
|
|
137
138
|
onHover: onHover,
|
|
138
139
|
isSelected: colorValue === selectedColor,
|
|
@@ -107,6 +107,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
107
107
|
backgroundColor = _this$props2.backgroundColor,
|
|
108
108
|
isSelected = _this$props2.isSelected,
|
|
109
109
|
borderColor = _this$props2.borderColor,
|
|
110
|
+
iconColor = _this$props2.iconColor,
|
|
110
111
|
value = _this$props2.value,
|
|
111
112
|
setRef = _this$props2.setRef;
|
|
112
113
|
return (0, _react2.jsx)("span", {
|
|
@@ -132,7 +133,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
132
133
|
},
|
|
133
134
|
ref: setRef
|
|
134
135
|
}, isSelected && (0, _react2.jsx)(_done.default, {
|
|
135
|
-
primaryColor:
|
|
136
|
+
primaryColor: iconColor,
|
|
136
137
|
label: labels[0]
|
|
137
138
|
}));
|
|
138
139
|
}));
|
package/dist/cjs/version.json
CHANGED
|
@@ -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.3";
|
|
4
4
|
export const createStatusAnalyticsAndFire = createAnalyticsEvent => payload => {
|
|
5
5
|
const statusPayload = { ...payload,
|
|
6
6
|
eventType: 'ui'
|
|
@@ -4,9 +4,8 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { token } from '@atlaskit/tokens';
|
|
5
5
|
import React, { useEffect, useRef, useCallback } from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import Color from './color';
|
|
8
|
-
|
|
9
|
-
const palette = [['neutral', token('color.background.neutral', colors.N40), token('color.text', colors.N400)], ['purple', token('color.background.discovery', colors.P50), token('color.text.discovery', colors.P400)], ['blue', token('color.background.information', colors.B50), token('color.text.information', colors.B400)], ['red', token('color.background.danger', colors.R50), token('color.text.danger', colors.R400)], ['yellow', token('color.background.warning', colors.Y50), token('color.text.warning', colors.Y400)], ['green', token('color.background.success', colors.G50), token('color.text.success', colors.G400)]];
|
|
7
|
+
import Color from './color';
|
|
8
|
+
const palette = [['neutral', token('color.background.neutral', colors.N40), token('color.border.bold', colors.N400), token('color.icon', colors.N400)], ['purple', token('color.background.discovery', colors.P50), token('color.border.discovery', colors.P400), token('color.icon.discovery', colors.P400)], ['blue', token('color.background.information', colors.B50), token('color.border.information', colors.B400), token('color.icon.information', colors.B400)], ['red', token('color.background.danger', colors.R50), token('color.border.danger', colors.R400), token('color.icon.danger', colors.R400)], ['yellow', token('color.background.warning', colors.Y50), token('color.border.warning', colors.Y400), token('color.icon.warning', colors.Y400)], ['green', token('color.background.success', colors.G50), token('color.border.success', colors.G400), token('color.icon.success', colors.G400)]];
|
|
10
9
|
const colorPaletteWrapperStyles = css`
|
|
11
10
|
margin: ${gridSize()}px ${gridSize()}px 0 ${gridSize()}px;
|
|
12
11
|
/* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
|
|
@@ -91,12 +90,13 @@ export default (({
|
|
|
91
90
|
maxWidth: cols * 32
|
|
92
91
|
},
|
|
93
92
|
onKeyDown: memoizedHandleKeyDown
|
|
94
|
-
}, palette.map(([colorValue, backgroundColor, borderColor], i) => {
|
|
93
|
+
}, palette.map(([colorValue, backgroundColor, borderColor, iconColor], i) => {
|
|
95
94
|
return jsx(Color, {
|
|
96
95
|
key: colorValue,
|
|
97
96
|
value: colorValue,
|
|
98
97
|
backgroundColor: backgroundColor,
|
|
99
98
|
borderColor: borderColor,
|
|
99
|
+
iconColor: iconColor,
|
|
100
100
|
onClick: onClick,
|
|
101
101
|
onHover: onHover,
|
|
102
102
|
isSelected: colorValue === selectedColor,
|
|
@@ -76,6 +76,7 @@ export default class Color extends PureComponent {
|
|
|
76
76
|
backgroundColor,
|
|
77
77
|
isSelected,
|
|
78
78
|
borderColor,
|
|
79
|
+
iconColor,
|
|
79
80
|
value,
|
|
80
81
|
setRef
|
|
81
82
|
} = this.props;
|
|
@@ -101,7 +102,7 @@ export default class Color extends PureComponent {
|
|
|
101
102
|
},
|
|
102
103
|
ref: setRef
|
|
103
104
|
}, isSelected && jsx(EditorDoneIcon, {
|
|
104
|
-
primaryColor:
|
|
105
|
+
primaryColor: iconColor,
|
|
105
106
|
label: labels[0]
|
|
106
107
|
}))));
|
|
107
108
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -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.3";
|
|
10
10
|
export var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
11
11
|
return function (payload) {
|
|
12
12
|
var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
|
|
@@ -9,9 +9,8 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
9
9
|
import { token } from '@atlaskit/tokens';
|
|
10
10
|
import React, { useEffect, useRef, useCallback } from 'react';
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
|
-
import Color from './color';
|
|
13
|
-
|
|
14
|
-
var palette = [['neutral', token('color.background.neutral', colors.N40), token('color.text', colors.N400)], ['purple', token('color.background.discovery', colors.P50), token('color.text.discovery', colors.P400)], ['blue', token('color.background.information', colors.B50), token('color.text.information', colors.B400)], ['red', token('color.background.danger', colors.R50), token('color.text.danger', colors.R400)], ['yellow', token('color.background.warning', colors.Y50), token('color.text.warning', colors.Y400)], ['green', token('color.background.success', colors.G50), token('color.text.success', colors.G400)]];
|
|
12
|
+
import Color from './color';
|
|
13
|
+
var palette = [['neutral', token('color.background.neutral', colors.N40), token('color.border.bold', colors.N400), token('color.icon', colors.N400)], ['purple', token('color.background.discovery', colors.P50), token('color.border.discovery', colors.P400), token('color.icon.discovery', colors.P400)], ['blue', token('color.background.information', colors.B50), token('color.border.information', colors.B400), token('color.icon.information', colors.B400)], ['red', token('color.background.danger', colors.R50), token('color.border.danger', colors.R400), token('color.icon.danger', colors.R400)], ['yellow', token('color.background.warning', colors.Y50), token('color.border.warning', colors.Y400), token('color.icon.warning', colors.Y400)], ['green', token('color.background.success', colors.G50), token('color.border.success', colors.G400), token('color.icon.success', colors.G400)]];
|
|
15
14
|
var colorPaletteWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: ", "px ", "px 0 ", "px;\n /* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */\n display: flex;\n flex-wrap: wrap;\n"])), gridSize(), gridSize(), gridSize());
|
|
16
15
|
var VK_LEFT = 37; //ArrowLeft
|
|
17
16
|
|
|
@@ -101,16 +100,18 @@ export default (function (_ref) {
|
|
|
101
100
|
},
|
|
102
101
|
onKeyDown: memoizedHandleKeyDown
|
|
103
102
|
}, palette.map(function (_ref4, i) {
|
|
104
|
-
var _ref5 = _slicedToArray(_ref4,
|
|
103
|
+
var _ref5 = _slicedToArray(_ref4, 4),
|
|
105
104
|
colorValue = _ref5[0],
|
|
106
105
|
backgroundColor = _ref5[1],
|
|
107
|
-
borderColor = _ref5[2]
|
|
106
|
+
borderColor = _ref5[2],
|
|
107
|
+
iconColor = _ref5[3];
|
|
108
108
|
|
|
109
109
|
return jsx(Color, {
|
|
110
110
|
key: colorValue,
|
|
111
111
|
value: colorValue,
|
|
112
112
|
backgroundColor: backgroundColor,
|
|
113
113
|
borderColor: borderColor,
|
|
114
|
+
iconColor: iconColor,
|
|
114
115
|
onClick: onClick,
|
|
115
116
|
onHover: onHover,
|
|
116
117
|
isSelected: colorValue === selectedColor,
|
|
@@ -84,6 +84,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
84
|
backgroundColor = _this$props2.backgroundColor,
|
|
85
85
|
isSelected = _this$props2.isSelected,
|
|
86
86
|
borderColor = _this$props2.borderColor,
|
|
87
|
+
iconColor = _this$props2.iconColor,
|
|
87
88
|
value = _this$props2.value,
|
|
88
89
|
setRef = _this$props2.setRef;
|
|
89
90
|
return jsx("span", {
|
|
@@ -109,7 +110,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
109
110
|
},
|
|
110
111
|
ref: setRef
|
|
111
112
|
}, isSelected && jsx(EditorDoneIcon, {
|
|
112
|
-
primaryColor:
|
|
113
|
+
primaryColor: iconColor,
|
|
113
114
|
label: labels[0]
|
|
114
115
|
}));
|
|
115
116
|
}));
|
package/dist/esm/version.json
CHANGED
|
@@ -9,6 +9,7 @@ export interface ColorProps {
|
|
|
9
9
|
onHover?: (value: ColorType) => void;
|
|
10
10
|
backgroundColor: string;
|
|
11
11
|
borderColor: string;
|
|
12
|
+
iconColor: string;
|
|
12
13
|
setRef?: (value: HTMLButtonElement) => HTMLButtonElement;
|
|
13
14
|
}
|
|
14
15
|
export default class Color extends PureComponent<ColorProps> {
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
<!-- API Report Version: 2.2 -->
|
|
2
|
+
|
|
1
3
|
## API Report File for "@atlaskit/status"
|
|
2
4
|
|
|
3
|
-
> Do not edit this file.
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
Generated API Report version: 2.0
|
|
7
|
-
-->
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
### Main Entry Types
|
|
13
|
+
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
10
15
|
|
|
11
16
|
```ts
|
|
12
17
|
import { default as React_2 } from 'react';
|
|
@@ -15,7 +20,7 @@ import { WithIntlProps } from 'react-intl-next';
|
|
|
15
20
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
16
21
|
|
|
17
22
|
// @public (undocumented)
|
|
18
|
-
export type Color = '
|
|
23
|
+
export type Color = 'blue' | 'green' | 'neutral' | 'purple' | 'red' | 'yellow';
|
|
19
24
|
|
|
20
25
|
// @public (undocumented)
|
|
21
26
|
type ColorType = Color;
|
|
@@ -78,3 +83,5 @@ export type StatusStyle = 'bold' | 'subtle';
|
|
|
78
83
|
|
|
79
84
|
// (No @packageDocumentation comment for this package)
|
|
80
85
|
```
|
|
86
|
+
|
|
87
|
+
<!--SECTION END: Main Entry Types-->
|