@atlaskit/editor-core 208.6.6 → 208.7.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.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +14 -16
- package/dist/cjs/ui/ContentStyles/index.js +6 -15
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +50 -37
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +5 -17
- package/dist/cjs/ui/EditorContentContainer/styles/emoji.js +16 -38
- package/dist/cjs/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +89 -119
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +14 -15
- package/dist/es2019/ui/ContentStyles/index.js +17 -50
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +49 -57
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +7 -19
- package/dist/es2019/ui/EditorContentContainer/styles/emoji.js +25 -59
- package/dist/es2019/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +56 -66
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +14 -16
- package/dist/esm/ui/ContentStyles/index.js +7 -16
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +49 -38
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +7 -19
- package/dist/esm/ui/EditorContentContainer/styles/emoji.js +15 -37
- package/dist/esm/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +88 -116
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +100 -5
- package/dist/types/presets/universal.d.ts +100 -5
- package/dist/types/presets/useUniversalPreset.d.ts +100 -5
- package/dist/types/ui/ContentStyles/tasks-and-decisions.d.ts +3 -4
- package/dist/types/ui/EditorContentContainer/styles/emoji.d.ts +1 -2
- package/dist/types/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.d.ts +4 -5
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +125 -5
- package/dist/types-ts4.5/presets/universal.d.ts +125 -5
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +125 -5
- package/dist/types-ts4.5/ui/ContentStyles/tasks-and-decisions.d.ts +3 -4
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/emoji.d.ts +1 -2
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.d.ts +4 -5
- package/package.json +3 -7
|
@@ -4,14 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.tasksAndDecisionsStyles = exports.taskItemStyles = exports.decisionStyles = exports.decisionIconWithoutVisualRefresh = exports.decisionIconWithVisualRefresh = exports.TaskDecisionSharedCssClassName = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _selectionStyles = require("./selectionStyles");
|
|
11
|
-
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
-
|
|
11
|
+
var _css; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
13
12
|
var akEditorLineHeight = 1.714;
|
|
14
|
-
var akEditorSelectedBorderSize = 1;
|
|
15
13
|
var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
16
14
|
var TaskDecisionSharedCssClassName = exports.TaskDecisionSharedCssClassName = {
|
|
17
15
|
DECISION_CONTAINER: 'decisionItemView-content-wrap',
|
|
@@ -19,32 +17,6 @@ var TaskDecisionSharedCssClassName = exports.TaskDecisionSharedCssClassName = {
|
|
|
19
17
|
TASK_ITEM: 'task-item',
|
|
20
18
|
TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
|
|
21
19
|
};
|
|
22
|
-
var decisionSelectionStyles = (0, _react.css)({
|
|
23
|
-
borderRadius: '4px'
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
27
|
-
var decisionStyles = exports.decisionStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
-
'[data-decision-wrapper]': {
|
|
30
|
-
cursor: 'pointer'
|
|
31
|
-
}
|
|
32
|
-
}, ".".concat(akEditorSelectedNodeClassName, " > [data-decision-wrapper], ol[data-node-type='decisionList'].").concat(akEditorSelectedNodeClassName),
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
34
|
-
[decisionSelectionStyles,
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
36
|
-
_selectionStyles.boxShadowSelectionStyles,
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
38
|
-
_selectionStyles.blanketSelectionStyles,
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
40
|
-
_selectionStyles.hideNativeBrowserTextSelectionStyles]), '.danger', (0, _defineProperty2.default)({}, ".".concat(TaskDecisionSharedCssClassName.DECISION_CONTAINER, ".").concat(akEditorSelectedNodeClassName, " > div"), {
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
42
|
-
boxShadow: "0 0 0 ".concat(akEditorSelectedBorderSize, "px ", "var(--ds-border-danger, #E2483D)"),
|
|
43
|
-
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)",
|
|
44
|
-
'&::after': {
|
|
45
|
-
content: 'none' // reset the Blanket selection style
|
|
46
|
-
}
|
|
47
|
-
})));
|
|
48
20
|
|
|
49
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
50
22
|
var tasksAndDecisionsStyles = exports.tasksAndDecisionsStyles = (0, _react.css)({
|
|
@@ -101,85 +73,83 @@ var tasksAndDecisionsStyles = exports.tasksAndDecisionsStyles = (0, _react.css)(
|
|
|
101
73
|
}
|
|
102
74
|
});
|
|
103
75
|
|
|
104
|
-
// Combine this with taskDecisionStyles (above) when cleaning up the platform_editor_vanilla_dom experiment.
|
|
105
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
123
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"]': {
|
|
124
|
-
flex: '0 0 16px',
|
|
125
|
-
height: '16px',
|
|
126
|
-
width: '16px',
|
|
127
|
-
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
|
|
128
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
129
|
-
display: 'flex',
|
|
130
|
-
alignItems: 'center',
|
|
131
|
-
justifyContent: 'center'
|
|
132
|
-
},
|
|
133
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
134
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"]:not(:has([data-empty]):not(:has([data-type-ahead]))) > [data-decision-wrapper] > [data-component="icon"]': {
|
|
135
|
-
color: "var(--ds-icon-success, #22A06B)"
|
|
136
|
-
},
|
|
137
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
138
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span': {
|
|
139
|
-
display: 'inline-block',
|
|
140
|
-
flexShrink: 0,
|
|
141
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography -- Mirroring icon styles
|
|
142
|
-
lineHeight: 1
|
|
143
|
-
},
|
|
144
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
145
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span > svg': {
|
|
146
|
-
overflow: 'hidden',
|
|
147
|
-
pointerEvents: 'none',
|
|
148
|
-
color: 'currentColor',
|
|
149
|
-
verticalAlign: 'bottom'
|
|
150
|
-
},
|
|
151
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
152
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="placeholder"]': {
|
|
153
|
-
margin: "0 0 0 calc(".concat("var(--ds-space-100, 8px)", " * 3.5)"),
|
|
154
|
-
position: 'absolute',
|
|
155
|
-
color: "var(--ds-text-subtlest, #626F86)",
|
|
156
|
-
pointerEvents: 'none',
|
|
157
|
-
textOverflow: 'ellipsis',
|
|
158
|
-
overflow: 'hidden',
|
|
159
|
-
whiteSpace: 'nowrap',
|
|
160
|
-
maxWidth: 'calc(100% - 50px)'
|
|
161
|
-
},
|
|
162
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
163
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"]:not(:has([data-empty]):not(:has([data-type-ahead]))) > [data-decision-wrapper] > [data-component="placeholder"]': {
|
|
164
|
-
display: 'none'
|
|
165
|
-
},
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
167
|
-
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="content"]': {
|
|
168
|
-
margin: 0,
|
|
169
|
-
wordWrap: 'break-word',
|
|
170
|
-
minWidth: 0,
|
|
171
|
-
flex: '1 1 auto'
|
|
77
|
+
var decisionStyles = exports.decisionStyles = (0, _react.css)((_css = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css, ".".concat(akEditorSelectedNodeClassName, " > [data-decision-wrapper], ol[data-node-type='decisionList'].").concat(akEditorSelectedNodeClassName),
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
79
|
+
[{
|
|
80
|
+
borderRadius: '4px'
|
|
81
|
+
},
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
83
|
+
_selectionStyles.boxShadowSelectionStyles,
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
85
|
+
_selectionStyles.blanketSelectionStyles,
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
87
|
+
_selectionStyles.hideNativeBrowserTextSelectionStyles]), '.danger', (0, _defineProperty2.default)({}, ".".concat(TaskDecisionSharedCssClassName.DECISION_CONTAINER, ".").concat(akEditorSelectedNodeClassName, " > div"), {
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
89
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)"),
|
|
90
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)",
|
|
91
|
+
'&::after': {
|
|
92
|
+
content: 'none' // reset the Blanket selection style
|
|
172
93
|
}
|
|
173
|
-
})
|
|
94
|
+
})), '[data-prosemirror-node-name="decisionItem"]', {
|
|
95
|
+
listStyleType: 'none'
|
|
96
|
+
}), '[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper]', {
|
|
97
|
+
cursor: 'pointer',
|
|
98
|
+
display: 'flex',
|
|
99
|
+
flexDirection: 'row',
|
|
100
|
+
margin: "var(--ds-space-100, 8px)".concat(" 0 0 0"),
|
|
101
|
+
padding: "var(--ds-space-100, 8px)",
|
|
102
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
103
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
104
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
105
|
+
position: 'relative'
|
|
106
|
+
}), '[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"]', {
|
|
107
|
+
flex: '0 0 16px',
|
|
108
|
+
height: '16px',
|
|
109
|
+
width: '16px',
|
|
110
|
+
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
|
|
111
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
112
|
+
display: 'flex',
|
|
113
|
+
alignItems: 'center',
|
|
114
|
+
justifyContent: 'center'
|
|
115
|
+
}), '[data-prosemirror-node-name="decisionItem"]:not(:has([data-empty]):not(:has([data-type-ahead]))) > [data-decision-wrapper] > [data-component="icon"]', {
|
|
116
|
+
color: "var(--ds-icon-success, #22A06B)"
|
|
117
|
+
}), '[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span', {
|
|
118
|
+
display: 'inline-block',
|
|
119
|
+
flexShrink: 0,
|
|
120
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography -- Mirroring icon styles
|
|
121
|
+
lineHeight: 1
|
|
122
|
+
}), '[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span > svg', {
|
|
123
|
+
overflow: 'hidden',
|
|
124
|
+
pointerEvents: 'none',
|
|
125
|
+
color: 'currentColor',
|
|
126
|
+
verticalAlign: 'bottom'
|
|
127
|
+
}), '[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="placeholder"]', {
|
|
128
|
+
margin: "0 0 0 calc(".concat("var(--ds-space-100, 8px)", " * 3.5)"),
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
131
|
+
pointerEvents: 'none',
|
|
132
|
+
textOverflow: 'ellipsis',
|
|
133
|
+
overflow: 'hidden',
|
|
134
|
+
whiteSpace: 'nowrap',
|
|
135
|
+
maxWidth: 'calc(100% - 50px)'
|
|
136
|
+
}), '[data-prosemirror-node-name="decisionItem"]:not(:has([data-empty]):not(:has([data-type-ahead]))) > [data-decision-wrapper] > [data-component="placeholder"]', {
|
|
137
|
+
display: 'none'
|
|
138
|
+
}), (0, _defineProperty2.default)(_css, '[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="content"]', {
|
|
139
|
+
margin: 0,
|
|
140
|
+
wordWrap: 'break-word',
|
|
141
|
+
minWidth: 0,
|
|
142
|
+
flex: '1 1 auto'
|
|
143
|
+
})));
|
|
174
144
|
|
|
175
145
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
176
|
-
var
|
|
146
|
+
var decisionIconWithVisualRefresh = exports.decisionIconWithVisualRefresh = (0, _react.css)({
|
|
177
147
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
178
|
-
'[data-prosemirror-node-
|
|
148
|
+
'[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span > svg[data-icon-source="legacy"]': {
|
|
179
149
|
display: 'none'
|
|
180
150
|
},
|
|
181
151
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
182
|
-
'[data-prosemirror-node-
|
|
152
|
+
'[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span': {
|
|
183
153
|
boxSizing: 'border-box',
|
|
184
154
|
paddingInlineEnd: 'var(--ds--button--new-icon-padding-end, 0)',
|
|
185
155
|
paddingInlineStart: 'var(--ds--button--new-icon-padding-start, 0)',
|
|
@@ -189,20 +159,20 @@ var vanillaDecisionIconWithVisualRefresh = exports.vanillaDecisionIconWithVisual
|
|
|
189
159
|
}
|
|
190
160
|
},
|
|
191
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
192
|
-
'[data-prosemirror-node-
|
|
162
|
+
'[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span > svg': {
|
|
193
163
|
width: "var(--ds-space-300, 24px)",
|
|
194
164
|
height: "var(--ds-space-300, 24px)"
|
|
195
165
|
}
|
|
196
166
|
});
|
|
197
167
|
|
|
198
168
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
199
|
-
var
|
|
169
|
+
var decisionIconWithoutVisualRefresh = exports.decisionIconWithoutVisualRefresh = (0, _react.css)({
|
|
200
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
201
|
-
'[data-prosemirror-node-
|
|
171
|
+
'[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span > svg[data-icon-source="refreshed"]': {
|
|
202
172
|
display: 'none'
|
|
203
173
|
},
|
|
204
174
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
205
|
-
'[data-prosemirror-node-
|
|
175
|
+
'[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span': {
|
|
206
176
|
width: '32px',
|
|
207
177
|
height: '32px',
|
|
208
178
|
'@media screen and (forced-colors: active)': {
|
|
@@ -212,7 +182,7 @@ var vanillaDecisionIconWithoutVisualRefresh = exports.vanillaDecisionIconWithout
|
|
|
212
182
|
}
|
|
213
183
|
},
|
|
214
184
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
215
|
-
'[data-prosemirror-node-
|
|
185
|
+
'[data-prosemirror-node-name="decisionItem"] > [data-decision-wrapper] > [data-component="icon"] > span > svg': {
|
|
216
186
|
maxWidth: '100%',
|
|
217
187
|
maxHeight: '100%',
|
|
218
188
|
fill: "var(--ds-surface, #FFFFFF)",
|
|
@@ -222,19 +192,19 @@ var vanillaDecisionIconWithoutVisualRefresh = exports.vanillaDecisionIconWithout
|
|
|
222
192
|
});
|
|
223
193
|
|
|
224
194
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
225
|
-
var
|
|
195
|
+
var taskItemStyles = exports.taskItemStyles = (0, _react.css)((0, _defineProperty2.default)({
|
|
226
196
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
227
|
-
'[data-prosemirror-node-
|
|
197
|
+
'[data-prosemirror-node-name="taskItem"]': {
|
|
228
198
|
listStyle: 'none'
|
|
229
199
|
},
|
|
230
200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
231
|
-
'[data-prosemirror-node-
|
|
201
|
+
'[data-prosemirror-node-name="taskItem"] [data-component="task-item-main"]': {
|
|
232
202
|
display: 'flex',
|
|
233
203
|
flexDirection: 'row',
|
|
234
204
|
position: 'relative'
|
|
235
205
|
},
|
|
236
206
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
237
|
-
'[data-prosemirror-node-
|
|
207
|
+
'[data-prosemirror-node-name="taskItem"] [data-component="placeholder"]': {
|
|
238
208
|
position: 'absolute',
|
|
239
209
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
240
210
|
margin: "0 0 0 calc(".concat("var(--ds-space-100, 8px)", " * 3)"),
|
|
@@ -246,11 +216,11 @@ var vanillaTaskItemStyles = exports.vanillaTaskItemStyles = (0, _react.css)((0,
|
|
|
246
216
|
display: 'none'
|
|
247
217
|
},
|
|
248
218
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
249
|
-
"[data-prosemirror-node-
|
|
219
|
+
"[data-prosemirror-node-name='taskItem']:has([data-empty]):not(:has([data-type-ahead])) [data-component='placeholder']": {
|
|
250
220
|
display: 'block'
|
|
251
221
|
},
|
|
252
222
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
253
|
-
'[data-prosemirror-node-
|
|
223
|
+
'[data-prosemirror-node-name="taskItem"] [data-component="content"]': {
|
|
254
224
|
margin: 0,
|
|
255
225
|
wordWrap: 'break-word',
|
|
256
226
|
minWidth: 0,
|
|
@@ -258,7 +228,7 @@ var vanillaTaskItemStyles = exports.vanillaTaskItemStyles = (0, _react.css)((0,
|
|
|
258
228
|
},
|
|
259
229
|
// copied styles from packages/design-system/icon/src/components/icon-new.tsx
|
|
260
230
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
261
|
-
'[data-prosemirror-node-
|
|
231
|
+
'[data-prosemirror-node-name="taskItem"] [data-component="checkbox-icon-wrap"]': {
|
|
262
232
|
display: 'inline-block',
|
|
263
233
|
boxSizing: 'border-box',
|
|
264
234
|
flexShrink: 0,
|
|
@@ -268,7 +238,7 @@ var vanillaTaskItemStyles = exports.vanillaTaskItemStyles = (0, _react.css)((0,
|
|
|
268
238
|
paddingInlineStart: 'var(--ds--button--new-icon-padding-start, 0)'
|
|
269
239
|
},
|
|
270
240
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
271
|
-
'[data-prosemirror-node-
|
|
241
|
+
'[data-prosemirror-node-name="taskItem"] [data-component="checkbox-icon-wrap"] svg': {
|
|
272
242
|
overflow: 'hidden',
|
|
273
243
|
pointerEvents: 'none',
|
|
274
244
|
color: 'currentColor',
|
|
@@ -277,22 +247,22 @@ var vanillaTaskItemStyles = exports.vanillaTaskItemStyles = (0, _react.css)((0,
|
|
|
277
247
|
height: "var(--ds-space-200, 16px)"
|
|
278
248
|
},
|
|
279
249
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
280
|
-
'[data-prosemirror-node-
|
|
250
|
+
'[data-prosemirror-node-name="taskItem"] input[type=checkbox]:not(:checked) + span [data-component=checkbox-checked-icon]': {
|
|
281
251
|
display: 'none'
|
|
282
252
|
},
|
|
283
253
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
284
|
-
'[data-prosemirror-node-
|
|
254
|
+
'[data-prosemirror-node-name="taskItem"] input[type=checkbox]:not(:checked) + span [data-component=checkbox-unchecked-icon]': {
|
|
285
255
|
display: 'inline'
|
|
286
256
|
},
|
|
287
257
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
288
|
-
'[data-prosemirror-node-
|
|
258
|
+
'[data-prosemirror-node-name="taskItem"] input[type=checkbox]:checked + span [data-component=checkbox-checked-icon]': {
|
|
289
259
|
display: 'inline'
|
|
290
260
|
},
|
|
291
261
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
292
|
-
'[data-prosemirror-node-
|
|
262
|
+
'[data-prosemirror-node-name="taskItem"] input[type=checkbox]:checked + span [data-component=checkbox-unchecked-icon]': {
|
|
293
263
|
display: 'none'
|
|
294
264
|
}
|
|
295
|
-
}, "[data-prosemirror-node-
|
|
265
|
+
}, "[data-prosemirror-node-name=\"taskItem\"] .".concat(TaskDecisionSharedCssClassName.TASK_CHECKBOX_CONTAINER), {
|
|
296
266
|
flex: '0 0 24px',
|
|
297
267
|
width: '24px',
|
|
298
268
|
height: '24px',
|
|
@@ -90,21 +90,20 @@ export const FullPageEditor = props => {
|
|
|
90
90
|
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking', {
|
|
91
91
|
disabled: fg('platform_editor_use_preferences_plugin')
|
|
92
92
|
});
|
|
93
|
-
|
|
93
|
+
const {
|
|
94
|
+
toolbarDockingPosition
|
|
95
|
+
} = useSharedPluginStateSelector(editorAPI, 'userPreferences.preferences', {
|
|
94
96
|
disabled: !fg('platform_editor_use_preferences_plugin')
|
|
95
|
-
});
|
|
96
|
-
if (fg('platform_editor_use_preferences_plugin')) {
|
|
97
|
-
if (!
|
|
98
|
-
var _editorAPI$
|
|
99
|
-
|
|
97
|
+
}) || {};
|
|
98
|
+
if (!fg('platform_editor_use_preferences_plugin')) {
|
|
99
|
+
if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
100
|
+
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
101
|
+
// This is a workaround for the rendering issue with the selection toolbar
|
|
102
|
+
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
103
|
+
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
104
|
+
const defaultDocking = props.__livePage ? 'none' : 'top';
|
|
105
|
+
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 ? void 0 : (_editorAPI$selectionT3 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT3 === void 0 ? void 0 : _editorAPI$selectionT3.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
100
106
|
}
|
|
101
|
-
} else if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
102
|
-
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
103
|
-
// This is a workaround for the rendering issue with the selection toolbar
|
|
104
|
-
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
105
|
-
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
106
|
-
const defaultDocking = props.__livePage ? 'none' : 'top';
|
|
107
|
-
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 ? void 0 : (_editorAPI$selectionT3 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT3 === void 0 ? void 0 : _editorAPI$selectionT3.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
108
107
|
}
|
|
109
108
|
let primaryToolbarComponents = props.primaryToolbarComponents;
|
|
110
109
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
@@ -118,8 +117,8 @@ export const FullPageEditor = props => {
|
|
|
118
117
|
exposure: true
|
|
119
118
|
})) {
|
|
120
119
|
if (fg('platform_editor_use_preferences_plugin')) {
|
|
121
|
-
// need to check if the
|
|
122
|
-
if (
|
|
120
|
+
// need to check if the toolbarDockingPosition is set to 'none' or 'top'
|
|
121
|
+
if (toolbarDockingPosition === 'none') {
|
|
123
122
|
primaryToolbarComponents = [];
|
|
124
123
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
125
124
|
isEditorToolbarHidden = true;
|
|
@@ -37,7 +37,7 @@ import { layoutStyles } from './layout';
|
|
|
37
37
|
import { mediaStyles } from './media';
|
|
38
38
|
import { panelStyles } from './panel';
|
|
39
39
|
import { statusStyles, statusNodeStyles } from './status';
|
|
40
|
-
import { taskDecisionStyles,
|
|
40
|
+
import { taskDecisionStyles, taskDecisionIconWithoutVisualRefresh as decisionIconWithoutVisualRefresh, taskDecisionIconWithVisualRefresh as decisionIconWithVisualRefresh, taskItemStyles } from './tasks-and-decisions';
|
|
41
41
|
|
|
42
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
43
|
export const linkStyles = css`
|
|
@@ -186,48 +186,25 @@ const listsStyles = css`
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
`;
|
|
189
|
-
const
|
|
189
|
+
const emojiStyles = css`
|
|
190
190
|
.${EmojiSharedCssClassName.EMOJI_CONTAINER} {
|
|
191
191
|
display: inline-block;
|
|
192
|
+
}
|
|
192
193
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
&.${akEditorSelectedNodeClassName} {
|
|
203
|
-
.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE} {
|
|
204
|
-
border-radius: 2px;
|
|
205
|
-
${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow])}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
194
|
+
.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE} {
|
|
195
|
+
background: no-repeat transparent;
|
|
196
|
+
display: inline-block;
|
|
197
|
+
height: ${defaultEmojiHeight}px;
|
|
198
|
+
max-height: ${defaultEmojiHeight}px;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
vertical-align: middle;
|
|
201
|
+
user-select: all;
|
|
208
202
|
}
|
|
209
|
-
`;
|
|
210
|
-
const emojiStyles = css`
|
|
211
|
-
[data-prosemirror-node-view-type='vanilla'] {
|
|
212
|
-
.${EmojiSharedCssClassName.EMOJI_CONTAINER} {
|
|
213
|
-
display: inline-block;
|
|
214
|
-
}
|
|
215
203
|
|
|
204
|
+
.${akEditorSelectedNodeClassName} {
|
|
216
205
|
.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE} {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
height: ${defaultEmojiHeight}px;
|
|
220
|
-
max-height: ${defaultEmojiHeight}px;
|
|
221
|
-
cursor: pointer;
|
|
222
|
-
vertical-align: middle;
|
|
223
|
-
user-select: all;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
&.${akEditorSelectedNodeClassName} {
|
|
227
|
-
.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE} {
|
|
228
|
-
border-radius: 2px;
|
|
229
|
-
${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow])}
|
|
230
|
-
}
|
|
206
|
+
border-radius: 2px;
|
|
207
|
+
${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow])}
|
|
231
208
|
}
|
|
232
209
|
}
|
|
233
210
|
`;
|
|
@@ -428,9 +405,6 @@ const legacyContentStyles = props => css`
|
|
|
428
405
|
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
429
406
|
exposure: false
|
|
430
407
|
}) && vanillaSelectionStyles}
|
|
431
|
-
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
432
|
-
exposure: false
|
|
433
|
-
}) ? emojiStyles : reactEmojiStyles}
|
|
434
408
|
${emojiStyles}
|
|
435
409
|
${tasksAndDecisionsStyles}
|
|
436
410
|
${gridStyles}
|
|
@@ -442,17 +416,10 @@ const legacyContentStyles = props => css`
|
|
|
442
416
|
${expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? fg('platform_editor_find_and_replace_magenta_match') ? findReplaceStylesNewMagenta : findReplaceStylesNewYellow : findReplaceStyles}
|
|
443
417
|
${textHighlightStyle}
|
|
444
418
|
${taskDecisionStyles}
|
|
445
|
-
|
|
446
|
-
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
447
|
-
exposure: false
|
|
448
|
-
}) && vanillaDecisionStyles}
|
|
419
|
+
${taskItemStyles}
|
|
449
420
|
/* Switch between the two icons based on the visual refresh feature gate */
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh}
|
|
453
|
-
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
454
|
-
exposure: false
|
|
455
|
-
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh}
|
|
421
|
+
${fg('platform-visual-refresh-icons') && decisionIconWithVisualRefresh}
|
|
422
|
+
${!fg('platform-visual-refresh-icons') && decisionIconWithoutVisualRefresh}
|
|
456
423
|
${statusStyles}
|
|
457
424
|
${statusNodeStyles()}
|
|
458
425
|
${annotationSharedStyles()}
|