@atlaskit/editor-core 214.2.3 → 215.0.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 +28 -0
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/ui/Addon/click-area-helper.js +1 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +38 -2
- package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +10 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +0 -8
- package/dist/es2019/ui/Addon/click-area-helper.js +1 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +40 -3
- package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +9 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +0 -8
- package/dist/esm/ui/Addon/click-area-helper.js +1 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +39 -3
- package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +9 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +0 -7
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
- package/package.json +11 -8
- package/create-editor-content-style/package.json +0 -17
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +0 -43
- package/dist/cjs/ui/ContentStyles/ai-panels.js +0 -91
- package/dist/cjs/ui/ContentStyles/code-bidi-warning.js +0 -75
- package/dist/cjs/ui/ContentStyles/code-block.js +0 -28
- package/dist/cjs/ui/ContentStyles/date.js +0 -43
- package/dist/cjs/ui/ContentStyles/expand.js +0 -37
- package/dist/cjs/ui/ContentStyles/extension.js +0 -21
- package/dist/cjs/ui/ContentStyles/index.js +0 -220
- package/dist/cjs/ui/ContentStyles/layout.js +0 -80
- package/dist/cjs/ui/ContentStyles/media.js +0 -27
- package/dist/cjs/ui/ContentStyles/panel.js +0 -17
- package/dist/cjs/ui/ContentStyles/status.js +0 -158
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +0 -556
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +0 -47
- package/dist/es2019/ui/ContentStyles/ai-panels.js +0 -168
- package/dist/es2019/ui/ContentStyles/code-bidi-warning.js +0 -68
- package/dist/es2019/ui/ContentStyles/code-block.js +0 -90
- package/dist/es2019/ui/ContentStyles/date.js +0 -57
- package/dist/es2019/ui/ContentStyles/expand.js +0 -142
- package/dist/es2019/ui/ContentStyles/extension.js +0 -236
- package/dist/es2019/ui/ContentStyles/index.js +0 -580
- package/dist/es2019/ui/ContentStyles/layout.js +0 -388
- package/dist/es2019/ui/ContentStyles/media.js +0 -207
- package/dist/es2019/ui/ContentStyles/panel.js +0 -66
- package/dist/es2019/ui/ContentStyles/status.js +0 -197
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +0 -551
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +0 -36
- package/dist/esm/ui/ContentStyles/ai-panels.js +0 -87
- package/dist/esm/ui/ContentStyles/code-bidi-warning.js +0 -68
- package/dist/esm/ui/ContentStyles/code-block.js +0 -21
- package/dist/esm/ui/ContentStyles/date.js +0 -37
- package/dist/esm/ui/ContentStyles/expand.js +0 -31
- package/dist/esm/ui/ContentStyles/extension.js +0 -15
- package/dist/esm/ui/ContentStyles/index.js +0 -214
- package/dist/esm/ui/ContentStyles/layout.js +0 -74
- package/dist/esm/ui/ContentStyles/media.js +0 -21
- package/dist/esm/ui/ContentStyles/panel.js +0 -11
- package/dist/esm/ui/ContentStyles/status.js +0 -152
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +0 -548
- package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
- package/dist/types/ui/ContentStyles/ai-panels.d.ts +0 -8
- package/dist/types/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
- package/dist/types/ui/ContentStyles/code-block.d.ts +0 -2
- package/dist/types/ui/ContentStyles/date.d.ts +0 -3
- package/dist/types/ui/ContentStyles/expand.d.ts +0 -2
- package/dist/types/ui/ContentStyles/extension.d.ts +0 -2
- package/dist/types/ui/ContentStyles/index.d.ts +0 -23
- package/dist/types/ui/ContentStyles/layout.d.ts +0 -8
- package/dist/types/ui/ContentStyles/media.d.ts +0 -2
- package/dist/types/ui/ContentStyles/panel.d.ts +0 -2
- package/dist/types/ui/ContentStyles/status.d.ts +0 -3
- package/dist/types/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
- package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +0 -8
- package/dist/types-ts4.5/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/code-block.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/date.d.ts +0 -3
- package/dist/types-ts4.5/ui/ContentStyles/expand.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/extension.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +0 -23
- package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +0 -8
- package/dist/types-ts4.5/ui/ContentStyles/media.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/panel.d.ts +0 -2
- package/dist/types-ts4.5/ui/ContentStyles/status.d.ts +0 -3
- package/dist/types-ts4.5/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO ED-26957 - remove legacy styles when static emotion refactor is complete
|
|
3
|
-
* We are moving this to new location under FF: platform_editor_core_static_emotion
|
|
4
|
-
* New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
|
|
5
|
-
* If you are making updates to this file, please updates in new location as well.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, keyframes } from '@emotion/react';
|
|
10
|
-
const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
11
|
-
const rotationAnimation = keyframes({
|
|
12
|
-
'0%': {
|
|
13
|
-
'--panel-gradient-angle': '0deg',
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
15
|
-
...(isFirefox ? {
|
|
16
|
-
backgroundPosition: '100%'
|
|
17
|
-
} : {})
|
|
18
|
-
},
|
|
19
|
-
'100%': {
|
|
20
|
-
'--panel-gradient-angle': '360deg',
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
22
|
-
...(isFirefox ? {
|
|
23
|
-
backgroundPosition: '-100%'
|
|
24
|
-
} : {})
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const aiPrismColor = {
|
|
28
|
-
['prism.border.step.1']: {
|
|
29
|
-
light: '#0065FF',
|
|
30
|
-
dark: '#0065FF80'
|
|
31
|
-
},
|
|
32
|
-
['prism.border.step.2']: {
|
|
33
|
-
light: '#0469FF',
|
|
34
|
-
dark: '#0469FF80'
|
|
35
|
-
},
|
|
36
|
-
['prism.border.step.3']: {
|
|
37
|
-
light: '#BF63F3',
|
|
38
|
-
dark: '#BF63F380'
|
|
39
|
-
},
|
|
40
|
-
['prism.border.step.4']: {
|
|
41
|
-
light: '#FFA900',
|
|
42
|
-
dark: '#FFA90080'
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const prismBorderAnimationStyles = css({
|
|
46
|
-
'&::before, &::after': {
|
|
47
|
-
animationName: rotationAnimation,
|
|
48
|
-
animationDuration: '2s',
|
|
49
|
-
animationTimingFunction: 'linear',
|
|
50
|
-
animationIterationCount: 'infinite',
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
-
...(isFirefox ? {
|
|
53
|
-
animationDirection: 'normal',
|
|
54
|
-
animationDuration: '1s'
|
|
55
|
-
} : {}),
|
|
56
|
-
'@media (prefers-reduced-motion)': {
|
|
57
|
-
animation: 'none'
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const prismBorderStyles = (colorMode, hover) => css({
|
|
62
|
-
content: "''",
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
|
-
position: 'absolute',
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
-
zIndex: -1,
|
|
67
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
68
|
-
width: `calc(100% + 2px)`,
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
70
|
-
height: `calc(100% + 2px)`,
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
|
-
top: `-1px`,
|
|
73
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
74
|
-
left: `-1px`,
|
|
75
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
76
|
-
borderRadius: `calc(${"var(--ds-radius-small, 3px)"} + 1px)`,
|
|
77
|
-
transform: 'translate3d(0, 0, 0)',
|
|
78
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
79
|
-
...(hover ? {
|
|
80
|
-
background: "var(--ds-border-input, #8590A2)"
|
|
81
|
-
} : isFirefox ? {
|
|
82
|
-
background: `linear-gradient(90deg,
|
|
83
|
-
${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 0%,
|
|
84
|
-
${aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 12%,
|
|
85
|
-
${aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 24%,
|
|
86
|
-
${aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 48%,
|
|
87
|
-
${aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 64%,
|
|
88
|
-
${aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 80%,
|
|
89
|
-
${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 100%
|
|
90
|
-
)`,
|
|
91
|
-
backgroundSize: '200%'
|
|
92
|
-
} : {
|
|
93
|
-
background: `conic-gradient(
|
|
94
|
-
from var(--panel-gradient-angle, 270deg),
|
|
95
|
-
${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 0%,
|
|
96
|
-
${aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 20%,
|
|
97
|
-
${aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 50%,
|
|
98
|
-
${aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 56%,
|
|
99
|
-
${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 100%
|
|
100
|
-
)`
|
|
101
|
-
})
|
|
102
|
-
});
|
|
103
|
-
export const aiPanelStyles = (colorMode
|
|
104
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
105
|
-
) => css`
|
|
106
|
-
@property --panel-gradient-angle {
|
|
107
|
-
syntax: '<angle>';
|
|
108
|
-
initial-value: 270deg;
|
|
109
|
-
inherits: false;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
div[extensionType='com.atlassian.ai-blocks'] {
|
|
113
|
-
/* This hides the label for the extension */
|
|
114
|
-
.extension-label {
|
|
115
|
-
display: none;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* This styles the ai panel correctly when its just sitting on the page and there
|
|
119
|
-
is no user interaction */
|
|
120
|
-
.extension-container {
|
|
121
|
-
position: relative;
|
|
122
|
-
box-shadow: none;
|
|
123
|
-
overflow: unset;
|
|
124
|
-
background-color: ${"var(--ds-surface, #FFFFFF)"} !important;
|
|
125
|
-
&::before,
|
|
126
|
-
&::after {
|
|
127
|
-
${prismBorderStyles(colorMode)}
|
|
128
|
-
}
|
|
129
|
-
&.with-hover-border {
|
|
130
|
-
&::before,
|
|
131
|
-
&::after {
|
|
132
|
-
${prismBorderStyles(colorMode, true)}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
& .with-margin-styles {
|
|
136
|
-
background-color: ${"var(--ds-surface, #FFFFFF)"} !important;
|
|
137
|
-
border-radius: ${"var(--ds-radius-small, 3px)"};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* This styles the ai panel correctly when its streaming */
|
|
143
|
-
div[extensionType='com.atlassian.ai-blocks']:has(.streaming) {
|
|
144
|
-
.extension-container {
|
|
145
|
-
box-shadow: none;
|
|
146
|
-
overflow: unset;
|
|
147
|
-
${prismBorderAnimationStyles}
|
|
148
|
-
&::before,
|
|
149
|
-
&::after {
|
|
150
|
-
${prismBorderStyles(colorMode)}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* This styles the ai panel correctly when a user is hovering over the delete button in the floating panel */
|
|
156
|
-
div[extensionType='com.atlassian.ai-blocks'].danger {
|
|
157
|
-
.extension-container {
|
|
158
|
-
box-shadow: 0 0 0 1px ${"var(--ds-border-danger, #E2483D)"};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* This removes the margin from the action list when inside an ai panel */
|
|
163
|
-
div[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {
|
|
164
|
-
div[data-node-type='actionList'] {
|
|
165
|
-
margin: 0 !important;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
`;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
-
export const codeBidiWarningStyles = css({
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
6
|
-
'[data-prosemirror-node-name="code-bidi-warning"]': {
|
|
7
|
-
display: 'inline-block'
|
|
8
|
-
},
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
10
|
-
'[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
|
|
11
|
-
paddingInlineStart: "var(--ds-space-050, 4px)",
|
|
12
|
-
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
13
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
14
|
-
fontStyle: 'normal',
|
|
15
|
-
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
17
|
-
paddingTop: '0.05rem',
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
19
|
-
paddingBottom: '0.05rem',
|
|
20
|
-
color: "var(--ds-text-warning, #A54800)",
|
|
21
|
-
backgroundColor: "var(--ds-background-warning, #FFF7D6)"
|
|
22
|
-
},
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
24
|
-
'[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
|
|
25
|
-
color: "var(--ds-text-warning, #A54800)",
|
|
26
|
-
backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
|
|
27
|
-
},
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
-
'[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
|
|
30
|
-
visibility: 'hidden',
|
|
31
|
-
boxSizing: 'border-box',
|
|
32
|
-
width: '15pc',
|
|
33
|
-
backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
|
|
34
|
-
color: "var(--ds-text-inverse, #FFFFFF)",
|
|
35
|
-
overflowWrap: 'break-word',
|
|
36
|
-
cursor: 'default',
|
|
37
|
-
borderRadius: "var(--ds-radius-small, 4px)",
|
|
38
|
-
margin: "var(--ds-space-0, 0px)",
|
|
39
|
-
padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"}`,
|
|
40
|
-
position: 'fixed',
|
|
41
|
-
// The character label will be ~80px and this is positioned from the end of that label
|
|
42
|
-
// We also use this instead of top: 24px to make sure the tooltip maintains its initial position
|
|
43
|
-
// instead of being positioned relative to the viewport.
|
|
44
|
-
// We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
|
|
45
|
-
// and is always visible.
|
|
46
|
-
// We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
|
|
47
|
-
transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
|
|
48
|
-
opacity: 0,
|
|
49
|
-
whiteSpace: 'normal',
|
|
50
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
51
|
-
zIndex: 9999,
|
|
52
|
-
// Exit animation timings
|
|
53
|
-
// - Mark invisible after 0.475s
|
|
54
|
-
// - After 0.3s, fade out and move up over 0.175s
|
|
55
|
-
transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
|
|
56
|
-
},
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
-
'[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
|
|
59
|
-
visibility: 'visible',
|
|
60
|
-
transform: 'translate(calc(-50% - 40px), calc(24px))',
|
|
61
|
-
opacity: 1,
|
|
62
|
-
// Enter animation timings
|
|
63
|
-
// - Mark visible after 0.3s of hovering
|
|
64
|
-
// - After 0.3s, fade in over 0.175s
|
|
65
|
-
// - After 0.3s, move down over 0.35s
|
|
66
|
-
transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
|
|
67
|
-
}
|
|
68
|
-
});
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
-
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { functionWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
7
|
-
const GutterDangerOverlay = () => css`
|
|
8
|
-
&::after {
|
|
9
|
-
height: 100%;
|
|
10
|
-
content: '';
|
|
11
|
-
position: absolute;
|
|
12
|
-
left: 0;
|
|
13
|
-
top: 0;
|
|
14
|
-
width: 24px;
|
|
15
|
-
background-color: ${"var(--ds-blanket-danger, none)"};
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
/* When code-block is inside the panel */
|
|
20
|
-
const firstCodeBlockWithNoMargin = functionWithFG('platform_editor_nested_dnd_styles_changes', () => css`
|
|
21
|
-
.ak-editor-panel__content {
|
|
22
|
-
> .code-block:first-child,
|
|
23
|
-
> .ProseMirror-widget:first-child + .code-block,
|
|
24
|
-
> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {
|
|
25
|
-
margin: 0 0 0 0 !important;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`, () => css`
|
|
29
|
-
.ak-editor-panel__content {
|
|
30
|
-
> .code-block:first-child {
|
|
31
|
-
margin: 0 0 0 0 !important;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
`);
|
|
35
|
-
export const codeBlockStyles = () => css`
|
|
36
|
-
.ProseMirror {
|
|
37
|
-
${codeBlockSharedStyles()}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ProseMirror li {
|
|
41
|
-
/* if same list item has multiple code blocks we need top margin for all but first */
|
|
42
|
-
> .code-block {
|
|
43
|
-
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
44
|
-
}
|
|
45
|
-
> .code-block:first-child,
|
|
46
|
-
> .ProseMirror-gapcursor:first-child + .code-block {
|
|
47
|
-
margin-top: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
> div:last-of-type.code-block,
|
|
51
|
-
> pre:last-of-type.code-block {
|
|
52
|
-
margin-bottom: ${blockNodesVerticalMargin};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ProseMirror .code-block.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
57
|
-
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Danger when top level node */
|
|
61
|
-
.ProseMirror .danger.code-block {
|
|
62
|
-
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
|
|
63
|
-
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
64
|
-
|
|
65
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
66
|
-
background-color: ${"var(--ds-background-danger, #FFECEB)"};
|
|
67
|
-
color: ${`var(--ds-text-danger, ${akEditorDeleteIconColor})`};
|
|
68
|
-
${GutterDangerOverlay()};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
72
|
-
background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackground})`};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Danger when nested node */
|
|
77
|
-
.ProseMirror .danger .code-block {
|
|
78
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
79
|
-
background-color: ${"var(--ds-background-danger, rgba(255, 143, 115, 0.5))"};
|
|
80
|
-
color: ${`var(--ds-text-danger, ${akEditorDeleteIconColor})`};
|
|
81
|
-
${GutterDangerOverlay()};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
85
|
-
background-color: ${"var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))"};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
${firstCodeBlockWithNoMargin()}
|
|
90
|
-
`;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
6
|
-
export const dateNodeStyles = css({
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
8
|
-
"[data-prosemirror-node-name='date'] .date-lozenger-container span": {
|
|
9
|
-
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
10
|
-
color: "var(--ds-text, #172B4D)",
|
|
11
|
-
borderRadius: "var(--ds-radius-small, 4px)",
|
|
12
|
-
padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`,
|
|
13
|
-
margin: '0 1px',
|
|
14
|
-
position: 'relative',
|
|
15
|
-
transition: 'background 0.3s',
|
|
16
|
-
whiteSpace: 'nowrap',
|
|
17
|
-
cursor: 'unset'
|
|
18
|
-
},
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
20
|
-
"[data-prosemirror-node-name='date'] .date-lozenger-container span:hover": {
|
|
21
|
-
backgroundColor: "var(--ds-background-neutral-hovered, #091E4224)"
|
|
22
|
-
},
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
24
|
-
"[data-prosemirror-node-name='date'] .date-lozenger-container span.date-node-color-red": {
|
|
25
|
-
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
26
|
-
color: "var(--ds-text-accent-red, #AE2E24)"
|
|
27
|
-
},
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
-
"[data-prosemirror-node-name='date'] .date-lozenger-container span.date-node-color-red:hover": {
|
|
30
|
-
backgroundColor: "var(--ds-background-accent-red-subtler, #FFD5D2)"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
|
-
export const dateStyles = css`
|
|
36
|
-
.${DateSharedCssClassName.DATE_CONTAINER} {
|
|
37
|
-
.${DateSharedCssClassName.DATE_WRAPPER} {
|
|
38
|
-
line-height: initial;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&.${akEditorSelectedNodeClassName} {
|
|
43
|
-
.${DateSharedCssClassName.DATE_WRAPPER} > span {
|
|
44
|
-
${getSelectionStyles([SelectionStyle.BoxShadow])}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.danger {
|
|
50
|
-
.${DateSharedCssClassName.DATE_CONTAINER}.${akEditorSelectedNodeClassName}
|
|
51
|
-
.${DateSharedCssClassName.DATE_WRAPPER}
|
|
52
|
-
> span {
|
|
53
|
-
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
|
|
54
|
-
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { BreakoutCssClassName, expandClassNames, sharedExpandStyles } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { akEditorSelectedBorder, akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
const EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
7
|
-
const EXPAND_ICON_COLOR = () => css({
|
|
8
|
-
color: "var(--ds-icon-subtle, #626F86)"
|
|
9
|
-
});
|
|
10
|
-
const DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger, #FFECEB)";
|
|
11
|
-
const DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, #E2483D)";
|
|
12
|
-
const firstNodeWithNotMarginTop = () => fg('platform_editor_nested_dnd_styles_changes') ?
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
14
|
-
css`
|
|
15
|
-
> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {
|
|
16
|
-
margin-top: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
> div.ak-editor-expand[data-node-type='nestedExpand'] {
|
|
20
|
-
margin-top: ${"var(--ds-space-050, 0.25rem)"};
|
|
21
|
-
}
|
|
22
|
-
` : '';
|
|
23
|
-
|
|
24
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
26
|
-
export const expandStyles = () => css`
|
|
27
|
-
.${expandClassNames.icon} > div {
|
|
28
|
-
display: flex;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${expandClassNames.prefix} {
|
|
32
|
-
${sharedExpandStyles.containerStyles({
|
|
33
|
-
expanded: false,
|
|
34
|
-
focused: false
|
|
35
|
-
})()}
|
|
36
|
-
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
|
|
40
|
-
td > & {
|
|
41
|
-
margin-top: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.${expandClassNames.iconContainer} svg {
|
|
45
|
-
${EXPAND_ICON_COLOR()};
|
|
46
|
-
transform: rotate(90deg);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
50
|
-
${fg('platform_editor_nested_dnd_styles_changes') ? getSelectionStyles([SelectionStyle.Blanket]) + `border: ${akEditorSelectedBorder};` : getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border])}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&.danger {
|
|
54
|
-
background: ${DANGER_STATE_BACKGROUND_COLOR};
|
|
55
|
-
border-color: ${DANGER_STATE_BORDER_COLOR};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.ProseMirror
|
|
60
|
-
> .${expandClassNames.type('expand')},
|
|
61
|
-
.${BreakoutCssClassName.BREAKOUT_MARK_DOM}
|
|
62
|
-
> .${expandClassNames.type('expand')} {
|
|
63
|
-
margin-left: -${akLayoutGutterOffset}px;
|
|
64
|
-
margin-right: -${akLayoutGutterOffset}px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
${fg('platform_editor_nested_dnd_styles_changes') && `.ak-editor-content-area.appearance-full-page .ProseMirror
|
|
68
|
-
> .${expandClassNames.type('expand')},
|
|
69
|
-
.${BreakoutCssClassName.BREAKOUT_MARK_DOM}
|
|
70
|
-
> .${expandClassNames.type('expand')} {
|
|
71
|
-
margin-left: -${akLayoutGutterOffset + 8}px;
|
|
72
|
-
margin-right: -${akLayoutGutterOffset + 8}px;
|
|
73
|
-
}`}
|
|
74
|
-
|
|
75
|
-
.${expandClassNames.content} {
|
|
76
|
-
${sharedExpandStyles.contentStyles({
|
|
77
|
-
expanded: false,
|
|
78
|
-
focused: false
|
|
79
|
-
})()}
|
|
80
|
-
cursor: text;
|
|
81
|
-
padding-top: 0px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.${expandClassNames.titleInput} {
|
|
85
|
-
${sharedExpandStyles.titleInputStyles()}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.${expandClassNames.titleContainer} {
|
|
89
|
-
${sharedExpandStyles.titleContainerStyles()};
|
|
90
|
-
align-items: center;
|
|
91
|
-
overflow: visible;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.${expandClassNames.expanded} {
|
|
95
|
-
background: ${EXPAND_SELECTED_BACKGROUND};
|
|
96
|
-
border-color: ${"var(--ds-border, #091E4224)"};
|
|
97
|
-
|
|
98
|
-
.${expandClassNames.content} {
|
|
99
|
-
padding-top: ${"var(--ds-space-100, 8px)"};
|
|
100
|
-
|
|
101
|
-
${firstNodeWithNotMarginTop()}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.${expandClassNames.inputContainer} {
|
|
106
|
-
width: 100%;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* stylelint-disable property-no-unknown, value-keyword-case */
|
|
110
|
-
.${expandClassNames.prefix}:(.${expandClassNames.expanded}) {
|
|
111
|
-
.expand-content-wrapper {
|
|
112
|
-
height: auto;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
/* stylelint-enable property-no-unknown, value-keyword-case */
|
|
116
|
-
|
|
117
|
-
.${expandClassNames.prefix}:not(.${expandClassNames.expanded}) {
|
|
118
|
-
.ak-editor-expand__content {
|
|
119
|
-
position: absolute;
|
|
120
|
-
height: 1px;
|
|
121
|
-
width: 1px;
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
clip: rect(1px, 1px, 1px, 1px);
|
|
124
|
-
white-space: nowrap;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.${expandClassNames.iconContainer} svg {
|
|
128
|
-
${EXPAND_ICON_COLOR()};
|
|
129
|
-
transform: rotate(0deg);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&:not(.${akEditorSelectedNodeClassName}):not(.danger) {
|
|
133
|
-
background: transparent;
|
|
134
|
-
border-color: transparent;
|
|
135
|
-
|
|
136
|
-
&:hover {
|
|
137
|
-
border-color: ${"var(--ds-border, #091E4224)"};
|
|
138
|
-
background: ${EXPAND_SELECTED_BACKGROUND};
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
`;
|