@atlaskit/section-message 6.4.10 → 6.4.11
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 +7 -0
- package/dist/cjs/section-message.js +21 -20
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/section-message.js +18 -16
- package/dist/es2019/version.json +1 -1
- package/dist/esm/section-message.js +18 -16
- package/dist/esm/version.json +1 -1
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/section-message
|
|
2
2
|
|
|
3
|
+
## 6.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1ed303de3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ed303de3e8) - Updated dependencies
|
|
8
|
+
- [`95401cac781`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95401cac781) - Internal change to component composition. There is no expected change.
|
|
9
|
+
|
|
3
10
|
## 6.4.10
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -9,12 +9,18 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _dsExplorations = require("@atlaskit/ds-explorations");
|
|
11
11
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
12
|
-
var
|
|
13
|
-
var _stack = _interopRequireDefault(require("@atlaskit/primitives/stack"));
|
|
12
|
+
var _primitives = require("@atlaskit/primitives");
|
|
14
13
|
var _appearanceIcon = require("./internal/appearance-icon");
|
|
15
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
16
|
+
var sectionMessageStyles = (0, _primitives.xcss)({
|
|
17
|
+
wordBreak: 'break-word',
|
|
18
|
+
borderRadius: 'border.radius'
|
|
19
|
+
});
|
|
20
|
+
var bleedStyles = (0, _primitives.xcss)({
|
|
21
|
+
display: 'flex',
|
|
22
|
+
marginBlock: "calc(-1 * ".concat("var(--ds-space-025, 2px)", ")")
|
|
23
|
+
});
|
|
18
24
|
|
|
19
25
|
/**
|
|
20
26
|
* __Section message__
|
|
@@ -39,34 +45,29 @@ var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage
|
|
|
39
45
|
Icon = _getAppearanceIconSty.Icon;
|
|
40
46
|
var actionElements = actions && actions.type === _react.default.Fragment ? actions.props.children : actions;
|
|
41
47
|
var actionsArray = _react.default.Children.toArray(actionElements);
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
43
49
|
as: "section",
|
|
44
50
|
backgroundColor: appearanceMap[appearance],
|
|
45
51
|
padding: "space.200",
|
|
46
|
-
borderRadius: "normal",
|
|
47
52
|
testId: testId,
|
|
48
53
|
ref: ref,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement(_inline.default, {
|
|
54
|
+
xcss: sectionMessageStyles
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
53
56
|
space: "space.200",
|
|
54
57
|
alignBlock: "stretch"
|
|
55
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
56
|
-
|
|
57
|
-
margin: '-2px 0'
|
|
58
|
-
}
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
59
|
+
xcss: bleedStyles
|
|
59
60
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
60
61
|
size: "medium",
|
|
61
62
|
primaryColor: primaryColor,
|
|
62
63
|
secondaryColor: secondaryColor
|
|
63
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
64
|
+
})), /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
64
65
|
space: "space.100",
|
|
65
66
|
testId: testId && "".concat(testId, "--content")
|
|
66
67
|
}, !!title && /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
67
68
|
as: "h2",
|
|
68
69
|
level: "h500"
|
|
69
|
-
}, title), /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Text, null, children), actionsArray.length > 0 && /*#__PURE__*/_react.default.createElement(
|
|
70
|
+
}, title), /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Text, null, children), actionsArray.length > 0 && /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
70
71
|
shouldWrap: true,
|
|
71
72
|
testId: testId && "".concat(testId, "--actions"),
|
|
72
73
|
separator: "\xB7",
|
|
@@ -75,11 +76,11 @@ var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage
|
|
|
75
76
|
}, actionsArray))));
|
|
76
77
|
});
|
|
77
78
|
var appearanceMap = {
|
|
78
|
-
information: 'information',
|
|
79
|
-
warning: 'warning',
|
|
80
|
-
error: 'danger',
|
|
81
|
-
success: 'success',
|
|
82
|
-
discovery: 'discovery'
|
|
79
|
+
information: 'color.background.information',
|
|
80
|
+
warning: 'color.background.warning',
|
|
81
|
+
error: 'color.background.danger',
|
|
82
|
+
success: 'color.background.success',
|
|
83
|
+
discovery: 'color.background.discovery'
|
|
83
84
|
};
|
|
84
85
|
SectionMessage.displayName = 'SectionMessage';
|
|
85
86
|
var _default = SectionMessage;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
1
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import { UNSAFE_Text as Text } from '@atlaskit/ds-explorations';
|
|
4
3
|
import Heading from '@atlaskit/heading';
|
|
5
|
-
import Inline from '@atlaskit/primitives
|
|
6
|
-
import Stack from '@atlaskit/primitives/stack';
|
|
4
|
+
import { Box, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
7
5
|
import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
6
|
+
const sectionMessageStyles = xcss({
|
|
7
|
+
wordBreak: 'break-word',
|
|
8
|
+
borderRadius: 'border.radius'
|
|
9
|
+
});
|
|
10
|
+
const bleedStyles = xcss({
|
|
11
|
+
display: 'flex',
|
|
12
|
+
marginBlock: `calc(-1 * ${"var(--ds-space-025, 2px)"})`
|
|
13
|
+
});
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
16
|
* __Section message__
|
|
10
17
|
*
|
|
@@ -33,19 +40,14 @@ const SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage({
|
|
|
33
40
|
as: "section",
|
|
34
41
|
backgroundColor: appearanceMap[appearance],
|
|
35
42
|
padding: "space.200",
|
|
36
|
-
borderRadius: "normal",
|
|
37
43
|
testId: testId,
|
|
38
44
|
ref: ref,
|
|
39
|
-
|
|
40
|
-
wordBreak: 'break-word'
|
|
41
|
-
}
|
|
45
|
+
xcss: sectionMessageStyles
|
|
42
46
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
43
47
|
space: "space.200",
|
|
44
48
|
alignBlock: "stretch"
|
|
45
49
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
46
|
-
|
|
47
|
-
margin: '-2px 0'
|
|
48
|
-
}
|
|
50
|
+
xcss: bleedStyles
|
|
49
51
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
50
52
|
size: "medium",
|
|
51
53
|
primaryColor: primaryColor,
|
|
@@ -65,11 +67,11 @@ const SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage({
|
|
|
65
67
|
}, actionsArray))));
|
|
66
68
|
});
|
|
67
69
|
const appearanceMap = {
|
|
68
|
-
information: 'information',
|
|
69
|
-
warning: 'warning',
|
|
70
|
-
error: 'danger',
|
|
71
|
-
success: 'success',
|
|
72
|
-
discovery: 'discovery'
|
|
70
|
+
information: 'color.background.information',
|
|
71
|
+
warning: 'color.background.warning',
|
|
72
|
+
error: 'color.background.danger',
|
|
73
|
+
success: 'color.background.success',
|
|
74
|
+
discovery: 'color.background.discovery'
|
|
73
75
|
};
|
|
74
76
|
SectionMessage.displayName = 'SectionMessage';
|
|
75
77
|
export default SectionMessage;
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
1
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import { UNSAFE_Text as Text } from '@atlaskit/ds-explorations';
|
|
4
3
|
import Heading from '@atlaskit/heading';
|
|
5
|
-
import Inline from '@atlaskit/primitives
|
|
6
|
-
import Stack from '@atlaskit/primitives/stack';
|
|
4
|
+
import { Box, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
7
5
|
import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
6
|
+
var sectionMessageStyles = xcss({
|
|
7
|
+
wordBreak: 'break-word',
|
|
8
|
+
borderRadius: 'border.radius'
|
|
9
|
+
});
|
|
10
|
+
var bleedStyles = xcss({
|
|
11
|
+
display: 'flex',
|
|
12
|
+
marginBlock: "calc(-1 * ".concat("var(--ds-space-025, 2px)", ")")
|
|
13
|
+
});
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
16
|
* __Section message__
|
|
10
17
|
*
|
|
@@ -32,19 +39,14 @@ var SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage(_ref, ref)
|
|
|
32
39
|
as: "section",
|
|
33
40
|
backgroundColor: appearanceMap[appearance],
|
|
34
41
|
padding: "space.200",
|
|
35
|
-
borderRadius: "normal",
|
|
36
42
|
testId: testId,
|
|
37
43
|
ref: ref,
|
|
38
|
-
|
|
39
|
-
wordBreak: 'break-word'
|
|
40
|
-
}
|
|
44
|
+
xcss: sectionMessageStyles
|
|
41
45
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
42
46
|
space: "space.200",
|
|
43
47
|
alignBlock: "stretch"
|
|
44
48
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
45
|
-
|
|
46
|
-
margin: '-2px 0'
|
|
47
|
-
}
|
|
49
|
+
xcss: bleedStyles
|
|
48
50
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
49
51
|
size: "medium",
|
|
50
52
|
primaryColor: primaryColor,
|
|
@@ -64,11 +66,11 @@ var SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage(_ref, ref)
|
|
|
64
66
|
}, actionsArray))));
|
|
65
67
|
});
|
|
66
68
|
var appearanceMap = {
|
|
67
|
-
information: 'information',
|
|
68
|
-
warning: 'warning',
|
|
69
|
-
error: 'danger',
|
|
70
|
-
success: 'success',
|
|
71
|
-
discovery: 'discovery'
|
|
69
|
+
information: 'color.background.information',
|
|
70
|
+
warning: 'color.background.warning',
|
|
71
|
+
error: 'color.background.danger',
|
|
72
|
+
success: 'color.background.success',
|
|
73
|
+
discovery: 'color.background.discovery'
|
|
72
74
|
};
|
|
73
75
|
SectionMessage.displayName = 'SectionMessage';
|
|
74
76
|
export default SectionMessage;
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/section-message",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.11",
|
|
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/"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"atlaskit:src": "src/index.tsx",
|
|
25
25
|
"atlassian": {
|
|
26
|
-
"team": "Design System
|
|
26
|
+
"team": "Design System Fundamentals",
|
|
27
27
|
"releaseModel": "continuous",
|
|
28
28
|
"website": {
|
|
29
29
|
"name": "Section message",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@atlaskit/ds-explorations": "^2.2.0",
|
|
43
43
|
"@atlaskit/heading": "^1.3.0",
|
|
44
44
|
"@atlaskit/icon": "^21.12.0",
|
|
45
|
-
"@atlaskit/primitives": "^1.0.
|
|
45
|
+
"@atlaskit/primitives": "^1.0.6",
|
|
46
46
|
"@atlaskit/theme": "^12.5.0",
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
+
"@atlaskit/tokens": "^1.13.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
55
|
-
"@atlaskit/code": "^14.6.0",
|
|
56
55
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
57
56
|
"@atlaskit/ssr": "*",
|
|
58
57
|
"@atlaskit/visual-regression": "*",
|
|
@@ -91,4 +90,4 @@
|
|
|
91
90
|
},
|
|
92
91
|
"homepage": "https://atlassian.design/components/section-message/",
|
|
93
92
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
94
|
-
}
|
|
93
|
+
}
|