@atlaskit/status 3.0.20 → 3.0.22
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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/status
|
|
2
2
|
|
|
3
|
+
## 3.0.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a5252d864001d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a5252d864001d) -
|
|
8
|
+
Fix fg call from module scope to component scope
|
|
9
|
+
|
|
10
|
+
## 3.0.21
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 3.0.20
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.products.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__status/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
24
|
+
],
|
|
25
|
+
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../analytics/analytics-next/afm-products/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/icon/afm-products/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/lozenge/afm-products/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../platform/feature-flags/afm-products/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../platform/feature-flags-react/afm-products/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../design-system/primitives/afm-products/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../design-system/textfield/afm-products/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/tokens/afm-products/tsconfig.json"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -19,7 +19,6 @@ var paletteRefreshed = [['neutral', "var(--ds-background-accent-gray-subtler, #D
|
|
|
19
19
|
var getPalette = function getPalette() {
|
|
20
20
|
return (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? paletteRefreshed : paletteLegacy;
|
|
21
21
|
};
|
|
22
|
-
var palette = getPalette();
|
|
23
22
|
|
|
24
23
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
25
24
|
var colorPaletteWrapperStyles = null;
|
|
@@ -35,6 +34,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
35
34
|
selectedColor = _ref.selectedColor,
|
|
36
35
|
className = _ref.className,
|
|
37
36
|
onHover = _ref.onHover;
|
|
37
|
+
var palette = getPalette();
|
|
38
38
|
var colorRefs = (0, _react.useRef)([]);
|
|
39
39
|
var _useState = (0, _react.useState)(0),
|
|
40
40
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -42,7 +42,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
42
42
|
setCurrentFocusedColor = _useState2[1];
|
|
43
43
|
(0, _react.useEffect)(function () {
|
|
44
44
|
colorRefs.current = colorRefs.current.slice(0, palette.length);
|
|
45
|
-
}, []);
|
|
45
|
+
}, [palette.length]);
|
|
46
46
|
var memoizedHandleKeyDown = (0, _react.useCallback)(function (e) {
|
|
47
47
|
var newColorIndex = null;
|
|
48
48
|
var nextColor = function nextColor() {
|
|
@@ -90,7 +90,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
90
90
|
setCurrentFocusedColor(newColorIndex);
|
|
91
91
|
var newRef = colorRefs.current[newColorIndex];
|
|
92
92
|
newRef === null || newRef === void 0 || newRef.focus();
|
|
93
|
-
}, [currentFocusedColor, setCurrentFocusedColor, colorRefs]);
|
|
93
|
+
}, [currentFocusedColor, setCurrentFocusedColor, colorRefs, palette.length]);
|
|
94
94
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
95
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
96
96
|
className: (0, _runtime.ax)(["_19bvidpf _19pku2gc _2hwxu2gc _otyridpf _18u0u2gc _1e0c1txw _1n261g80", className]),
|
|
@@ -7,7 +7,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
7
7
|
const paletteLegacy = [['neutral', "var(--ds-background-neutral, #091E420F)", "var(--ds-border-bold, #758195)", "var(--ds-icon, #44546F)"], ['purple', "var(--ds-background-discovery, #F3F0FF)", "var(--ds-border-discovery, #8270DB)", "var(--ds-icon-discovery, #8270DB)"], ['blue', "var(--ds-background-information, #E9F2FF)", "var(--ds-border-information, #1D7AFC)", "var(--ds-icon-information, #1D7AFC)"], ['red', "var(--ds-background-danger, #FFECEB)", "var(--ds-border-danger, #E2483D)", "var(--ds-icon-danger, #C9372C)"], ['yellow', "var(--ds-background-warning, #FFF7D6)", "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)"], ['green', "var(--ds-background-success, #DCFFF1)", "var(--ds-border-success, #22A06B)", "var(--ds-icon-success, #22A06B)"]];
|
|
8
8
|
const paletteRefreshed = [['neutral', "var(--ds-background-accent-gray-subtler, #DCDFE4)", "var(--ds-border-bold, #758195)", "var(--ds-icon, #44546F)"], ['blue', "var(--ds-background-information-pressed, #85B8FF)", "var(--ds-border-information, #1D7AFC)", "var(--ds-icon, #44546F)"], ['green', "var(--ds-background-success-pressed, #7EE2B8)", "var(--ds-border-success, #22A06B)", "var(--ds-icon, #44546F)"], ['yellow', "var(--ds-background-warning-pressed, #F5CD47)", "var(--ds-border-warning, #E56910)", "var(--ds-icon, #44546F)"], ['red', "var(--ds-background-danger-pressed, #FD9891)", "var(--ds-border-danger, #E2483D)", "var(--ds-icon, #44546F)"], ['purple', "var(--ds-background-discovery-pressed, #B8ACF6)", "var(--ds-border-discovery, #8270DB)", "var(--ds-icon, #44546F)"]];
|
|
9
9
|
const getPalette = () => fg('platform-component-visual-refresh') ? paletteRefreshed : paletteLegacy;
|
|
10
|
-
const palette = getPalette();
|
|
11
10
|
|
|
12
11
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
13
12
|
const colorPaletteWrapperStyles = null;
|
|
@@ -23,11 +22,12 @@ export default (({
|
|
|
23
22
|
className,
|
|
24
23
|
onHover
|
|
25
24
|
}) => {
|
|
25
|
+
const palette = getPalette();
|
|
26
26
|
const colorRefs = useRef([]);
|
|
27
27
|
const [currentFocusedColor, setCurrentFocusedColor] = useState(0);
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
colorRefs.current = colorRefs.current.slice(0, palette.length);
|
|
30
|
-
}, []);
|
|
30
|
+
}, [palette.length]);
|
|
31
31
|
const memoizedHandleKeyDown = useCallback(e => {
|
|
32
32
|
let newColorIndex = null;
|
|
33
33
|
const nextColor = () => currentFocusedColor + 1 > palette.length - 1 ? 0 : currentFocusedColor + 1;
|
|
@@ -71,7 +71,7 @@ export default (({
|
|
|
71
71
|
setCurrentFocusedColor(newColorIndex);
|
|
72
72
|
const newRef = colorRefs.current[newColorIndex];
|
|
73
73
|
newRef === null || newRef === void 0 ? void 0 : newRef.focus();
|
|
74
|
-
}, [currentFocusedColor, setCurrentFocusedColor, colorRefs]);
|
|
74
|
+
}, [currentFocusedColor, setCurrentFocusedColor, colorRefs, palette.length]);
|
|
75
75
|
return /*#__PURE__*/React.createElement("ul", {
|
|
76
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
77
77
|
className: ax(["_19bvidpf _19pku2gc _2hwxu2gc _otyridpf _18u0u2gc _1e0c1txw _1n261g80", className]),
|
|
@@ -10,7 +10,6 @@ var paletteRefreshed = [['neutral', "var(--ds-background-accent-gray-subtler, #D
|
|
|
10
10
|
var getPalette = function getPalette() {
|
|
11
11
|
return fg('platform-component-visual-refresh') ? paletteRefreshed : paletteLegacy;
|
|
12
12
|
};
|
|
13
|
-
var palette = getPalette();
|
|
14
13
|
|
|
15
14
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
16
15
|
var colorPaletteWrapperStyles = null;
|
|
@@ -26,6 +25,7 @@ export default (function (_ref) {
|
|
|
26
25
|
selectedColor = _ref.selectedColor,
|
|
27
26
|
className = _ref.className,
|
|
28
27
|
onHover = _ref.onHover;
|
|
28
|
+
var palette = getPalette();
|
|
29
29
|
var colorRefs = useRef([]);
|
|
30
30
|
var _useState = useState(0),
|
|
31
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -33,7 +33,7 @@ export default (function (_ref) {
|
|
|
33
33
|
setCurrentFocusedColor = _useState2[1];
|
|
34
34
|
useEffect(function () {
|
|
35
35
|
colorRefs.current = colorRefs.current.slice(0, palette.length);
|
|
36
|
-
}, []);
|
|
36
|
+
}, [palette.length]);
|
|
37
37
|
var memoizedHandleKeyDown = useCallback(function (e) {
|
|
38
38
|
var newColorIndex = null;
|
|
39
39
|
var nextColor = function nextColor() {
|
|
@@ -81,7 +81,7 @@ export default (function (_ref) {
|
|
|
81
81
|
setCurrentFocusedColor(newColorIndex);
|
|
82
82
|
var newRef = colorRefs.current[newColorIndex];
|
|
83
83
|
newRef === null || newRef === void 0 || newRef.focus();
|
|
84
|
-
}, [currentFocusedColor, setCurrentFocusedColor, colorRefs]);
|
|
84
|
+
}, [currentFocusedColor, setCurrentFocusedColor, colorRefs, palette.length]);
|
|
85
85
|
return /*#__PURE__*/React.createElement("ul", {
|
|
86
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
87
87
|
className: ax(["_19bvidpf _19pku2gc _2hwxu2gc _otyridpf _18u0u2gc _1e0c1txw _1n261g80", className]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/status",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.22",
|
|
4
4
|
"description": "Fabric Status React Components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/lozenge": "^13.0.0",
|
|
33
33
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
35
|
-
"@atlaskit/primitives": "^
|
|
35
|
+
"@atlaskit/primitives": "^16.0.0",
|
|
36
36
|
"@atlaskit/textfield": "^8.0.0",
|
|
37
37
|
"@atlaskit/tokens": "^7.0.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@af/visual-regression": "workspace:^",
|
|
47
47
|
"@atlaskit/elements-test-helpers": "workspace:^",
|
|
48
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
48
|
+
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
49
49
|
"@testing-library/jest-dom": "^6.4.5",
|
|
50
50
|
"@testing-library/react": "^13.4.0",
|
|
51
51
|
"enzyme": "^3.10.0",
|