@atlaskit/section-message 6.3.9 → 6.3.10
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 +6 -0
- package/dist/cjs/entry-points/section-message-action.js +0 -2
- package/dist/cjs/entry-points/section-message.js +0 -2
- package/dist/cjs/index.js +0 -3
- package/dist/cjs/internal/appearance-icon.js +0 -12
- package/dist/cjs/section-message-action.js +4 -11
- package/dist/cjs/section-message.js +9 -22
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/appearance-icon.js +2 -1
- package/dist/es2019/section-message-action.js +0 -1
- package/dist/es2019/section-message.js +0 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/appearance-icon.js +0 -3
- package/dist/esm/section-message-action.js +4 -5
- package/dist/esm/section-message.js +9 -12
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _sectionMessageAction.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _sectionMessageAction = _interopRequireDefault(require("../section-message-action"));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _sectionMessage.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _sectionMessage = _interopRequireDefault(require("../section-message"));
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -17,7 +16,5 @@ Object.defineProperty(exports, "default", {
|
|
|
17
16
|
return _sectionMessage.default;
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
|
-
|
|
21
19
|
var _sectionMessage = _interopRequireDefault(require("./section-message"));
|
|
22
|
-
|
|
23
20
|
var _sectionMessageAction = _interopRequireDefault(require("./section-message-action"));
|
|
@@ -1,31 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.appearanceIconSchema = void 0;
|
|
9
8
|
exports.getAppearanceIconStyles = getAppearanceIconStyles;
|
|
10
|
-
|
|
11
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
|
|
14
|
-
|
|
15
11
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
16
|
-
|
|
17
12
|
var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
|
|
18
|
-
|
|
19
13
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/question-circle"));
|
|
20
|
-
|
|
21
14
|
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
22
|
-
|
|
23
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
24
|
-
|
|
25
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
26
|
-
|
|
27
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28
|
-
|
|
29
18
|
var appearanceIconSchema = {
|
|
30
19
|
information: {
|
|
31
20
|
backgroundColor: "var(--ds-background-information, ".concat(_colors.B50, ")"),
|
|
@@ -54,7 +43,6 @@ var appearanceIconSchema = {
|
|
|
54
43
|
}
|
|
55
44
|
};
|
|
56
45
|
exports.appearanceIconSchema = appearanceIconSchema;
|
|
57
|
-
|
|
58
46
|
function getAppearanceIconStyles(appearance, icon) {
|
|
59
47
|
var appearanceIconStyles = appearanceIconSchema[appearance] || appearanceIconSchema.information;
|
|
60
48
|
var Icon = icon || appearanceIconStyles.Icon;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
12
|
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; }
|
|
19
|
-
|
|
20
13
|
/**
|
|
21
14
|
* __Section message action__
|
|
22
15
|
*
|
|
@@ -28,10 +21,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
28
21
|
*/
|
|
29
22
|
var SectionMessageAction = /*#__PURE__*/(0, _react.memo)(function SectionMessageAction(_ref) {
|
|
30
23
|
var children = _ref.children,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
onClick = _ref.onClick,
|
|
25
|
+
href = _ref.href,
|
|
26
|
+
testId = _ref.testId,
|
|
27
|
+
linkComponent = _ref.linkComponent;
|
|
35
28
|
// FIXME: This path doesn't make sense
|
|
36
29
|
// If the intent of the design for this component is to use an action, not providing `href` or `onClick`
|
|
37
30
|
// makes the use case invalid. This should be addressed.
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _dsExplorations = require("@atlaskit/ds-explorations");
|
|
15
|
-
|
|
16
11
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
17
|
-
|
|
18
12
|
var _appearanceIcon = require("./internal/appearance-icon");
|
|
19
|
-
|
|
20
13
|
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); }
|
|
21
|
-
|
|
22
14
|
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; }
|
|
23
|
-
|
|
24
15
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
25
16
|
|
|
26
17
|
/**
|
|
@@ -34,22 +25,18 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
34
25
|
*/
|
|
35
26
|
var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage(_ref, ref) {
|
|
36
27
|
var children = _ref.children,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
_ref$appearance = _ref.appearance,
|
|
29
|
+
appearance = _ref$appearance === void 0 ? 'information' : _ref$appearance,
|
|
30
|
+
actions = _ref.actions,
|
|
31
|
+
title = _ref.title,
|
|
32
|
+
icon = _ref.icon,
|
|
33
|
+
testId = _ref.testId;
|
|
44
34
|
var _getAppearanceIconSty = (0, _appearanceIcon.getAppearanceIconStyles)(appearance, icon),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
primaryColor = _getAppearanceIconSty.primaryIconColor,
|
|
36
|
+
secondaryColor = _getAppearanceIconSty.backgroundColor,
|
|
37
|
+
Icon = _getAppearanceIconSty.Icon;
|
|
49
38
|
var actionElements = actions && actions.type === _react.default.Fragment ? actions.props.children : actions;
|
|
50
|
-
|
|
51
39
|
var actionsArray = _react.default.Children.toArray(actionElements);
|
|
52
|
-
|
|
53
40
|
return /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Box, {
|
|
54
41
|
as: "section",
|
|
55
42
|
backgroundColor: appearanceMap[appearance],
|
package/dist/cjs/version.json
CHANGED
|
@@ -34,7 +34,8 @@ export const appearanceIconSchema = {
|
|
|
34
34
|
export function getAppearanceIconStyles(appearance, icon) {
|
|
35
35
|
const appearanceIconStyles = appearanceIconSchema[appearance] || appearanceIconSchema.information;
|
|
36
36
|
const Icon = icon || appearanceIconStyles.Icon;
|
|
37
|
-
return {
|
|
37
|
+
return {
|
|
38
|
+
...appearanceIconStyles,
|
|
38
39
|
Icon
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -3,7 +3,6 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
import { UNSAFE_Box as Box, UNSAFE_Inline as Inline, UNSAFE_Stack as Stack, UNSAFE_Text as Text } from '@atlaskit/ds-explorations';
|
|
4
4
|
import Heading from '@atlaskit/heading';
|
|
5
5
|
import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* __Section message__
|
|
9
8
|
*
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
8
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
9
6
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* __Section message action__
|
|
6
5
|
*
|
|
@@ -12,10 +11,10 @@ import Button from '@atlaskit/button/standard-button';
|
|
|
12
11
|
*/
|
|
13
12
|
var SectionMessageAction = /*#__PURE__*/memo(function SectionMessageAction(_ref) {
|
|
14
13
|
var children = _ref.children,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
onClick = _ref.onClick,
|
|
15
|
+
href = _ref.href,
|
|
16
|
+
testId = _ref.testId,
|
|
17
|
+
linkComponent = _ref.linkComponent;
|
|
19
18
|
// FIXME: This path doesn't make sense
|
|
20
19
|
// If the intent of the design for this component is to use an action, not providing `href` or `onClick`
|
|
21
20
|
// makes the use case invalid. This should be addressed.
|
|
@@ -3,7 +3,6 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
import { UNSAFE_Box as Box, UNSAFE_Inline as Inline, UNSAFE_Stack as Stack, UNSAFE_Text as Text } from '@atlaskit/ds-explorations';
|
|
4
4
|
import Heading from '@atlaskit/heading';
|
|
5
5
|
import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* __Section message__
|
|
9
8
|
*
|
|
@@ -15,18 +14,16 @@ import { getAppearanceIconStyles } from './internal/appearance-icon';
|
|
|
15
14
|
*/
|
|
16
15
|
var SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage(_ref, ref) {
|
|
17
16
|
var children = _ref.children,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
_ref$appearance = _ref.appearance,
|
|
18
|
+
appearance = _ref$appearance === void 0 ? 'information' : _ref$appearance,
|
|
19
|
+
actions = _ref.actions,
|
|
20
|
+
title = _ref.title,
|
|
21
|
+
icon = _ref.icon,
|
|
22
|
+
testId = _ref.testId;
|
|
25
23
|
var _getAppearanceIconSty = getAppearanceIconStyles(appearance, icon),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
primaryColor = _getAppearanceIconSty.primaryIconColor,
|
|
25
|
+
secondaryColor = _getAppearanceIconSty.backgroundColor,
|
|
26
|
+
Icon = _getAppearanceIconSty.Icon;
|
|
30
27
|
var actionElements = actions && actions.type === React.Fragment ? actions.props.children : actions;
|
|
31
28
|
var actionsArray = React.Children.toArray(actionElements);
|
|
32
29
|
return /*#__PURE__*/React.createElement(Box, {
|
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.3.
|
|
3
|
+
"version": "6.3.10",
|
|
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/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/heading": "^1.1.0",
|
|
37
37
|
"@atlaskit/icon": "^21.11.0",
|
|
38
38
|
"@atlaskit/theme": "^12.2.0",
|
|
39
|
-
"@atlaskit/tokens": "^0.
|
|
39
|
+
"@atlaskit/tokens": "^1.0.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|