@atlaskit/inline-message 15.0.1 → 15.1.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/inline-message
2
2
 
3
+ ## 15.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#152852](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152852)
8
+ [`ae720e711e4d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae720e711e4d2) -
9
+ Adds `fallbackPlacements` prop for specifying a list of backup placements to try when the main
10
+ `placement` does not have enough space. This matches the API of `Popup`.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 15.0.1
4
17
 
5
18
  ### Patch Changes
@@ -61,7 +61,8 @@ var InlineMessage = function InlineMessage(_ref) {
61
61
  appearance = _ref$appearance === void 0 ? 'connectivity' : _ref$appearance,
62
62
  children = _ref.children,
63
63
  testId = _ref.testId,
64
- iconLabel = _ref.iconLabel;
64
+ iconLabel = _ref.iconLabel,
65
+ fallbackPlacements = _ref.fallbackPlacements;
65
66
  var _useState = (0, _react.useState)(false),
66
67
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
67
68
  isOpen = _useState2[0],
@@ -82,7 +83,8 @@ var InlineMessage = function InlineMessage(_ref) {
82
83
  content: children,
83
84
  isOpen: isOpen,
84
85
  placement: placement,
85
- testId: testId && "".concat(testId, "--inline-dialog")
86
+ testId: testId && "".concat(testId, "--inline-dialog"),
87
+ fallbackPlacements: fallbackPlacements
86
88
  }, /*#__PURE__*/React.createElement(_button.default, {
87
89
  "data-ds--inline-message--button": true,
88
90
  appearance: "subtle-link",
@@ -46,7 +46,8 @@ const InlineMessage = ({
46
46
  appearance = 'connectivity',
47
47
  children,
48
48
  testId,
49
- iconLabel
49
+ iconLabel,
50
+ fallbackPlacements
50
51
  }) => {
51
52
  const [isOpen, setIsOpen] = useState(false);
52
53
  const toggleDialog = useCallback(() => {
@@ -61,7 +62,8 @@ const InlineMessage = ({
61
62
  content: children,
62
63
  isOpen: isOpen,
63
64
  placement: placement,
64
- testId: testId && `${testId}--inline-dialog`
65
+ testId: testId && `${testId}--inline-dialog`,
66
+ fallbackPlacements: fallbackPlacements
65
67
  }, /*#__PURE__*/React.createElement(Button, {
66
68
  "data-ds--inline-message--button": true,
67
69
  appearance: "subtle-link",
@@ -51,7 +51,8 @@ var InlineMessage = function InlineMessage(_ref) {
51
51
  appearance = _ref$appearance === void 0 ? 'connectivity' : _ref$appearance,
52
52
  children = _ref.children,
53
53
  testId = _ref.testId,
54
- iconLabel = _ref.iconLabel;
54
+ iconLabel = _ref.iconLabel,
55
+ fallbackPlacements = _ref.fallbackPlacements;
55
56
  var _useState = useState(false),
56
57
  _useState2 = _slicedToArray(_useState, 2),
57
58
  isOpen = _useState2[0],
@@ -72,7 +73,8 @@ var InlineMessage = function InlineMessage(_ref) {
72
73
  content: children,
73
74
  isOpen: isOpen,
74
75
  placement: placement,
75
- testId: testId && "".concat(testId, "--inline-dialog")
76
+ testId: testId && "".concat(testId, "--inline-dialog"),
77
+ fallbackPlacements: fallbackPlacements
76
78
  }, /*#__PURE__*/React.createElement(Button, {
77
79
  "data-ds--inline-message--button": true,
78
80
  appearance: "subtle-link",
@@ -3,8 +3,9 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type FC, type ReactNode } from 'react';
6
+ import { type InlineDialogProps } from '@atlaskit/inline-dialog';
6
7
  import type { IconAppearance, InlineDialogPlacement } from '../../types';
7
- interface InlineMessageProps {
8
+ interface InlineMessageProps extends Pick<InlineDialogProps, 'fallbackPlacements'> {
8
9
  /**
9
10
  * The elements to be displayed by the inline dialog.
10
11
  */
@@ -3,8 +3,9 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type FC, type ReactNode } from 'react';
6
+ import { type InlineDialogProps } from '@atlaskit/inline-dialog';
6
7
  import type { IconAppearance, InlineDialogPlacement } from '../../types';
7
- interface InlineMessageProps {
8
+ interface InlineMessageProps extends Pick<InlineDialogProps, 'fallbackPlacements'> {
8
9
  /**
9
10
  * The elements to be displayed by the inline dialog.
10
11
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "15.0.1",
3
+ "version": "15.1.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/"
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@atlaskit/button": "^23.0.0",
34
34
  "@atlaskit/icon": "^26.0.0",
35
- "@atlaskit/inline-dialog": "^17.0.0",
35
+ "@atlaskit/inline-dialog": "^17.1.0",
36
36
  "@atlaskit/primitives": "^14.7.0",
37
37
  "@atlaskit/theme": "^18.0.0",
38
38
  "@atlaskit/tokens": "^4.8.0",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/ds-lib": "^4.0.0",
51
51
  "@atlaskit/heading": "^5.2.0",
52
52
  "@atlaskit/link": "^3.1.0",
53
- "@atlaskit/modal-dialog": "^14.1.0",
53
+ "@atlaskit/modal-dialog": "^14.2.0",
54
54
  "@atlaskit/section-message": "^8.2.0",
55
55
  "@atlassian/ssr-tests": "^0.2.0",
56
56
  "@emotion/jest": "^11.8.0",