@atlaskit/inline-message 11.4.5 → 11.4.7
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/dist/cjs/components/inline-message/index.js +17 -6
- package/dist/cjs/constants.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/inline-message/index.js +12 -2
- package/dist/es2019/constants.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/inline-message/index.js +15 -6
- package/dist/esm/constants.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/package.json +1 -1
- package/report.api.md +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/inline-message
|
|
2
2
|
|
|
3
|
+
## 11.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b0f6dd0bc35`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b0f6dd0bc35) - Updated to use typography tokens. There is no expected behaviour or visual change.
|
|
8
|
+
|
|
9
|
+
## 11.4.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`25902de2d93`](https://bitbucket.org/atlassian/atlassian-frontend/commits/25902de2d93) - [ux] Added pressed (active) state styles for the secondary text.
|
|
14
|
+
|
|
3
15
|
## 11.4.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
12
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
15
|
|
|
14
16
|
var _react = require("react");
|
|
@@ -23,6 +25,8 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
23
25
|
|
|
24
26
|
var _components = require("@atlaskit/theme/components");
|
|
25
27
|
|
|
28
|
+
var _constants = require("../../constants");
|
|
29
|
+
|
|
26
30
|
var _messageIcon = _interopRequireDefault(require("../message-icon"));
|
|
27
31
|
|
|
28
32
|
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); }
|
|
@@ -37,10 +41,11 @@ var buttonContentsStyles = (0, _react2.css)({
|
|
|
37
41
|
});
|
|
38
42
|
var titleStyles = (0, _react2.css)({
|
|
39
43
|
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
40
|
-
fontWeight: 500
|
|
44
|
+
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
41
45
|
});
|
|
42
46
|
var textStyles = (0, _react2.css)({
|
|
43
47
|
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
48
|
+
color: "var(".concat(_constants.VAR_SECONDARY_TEXT_COLOR, ")"),
|
|
44
49
|
overflow: 'hidden',
|
|
45
50
|
textOverflow: 'ellipsis',
|
|
46
51
|
whiteSpace: 'nowrap'
|
|
@@ -54,12 +59,19 @@ var rootStyles = (0, _react2.css)({
|
|
|
54
59
|
'&:hover': {
|
|
55
60
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
56
61
|
'[data-ds--inline-message--icon]': {
|
|
62
|
+
// Legacy style
|
|
57
63
|
color: 'var(--icon-accent-color)'
|
|
58
64
|
},
|
|
59
65
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
60
66
|
'[data-ds--inline-message--button]': {
|
|
61
67
|
textDecoration: 'underline'
|
|
62
68
|
}
|
|
69
|
+
},
|
|
70
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
71
|
+
'[data-ds--inline-message--button]': {
|
|
72
|
+
'&:active [data-ds--inline-message--secondary-text]': {
|
|
73
|
+
color: "var(--ds-text-subtle, ".concat("var(".concat(_constants.VAR_SECONDARY_TEXT_COLOR, ")"), ")")
|
|
74
|
+
}
|
|
63
75
|
}
|
|
64
76
|
});
|
|
65
77
|
var titleColor = (0, _components.themed)({
|
|
@@ -184,11 +196,10 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
184
196
|
css: titleStyles,
|
|
185
197
|
"data-testid": testId && "".concat(testId, "--title")
|
|
186
198
|
}, title), secondaryText && (0, _react2.jsx)("span", {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
199
|
+
"data-ds--inline-message--secondary-text": true,
|
|
200
|
+
style: (0, _defineProperty2.default)({}, _constants.VAR_SECONDARY_TEXT_COLOR, textColor({
|
|
201
|
+
theme: theme
|
|
202
|
+
})),
|
|
192
203
|
css: textStyles,
|
|
193
204
|
"data-testid": testId && "".concat(testId, "--text")
|
|
194
205
|
}, secondaryText)))));
|
package/dist/cjs/constants.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.typesMapping = void 0;
|
|
8
|
+
exports.typesMapping = exports.VAR_SECONDARY_TEXT_COLOR = void 0;
|
|
9
9
|
|
|
10
10
|
var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
|
|
11
11
|
|
|
@@ -37,4 +37,6 @@ var typesMapping = {
|
|
|
37
37
|
defaultLabel: 'error inline message'
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
exports.typesMapping = typesMapping;
|
|
40
|
+
exports.typesMapping = typesMapping;
|
|
41
|
+
var VAR_SECONDARY_TEXT_COLOR = '--secondary-text-color';
|
|
42
|
+
exports.VAR_SECONDARY_TEXT_COLOR = VAR_SECONDARY_TEXT_COLOR;
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,6 +5,7 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
5
5
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
6
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
7
7
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
8
|
+
import { VAR_SECONDARY_TEXT_COLOR } from '../../constants';
|
|
8
9
|
import MessageIcon from '../message-icon';
|
|
9
10
|
const buttonContentsStyles = css({
|
|
10
11
|
display: 'flex',
|
|
@@ -13,10 +14,11 @@ const buttonContentsStyles = css({
|
|
|
13
14
|
});
|
|
14
15
|
const titleStyles = css({
|
|
15
16
|
padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`,
|
|
16
|
-
fontWeight: 500
|
|
17
|
+
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
17
18
|
});
|
|
18
19
|
const textStyles = css({
|
|
19
20
|
padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`,
|
|
21
|
+
color: `var(${VAR_SECONDARY_TEXT_COLOR})`,
|
|
20
22
|
overflow: 'hidden',
|
|
21
23
|
textOverflow: 'ellipsis',
|
|
22
24
|
whiteSpace: 'nowrap'
|
|
@@ -30,12 +32,19 @@ const rootStyles = css({
|
|
|
30
32
|
'&:hover': {
|
|
31
33
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
32
34
|
'[data-ds--inline-message--icon]': {
|
|
35
|
+
// Legacy style
|
|
33
36
|
color: 'var(--icon-accent-color)'
|
|
34
37
|
},
|
|
35
38
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
36
39
|
'[data-ds--inline-message--button]': {
|
|
37
40
|
textDecoration: 'underline'
|
|
38
41
|
}
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
44
|
+
'[data-ds--inline-message--button]': {
|
|
45
|
+
'&:active [data-ds--inline-message--secondary-text]': {
|
|
46
|
+
color: `var(--ds-text-subtle, ${`var(${VAR_SECONDARY_TEXT_COLOR})`})`
|
|
47
|
+
}
|
|
39
48
|
}
|
|
40
49
|
});
|
|
41
50
|
const titleColor = themed({
|
|
@@ -148,8 +157,9 @@ const InlineMessage = ({
|
|
|
148
157
|
css: titleStyles,
|
|
149
158
|
"data-testid": testId && `${testId}--title`
|
|
150
159
|
}, title), secondaryText && jsx("span", {
|
|
160
|
+
"data-ds--inline-message--secondary-text": true,
|
|
151
161
|
style: {
|
|
152
|
-
|
|
162
|
+
[VAR_SECONDARY_TEXT_COLOR]: textColor({
|
|
153
163
|
theme
|
|
154
164
|
})
|
|
155
165
|
},
|
package/dist/es2019/constants.js
CHANGED
package/dist/es2019/version.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
|
|
3
4
|
/** @jsx jsx */
|
|
@@ -7,6 +8,7 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
7
8
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
8
9
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
10
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
11
|
+
import { VAR_SECONDARY_TEXT_COLOR } from '../../constants';
|
|
10
12
|
import MessageIcon from '../message-icon';
|
|
11
13
|
var buttonContentsStyles = css({
|
|
12
14
|
display: 'flex',
|
|
@@ -15,10 +17,11 @@ var buttonContentsStyles = css({
|
|
|
15
17
|
});
|
|
16
18
|
var titleStyles = css({
|
|
17
19
|
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
18
|
-
fontWeight: 500
|
|
20
|
+
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
19
21
|
});
|
|
20
22
|
var textStyles = css({
|
|
21
23
|
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
24
|
+
color: "var(".concat(VAR_SECONDARY_TEXT_COLOR, ")"),
|
|
22
25
|
overflow: 'hidden',
|
|
23
26
|
textOverflow: 'ellipsis',
|
|
24
27
|
whiteSpace: 'nowrap'
|
|
@@ -32,12 +35,19 @@ var rootStyles = css({
|
|
|
32
35
|
'&:hover': {
|
|
33
36
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
34
37
|
'[data-ds--inline-message--icon]': {
|
|
38
|
+
// Legacy style
|
|
35
39
|
color: 'var(--icon-accent-color)'
|
|
36
40
|
},
|
|
37
41
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
38
42
|
'[data-ds--inline-message--button]': {
|
|
39
43
|
textDecoration: 'underline'
|
|
40
44
|
}
|
|
45
|
+
},
|
|
46
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
47
|
+
'[data-ds--inline-message--button]': {
|
|
48
|
+
'&:active [data-ds--inline-message--secondary-text]': {
|
|
49
|
+
color: "var(--ds-text-subtle, ".concat("var(".concat(VAR_SECONDARY_TEXT_COLOR, ")"), ")")
|
|
50
|
+
}
|
|
41
51
|
}
|
|
42
52
|
});
|
|
43
53
|
var titleColor = themed({
|
|
@@ -162,11 +172,10 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
162
172
|
css: titleStyles,
|
|
163
173
|
"data-testid": testId && "".concat(testId, "--title")
|
|
164
174
|
}, title), secondaryText && jsx("span", {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
},
|
|
175
|
+
"data-ds--inline-message--secondary-text": true,
|
|
176
|
+
style: _defineProperty({}, VAR_SECONDARY_TEXT_COLOR, textColor({
|
|
177
|
+
theme: theme
|
|
178
|
+
})),
|
|
170
179
|
css: textStyles,
|
|
171
180
|
"data-testid": testId && "".concat(testId, "--text")
|
|
172
181
|
}, secondaryText)))));
|
package/dist/esm/constants.js
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-message",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.7",
|
|
4
4
|
"description": "An inline message lets users know when important information is available or when an action is required.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
package/report.api.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- API Report Version: 2.
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/inline-message"
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
### Table of contents
|
|
9
9
|
|
|
10
10
|
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
11
12
|
|
|
12
13
|
### Main Entry Types
|
|
13
14
|
|
|
@@ -64,3 +65,15 @@ interface InlineMessageProps {
|
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
<!--SECTION END: Main Entry Types-->
|
|
68
|
+
|
|
69
|
+
### Peer Dependencies
|
|
70
|
+
|
|
71
|
+
<!--SECTION START: Peer Dependencies-->
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"react": "^16.8.0"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
<!--SECTION END: Peer Dependencies-->
|