@atlaskit/empty-state 9.0.2 → 9.0.4

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,19 @@
1
1
  # @atlaskit/empty-state
2
2
 
3
+ ## 9.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#134760](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134760)
8
+ [`1621a41fa7055`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1621a41fa7055) -
9
+ Do not render button group when there is only one action
10
+
11
+ ## 9.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 9.0.2
4
18
 
5
19
  ### Patch Changes
@@ -54,10 +54,10 @@ var EmptyState = function EmptyState(_ref) {
54
54
  size = _ref.size,
55
55
  tertiaryAction = _ref.tertiaryAction,
56
56
  testId = _ref.testId;
57
- var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/_react.default.createElement(_styled.ActionsContainer, null, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, {
57
+ var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/_react.default.createElement(_styled.ActionsContainer, null, primaryAction && secondaryAction ? /*#__PURE__*/_react.default.createElement(_buttonGroup.default, {
58
58
  label: buttonGroupLabel || 'Button group',
59
59
  testId: testId && "".concat(testId, "-button-group")
60
- }, secondaryAction, primaryAction), /*#__PURE__*/_react.default.createElement(_styled.SpinnerContainer, null, isLoading && /*#__PURE__*/_react.default.createElement(_spinner.default, {
60
+ }, secondaryAction, primaryAction) : primaryAction || secondaryAction, /*#__PURE__*/_react.default.createElement(_styled.SpinnerContainer, null, isLoading && /*#__PURE__*/_react.default.createElement(_spinner.default, {
61
61
  testId: "empty-state-spinner"
62
62
  }))) : null;
63
63
  var tag = "h".concat(headingLevel > 0 && headingLevel < 7 ? headingLevel : headingLevel > 6 ? 6 : 4);
@@ -45,10 +45,10 @@ const EmptyState = ({
45
45
  tertiaryAction,
46
46
  testId
47
47
  }) => {
48
- const actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, {
48
+ const actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, primaryAction && secondaryAction ? /*#__PURE__*/React.createElement(ButtonGroup, {
49
49
  label: buttonGroupLabel || 'Button group',
50
50
  testId: testId && `${testId}-button-group`
51
- }, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
51
+ }, secondaryAction, primaryAction) : primaryAction || secondaryAction, /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
52
52
  testId: "empty-state-spinner"
53
53
  }))) : null;
54
54
  const tag = `h${headingLevel > 0 && headingLevel < 7 ? headingLevel : headingLevel > 6 ? 6 : 4}`;
@@ -47,10 +47,10 @@ var EmptyState = function EmptyState(_ref) {
47
47
  size = _ref.size,
48
48
  tertiaryAction = _ref.tertiaryAction,
49
49
  testId = _ref.testId;
50
- var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, {
50
+ var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, primaryAction && secondaryAction ? /*#__PURE__*/React.createElement(ButtonGroup, {
51
51
  label: buttonGroupLabel || 'Button group',
52
52
  testId: testId && "".concat(testId, "-button-group")
53
- }, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
53
+ }, secondaryAction, primaryAction) : primaryAction || secondaryAction, /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
54
54
  testId: "empty-state-spinner"
55
55
  }))) : null;
56
56
  var tag = "h".concat(headingLevel > 0 && headingLevel < 7 ? headingLevel : headingLevel > 6 ? 6 : 4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/empty-state",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "description": "An empty state appears when there is no data to display and describes what the user can do next.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,7 +25,7 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@atlaskit/button": "^21.1.0",
28
+ "@atlaskit/button": "^22.0.0",
29
29
  "@atlaskit/heading": "^5.1.0",
30
30
  "@atlaskit/primitives": "^14.2.0",
31
31
  "@atlaskit/spinner": "^18.0.0",
@@ -43,9 +43,10 @@
43
43
  "@af/visual-regression": "^1.3.0",
44
44
  "@atlaskit/docs": "^10.0.0",
45
45
  "@atlaskit/ds-lib": "^4.0.0",
46
- "@atlaskit/link": "^3.0.0",
46
+ "@atlaskit/link": "^3.1.0",
47
47
  "@atlaskit/section-message": "^8.2.0",
48
48
  "@atlaskit/ssr": "^0.4.0",
49
+ "@atlassian/ssr-tests": "^0.2.0",
49
50
  "@testing-library/react": "^13.4.0",
50
51
  "react-dom": "^18.2.0",
51
52
  "typescript": "~5.4.2"