@atlaskit/editor-common 110.9.0 → 110.9.1

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.
Files changed (143) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/monitoring/error.js +1 -1
  3. package/dist/cjs/panel.js +0 -12
  4. package/dist/cjs/styles/index.js +0 -204
  5. package/dist/cjs/styles/shared/annotation.js +1 -68
  6. package/dist/cjs/styles/shared/code-block.js +2 -17
  7. package/dist/cjs/styles/shared/date.js +2 -12
  8. package/dist/cjs/styles/shared/grid.js +2 -41
  9. package/dist/cjs/styles/shared/lists.js +2 -10
  10. package/dist/cjs/styles/shared/panel.js +1 -39
  11. package/dist/cjs/styles/shared/resizer.js +2 -202
  12. package/dist/cjs/styles/shared/smart-card.js +1 -6
  13. package/dist/cjs/styles/shared/smartCard.js +2 -16
  14. package/dist/cjs/styles/shared/task-decision.js +2 -12
  15. package/dist/cjs/styles/shared/unsupported-content.js +2 -12
  16. package/dist/cjs/ui/DropList/index.js +1 -1
  17. package/dist/cjs/ui/Expand/sharedStyles.js +2 -97
  18. package/dist/cjs/ui/index.js +0 -7
  19. package/dist/es2019/monitoring/error.js +1 -1
  20. package/dist/es2019/panel.js +1 -1
  21. package/dist/es2019/styles/index.js +11 -23
  22. package/dist/es2019/styles/shared/annotation.js +1 -106
  23. package/dist/es2019/styles/shared/code-block.js +1 -164
  24. package/dist/es2019/styles/shared/date.js +1 -11
  25. package/dist/es2019/styles/shared/grid.js +1 -39
  26. package/dist/es2019/styles/shared/lists.js +1 -121
  27. package/dist/es2019/styles/shared/panel.js +1 -138
  28. package/dist/es2019/styles/shared/resizer.js +2 -211
  29. package/dist/es2019/styles/shared/smart-card.js +1 -24
  30. package/dist/es2019/styles/shared/smartCard.js +1 -151
  31. package/dist/es2019/styles/shared/task-decision.js +1 -63
  32. package/dist/es2019/styles/shared/unsupported-content.js +1 -27
  33. package/dist/es2019/ui/DropList/index.js +1 -1
  34. package/dist/es2019/ui/Expand/sharedStyles.js +1 -113
  35. package/dist/es2019/ui/index.js +0 -1
  36. package/dist/esm/monitoring/error.js +1 -1
  37. package/dist/esm/panel.js +1 -1
  38. package/dist/esm/styles/index.js +11 -23
  39. package/dist/esm/styles/shared/annotation.js +0 -67
  40. package/dist/esm/styles/shared/code-block.js +1 -15
  41. package/dist/esm/styles/shared/date.js +1 -9
  42. package/dist/esm/styles/shared/grid.js +1 -39
  43. package/dist/esm/styles/shared/lists.js +1 -10
  44. package/dist/esm/styles/shared/panel.js +0 -37
  45. package/dist/esm/styles/shared/resizer.js +2 -202
  46. package/dist/esm/styles/shared/smart-card.js +0 -5
  47. package/dist/esm/styles/shared/smartCard.js +1 -15
  48. package/dist/esm/styles/shared/task-decision.js +1 -10
  49. package/dist/esm/styles/shared/unsupported-content.js +1 -11
  50. package/dist/esm/ui/DropList/index.js +1 -1
  51. package/dist/esm/ui/Expand/sharedStyles.js +1 -96
  52. package/dist/esm/ui/index.js +0 -1
  53. package/dist/types/panel.d.ts +1 -1
  54. package/dist/types/styles/index.d.ts +11 -23
  55. package/dist/types/styles/shared/annotation.d.ts +0 -30
  56. package/dist/types/styles/shared/code-block.d.ts +0 -3
  57. package/dist/types/styles/shared/date.d.ts +0 -2
  58. package/dist/types/styles/shared/grid.d.ts +0 -2
  59. package/dist/types/styles/shared/lists.d.ts +0 -2
  60. package/dist/types/styles/shared/panel.d.ts +0 -2
  61. package/dist/types/styles/shared/resizer.d.ts +0 -4
  62. package/dist/types/styles/shared/smart-card.d.ts +0 -2
  63. package/dist/types/styles/shared/smartCard.d.ts +0 -1
  64. package/dist/types/styles/shared/task-decision.d.ts +0 -2
  65. package/dist/types/styles/shared/unsupported-content.d.ts +0 -2
  66. package/dist/types/ui/Expand/sharedStyles.d.ts +0 -6
  67. package/dist/types/ui/index.d.ts +0 -2
  68. package/dist/types-ts4.5/panel.d.ts +1 -1
  69. package/dist/types-ts4.5/styles/index.d.ts +11 -23
  70. package/dist/types-ts4.5/styles/shared/annotation.d.ts +0 -30
  71. package/dist/types-ts4.5/styles/shared/code-block.d.ts +0 -3
  72. package/dist/types-ts4.5/styles/shared/date.d.ts +0 -2
  73. package/dist/types-ts4.5/styles/shared/grid.d.ts +0 -2
  74. package/dist/types-ts4.5/styles/shared/lists.d.ts +0 -2
  75. package/dist/types-ts4.5/styles/shared/panel.d.ts +0 -2
  76. package/dist/types-ts4.5/styles/shared/resizer.d.ts +0 -4
  77. package/dist/types-ts4.5/styles/shared/smart-card.d.ts +0 -2
  78. package/dist/types-ts4.5/styles/shared/smartCard.d.ts +0 -1
  79. package/dist/types-ts4.5/styles/shared/task-decision.d.ts +0 -2
  80. package/dist/types-ts4.5/styles/shared/unsupported-content.d.ts +0 -2
  81. package/dist/types-ts4.5/ui/Expand/sharedStyles.d.ts +0 -6
  82. package/dist/types-ts4.5/ui/index.d.ts +0 -2
  83. package/package.json +1 -1
  84. package/dist/cjs/styles/shared/background-color.js +0 -33
  85. package/dist/cjs/styles/shared/block-marks.js +0 -14
  86. package/dist/cjs/styles/shared/code-mark.js +0 -32
  87. package/dist/cjs/styles/shared/column-layout.js +0 -70
  88. package/dist/cjs/styles/shared/embedCard.js +0 -42
  89. package/dist/cjs/styles/shared/indentation.js +0 -40
  90. package/dist/cjs/styles/shared/link.js +0 -24
  91. package/dist/cjs/styles/shared/paragraph.js +0 -39
  92. package/dist/cjs/styles/shared/rule.js +0 -24
  93. package/dist/cjs/styles/shared/shadow.js +0 -64
  94. package/dist/cjs/styles/shared/text-color.js +0 -20
  95. package/dist/cjs/styles/shared/whitespace.js +0 -15
  96. package/dist/es2019/styles/shared/background-color.js +0 -26
  97. package/dist/es2019/styles/shared/block-marks.js +0 -37
  98. package/dist/es2019/styles/shared/code-mark.js +0 -25
  99. package/dist/es2019/styles/shared/column-layout.js +0 -66
  100. package/dist/es2019/styles/shared/embedCard.js +0 -33
  101. package/dist/es2019/styles/shared/indentation.js +0 -34
  102. package/dist/es2019/styles/shared/link.js +0 -18
  103. package/dist/es2019/styles/shared/paragraph.js +0 -32
  104. package/dist/es2019/styles/shared/rule.js +0 -15
  105. package/dist/es2019/styles/shared/shadow.js +0 -69
  106. package/dist/es2019/styles/shared/text-color.js +0 -14
  107. package/dist/es2019/styles/shared/whitespace.js +0 -9
  108. package/dist/esm/styles/shared/background-color.js +0 -26
  109. package/dist/esm/styles/shared/block-marks.js +0 -8
  110. package/dist/esm/styles/shared/code-mark.js +0 -25
  111. package/dist/esm/styles/shared/column-layout.js +0 -63
  112. package/dist/esm/styles/shared/embedCard.js +0 -35
  113. package/dist/esm/styles/shared/indentation.js +0 -34
  114. package/dist/esm/styles/shared/link.js +0 -18
  115. package/dist/esm/styles/shared/paragraph.js +0 -32
  116. package/dist/esm/styles/shared/rule.js +0 -17
  117. package/dist/esm/styles/shared/shadow.js +0 -57
  118. package/dist/esm/styles/shared/text-color.js +0 -14
  119. package/dist/esm/styles/shared/whitespace.js +0 -9
  120. package/dist/types/styles/shared/background-color.d.ts +0 -1
  121. package/dist/types/styles/shared/block-marks.d.ts +0 -2
  122. package/dist/types/styles/shared/code-mark.d.ts +0 -1
  123. package/dist/types/styles/shared/column-layout.d.ts +0 -4
  124. package/dist/types/styles/shared/embedCard.d.ts +0 -3
  125. package/dist/types/styles/shared/indentation.d.ts +0 -2
  126. package/dist/types/styles/shared/link.d.ts +0 -2
  127. package/dist/types/styles/shared/paragraph.d.ts +0 -1
  128. package/dist/types/styles/shared/rule.d.ts +0 -1
  129. package/dist/types/styles/shared/shadow.d.ts +0 -15
  130. package/dist/types/styles/shared/text-color.d.ts +0 -2
  131. package/dist/types/styles/shared/whitespace.d.ts +0 -2
  132. package/dist/types-ts4.5/styles/shared/background-color.d.ts +0 -1
  133. package/dist/types-ts4.5/styles/shared/block-marks.d.ts +0 -2
  134. package/dist/types-ts4.5/styles/shared/code-mark.d.ts +0 -1
  135. package/dist/types-ts4.5/styles/shared/column-layout.d.ts +0 -4
  136. package/dist/types-ts4.5/styles/shared/embedCard.d.ts +0 -3
  137. package/dist/types-ts4.5/styles/shared/indentation.d.ts +0 -2
  138. package/dist/types-ts4.5/styles/shared/link.d.ts +0 -2
  139. package/dist/types-ts4.5/styles/shared/paragraph.d.ts +0 -1
  140. package/dist/types-ts4.5/styles/shared/rule.d.ts +0 -1
  141. package/dist/types-ts4.5/styles/shared/shadow.d.ts +0 -15
  142. package/dist/types-ts4.5/styles/shared/text-color.d.ts +0 -2
  143. package/dist/types-ts4.5/styles/shared/whitespace.d.ts +0 -2
