@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
|
@@ -1,45 +1,16 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
1
|
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
15
|
-
'& + *': {
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
17
|
-
marginTop: '0 !important'
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
var multipleWrappedImagesStyle = css({
|
|
21
|
-
// Given the first wrapped mediaSingle has 0 marginTop (see clearNextSiblingMarginTopStyle),
|
|
22
|
-
// update all wrapped mediaSingle inside layout to have 0 margin top unless they don't have sibling wrapped mediaSingle
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
24
|
-
'& [class*="image-wrap-"] + [class*="image-wrap-"], & [class*="image-wrap-"]:has( + [class*="image-wrap-"])': {
|
|
25
|
-
marginTop: '0'
|
|
26
|
-
}
|
|
27
|
-
});
|
|
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
|
+
var LayoutSectionMigration = componentWithCondition(function () {
|
|
7
|
+
return expValEquals('platform_editor_renderer_static_css', 'isEnabled', true);
|
|
8
|
+
}, LayoutSectionCompiled, LayoutSectionEmotion);
|
|
28
9
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
marginTop: '0 !important'
|
|
33
|
-
}));
|
|
10
|
+
/**
|
|
11
|
+
* Render a layout column in renderer.
|
|
12
|
+
*/
|
|
34
13
|
export default function LayoutSection(props) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"data-column-width": props.width,
|
|
38
|
-
style: {
|
|
39
|
-
flexBasis: "".concat(props.width, "%")
|
|
40
|
-
},
|
|
41
|
-
css: fg('platform_editor_fix_media_in_renderer') && multipleWrappedImagesStyle
|
|
42
|
-
}, jsx(WidthProvider, null, jsx("div", {
|
|
43
|
-
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
44
|
-
}), props.children));
|
|
14
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
15
|
+
return /*#__PURE__*/React.createElement(LayoutSectionMigration, props);
|
|
45
16
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
._1wvnia51 .ak-editor-panel__content .ak-editor-panel{border:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
3
|
+
._imyb1bbz.ak-editor-panel{margin:var(--_15dzi2n)}
|
|
4
|
+
._lklzfajl.ak-editor-panel{border-radius:var(--ds-radius-small,3px)}._11k7idpf.ak-editor-panel .ak-editor-panel__content{margin-right:0}
|
|
5
|
+
._11wb1ejb.ak-editor-panel .ak-editor-panel__icon{width:var(--ds-space-300,24px)}
|
|
6
|
+
._122m1aok.ak-editor-panel[data-panel-type=custom]{background-color:var(--ak-renderer-panel-custom-bg-color)}
|
|
7
|
+
._13n84jg8.ak-editor-panel{align-items:normal}
|
|
8
|
+
._1554u2gc.ak-editor-panel{padding-top:var(--ds-space-100,8px)}
|
|
9
|
+
._15sp1vk5.ak-editor-panel[data-panel-type=error]{background-color:var(--ds-background-accent-red-subtlest,#ffeceb)}
|
|
10
|
+
._18w0h2mm.ak-editor-panel{position:relative}
|
|
11
|
+
._18y8qm1h.ak-editor-panel[data-panel-type=note] .ak-editor-panel__icon{color:var(--ds-icon-discovery,#af59e1)}
|
|
12
|
+
._19agidpf.ak-editor-panel .ak-editor-panel__content{flex-shrink:0}
|
|
13
|
+
._19s71txw.ak-editor-panel{display:flex}
|
|
14
|
+
._1a3fnkob.ak-editor-panel .ak-editor-panel__icon>span{vertical-align:middle}
|
|
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
|
+
._1hauowts.ak-editor-panel .ak-editor-panel__icon .emoji-common-emoji-sprite{vertical-align:var(--_qwtrmr)}
|
|
23
|
+
._1it3jmsf.ak-editor-panel{min-width:var(--_1jw427p)}
|
|
24
|
+
._1l9midpf.ak-editor-panel .ak-editor-panel__icon{flex-shrink:0}
|
|
25
|
+
._1n3wglyw.ak-editor-panel .ak-editor-panel__icon{-ms-user-select:none}
|
|
26
|
+
._1oah1ntv.ak-editor-panel .ak-editor-panel__icon{box-sizing:content-box}
|
|
27
|
+
._1pciu2gc.ak-editor-panel .ak-editor-panel__icon{padding-right:var(--ds-space-100,8px)}
|
|
28
|
+
._1q6xf1ug.ak-editor-panel .ak-editor-panel__content{flex-basis:0%}
|
|
29
|
+
._1udservl.ak-editor-panel[data-panel-type=warning] .ak-editor-panel__icon{color:var(--ds-icon-warning,#e06c00)}
|
|
30
|
+
._1uvd116y.ak-editor-panel .ak-editor-panel__icon>span{display:inline-flex}
|
|
31
|
+
._1v1c1ejb.ak-editor-panel .ak-editor-panel__icon{height:var(--ds-space-300,24px)}
|
|
32
|
+
._1w22u2gc.ak-editor-panel{padding-bottom:var(--ds-space-100,8px)}
|
|
33
|
+
._1whxutpp.ak-editor-panel[data-panel-type=custom]{padding-left:var(--ds-space-150,9pt)}
|
|
34
|
+
._1yw1vq3b.ak-editor-panel .ak-editor-panel__icon{margin-top:.1em}
|
|
35
|
+
._50vakb7n.ak-editor-panel .ak-editor-panel__content{flex-grow:1}
|
|
36
|
+
._5zphglyw.ak-editor-panel .ak-editor-panel__icon{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
37
|
+
._66ohu2gc.ak-editor-panel{padding-left:var(--ds-space-100,8px)}
|
|
38
|
+
._6qwr1hna.ak-editor-panel{word-break:break-word}
|
|
39
|
+
._7c6p1t9x.ak-editor-panel .ak-editor-panel__icon .emoji-common-emoji-image{vertical-align:var(--_1glv3p1)}
|
|
40
|
+
._9dunutpp.ak-editor-panel__no-icon{padding-left:var(--ds-space-150,9pt)}
|
|
41
|
+
._e5ovn729.ak-editor-panel[data-panel-type=tip]{background-color:var(--ds-background-accent-green-subtlest,#dcfff1)}
|
|
42
|
+
._fc9iidpf.ak-editor-panel .ak-editor-panel__content{min-width:0}
|
|
43
|
+
._g8a34pcx.ak-editor-panel[data-panel-type=tip] .ak-editor-panel__icon{color:var(--ds-icon-success,#6a9a23)}
|
|
44
|
+
._gb1eidpf.ak-editor-panel .ak-editor-panel__content{margin-left:0}
|
|
45
|
+
._gt7x4pcx.ak-editor-panel[data-panel-type=success] .ak-editor-panel__icon{color:var(--ds-icon-success,#6a9a23)}
|
|
46
|
+
._iqv91kw7.ak-editor-panel{color:inherit}
|
|
47
|
+
._jde2v77o.ak-editor-panel .ak-editor-panel__content{margin-top:var(--ds-space-025,2px)}
|
|
48
|
+
._nlelp2ly.ak-editor-panel[data-panel-type=note]{background-color:var(--ds-background-accent-purple-subtlest,#f8eefe)}
|
|
49
|
+
._pzbautpp.ak-editor-panel__no-icon{padding-right:var(--ds-space-150,9pt)}
|
|
50
|
+
._s4ldn729.ak-editor-panel[data-panel-type=success]{background-color:var(--ds-background-accent-green-subtlest,#dcfff1)}
|
|
51
|
+
._ujht1s93.ak-editor-panel{background-color:var(--ds-background-accent-blue-subtlest,#e9f2fe)}
|
|
52
|
+
._wz94glyw.ak-editor-panel .ak-editor-panel__icon{-moz-user-select:none}
|
|
53
|
+
._zs6jglyw.ak-editor-panel .ak-editor-panel__icon{-webkit-user-select:none}
|
|
54
|
+
@-moz-document url-prefix(){._udsa1o8l.ak-editor-panel .ak-editor-panel__icon .emoji-common-emoji-image img{display:inline-block}}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* panel-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["backgroundColor", "children", "className", "hasIcon"];
|
|
6
|
+
import "./panel-compiled.compiled.css";
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
/**
|
|
11
|
+
* Compiled branch of the `platform_editor_static_css` experiment.
|
|
12
|
+
* Used via `componentWithCondition` in `panel.tsx`.
|
|
13
|
+
*
|
|
14
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { PanelType } from '@atlaskit/adf-schema';
|
|
18
|
+
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
19
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
+
// New custom icons are a little smaller than predefined icons.
|
|
22
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
23
|
+
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
|
|
24
|
+
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
25
|
+
var blockNodesVerticalMargin = '0.75rem';
|
|
26
|
+
var akEditorTableCellMinWidth = 48;
|
|
27
|
+
var panelBaseStyles = null;
|
|
28
|
+
var panelHasNoIconStyles = null;
|
|
29
|
+
var panelNestedIconStyles = null;
|
|
30
|
+
var nestedPanelStyles = null;
|
|
31
|
+
var panelCustomBackground = null;
|
|
32
|
+
export var PanelStyledCompiled = function PanelStyledCompiled(_ref) {
|
|
33
|
+
var backgroundColor = _ref.backgroundColor,
|
|
34
|
+
children = _ref.children,
|
|
35
|
+
className = _ref.className,
|
|
36
|
+
hasIcon = _ref.hasIcon,
|
|
37
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
38
|
+
var customBackgroundColor = backgroundColor ? hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor : undefined;
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- intentional: preserve existing PanelSharedCssClassName.prefix class
|
|
41
|
+
className: ax(["_lklzfajl _imyb1bbz _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3jmsf _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hauowts _7c6p1t9x _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]),
|
|
42
|
+
style: _objectSpread(_objectSpread({}, {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- intentional: custom panel background is dynamic via CSS variable
|
|
44
|
+
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
45
|
+
}), {}, {
|
|
46
|
+
"--_15dzi2n": ix("".concat(blockNodesVerticalMargin, " 0 0")),
|
|
47
|
+
"--_1jw427p": ix("".concat(akEditorTableCellMinWidth, "px")),
|
|
48
|
+
"--_qwtrmr": ix("".concat(panelEmojiSpriteVerticalAlignment, "px")),
|
|
49
|
+
"--_1glv3p1": ix("".concat(panelEmojiImageVerticalAlignment, "px"))
|
|
50
|
+
})
|
|
51
|
+
}), children);
|
|
52
|
+
};
|
|
53
|
+
PanelStyledCompiled.displayName = 'PanelStyledCompiled';
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["backgroundColor", "hasIcon"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Emotion branch of the `platform_editor_static_css` experiment.
|
|
10
|
+
* Used via `componentWithCondition` in `panel.tsx`.
|
|
11
|
+
*
|
|
12
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
13
|
+
*/
|
|
14
|
+
import React from 'react';
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
17
|
+
import { css, jsx } from '@emotion/react';
|
|
18
|
+
import { PanelType } from '@atlaskit/adf-schema';
|
|
19
|
+
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
20
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
+
// New custom icons are a little smaller than predefined icons.
|
|
23
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
24
|
+
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
|
|
25
|
+
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
26
|
+
var blockNodesVerticalMargin = '0.75rem';
|
|
27
|
+
var akEditorTableCellMinWidth = 48;
|
|
28
|
+
var panelBaseStyles = css({
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
|
+
'&.ak-editor-panel': {
|
|
31
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
32
|
+
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
33
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
34
|
+
paddingRight: "var(--ds-space-200, 16px)",
|
|
35
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
36
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
37
|
+
minWidth: "".concat(akEditorTableCellMinWidth, "px"),
|
|
38
|
+
display: 'flex',
|
|
39
|
+
position: 'relative',
|
|
40
|
+
alignItems: 'normal',
|
|
41
|
+
wordBreak: 'break-word',
|
|
42
|
+
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
43
|
+
color: 'inherit',
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
|
+
'.ak-editor-panel__icon': {
|
|
46
|
+
flexShrink: 0,
|
|
47
|
+
height: "var(--ds-space-300, 24px)",
|
|
48
|
+
width: "var(--ds-space-300, 24px)",
|
|
49
|
+
boxSizing: 'content-box',
|
|
50
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
51
|
+
textAlign: 'center',
|
|
52
|
+
userSelect: 'none',
|
|
53
|
+
MozUserSelect: 'none',
|
|
54
|
+
WebkitUserSelect: 'none',
|
|
55
|
+
MsUserSelect: 'none',
|
|
56
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
57
|
+
marginTop: '0.1em',
|
|
58
|
+
color: "var(--ds-icon-information, #357DE8)",
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'> span': {
|
|
61
|
+
verticalAlign: 'middle',
|
|
62
|
+
display: 'inline-flex'
|
|
63
|
+
},
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
'.emoji-common-emoji-sprite': {
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
67
|
+
verticalAlign: "".concat(panelEmojiSpriteVerticalAlignment, "px")
|
|
68
|
+
},
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
|
+
'.emoji-common-emoji-image': {
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
72
|
+
verticalAlign: "".concat(panelEmojiImageVerticalAlignment, "px"),
|
|
73
|
+
// Vertical align only works for inline-block elements in Firefox
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
75
|
+
'@-moz-document url-prefix()': {
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
+
img: {
|
|
78
|
+
display: 'inline-block'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
84
|
+
'.ak-editor-panel__content': {
|
|
85
|
+
margin: "var(--ds-space-025, 2px)".concat(" 0 ", "var(--ds-space-025, 2px)"),
|
|
86
|
+
flex: '1 0 0',
|
|
87
|
+
minWidth: 0
|
|
88
|
+
},
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
90
|
+
'&[data-panel-type="note"]': {
|
|
91
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F8EEFE)",
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
93
|
+
'.ak-editor-panel__icon': {
|
|
94
|
+
color: "var(--ds-icon-discovery, #AF59E1)"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
// 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
|
|
98
|
+
'&[data-panel-type="tip"]': {
|
|
99
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
101
|
+
'.ak-editor-panel__icon': {
|
|
102
|
+
color: "var(--ds-icon-success, #6A9A23)"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
106
|
+
'&[data-panel-type="warning"]': {
|
|
107
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FEF7C8)",
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
109
|
+
'.ak-editor-panel__icon': {
|
|
110
|
+
color: "var(--ds-icon-warning, #E06C00)"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
114
|
+
'&[data-panel-type="error"]': {
|
|
115
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
117
|
+
'.ak-editor-panel__icon': {
|
|
118
|
+
color: "var(--ds-icon-danger, #C9372C)"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
122
|
+
'&[data-panel-type="success"]': {
|
|
123
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'.ak-editor-panel__icon': {
|
|
126
|
+
color: "var(--ds-icon-success, #6A9A23)"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
var panelHasNoIconStyles = css({
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
133
|
+
'&.ak-editor-panel': {
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
135
|
+
'&[data-panel-type="custom"]': {
|
|
136
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
137
|
+
paddingRight: "var(--ds-space-150, 12px)"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
var panelNestedIconStyles = css({
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
143
|
+
'&.ak-editor-panel__no-icon': {
|
|
144
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
145
|
+
paddingRight: "var(--ds-space-150, 12px)"
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
var nestedPanelStyles = css({
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
150
|
+
'.ak-editor-panel__content .ak-editor-panel': {
|
|
151
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)")
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
var panelCustomBackground = css({
|
|
155
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
156
|
+
'&.ak-editor-panel': {
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
158
|
+
'&[data-panel-type="custom"]': {
|
|
159
|
+
backgroundColor: 'var(--ak-renderer-panel-custom-bg-color)'
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
export var PanelStyledEmotion = function PanelStyledEmotion(_ref) {
|
|
164
|
+
var backgroundColor = _ref.backgroundColor,
|
|
165
|
+
hasIcon = _ref.hasIcon,
|
|
166
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
167
|
+
var customBackgroundColor = backgroundColor ? hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor : undefined;
|
|
168
|
+
return jsx("div", _extends({
|
|
169
|
+
style:
|
|
170
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
171
|
+
{
|
|
172
|
+
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
173
|
+
},
|
|
174
|
+
css: [panelBaseStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && panelCustomBackground, fg('platform_editor_nested_dnd_styles_changes') && panelNestedIconStyles, nestedPanelStyles]
|
|
175
|
+
// Ignored via go/ees005
|
|
176
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
177
|
+
}, props), props.children);
|
|
178
|
+
};
|
|
179
|
+
PanelStyledEmotion.displayName = 'PanelStyledEmotion';
|
|
@@ -1,184 +1,14 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["backgroundColor", "hasIcon"];
|
|
4
|
-
/**
|
|
5
|
-
* @jsxRuntime classic
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
8
1
|
import React from 'react';
|
|
9
|
-
/* 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 */
|
|
10
|
-
import { jsx, css } from '@emotion/react';
|
|
11
|
-
import TipIcon from '@atlaskit/icon/core/lightbulb';
|
|
12
2
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
3
|
+
import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
|
|
13
4
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
14
|
-
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
15
5
|
import EmojiIcon from '@atlaskit/icon/core/emoji';
|
|
6
|
+
import TipIcon from '@atlaskit/icon/core/lightbulb';
|
|
7
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
9
|
import EmojiItem from './emoji';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
-
// New custom icons are a little smaller than predefined icons.
|
|
21
|
-
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
22
|
-
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
|
|
23
|
-
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
24
|
-
var blockNodesVerticalMargin = '0.75rem';
|
|
25
|
-
var akEditorTableCellMinWidth = 48;
|
|
26
|
-
var panelBaseStyles = css({
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
28
|
-
'&.ak-editor-panel': {
|
|
29
|
-
borderRadius: "var(--ds-radius-small, 3px)",
|
|
30
|
-
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
31
|
-
paddingTop: "var(--ds-space-100, 8px)",
|
|
32
|
-
paddingRight: "var(--ds-space-200, 16px)",
|
|
33
|
-
paddingBottom: "var(--ds-space-100, 8px)",
|
|
34
|
-
paddingLeft: "var(--ds-space-100, 8px)",
|
|
35
|
-
minWidth: "".concat(akEditorTableCellMinWidth, "px"),
|
|
36
|
-
display: 'flex',
|
|
37
|
-
position: 'relative',
|
|
38
|
-
alignItems: 'normal',
|
|
39
|
-
wordBreak: 'break-word',
|
|
40
|
-
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
41
|
-
color: 'inherit',
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
|
-
'.ak-editor-panel__icon': {
|
|
44
|
-
flexShrink: 0,
|
|
45
|
-
height: "var(--ds-space-300, 24px)",
|
|
46
|
-
width: "var(--ds-space-300, 24px)",
|
|
47
|
-
boxSizing: 'content-box',
|
|
48
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
49
|
-
textAlign: 'center',
|
|
50
|
-
userSelect: 'none',
|
|
51
|
-
MozUserSelect: 'none',
|
|
52
|
-
WebkitUserSelect: 'none',
|
|
53
|
-
MsUserSelect: 'none',
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
55
|
-
marginTop: '0.1em',
|
|
56
|
-
color: "var(--ds-icon-information, #357DE8)",
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
-
'> span': {
|
|
59
|
-
verticalAlign: 'middle',
|
|
60
|
-
display: 'inline-flex'
|
|
61
|
-
},
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
63
|
-
'.emoji-common-emoji-sprite': {
|
|
64
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
65
|
-
verticalAlign: "".concat(panelEmojiSpriteVerticalAlignment, "px")
|
|
66
|
-
},
|
|
67
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
|
-
'.emoji-common-emoji-image': {
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
70
|
-
verticalAlign: "".concat(panelEmojiImageVerticalAlignment, "px"),
|
|
71
|
-
// Vertical align only works for inline-block elements in Firefox
|
|
72
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
73
|
-
'@-moz-document url-prefix()': {
|
|
74
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
75
|
-
img: {
|
|
76
|
-
display: 'inline-block'
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
82
|
-
'.ak-editor-panel__content': {
|
|
83
|
-
margin: "var(--ds-space-025, 2px)".concat(" 0 ", "var(--ds-space-025, 2px)"),
|
|
84
|
-
flex: '1 0 0',
|
|
85
|
-
/*
|
|
86
|
-
https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
|
|
87
|
-
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.
|
|
88
|
-
*/
|
|
89
|
-
minWidth: 0
|
|
90
|
-
},
|
|
91
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
92
|
-
'&[data-panel-type="note"]': {
|
|
93
|
-
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F8EEFE)",
|
|
94
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
95
|
-
'.ak-editor-panel__icon': {
|
|
96
|
-
color: "var(--ds-icon-discovery, #AF59E1)"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
// 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
|
|
100
|
-
'&[data-panel-type="tip"]': {
|
|
101
|
-
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
102
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
103
|
-
'.ak-editor-panel__icon': {
|
|
104
|
-
color: "var(--ds-icon-success, #6A9A23)"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
// 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
|
|
108
|
-
'&[data-panel-type="warning"]': {
|
|
109
|
-
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FEF7C8)",
|
|
110
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
111
|
-
'.ak-editor-panel__icon': {
|
|
112
|
-
color: "var(--ds-icon-warning, #E06C00)"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
// 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
|
|
116
|
-
'&[data-panel-type="error"]': {
|
|
117
|
-
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
118
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
119
|
-
'.ak-editor-panel__icon': {
|
|
120
|
-
color: "var(--ds-icon-danger, #C9372C)"
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
// 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
|
|
124
|
-
'&[data-panel-type="success"]': {
|
|
125
|
-
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
126
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
127
|
-
'.ak-editor-panel__icon': {
|
|
128
|
-
color: "var(--ds-icon-success, #6A9A23)"
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
var panelHasNoIconStyles = css({
|
|
134
|
-
// 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
|
|
135
|
-
'&.ak-editor-panel': {
|
|
136
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
137
|
-
'&[data-panel-type="custom"]': {
|
|
138
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
139
|
-
paddingRight: "var(--ds-space-150, 12px)"
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
var panelNestedIconStyles = css({
|
|
144
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
145
|
-
'&.ak-editor-panel__no-icon': {
|
|
146
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
147
|
-
paddingRight: "var(--ds-space-150, 12px)"
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
var nestedPanelStyles = css({
|
|
151
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
152
|
-
'.ak-editor-panel__content .ak-editor-panel': {
|
|
153
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)")
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
var panelCustomBackground = css({
|
|
157
|
-
// 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
|
|
158
|
-
'&.ak-editor-panel': {
|
|
159
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
160
|
-
'&[data-panel-type="custom"]': {
|
|
161
|
-
backgroundColor: 'var(--ak-renderer-panel-custom-bg-color)'
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
var PanelStyled = function PanelStyled(_ref) {
|
|
166
|
-
var backgroundColor = _ref.backgroundColor,
|
|
167
|
-
hasIcon = _ref.hasIcon,
|
|
168
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
169
|
-
var customBackgroundColor = backgroundColor ? hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor : undefined;
|
|
170
|
-
return jsx("div", _extends({
|
|
171
|
-
style:
|
|
172
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
173
|
-
{
|
|
174
|
-
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
175
|
-
},
|
|
176
|
-
css: [panelBaseStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && panelCustomBackground, fg('platform_editor_nested_dnd_styles_changes') && panelNestedIconStyles, nestedPanelStyles]
|
|
177
|
-
// Ignored via go/ees005
|
|
178
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
179
|
-
}, props), props.children);
|
|
180
|
-
};
|
|
181
|
-
PanelStyled.displayName = 'PanelStyled';
|
|
10
|
+
import { PanelStyledCompiled } from './panel-compiled';
|
|
11
|
+
import { PanelStyledEmotion } from './panel-emotion';
|
|
182
12
|
var panelIcons = {
|
|
183
13
|
info: PanelInfoIcon,
|
|
184
14
|
success: PanelSuccessIcon,
|
|
@@ -188,6 +18,9 @@ var panelIcons = {
|
|
|
188
18
|
error: PanelErrorIcon,
|
|
189
19
|
custom: EmojiIcon
|
|
190
20
|
};
|
|
21
|
+
var PanelStyledMigration = componentWithCondition(function () {
|
|
22
|
+
return expValEquals('platform_editor_renderer_static_css', 'isEnabled', true);
|
|
23
|
+
}, PanelStyledCompiled, PanelStyledEmotion);
|
|
191
24
|
var Panel = function Panel(props) {
|
|
192
25
|
var allowCustomPanels = props.allowCustomPanels,
|
|
193
26
|
type = props.panelType,
|
|
@@ -204,7 +37,7 @@ var Panel = function Panel(props) {
|
|
|
204
37
|
var getIcon = function getIcon() {
|
|
205
38
|
if (panelType === PanelType.CUSTOM) {
|
|
206
39
|
if (panelIcon && providers) {
|
|
207
|
-
return
|
|
40
|
+
return /*#__PURE__*/React.createElement(EmojiItem, {
|
|
208
41
|
id: panelIconId,
|
|
209
42
|
text: panelIconText,
|
|
210
43
|
shortName: panelIcon,
|
|
@@ -214,7 +47,7 @@ var Panel = function Panel(props) {
|
|
|
214
47
|
return null;
|
|
215
48
|
}
|
|
216
49
|
var Icon = panelIcons[panelType];
|
|
217
|
-
return
|
|
50
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
218
51
|
label: "".concat(panelType, " panel")
|
|
219
52
|
});
|
|
220
53
|
};
|
|
@@ -222,12 +55,12 @@ var Panel = function Panel(props) {
|
|
|
222
55
|
var renderIcon = function renderIcon() {
|
|
223
56
|
if (icon) {
|
|
224
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
225
|
-
return
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
226
59
|
className: PanelSharedCssClassName.icon
|
|
227
60
|
}, icon);
|
|
228
61
|
}
|
|
229
62
|
};
|
|
230
|
-
return
|
|
63
|
+
return /*#__PURE__*/React.createElement(PanelStyledMigration
|
|
231
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
232
65
|
, {
|
|
233
66
|
className: PanelSharedCssClassName.prefix,
|
|
@@ -239,7 +72,7 @@ var Panel = function Panel(props) {
|
|
|
239
72
|
"data-panel-icon-text": panelIconText,
|
|
240
73
|
backgroundColor: panelColor,
|
|
241
74
|
hasIcon: Boolean(icon)
|
|
242
|
-
}, renderIcon(),
|
|
75
|
+
}, renderIcon(), /*#__PURE__*/React.createElement("div", {
|
|
243
76
|
className: PanelSharedCssClassName.content
|
|
244
77
|
}, children));
|
|
245
78
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Compiled branch of the `platform_editor_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `link.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import type { ComponentProps } from 'react';
|
|
12
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
13
|
+
export declare const LinkUrlCompiled: (props: ComponentProps<typeof LinkUrl>) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion branch of the `platform_editor_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `link.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import type { ComponentProps } from 'react';
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
13
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
14
|
+
export declare const LinkUrlEmotion: (props: ComponentProps<typeof LinkUrl>) => jsx.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { LinkAttributes } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { MarkProps } from '../types';
|
|
4
4
|
interface LinkProps extends LinkAttributes {
|
|
@@ -6,5 +6,8 @@ interface LinkProps extends LinkAttributes {
|
|
|
6
6
|
onSetLinkTarget?: (url: string) => '_blank' | undefined;
|
|
7
7
|
target?: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Render an ADF link mark in renderer.
|
|
11
|
+
*/
|
|
12
|
+
export default function Link(props: MarkProps<LinkProps>): React.JSX.Element;
|
|
10
13
|
export {};
|
|
@@ -65,7 +65,7 @@ declare const EmbedCard: React.ComponentType<{
|
|
|
65
65
|
isInsideOfBlockNode?: boolean;
|
|
66
66
|
isInsideOfInlineExtension?: boolean;
|
|
67
67
|
layout: RichMediaLayout;
|
|
68
|
-
onSetLinkTarget?: (url: string) =>
|
|
68
|
+
onSetLinkTarget?: (url: string) => '_blank' | undefined;
|
|
69
69
|
originalHeight?: number;
|
|
70
70
|
originalWidth?: number;
|
|
71
71
|
portal?: HTMLElement;
|
|
@@ -82,7 +82,7 @@ declare const BlockCard: React.ComponentType<{
|
|
|
82
82
|
isNodeNested?: boolean;
|
|
83
83
|
layout?: string;
|
|
84
84
|
localId?: string;
|
|
85
|
-
onSetLinkTarget?: (url: string) =>
|
|
85
|
+
onSetLinkTarget?: (url: string) => '_blank' | undefined;
|
|
86
86
|
portal?: HTMLElement;
|
|
87
87
|
rendererAppearance?: RendererAppearance;
|
|
88
88
|
smartLinks?: SmartLinksOptions;
|