@atlaskit/heading 5.1.1 → 5.2.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/heading
2
2
 
3
+ ## 5.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#138526](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138526)
8
+ [`1c66b8e32f30a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c66b8e32f30a) -
9
+ [ux] Removed feature flag `platform-typography-improved-color-control` resulting in automatic
10
+ color inversion based on bold surfaces will only affect the default color.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 5.1.1
4
17
 
5
18
  ### Patch Changes
@@ -12,7 +12,6 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var React = _react;
13
13
  var _runtime = require("@compiled/react/runtime");
14
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _primitives = require("@atlaskit/primitives");
17
16
  var _compiled = require("@atlaskit/primitives/compiled");
18
17
  var _headingContext = require("./heading-context");
@@ -57,24 +56,13 @@ var headingSizeStylesMap = {
57
56
 
58
57
  var useColor = function useColor(colorProp) {
59
58
  var surface = (0, _compiled.UNSAFE_useSurface)();
60
- if ((0, _platformFeatureFlags.fg)('platform-typography-improved-color-control')) {
61
- if (colorProp) {
62
- return colorProp;
63
- }
64
- if (_primitives.UNSAFE_inverseColorMap.hasOwnProperty(surface)) {
65
- return _primitives.UNSAFE_inverseColorMap[surface];
66
- }
67
- return 'color.text';
59
+ if (colorProp) {
60
+ return colorProp;
68
61
  }
69
-
70
- /**
71
- * Where the color of the surface is inverted we always override the color
72
- * as there is no valid choice that is not covered by the override.
73
- */
74
62
  if (_primitives.UNSAFE_inverseColorMap.hasOwnProperty(surface)) {
75
63
  return _primitives.UNSAFE_inverseColorMap[surface];
76
64
  }
77
- return colorProp || 'color.text';
65
+ return 'color.text';
78
66
  };
79
67
 
80
68
  /**
@@ -3,7 +3,6 @@ import "./heading.partial.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { forwardRef } from 'react';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { UNSAFE_inverseColorMap } from '@atlaskit/primitives';
8
7
  import { UNSAFE_useSurface } from '@atlaskit/primitives/compiled';
9
8
  import { useHeading } from './heading-context';
@@ -46,24 +45,13 @@ const headingSizeStylesMap = {
46
45
 
47
46
  const useColor = colorProp => {
48
47
  const surface = UNSAFE_useSurface();
49
- if (fg('platform-typography-improved-color-control')) {
50
- if (colorProp) {
51
- return colorProp;
52
- }
53
- if (UNSAFE_inverseColorMap.hasOwnProperty(surface)) {
54
- return UNSAFE_inverseColorMap[surface];
55
- }
56
- return 'color.text';
48
+ if (colorProp) {
49
+ return colorProp;
57
50
  }
58
-
59
- /**
60
- * Where the color of the surface is inverted we always override the color
61
- * as there is no valid choice that is not covered by the override.
62
- */
63
51
  if (UNSAFE_inverseColorMap.hasOwnProperty(surface)) {
64
52
  return UNSAFE_inverseColorMap[surface];
65
53
  }
66
- return colorProp || 'color.text';
54
+ return 'color.text';
67
55
  };
68
56
 
69
57
  /**
@@ -4,7 +4,6 @@ import "./heading.partial.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
  import { UNSAFE_inverseColorMap } from '@atlaskit/primitives';
9
8
  import { UNSAFE_useSurface } from '@atlaskit/primitives/compiled';
10
9
  import { useHeading } from './heading-context';
@@ -47,24 +46,13 @@ var headingSizeStylesMap = {
47
46
 
48
47
  var useColor = function useColor(colorProp) {
49
48
  var surface = UNSAFE_useSurface();
50
- if (fg('platform-typography-improved-color-control')) {
51
- if (colorProp) {
52
- return colorProp;
53
- }
54
- if (UNSAFE_inverseColorMap.hasOwnProperty(surface)) {
55
- return UNSAFE_inverseColorMap[surface];
56
- }
57
- return 'color.text';
49
+ if (colorProp) {
50
+ return colorProp;
58
51
  }
59
-
60
- /**
61
- * Where the color of the surface is inverted we always override the color
62
- * as there is no valid choice that is not covered by the override.
63
- */
64
52
  if (UNSAFE_inverseColorMap.hasOwnProperty(surface)) {
65
53
  return UNSAFE_inverseColorMap[surface];
66
54
  }
67
- return colorProp || 'color.text';
55
+ return 'color.text';
68
56
  };
69
57
 
70
58
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "5.1.1",
3
+ "version": "5.2.0",
4
4
  "description": "A heading is a typography component used to display text in different sizes and formats.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,9 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/css": "^0.10.0",
35
- "@atlaskit/platform-feature-flags": "^1.1.0",
36
- "@atlaskit/primitives": "^14.2.0",
37
- "@atlaskit/tokens": "^4.5.0",
35
+ "@atlaskit/primitives": "^14.4.0",
36
+ "@atlaskit/tokens": "^4.7.0",
38
37
  "@babel/runtime": "^7.0.0",
39
38
  "@compiled/react": "^0.18.3"
40
39
  },
@@ -46,10 +45,12 @@
46
45
  "@af/formatting": "^0.0.4",
47
46
  "@af/integration-testing": "^0.5.0",
48
47
  "@af/visual-regression": "^1.3.0",
49
- "@atlaskit/button": "^21.1.0",
48
+ "@atlaskit/button": "^23.0.0",
49
+ "@atlaskit/docs": "^10.0.0",
50
50
  "@atlaskit/ds-lib": "^4.0.0",
51
51
  "@atlaskit/ssr": "^0.4.0",
52
52
  "@atlassian/codegen": "^0.1.0",
53
+ "@atlassian/ssr-tests": "^0.2.0",
53
54
  "@testing-library/react": "^13.4.0",
54
55
  "react-dom": "^18.2.0",
55
56
  "ts-node": "^10.9.1",
@@ -87,10 +88,5 @@
87
88
  "af:exports": {
88
89
  ".": "./src/index.tsx"
89
90
  },
90
- "homepage": "https://atlassian.design/components/heading/",
91
- "platform-feature-flags": {
92
- "platform-typography-improved-color-control": {
93
- "type": "boolean"
94
- }
95
- }
91
+ "homepage": "https://atlassian.design/components/heading/"
96
92
  }