@atlaskit/inline-message 11.4.1 → 11.4.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/inline-message
2
2
 
3
+ ## 11.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 11.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
14
+
3
15
  ## 11.4.1
4
16
 
5
17
  ### Patch Changes
@@ -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(_constants.itemSpacing, "px"),
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(_constants.itemSpacing, "px"),
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'
@@ -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 = exports.itemSpacing = void 0;
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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.1",
3
+ "version": "11.4.3",
4
4
  "sideEffects": false
5
5
  }
@@ -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: `0 ${itemSpacing}px`,
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: `0 ${itemSpacing}px`,
19
+ padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`,
21
20
  overflow: 'hidden',
22
21
  textOverflow: 'ellipsis',
23
22
  whiteSpace: 'nowrap'
@@ -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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.1",
3
+ "version": "11.4.3",
4
4
  "sideEffects": false
5
5
  }
@@ -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(itemSpacing, "px"),
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(itemSpacing, "px"),
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'
@@ -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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.1",
3
+ "version": "11.4.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,2 @@
1
1
  import type { IconAppearanceMap } from './types';
2
- export declare const itemSpacing: number;
3
2
  export declare const typesMapping: IconAppearanceMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.1",
3
+ "version": "11.4.3",
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,13 +12,6 @@
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
- ]
20
- }
21
- },
22
15
  "sideEffects": false,
23
16
  "atlaskit:src": "src/index.tsx",
24
17
  "atlassian": {
@@ -31,11 +24,11 @@
31
24
  }
32
25
  },
33
26
  "dependencies": {
34
- "@atlaskit/button": "^16.3.0",
35
- "@atlaskit/icon": "^21.10.0",
27
+ "@atlaskit/button": "^16.4.0",
28
+ "@atlaskit/icon": "^21.11.0",
36
29
  "@atlaskit/inline-dialog": "^13.4.0",
37
30
  "@atlaskit/theme": "^12.2.0",
38
- "@atlaskit/tokens": "^0.10.0",
31
+ "@atlaskit/tokens": "^0.11.0",
39
32
  "@babel/runtime": "^7.0.0",
40
33
  "@emotion/react": "^11.7.1"
41
34
  },
@@ -45,7 +38,7 @@
45
38
  "devDependencies": {
46
39
  "@atlaskit/docs": "*",
47
40
  "@atlaskit/ds-lib": "^2.0.1",
48
- "@atlaskit/section-message": "^6.2.0",
41
+ "@atlaskit/section-message": "^6.3.0",
49
42
  "@atlaskit/ssr": "*",
50
43
  "@atlaskit/visual-regression": "*",
51
44
  "@atlaskit/webdriver-runner": "*",
@@ -73,6 +66,7 @@
73
66
  ],
74
67
  "ui-components": "lite-mode",
75
68
  "analytics": "analytics-next",
69
+ "design-tokens": "spacing",
76
70
  "theming": "tokens",
77
71
  "deprecation": "no-deprecated-imports"
78
72
  }
package/report.api.md CHANGED
@@ -2,18 +2,26 @@
2
2
 
3
3
  > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
4
 
5
- ````ts
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
8
+
9
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
10
+
11
+ ```ts
6
12
  import { FC } from 'react';
7
13
  import { ReactNode } from 'react';
8
14
 
9
- declare type IconAppearance =
15
+ // @public (undocumented)
16
+ type IconAppearance =
10
17
  | 'connectivity'
11
18
  | 'confirmation'
12
19
  | 'info'
13
20
  | 'warning'
14
21
  | 'error';
15
22
 
16
- declare type InlineDialogPlacement =
23
+ // @public (undocumented)
24
+ type InlineDialogPlacement =
17
25
  | 'auto-start'
18
26
  | 'auto'
19
27
  | 'auto-end'
@@ -30,71 +38,22 @@ declare type InlineDialogPlacement =
30
38
  | 'left'
31
39
  | 'left-start';
32
40
 
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>;
41
+ // @public
42
+ const InlineMessage: FC<InlineMessageProps>;
56
43
  export default InlineMessage;
57
44
 
58
- declare interface InlineMessageProps {
59
- /**
60
- * The elements to be displayed by the inline dialog.
61
- */
45
+ // @public (undocumented)
46
+ interface InlineMessageProps {
47
+ appearance?: IconAppearance;
62
48
  children?: ReactNode;
63
- /**
64
- * The placement to be passed to the inline dialog. Determines where around
65
- * the text the dialog is displayed.
66
- */
49
+ iconLabel?: string;
67
50
  placement?: InlineDialogPlacement;
68
- /**
69
- * Text to display second.
70
- */
71
51
  secondaryText?: ReactNode;
72
- /**
73
- * Text to display first, bolded for emphasis.
74
- */
52
+ testId?: string;
75
53
  title?: ReactNode;
76
- /**
77
- * Set the icon to be used before the title. Options are: connectivity,
78
- * confirmation, info, warning, and error.
79
- */
54
+ // @deprecated (undocumented)
80
55
  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
56
  }
98
57
 
99
- export {};
100
- ````
58
+ // (No @packageDocumentation comment for this package)
59
+ ```
@@ -1,73 +0,0 @@
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;
@@ -1,16 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import type { IconAppearanceMap } from './types';
2
- export declare const itemSpacing: number;
3
- export declare const typesMapping: IconAppearanceMap;
@@ -1 +0,0 @@
1
- export { default } from './components/inline-message';
@@ -1,9 +0,0 @@
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';