@atlaskit/code 17.3.3 → 17.4.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,12 @@
1
1
  # @atlaskit/code
2
2
 
3
+ ## 17.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b867e641d818d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b867e641d818d) -
8
+ Updated border radius values behind a feature gate `platform-dst-shape-theme-default`.
9
+
3
10
  ## 17.3.3
4
11
 
5
12
  ### Patch Changes
@@ -5,6 +5,7 @@
5
5
  ._t7aun7od pre[class*=language-]{all:unset}
6
6
  ._11c81u0j{font:var(--ds-font-code,normal 400 .875em/1 ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
7
7
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
8
+ ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
8
9
  ._1dqoglyw{border-style:none}
9
10
  ._196q1xv3 [data-ds--code--row--highlight]:last-child{border-block-end:var(--ds-border-width,1px) dashed transparent}
10
11
  ._1srnt0uh [data-ds--code--row--highlight] .linenumber:before{border-block-start:var(--ds-border-width,1px) solid var(--ds-border-focused,#4688ec)}
@@ -14,6 +14,7 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
15
  var _bindEventListener = require("bind-event-listener");
16
16
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _useHighlight = require("./internal/hooks/use-highlight");
18
19
  var _styles = require("./internal/theme/styles");
19
20
  var _getNormalizedLanguage = require("./internal/utils/get-normalized-language");
@@ -22,6 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
22
23
  /* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-selectors */
23
24
  /* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
24
25
  var getCodeBlockStyles = {
26
+ rootT26Shape: "_2rko1mok",
25
27
  root: "_11c81u0j _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls0df4r _vm2c1rh5 _12ok1rh5 _1ls01ule _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3moej _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eiht5x2v _t9zb5x2v _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw",
26
28
  showLineNumbers: "_1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf",
27
29
  dontShowLineNumbers: "_1i3h1ule _16nou2gc _h4fuu2gc _pp6yu2gc _1g4tu2gc _11wmu2gc _1bx8u2gc",
@@ -136,7 +138,7 @@ var CodeBlock = /*#__PURE__*/(0, _react.memo)(function CodeBlock(_ref) {
136
138
  "aria-label": showContentFocus ? label : undefined,
137
139
  role: showContentFocus ? 'region' : undefined,
138
140
  scrollRef: scrollableRef,
139
- className: (0, _runtime.ax)([getCodeBlockStyles.root, shouldWrapLongLines ? getCodeBlockStyles.shouldWrapLongLines : getCodeBlockStyles.dontWrapLongLines, shouldShowLineNumbersValue ? getCodeBlockStyles.showLineNumbers : getCodeBlockStyles.dontShowLineNumbers])
141
+ className: (0, _runtime.ax)([getCodeBlockStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && getCodeBlockStyles.rootT26Shape, shouldWrapLongLines ? getCodeBlockStyles.shouldWrapLongLines : getCodeBlockStyles.dontWrapLongLines, shouldShowLineNumbersValue ? getCodeBlockStyles.showLineNumbers : getCodeBlockStyles.dontShowLineNumbers])
140
142
  });
141
143
  });
142
144
  var _default = exports.default = CodeBlock;
@@ -5,6 +5,7 @@
5
5
  ._t7aun7od pre[class*=language-]{all:unset}
6
6
  ._11c81u0j{font:var(--ds-font-code,normal 400 .875em/1 ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
7
7
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
8
+ ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
8
9
  ._1dqoglyw{border-style:none}
9
10
  ._196q1xv3 [data-ds--code--row--highlight]:last-child{border-block-end:var(--ds-border-width,1px) dashed transparent}
10
11
  ._1srnt0uh [data-ds--code--row--highlight] .linenumber:before{border-block-start:var(--ds-border-width,1px) solid var(--ds-border-focused,#4688ec)}
@@ -7,11 +7,13 @@ import { ax, ix } from "@compiled/react/runtime";
7
7
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
8
8
  import { bind } from 'bind-event-listener';
9
9
  import rafSchedule from 'raf-schd';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { useHighlightLines } from './internal/hooks/use-highlight';
11
12
  import { getLineNumWidth } from './internal/theme/styles';
12
13
  import { normalizeLanguage } from './internal/utils/get-normalized-language';
13
14
  import SyntaxHighlighter from './syntax-highlighter';
14
15
  const getCodeBlockStyles = {
16
+ rootT26Shape: "_2rko1mok",
15
17
  root: "_11c81u0j _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls0df4r _vm2c1rh5 _12ok1rh5 _1ls01ule _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3moej _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eiht5x2v _t9zb5x2v _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw",
16
18
  showLineNumbers: "_1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf",
17
19
  dontShowLineNumbers: "_1i3h1ule _16nou2gc _h4fuu2gc _pp6yu2gc _1g4tu2gc _11wmu2gc _1bx8u2gc",
@@ -111,7 +113,7 @@ const CodeBlock = /*#__PURE__*/memo(function CodeBlock({
111
113
  "aria-label": showContentFocus ? label : undefined,
112
114
  role: showContentFocus ? 'region' : undefined,
113
115
  scrollRef: scrollableRef,
114
- className: ax([getCodeBlockStyles.root, shouldWrapLongLines ? getCodeBlockStyles.shouldWrapLongLines : getCodeBlockStyles.dontWrapLongLines, shouldShowLineNumbersValue ? getCodeBlockStyles.showLineNumbers : getCodeBlockStyles.dontShowLineNumbers])
116
+ className: ax([getCodeBlockStyles.root, fg('platform-dst-shape-theme-default') && getCodeBlockStyles.rootT26Shape, shouldWrapLongLines ? getCodeBlockStyles.shouldWrapLongLines : getCodeBlockStyles.dontWrapLongLines, shouldShowLineNumbersValue ? getCodeBlockStyles.showLineNumbers : getCodeBlockStyles.dontShowLineNumbers])
115
117
  });
116
118
  });
117
119
  export default CodeBlock;
@@ -5,6 +5,7 @@
5
5
  ._t7aun7od pre[class*=language-]{all:unset}
6
6
  ._11c81u0j{font:var(--ds-font-code,normal 400 .875em/1 ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
7
7
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
8
+ ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
8
9
  ._1dqoglyw{border-style:none}
9
10
  ._196q1xv3 [data-ds--code--row--highlight]:last-child{border-block-end:var(--ds-border-width,1px) dashed transparent}
10
11
  ._1srnt0uh [data-ds--code--row--highlight] .linenumber:before{border-block-start:var(--ds-border-width,1px) solid var(--ds-border-focused,#4688ec)}
@@ -9,11 +9,13 @@ import { ax, ix } from "@compiled/react/runtime";
9
9
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
10
10
  import { bind } from 'bind-event-listener';
11
11
  import rafSchedule from 'raf-schd';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { useHighlightLines } from './internal/hooks/use-highlight';
13
14
  import { getLineNumWidth } from './internal/theme/styles';
14
15
  import { normalizeLanguage } from './internal/utils/get-normalized-language';
15
16
  import SyntaxHighlighter from './syntax-highlighter';
16
17
  var getCodeBlockStyles = {
18
+ rootT26Shape: "_2rko1mok",
17
19
  root: "_11c81u0j _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls0df4r _vm2c1rh5 _12ok1rh5 _1ls01ule _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3moej _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eiht5x2v _t9zb5x2v _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw",
18
20
  showLineNumbers: "_1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf",
19
21
  dontShowLineNumbers: "_1i3h1ule _16nou2gc _h4fuu2gc _pp6yu2gc _1g4tu2gc _11wmu2gc _1bx8u2gc",
@@ -128,7 +130,7 @@ var CodeBlock = /*#__PURE__*/memo(function CodeBlock(_ref) {
128
130
  "aria-label": showContentFocus ? label : undefined,
129
131
  role: showContentFocus ? 'region' : undefined,
130
132
  scrollRef: scrollableRef,
131
- className: ax([getCodeBlockStyles.root, shouldWrapLongLines ? getCodeBlockStyles.shouldWrapLongLines : getCodeBlockStyles.dontWrapLongLines, shouldShowLineNumbersValue ? getCodeBlockStyles.showLineNumbers : getCodeBlockStyles.dontShowLineNumbers])
133
+ className: ax([getCodeBlockStyles.root, fg('platform-dst-shape-theme-default') && getCodeBlockStyles.rootT26Shape, shouldWrapLongLines ? getCodeBlockStyles.shouldWrapLongLines : getCodeBlockStyles.dontWrapLongLines, shouldShowLineNumbersValue ? getCodeBlockStyles.showLineNumbers : getCodeBlockStyles.dontShowLineNumbers])
132
134
  });
133
135
  });
134
136
  export default CodeBlock;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "17.3.3",
3
+ "version": "17.4.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/"
@@ -45,15 +45,15 @@
45
45
  "@af/accessibility-testing": "workspace:^",
46
46
  "@af/integration-testing": "workspace:^",
47
47
  "@af/visual-regression": "workspace:^",
48
- "@atlaskit/button": "^23.6.0",
48
+ "@atlaskit/button": "^23.7.0",
49
49
  "@atlaskit/docs": "^11.2.0",
50
50
  "@atlaskit/ds-lib": "^5.3.0",
51
51
  "@atlaskit/form": "^14.3.0",
52
52
  "@atlaskit/link": "^3.2.0",
53
53
  "@atlaskit/primitives": "^16.4.0",
54
- "@atlaskit/section-message": "^8.9.0",
54
+ "@atlaskit/section-message": "^8.10.0",
55
55
  "@atlaskit/theme": "^21.0.0",
56
- "@atlaskit/toggle": "^15.1.0",
56
+ "@atlaskit/toggle": "^15.2.0",
57
57
  "@atlassian/ssr-tests": "workspace:^",
58
58
  "@testing-library/react": "^13.4.0",
59
59
  "@types/jscodeshift": "^0.11.0",
@@ -104,5 +104,9 @@
104
104
  }
105
105
  },
106
106
  "homepage": "https://atlassian.design/components/code/",
107
- "platform-feature-flags": {}
107
+ "platform-feature-flags": {
108
+ "platform-dst-shape-theme-default": {
109
+ "type": "boolean"
110
+ }
111
+ }
108
112
  }