@atlaskit/inline-message 11.4.0 → 11.4.2
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/constants/package.json +8 -1
- package/dist/cjs/components/inline-message/index.js +2 -4
- package/dist/cjs/constants.js +1 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/inline-message/index.js +2 -3
- package/dist/es2019/constants.js +0 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/inline-message/index.js +2 -3
- package/dist/esm/constants.js +0 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/constants.d.ts +0 -1
- package/dist/types-ts4.0/components/inline-message/index.d.ts +73 -0
- package/dist/types-ts4.0/components/message-icon/index.d.ts +16 -0
- package/dist/types-ts4.0/constants.d.ts +2 -0
- package/dist/types-ts4.0/index.d.ts +1 -0
- package/dist/types-ts4.0/types.d.ts +9 -0
- package/package.json +14 -5
- package/report.api.md +10 -2
- package/types/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/inline-message
|
|
2
2
|
|
|
3
|
+
## 11.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
|
|
8
|
+
|
|
9
|
+
## 11.4.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
14
|
+
|
|
3
15
|
## 11.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/constants/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/constants.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/constants.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/constants.d.ts"
|
|
7
|
+
"types": "../dist/types/constants.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/constants.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
@@ -23,8 +23,6 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
23
23
|
|
|
24
24
|
var _components = require("@atlaskit/theme/components");
|
|
25
25
|
|
|
26
|
-
var _constants = require("../../constants");
|
|
27
|
-
|
|
28
26
|
var _messageIcon = _interopRequireDefault(require("../message-icon"));
|
|
29
27
|
|
|
30
28
|
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); }
|
|
@@ -38,11 +36,11 @@ var buttonContentsStyles = (0, _react2.css)({
|
|
|
38
36
|
textDecoration: 'none'
|
|
39
37
|
});
|
|
40
38
|
var titleStyles = (0, _react2.css)({
|
|
41
|
-
padding: "0 ".concat(
|
|
39
|
+
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
42
40
|
fontWeight: 500
|
|
43
41
|
});
|
|
44
42
|
var textStyles = (0, _react2.css)({
|
|
45
|
-
padding: "0 ".concat(
|
|
43
|
+
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
46
44
|
overflow: 'hidden',
|
|
47
45
|
textOverflow: 'ellipsis',
|
|
48
46
|
whiteSpace: 'nowrap'
|
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 =
|
|
8
|
+
exports.typesMapping = void 0;
|
|
9
9
|
|
|
10
10
|
var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
|
|
11
11
|
|
|
@@ -15,10 +15,6 @@ var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
|
|
|
15
15
|
|
|
16
16
|
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
17
17
|
|
|
18
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
19
|
-
|
|
20
|
-
var itemSpacing = (0, _constants.gridSize)() / 2;
|
|
21
|
-
exports.itemSpacing = itemSpacing;
|
|
22
18
|
var typesMapping = {
|
|
23
19
|
connectivity: {
|
|
24
20
|
icon: _warning.default,
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,7 +5,6 @@ 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 { itemSpacing } from '../../constants';
|
|
9
8
|
import MessageIcon from '../message-icon';
|
|
10
9
|
const buttonContentsStyles = css({
|
|
11
10
|
display: 'flex',
|
|
@@ -13,11 +12,11 @@ const buttonContentsStyles = css({
|
|
|
13
12
|
textDecoration: 'none'
|
|
14
13
|
});
|
|
15
14
|
const titleStyles = css({
|
|
16
|
-
padding:
|
|
15
|
+
padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`,
|
|
17
16
|
fontWeight: 500
|
|
18
17
|
});
|
|
19
18
|
const textStyles = css({
|
|
20
|
-
padding:
|
|
19
|
+
padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`,
|
|
21
20
|
overflow: 'hidden',
|
|
22
21
|
textOverflow: 'ellipsis',
|
|
23
22
|
whiteSpace: 'nowrap'
|
package/dist/es2019/constants.js
CHANGED
|
@@ -2,8 +2,6 @@ import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
|
2
2
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
4
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
5
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
export const itemSpacing = gridSize() / 2;
|
|
7
5
|
export const typesMapping = {
|
|
8
6
|
connectivity: {
|
|
9
7
|
icon: WarningIcon,
|
package/dist/es2019/version.json
CHANGED
|
@@ -7,7 +7,6 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
7
7
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
9
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
10
|
-
import { itemSpacing } from '../../constants';
|
|
11
10
|
import MessageIcon from '../message-icon';
|
|
12
11
|
var buttonContentsStyles = css({
|
|
13
12
|
display: 'flex',
|
|
@@ -15,11 +14,11 @@ var buttonContentsStyles = css({
|
|
|
15
14
|
textDecoration: 'none'
|
|
16
15
|
});
|
|
17
16
|
var titleStyles = css({
|
|
18
|
-
padding: "0 ".concat(
|
|
17
|
+
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
19
18
|
fontWeight: 500
|
|
20
19
|
});
|
|
21
20
|
var textStyles = css({
|
|
22
|
-
padding: "0 ".concat(
|
|
21
|
+
padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
|
|
23
22
|
overflow: 'hidden',
|
|
24
23
|
textOverflow: 'ellipsis',
|
|
25
24
|
whiteSpace: 'nowrap'
|
package/dist/esm/constants.js
CHANGED
|
@@ -2,8 +2,6 @@ import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
|
2
2
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
4
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
5
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
export var itemSpacing = gridSize() / 2;
|
|
7
5
|
export var typesMapping = {
|
|
8
6
|
connectivity: {
|
|
9
7
|
icon: WarningIcon,
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
import type { IconAppearance, InlineDialogPlacement } from '../../types';
|
|
4
|
+
interface InlineMessageProps {
|
|
5
|
+
/**
|
|
6
|
+
* The elements to be displayed by the inline dialog.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The placement to be passed to the inline dialog. Determines where around
|
|
11
|
+
* the text the dialog is displayed.
|
|
12
|
+
*/
|
|
13
|
+
placement?: InlineDialogPlacement;
|
|
14
|
+
/**
|
|
15
|
+
* Text to display second.
|
|
16
|
+
*/
|
|
17
|
+
secondaryText?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Text to display first, bolded for emphasis.
|
|
20
|
+
*/
|
|
21
|
+
title?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Set the icon to be used before the title. Options are: connectivity,
|
|
24
|
+
* confirmation, info, warning, and error.
|
|
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
|
+
*/
|
|
32
|
+
type?: IconAppearance;
|
|
33
|
+
/**
|
|
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
|
|
43
|
+
*/
|
|
44
|
+
testId?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 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
|
|
47
|
+
*/
|
|
48
|
+
iconLabel?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* __Inline message__
|
|
52
|
+
*
|
|
53
|
+
* An inline message lets users know when important information is available or when an action is required.
|
|
54
|
+
*
|
|
55
|
+
* - [Examples](https://atlassian.design/components/inline-message/examples)
|
|
56
|
+
* - [Code](https://atlassian.design/components/inline-message/code)
|
|
57
|
+
* - [Usage](https://atlassian.design/components/inline-message/usage)
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
*
|
|
61
|
+
* ```jsx
|
|
62
|
+
* const Component = () => (
|
|
63
|
+
* <InlineMessage
|
|
64
|
+
* title="Inline Message Title Example"
|
|
65
|
+
* secondaryText="Secondary Text"
|
|
66
|
+
* >
|
|
67
|
+
* <p>Some text that would be inside the open dialog and otherwise hidden.</p>
|
|
68
|
+
* </InlineMessage>
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
declare const InlineMessage: FC<InlineMessageProps>;
|
|
73
|
+
export default InlineMessage;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
import type { IconAppearance } from '../../types';
|
|
4
|
+
interface MessageIconProps {
|
|
5
|
+
appearance: IconAppearance;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* __Selected icon__
|
|
11
|
+
*
|
|
12
|
+
* The selected icon is used as the primary interactive element for the dialog.
|
|
13
|
+
* Can be used with or without supporting text.
|
|
14
|
+
*/
|
|
15
|
+
declare const SelectedIcon: FC<MessageIconProps>;
|
|
16
|
+
export default SelectedIcon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './components/inline-message';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import type { GlyphProps } from '@atlaskit/icon';
|
|
3
|
+
export interface Icon {
|
|
4
|
+
defaultLabel: string;
|
|
5
|
+
icon: ComponentType<GlyphProps>;
|
|
6
|
+
}
|
|
7
|
+
export declare type IconAppearanceMap = Record<IconAppearance, Icon>;
|
|
8
|
+
export declare type IconAppearance = 'connectivity' | 'confirmation' | 'info' | 'warning' | 'error';
|
|
9
|
+
export declare type InlineDialogPlacement = 'auto-start' | 'auto' | 'auto-end' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-message",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.2",
|
|
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/"
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.tsx",
|
|
17
25
|
"atlassian": {
|
|
@@ -25,7 +33,7 @@
|
|
|
25
33
|
},
|
|
26
34
|
"dependencies": {
|
|
27
35
|
"@atlaskit/button": "^16.3.0",
|
|
28
|
-
"@atlaskit/icon": "^21.
|
|
36
|
+
"@atlaskit/icon": "^21.11.0",
|
|
29
37
|
"@atlaskit/inline-dialog": "^13.4.0",
|
|
30
38
|
"@atlaskit/theme": "^12.2.0",
|
|
31
39
|
"@atlaskit/tokens": "^0.10.0",
|
|
@@ -38,15 +46,15 @@
|
|
|
38
46
|
"devDependencies": {
|
|
39
47
|
"@atlaskit/docs": "*",
|
|
40
48
|
"@atlaskit/ds-lib": "^2.0.1",
|
|
41
|
-
"@atlaskit/section-message": "^6.
|
|
49
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
42
50
|
"@atlaskit/ssr": "*",
|
|
43
51
|
"@atlaskit/visual-regression": "*",
|
|
44
52
|
"@atlaskit/webdriver-runner": "*",
|
|
45
53
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
46
|
-
"@testing-library/react": "^
|
|
54
|
+
"@testing-library/react": "^12.1.5",
|
|
47
55
|
"enzyme": "^3.10.0",
|
|
48
56
|
"react-dom": "^16.8.0",
|
|
49
|
-
"typescript": "4.
|
|
57
|
+
"typescript": "4.5.5"
|
|
50
58
|
},
|
|
51
59
|
"keywords": [
|
|
52
60
|
"atlaskit",
|
|
@@ -66,6 +74,7 @@
|
|
|
66
74
|
],
|
|
67
75
|
"ui-components": "lite-mode",
|
|
68
76
|
"analytics": "analytics-next",
|
|
77
|
+
"design-tokens": "spacing",
|
|
69
78
|
"theming": "tokens",
|
|
70
79
|
"deprecation": "no-deprecated-imports"
|
|
71
80
|
}
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/inline-message"
|
|
1
|
+
## API Report File for "@atlaskit/inline-message".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
````ts
|
|
6
8
|
import { FC } from 'react';
|
|
@@ -77,6 +79,12 @@ declare interface InlineMessageProps {
|
|
|
77
79
|
* Set the icon to be used before the title. Options are: connectivity,
|
|
78
80
|
* confirmation, info, warning, and error.
|
|
79
81
|
*/
|
|
82
|
+
appearance?: IconAppearance;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-5207 for more information.
|
|
85
|
+
* Instead use the 'appearance' prop.
|
|
86
|
+
* Set the icon to be used before the title.
|
|
87
|
+
*/
|
|
80
88
|
type?: IconAppearance;
|
|
81
89
|
/**
|
|
82
90
|
A unique string that appears as a data attribute, `data-testid`,
|
package/types/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/types.d.ts"
|
|
7
|
+
"types": "../dist/types/types.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/types.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|