@atlaskit/inline-message 15.2.1 → 15.3.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/inline-message
2
2
 
3
+ ## 15.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 15.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#160675](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160675)
14
+ [`ec40f9de24066`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ec40f9de24066) -
15
+ Adds `spacing` prop to allow compact spacing on the underlying icon button.
16
+ - [#160675](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160675)
17
+ [`5160a5ab2e887`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5160a5ab2e887) -
18
+ Adds `spacing` prop to allow compact spacing on the underlying icon button.
19
+
3
20
  ## 15.2.1
4
21
 
5
22
  ### Patch Changes
@@ -58,6 +58,8 @@ var InlineMessage = function InlineMessage(_ref) {
58
58
  title = _ref$title === void 0 ? '' : _ref$title,
59
59
  _ref$appearance = _ref.appearance,
60
60
  appearance = _ref$appearance === void 0 ? 'connectivity' : _ref$appearance,
61
+ _ref$spacing = _ref.spacing,
62
+ spacing = _ref$spacing === void 0 ? 'spacious' : _ref$spacing,
61
63
  children = _ref.children,
62
64
  testId = _ref.testId,
63
65
  iconLabel = _ref.iconLabel,
@@ -97,7 +99,8 @@ var InlineMessage = function InlineMessage(_ref) {
97
99
  }, /*#__PURE__*/React.createElement(_messageIcon.default, {
98
100
  isOpen: isOpen,
99
101
  appearance: appearance,
100
- label: iconLabel
102
+ label: iconLabel,
103
+ spacing: spacing
101
104
  }), /*#__PURE__*/React.createElement(_compiled.Inline, {
102
105
  space: "space.100"
103
106
  }, title && /*#__PURE__*/React.createElement(_compiled.Text, {
@@ -31,7 +31,8 @@ var iconColorStyles = null;
31
31
  var SelectedIcon = function SelectedIcon(_ref) {
32
32
  var appearance = _ref.appearance,
33
33
  isOpen = _ref.isOpen,
34
- label = _ref.label;
34
+ label = _ref.label,
35
+ spacing = _ref.spacing;
35
36
  var _typesMapping$appeara = _constants.typesMapping[appearance],
36
37
  Icon = _typesMapping$appeara.icon,
37
38
  defaultLabel = _typesMapping$appeara.defaultLabel;
@@ -43,7 +44,7 @@ var SelectedIcon = function SelectedIcon(_ref) {
43
44
  label: label || defaultLabel,
44
45
  color: "currentColor",
45
46
  LEGACY_size: "medium",
46
- spacing: "spacious"
47
+ spacing: spacing
47
48
  }));
48
49
  };
49
50
  var _default = exports.default = SelectedIcon;
@@ -44,6 +44,7 @@ const InlineMessage = ({
44
44
  secondaryText = '',
45
45
  title = '',
46
46
  appearance = 'connectivity',
47
+ spacing = 'spacious',
47
48
  children,
48
49
  testId,
49
50
  iconLabel,
@@ -77,7 +78,8 @@ const InlineMessage = ({
77
78
  }, /*#__PURE__*/React.createElement(MessageIcon, {
78
79
  isOpen: isOpen,
79
80
  appearance: appearance,
80
- label: iconLabel
81
+ label: iconLabel,
82
+ spacing: spacing
81
83
  }), /*#__PURE__*/React.createElement(Inline, {
82
84
  space: "space.100"
83
85
  }, title && /*#__PURE__*/React.createElement(Text, {
@@ -23,7 +23,8 @@ const iconColorStyles = null;
23
23
  const SelectedIcon = ({
24
24
  appearance,
25
25
  isOpen,
26
- label
26
+ label,
27
+ spacing
27
28
  }) => {
28
29
  const {
29
30
  [appearance]: {
@@ -39,7 +40,7 @@ const SelectedIcon = ({
39
40
  label: label || defaultLabel,
40
41
  color: "currentColor",
41
42
  LEGACY_size: "medium",
42
- spacing: "spacious"
43
+ spacing: spacing
43
44
  }));
44
45
  };
45
46
  export default SelectedIcon;
@@ -49,6 +49,8 @@ var InlineMessage = function InlineMessage(_ref) {
49
49
  title = _ref$title === void 0 ? '' : _ref$title,
50
50
  _ref$appearance = _ref.appearance,
51
51
  appearance = _ref$appearance === void 0 ? 'connectivity' : _ref$appearance,
52
+ _ref$spacing = _ref.spacing,
53
+ spacing = _ref$spacing === void 0 ? 'spacious' : _ref$spacing,
52
54
  children = _ref.children,
53
55
  testId = _ref.testId,
54
56
  iconLabel = _ref.iconLabel,
@@ -88,7 +90,8 @@ var InlineMessage = function InlineMessage(_ref) {
88
90
  }, /*#__PURE__*/React.createElement(MessageIcon, {
89
91
  isOpen: isOpen,
90
92
  appearance: appearance,
91
- label: iconLabel
93
+ label: iconLabel,
94
+ spacing: spacing
92
95
  }), /*#__PURE__*/React.createElement(Inline, {
93
96
  space: "space.100"
94
97
  }, title && /*#__PURE__*/React.createElement(Text, {
@@ -23,7 +23,8 @@ var iconColorStyles = null;
23
23
  var SelectedIcon = function SelectedIcon(_ref) {
24
24
  var appearance = _ref.appearance,
25
25
  isOpen = _ref.isOpen,
26
- label = _ref.label;
26
+ label = _ref.label,
27
+ spacing = _ref.spacing;
27
28
  var _typesMapping$appeara = typesMapping[appearance],
28
29
  Icon = _typesMapping$appeara.icon,
29
30
  defaultLabel = _typesMapping$appeara.defaultLabel;
@@ -35,7 +36,7 @@ var SelectedIcon = function SelectedIcon(_ref) {
35
36
  label: label || defaultLabel,
36
37
  color: "currentColor",
37
38
  LEGACY_size: "medium",
38
- spacing: "spacious"
39
+ spacing: spacing
39
40
  }));
40
41
  };
41
42
  export default SelectedIcon;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type FC, type ReactNode } from 'react';
6
6
  import { type InlineDialogProps } from '@atlaskit/inline-dialog';
7
- import type { IconAppearance, InlineDialogPlacement } from '../../types';
7
+ import type { IconAppearance, IconSpacing, InlineDialogPlacement } from '../../types';
8
8
  interface InlineMessageProps extends Pick<InlineDialogProps, 'fallbackPlacements'> {
9
9
  /**
10
10
  * The elements to be displayed by the inline dialog.
@@ -28,6 +28,10 @@ interface InlineMessageProps extends Pick<InlineDialogProps, 'fallbackPlacements
28
28
  * confirmation, info, warning, and error.
29
29
  */
30
30
  appearance?: IconAppearance;
31
+ /**
32
+ * The spacing of the underlying icon button. Options are: spacious and compact.
33
+ */
34
+ spacing?: IconSpacing;
31
35
  /**
32
36
  * A unique string that appears as a data attribute, `data-testid`,
33
37
  * in the rendered code. It is provided to serve as a hook for automated tests.
@@ -3,11 +3,12 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import type { FC } from 'react';
6
- import type { IconAppearance } from '../../types';
6
+ import type { IconAppearance, IconSpacing } from '../../types';
7
7
  interface MessageIconProps {
8
8
  appearance: IconAppearance;
9
9
  isOpen: boolean;
10
10
  label?: string;
11
+ spacing: IconSpacing;
11
12
  }
12
13
  /**
13
14
  * __Selected icon__
@@ -6,4 +6,5 @@ export interface Icon {
6
6
  }
7
7
  export type IconAppearanceMap = Record<IconAppearance, Icon>;
8
8
  export type IconAppearance = 'connectivity' | 'confirmation' | 'info' | 'warning' | 'error';
9
+ export type IconSpacing = 'spacious' | 'compact';
9
10
  export 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';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type FC, type ReactNode } from 'react';
6
6
  import { type InlineDialogProps } from '@atlaskit/inline-dialog';
7
- import type { IconAppearance, InlineDialogPlacement } from '../../types';
7
+ import type { IconAppearance, IconSpacing, InlineDialogPlacement } from '../../types';
8
8
  interface InlineMessageProps extends Pick<InlineDialogProps, 'fallbackPlacements'> {
9
9
  /**
10
10
  * The elements to be displayed by the inline dialog.
@@ -28,6 +28,10 @@ interface InlineMessageProps extends Pick<InlineDialogProps, 'fallbackPlacements
28
28
  * confirmation, info, warning, and error.
29
29
  */
30
30
  appearance?: IconAppearance;
31
+ /**
32
+ * The spacing of the underlying icon button. Options are: spacious and compact.
33
+ */
34
+ spacing?: IconSpacing;
31
35
  /**
32
36
  * A unique string that appears as a data attribute, `data-testid`,
33
37
  * in the rendered code. It is provided to serve as a hook for automated tests.
@@ -3,11 +3,12 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import type { FC } from 'react';
6
- import type { IconAppearance } from '../../types';
6
+ import type { IconAppearance, IconSpacing } from '../../types';
7
7
  interface MessageIconProps {
8
8
  appearance: IconAppearance;
9
9
  isOpen: boolean;
10
10
  label?: string;
11
+ spacing: IconSpacing;
11
12
  }
12
13
  /**
13
14
  * __Selected icon__
@@ -6,4 +6,5 @@ export interface Icon {
6
6
  }
7
7
  export type IconAppearanceMap = Record<IconAppearance, Icon>;
8
8
  export type IconAppearance = 'connectivity' | 'confirmation' | 'info' | 'warning' | 'error';
9
+ export type IconSpacing = 'spacious' | 'compact';
9
10
  export 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": "15.2.1",
3
+ "version": "15.3.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/"
@@ -31,13 +31,13 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/button": "^23.2.0",
34
- "@atlaskit/icon": "^26.4.0",
34
+ "@atlaskit/icon": "^27.0.0",
35
35
  "@atlaskit/inline-dialog": "^17.2.0",
36
36
  "@atlaskit/link": "^3.2.0",
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/primitives": "^14.8.0",
39
39
  "@atlaskit/theme": "^18.0.0",
40
- "@atlaskit/tokens": "^5.0.0",
40
+ "@atlaskit/tokens": "^5.2.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "@compiled/react": "^0.18.3"
43
43
  },
@@ -48,7 +48,7 @@
48
48
  "@af/accessibility-testing": "workspace:^",
49
49
  "@af/integration-testing": "workspace:^",
50
50
  "@af/visual-regression": "workspace:^",
51
- "@atlaskit/docs": "^10.0.0",
51
+ "@atlaskit/docs": "^11.0.0",
52
52
  "@atlaskit/ds-lib": "^4.0.0",
53
53
  "@atlaskit/heading": "^5.2.0",
54
54
  "@atlaskit/modal-dialog": "^14.2.0",