@atlaskit/inline-message 12.1.0 → 12.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 +9 -0
- package/dist/cjs/components/inline-message/index.js +15 -38
- package/dist/cjs/constants.js +2 -3
- package/dist/es2019/components/inline-message/index.js +16 -40
- package/dist/es2019/constants.js +1 -2
- package/dist/esm/components/inline-message/index.js +16 -39
- package/dist/esm/constants.js +1 -2
- package/dist/types/constants.d.ts +0 -1
- package/dist/types-ts4.5/constants.d.ts +0 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/inline-message
|
|
2
2
|
|
|
3
|
+
## 12.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#101830](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101830)
|
|
8
|
+
[`3ae5d8dba986`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3ae5d8dba986) -
|
|
9
|
+
Internal change only; update to use primitive components and tokenised typography.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 12.1.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -5,33 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
9
|
var _react = require("react");
|
|
11
10
|
var _react2 = require("@emotion/react");
|
|
12
11
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
13
12
|
var _inlineDialog = _interopRequireDefault(require("@atlaskit/inline-dialog"));
|
|
13
|
+
var _primitives = require("@atlaskit/primitives");
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
15
|
var _messageIcon = _interopRequireDefault(require("../message-icon"));
|
|
17
16
|
/** @jsx jsx */
|
|
18
17
|
|
|
19
|
-
var buttonContentsStyles = (0, _react2.css)({
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
textDecoration: 'none'
|
|
23
|
-
});
|
|
24
|
-
var titleStyles = (0, _react2.css)({
|
|
25
|
-
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
26
|
-
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
27
|
-
});
|
|
28
|
-
var textStyles = (0, _react2.css)({
|
|
29
|
-
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
30
|
-
color: "var(".concat(_constants.VAR_SECONDARY_TEXT_COLOR, ")"),
|
|
31
|
-
overflow: 'hidden',
|
|
32
|
-
textOverflow: 'ellipsis',
|
|
33
|
-
whiteSpace: 'nowrap'
|
|
34
|
-
});
|
|
35
18
|
var rootStyles = (0, _react2.css)({
|
|
36
19
|
display: 'inline-block',
|
|
37
20
|
maxWidth: '100%',
|
|
@@ -48,12 +31,6 @@ var rootStyles = (0, _react2.css)({
|
|
|
48
31
|
'[data-ds--inline-message--button]': {
|
|
49
32
|
textDecoration: 'underline'
|
|
50
33
|
}
|
|
51
|
-
},
|
|
52
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
53
|
-
'[data-ds--inline-message--button]': {
|
|
54
|
-
'&:active [data-ds--inline-message--secondary-text]': {
|
|
55
|
-
color: "var(--ds-text-subtle, ".concat("var(".concat(_constants.VAR_SECONDARY_TEXT_COLOR, ")"), ")")
|
|
56
|
-
}
|
|
57
34
|
}
|
|
58
35
|
});
|
|
59
36
|
var iconColor = function iconColor(appearance) {
|
|
@@ -140,23 +117,23 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
140
117
|
spacing: "none",
|
|
141
118
|
testId: testId && "".concat(testId, "--button"),
|
|
142
119
|
"aria-expanded": isOpen
|
|
143
|
-
}, (0, _react2.jsx)(
|
|
144
|
-
|
|
120
|
+
}, (0, _react2.jsx)(_primitives.Inline, {
|
|
121
|
+
space: "space.050",
|
|
122
|
+
alignBlock: "center"
|
|
145
123
|
}, (0, _react2.jsx)(_messageIcon.default, {
|
|
146
124
|
isOpen: isOpen,
|
|
147
125
|
appearance: appearance,
|
|
148
126
|
label: iconLabel
|
|
149
|
-
}),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}, secondaryText)))));
|
|
127
|
+
}), (0, _react2.jsx)(_primitives.Inline, {
|
|
128
|
+
space: "space.100"
|
|
129
|
+
}, title && (0, _react2.jsx)(_primitives.Text, {
|
|
130
|
+
weight: "medium",
|
|
131
|
+
testId: testId && "".concat(testId, "--title")
|
|
132
|
+
}, title), secondaryText && (0, _react2.jsx)(_primitives.Text, {
|
|
133
|
+
weight: "medium",
|
|
134
|
+
color: "color.text.subtlest",
|
|
135
|
+
maxLines: 1,
|
|
136
|
+
testId: testId && "".concat(testId, "--text")
|
|
137
|
+
}, secondaryText))))));
|
|
161
138
|
};
|
|
162
139
|
var _default = exports.default = InlineMessage;
|
package/dist/cjs/constants.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.typesMapping =
|
|
7
|
+
exports.typesMapping = void 0;
|
|
8
8
|
var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
|
|
9
9
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
10
10
|
var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
|
|
@@ -30,5 +30,4 @@ var typesMapping = exports.typesMapping = {
|
|
|
30
30
|
icon: _error.default,
|
|
31
31
|
defaultLabel: 'error inline message'
|
|
32
32
|
}
|
|
33
|
-
};
|
|
34
|
-
var VAR_SECONDARY_TEXT_COLOR = exports.VAR_SECONDARY_TEXT_COLOR = '--secondary-text-color';
|
|
33
|
+
};
|
|
@@ -3,25 +3,9 @@ import { useCallback, useState } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
5
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Inline, Text } from '@atlaskit/primitives';
|
|
7
|
+
import { B300, G200, P200, R300, Y200 } from '@atlaskit/theme/colors';
|
|
8
8
|
import MessageIcon from '../message-icon';
|
|
9
|
-
const buttonContentsStyles = css({
|
|
10
|
-
display: 'flex',
|
|
11
|
-
alignItems: 'center',
|
|
12
|
-
textDecoration: 'none'
|
|
13
|
-
});
|
|
14
|
-
const titleStyles = css({
|
|
15
|
-
padding: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"}`,
|
|
16
|
-
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
17
|
-
});
|
|
18
|
-
const textStyles = css({
|
|
19
|
-
padding: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"}`,
|
|
20
|
-
color: `var(${VAR_SECONDARY_TEXT_COLOR})`,
|
|
21
|
-
overflow: 'hidden',
|
|
22
|
-
textOverflow: 'ellipsis',
|
|
23
|
-
whiteSpace: 'nowrap'
|
|
24
|
-
});
|
|
25
9
|
const rootStyles = css({
|
|
26
10
|
display: 'inline-block',
|
|
27
11
|
maxWidth: '100%',
|
|
@@ -38,12 +22,6 @@ const rootStyles = css({
|
|
|
38
22
|
'[data-ds--inline-message--button]': {
|
|
39
23
|
textDecoration: 'underline'
|
|
40
24
|
}
|
|
41
|
-
},
|
|
42
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
43
|
-
'[data-ds--inline-message--button]': {
|
|
44
|
-
'&:active [data-ds--inline-message--secondary-text]': {
|
|
45
|
-
color: `var(--ds-text-subtle, ${`var(${VAR_SECONDARY_TEXT_COLOR})`})`
|
|
46
|
-
}
|
|
47
25
|
}
|
|
48
26
|
});
|
|
49
27
|
const iconColor = appearance => {
|
|
@@ -120,25 +98,23 @@ const InlineMessage = ({
|
|
|
120
98
|
spacing: "none",
|
|
121
99
|
testId: testId && `${testId}--button`,
|
|
122
100
|
"aria-expanded": isOpen
|
|
123
|
-
}, jsx(
|
|
124
|
-
|
|
101
|
+
}, jsx(Inline, {
|
|
102
|
+
space: "space.050",
|
|
103
|
+
alignBlock: "center"
|
|
125
104
|
}, jsx(MessageIcon, {
|
|
126
105
|
isOpen: isOpen,
|
|
127
106
|
appearance: appearance,
|
|
128
107
|
label: iconLabel
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
css: textStyles,
|
|
141
|
-
"data-testid": testId && `${testId}--text`
|
|
142
|
-
}, secondaryText)))));
|
|
108
|
+
}), jsx(Inline, {
|
|
109
|
+
space: "space.100"
|
|
110
|
+
}, title && jsx(Text, {
|
|
111
|
+
weight: "medium",
|
|
112
|
+
testId: testId && `${testId}--title`
|
|
113
|
+
}, title), secondaryText && jsx(Text, {
|
|
114
|
+
weight: "medium",
|
|
115
|
+
color: "color.text.subtlest",
|
|
116
|
+
maxLines: 1,
|
|
117
|
+
testId: testId && `${testId}--text`
|
|
118
|
+
}, secondaryText))))));
|
|
143
119
|
};
|
|
144
120
|
export default InlineMessage;
|
package/dist/es2019/constants.js
CHANGED
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { useCallback, useState } from 'react';
|
|
5
4
|
import { css, jsx } from '@emotion/react';
|
|
6
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
7
6
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Inline, Text } from '@atlaskit/primitives';
|
|
8
|
+
import { B300, G200, P200, R300, Y200 } from '@atlaskit/theme/colors';
|
|
10
9
|
import MessageIcon from '../message-icon';
|
|
11
|
-
var buttonContentsStyles = css({
|
|
12
|
-
display: 'flex',
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
textDecoration: 'none'
|
|
15
|
-
});
|
|
16
|
-
var titleStyles = css({
|
|
17
|
-
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
18
|
-
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
19
|
-
});
|
|
20
|
-
var textStyles = css({
|
|
21
|
-
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
22
|
-
color: "var(".concat(VAR_SECONDARY_TEXT_COLOR, ")"),
|
|
23
|
-
overflow: 'hidden',
|
|
24
|
-
textOverflow: 'ellipsis',
|
|
25
|
-
whiteSpace: 'nowrap'
|
|
26
|
-
});
|
|
27
10
|
var rootStyles = css({
|
|
28
11
|
display: 'inline-block',
|
|
29
12
|
maxWidth: '100%',
|
|
@@ -40,12 +23,6 @@ var rootStyles = css({
|
|
|
40
23
|
'[data-ds--inline-message--button]': {
|
|
41
24
|
textDecoration: 'underline'
|
|
42
25
|
}
|
|
43
|
-
},
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
45
|
-
'[data-ds--inline-message--button]': {
|
|
46
|
-
'&:active [data-ds--inline-message--secondary-text]': {
|
|
47
|
-
color: "var(--ds-text-subtle, ".concat("var(".concat(VAR_SECONDARY_TEXT_COLOR, ")"), ")")
|
|
48
|
-
}
|
|
49
26
|
}
|
|
50
27
|
});
|
|
51
28
|
var iconColor = function iconColor(appearance) {
|
|
@@ -132,23 +109,23 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
132
109
|
spacing: "none",
|
|
133
110
|
testId: testId && "".concat(testId, "--button"),
|
|
134
111
|
"aria-expanded": isOpen
|
|
135
|
-
}, jsx(
|
|
136
|
-
|
|
112
|
+
}, jsx(Inline, {
|
|
113
|
+
space: "space.050",
|
|
114
|
+
alignBlock: "center"
|
|
137
115
|
}, jsx(MessageIcon, {
|
|
138
116
|
isOpen: isOpen,
|
|
139
117
|
appearance: appearance,
|
|
140
118
|
label: iconLabel
|
|
141
|
-
}),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}, secondaryText)))));
|
|
119
|
+
}), jsx(Inline, {
|
|
120
|
+
space: "space.100"
|
|
121
|
+
}, title && jsx(Text, {
|
|
122
|
+
weight: "medium",
|
|
123
|
+
testId: testId && "".concat(testId, "--title")
|
|
124
|
+
}, title), secondaryText && jsx(Text, {
|
|
125
|
+
weight: "medium",
|
|
126
|
+
color: "color.text.subtlest",
|
|
127
|
+
maxLines: 1,
|
|
128
|
+
testId: testId && "".concat(testId, "--text")
|
|
129
|
+
}, secondaryText))))));
|
|
153
130
|
};
|
|
154
131
|
export default InlineMessage;
|
package/dist/esm/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-message",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.1",
|
|
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/"
|
|
@@ -32,11 +32,12 @@
|
|
|
32
32
|
"runReact18": true
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/button": "^17.
|
|
36
|
-
"@atlaskit/icon": "^22.
|
|
35
|
+
"@atlaskit/button": "^17.15.0",
|
|
36
|
+
"@atlaskit/icon": "^22.3.0",
|
|
37
37
|
"@atlaskit/inline-dialog": "^14.0.0",
|
|
38
|
-
"@atlaskit/
|
|
39
|
-
"@atlaskit/
|
|
38
|
+
"@atlaskit/primitives": "^6.1.0",
|
|
39
|
+
"@atlaskit/theme": "^12.8.0",
|
|
40
|
+
"@atlaskit/tokens": "^1.49.0",
|
|
40
41
|
"@babel/runtime": "^7.0.0",
|
|
41
42
|
"@emotion/react": "^11.7.1"
|
|
42
43
|
},
|