@atlaskit/renderer 114.3.0 → 114.3.2
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 +12 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/react/marks/alignment.js +13 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +36 -13
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +165 -5
- package/dist/cjs/react/nodes/layoutColumn.js +18 -1
- package/dist/cjs/react/nodes/media/index.js +75 -32
- package/dist/cjs/react/nodes/mediaSingle/index.js +9 -2
- package/dist/cjs/react/nodes/multiBodiedExtension.js +83 -4
- package/dist/cjs/react/nodes/panel.js +162 -2
- package/dist/cjs/react/nodes/table/sticky.js +51 -1
- package/dist/cjs/ui/Expand.js +124 -8
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/draft/component.js +27 -7
- package/dist/cjs/ui/annotations/element/mark.js +85 -6
- package/dist/es2019/react/marks/alignment.js +13 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +69 -13
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +194 -4
- package/dist/es2019/react/nodes/layoutColumn.js +27 -1
- package/dist/es2019/react/nodes/media/index.js +49 -15
- package/dist/es2019/react/nodes/mediaSingle/index.js +9 -2
- package/dist/es2019/react/nodes/multiBodiedExtension.js +83 -4
- package/dist/es2019/react/nodes/panel.js +162 -2
- package/dist/es2019/react/nodes/table/sticky.js +64 -1
- package/dist/es2019/ui/Expand.js +125 -8
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/draft/component.js +28 -7
- package/dist/es2019/ui/annotations/element/mark.js +96 -6
- package/dist/esm/react/marks/alignment.js +13 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +36 -13
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +164 -4
- package/dist/esm/react/nodes/layoutColumn.js +18 -1
- package/dist/esm/react/nodes/media/index.js +75 -32
- package/dist/esm/react/nodes/mediaSingle/index.js +9 -2
- package/dist/esm/react/nodes/multiBodiedExtension.js +83 -4
- package/dist/esm/react/nodes/panel.js +163 -3
- package/dist/esm/react/nodes/table/sticky.js +51 -1
- package/dist/esm/ui/Expand.js +125 -9
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/draft/component.js +28 -7
- package/dist/esm/ui/annotations/element/mark.js +85 -7
- package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +5 -1
- package/dist/types/ui/annotations/draft/component.d.ts +0 -4
- package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +5 -1
- package/dist/types-ts4.5/ui/annotations/draft/component.d.ts +0 -4
- package/package.json +5 -4
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -24
- package/dist/es2019/react/nodes/mediaSingle/styles.js +0 -18
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -18
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +0 -2
- package/dist/types-ts4.5/react/nodes/mediaSingle/styles.d.ts +0 -2
|
@@ -17,6 +17,7 @@ var _consts = require("../../consts");
|
|
|
17
17
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
18
18
|
var _actions = require("./multiBodiedExtension/actions");
|
|
19
19
|
var _context = require("./multiBodiedExtension/context");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _templateObject, _templateObject2, _templateObject3;
|
|
21
22
|
/* eslint-disable @atlaskit/design-system/prefer-primitives, @atlaskit/design-system/consistent-css-prop-usage */
|
|
22
23
|
/**
|
|
@@ -28,10 +29,88 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
28
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
30
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
31
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
31
|
-
var
|
|
32
|
+
var navigationStylesOld = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t", ";\n\tmargin-left: 0 !important;\n\tmargin-right: 0 !important;\n\t.mbe-add-tab-button,\n\t.mbe-remove-tab {\n\t\tdisplay: none;\n\t}\n"])), _ui.sharedMultiBodiedExtensionStyles.mbeNavigation);
|
|
32
33
|
|
|
34
|
+
// localized sharedMultiBodiedExtensionStyles.mbeNavigation in navigationCssExtendedNew
|
|
35
|
+
var navigationStylesNew = (0, _react.css)({
|
|
36
|
+
borderTopLeftRadius: "var(--ds-border-radius, 3px)",
|
|
37
|
+
borderTopRightRadius: "var(--ds-border-radius, 3px)",
|
|
38
|
+
userSelect: 'none',
|
|
39
|
+
WebkitUserModify: 'read-only',
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
41
|
+
borderBottom: 'none !important',
|
|
42
|
+
background: "var(--ds-surface, white)",
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
|
+
'&.remove-margins': {
|
|
45
|
+
margin: "var(--ds-space-negative-100, -8px)"
|
|
46
|
+
},
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
48
|
+
'&.remove-border': {
|
|
49
|
+
border: 'none'
|
|
50
|
+
},
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
52
|
+
marginLeft: '0 !important',
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
54
|
+
marginRight: '0 !important',
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
56
|
+
'.mbe-add-tab-button, .mbe-remove-tab': {
|
|
57
|
+
display: 'none'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
62
|
+
var containerStylesOld = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t", ";\n\t.ak-renderer-extension {\n\t\tmargin-top: 0 !important;\n\t}\n\n\t[data-layout='full-width'],\n\t[data-layout='wide'] {\n\t\t.multiBodiedExtension-navigation {\n\t\t\tborder-right: 3px solid ", " !important;\n\t\t}\n\t}\n"])), _ui.sharedMultiBodiedExtensionStyles.mbeExtensionContainer, "var(--ds-border, ".concat(_colors.N40, ")"));
|
|
63
|
+
|
|
64
|
+
// localized sharedMultiBodiedExtensionStyles.mbeExtensionContainer in containerStylesNew
|
|
33
65
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
34
|
-
var
|
|
66
|
+
var containerStylesNew = (0, _react.css)({
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
68
|
+
background: 'transparent !important',
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
70
|
+
'padding:': {
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
72
|
+
left: "var(--ds-space-100, 8px)".concat(" !important"),
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
74
|
+
right: "var(--ds-space-100, 8px)".concat(" !important")
|
|
75
|
+
},
|
|
76
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
78
|
+
'&.remove-padding': {
|
|
79
|
+
paddingBottom: 0
|
|
80
|
+
},
|
|
81
|
+
position: 'relative',
|
|
82
|
+
verticalAlign: 'middle',
|
|
83
|
+
cursor: 'pointer',
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
85
|
+
'.multiBodiedExtension-handler-result': {
|
|
86
|
+
marginLeft: "var(--ds-space-100, 8px)"
|
|
87
|
+
},
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
89
|
+
".multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true'], .multiBodiedExtension--frames > [data-extension-frame='true']": {
|
|
90
|
+
display: 'none',
|
|
91
|
+
background: "var(--ds-surface, white)"
|
|
92
|
+
},
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
94
|
+
'.multiBodiedExtension-content-dom-wrapper, .multiBodiedExtension--frames': {
|
|
95
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
96
|
+
"[data-extension-frame='true'] > :not(style):first-child, [data-extension-frame='true'] > style:first-child + *": {
|
|
97
|
+
marginTop: 0
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
101
|
+
'.ak-renderer-extension': {
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
103
|
+
marginTop: '0 !important'
|
|
104
|
+
},
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
106
|
+
'[data-layout="full-width"], [data-layout="wide"]': {
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
108
|
+
'.multiBodiedExtension-navigation': {
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
110
|
+
borderRight: "3px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), " !important")
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
35
114
|
var MultiBodiedExtensionChildrenContainer = function MultiBodiedExtensionChildrenContainer(_ref) {
|
|
36
115
|
var children = _ref.children;
|
|
37
116
|
return (0, _react.jsx)("article", {
|
|
@@ -46,7 +125,7 @@ var MultiBodiedExtensionNavigation = function MultiBodiedExtensionNavigation(_re
|
|
|
46
125
|
return (0, _react.jsx)("nav", {
|
|
47
126
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
127
|
className: "multiBodiedExtension-navigation",
|
|
49
|
-
css:
|
|
128
|
+
css: (0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer') ? navigationStylesNew : navigationStylesOld,
|
|
50
129
|
"data-testid": "multiBodiedExtension-navigation"
|
|
51
130
|
}, children);
|
|
52
131
|
};
|
|
@@ -150,7 +229,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
150
229
|
return (0, _react.jsx)("section", {
|
|
151
230
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
152
231
|
className: "multiBodiedExtension--container",
|
|
153
|
-
css: [
|
|
232
|
+
css: [(0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer') ? containerStylesNew : containerStylesOld, containerActiveFrameStyles],
|
|
154
233
|
"data-testid": "multiBodiedExtension--container",
|
|
155
234
|
"data-active-child-index": activeChildIndex,
|
|
156
235
|
"data-layout": layout
|
|
@@ -18,14 +18,157 @@ var _emoji = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/emoji")
|
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
19
|
var _emoji2 = _interopRequireDefault(require("./emoji"));
|
|
20
20
|
var _icons = require("@atlaskit/editor-common/icons");
|
|
21
|
+
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
22
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
23
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
24
|
var _templateObject, _templateObject2;
|
|
22
|
-
var _excluded = ["backgroundColor", "hasIcon"]
|
|
25
|
+
var _excluded = ["backgroundColor", "hasIcon"],
|
|
26
|
+
_excluded2 = ["backgroundColor", "hasIcon"];
|
|
23
27
|
/**
|
|
24
28
|
* @jsxRuntime classic
|
|
25
29
|
* @jsx jsx
|
|
26
30
|
*/
|
|
27
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
28
|
-
|
|
32
|
+
// New custom icons are a little smaller than predefined icons.
|
|
33
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
34
|
+
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - _consts.akEditorCustomIconSize) / 2;
|
|
35
|
+
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
36
|
+
var blockNodesVerticalMargin = '0.75rem';
|
|
37
|
+
var akEditorTableCellMinWidth = 48;
|
|
38
|
+
var panelBaseStyles = (0, _react2.css)({
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
40
|
+
'&.ak-editor-panel': {
|
|
41
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
42
|
+
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
43
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
44
|
+
paddingRight: "var(--ds-space-200, 16px)",
|
|
45
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
46
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
47
|
+
minWidth: "".concat(akEditorTableCellMinWidth, "px"),
|
|
48
|
+
display: 'flex',
|
|
49
|
+
position: 'relative',
|
|
50
|
+
alignItems: 'normal',
|
|
51
|
+
wordBreak: 'break-word',
|
|
52
|
+
backgroundColor: "var(--ds-background-accent-blue-subtlest, #DEEBFF)",
|
|
53
|
+
color: 'inherit',
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
|
+
'.ak-editor-panel__icon': {
|
|
56
|
+
flexShrink: 0,
|
|
57
|
+
height: "var(--ds-space-300, 24px)",
|
|
58
|
+
width: "var(--ds-space-300, 24px)",
|
|
59
|
+
boxSizing: 'content-box',
|
|
60
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
61
|
+
textAlign: 'center',
|
|
62
|
+
userSelect: 'none',
|
|
63
|
+
MozUserSelect: 'none',
|
|
64
|
+
WebkitUserSelect: 'none',
|
|
65
|
+
MsUserSelect: 'none',
|
|
66
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
67
|
+
marginTop: '0.1em',
|
|
68
|
+
color: "var(--ds-icon-information, #1D7AFC)",
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
|
+
'> span': {
|
|
71
|
+
verticalAlign: 'middle',
|
|
72
|
+
display: 'inline-flex'
|
|
73
|
+
},
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
75
|
+
'.emoji-common-emoji-sprite': {
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
77
|
+
verticalAlign: "".concat(panelEmojiSpriteVerticalAlignment, "px")
|
|
78
|
+
},
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
+
'.emoji-common-emoji-image': {
|
|
81
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
82
|
+
verticalAlign: "".concat(panelEmojiImageVerticalAlignment, "px"),
|
|
83
|
+
// Vertical align only works for inline-block elements in Firefox
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
85
|
+
'@-moz-document url-prefix()': {
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
87
|
+
img: {
|
|
88
|
+
display: 'inline-block'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
94
|
+
'.ak-editor-panel__content': {
|
|
95
|
+
margin: "var(--ds-space-025, 2px)".concat(" 0 ", "var(--ds-space-025, 2px)"),
|
|
96
|
+
flex: '1 0 0',
|
|
97
|
+
/*
|
|
98
|
+
https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
|
|
99
|
+
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.
|
|
100
|
+
*/
|
|
101
|
+
minWidth: 0
|
|
102
|
+
},
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
104
|
+
'&[data-panel-type="note"]': {
|
|
105
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #EAE6FF)",
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
107
|
+
'.ak-editor-panel__icon': {
|
|
108
|
+
color: "var(--ds-icon-discovery, #8270DB)"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// 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
|
|
112
|
+
'&[data-panel-type="tip"]': {
|
|
113
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #E3FCEF)",
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
115
|
+
'.ak-editor-panel__icon': {
|
|
116
|
+
color: "var(--ds-icon-success, #22A06B)"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
// 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
|
|
120
|
+
'&[data-panel-type="warning"]': {
|
|
121
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FFFAE6)",
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
123
|
+
'.ak-editor-panel__icon': {
|
|
124
|
+
color: "var(--ds-icon-warning, #E56910)"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
// 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
|
|
128
|
+
'&[data-panel-type="error"]': {
|
|
129
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFEBE6)",
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
131
|
+
'.ak-editor-panel__icon': {
|
|
132
|
+
color: "var(--ds-icon-danger, #C9372C)"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
// 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
|
|
136
|
+
'&[data-panel-type="success"]': {
|
|
137
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #E3FCEF)",
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
139
|
+
'.ak-editor-panel__icon': {
|
|
140
|
+
color: "var(--ds-icon-success, #22A06B)"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
var panelHasNoIconStyles = (0, _react2.css)({
|
|
146
|
+
// 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
|
|
147
|
+
'&.ak-editor-panel': {
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
149
|
+
'&[data-panel-type="custom"]': {
|
|
150
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
151
|
+
paddingRight: "var(--ds-space-150, 12px)"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
var panelNestedIconStyles = (0, _react2.css)({
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
157
|
+
'&.ak-editor-panel__no-icon': {
|
|
158
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
159
|
+
paddingRight: "var(--ds-space-150, 12px)"
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
var panelCustomBackground = (0, _react2.css)({
|
|
163
|
+
// 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
|
|
164
|
+
'&.ak-editor-panel': {
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
166
|
+
'&[data-panel-type="custom"]': {
|
|
167
|
+
backgroundColor: 'var(--ak-renderer-panel-custom-bg-color)'
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
var PanelStyledOld = function PanelStyledOld(_ref) {
|
|
29
172
|
var backgroundColor = _ref.backgroundColor,
|
|
30
173
|
hasIcon = _ref.hasIcon,
|
|
31
174
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -44,6 +187,23 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
44
187
|
}, props), props.children)
|
|
45
188
|
);
|
|
46
189
|
};
|
|
190
|
+
var PanelStyledNew = function PanelStyledNew(_ref2) {
|
|
191
|
+
var backgroundColor = _ref2.backgroundColor,
|
|
192
|
+
hasIcon = _ref2.hasIcon,
|
|
193
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
194
|
+
var customBackgroundColor = backgroundColor ? (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) : backgroundColor;
|
|
195
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
196
|
+
style:
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
198
|
+
{
|
|
199
|
+
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
200
|
+
},
|
|
201
|
+
css: [panelBaseStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor && panelCustomBackground, (0, _experiments.editorExperiment)('nested-dnd', true) && panelNestedIconStyles]
|
|
202
|
+
// Ignored via go/ees005
|
|
203
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
204
|
+
}, props), props.children);
|
|
205
|
+
};
|
|
206
|
+
var PanelStyled = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', PanelStyledNew, PanelStyledOld);
|
|
47
207
|
PanelStyled.displayName = 'PanelStyled';
|
|
48
208
|
var panelIcons = {
|
|
49
209
|
info: _icons.PanelInfoIcon,
|
|
@@ -16,6 +16,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
var _table = require("./table");
|
|
18
18
|
var _injectProps = require("../../utils/inject-props");
|
|
19
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
19
20
|
/**
|
|
20
21
|
* @jsxRuntime classic
|
|
21
22
|
* @jsx jsx
|
|
@@ -38,6 +39,27 @@ var modeSpecficStyles = {
|
|
|
38
39
|
})
|
|
39
40
|
};
|
|
40
41
|
|
|
42
|
+
// refactored based on fixedTableDivStaticStyles
|
|
43
|
+
// TODO: DSP-4123 - Quality ticket
|
|
44
|
+
var fixedTableDivStaticStylesNew = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
45
|
+
zIndex: 'var(--ak-renderer-sticky-header-zindex)'
|
|
46
|
+
}, "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ", & .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
47
|
+
marginTop: 0,
|
|
48
|
+
marginBottom: 0,
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
50
|
+
tr: {
|
|
51
|
+
background: "var(--ds-surface, white)"
|
|
52
|
+
}
|
|
53
|
+
}), "borderTop", "".concat(tableStickyPadding, "px solid ", "var(--ds-surface, white)")), "background", "var(--ds-surface-overlay, white)"), "boxShadow", "0 6px 4px -4px ".concat("var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"))), "div[data-expanded='false'] &", {
|
|
54
|
+
display: 'none'
|
|
55
|
+
}), "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.right-shadow::after, & .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.left-shadow::before"), {
|
|
56
|
+
top: '0px',
|
|
57
|
+
height: '100%'
|
|
58
|
+
}), "&.fixed-table-div-custom-table-resizing[mode='stick']", {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
60
|
+
zIndex: 'var(--ak-renderer-sticky-header-zindex)'
|
|
61
|
+
}));
|
|
62
|
+
|
|
41
63
|
// TODO: DSP-4123 - Quality ticket
|
|
42
64
|
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, allowTableResizing) {
|
|
43
65
|
var stickyHeaderZIndex;
|
|
@@ -70,7 +92,7 @@ var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, a
|
|
|
70
92
|
zIndex: stickyHeaderZIndex
|
|
71
93
|
}));
|
|
72
94
|
};
|
|
73
|
-
var
|
|
95
|
+
var FixedTableDivOld = function FixedTableDivOld(props) {
|
|
74
96
|
var top = props.top,
|
|
75
97
|
wrapperWidth = props.wrapperWidth,
|
|
76
98
|
mode = props.mode,
|
|
@@ -89,6 +111,34 @@ var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
89
111
|
css: fixedTableCss
|
|
90
112
|
}), props.children);
|
|
91
113
|
};
|
|
114
|
+
var FixedTableDivNew = function FixedTableDivNew(props) {
|
|
115
|
+
var top = props.top,
|
|
116
|
+
wrapperWidth = props.wrapperWidth,
|
|
117
|
+
mode = props.mode,
|
|
118
|
+
allowTableResizing = props.allowTableResizing;
|
|
119
|
+
var stickyHeaderZIndex;
|
|
120
|
+
if (allowTableResizing) {
|
|
121
|
+
stickyHeaderZIndex = 13;
|
|
122
|
+
} else {
|
|
123
|
+
stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
|
|
124
|
+
}
|
|
125
|
+
var attrs = {
|
|
126
|
+
mode: mode
|
|
127
|
+
};
|
|
128
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({}, attrs, {
|
|
129
|
+
"data-testid": "sticky-table-fixed"
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
131
|
+
,
|
|
132
|
+
className: allowTableResizing ? 'fixed-table-div-custom-table-resizing' : '',
|
|
133
|
+
css: [fixedTableDivStaticStylesNew, modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]],
|
|
134
|
+
style: {
|
|
135
|
+
'--ak-renderer-sticky-header-zindex': stickyHeaderZIndex,
|
|
136
|
+
width: "".concat(wrapperWidth, "px"),
|
|
137
|
+
top: top ? "".concat(top, "px") : undefined
|
|
138
|
+
}
|
|
139
|
+
}), props.children);
|
|
140
|
+
};
|
|
141
|
+
var FixedTableDiv = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', FixedTableDivNew, FixedTableDivOld);
|
|
92
142
|
var StickyTable = exports.StickyTable = function StickyTable(_ref) {
|
|
93
143
|
var top = _ref.top,
|
|
94
144
|
left = _ref.left,
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -22,7 +22,9 @@ var _uniqueId2 = _interopRequireDefault(require("lodash/uniqueId"));
|
|
|
22
22
|
var _reactIntlNext = require("react-intl-next");
|
|
23
23
|
var _events = require("../analytics/events");
|
|
24
24
|
var _activeHeaderIdProvider = require("./active-header-id-provider");
|
|
25
|
-
var
|
|
25
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
26
|
+
var _excluded = ["expanded"],
|
|
27
|
+
_excluded2 = ["expanded"];
|
|
26
28
|
var _templateObject, _templateObject2, _templateObject3;
|
|
27
29
|
/**
|
|
28
30
|
* @jsxRuntime classic
|
|
@@ -35,8 +37,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
35
37
|
var titleStyles = (0, _react.css)({
|
|
36
38
|
outline: 'none',
|
|
37
39
|
border: 'none',
|
|
38
|
-
// eslint-disable-next-line @atlaskit/
|
|
39
|
-
fontSize: (
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
41
|
+
fontSize: "".concat(14 / 16, "rem"),
|
|
40
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
41
43
|
lineHeight: _editorSharedStyles.akEditorLineHeight,
|
|
42
44
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
@@ -46,7 +48,92 @@ var titleStyles = (0, _react.css)({
|
|
|
46
48
|
padding: "0 0 0 ".concat("var(--ds-space-050, 4px)"),
|
|
47
49
|
textAlign: 'left'
|
|
48
50
|
});
|
|
49
|
-
var
|
|
51
|
+
var containerStyles = (0, _react.css)({
|
|
52
|
+
borderWidth: '1px',
|
|
53
|
+
borderStyle: 'solid',
|
|
54
|
+
borderColor: 'transparent',
|
|
55
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
56
|
+
minHeight: '25px',
|
|
57
|
+
background: "var(--ds-background-neutral-subtle, transparent)",
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
59
|
+
transition: "background 0.3s ".concat(_editorSharedStyles.akEditorSwoopCubicBezier, ", border-color 0.3s ").concat(_editorSharedStyles.akEditorSwoopCubicBezier),
|
|
60
|
+
padding: "var(--ds-space-0, 0px)",
|
|
61
|
+
paddingBottom: "var(--ds-space-0, 0px)",
|
|
62
|
+
marginTop: "var(--ds-space-050, 0.25rem)",
|
|
63
|
+
marginBottom: 0,
|
|
64
|
+
marginLeft: 0,
|
|
65
|
+
marginRight: 0,
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
67
|
+
'td > :not(style):first-child, td > style:first-child + *': {
|
|
68
|
+
marginTop: 0
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var containerStylesExpanded = (0, _react.css)({
|
|
72
|
+
background: "var(--ds-surface, rgba(255, 255, 255, 0.6))",
|
|
73
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
74
|
+
borderColor: "var(--ds-border, #091E4224)"
|
|
75
|
+
});
|
|
76
|
+
var containerStylesFocused = (0, _react.css)({
|
|
77
|
+
borderColor: "var(--ds-border-focused, #388BFF)"
|
|
78
|
+
});
|
|
79
|
+
var containerStylesDataNodeTypeExpand = (0, _react.css)({
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
81
|
+
marginLeft: "-".concat(_editorSharedStyles.akLayoutGutterOffset, "px"),
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
83
|
+
marginRight: "-".concat(_editorSharedStyles.akLayoutGutterOffset, "px")
|
|
84
|
+
});
|
|
85
|
+
var titleContainerStyles = (0, _react.css)({
|
|
86
|
+
display: 'flex',
|
|
87
|
+
alignItems: 'flex-start',
|
|
88
|
+
background: 'none',
|
|
89
|
+
border: 'none',
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
91
|
+
fontSize: "".concat(14 / 16, "rem"),
|
|
92
|
+
width: '100%',
|
|
93
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
94
|
+
overflow: 'hidden',
|
|
95
|
+
cursor: 'pointer',
|
|
96
|
+
padding: "var(--ds-space-100, 8px)",
|
|
97
|
+
'&:focus': {
|
|
98
|
+
outline: 0
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
var titleContainerStylesExpanded = (0, _react.css)({
|
|
102
|
+
paddingBottom: "var(--ds-space-0, 0px)"
|
|
103
|
+
});
|
|
104
|
+
var contentContainerStyles = (0, _react.css)({
|
|
105
|
+
paddingTop: "var(--ds-space-0, 0px)",
|
|
106
|
+
marginLeft: "var(--ds-space-050, 4px)",
|
|
107
|
+
paddingRight: "var(--ds-space-200, 16px)",
|
|
108
|
+
paddingLeft: "var(--ds-space-400, 32px)",
|
|
109
|
+
display: 'flow-root',
|
|
110
|
+
visibility: 'hidden',
|
|
111
|
+
// The follow rules inside @supports block are added as a part of ED-8893
|
|
112
|
+
// The fix is targeting mobile bridge on iOS 12 or below,
|
|
113
|
+
// We should consider remove this fix when we no longer support iOS 12
|
|
114
|
+
'@supports not (display: flow-root)': {
|
|
115
|
+
width: '100%',
|
|
116
|
+
boxSizing: 'border-box'
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
var contentContainerStylesExpanded = (0, _react.css)({
|
|
120
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
121
|
+
visibility: 'visible'
|
|
122
|
+
});
|
|
123
|
+
var contentContainerStylesNotExpanded = (0, _react.css)({
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'.expand-content-wrapper, .nestedExpand-content-wrapper': {
|
|
126
|
+
/* We visually hide the content here to preserve the content during copy+paste */
|
|
127
|
+
/* Do not add text nowrap here because inline comment navigation depends on the location of the text */
|
|
128
|
+
width: '100%',
|
|
129
|
+
display: 'block',
|
|
130
|
+
height: 0,
|
|
131
|
+
overflow: 'hidden',
|
|
132
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
133
|
+
userSelect: 'none'
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
var ContainerOld = function ContainerOld(props) {
|
|
50
137
|
var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
51
138
|
var sharedContainerStyles = _ui.sharedExpandStyles.containerStyles(props);
|
|
52
139
|
|
|
@@ -62,7 +149,15 @@ var Container = function Container(props) {
|
|
|
62
149
|
}, props), props.children)
|
|
63
150
|
);
|
|
64
151
|
};
|
|
65
|
-
var
|
|
152
|
+
var ContainerNew = function ContainerNew(props) {
|
|
153
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
154
|
+
css: [containerStyles, props['data-node-type'] === 'expand' && containerStylesDataNodeTypeExpand, props.expanded && containerStylesExpanded, props.focused && containerStylesFocused]
|
|
155
|
+
// Ignored via go/ees005
|
|
156
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
157
|
+
}, props), props.children);
|
|
158
|
+
};
|
|
159
|
+
var Container = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', ContainerNew, ContainerOld);
|
|
160
|
+
var TitleContainerOld = function TitleContainerOld(props) {
|
|
66
161
|
var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
67
162
|
|
|
68
163
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
@@ -73,15 +168,29 @@ var TitleContainer = function TitleContainer(props) {
|
|
|
73
168
|
buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
74
169
|
return (
|
|
75
170
|
// Ignored via go/ees005
|
|
76
|
-
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage
|
|
171
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/design-system/no-html-button
|
|
77
172
|
(0, _react.jsx)("button", (0, _extends2.default)({
|
|
78
173
|
type: "button",
|
|
79
174
|
css: styles
|
|
80
175
|
}, buttonProps), props.children)
|
|
81
176
|
);
|
|
82
177
|
};
|
|
178
|
+
var TitleContainerNew = function TitleContainerNew(props) {
|
|
179
|
+
var expanded = props.expanded,
|
|
180
|
+
buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded2);
|
|
181
|
+
return (
|
|
182
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
183
|
+
(0, _react.jsx)("button", (0, _extends2.default)({
|
|
184
|
+
type: "button",
|
|
185
|
+
css: [titleContainerStyles, expanded && titleContainerStylesExpanded]
|
|
186
|
+
// Ignored via go/ees005
|
|
187
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
188
|
+
}, buttonProps), props.children)
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
var TitleContainer = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', TitleContainerNew, TitleContainerOld);
|
|
83
192
|
TitleContainer.displayName = 'TitleContainerButton';
|
|
84
|
-
var
|
|
193
|
+
var ContentContainerOld = function ContentContainerOld(props) {
|
|
85
194
|
var sharedContentStyles = _ui.sharedExpandStyles.contentStyles(props);
|
|
86
195
|
var visibility = props.expanded ? 'visible' : 'hidden';
|
|
87
196
|
|
|
@@ -90,7 +199,6 @@ var ContentContainer = function ContentContainer(props) {
|
|
|
90
199
|
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t", ";\n\t\tpadding-right: ", ";\n\t\tpadding-left: ", ";\n\t\tvisibility: ", ";\n\t"])), sharedContentStyles(), "var(--ds-space-200, 16px)", "var(--ds-space-400, 32px)", visibility);
|
|
91
200
|
};
|
|
92
201
|
return (
|
|
93
|
-
// eslint-disable-next-line
|
|
94
202
|
// Ignored via go/ees005
|
|
95
203
|
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage
|
|
96
204
|
(0, _react.jsx)("div", (0, _extends2.default)({
|
|
@@ -98,6 +206,14 @@ var ContentContainer = function ContentContainer(props) {
|
|
|
98
206
|
}, props), props.children)
|
|
99
207
|
);
|
|
100
208
|
};
|
|
209
|
+
var ContentContainerNew = function ContentContainerNew(props) {
|
|
210
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
211
|
+
css: [contentContainerStyles, props.expanded && contentContainerStylesExpanded, !props.expanded && contentContainerStylesNotExpanded]
|
|
212
|
+
// Ignored via go/ees005
|
|
213
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
214
|
+
}, props), props.children);
|
|
215
|
+
};
|
|
216
|
+
var ContentContainer = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', ContentContainerNew, ContentContainerOld);
|
|
101
217
|
function fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent) {
|
|
102
218
|
if (!fireAnalyticsEvent) {
|
|
103
219
|
return;
|
|
@@ -67,7 +67,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
67
67
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
68
68
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
69
69
|
var packageName = "@atlaskit/renderer";
|
|
70
|
-
var packageVersion = "114.3.
|
|
70
|
+
var packageVersion = "114.3.2";
|
|
71
71
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
72
72
|
containerName: 'ak-renderer-wrapper',
|
|
73
73
|
containerType: 'inline-size',
|
|
@@ -17,6 +17,7 @@ var _dom = require("./dom");
|
|
|
17
17
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
18
18
|
var _segmentText = require("../../../react/utils/segment-text");
|
|
19
19
|
var _renderTextSegments = require("../../../react/utils/render-text-segments");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
23
|
/**
|
|
@@ -38,18 +39,37 @@ var markStyles = function markStyles() {
|
|
|
38
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
40
|
(0, _styles.AnnotationSharedCSSByState)().focus);
|
|
40
41
|
};
|
|
42
|
+
|
|
43
|
+
// Localized AnnotationSharedCSSByState().common and AnnotationSharedCSSByState().focus
|
|
44
|
+
var markStylesNew = (0, _react2.css)({
|
|
45
|
+
color: 'inherit',
|
|
46
|
+
backgroundColor: 'unset',
|
|
47
|
+
WebkitTapHighlightColor: 'transparent',
|
|
48
|
+
borderBottom: '2px solid transparent',
|
|
49
|
+
cursor: 'pointer',
|
|
50
|
+
padding: '1px 0 2px',
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
52
|
+
'&:has(.card), &:has([data-inline-card])': {
|
|
53
|
+
padding: '5px 0 3px 0'
|
|
54
|
+
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
56
|
+
'&:has(.date-lozenger-container)': {
|
|
57
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
58
|
+
},
|
|
59
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
60
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
61
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
|
|
62
|
+
});
|
|
41
63
|
var AnnotationDraft = exports.AnnotationDraft = function AnnotationDraft(_ref) {
|
|
42
64
|
var draftPosition = _ref.draftPosition,
|
|
43
65
|
children = _ref.children;
|
|
44
|
-
return (
|
|
66
|
+
return (0, _react2.jsx)("mark", (0, _extends2.default)({
|
|
67
|
+
"data-renderer-mark": true
|
|
45
68
|
// Ignored via go/ees005
|
|
46
69
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
css: markStyles
|
|
51
|
-
}), children)
|
|
52
|
-
);
|
|
70
|
+
}, (0, _dom.dataAttributes)(draftPosition), {
|
|
71
|
+
css: (0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer') ? markStylesNew : markStyles
|
|
72
|
+
}), children);
|
|
53
73
|
};
|
|
54
74
|
var getAnnotationIndex = exports.getAnnotationIndex = function getAnnotationIndex(annotationPosition, fragmentCount) {
|
|
55
75
|
if (annotationPosition === _types.InsertDraftPosition.START) {
|