@@ -1,6 +1,3 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
1
  export const annotationPrefix = 'ak-editor-annotation';
5
2
  export const AnnotationSharedClassNames = {
6
3
  focus: `${annotationPrefix}-focus`,
@@ -13,106 +10,4 @@ export const BlockAnnotationSharedClassNames = {
13
10
  focus: `${blockAnnotationPrefix}-focus`,
14
11
  blur: `${blockAnnotationPrefix}-blur`,
15
12
  draft: `${blockAnnotationPrefix}-draft`
16
- };
17
- export const AnnotationSharedCSSByState = () => {
18
- if (fg('editor_inline_comments_on_inline_nodes')) {
19
- // NOTE: These styles are shared between renderer and editor. Sometimes they
20
- // need different selectors and other times they apply the same attributes
21
- // in a different way. For example in renderer the focus styles are an
22
- // override, not a separate class. Be sure to check both usages of this
23
- // before modifying.
24
- return {
25
- common: {
26
- borderBottom: '2px solid transparent',
27
- cursor: 'pointer',
28
- padding: '1px 0 2px',
29
- '&:has(.card), &:has([data-inline-card])': fg('annotations_align_editor_and_renderer_styles') ? {
30
- padding: '5px 0 3px 0'
31
- } : {
32
- paddingTop: '4px',
33
- border: 'none',
34
- boxShadow: `0 2px 0 0 ${"var(--ds-border-accent-yellow, #B38600)"}`
35
- },
36
- '&:has(.date-lozenger-container)': {
37
- paddingTop: '2px'
38
- }
39
- },
40
- focus: css({
41
- background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
42
- borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
43
- boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
44
- }),
45
- blur: css({
46
- background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
47
- borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
48
- }),
49
- hover: css({
50
- background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
51
- borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
52
- boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
53
- })
54
- };
55
- } else {
56
- return {
57
- focus: css({
58
- // Background is not coming through in confluence, suspecting to be caused by some specific combination of
59
- // emotion and token look up
60
- background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
61
- borderBottom: `2px solid ${"var(--ds-border-accent-yellow, #B38600)"}`,
62
- // TODO: DSP-4147 - Annotation shadow
63
- boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
64
- cursor: 'pointer'
65
- }),
66
- blur: css({
67
- background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
68
- borderBottom: `2px solid ${"var(--ds-border-accent-yellow, #B38600)"}`,
69
- cursor: 'pointer'
70
- })
71
- };
72
- }
73
- };
74
- export const annotationSharedStyles = () => fg('editor_inline_comments_on_inline_nodes') ?
75
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
76
- css`
77
- .ProseMirror {
78
- .${AnnotationSharedClassNames.blur},
79
- .${AnnotationSharedClassNames.focus},
80
- .${AnnotationSharedClassNames.draft} {
81
- ${AnnotationSharedCSSByState().common};
82
- }
83
-
84
- .${AnnotationSharedClassNames.focus} {
85
- ${AnnotationSharedCSSByState().focus};
86
- }
87
-
88
- .${AnnotationSharedClassNames.draft} {
89
- ${AnnotationSharedCSSByState().focus};
90
- cursor: initial;
91
- }
92
-
93
- .${AnnotationSharedClassNames.blur} {
94
- ${AnnotationSharedCSSByState().blur};
95
- }
96
- .${AnnotationSharedClassNames.hover} {
97
- ${AnnotationSharedCSSByState().common};
98
- ${AnnotationSharedCSSByState().hover};
99
- }
100
- }
101
- ` :
102
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
103
- css`
104
- .ProseMirror {
105
- .${AnnotationSharedClassNames.focus} {
106
- ${AnnotationSharedCSSByState().focus};
107
- }
108
-
109
- .${AnnotationSharedClassNames.draft} {
110
- ${AnnotationSharedCSSByState().focus};
111
- cursor: initial;
112
- }
113
-
114
- .${AnnotationSharedClassNames.blur} {
115
- ${AnnotationSharedCSSByState().blur};
116
- }
117
- }
118
- `;
13
+ };
@@ -1,7 +1,3 @@
1
- /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Should be safe to autofix, but ignoring for now */
2
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
- import { css } from '@emotion/react';
4
- import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
1
  export const CodeBlockSharedCssClassName = {
6
2
  CODEBLOCK_CONTAINER: 'code-block',
7
3
  CODEBLOCK_START: 'code-block--start',
@@ -12,163 +8,4 @@ export const CodeBlockSharedCssClassName = {
12
8
  DS_CODEBLOCK: '[data-ds--code--code-block]',
13
9
  CODEBLOCK_CONTENT_WRAPPED: 'code-content--wrapped',
14
10
  CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
15
- };
16
- export const codeBlockSharedStyles = () => css`
17
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED}
18
- > .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
19
- > .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
20
- margin-right: ${"var(--ds-space-100, 8px)"};
21
-
22
- code {
23
- display: block;
24
- word-break: break-word;
25
- white-space: pre-wrap;
26
- }
27
- }
28
-
29
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
30
- > .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
31
- display: flex;
32
- flex: 1;
33
-
34
- code {
35
- flex-grow: 1;
36
-
37
- white-space: pre;
38
- }
39
- }
40
-
41
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
42
- position: relative;
43
- background-color: ${"var(--ds-surface-raised, #FFFFFF)"};
44
- border-radius: ${"var(--ds-radius-small, 3px)"};
45
- margin: ${blockNodesVerticalMargin} 0 0 0;
46
- font-family: ${akEditorCodeFontFamily};
47
- min-width: ${akEditorTableCellMinWidth}px;
48
- cursor: pointer;
49
- clear: both;
50
-
51
- .code-block-gutter-pseudo-element::before {
52
- content: attr(data-label);
53
- }
54
-
55
- /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */
56
- white-space: normal;
57
-
58
- .${CodeBlockSharedCssClassName.CODEBLOCK_START} {
59
- position: absolute;
60
- visibility: hidden;
61
- height: 1.5rem;
62
- top: 0px;
63
- left: 0px;
64
- }
65
-
66
- .${CodeBlockSharedCssClassName.CODEBLOCK_END} {
67
- position: absolute;
68
- visibility: hidden;
69
- height: 1.5rem;
70
- bottom: 0px;
71
- right: 0px;
72
- }
73
-
74
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
75
- position: relative;
76
- background-color: ${"var(--ds-background-neutral, #091E420F)"};
77
- display: flex;
78
- border-radius: ${"var(--ds-radius-small, 3px)"};
79
- width: 100%;
80
- counter-reset: line;
81
- overflow-x: auto;
82
-
83
- background-image: ${overflowShadow({
84
- leftCoverWidth: "var(--ds-space-300, 24px)"
85
- })};
86
-
87
- background-repeat: no-repeat;
88
- background-attachment: local, local, local, local, scroll, scroll, scroll, scroll;
89
- background-size:
90
- ${"var(--ds-space-300, 24px)"} 100%,
91
- ${"var(--ds-space-300, 24px)"} 100%,
92
- ${"var(--ds-space-100, 8px)"} 100%,
93
- ${"var(--ds-space-100, 8px)"} 100%,
94
- ${"var(--ds-space-100, 8px)"} 100%,
95
- 1px 100%,
96
- ${"var(--ds-space-100, 8px)"} 100%,
97
- 1px 100%;
98
- background-position:
99
- 0 0,
100
- 0 0,
101
- 100% 0,
102
- 100% 0,
103
- 100% 0,
104
- 100% 0,
105
- 0 0,
106
- 0 0;
107
-
108
- /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */
109
- overflow-y: hidden;
110
- }
111
-
112
- .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
113
- background-color: ${"var(--ds-background-neutral, #091E420F)"};
114
- position: relative;
115
- width: var(--lineNumberGutterWidth, 2rem);
116
- padding: ${"var(--ds-space-100, 8px)"};
117
- flex-shrink: 0;
118
- font-size: ${relativeFontSizeToBase16(14)};
119
- box-sizing: content-box;
120
- }
121
-
122
- /* This is a fix of marker of list item with code block.
123
- The list item marker in Chrome is aligned by the baseline of the text,
124
- that's why we need to add a text (content: "1") to the line number gutter to align
125
- the list item marker with the text.
126
- Without it, the list item marker will be aligned by the bottom of the code block. */
127
- .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER}::before {
128
- content: '1';
129
- visibility: hidden;
130
- font-size: ${relativeFontSizeToBase16(14)};
131
- line-height: 1.5rem;
132
- }
133
-
134
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
135
- code {
136
- tab-size: 4;
137
- cursor: text;
138
- color: ${"var(--ds-text, #172B4D)"};
139
- border-radius: ${"var(--ds-radius-small, 3px)"};
140
- margin: ${"var(--ds-space-100, 8px)"};
141
- font-size: ${relativeFontSizeToBase16(14)};
142
- line-height: 1.5rem;
143
- }
144
- }
145
-
146
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET} {
147
- pointer-events: none;
148
- user-select: none;
149
- width: var(--lineNumberGutterWidth, 2rem);
150
- left: 0;
151
- position: absolute;
152
- font-size: ${relativeFontSizeToBase16(14)};
153
- padding: 0px ${"var(--ds-space-100, 8px)"};
154
- line-height: 1.5rem;
155
- text-align: right;
156
- color: ${"var(--ds-text-subtlest, #505F79)"};
157
- box-sizing: content-box;
158
- }
159
- }
160
- `;
161
-
162
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
163
- export const codeBlockInListSafariFix = css`
164
- ::before {
165
- content: ' ';
166
- line-height: ${akEditorLineHeight};
167
- }
168
-
169
- > p:first-child,
170
- > .code-block:first-child,
171
- > .ProseMirror-gapcursor:first-child + .code-block {
172
- margin-top: -${akEditorLineHeight}em !important;
173
- }
174
- `;
11
+ };
@@ -1,14 +1,4 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
1
  export const DateSharedCssClassName = {
4
2
  DATE_WRAPPER: `date-lozenger-container`,
5
3
  DATE_CONTAINER: 'dateView-content-wrap'
6
- };
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
9
- export const dateSharedStyle = css({
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
11
- [`.${DateSharedCssClassName.DATE_WRAPPER} span`]: {
12
- whiteSpace: 'unset'
13
- }
14
- });
4
+ };
@@ -1,39 +1 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { akEditorGridLineZIndex } from '@atlaskit/editor-shared-styles';
4
- export const GRID_GUTTER = 12;
5
-
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
7
- export const gridStyles = css({
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
9
- '.gridParent': {
10
- width: `calc(100% + ${GRID_GUTTER * 2}px)`,
11
- marginLeft: "var(--ds-space-negative-150, -12px)",
12
- marginRight: "var(--ds-space-negative-150, -12px)",
13
- transform: 'scale(1)',
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
- zIndex: akEditorGridLineZIndex
16
- },
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
18
- '.gridContainer': {
19
- position: 'fixed',
20
- height: '100vh',
21
- width: '100%',
22
- pointerEvents: 'none'
23
- },
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
- '.gridLine': {
26
- borderLeft: `1px solid ${"var(--ds-border, #091E4224)"}`,
27
- display: 'inline-block',
28
- boxSizing: 'border-box',
29
- height: '100%',
30
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
31
- marginLeft: '-1px',
32
- transition: 'border-color 0.15s linear',
33
- zIndex: 0
34
- },
35
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
36
- '.highlight': {
37
- borderLeft: `1px solid ${"var(--ds-border-focused, #388BFF)"}`
38
- }
39
- });
1
+ export const GRID_GUTTER = 12;
@@ -1,7 +1,3 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { bulletListSelector, orderedListSelector } from '@atlaskit/adf-schema';
4
- import { browser } from '../../utils/browser';
5
1
  export const listItemCounterPadding = 24;
