@atlaskit/editor-plugin-help-dialog 1.8.11 → 1.8.13

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.
@@ -90,42 +90,6 @@ export const dialogHeader = {
90
90
  }
91
91
  };
92
92
 
93
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
94
- export const codeSm = css({
95
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
96
- backgroundColor: `var(--ds-background-neutral, ${colors.N20})`,
97
- borderRadius: "var(--ds-border-radius, 3px)",
98
- width: "var(--ds-space-300, 24px)",
99
- display: 'inline-block',
100
- height: "var(--ds-space-300, 24px)",
101
- lineHeight: '24px',
102
- textAlign: 'center'
103
- });
104
-
105
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
106
- export const codeMd = css({
107
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
108
- backgroundColor: `var(--ds-background-neutral, ${colors.N20})`,
109
- borderRadius: "var(--ds-border-radius, 3px)",
110
- display: 'inline-block',
111
- height: "var(--ds-space-300, 24px)",
112
- lineHeight: '24px',
113
- width: '50px',
114
- textAlign: 'center'
115
- });
116
-
117
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
118
- export const codeLg = css({
119
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
120
- backgroundColor: `var(--ds-background-neutral, ${colors.N20})`,
121
- borderRadius: "var(--ds-border-radius, 3px)",
122
- display: 'inline-block',
123
- height: "var(--ds-space-300, 24px)",
124
- lineHeight: "var(--ds-space-300, 24px)",
125
- padding: `0 ${"var(--ds-space-150, 12px)"}`,
126
- textAlign: 'center'
127
- });
128
-
129
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
130
94
  export const shortcutsArray = css({
131
95
  display: 'flex',
@@ -5,7 +5,35 @@
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { jsx } from '@emotion/react';
7
7
  import { browser } from '@atlaskit/editor-common/browser';
8
- import { codeLg, codeMd, codeSm, componentFromKeymapWrapperStyles } from './styles';
8
+ import { Box, xcss } from '@atlaskit/primitives';
9
+ import { componentFromKeymapWrapperStyles } from './styles';
10
+ const codeLg = xcss({
11
+ borderRadius: 'border.radius',
12
+ display: 'inline-block',
13
+ height: "var(--ds-space-300, 24px)",
14
+ lineHeight: "var(--ds-space-300, 24px)",
15
+ textAlign: 'center',
16
+ paddingInline: 'space.150',
17
+ backgroundColor: 'color.background.neutral'
18
+ });
19
+ const codeMd = xcss({
20
+ backgroundColor: 'color.background.neutral',
21
+ borderRadius: 'border.radius',
22
+ display: 'inline-block',
23
+ height: "var(--ds-space-300, 24px)",
24
+ lineHeight: "var(--ds-space-300, 24px)",
25
+ width: '50px',
26
+ textAlign: 'center'
27
+ });
28
+ const codeSm = xcss({
29
+ backgroundColor: 'color.background.neutral',
30
+ borderRadius: 'border.radius',
31
+ width: "var(--ds-space-300, 24px)",
32
+ display: 'inline-block',
33
+ height: "var(--ds-space-300, 24px)",
34
+ lineHeight: "var(--ds-space-300, 24px)",
35
+ textAlign: 'center'
36
+ });
9
37
  const getKeyParts = keymap => {
10
38
  let shortcut = keymap[browser.mac ? 'mac' : 'windows'];
11
39
  if (browser.mac) {
@@ -22,47 +50,47 @@ export const getComponentFromKeymap = keymap => {
22
50
  css: componentFromKeymapWrapperStyles
23
51
  }, keyParts.map((part, index) => {
24
52
  if (part === '+') {
25
- return jsx("span", {
53
+ return jsx(Box, {
54
+ as: "span",
26
55
  key: `${keyParts}-${index}`
27
56
  }, ' + ');
28
57
  } else if (part === 'Cmd') {
29
- return (
30
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
31
- jsx("span", {
32
- css: codeSm,
33
- key: `${keyParts}-${index}`
34
- }, "\u2318")
35
- );
58
+ return jsx(Box, {
59
+ as: "span",
60
+ xcss: codeSm,
61
+ key: `${keyParts}-${index}`
62
+ }, "\u2318");
36
63
  } else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
37
64
  return (
38
65
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
39
- jsx("span", {
40
- css: codeMd,
66
+ jsx(Box, {
67
+ as: "span",
68
+ xcss: codeMd,
41
69
  key: `${keyParts}-${index}`
42
70
  }, part)
43
71
  );
44
72
  } else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
45
73
  return (
46
74
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
47
- jsx("span", {
48
- css: codeLg,
75
+ jsx(Box, {
76
+ as: "span",
77
+ xcss: codeLg,
49
78
  key: `${keyParts}-${index}`
50
79
  }, part)
51
80
  );
52
81
  } else if (part.toLowerCase() === 'enter') {
53
- return (
54
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
55
- jsx("span", {
56
- className: "enter-keymap",
57
- css: codeSm,
58
- key: `${keyParts}-${index}`
59
- }, '⏎')
60
- );
82
+ return jsx(Box, {
83
+ as: "span",
84
+ "data-editor-help-dialog-enter-keymap": "true",
85
+ xcss: codeSm,
86
+ key: `${keyParts}-${index}`
87
+ }, '⏎');
61
88
  }
62
89
  return (
63
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
64
- jsx("span", {
65
- css: codeSm,
91
+ jsx(Box, {
92
+ as: "span",
93
+ xcss: codeSm,
66
94
  key: `${keyParts}-${index}`
67
95
  }, part.toUpperCase())
68
96
  );