@atlaskit/renderer 130.2.16 → 130.2.18
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 +14 -0
- package/dist/cjs/react/marks/link-compiled.compiled.css +6 -0
- package/dist/cjs/react/marks/link-compiled.js +27 -0
- package/dist/cjs/react/marks/link-emotion.js +42 -0
- package/dist/cjs/react/marks/link.js +13 -23
- package/dist/cjs/react/nodes/layoutColumn-compiled.compiled.css +10 -0
- package/dist/cjs/react/nodes/layoutColumn-compiled.js +37 -0
- package/dist/cjs/react/nodes/layoutColumn-emotion.js +59 -0
- package/dist/cjs/react/nodes/layoutColumn.js +11 -41
- package/dist/cjs/react/nodes/panel-compiled.compiled.css +54 -0
- package/dist/cjs/react/nodes/panel-compiled.js +60 -0
- package/dist/cjs/react/nodes/panel-emotion.js +185 -0
- package/dist/cjs/react/nodes/panel.js +14 -181
- package/dist/es2019/react/marks/link-compiled.compiled.css +6 -0
- package/dist/es2019/react/marks/link-compiled.js +17 -0
- package/dist/es2019/react/marks/link-emotion.js +31 -0
- package/dist/es2019/react/marks/link.js +13 -23
- package/dist/es2019/react/nodes/layoutColumn-compiled.compiled.css +10 -0
- package/dist/es2019/react/nodes/layoutColumn-compiled.js +31 -0
- package/dist/es2019/react/nodes/layoutColumn-emotion.js +61 -0
- package/dist/es2019/react/nodes/layoutColumn.js +10 -50
- package/dist/es2019/react/nodes/panel-compiled.compiled.css +57 -0
- package/dist/es2019/react/nodes/panel-compiled.js +44 -0
- package/dist/es2019/react/nodes/panel-emotion.js +178 -0
- package/dist/es2019/react/nodes/panel.js +12 -180
- package/dist/esm/react/marks/link-compiled.compiled.css +6 -0
- package/dist/esm/react/marks/link-compiled.js +19 -0
- package/dist/esm/react/marks/link-emotion.js +34 -0
- package/dist/esm/react/marks/link.js +15 -23
- package/dist/esm/react/nodes/layoutColumn-compiled.compiled.css +10 -0
- package/dist/esm/react/nodes/layoutColumn-compiled.js +31 -0
- package/dist/esm/react/nodes/layoutColumn-emotion.js +52 -0
- package/dist/esm/react/nodes/layoutColumn.js +12 -41
- package/dist/esm/react/nodes/panel-compiled.compiled.css +54 -0
- package/dist/esm/react/nodes/panel-compiled.js +53 -0
- package/dist/esm/react/nodes/panel-emotion.js +179 -0
- package/dist/esm/react/nodes/panel.js +14 -181
- package/dist/types/react/marks/link-compiled.d.ts +13 -0
- package/dist/types/react/marks/link-emotion.d.ts +14 -0
- package/dist/types/react/marks/link.d.ts +5 -2
- package/dist/types/react/nodes/index.d.ts +2 -2
- package/dist/types/react/nodes/layoutColumn-compiled.d.ts +14 -0
- package/dist/types/react/nodes/layoutColumn-emotion.d.ts +14 -0
- package/dist/types/react/nodes/layoutColumn.d.ts +3 -5
- package/dist/types/react/nodes/panel-compiled.d.ts +22 -0
- package/dist/types/react/nodes/panel-emotion.d.ts +23 -0
- package/dist/types/react/nodes/panel.d.ts +1 -6
- package/dist/types/ui/annotations/draft/dom.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +1 -1
- package/dist/types-ts4.5/react/marks/link-compiled.d.ts +13 -0
- package/dist/types-ts4.5/react/marks/link-emotion.d.ts +14 -0
- package/dist/types-ts4.5/react/marks/link.d.ts +5 -2
- package/dist/types-ts4.5/react/nodes/index.d.ts +2 -2
- package/dist/types-ts4.5/react/nodes/layoutColumn-compiled.d.ts +14 -0
- package/dist/types-ts4.5/react/nodes/layoutColumn-emotion.d.ts +14 -0
- package/dist/types-ts4.5/react/nodes/layoutColumn.d.ts +3 -5
- package/dist/types-ts4.5/react/nodes/panel-compiled.d.ts +22 -0
- package/dist/types-ts4.5/react/nodes/panel-emotion.d.ts +23 -0
- package/dist/types-ts4.5/react/nodes/panel.d.ts +1 -6
- package/dist/types-ts4.5/ui/annotations/draft/dom.d.ts +1 -1
- package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +1 -1
- package/package.json +13 -10
- package/renderer.docs.tsx +47 -0
|
@@ -5,187 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
var _lightbulb = _interopRequireDefault(require("@atlaskit/icon/core/lightbulb"));
|
|
13
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
+
var _icons = require("@atlaskit/editor-common/icons");
|
|
14
11
|
var _panel = require("@atlaskit/editor-common/panel");
|
|
15
|
-
var _editorPalette = require("@atlaskit/editor-palette");
|
|
16
12
|
var _emoji = _interopRequireDefault(require("@atlaskit/icon/core/emoji"));
|
|
13
|
+
var _lightbulb = _interopRequireDefault(require("@atlaskit/icon/core/lightbulb"));
|
|
14
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _emoji2 = _interopRequireDefault(require("./emoji"));
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
-
var _excluded = ["backgroundColor", "hasIcon"];
|
|
22
|
-
/**
|
|
23
|
-
* @jsxRuntime classic
|
|
24
|
-
* @jsx jsx
|
|
25
|
-
*/
|
|
26
|
-
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
27
|
-
// New custom icons are a little smaller than predefined icons.
|
|
28
|
-
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
29
|
-
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - _consts.akEditorCustomIconSize) / 2;
|
|
30
|
-
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
31
|
-
var blockNodesVerticalMargin = '0.75rem';
|
|
32
|
-
var akEditorTableCellMinWidth = 48;
|
|
33
|
-
var panelBaseStyles = (0, _react2.css)({
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
35
|
-
'&.ak-editor-panel': {
|
|
36
|
-
borderRadius: "var(--ds-radius-small, 3px)",
|
|
37
|
-
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
38
|
-
paddingTop: "var(--ds-space-100, 8px)",
|
|
39
|
-
paddingRight: "var(--ds-space-200, 16px)",
|
|
40
|
-
paddingBottom: "var(--ds-space-100, 8px)",
|
|
41
|
-
paddingLeft: "var(--ds-space-100, 8px)",
|
|
42
|
-
minWidth: "".concat(akEditorTableCellMinWidth, "px"),
|
|
43
|
-
display: 'flex',
|
|
44
|
-
position: 'relative',
|
|
45
|
-
alignItems: 'normal',
|
|
46
|
-
wordBreak: 'break-word',
|
|
47
|
-
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
48
|
-
color: 'inherit',
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
50
|
-
'.ak-editor-panel__icon': {
|
|
51
|
-
flexShrink: 0,
|
|
52
|
-
height: "var(--ds-space-300, 24px)",
|
|
53
|
-
width: "var(--ds-space-300, 24px)",
|
|
54
|
-
boxSizing: 'content-box',
|
|
55
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
56
|
-
textAlign: 'center',
|
|
57
|
-
userSelect: 'none',
|
|
58
|
-
MozUserSelect: 'none',
|
|
59
|
-
WebkitUserSelect: 'none',
|
|
60
|
-
MsUserSelect: 'none',
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
62
|
-
marginTop: '0.1em',
|
|
63
|
-
color: "var(--ds-icon-information, #357DE8)",
|
|
64
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
-
'> span': {
|
|
66
|
-
verticalAlign: 'middle',
|
|
67
|
-
display: 'inline-flex'
|
|
68
|
-
},
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
|
-
'.emoji-common-emoji-sprite': {
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
72
|
-
verticalAlign: "".concat(panelEmojiSpriteVerticalAlignment, "px")
|
|
73
|
-
},
|
|
74
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
75
|
-
'.emoji-common-emoji-image': {
|
|
76
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
77
|
-
verticalAlign: "".concat(panelEmojiImageVerticalAlignment, "px"),
|
|
78
|
-
// Vertical align only works for inline-block elements in Firefox
|
|
79
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
80
|
-
'@-moz-document url-prefix()': {
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
82
|
-
img: {
|
|
83
|
-
display: 'inline-block'
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
89
|
-
'.ak-editor-panel__content': {
|
|
90
|
-
margin: "var(--ds-space-025, 2px)".concat(" 0 ", "var(--ds-space-025, 2px)"),
|
|
91
|
-
flex: '1 0 0',
|
|
92
|
-
/*
|
|
93
|
-
https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
|
|
94
|
-
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.
|
|
95
|
-
*/
|
|
96
|
-
minWidth: 0
|
|
97
|
-
},
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
99
|
-
'&[data-panel-type="note"]': {
|
|
100
|
-
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F8EEFE)",
|
|
101
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
102
|
-
'.ak-editor-panel__icon': {
|
|
103
|
-
color: "var(--ds-icon-discovery, #AF59E1)"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
107
|
-
'&[data-panel-type="tip"]': {
|
|
108
|
-
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
109
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
110
|
-
'.ak-editor-panel__icon': {
|
|
111
|
-
color: "var(--ds-icon-success, #6A9A23)"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
115
|
-
'&[data-panel-type="warning"]': {
|
|
116
|
-
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FEF7C8)",
|
|
117
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
118
|
-
'.ak-editor-panel__icon': {
|
|
119
|
-
color: "var(--ds-icon-warning, #E06C00)"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
123
|
-
'&[data-panel-type="error"]': {
|
|
124
|
-
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
126
|
-
'.ak-editor-panel__icon': {
|
|
127
|
-
color: "var(--ds-icon-danger, #C9372C)"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
131
|
-
'&[data-panel-type="success"]': {
|
|
132
|
-
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
133
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
134
|
-
'.ak-editor-panel__icon': {
|
|
135
|
-
color: "var(--ds-icon-success, #6A9A23)"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
var panelHasNoIconStyles = (0, _react2.css)({
|
|
141
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
142
|
-
'&.ak-editor-panel': {
|
|
143
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
144
|
-
'&[data-panel-type="custom"]': {
|
|
145
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
146
|
-
paddingRight: "var(--ds-space-150, 12px)"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
var panelNestedIconStyles = (0, _react2.css)({
|
|
151
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
152
|
-
'&.ak-editor-panel__no-icon': {
|
|
153
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
154
|
-
paddingRight: "var(--ds-space-150, 12px)"
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
var nestedPanelStyles = (0, _react2.css)({
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
|
-
'.ak-editor-panel__content .ak-editor-panel': {
|
|
160
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)")
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
var panelCustomBackground = (0, _react2.css)({
|
|
164
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
165
|
-
'&.ak-editor-panel': {
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
167
|
-
'&[data-panel-type="custom"]': {
|
|
168
|
-
backgroundColor: 'var(--ak-renderer-panel-custom-bg-color)'
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
var PanelStyled = function PanelStyled(_ref) {
|
|
173
|
-
var backgroundColor = _ref.backgroundColor,
|
|
174
|
-
hasIcon = _ref.hasIcon,
|
|
175
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
176
|
-
var customBackgroundColor = backgroundColor ? (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor : undefined;
|
|
177
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
178
|
-
style:
|
|
179
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
180
|
-
{
|
|
181
|
-
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
182
|
-
},
|
|
183
|
-
css: [panelBaseStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor && panelCustomBackground, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && panelNestedIconStyles, nestedPanelStyles]
|
|
184
|
-
// Ignored via go/ees005
|
|
185
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
186
|
-
}, props), props.children);
|
|
187
|
-
};
|
|
188
|
-
PanelStyled.displayName = 'PanelStyled';
|
|
17
|
+
var _panelCompiled = require("./panel-compiled");
|
|
18
|
+
var _panelEmotion = require("./panel-emotion");
|
|
189
19
|
var panelIcons = {
|
|
190
20
|
info: _icons.PanelInfoIcon,
|
|
191
21
|
success: _icons.PanelSuccessIcon,
|
|
@@ -195,6 +25,9 @@ var panelIcons = {
|
|
|
195
25
|
error: _icons.PanelErrorIcon,
|
|
196
26
|
custom: _emoji.default
|
|
197
27
|
};
|
|
28
|
+
var PanelStyledMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
29
|
+
return (0, _expValEquals.expValEquals)('platform_editor_renderer_static_css', 'isEnabled', true);
|
|
30
|
+
}, _panelCompiled.PanelStyledCompiled, _panelEmotion.PanelStyledEmotion);
|
|
198
31
|
var Panel = function Panel(props) {
|
|
199
32
|
var allowCustomPanels = props.allowCustomPanels,
|
|
200
33
|
type = props.panelType,
|
|
@@ -211,7 +44,7 @@ var Panel = function Panel(props) {
|
|
|
211
44
|
var getIcon = function getIcon() {
|
|
212
45
|
if (panelType === _adfSchema.PanelType.CUSTOM) {
|
|
213
46
|
if (panelIcon && providers) {
|
|
214
|
-
return
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_emoji2.default, {
|
|
215
48
|
id: panelIconId,
|
|
216
49
|
text: panelIconText,
|
|
217
50
|
shortName: panelIcon,
|
|
@@ -221,7 +54,7 @@ var Panel = function Panel(props) {
|
|
|
221
54
|
return null;
|
|
222
55
|
}
|
|
223
56
|
var Icon = panelIcons[panelType];
|
|
224
|
-
return
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(Icon, {
|
|
225
58
|
label: "".concat(panelType, " panel")
|
|
226
59
|
});
|
|
227
60
|
};
|
|
@@ -229,12 +62,12 @@ var Panel = function Panel(props) {
|
|
|
229
62
|
var renderIcon = function renderIcon() {
|
|
230
63
|
if (icon) {
|
|
231
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
232
|
-
return
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
233
66
|
className: _panel.PanelSharedCssClassName.icon
|
|
234
67
|
}, icon);
|
|
235
68
|
}
|
|
236
69
|
};
|
|
237
|
-
return
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(PanelStyledMigration
|
|
238
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
239
72
|
, {
|
|
240
73
|
className: _panel.PanelSharedCssClassName.prefix,
|
|
@@ -246,7 +79,7 @@ var Panel = function Panel(props) {
|
|
|
246
79
|
"data-panel-icon-text": panelIconText,
|
|
247
80
|
backgroundColor: panelColor,
|
|
248
81
|
hasIcon: Boolean(icon)
|
|
249
|
-
}, renderIcon(),
|
|
82
|
+
}, renderIcon(), /*#__PURE__*/_react.default.createElement("div", {
|
|
250
83
|
className: _panel.PanelSharedCssClassName.content
|
|
251
84
|
}, children));
|
|
252
85
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
._syaz13af{color:var(--ds-link,#1868db)}._1bnx8stv:hover{text-decoration-line:underline}
|
|
3
|
+
._30l313af:hover{color:var(--ds-link,#1868db)}
|
|
4
|
+
._9oik1r31:hover{text-decoration-color:currentColor}
|
|
5
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
6
|
+
._9h8h12zz:active{color:var(--ds-link-pressed,#1558bc)}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* link-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./link-compiled.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Compiled branch of the `platform_editor_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `link.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
14
|
+
const anchorStyles = null;
|
|
15
|
+
export const LinkUrlCompiled = props => /*#__PURE__*/React.createElement(LinkUrl, _extends({}, props, {
|
|
16
|
+
className: ax(["_syaz13af _9oik1r31 _1bnx8stv _jf4cnqa1 _30l313af _9h8h12zz"])
|
|
17
|
+
}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Emotion branch of the `platform_editor_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `link.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
15
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
16
|
+
const anchorStyles = css({
|
|
17
|
+
color: "var(--ds-link, #1868DB)",
|
|
18
|
+
'&:hover': {
|
|
19
|
+
color: "var(--ds-link, #1868DB)",
|
|
20
|
+
textDecoration: 'underline'
|
|
21
|
+
},
|
|
22
|
+
'&:active': {
|
|
23
|
+
color: "var(--ds-link-pressed, #1558BC)"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export const LinkUrlEmotion = props =>
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
29
|
+
jsx(LinkUrl, _extends({
|
|
30
|
+
css: anchorStyles
|
|
31
|
+
}, props));
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
2
|
import React, { Fragment } from 'react';
|
|
7
|
-
|
|
8
|
-
import { jsx, css } from '@emotion/react';
|
|
3
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
9
4
|
import { getEventHandler } from '../../utils';
|
|
10
5
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
11
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
|
-
import
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
8
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'&:active': {
|
|
21
|
-
color: "var(--ds-link-pressed, #1558BC)"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
9
|
+
import { LinkUrlCompiled } from './link-compiled';
|
|
10
|
+
import { LinkUrlEmotion } from './link-emotion';
|
|
11
|
+
const LinkUrlMigration = componentWithCondition(() => expValEquals('platform_editor_renderer_static_css', 'isEnabled', true), LinkUrlCompiled, LinkUrlEmotion);
|
|
12
|
+
/**
|
|
13
|
+
* Render an ADF link mark in renderer.
|
|
14
|
+
*/
|
|
24
15
|
export default function Link(props) {
|
|
25
16
|
const {
|
|
26
17
|
href,
|
|
@@ -51,7 +42,7 @@ export default function Link(props) {
|
|
|
51
42
|
}
|
|
52
43
|
const handler = getEventHandler(eventHandlers, 'link');
|
|
53
44
|
if (isMediaLink) {
|
|
54
|
-
return
|
|
45
|
+
return /*#__PURE__*/React.createElement(Fragment, null, props.children);
|
|
55
46
|
}
|
|
56
47
|
const analyticsData = {
|
|
57
48
|
attributes: {
|
|
@@ -60,12 +51,11 @@ export default function Link(props) {
|
|
|
60
51
|
// Below is added for the future implementation of Linking Platform namespaced analytic context
|
|
61
52
|
location: 'renderer'
|
|
62
53
|
};
|
|
63
|
-
return
|
|
54
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
64
55
|
data: analyticsData
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
,
|
|
56
|
+
}, /*#__PURE__*/React.createElement(LinkUrlMigration
|
|
57
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
58
|
+
, _extends({
|
|
69
59
|
onClick: e => {
|
|
70
60
|
if (fireAnalyticsEvent) {
|
|
71
61
|
fireAnalyticsEvent({
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
._12kpidpf [class*=image-wrap-]:has(+[class*=image-wrap-]){margin-top:0}
|
|
2
|
+
._166hgrf3+.fabric-editor-block-mark>h4{margin-top:0!important}
|
|
3
|
+
._19segrf3+.fabric-editor-block-mark>h1{margin-top:0!important}
|
|
4
|
+
._1ki1grf3+.fabric-editor-block-mark>h2{margin-top:0!important}
|
|
5
|
+
._1skbgrf3+*{margin-top:0!important}
|
|
6
|
+
._1tihidpf [class*=image-wrap-]+[class*=image-wrap-]{margin-top:0}
|
|
7
|
+
._7g1ogrf3+.fabric-editor-block-mark>h5{margin-top:0!important}
|
|
8
|
+
._bmdegrf3+.fabric-editor-block-mark>h3{margin-top:0!important}
|
|
9
|
+
._hgeogrf3+.fabric-editor-block-mark>p{margin-top:0!important}
|
|
10
|
+
._sk2jgrf3+.fabric-editor-block-mark>h6{margin-top:0!important}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
/**
|
|
3
|
+
* Compiled branch of the `platform_editor_static_css` experiment.
|
|
4
|
+
* Used via `componentWithCondition` in `layoutColumn.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
+
*/
|
|
8
|
+
import "./layoutColumn-compiled.compiled.css";
|
|
9
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { WidthProvider } from '@atlaskit/editor-common/ui';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
|
|
14
|
+
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
15
|
+
const clearNextSiblingMarginTopStyle = null;
|
|
16
|
+
const multipleWrappedImagesStyle = null;
|
|
17
|
+
|
|
18
|
+
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
19
|
+
const clearNextSiblingBlockMarkMarginTopStyle = null;
|
|
20
|
+
export const LayoutSectionCompiled = props => {
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
"data-layout-column": true,
|
|
23
|
+
"data-column-width": props.width,
|
|
24
|
+
style: {
|
|
25
|
+
flexBasis: `${props.width}%`
|
|
26
|
+
},
|
|
27
|
+
className: ax([fg('platform_editor_fix_media_in_renderer') && "_1tihidpf _12kpidpf"])
|
|
28
|
+
}, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: ax(["_1skbgrf3", "_19segrf3 _1ki1grf3 _bmdegrf3 _166hgrf3 _7g1ogrf3 _sk2jgrf3 _hgeogrf3"])
|
|
30
|
+
}), props.children));
|
|
31
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion branch of the `platform_editor_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `layoutColumn.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
14
|
+
import { jsx, css } from '@emotion/react';
|
|
15
|
+
import { WidthProvider } from '@atlaskit/editor-common/ui';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
|
|
18
|
+
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
19
|
+
const clearNextSiblingMarginTopStyle = css({
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
|
+
'& + *': {
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
23
|
+
marginTop: '0 !important'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const multipleWrappedImagesStyle = css({
|
|
27
|
+
// Given the first wrapped mediaSingle has 0 marginTop (see clearNextSiblingMarginTopStyle),
|
|
28
|
+
// update all wrapped mediaSingle inside layout to have 0 margin top unless they don't have sibling wrapped mediaSingle
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
30
|
+
'& [class*="image-wrap-"] + [class*="image-wrap-"], & [class*="image-wrap-"]:has( + [class*="image-wrap-"])': {
|
|
31
|
+
marginTop: '0'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
36
|
+
const clearNextSiblingBlockMarkMarginTopStyle = css({
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
|
+
[`+ .fabric-editor-block-mark > p,
|
|
39
|
+
+ .fabric-editor-block-mark > h1,
|
|
40
|
+
+ .fabric-editor-block-mark > h2,
|
|
41
|
+
+ .fabric-editor-block-mark > h3,
|
|
42
|
+
+ .fabric-editor-block-mark > h4,
|
|
43
|
+
+ .fabric-editor-block-mark > h5,
|
|
44
|
+
+ .fabric-editor-block-mark > h6
|
|
45
|
+
`]: {
|
|
46
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
47
|
+
marginTop: '0 !important'
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export const LayoutSectionEmotion = props => {
|
|
51
|
+
return jsx("div", {
|
|
52
|
+
"data-layout-column": true,
|
|
53
|
+
"data-column-width": props.width,
|
|
54
|
+
style: {
|
|
55
|
+
flexBasis: `${props.width}%`
|
|
56
|
+
},
|
|
57
|
+
css: fg('platform_editor_fix_media_in_renderer') && multipleWrappedImagesStyle
|
|
58
|
+
}, jsx(WidthProvider, null, jsx("div", {
|
|
59
|
+
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
60
|
+
}), props.children));
|
|
61
|
+
};
|
|
@@ -1,54 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
1
|
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
12
|
-
const clearNextSiblingMarginTopStyle = css({
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
|
-
'& + *': {
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
16
|
-
marginTop: '0 !important'
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const multipleWrappedImagesStyle = css({
|
|
20
|
-
// Given the first wrapped mediaSingle has 0 marginTop (see clearNextSiblingMarginTopStyle),
|
|
21
|
-
// update all wrapped mediaSingle inside layout to have 0 margin top unless they don't have sibling wrapped mediaSingle
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
23
|
-
'& [class*="image-wrap-"] + [class*="image-wrap-"], & [class*="image-wrap-"]:has( + [class*="image-wrap-"])': {
|
|
24
|
-
marginTop: '0'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
2
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
+
import { LayoutSectionCompiled } from './layoutColumn-compiled';
|
|
5
|
+
import { LayoutSectionEmotion } from './layoutColumn-emotion';
|
|
6
|
+
const LayoutSectionMigration = componentWithCondition(() => expValEquals('platform_editor_renderer_static_css', 'isEnabled', true), LayoutSectionCompiled, LayoutSectionEmotion);
|
|
27
7
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[`+ .fabric-editor-block-mark > p,
|
|
32
|
-
+ .fabric-editor-block-mark > h1,
|
|
33
|
-
+ .fabric-editor-block-mark > h2,
|
|
34
|
-
+ .fabric-editor-block-mark > h3,
|
|
35
|
-
+ .fabric-editor-block-mark > h4,
|
|
36
|
-
+ .fabric-editor-block-mark > h5,
|
|
37
|
-
+ .fabric-editor-block-mark > h6
|
|
38
|
-
`]: {
|
|
39
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
40
|
-
marginTop: '0 !important'
|
|
41
|
-
}
|
|
42
|
-
});
|
|
8
|
+
/**
|
|
9
|
+
* Render a layout column in renderer.
|
|
10
|
+
*/
|
|
43
11
|
export default function LayoutSection(props) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"data-column-width": props.width,
|
|
47
|
-
style: {
|
|
48
|
-
flexBasis: `${props.width}%`
|
|
49
|
-
},
|
|
50
|
-
css: fg('platform_editor_fix_media_in_renderer') && multipleWrappedImagesStyle
|
|
51
|
-
}, jsx(WidthProvider, null, jsx("div", {
|
|
52
|
-
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
53
|
-
}), props.children));
|
|
12
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
13
|
+
return /*#__PURE__*/React.createElement(LayoutSectionMigration, props);
|
|
54
14
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
._1wvnia51 .ak-editor-panel__content .ak-editor-panel{border:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
3
|
+
._lklzfajl.ak-editor-panel{border-radius:var(--ds-radius-small,3px)}._11k7idpf.ak-editor-panel .ak-editor-panel__content{margin-right:0}
|
|
4
|
+
._11wb1ejb.ak-editor-panel .ak-editor-panel__icon{width:var(--ds-space-300,24px)}
|
|
5
|
+
._122m1aok.ak-editor-panel[data-panel-type=custom]{background-color:var(--ak-renderer-panel-custom-bg-color)}
|
|
6
|
+
._13n84jg8.ak-editor-panel{align-items:normal}
|
|
7
|
+
._1554u2gc.ak-editor-panel{padding-top:var(--ds-space-100,8px)}
|
|
8
|
+
._15sp1vk5.ak-editor-panel[data-panel-type=error]{background-color:var(--ds-background-accent-red-subtlest,#ffeceb)}
|
|
9
|
+
._18w0h2mm.ak-editor-panel{position:relative}
|
|
10
|
+
._18y8qm1h.ak-editor-panel[data-panel-type=note] .ak-editor-panel__icon{color:var(--ds-icon-discovery,#af59e1)}
|
|
11
|
+
._19agidpf.ak-editor-panel .ak-editor-panel__content{flex-shrink:0}
|
|
12
|
+
._19s71txw.ak-editor-panel{display:flex}
|
|
13
|
+
._1a3fnkob.ak-editor-panel .ak-editor-panel__icon>span{vertical-align:middle}
|
|
14
|
+
._1alzoqnp.ak-editor-panel{margin-top:.75rem}
|
|
15
|
+
._1b0jutpp.ak-editor-panel[data-panel-type=custom]{padding-right:var(--ds-space-150,9pt)}
|
|
16
|
+
._1bi2v77o.ak-editor-panel .ak-editor-panel__content{margin-bottom:var(--ds-space-025,2px)}
|
|
17
|
+
._1cgk1h6o.ak-editor-panel .ak-editor-panel__icon{text-align:center}
|
|
18
|
+
._1eiopxbi.ak-editor-panel{padding-right:var(--ds-space-200,1pc)}
|
|
19
|
+
._1fe7s4qr.ak-editor-panel[data-panel-type=error] .ak-editor-panel__icon{color:var(--ds-icon-danger,#c9372c)}
|
|
20
|
+
._1g6dibhp.ak-editor-panel[data-panel-type=warning]{background-color:var(--ds-background-accent-yellow-subtlest,#fef7c8)}
|
|
21
|
+
._1h33yhbg.ak-editor-panel .ak-editor-panel__icon{color:var(--ds-icon-information,#357de8)}
|
|
22
|
+
._1hau12gs.ak-editor-panel .ak-editor-panel__icon .emoji-common-emoji-sprite{vertical-align:-2px}
|
|
23
|
+
._1it3ckbl.ak-editor-panel{min-width:3pc}
|
|
24
|
+
._1l9midpf.ak-editor-panel .ak-editor-panel__icon{flex-shrink:0}
|
|
25
|
+
._1m1jidpf.ak-editor-panel{margin-left:0}
|
|
26
|
+
._1n3wglyw.ak-editor-panel .ak-editor-panel__icon{-ms-user-select:none}
|
|
27
|
+
._1oah1ntv.ak-editor-panel .ak-editor-panel__icon{box-sizing:content-box}
|
|
28
|
+
._1pciu2gc.ak-editor-panel .ak-editor-panel__icon{padding-right:var(--ds-space-100,8px)}
|
|
29
|
+
._1q6xf1ug.ak-editor-panel .ak-editor-panel__content{flex-basis:0%}
|
|
30
|
+
._1udservl.ak-editor-panel[data-panel-type=warning] .ak-editor-panel__icon{color:var(--ds-icon-warning,#e06c00)}
|
|
31
|
+
._1uvd116y.ak-editor-panel .ak-editor-panel__icon>span{display:inline-flex}
|
|
32
|
+
._1v1c1ejb.ak-editor-panel .ak-editor-panel__icon{height:var(--ds-space-300,24px)}
|
|
33
|
+
._1w22u2gc.ak-editor-panel{padding-bottom:var(--ds-space-100,8px)}
|
|
34
|
+
._1whxutpp.ak-editor-panel[data-panel-type=custom]{padding-left:var(--ds-space-150,9pt)}
|
|
35
|
+
._1yw1vq3b.ak-editor-panel .ak-editor-panel__icon{margin-top:.1em}
|
|
36
|
+
._50vakb7n.ak-editor-panel .ak-editor-panel__content{flex-grow:1}
|
|
37
|
+
._5zphglyw.ak-editor-panel .ak-editor-panel__icon{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
38
|
+
._66ohu2gc.ak-editor-panel{padding-left:var(--ds-space-100,8px)}
|
|
39
|
+
._6qwr1hna.ak-editor-panel{word-break:break-word}
|
|
40
|
+
._7c6pj39m.ak-editor-panel .ak-editor-panel__icon .emoji-common-emoji-image{vertical-align:-3px}
|
|
41
|
+
._9dunutpp.ak-editor-panel__no-icon{padding-left:var(--ds-space-150,9pt)}
|
|
42
|
+
._e5ovn729.ak-editor-panel[data-panel-type=tip]{background-color:var(--ds-background-accent-green-subtlest,#dcfff1)}
|
|
43
|
+
._fc9iidpf.ak-editor-panel .ak-editor-panel__content{min-width:0}
|
|
44
|
+
._g8a34pcx.ak-editor-panel[data-panel-type=tip] .ak-editor-panel__icon{color:var(--ds-icon-success,#6a9a23)}
|
|
45
|
+
._gb1eidpf.ak-editor-panel .ak-editor-panel__content{margin-left:0}
|
|
46
|
+
._gt7x4pcx.ak-editor-panel[data-panel-type=success] .ak-editor-panel__icon{color:var(--ds-icon-success,#6a9a23)}
|
|
47
|
+
._iqv91kw7.ak-editor-panel{color:inherit}
|
|
48
|
+
._jde2v77o.ak-editor-panel .ak-editor-panel__content{margin-top:var(--ds-space-025,2px)}
|
|
49
|
+
._nlelp2ly.ak-editor-panel[data-panel-type=note]{background-color:var(--ds-background-accent-purple-subtlest,#f8eefe)}
|
|
50
|
+
._pzbautpp.ak-editor-panel__no-icon{padding-right:var(--ds-space-150,9pt)}
|
|
51
|
+
._s4ldn729.ak-editor-panel[data-panel-type=success]{background-color:var(--ds-background-accent-green-subtlest,#dcfff1)}
|
|
52
|
+
._u70eidpf.ak-editor-panel{margin-bottom:0}
|
|
53
|
+
._ujht1s93.ak-editor-panel{background-color:var(--ds-background-accent-blue-subtlest,#e9f2fe)}
|
|
54
|
+
._wz94glyw.ak-editor-panel .ak-editor-panel__icon{-moz-user-select:none}
|
|
55
|
+
._xmo1idpf.ak-editor-panel{margin-right:0}
|
|
56
|
+
._zs6jglyw.ak-editor-panel .ak-editor-panel__icon{-webkit-user-select:none}
|
|
57
|
+
@-moz-document url-prefix(){._udsa1o8l.ak-editor-panel .ak-editor-panel__icon .emoji-common-emoji-image img{display:inline-block}}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* panel-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./panel-compiled.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
/**
|
|
6
|
+
* Compiled branch of the `platform_editor_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `panel.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { PanelType } from '@atlaskit/adf-schema';
|
|
13
|
+
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
14
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
// New custom icons are a little smaller than predefined icons.
|
|
17
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
18
|
+
const panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
|
|
19
|
+
const panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
20
|
+
const blockNodesVerticalMargin = '0.75rem';
|
|
21
|
+
const akEditorTableCellMinWidth = 48;
|
|
22
|
+
const panelBaseStyles = null;
|
|
23
|
+
const panelHasNoIconStyles = null;
|
|
24
|
+
const panelNestedIconStyles = null;
|
|
25
|
+
const nestedPanelStyles = null;
|
|
26
|
+
const panelCustomBackground = null;
|
|
27
|
+
export const PanelStyledCompiled = ({
|
|
28
|
+
backgroundColor,
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
hasIcon,
|
|
32
|
+
...props
|
|
33
|
+
}) => {
|
|
34
|
+
const customBackgroundColor = backgroundColor ? hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor : undefined;
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- intentional: preserve existing PanelSharedCssClassName.prefix class
|
|
37
|
+
className: ax(["_lklzfajl _1alzoqnp _xmo1idpf _u70eidpf _1m1jidpf _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3ckbl _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hau12gs _7c6pj39m _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", !hasIcon && "_1whxutpp _1b0jutpp", props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && "_122m1aok", fg('platform_editor_nested_dnd_styles_changes') && "_9dunutpp _pzbautpp", "_1wvnia51", className]),
|
|
38
|
+
style: {
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- intentional: custom panel background is dynamic via CSS variable
|
|
40
|
+
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
41
|
+
}
|
|
42
|
+
}), children);
|
|
43
|
+
};
|
|
44
|
+
PanelStyledCompiled.displayName = 'PanelStyledCompiled';
|