@atlaskit/help-layout 4.0.0 → 4.1.1
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 +22 -0
- package/dist/cjs/components/Header/BackButton.js +5 -28
- package/dist/cjs/components/Header/CloseButton.js +2 -2
- package/dist/cjs/components/Header/styled.js +4 -2
- package/dist/cjs/components/HelpLayoutContent.js +3 -1
- package/dist/cjs/components/styled.js +6 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Header/BackButton.js +2 -19
- package/dist/es2019/components/Header/CloseButton.js +1 -1
- package/dist/es2019/components/Header/styled.js +5 -3
- package/dist/es2019/components/styled.js +9 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Header/BackButton.js +4 -19
- package/dist/esm/components/Header/CloseButton.js +1 -1
- package/dist/esm/components/Header/styled.js +3 -2
- package/dist/esm/components/HelpLayoutContent.js +2 -1
- package/dist/esm/components/styled.js +5 -4
- package/dist/esm/version.json +1 -1
- package/dist/types/components/HelpLayout.d.ts +1 -1
- package/package.json +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/help-layout
|
|
2
2
|
|
|
3
|
+
## 4.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b03b488246c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b03b488246c) - [ux] Added new theming package, `@atlaskit/tokens`.
|
|
14
|
+
|
|
15
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
16
|
+
|
|
17
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
18
|
+
|
|
19
|
+
## 4.0.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`78c9f070230`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78c9f070230) - Bump algoliasearch version from ^3.33.0 to ^3.35.1. In @atlaskit/help we updated the example 3 and moved Algolia API related code to it's own react hook
|
|
24
|
+
|
|
3
25
|
## 4.0.0
|
|
4
26
|
|
|
5
27
|
### Major Changes
|
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = exports.BackButton = void 0;
|
|
11
9
|
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
11
|
|
|
16
12
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -19,15 +15,13 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
19
15
|
|
|
20
16
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
21
17
|
|
|
22
|
-
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
23
|
-
|
|
24
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
25
19
|
|
|
26
20
|
var _reactTransitionGroup = require("react-transition-group");
|
|
27
21
|
|
|
28
22
|
var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
|
|
29
23
|
|
|
30
|
-
var
|
|
24
|
+
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
31
25
|
|
|
32
26
|
var _version = require("../../version.json");
|
|
33
27
|
|
|
@@ -37,19 +31,11 @@ var _constants2 = require("../constants");
|
|
|
37
31
|
|
|
38
32
|
var _styled = require("./styled");
|
|
39
33
|
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
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; }
|
|
34
|
+
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; }
|
|
43
35
|
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
47
|
-
|
|
48
|
-
var buttonTheme = {
|
|
49
|
-
color: colors.N500,
|
|
50
|
-
fontWeight: 500
|
|
51
|
-
}; // Animation
|
|
36
|
+
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; }
|
|
52
37
|
|
|
38
|
+
// Animation
|
|
53
39
|
var defaultStyle = {
|
|
54
40
|
transition: "left ".concat(_constants2.TRANSITION_DURATION_MS, "ms, opacity ").concat(_constants2.TRANSITION_DURATION_MS, "ms"),
|
|
55
41
|
left: "".concat((0, _constants.gridSize)() * 3, "px"),
|
|
@@ -93,22 +79,13 @@ var BackButton = function BackButton(_ref) {
|
|
|
93
79
|
}, function (state) {
|
|
94
80
|
return /*#__PURE__*/_react.default.createElement(_styled.BackButtonContainer, {
|
|
95
81
|
style: _objectSpread(_objectSpread({}, defaultStyle), transitionStyles[state])
|
|
96
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
97
83
|
onClick: function onClick(event) {
|
|
98
84
|
if (state === 'entered') {
|
|
99
85
|
handleOnClick(event);
|
|
100
86
|
}
|
|
101
87
|
},
|
|
102
88
|
appearance: "subtle",
|
|
103
|
-
theme: function theme(currentTheme, themeProps) {
|
|
104
|
-
var _currentTheme = currentTheme(themeProps),
|
|
105
|
-
buttonStyles = _currentTheme.buttonStyles,
|
|
106
|
-
rest = (0, _objectWithoutProperties2.default)(_currentTheme, ["buttonStyles"]);
|
|
107
|
-
|
|
108
|
-
return _objectSpread({
|
|
109
|
-
buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), buttonTheme)
|
|
110
|
-
}, rest);
|
|
111
|
-
},
|
|
112
89
|
iconBefore: /*#__PURE__*/_react.default.createElement(_arrowLeft.default, {
|
|
113
90
|
label: "",
|
|
114
91
|
size: "medium"
|
|
@@ -15,7 +15,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
15
15
|
|
|
16
16
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
19
19
|
|
|
20
20
|
var _close = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/close"));
|
|
21
21
|
|
|
@@ -51,7 +51,7 @@ var CloseButton = function CloseButton(_ref) {
|
|
|
51
51
|
return /*#__PURE__*/_react.default.createElement(_styled.CloseButtonContainer, null, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
52
52
|
content: formatMessage(_messages.messages.help_panel_header_close),
|
|
53
53
|
position: "left"
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
55
55
|
onClick: handleOnClick,
|
|
56
56
|
appearance: "subtle",
|
|
57
57
|
iconBefore: /*#__PURE__*/_react.default.createElement(_close.default, {
|
|
@@ -17,6 +17,8 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
17
17
|
|
|
18
18
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
21
23
|
|
|
22
24
|
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); }
|
|
@@ -26,7 +28,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
26
28
|
var HEADER_TITLE_HEIGHT = (0, _constants.gridSize)() * 7;
|
|
27
29
|
var HEADER_TITLE_BORDER_BOTTOM = 2;
|
|
28
30
|
|
|
29
|
-
var HeaderContainer = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-bottom: ", "px solid
|
|
31
|
+
var HeaderContainer = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-bottom: ", "px solid\n ", ";\n justify-content: space-between;\n position: relative;\n"])), (0, _tokens.token)('color.background.neutral', colors.N10), HEADER_TITLE_BORDER_BOTTOM, (0, _tokens.token)('color.border', colors.N30));
|
|
30
32
|
|
|
31
33
|
exports.HeaderContainer = HeaderContainer;
|
|
32
34
|
|
|
@@ -38,7 +40,7 @@ var BackButtonContainer = _styled.default.div(_templateObject3 || (_templateObje
|
|
|
38
40
|
|
|
39
41
|
exports.BackButtonContainer = BackButtonContainer;
|
|
40
42
|
|
|
41
|
-
var HeaderTitle = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n text-align: center;\n font-size: 1rem;\n font-weight: 600;\n line-height: ", "px;\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n display: inline-block;\n overflow: hidden;\n vertical-align: middle;\n"])), colors.N500, HEADER_TITLE_HEIGHT);
|
|
43
|
+
var HeaderTitle = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n text-align: center;\n font-size: 1rem;\n font-weight: 600;\n line-height: ", "px;\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n display: inline-block;\n overflow: hidden;\n vertical-align: middle;\n"])), (0, _tokens.token)('color.text.subtle', colors.N500), HEADER_TITLE_HEIGHT);
|
|
42
44
|
|
|
43
45
|
exports.HeaderTitle = HeaderTitle;
|
|
44
46
|
|
|
@@ -19,13 +19,15 @@ var _messages = require("../messages");
|
|
|
19
19
|
|
|
20
20
|
var _styled = require("./styled");
|
|
21
21
|
|
|
22
|
+
var _excluded = ["isLoading", "footer", "children", "intl"];
|
|
23
|
+
|
|
22
24
|
var HelpContent = function HelpContent(props) {
|
|
23
25
|
var _props$isLoading = props.isLoading,
|
|
24
26
|
isLoading = _props$isLoading === void 0 ? false : _props$isLoading,
|
|
25
27
|
footer = props.footer,
|
|
26
28
|
children = props.children,
|
|
27
29
|
formatMessage = props.intl.formatMessage,
|
|
28
|
-
rest = (0, _objectWithoutProperties2.default)(props,
|
|
30
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
29
31
|
return /*#__PURE__*/_react.default.createElement(_styled.Container, null, /*#__PURE__*/_react.default.createElement(_styled.Section, null, /*#__PURE__*/_react.default.createElement(_Header.default, rest), isLoading ? /*#__PURE__*/_react.default.createElement(_styled.LoadingContainer, {
|
|
30
32
|
"aria-label": formatMessage(_messages.messages.help_loading),
|
|
31
33
|
role: "img"
|
|
@@ -19,13 +19,15 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
19
19
|
|
|
20
20
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
21
21
|
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
23
|
+
|
|
22
24
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
23
25
|
|
|
24
26
|
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); }
|
|
25
27
|
|
|
26
28
|
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; }
|
|
27
29
|
|
|
28
|
-
var Container = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n background-color:
|
|
30
|
+
var Container = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n background-color: ", ";\n"])), (0, _tokens.token)('elevation.surface', '#FFFFFF'));
|
|
29
31
|
|
|
30
32
|
exports.Container = Container;
|
|
31
33
|
|
|
@@ -33,12 +35,12 @@ var Section = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _t
|
|
|
33
35
|
|
|
34
36
|
exports.Section = Section;
|
|
35
37
|
|
|
36
|
-
var DividerLine = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", "px;\n margin-top: ", "px;\n box-sizing: border-box;\n"])), colors.N30A, 2 * (0, _constants.gridSize)(), (0, _constants.gridSize)() * 2);
|
|
38
|
+
var DividerLine = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", "px;\n margin-top: ", "px;\n box-sizing: border-box;\n"])), (0, _tokens.token)('color.border', colors.N30A), 2 * (0, _constants.gridSize)(), (0, _constants.gridSize)() * 2);
|
|
37
39
|
|
|
38
40
|
exports.DividerLine = DividerLine;
|
|
39
41
|
var FOOTER_BORDER_TOP = 2;
|
|
40
42
|
|
|
41
|
-
var HelpFooter = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px 0;\n box-sizing: border-box;\n background-color: ", ";\n border-top: ", "px solid ", ";\n justify-content: space-between;\n"])), (0, _constants.gridSize)(), colors.N10, FOOTER_BORDER_TOP, colors.N30);
|
|
43
|
+
var HelpFooter = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px 0;\n box-sizing: border-box;\n background-color: ", ";\n border-top: ", "px solid ", ";\n justify-content: space-between;\n"])), (0, _constants.gridSize)(), (0, _tokens.token)('color.background.neutral', colors.N10), FOOTER_BORDER_TOP, (0, _tokens.token)('color.border', colors.N30));
|
|
42
44
|
/**
|
|
43
45
|
* Loading
|
|
44
46
|
*/
|
|
@@ -57,6 +59,6 @@ var LoadingRectangle = _styled.default.div(_templateObject7 || (_templateObject7
|
|
|
57
59
|
return props.marginTop ? props.marginTop : (0, _constants.gridSize)() + 'px';
|
|
58
60
|
}, function (props) {
|
|
59
61
|
return props.contentWidth ? props.contentWidth : '100%';
|
|
60
|
-
}, shimmer, colors.N30, colors.N30, colors.N40, colors.N30);
|
|
62
|
+
}, shimmer, (0, _tokens.token)('color.background.neutral', colors.N30), (0, _tokens.token)('color.background.neutral.subtle', colors.N30), (0, _tokens.token)('color.background.neutral', colors.N40), (0, _tokens.token)('color.background.neutral.subtle', colors.N30));
|
|
61
63
|
|
|
62
64
|
exports.LoadingRectangle = LoadingRectangle;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
|
-
import * as colors from '@atlaskit/theme/colors';
|
|
5
4
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
5
|
import { Transition } from 'react-transition-group';
|
|
7
6
|
import ArrowleftIcon from '@atlaskit/icon/glyph/arrow-left';
|
|
8
|
-
import Button from '@atlaskit/button/
|
|
7
|
+
import Button from '@atlaskit/button/standard-button';
|
|
9
8
|
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
10
9
|
import { messages } from '../../messages';
|
|
11
10
|
import { TRANSITION_DURATION_MS } from '../constants';
|
|
12
11
|
import { BackButtonContainer } from './styled';
|
|
13
|
-
|
|
14
|
-
color: colors.N500,
|
|
15
|
-
fontWeight: 500
|
|
16
|
-
}; // Animation
|
|
17
|
-
|
|
12
|
+
// Animation
|
|
18
13
|
const defaultStyle = {
|
|
19
14
|
transition: `left ${TRANSITION_DURATION_MS}ms, opacity ${TRANSITION_DURATION_MS}ms`,
|
|
20
15
|
left: `${gridSize() * 3}px`,
|
|
@@ -66,18 +61,6 @@ export const BackButton = ({
|
|
|
66
61
|
}
|
|
67
62
|
},
|
|
68
63
|
appearance: "subtle",
|
|
69
|
-
theme: (currentTheme, themeProps) => {
|
|
70
|
-
const {
|
|
71
|
-
buttonStyles,
|
|
72
|
-
...rest
|
|
73
|
-
} = currentTheme(themeProps);
|
|
74
|
-
return {
|
|
75
|
-
buttonStyles: { ...buttonStyles,
|
|
76
|
-
...buttonTheme
|
|
77
|
-
},
|
|
78
|
-
...rest
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
64
|
iconBefore: /*#__PURE__*/React.createElement(ArrowleftIcon, {
|
|
82
65
|
label: "",
|
|
83
66
|
size: "medium"
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
5
|
-
import Button from '@atlaskit/button/
|
|
5
|
+
import Button from '@atlaskit/button/standard-button';
|
|
6
6
|
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
7
7
|
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
8
8
|
import { messages } from '../../messages';
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
const HEADER_TITLE_HEIGHT = gridSize() * 7;
|
|
6
7
|
const HEADER_TITLE_BORDER_BOTTOM = 2;
|
|
7
8
|
export const HeaderContainer = styled.div`
|
|
8
|
-
background-color: ${colors.N10};
|
|
9
|
-
border-bottom: ${HEADER_TITLE_BORDER_BOTTOM}px solid
|
|
9
|
+
background-color: ${token('color.background.neutral', colors.N10)};
|
|
10
|
+
border-bottom: ${HEADER_TITLE_BORDER_BOTTOM}px solid
|
|
11
|
+
${token('color.border', colors.N30)};
|
|
10
12
|
justify-content: space-between;
|
|
11
13
|
position: relative;
|
|
12
14
|
`;
|
|
@@ -21,7 +23,7 @@ export const BackButtonContainer = styled.div`
|
|
|
21
23
|
left: ${gridSize()}px;
|
|
22
24
|
`;
|
|
23
25
|
export const HeaderTitle = styled.div`
|
|
24
|
-
color: ${colors.N500};
|
|
26
|
+
color: ${token('color.text.subtle', colors.N500)};
|
|
25
27
|
text-align: center;
|
|
26
28
|
font-size: 1rem;
|
|
27
29
|
font-weight: 600;
|
|
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
|
|
|
3
3
|
import { keyframes } from '@emotion/core';
|
|
4
4
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
5
5
|
import * as colors from '@atlaskit/theme/colors';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
6
7
|
export const Container = styled.div`
|
|
7
8
|
position: absolute;
|
|
8
9
|
top: 0;
|
|
@@ -11,7 +12,7 @@ export const Container = styled.div`
|
|
|
11
12
|
width: 100%;
|
|
12
13
|
display: flex;
|
|
13
14
|
flex-direction: column;
|
|
14
|
-
background-color: #
|
|
15
|
+
background-color: ${token('elevation.surface', '#FFFFFF')};
|
|
15
16
|
`;
|
|
16
17
|
export const Section = styled.div`
|
|
17
18
|
flex-grow: 1;
|
|
@@ -20,7 +21,7 @@ export const Section = styled.div`
|
|
|
20
21
|
min-height: 0;
|
|
21
22
|
`;
|
|
22
23
|
export const DividerLine = styled.div`
|
|
23
|
-
background-color: ${colors.N30A};
|
|
24
|
+
background-color: ${token('color.border', colors.N30A)};
|
|
24
25
|
height: 2px;
|
|
25
26
|
width: 100%;
|
|
26
27
|
padding: 0 ${2 * gridSize()}px;
|
|
@@ -31,8 +32,8 @@ const FOOTER_BORDER_TOP = 2;
|
|
|
31
32
|
export const HelpFooter = styled.div`
|
|
32
33
|
padding: ${gridSize()}px 0;
|
|
33
34
|
box-sizing: border-box;
|
|
34
|
-
background-color: ${colors.N10};
|
|
35
|
-
border-top: ${FOOTER_BORDER_TOP}px solid ${colors.N30};
|
|
35
|
+
background-color: ${token('color.background.neutral', colors.N10)};
|
|
36
|
+
border-top: ${FOOTER_BORDER_TOP}px solid ${token('color.border', colors.N30)};
|
|
36
37
|
justify-content: space-between;
|
|
37
38
|
`;
|
|
38
39
|
/**
|
|
@@ -62,12 +63,12 @@ export const LoadingRectangle = styled.div`
|
|
|
62
63
|
animation-iteration-count: infinite;
|
|
63
64
|
animation-name: ${shimmer};
|
|
64
65
|
animation-timing-function: linear;
|
|
65
|
-
background-color: ${colors.N30};
|
|
66
|
+
background-color: ${token('color.background.neutral', colors.N30)};
|
|
66
67
|
background-image: linear-gradient(
|
|
67
68
|
to right,
|
|
68
|
-
${colors.N30} 10%,
|
|
69
|
-
${colors.N40} 20%,
|
|
70
|
-
${colors.N30} 30%
|
|
69
|
+
${token('color.background.neutral.subtle', colors.N30)} 10%,
|
|
70
|
+
${token('color.background.neutral', colors.N40)} 20%,
|
|
71
|
+
${token('color.background.neutral.subtle', colors.N30)} 30%
|
|
71
72
|
);
|
|
72
73
|
background-repeat: no-repeat;
|
|
73
74
|
`;
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
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; }
|
|
5
4
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
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; }
|
|
7
6
|
|
|
8
7
|
import React from 'react';
|
|
9
8
|
import { injectIntl } from 'react-intl-next';
|
|
10
9
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
11
|
-
import * as colors from '@atlaskit/theme/colors';
|
|
12
10
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
13
11
|
import { Transition } from 'react-transition-group';
|
|
14
12
|
import ArrowleftIcon from '@atlaskit/icon/glyph/arrow-left';
|
|
15
|
-
import Button from '@atlaskit/button/
|
|
13
|
+
import Button from '@atlaskit/button/standard-button';
|
|
16
14
|
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
17
15
|
import { messages } from '../../messages';
|
|
18
16
|
import { TRANSITION_DURATION_MS } from '../constants';
|
|
19
17
|
import { BackButtonContainer } from './styled';
|
|
20
|
-
|
|
21
|
-
color: colors.N500,
|
|
22
|
-
fontWeight: 500
|
|
23
|
-
}; // Animation
|
|
24
|
-
|
|
18
|
+
// Animation
|
|
25
19
|
var defaultStyle = {
|
|
26
20
|
transition: "left ".concat(TRANSITION_DURATION_MS, "ms, opacity ").concat(TRANSITION_DURATION_MS, "ms"),
|
|
27
21
|
left: "".concat(gridSize() * 3, "px"),
|
|
@@ -71,15 +65,6 @@ export var BackButton = function BackButton(_ref) {
|
|
|
71
65
|
}
|
|
72
66
|
},
|
|
73
67
|
appearance: "subtle",
|
|
74
|
-
theme: function theme(currentTheme, themeProps) {
|
|
75
|
-
var _currentTheme = currentTheme(themeProps),
|
|
76
|
-
buttonStyles = _currentTheme.buttonStyles,
|
|
77
|
-
rest = _objectWithoutProperties(_currentTheme, ["buttonStyles"]);
|
|
78
|
-
|
|
79
|
-
return _objectSpread({
|
|
80
|
-
buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), buttonTheme)
|
|
81
|
-
}, rest);
|
|
82
|
-
},
|
|
83
68
|
iconBefore: /*#__PURE__*/React.createElement(ArrowleftIcon, {
|
|
84
69
|
label: "",
|
|
85
70
|
size: "medium"
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
5
|
-
import Button from '@atlaskit/button/
|
|
5
|
+
import Button from '@atlaskit/button/standard-button';
|
|
6
6
|
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
7
7
|
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
8
8
|
import { messages } from '../../messages';
|
|
@@ -6,10 +6,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
6
6
|
import styled from '@emotion/styled';
|
|
7
7
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
9
10
|
var HEADER_TITLE_HEIGHT = gridSize() * 7;
|
|
10
11
|
var HEADER_TITLE_BORDER_BOTTOM = 2;
|
|
11
|
-
export var HeaderContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-bottom: ", "px solid
|
|
12
|
+
export var HeaderContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-bottom: ", "px solid\n ", ";\n justify-content: space-between;\n position: relative;\n"])), token('color.background.neutral', colors.N10), HEADER_TITLE_BORDER_BOTTOM, token('color.border', colors.N30));
|
|
12
13
|
export var CloseButtonContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", "px;\n top: ", "px;\n"])), gridSize(), gridSize() * 1.5);
|
|
13
14
|
export var BackButtonContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n"])), gridSize() * 1.5, gridSize());
|
|
14
|
-
export var HeaderTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n text-align: center;\n font-size: 1rem;\n font-weight: 600;\n line-height: ", "px;\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n display: inline-block;\n overflow: hidden;\n vertical-align: middle;\n"])), colors.N500, HEADER_TITLE_HEIGHT);
|
|
15
|
+
export var HeaderTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n text-align: center;\n font-size: 1rem;\n font-weight: 600;\n line-height: ", "px;\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n display: inline-block;\n overflow: hidden;\n vertical-align: middle;\n"])), token('color.text.subtle', colors.N500), HEADER_TITLE_HEIGHT);
|
|
15
16
|
export var HeaderContent = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 0 ", "px ", "px ", "px;\n"])), gridSize() * 2, gridSize() * 2, gridSize() * 2);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["isLoading", "footer", "children", "intl"];
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { injectIntl } from 'react-intl-next';
|
|
4
5
|
import Header from './Header';
|
|
@@ -10,7 +11,7 @@ export var HelpContent = function HelpContent(props) {
|
|
|
10
11
|
footer = props.footer,
|
|
11
12
|
children = props.children,
|
|
12
13
|
formatMessage = props.intl.formatMessage,
|
|
13
|
-
rest = _objectWithoutProperties(props,
|
|
14
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
14
15
|
|
|
15
16
|
return /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Section, null, /*#__PURE__*/React.createElement(Header, rest), isLoading ? /*#__PURE__*/React.createElement(LoadingContainer, {
|
|
16
17
|
"aria-label": formatMessage(messages.help_loading),
|
|
@@ -7,11 +7,12 @@ import styled from '@emotion/styled';
|
|
|
7
7
|
import { keyframes } from '@emotion/core';
|
|
8
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
9
|
import * as colors from '@atlaskit/theme/colors';
|
|
10
|
-
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
11
|
+
export var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n background-color: ", ";\n"])), token('elevation.surface', '#FFFFFF'));
|
|
11
12
|
export var Section = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n min-height: 0;\n"])));
|
|
12
|
-
export var DividerLine = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", "px;\n margin-top: ", "px;\n box-sizing: border-box;\n"])), colors.N30A, 2 * gridSize(), gridSize() * 2);
|
|
13
|
+
export var DividerLine = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", "px;\n margin-top: ", "px;\n box-sizing: border-box;\n"])), token('color.border', colors.N30A), 2 * gridSize(), gridSize() * 2);
|
|
13
14
|
var FOOTER_BORDER_TOP = 2;
|
|
14
|
-
export var HelpFooter = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", "px 0;\n box-sizing: border-box;\n background-color: ", ";\n border-top: ", "px solid ", ";\n justify-content: space-between;\n"])), gridSize(), colors.N10, FOOTER_BORDER_TOP, colors.N30);
|
|
15
|
+
export var HelpFooter = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", "px 0;\n box-sizing: border-box;\n background-color: ", ";\n border-top: ", "px solid ", ";\n justify-content: space-between;\n"])), gridSize(), token('color.background.neutral', colors.N10), FOOTER_BORDER_TOP, token('color.border', colors.N30));
|
|
15
16
|
/**
|
|
16
17
|
* Loading
|
|
17
18
|
*/
|
|
@@ -24,4 +25,4 @@ export var LoadingRectangle = styled.div(_templateObject7 || (_templateObject7 =
|
|
|
24
25
|
return props.marginTop ? props.marginTop : gridSize() + 'px';
|
|
25
26
|
}, function (props) {
|
|
26
27
|
return props.contentWidth ? props.contentWidth : '100%';
|
|
27
|
-
}, shimmer, colors.N30, colors.N30, colors.N40, colors.N30);
|
|
28
|
+
}, shimmer, token('color.background.neutral', colors.N30), token('color.background.neutral.subtle', colors.N30), token('color.background.neutral', colors.N40), token('color.background.neutral.subtle', colors.N30));
|
package/dist/esm/version.json
CHANGED
|
@@ -5,5 +5,5 @@ export declare type Props = HelpLayoutProps & WithAnalyticsEventsProps;
|
|
|
5
5
|
export declare class HelpLayout extends React.PureComponent<Props> {
|
|
6
6
|
render(): JSX.Element;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props, "children" | "footer" | "
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props, "children" | "footer" | "headerTitle" | "headerContent" | "isBackbuttonVisible" | "onCloseButtonClick" | "onBackButtonClick" | "isLoading"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "footer" | "key" | "analyticsContext" | "headerTitle" | "headerContent" | "isBackbuttonVisible" | "onCloseButtonClick" | "onBackButtonClick" | "isLoading"> & React.RefAttributes<any>>;
|
|
9
9
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/help-layout",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Layout for the atlaskit/help component.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,9 +25,10 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/analytics": "^8.0.0",
|
|
27
27
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
28
|
-
"@atlaskit/button": "^16.
|
|
29
|
-
"@atlaskit/icon": "^21.
|
|
30
|
-
"@atlaskit/theme": "^12.
|
|
28
|
+
"@atlaskit/button": "^16.2.0",
|
|
29
|
+
"@atlaskit/icon": "^21.10.0",
|
|
30
|
+
"@atlaskit/theme": "^12.1.0",
|
|
31
|
+
"@atlaskit/tokens": "^0.7.0",
|
|
31
32
|
"@atlaskit/tooltip": "^17.5.0",
|
|
32
33
|
"@babel/runtime": "^7.0.0",
|
|
33
34
|
"@emotion/core": "^10.0.9",
|
|
@@ -43,10 +44,10 @@
|
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@atlaskit/docs": "*",
|
|
45
46
|
"@atlaskit/navigation": "^37.0.0",
|
|
46
|
-
"@atlaskit/page": "^12.
|
|
47
|
-
"@atlaskit/right-side-panel": "^1.
|
|
47
|
+
"@atlaskit/page": "^12.1.0",
|
|
48
|
+
"@atlaskit/right-side-panel": "^1.1.0",
|
|
48
49
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
49
|
-
"algoliasearch": "^3.
|
|
50
|
+
"algoliasearch": "^3.35.1",
|
|
50
51
|
"enzyme": "^3.10.0",
|
|
51
52
|
"react-test-renderer": "^16.8.0",
|
|
52
53
|
"typescript": "3.9.6"
|
|
@@ -57,5 +58,10 @@
|
|
|
57
58
|
"ui",
|
|
58
59
|
"help"
|
|
59
60
|
],
|
|
60
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
61
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
62
|
+
"techstack": {
|
|
63
|
+
"@repo/internal": {
|
|
64
|
+
"theming": "tokens"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
61
67
|
}
|