@atlaskit/section-message 6.9.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/cjs/section-message-action.js +4 -4
- package/dist/cjs/section-message.compiled.css +6 -0
- package/dist/cjs/section-message.js +19 -23
- package/dist/es2019/section-message-action.js +1 -1
- package/dist/es2019/section-message.compiled.css +6 -0
- package/dist/es2019/section-message.js +12 -16
- package/dist/esm/section-message-action.js +1 -1
- package/dist/esm/section-message.compiled.css +6 -0
- package/dist/esm/section-message.js +12 -16
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/section-message
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#116552](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116552)
|
|
8
|
+
[`e002c7033f5f3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e002c7033f5f3) -
|
|
9
|
+
Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
|
|
10
|
+
the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to
|
|
11
|
+
use this version of `@atlaskit/section-message`, you will need to ensure that your bundler is
|
|
12
|
+
configured to handle `.css` imports correctly.
|
|
13
|
+
|
|
14
|
+
Most bundlers come with built-in support for `.css` imports, so you may not need to do anything.
|
|
15
|
+
If you are using a different bundler, please refer to the documentation for that bundler to
|
|
16
|
+
understand how to handle `.css` imports. For more information on the migration, please refer to
|
|
17
|
+
[RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953).
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 6.9.4
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 6.9.3
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
14
14
|
var _css = require("@atlaskit/css");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
-
var
|
|
16
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
17
|
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); }
|
|
18
18
|
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; }
|
|
19
19
|
var styles = {
|
|
@@ -39,7 +39,7 @@ var SectionMessageAction = /*#__PURE__*/(0, _react.memo)(function SectionMessage
|
|
|
39
39
|
linkComponent = _ref.linkComponent;
|
|
40
40
|
if (!linkComponent && (0, _platformFeatureFlags.fg)('platform_section_message_action_migration')) {
|
|
41
41
|
if (href) {
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
43
43
|
testId: testId,
|
|
44
44
|
onClick: onClick,
|
|
45
45
|
href: href,
|
|
@@ -47,13 +47,13 @@ var SectionMessageAction = /*#__PURE__*/(0, _react.memo)(function SectionMessage
|
|
|
47
47
|
}, children);
|
|
48
48
|
}
|
|
49
49
|
if (onClick) {
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
51
51
|
testId: testId,
|
|
52
52
|
onClick: onClick,
|
|
53
53
|
xcss: (0, _css.cx)(styles.common, styles.pressable)
|
|
54
54
|
}, children);
|
|
55
55
|
}
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
57
57
|
as: "span",
|
|
58
58
|
testId: testId
|
|
59
59
|
}, children);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
+
._1mou1i6y{margin-block:var(--ds-space-negative-025,-2px)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._1nmz1hna{word-break:break-word}
|
|
6
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* section-message.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,24 +7,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.default = void 0;
|
|
10
|
+
require("./section-message.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
11
|
-
var
|
|
14
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
12
15
|
var _appearanceIcon = require("./internal/appearance-icon");
|
|
13
16
|
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); }
|
|
14
17
|
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; }
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
display: 'flex',
|
|
21
|
-
marginBlock: 'space.negative.025'
|
|
22
|
-
});
|
|
23
|
-
var contentStyles = (0, _primitives.xcss)({
|
|
24
|
-
color: 'color.text',
|
|
25
|
-
font: 'font.body'
|
|
26
|
-
});
|
|
18
|
+
var sectionMessageStyles = {
|
|
19
|
+
container: "_2rkoglpi _1nmz1hna",
|
|
20
|
+
bleed: "_1mou1i6y _1e0c1txw",
|
|
21
|
+
content: "_11c81oud _syaz1fxt"
|
|
22
|
+
};
|
|
27
23
|
|
|
28
24
|
/**
|
|
29
25
|
* __Section message__
|
|
@@ -48,18 +44,18 @@ var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage
|
|
|
48
44
|
Icon = _getAppearanceIconSty.Icon;
|
|
49
45
|
var actionElements = actions && actions.type === _react.default.Fragment ? actions.props.children : actions;
|
|
50
46
|
var actionsArray = _react.default.Children.toArray(actionElements);
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
52
48
|
as: "section",
|
|
53
49
|
backgroundColor: appearanceMap[appearance],
|
|
54
50
|
padding: "space.200",
|
|
55
51
|
testId: testId,
|
|
56
52
|
ref: ref,
|
|
57
|
-
xcss:
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
53
|
+
xcss: sectionMessageStyles.container
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
59
55
|
space: "space.200",
|
|
60
56
|
alignBlock: "stretch"
|
|
61
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
62
|
-
xcss:
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
58
|
+
xcss: sectionMessageStyles.bleed
|
|
63
59
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
64
60
|
size: "medium",
|
|
65
61
|
primaryColor: primaryColor,
|
|
@@ -69,15 +65,15 @@ var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage
|
|
|
69
65
|
LEGACY_size: "medium",
|
|
70
66
|
color: primaryColor,
|
|
71
67
|
spacing: "spacious"
|
|
72
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
68
|
+
})), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
73
69
|
space: "space.100",
|
|
74
70
|
testId: testId && "".concat(testId, "--content")
|
|
75
71
|
}, !!title && /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
76
72
|
as: "h2",
|
|
77
73
|
size: "small"
|
|
78
|
-
}, title), /*#__PURE__*/_react.default.createElement(
|
|
79
|
-
xcss:
|
|
80
|
-
}, children), actionsArray.length > 0 && /*#__PURE__*/_react.default.createElement(
|
|
74
|
+
}, title), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
75
|
+
xcss: sectionMessageStyles.content
|
|
76
|
+
}, children), actionsArray.length > 0 && /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
81
77
|
shouldWrap: true,
|
|
82
78
|
testId: testId && "".concat(testId, "--actions"),
|
|
83
79
|
separator: "\xB7",
|
|
@@ -85,7 +81,7 @@ var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage
|
|
|
85
81
|
rowSpace: "space.0",
|
|
86
82
|
role: "list"
|
|
87
83
|
}, actionsArray.map(function (action, id) {
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
89
85
|
role: "listitem",
|
|
90
86
|
key: id
|
|
91
87
|
}, action);
|
|
@@ -5,7 +5,7 @@ import React, { memo } from 'react';
|
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { Anchor, Box, Pressable } from '@atlaskit/primitives';
|
|
8
|
+
import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
9
9
|
const styles = {
|
|
10
10
|
common: "_11c81oud _syaz14q2 _k48p1wq8 _30l314q2 _9h8h16c2",
|
|
11
11
|
anchor: "_1053w7te _9oik1r31 _1bnx8stv _jf4cnqa1 _n0fxw7te _1vhvg3x0",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
+
._1mou1i6y{margin-block:var(--ds-space-negative-025,-2px)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._1nmz1hna{word-break:break-word}
|
|
6
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
+
/* section-message.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./section-message.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import React, { forwardRef } from 'react';
|
|
2
5
|
import Heading from '@atlaskit/heading';
|
|
3
|
-
import { Box, Inline, Stack
|
|
6
|
+
import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
4
7
|
import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
display: 'flex',
|
|
11
|
-
marginBlock: 'space.negative.025'
|
|
12
|
-
});
|
|
13
|
-
const contentStyles = xcss({
|
|
14
|
-
color: 'color.text',
|
|
15
|
-
font: 'font.body'
|
|
16
|
-
});
|
|
8
|
+
const sectionMessageStyles = {
|
|
9
|
+
container: "_2rkoglpi _1nmz1hna",
|
|
10
|
+
bleed: "_1mou1i6y _1e0c1txw",
|
|
11
|
+
content: "_11c81oud _syaz1fxt"
|
|
12
|
+
};
|
|
17
13
|
|
|
18
14
|
/**
|
|
19
15
|
* __Section message__
|
|
@@ -45,12 +41,12 @@ const SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage({
|
|
|
45
41
|
padding: "space.200",
|
|
46
42
|
testId: testId,
|
|
47
43
|
ref: ref,
|
|
48
|
-
xcss:
|
|
44
|
+
xcss: sectionMessageStyles.container
|
|
49
45
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
50
46
|
space: "space.200",
|
|
51
47
|
alignBlock: "stretch"
|
|
52
48
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
53
|
-
xcss:
|
|
49
|
+
xcss: sectionMessageStyles.bleed
|
|
54
50
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
55
51
|
size: "medium",
|
|
56
52
|
primaryColor: primaryColor,
|
|
@@ -67,7 +63,7 @@ const SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage({
|
|
|
67
63
|
as: "h2",
|
|
68
64
|
size: "small"
|
|
69
65
|
}, title), /*#__PURE__*/React.createElement(Box, {
|
|
70
|
-
xcss:
|
|
66
|
+
xcss: sectionMessageStyles.content
|
|
71
67
|
}, children), actionsArray.length > 0 && /*#__PURE__*/React.createElement(Inline, {
|
|
72
68
|
shouldWrap: true,
|
|
73
69
|
testId: testId && `${testId}--actions`,
|
|
@@ -5,7 +5,7 @@ import React, { memo } from 'react';
|
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { Anchor, Box, Pressable } from '@atlaskit/primitives';
|
|
8
|
+
import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
9
9
|
var styles = {
|
|
10
10
|
common: "_11c81oud _syaz14q2 _k48p1wq8 _30l314q2 _9h8h16c2",
|
|
11
11
|
anchor: "_1053w7te _9oik1r31 _1bnx8stv _jf4cnqa1 _n0fxw7te _1vhvg3x0",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
+
._1mou1i6y{margin-block:var(--ds-space-negative-025,-2px)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._1nmz1hna{word-break:break-word}
|
|
6
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
+
/* section-message.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./section-message.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import React, { forwardRef } from 'react';
|
|
2
5
|
import Heading from '@atlaskit/heading';
|
|
3
|
-
import { Box, Inline, Stack
|
|
6
|
+
import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
4
7
|
import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
display: 'flex',
|
|
11
|
-
marginBlock: 'space.negative.025'
|
|
12
|
-
});
|
|
13
|
-
var contentStyles = xcss({
|
|
14
|
-
color: 'color.text',
|
|
15
|
-
font: 'font.body'
|
|
16
|
-
});
|
|
8
|
+
var sectionMessageStyles = {
|
|
9
|
+
container: "_2rkoglpi _1nmz1hna",
|
|
10
|
+
bleed: "_1mou1i6y _1e0c1txw",
|
|
11
|
+
content: "_11c81oud _syaz1fxt"
|
|
12
|
+
};
|
|
17
13
|
|
|
18
14
|
/**
|
|
19
15
|
* __Section message__
|
|
@@ -44,12 +40,12 @@ var SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage(_ref, ref)
|
|
|
44
40
|
padding: "space.200",
|
|
45
41
|
testId: testId,
|
|
46
42
|
ref: ref,
|
|
47
|
-
xcss:
|
|
43
|
+
xcss: sectionMessageStyles.container
|
|
48
44
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
49
45
|
space: "space.200",
|
|
50
46
|
alignBlock: "stretch"
|
|
51
47
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
52
|
-
xcss:
|
|
48
|
+
xcss: sectionMessageStyles.bleed
|
|
53
49
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
54
50
|
size: "medium",
|
|
55
51
|
primaryColor: primaryColor,
|
|
@@ -66,7 +62,7 @@ var SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage(_ref, ref)
|
|
|
66
62
|
as: "h2",
|
|
67
63
|
size: "small"
|
|
68
64
|
}, title), /*#__PURE__*/React.createElement(Box, {
|
|
69
|
-
xcss:
|
|
65
|
+
xcss: sectionMessageStyles.content
|
|
70
66
|
}, children), actionsArray.length > 0 && /*#__PURE__*/React.createElement(Inline, {
|
|
71
67
|
shouldWrap: true,
|
|
72
68
|
testId: testId && "".concat(testId, "--actions"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/section-message",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "A section message is used to alert users to a particular section of the screen.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/button": "^20.5.0",
|
|
43
43
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
44
|
-
"@atlaskit/css": "^0.
|
|
45
|
-
"@atlaskit/heading": "^4.
|
|
46
|
-
"@atlaskit/icon": "^23.
|
|
44
|
+
"@atlaskit/css": "^0.9.0",
|
|
45
|
+
"@atlaskit/heading": "^4.3.0",
|
|
46
|
+
"@atlaskit/icon": "^23.11.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/primitives": "^13.
|
|
48
|
+
"@atlaskit/primitives": "^13.6.0",
|
|
49
49
|
"@atlaskit/theme": "^16.0.0",
|
|
50
50
|
"@atlaskit/tokens": "^3.3.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0"
|