6
2
  var CSS_VAR_NAMES = /*#__PURE__*/function (CSS_VAR_NAMES) {
7
3
  CSS_VAR_NAMES["ITEM_COUNTER_PADDING"] = "--ed--list--item-counter--padding";
@@ -36,120 +32,4 @@ export function getOrderedListInlineStyles(itemCounterDigitsSize, styleFormat
36
32
  return stringifyStyle(style);
37
33
  }
38
34
  return style;
39
- }
40
-
41
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, There is some "flow-root" hack that is not actually valid css. Do note, this might not even work in Compiled (or Emotion) due to the way tagged template expressions are parsed…
42
- export const listsSharedStyles = css`
43
- /* =============== INDENTATION SPACING ========= */
44
-
45
- ul,
46
- ol {
47
- box-sizing: border-box;
48
- padding-left: var(${CSS_VAR_NAMES.ITEM_COUNTER_PADDING}, ${listItemCounterPadding}px);
49
- /*
50
- Firefox does not handle empty block element inside li tag.
51
- If there is not block element inside li tag,
52
- then firefox sets inherited height to li
53
- However, if there is any block element and if it's empty
54
- (or has empty inline element) then
55
- firefox sets li tag height to zero.
56
- More details at
57
- https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation
58
- */
59
- li p:empty,
60
- li p > span:empty {
61
- ${browser.gecko ? 'display: inline-block;' : ''}
62
- }
63
- }
64
-
65
- ${orderedListSelector}, ${bulletListSelector} {
66
- /*
67
- Ensures list item content adheres to the list's margin instead
68
- of filling the entire block row. This is important to allow
69
- clicking interactive elements which are floated next to a list.
70
-
71
- For some history and context on this block, see PRs related to tickets.:
72
- @see ED-6551 - original issue.
73
- @see ED-7015 - follow up issue.
74
- @see ED-7447 - flow-root change.
75
-
76
- We use 'display: table' (old clear fix / new block formatting context hack)
77
- for older browsers and 'flow-root' for modern browsers.
78
-
79
- @see https://css-tricks.com/display-flow-root/
80
- */
81
- /* For older browsers the do not support flow-root. */
82
- /* stylelint-disable declaration-block-no-duplicate-properties */
83
- display: table;
84
- display: flow-root;
85
- /* stylelint-enable declaration-block-no-duplicate-properties */
86
- }
87
-
88
- /* =============== INDENTATION AESTHETICS ========= */
89
-
90
- /**
91
- We support nested lists up to six levels deep.
92
- **/
93
-
94
- /* LEGACY LISTS */
95
-
96
- ul,
97
- ul ul ul ul {
98
- list-style-type: disc;
99
- }
100
-
101
- ul ul,
102
- ul ul ul ul ul {
103
- list-style-type: circle;
104
- }
105
-
106
- ul ul ul,
107
- ul ul ul ul ul ul {
108
- list-style-type: square;
109
- }
110
-
111
- ol,
112
- ol ol ol ol {
113
- list-style-type: decimal;
114
- }
115
- ol ol,
116
- ol ol ol ol ol {
117
- list-style-type: lower-alpha;
118
- }
119
- ol ol ol,
120
- ol ol ol ol ol ol {
121
- list-style-type: lower-roman;
122
- }
123
-
124
- /* PREDICTABLE LISTS */
125
-
126
- ol[data-indent-level='1'],
127
- ol[data-indent-level='4'] {
128
- list-style-type: decimal;
129
- }
130
-
131
- ol[data-indent-level='2'],
132
- ol[data-indent-level='5'] {
133
- list-style-type: lower-alpha;
134
- }
135
-
136
- ol[data-indent-level='3'],
137
- ol[data-indent-level='6'] {
138
- list-style-type: lower-roman;
139
- }
140
-
141
- ul[data-indent-level='1'],
142
- ul[data-indent-level='4'] {
143
- list-style-type: disc;
144
- }
145
-
146
- ul[data-indent-level='2'],
147
- ul[data-indent-level='5'] {
148
- list-style-type: circle;
149
- }
150
-
151
- ul[data-indent-level='3'],
152
- ul[data-indent-level='6'] {
153
- list-style-type: square;
154
- }
155
- `;
35
+ }
@@ -1,12 +1,5 @@
1
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
- import { css } from '@emotion/react';
4
1
  import { PanelType } from '@atlaskit/adf-schema';
