@atlaskit/code 15.5.1 → 15.6.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,14 @@
1
1
  # @atlaskit/code
2
2
 
3
+ ## 15.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#133573](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133573)
8
+ [`9e6563c10af4c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9e6563c10af4c) -
9
+ Updating font styles for code component inline with the new typography system behind a feature
10
+ flag. If successful, these changes will be made available in a later release.
11
+
3
12
  ## 15.5.1
4
13
 
5
14
  ### Patch Changes
package/dist/cjs/code.js CHANGED
@@ -16,6 +16,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
16
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
17
  var _react = _interopRequireWildcard(require("react"));
18
18
  var _react2 = require("@emotion/react");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _bidiWarning = _interopRequireDefault(require("./bidi-warning"));
20
21
  var _bidiWarningDecorator = _interopRequireDefault(require("./bidi-warning/bidi-warning-decorator"));
21
22
  var _styles = require("./internal/theme/styles");
@@ -40,8 +41,23 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
40
41
  var Code = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function Code(_ref, ref) {
41
42
  var testId = _ref.testId,
42
43
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
44
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
45
+ var styles = (0, _platformFeatureFlags.fg)('platform_design_system_team_code_new_typography') ? (0, _react2.css)({
46
+ display: 'inline',
47
+ padding: '2px 0.5ch',
48
+ backgroundColor: "var(--ds-background-neutral, #091E420F)",
49
+ borderRadius: "var(--ds-border-radius, 3px)",
50
+ borderStyle: 'none',
51
+ boxDecorationBreak: 'clone',
52
+ color: "var(--ds-text, #172B4D)",
53
+ font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
54
+ lineHeight: 'inherit',
55
+ overflow: 'auto',
56
+ overflowWrap: 'break-word',
57
+ whiteSpace: 'pre-wrap'
58
+ }) :
43
59
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
- var styles = (0, _react2.css)((0, _styles.getCodeStyles)());
60
+ (0, _react2.css)((0, _styles.getCodeStyles)());
45
61
  var children = props.children,
46
62
  _props$codeBidiWarnin = props.codeBidiWarnings,
47
63
  codeBidiWarnings = _props$codeBidiWarnin === void 0 ? true : _props$codeBidiWarnin,
@@ -7,6 +7,7 @@ import React, { forwardRef, memo } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import CodeBidiWarning from './bidi-warning';
11
12
  import codeBidiWarningDecorator from './bidi-warning/bidi-warning-decorator';
12
13
  import { getCodeStyles } from './internal/theme/styles';
@@ -23,8 +24,23 @@ const Code = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Code({
23
24
  testId,
24
25
  ...props
25
26
  }, ref) {
27
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
28
+ const styles = fg('platform_design_system_team_code_new_typography') ? css({
29
+ display: 'inline',
30
+ padding: '2px 0.5ch',
31
+ backgroundColor: "var(--ds-background-neutral, #091E420F)",
32
+ borderRadius: "var(--ds-border-radius, 3px)",
33
+ borderStyle: 'none',
34
+ boxDecorationBreak: 'clone',
35
+ color: "var(--ds-text, #172B4D)",
36
+ font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
37
+ lineHeight: 'inherit',
38
+ overflow: 'auto',
39
+ overflowWrap: 'break-word',
40
+ whiteSpace: 'pre-wrap'
41
+ }) :
26
42
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
- const styles = css(getCodeStyles());
43
+ css(getCodeStyles());
28
44
  const {
29
45
  children,
30
46
  codeBidiWarnings = true,
package/dist/esm/code.js CHANGED
@@ -10,6 +10,7 @@ import React, { forwardRef, memo } from 'react';
10
10
 
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  import { css, jsx } from '@emotion/react';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import CodeBidiWarning from './bidi-warning';
14
15
  import codeBidiWarningDecorator from './bidi-warning/bidi-warning-decorator';
15
16
  import { getCodeStyles } from './internal/theme/styles';
@@ -25,8 +26,23 @@ import { getCodeStyles } from './internal/theme/styles';
25
26
  var Code = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Code(_ref, ref) {
26
27
  var testId = _ref.testId,
27
28
  props = _objectWithoutProperties(_ref, _excluded);
29
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
30
+ var styles = fg('platform_design_system_team_code_new_typography') ? css({
31
+ display: 'inline',
32
+ padding: '2px 0.5ch',
33
+ backgroundColor: "var(--ds-background-neutral, #091E420F)",
34
+ borderRadius: "var(--ds-border-radius, 3px)",
35
+ borderStyle: 'none',
36
+ boxDecorationBreak: 'clone',
37
+ color: "var(--ds-text, #172B4D)",
38
+ font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
39
+ lineHeight: 'inherit',
40
+ overflow: 'auto',
41
+ overflowWrap: 'break-word',
42
+ whiteSpace: 'pre-wrap'
43
+ }) :
28
44
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
- var styles = css(getCodeStyles());
45
+ css(getCodeStyles());
30
46
  var children = props.children,
31
47
  _props$codeBidiWarnin = props.codeBidiWarnings,
32
48
  codeBidiWarnings = _props$codeBidiWarnin === void 0 ? true : _props$codeBidiWarnin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "15.5.1",
3
+ "version": "15.6.0",
4
4
  "description": "Code highlights short strings of code snippets inline with body text.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,8 +28,9 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/codemod-utils": "^4.2.0",
31
+ "@atlaskit/platform-feature-flags": "^0.3.0",
31
32
  "@atlaskit/theme": "^13.0.0",
32
- "@atlaskit/tokens": "^1.58.0",
33
+ "@atlaskit/tokens": "^1.59.0",
33
34
  "@atlaskit/tooltip": "^18.7.0",
34
35
  "@atlaskit/visually-hidden": "^1.5.0",
35
36
  "@babel/runtime": "^7.0.0",
@@ -44,7 +45,7 @@
44
45
  "@af/accessibility-testing": "*",
45
46
  "@af/integration-testing": "*",
46
47
  "@af/visual-regression": "*",
47
- "@atlaskit/ds-lib": "^2.4.0",
48
+ "@atlaskit/ds-lib": "^2.5.0",
48
49
  "@atlaskit/ssr": "*",
49
50
  "@atlaskit/toggle": "^13.3.0",
50
51
  "@atlaskit/visual-regression": "*",
@@ -105,5 +106,10 @@
105
106
  "./inline": "./src/entry-points/inline.tsx",
106
107
  "./constants": "./src/entry-points/constants.tsx"
107
108
  },
108
- "homepage": "https://atlassian.design/components/code/"
109
+ "homepage": "https://atlassian.design/components/code/",
110
+ "platform-feature-flags": {
111
+ "platform_design_system_team_code_new_typography": {
112
+ "type": "boolean"
113
+ }
114
+ }
109
115
  }