@atlaskit/code 15.6.8 → 15.6.9
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/bidi-warning/ui/styled.js +3 -1
- package/dist/cjs/code.js +1 -0
- package/dist/cjs/internal/theme/get-theme.js +1 -0
- package/dist/cjs/internal/theme/styles.js +3 -0
- package/dist/es2019/bidi-warning/ui/styled.js +3 -1
- package/dist/es2019/code.js +1 -0
- package/dist/es2019/internal/theme/get-theme.js +1 -0
- package/dist/es2019/internal/theme/styles.js +3 -0
- package/dist/esm/bidi-warning/ui/styled.js +3 -1
- package/dist/esm/code.js +1 -0
- package/dist/esm/internal/theme/get-theme.js +1 -0
- package/dist/esm/internal/theme/styles.js +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -33,8 +33,10 @@ var decoration = (0, _react2.css)({
|
|
|
33
33
|
background: "var(--ds-background-warning, ".concat(_colors.Y75, ")"),
|
|
34
34
|
color: "var(--ds-text-warning, #7F5F01)",
|
|
35
35
|
content: '"<"attr(data-bidi-character-code)">"',
|
|
36
|
-
|
|
36
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
37
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
37
38
|
fontStyle: 'normal',
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
38
40
|
lineHeight: '18px',
|
|
39
41
|
/**
|
|
40
42
|
* Ensures the decoration receives pointer events when it occurs with
|
package/dist/cjs/code.js
CHANGED
|
@@ -39,6 +39,7 @@ var styles = (0, _react2.css)({
|
|
|
39
39
|
boxDecorationBreak: 'clone',
|
|
40
40
|
color: "var(--ds-text, #172B4D)",
|
|
41
41
|
font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
42
43
|
lineHeight: 'inherit',
|
|
43
44
|
overflow: 'auto',
|
|
44
45
|
overflowWrap: 'break-word',
|
|
@@ -21,6 +21,7 @@ var Y1100 = '#7A5D1A';
|
|
|
21
21
|
var getBaseTheme = exports.getBaseTheme = function getBaseTheme() {
|
|
22
22
|
return {
|
|
23
23
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
24
25
|
fontFamilyItalic: "SFMono-MediumItalic, ".concat((0, _tokens.getTokenValue)('font.family.code')),
|
|
25
26
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
26
27
|
textColor: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
@@ -198,6 +198,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
198
198
|
var getBaseCodeStyles = exports.getBaseCodeStyles = function getBaseCodeStyles(theme) {
|
|
199
199
|
return {
|
|
200
200
|
fontSize: _constants.CODE_FONT_SIZE,
|
|
201
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
201
202
|
fontFamily: theme.fontFamily,
|
|
202
203
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
203
204
|
backgroundColor: "var(".concat(_constants.VAR_CODE_BG_COLOR, ",").concat(theme.backgroundColor, ")"),
|
|
@@ -223,6 +224,7 @@ var getCodeBlockStyles = exports.getCodeBlockStyles = function getCodeBlockStyle
|
|
|
223
224
|
tabSize: 4
|
|
224
225
|
},
|
|
225
226
|
display: 'flex',
|
|
227
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
226
228
|
lineHeight: _constants.CODE_LINE_HEIGHT,
|
|
227
229
|
overflowX: 'auto',
|
|
228
230
|
whiteSpace: 'pre',
|
|
@@ -309,6 +311,7 @@ var getCodeStyles = exports.getCodeStyles = function getCodeStyles() {
|
|
|
309
311
|
display: 'inline',
|
|
310
312
|
padding: '2px 0.5ch',
|
|
311
313
|
boxDecorationBreak: 'clone',
|
|
314
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
312
315
|
fontSize: '0.875em',
|
|
313
316
|
overflow: 'auto',
|
|
314
317
|
overflowWrap: 'break-word',
|
|
@@ -25,8 +25,10 @@ const decoration = css({
|
|
|
25
25
|
background: `var(--ds-background-warning, ${Y75})`,
|
|
26
26
|
color: "var(--ds-text-warning, #7F5F01)",
|
|
27
27
|
content: '"<"attr(data-bidi-character-code)">"',
|
|
28
|
-
|
|
28
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
29
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
29
30
|
fontStyle: 'normal',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
30
32
|
lineHeight: '18px',
|
|
31
33
|
/**
|
|
32
34
|
* Ensures the decoration receives pointer events when it occurs with
|
package/dist/es2019/code.js
CHANGED
|
@@ -21,6 +21,7 @@ const styles = css({
|
|
|
21
21
|
boxDecorationBreak: 'clone',
|
|
22
22
|
color: "var(--ds-text, #172B4D)",
|
|
23
23
|
font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
24
25
|
lineHeight: 'inherit',
|
|
25
26
|
overflow: 'auto',
|
|
26
27
|
overflowWrap: 'break-word',
|
|
@@ -7,6 +7,7 @@ const T800 = '#067384';
|
|
|
7
7
|
const Y1100 = '#7A5D1A';
|
|
8
8
|
export const getBaseTheme = () => ({
|
|
9
9
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
10
11
|
fontFamilyItalic: `SFMono-MediumItalic, ${getTokenValue('font.family.code')}`,
|
|
11
12
|
backgroundColor: `var(--ds-background-neutral, ${colors.N20})`,
|
|
12
13
|
textColor: `var(--ds-text, ${colors.N800})`,
|
|
@@ -185,6 +185,7 @@ const syntaxKeywordColors = theme => ({
|
|
|
185
185
|
*/
|
|
186
186
|
export const getBaseCodeStyles = theme => ({
|
|
187
187
|
fontSize: CODE_FONT_SIZE,
|
|
188
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
188
189
|
fontFamily: theme.fontFamily,
|
|
189
190
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
190
191
|
backgroundColor: `var(${VAR_CODE_BG_COLOR},${theme.backgroundColor})`,
|
|
@@ -207,6 +208,7 @@ export const getCodeBlockStyles = theme => (highlightedStartText, highlightedEnd
|
|
|
207
208
|
tabSize: 4
|
|
208
209
|
},
|
|
209
210
|
display: 'flex',
|
|
211
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
210
212
|
lineHeight: CODE_LINE_HEIGHT,
|
|
211
213
|
overflowX: 'auto',
|
|
212
214
|
whiteSpace: 'pre',
|
|
@@ -294,6 +296,7 @@ export const getCodeStyles = () => {
|
|
|
294
296
|
display: 'inline',
|
|
295
297
|
padding: '2px 0.5ch',
|
|
296
298
|
boxDecorationBreak: 'clone',
|
|
299
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
297
300
|
fontSize: '0.875em',
|
|
298
301
|
overflow: 'auto',
|
|
299
302
|
overflowWrap: 'break-word',
|
|
@@ -25,8 +25,10 @@ var decoration = css({
|
|
|
25
25
|
background: "var(--ds-background-warning, ".concat(Y75, ")"),
|
|
26
26
|
color: "var(--ds-text-warning, #7F5F01)",
|
|
27
27
|
content: '"<"attr(data-bidi-character-code)">"',
|
|
28
|
-
|
|
28
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
29
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
29
30
|
fontStyle: 'normal',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
30
32
|
lineHeight: '18px',
|
|
31
33
|
/**
|
|
32
34
|
* Ensures the decoration receives pointer events when it occurs with
|
package/dist/esm/code.js
CHANGED
|
@@ -24,6 +24,7 @@ var styles = css({
|
|
|
24
24
|
boxDecorationBreak: 'clone',
|
|
25
25
|
color: "var(--ds-text, #172B4D)",
|
|
26
26
|
font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
27
28
|
lineHeight: 'inherit',
|
|
28
29
|
overflow: 'auto',
|
|
29
30
|
overflowWrap: 'break-word',
|
|
@@ -11,6 +11,7 @@ var Y1100 = '#7A5D1A';
|
|
|
11
11
|
export var getBaseTheme = function getBaseTheme() {
|
|
12
12
|
return {
|
|
13
13
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
14
15
|
fontFamilyItalic: "SFMono-MediumItalic, ".concat(getTokenValue('font.family.code')),
|
|
15
16
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
16
17
|
textColor: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
@@ -193,6 +193,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
193
193
|
export var getBaseCodeStyles = function getBaseCodeStyles(theme) {
|
|
194
194
|
return {
|
|
195
195
|
fontSize: CODE_FONT_SIZE,
|
|
196
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
196
197
|
fontFamily: theme.fontFamily,
|
|
197
198
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
198
199
|
backgroundColor: "var(".concat(VAR_CODE_BG_COLOR, ",").concat(theme.backgroundColor, ")"),
|
|
@@ -218,6 +219,7 @@ export var getCodeBlockStyles = function getCodeBlockStyles(theme) {
|
|
|
218
219
|
tabSize: 4
|
|
219
220
|
},
|
|
220
221
|
display: 'flex',
|
|
222
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
221
223
|
lineHeight: CODE_LINE_HEIGHT,
|
|
222
224
|
overflowX: 'auto',
|
|
223
225
|
whiteSpace: 'pre',
|
|
@@ -304,6 +306,7 @@ export var getCodeStyles = function getCodeStyles() {
|
|
|
304
306
|
display: 'inline',
|
|
305
307
|
padding: '2px 0.5ch',
|
|
306
308
|
boxDecorationBreak: 'clone',
|
|
309
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
307
310
|
fontSize: '0.875em',
|
|
308
311
|
overflow: 'auto',
|
|
309
312
|
overflowWrap: 'break-word',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/code",
|
|
3
|
-
"version": "15.6.
|
|
3
|
+
"version": "15.6.9",
|
|
4
4
|
"description": "Code highlights short strings of code snippets inline with body text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
32
32
|
"@atlaskit/theme": "^14.0.0",
|
|
33
|
-
"@atlaskit/tokens": "^
|
|
33
|
+
"@atlaskit/tokens": "^3.0.0",
|
|
34
34
|
"@atlaskit/tooltip": "^19.0.0",
|
|
35
35
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@af/visual-regression": "*",
|
|
48
48
|
"@atlaskit/ds-lib": "^3.3.0",
|
|
49
49
|
"@atlaskit/ssr": "*",
|
|
50
|
-
"@atlaskit/toggle": "^
|
|
50
|
+
"@atlaskit/toggle": "^14.0.0",
|
|
51
51
|
"@atlaskit/visual-regression": "*",
|
|
52
52
|
"@testing-library/react": "^12.1.5",
|
|
53
53
|
"@types/jscodeshift": "^0.11.0",
|