@atlaskit/inline-message 11.2.6 → 11.3.0
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 +18 -0
- package/constants/package.json +1 -0
- package/dist/cjs/components/inline-message/index.js +8 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/inline-message/index.js +8 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/inline-message/index.js +8 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/inline-message/index.d.ts +15 -10
- package/package.json +6 -4
- package/report.api.md +100 -0
- package/types/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/inline-message
|
|
2
2
|
|
|
3
|
+
## 11.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`38469010a1c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/38469010a1c) - Replaces usage of the `type` prop with `appearance`.
|
|
8
|
+
|
|
9
|
+
## 11.2.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`efa50ac72ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efa50ac72ba) - Adjusts jsdoc strings to improve prop documentation
|
|
14
|
+
|
|
15
|
+
## 11.2.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 11.2.6
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/constants/package.json
CHANGED
|
@@ -126,6 +126,7 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
126
126
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
127
127
|
_ref$type = _ref.type,
|
|
128
128
|
type = _ref$type === void 0 ? 'connectivity' : _ref$type,
|
|
129
|
+
appearance = _ref.appearance,
|
|
129
130
|
children = _ref.children,
|
|
130
131
|
testId = _ref.testId,
|
|
131
132
|
iconLabel = _ref.iconLabel;
|
|
@@ -144,11 +145,16 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
144
145
|
return setIsOpen(false);
|
|
145
146
|
}, [setIsOpen]);
|
|
146
147
|
var theme = (0, _components.useGlobalTheme)();
|
|
148
|
+
|
|
149
|
+
if (!appearance) {
|
|
150
|
+
appearance = type;
|
|
151
|
+
}
|
|
152
|
+
|
|
147
153
|
return (0, _core.jsx)("div", {
|
|
148
154
|
css: rootStyles,
|
|
149
155
|
style: {
|
|
150
156
|
'--icon-accent-color': iconColor({
|
|
151
|
-
appearance:
|
|
157
|
+
appearance: appearance,
|
|
152
158
|
theme: theme
|
|
153
159
|
})
|
|
154
160
|
},
|
|
@@ -169,7 +175,7 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
169
175
|
css: buttonContentsStyles
|
|
170
176
|
}, (0, _core.jsx)(_messageIcon.default, {
|
|
171
177
|
isOpen: isOpen,
|
|
172
|
-
appearance:
|
|
178
|
+
appearance: appearance,
|
|
173
179
|
label: iconLabel
|
|
174
180
|
}), title && (0, _core.jsx)("span", {
|
|
175
181
|
style: {
|
package/dist/cjs/version.json
CHANGED
|
@@ -97,6 +97,7 @@ const InlineMessage = ({
|
|
|
97
97
|
secondaryText = '',
|
|
98
98
|
title = '',
|
|
99
99
|
type = 'connectivity',
|
|
100
|
+
appearance,
|
|
100
101
|
children,
|
|
101
102
|
testId,
|
|
102
103
|
iconLabel
|
|
@@ -107,11 +108,16 @@ const InlineMessage = ({
|
|
|
107
108
|
}, [setIsOpen]);
|
|
108
109
|
const onCloseDialog = useCallback(() => setIsOpen(false), [setIsOpen]);
|
|
109
110
|
const theme = useGlobalTheme();
|
|
111
|
+
|
|
112
|
+
if (!appearance) {
|
|
113
|
+
appearance = type;
|
|
114
|
+
}
|
|
115
|
+
|
|
110
116
|
return jsx("div", {
|
|
111
117
|
css: rootStyles,
|
|
112
118
|
style: {
|
|
113
119
|
'--icon-accent-color': iconColor({
|
|
114
|
-
appearance:
|
|
120
|
+
appearance: appearance,
|
|
115
121
|
theme
|
|
116
122
|
})
|
|
117
123
|
},
|
|
@@ -132,7 +138,7 @@ const InlineMessage = ({
|
|
|
132
138
|
css: buttonContentsStyles
|
|
133
139
|
}, jsx(MessageIcon, {
|
|
134
140
|
isOpen: isOpen,
|
|
135
|
-
appearance:
|
|
141
|
+
appearance: appearance,
|
|
136
142
|
label: iconLabel
|
|
137
143
|
}), title && jsx("span", {
|
|
138
144
|
style: {
|
package/dist/es2019/version.json
CHANGED
|
@@ -103,6 +103,7 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
103
103
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
104
104
|
_ref$type = _ref.type,
|
|
105
105
|
type = _ref$type === void 0 ? 'connectivity' : _ref$type,
|
|
106
|
+
appearance = _ref.appearance,
|
|
106
107
|
children = _ref.children,
|
|
107
108
|
testId = _ref.testId,
|
|
108
109
|
iconLabel = _ref.iconLabel;
|
|
@@ -121,11 +122,16 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
121
122
|
return setIsOpen(false);
|
|
122
123
|
}, [setIsOpen]);
|
|
123
124
|
var theme = useGlobalTheme();
|
|
125
|
+
|
|
126
|
+
if (!appearance) {
|
|
127
|
+
appearance = type;
|
|
128
|
+
}
|
|
129
|
+
|
|
124
130
|
return jsx("div", {
|
|
125
131
|
css: rootStyles,
|
|
126
132
|
style: {
|
|
127
133
|
'--icon-accent-color': iconColor({
|
|
128
|
-
appearance:
|
|
134
|
+
appearance: appearance,
|
|
129
135
|
theme: theme
|
|
130
136
|
})
|
|
131
137
|
},
|
|
@@ -146,7 +152,7 @@ var InlineMessage = function InlineMessage(_ref) {
|
|
|
146
152
|
css: buttonContentsStyles
|
|
147
153
|
}, jsx(MessageIcon, {
|
|
148
154
|
isOpen: isOpen,
|
|
149
|
-
appearance:
|
|
155
|
+
appearance: appearance,
|
|
150
156
|
label: iconLabel
|
|
151
157
|
}), title && jsx("span", {
|
|
152
158
|
style: {
|
package/dist/esm/version.json
CHANGED
|
@@ -23,18 +23,23 @@ interface InlineMessageProps {
|
|
|
23
23
|
* Set the icon to be used before the title. Options are: connectivity,
|
|
24
24
|
* confirmation, info, warning, and error.
|
|
25
25
|
*/
|
|
26
|
+
appearance?: IconAppearance;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-5207 for more information.
|
|
29
|
+
* Instead use the 'appearance' prop.
|
|
30
|
+
* Set the icon to be used before the title.
|
|
31
|
+
*/
|
|
26
32
|
type?: IconAppearance;
|
|
27
33
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* - testId--text to get the text of the actual component.
|
|
34
|
+
A unique string that appears as a data attribute, `data-testid`,
|
|
35
|
+
in the rendered code. It is provided to serve as a hook for automated tests.
|
|
36
|
+
|
|
37
|
+
The value of `testId` is attached to the different sub-components in Inline Message:
|
|
38
|
+
- `testId`: the top-level inline message component
|
|
39
|
+
- `testId--inline-dialog`: the content of the message
|
|
40
|
+
- `testId--button`: the button element that opens the dialog on press
|
|
41
|
+
- `testId--title`: the title of the message
|
|
42
|
+
- `testId--text`: the text of the message
|
|
38
43
|
*/
|
|
39
44
|
testId?: string;
|
|
40
45
|
/**
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-message",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
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/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"deprecatedAutoEntryPoints": true,
|
|
20
20
|
"releaseModel": "scheduled",
|
|
21
21
|
"website": {
|
|
22
|
-
"name": "Inline message"
|
|
22
|
+
"name": "Inline message",
|
|
23
|
+
"category": "Components"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"@atlaskit/icon": "^21.10.0",
|
|
28
29
|
"@atlaskit/inline-dialog": "^13.3.0",
|
|
29
30
|
"@atlaskit/theme": "^12.1.0",
|
|
30
|
-
"@atlaskit/tokens": "^0.
|
|
31
|
+
"@atlaskit/tokens": "^0.10.0",
|
|
31
32
|
"@babel/runtime": "^7.0.0",
|
|
32
33
|
"@emotion/core": "^10.0.9"
|
|
33
34
|
},
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"import-structure": "atlassian-conventions"
|
|
57
58
|
},
|
|
58
59
|
"@repo/internal": {
|
|
60
|
+
"dom-events": "use-bind-event-listener",
|
|
59
61
|
"design-system": "v1",
|
|
60
62
|
"styling": [
|
|
61
63
|
"static",
|
package/report.api.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/inline-message"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
````ts
|
|
6
|
+
import { FC } from 'react';
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
|
|
9
|
+
declare type IconAppearance =
|
|
10
|
+
| 'connectivity'
|
|
11
|
+
| 'confirmation'
|
|
12
|
+
| 'info'
|
|
13
|
+
| 'warning'
|
|
14
|
+
| 'error';
|
|
15
|
+
|
|
16
|
+
declare type InlineDialogPlacement =
|
|
17
|
+
| 'auto-start'
|
|
18
|
+
| 'auto'
|
|
19
|
+
| 'auto-end'
|
|
20
|
+
| 'top-start'
|
|
21
|
+
| 'top'
|
|
22
|
+
| 'top-end'
|
|
23
|
+
| 'right-start'
|
|
24
|
+
| 'right'
|
|
25
|
+
| 'right-end'
|
|
26
|
+
| 'bottom-end'
|
|
27
|
+
| 'bottom'
|
|
28
|
+
| 'bottom-start'
|
|
29
|
+
| 'left-end'
|
|
30
|
+
| 'left'
|
|
31
|
+
| 'left-start';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* __Inline message__
|
|
35
|
+
*
|
|
36
|
+
* An inline message lets users know when important information is available or when an action is required.
|
|
37
|
+
*
|
|
38
|
+
* - [Examples](https://atlassian.design/components/inline-message/examples)
|
|
39
|
+
* - [Code](https://atlassian.design/components/inline-message/code)
|
|
40
|
+
* - [Usage](https://atlassian.design/components/inline-message/usage)
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
*
|
|
44
|
+
* ```jsx
|
|
45
|
+
* const Component = () => (
|
|
46
|
+
* <InlineMessage
|
|
47
|
+
* title="Inline Message Title Example"
|
|
48
|
+
* secondaryText="Secondary Text"
|
|
49
|
+
* >
|
|
50
|
+
* <p>Some text that would be inside the open dialog and otherwise hidden.</p>
|
|
51
|
+
* </InlineMessage>
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare const InlineMessage: FC<InlineMessageProps>;
|
|
56
|
+
export default InlineMessage;
|
|
57
|
+
|
|
58
|
+
declare interface InlineMessageProps {
|
|
59
|
+
/**
|
|
60
|
+
* The elements to be displayed by the inline dialog.
|
|
61
|
+
*/
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* The placement to be passed to the inline dialog. Determines where around
|
|
65
|
+
* the text the dialog is displayed.
|
|
66
|
+
*/
|
|
67
|
+
placement?: InlineDialogPlacement;
|
|
68
|
+
/**
|
|
69
|
+
* Text to display second.
|
|
70
|
+
*/
|
|
71
|
+
secondaryText?: ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Text to display first, bolded for emphasis.
|
|
74
|
+
*/
|
|
75
|
+
title?: ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* Set the icon to be used before the title. Options are: connectivity,
|
|
78
|
+
* confirmation, info, warning, and error.
|
|
79
|
+
*/
|
|
80
|
+
type?: IconAppearance;
|
|
81
|
+
/**
|
|
82
|
+
A unique string that appears as a data attribute, `data-testid`,
|
|
83
|
+
in the rendered code. It is provided to serve as a hook for automated tests.
|
|
84
|
+
|
|
85
|
+
The value of `testId` is attached to the different sub-components in Inline Message:
|
|
86
|
+
- `testId`: the top-level inline message component
|
|
87
|
+
- `testId--inline-dialog`: the content of the message
|
|
88
|
+
- `testId--button`: the button element that opens the dialog on press
|
|
89
|
+
- `testId--title`: the title of the message
|
|
90
|
+
- `testId--text`: the text of the message
|
|
91
|
+
*/
|
|
92
|
+
testId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Text to be used as label for the button icon. Can be used to provide useful information for users with screen readers when there is no title and/or secondaryText
|
|
95
|
+
*/
|
|
96
|
+
iconLabel?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export {};
|
|
100
|
+
````
|