5
2
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
6
- import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
7
- import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
8
- import { emojiImage, emojiSprite } from '@atlaskit/emoji';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
3
  const lightPanelColors = {
11
4
  info: '#DEEBFF',
12
5
  note: '#EAE6FF',
@@ -77,19 +70,6 @@ export const darkPanelColors = {
77
70
  LightGray: '#5A6977',
78
71
  TextColor: '#D9DDE3'
79
72
  };
80
- const lightIconColor = {
81
- info: "var(--ds-icon-information, #1D7AFC)",
82
- note: "var(--ds-icon-discovery, #8270DB)",
83
- tip: "var(--ds-icon-success, #22A06B)",
84
- success: "var(--ds-icon-success, #22A06B)",
85
- warning: "var(--ds-icon-warning, #E56910)",
86
- error: "var(--ds-icon-danger, #C9372C)"
87
- };
88
-
89
- // New custom icons are a little smaller than predefined icons.
90
- // To fix alignment issues with custom icons, vertical alignment is updated.
91
- const panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
92
- const panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
93
73
  export function getPanelDarkModeCSS(colorName, colorValue) {
94
74
  return `
95
75
  &[data-panel-color="${colorName}"] {
@@ -128,124 +108,7 @@ export const PanelSharedSelectors = {
128
108
  yellowWarningIcon: `[aria-label=":warning:"] span:nth-child(1)`,
129
109
  copyButton: `button[aria-label="Copy"]`
130
110
  };
131
- const getIconStyles = panelType => {
132
- return `
133
- .${PanelSharedCssClassName.icon}[data-panel-type='${panelType}'] {
134
- color: ${lightIconColor[panelType]};
135
- }
136
- `;
137
- };
138
111
 
139
112
  // Provides the color without tokens, used when converting to a custom panel
140
113
  export const getPanelTypeBackgroundNoTokens = panelType => lightPanelColors[panelType] || 'none';
141
- export const getPanelTypeBackground = panelType => hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]) || 'none';
142
- const mainDynamicStyles = panelType => {
143
- return `
144
- background-color: ${getPanelTypeBackground(panelType)};
145
- color: inherit;
146
- `;
147
- };
148
-
149
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
150
- export const panelSharedStylesWithoutPrefix = () => css`
151
- border-radius: ${"var(--ds-radius-small, 3px)"};
152
- margin: ${blockNodesVerticalMargin} 0 0;
153
- padding-top: ${"var(--ds-space-100, 8px)"};
154
- padding-right: ${"var(--ds-space-200, 16px)"};
155
- padding-bottom: ${"var(--ds-space-100, 8px)"};
156
- padding-left: ${"var(--ds-space-100, 8px)"};
157
- min-width: ${akEditorTableCellMinWidth}px;
158
- display: flex;
159
- position: relative;
160
- align-items: normal;
161
- word-break: break-word;
162
-
163
- ${mainDynamicStyles(PanelType.INFO)}
164
-
165
- .${PanelSharedCssClassName.icon} {
166
- flex-shrink: 0;
167
- height: ${"var(--ds-space-300, 24px)"};
168
- width: ${"var(--ds-space-300, 24px)"};
169
- box-sizing: content-box;
170
- padding-right: ${"var(--ds-space-100, 8px)"};
171
- text-align: center;
172
- user-select: none;
173
- -moz-user-select: none;
174
- -webkit-user-select: none;
175
- -ms-user-select: none;
176
- margin-top: 0.1em;
177
-
178
- > span {
179
- vertical-align: middle;
180
- display: inline-flex;
181
- }
182
-
183
- .${emojiSprite} {
184
- vertical-align: ${panelEmojiSpriteVerticalAlignment}px;
185
- }
186
-
187
- .${emojiImage} {
188
- vertical-align: ${panelEmojiImageVerticalAlignment}px;
189
-
190
- /* Vertical align only works for inline-block elements in Firefox */
191
- @-moz-document url-prefix() {
192
- img {
193
- display: inline-block;
194
- }
195
- }
196
- }
197
- }
198
-
199
- .ak-editor-panel__content {
200
- margin: ${"var(--ds-space-025, 2px)"} 0 ${"var(--ds-space-025, 2px)"};
201
- flex: 1 0 0;
202
- /*
203
- https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
204
- The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn’t compute to zero. The minimum size of a flex item is equal to the size of its contents.
205
- */
206
- min-width: 0;
207
- }
208
-
209
- /* support nested panel */
210
- .${PanelSharedCssClassName.content} .${prefix} {
211
- border: 1px solid ${"var(--ds-border, #091E42)"};
212
- }
213
-
214
- &[data-panel-type='${PanelType.INFO}'] {
215
- ${getIconStyles(PanelType.INFO)}
216
- }
217
-
218
- &[data-panel-type='${PanelType.NOTE}'] {
219
- ${mainDynamicStyles(PanelType.NOTE)}
220
- ${getIconStyles(PanelType.NOTE)}
221
- }
222
-
223
- &[data-panel-type='${PanelType.TIP}'] {
224
- ${mainDynamicStyles(PanelType.TIP)}
225
- ${getIconStyles(PanelType.TIP)}
226
- }
227
-
228
- &[data-panel-type='${PanelType.WARNING}'] {
229
- ${mainDynamicStyles(PanelType.WARNING)}
230
- ${getIconStyles(PanelType.WARNING)}
231
- }
232
-
233
- &[data-panel-type='${PanelType.ERROR}'] {
234
- ${mainDynamicStyles(PanelType.ERROR)}
235
- ${getIconStyles(PanelType.ERROR)}
236
- }
237
-
238
- &[data-panel-type='${PanelType.SUCCESS}'] {
239
- ${mainDynamicStyles(PanelType.SUCCESS)}
240
- ${getIconStyles(PanelType.SUCCESS)}
241
- }
242
-
243
- ${fg('platform_editor_nested_dnd_styles_changes') ? `&.${PanelSharedCssClassName.noIcon} {
244
- padding-right: ${"var(--ds-space-150, 12px)"};
245
- padding-left: ${"var(--ds-space-150, 12px)"};
246
- }` : ''}
247
- `;
248
- export const panelSharedStyles = () => css({
249
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
250
- [`.${PanelSharedCssClassName.prefix}`]: panelSharedStylesWithoutPrefix()
251
- });
114
+ export const getPanelTypeBackground = panelType => hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]) || 'none';