@atlaskit/empty-state 7.6.5 → 7.7.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,18 @@
1
1
  # @atlaskit/empty-state
2
2
 
3
+ ## 7.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#72130](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72130) [`b037e5451037`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b037e5451037) - Update new button text color fallback for default theme (non-token) to match that of old button current text color
8
+ - Updated dependencies
9
+
10
+ ## 7.7.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#70568](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70568) [`f1279b936714`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f1279b936714) - [ux] Button group inside empty-state now have default label and possibility to accept a dynamic one.
15
+
3
16
  ## 7.6.5
4
17
 
5
18
  ### Patch Changes
@@ -32,7 +32,8 @@ var _styled = require("./styled");
32
32
  * ```
33
33
  */
34
34
  var EmptyState = function EmptyState(_ref) {
35
- var description = _ref.description,
35
+ var buttonGroupLabel = _ref.buttonGroupLabel,
36
+ description = _ref.description,
36
37
  header = _ref.header,
37
38
  _ref$headingLevel = _ref.headingLevel,
38
39
  headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel,
@@ -51,7 +52,10 @@ var EmptyState = function EmptyState(_ref) {
51
52
  size = _ref.size,
52
53
  tertiaryAction = _ref.tertiaryAction,
53
54
  testId = _ref.testId;
54
- var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/_react.default.createElement(_styled.ActionsContainer, null, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, null, secondaryAction, primaryAction), /*#__PURE__*/_react.default.createElement(_styled.SpinnerContainer, null, isLoading && /*#__PURE__*/_react.default.createElement(_spinner.default, {
55
+ var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/_react.default.createElement(_styled.ActionsContainer, null, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, {
56
+ label: buttonGroupLabel || 'Button group',
57
+ testId: testId && "".concat(testId, "-button-group")
58
+ }, secondaryAction, primaryAction), /*#__PURE__*/_react.default.createElement(_styled.SpinnerContainer, null, isLoading && /*#__PURE__*/_react.default.createElement(_spinner.default, {
55
59
  testId: "empty-state-spinner"
56
60
  }))) : null;
57
61
  return /*#__PURE__*/_react.default.createElement(_styled.Container, {
@@ -25,6 +25,7 @@ import { ActionsContainer, Container, Description, Header, Image as HeaderImage,
25
25
  * ```
26
26
  */
27
27
  const EmptyState = ({
28
+ buttonGroupLabel,
28
29
  description,
29
30
  header,
30
31
  headingLevel = 4,
@@ -42,7 +43,10 @@ const EmptyState = ({
42
43
  tertiaryAction,
43
44
  testId
44
45
  }) => {
45
- const actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, null, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
46
+ const actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, {
47
+ label: buttonGroupLabel || 'Button group',
48
+ testId: testId && `${testId}-button-group`
49
+ }, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
46
50
  testId: "empty-state-spinner"
47
51
  }))) : null;
48
52
  return /*#__PURE__*/React.createElement(Container, {
@@ -25,7 +25,8 @@ import { ActionsContainer, Container, Description, Header, Image as HeaderImage,
25
25
  * ```
26
26
  */
27
27
  var EmptyState = function EmptyState(_ref) {
28
- var description = _ref.description,
28
+ var buttonGroupLabel = _ref.buttonGroupLabel,
29
+ description = _ref.description,
29
30
  header = _ref.header,
30
31
  _ref$headingLevel = _ref.headingLevel,
31
32
  headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel,
@@ -44,7 +45,10 @@ var EmptyState = function EmptyState(_ref) {
44
45
  size = _ref.size,
45
46
  tertiaryAction = _ref.tertiaryAction,
46
47
  testId = _ref.testId;
47
- var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, null, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
48
+ var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, {
49
+ label: buttonGroupLabel || 'Button group',
50
+ testId: testId && "".concat(testId, "-button-group")
51
+ }, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, {
48
52
  testId: "empty-state-spinner"
49
53
  }))) : null;
50
54
  return /*#__PURE__*/React.createElement(Container, {
@@ -22,5 +22,5 @@ import type { EmptyStateProps } from './types';
22
22
  * };
23
23
  * ```
24
24
  */
25
- declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
25
+ declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
26
26
  export default EmptyState;
@@ -60,7 +60,7 @@ export interface EmptyStateProps {
60
60
  */
61
61
  tertiaryAction?: ReactNode;
62
62
  /**
63
- * A hook for automated testing
63
+ * A hook for automated testing.
64
64
  */
65
65
  testId?: string;
66
66
  /**
@@ -78,4 +78,8 @@ export interface EmptyStateProps {
78
78
  * Only set `height` if you want the image to resize down on smaller devices.
79
79
  */
80
80
  imageHeight?: number;
81
+ /**
82
+ * Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group".
83
+ */
84
+ buttonGroupLabel?: string;
81
85
  }
@@ -22,5 +22,5 @@ import type { EmptyStateProps } from './types';
22
22
  * };
23
23
  * ```
24
24
  */
25
- declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
25
+ declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
26
26
  export default EmptyState;
@@ -60,7 +60,7 @@ export interface EmptyStateProps {
60
60
  */
61
61
  tertiaryAction?: ReactNode;
62
62
  /**
63
- * A hook for automated testing
63
+ * A hook for automated testing.
64
64
  */
65
65
  testId?: string;
66
66
  /**
@@ -78,4 +78,8 @@ export interface EmptyStateProps {
78
78
  * Only set `height` if you want the image to resize down on smaller devices.
79
79
  */
80
80
  imageHeight?: number;
81
+ /**
82
+ * Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group".
83
+ */
84
+ buttonGroupLabel?: string;
81
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/empty-state",
3
- "version": "7.6.5",
3
+ "version": "7.7.1",
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/"
@@ -26,10 +26,10 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@atlaskit/button": "^17.0.0",
29
+ "@atlaskit/button": "^17.4.0",
30
30
  "@atlaskit/spinner": "^16.0.0",
31
31
  "@atlaskit/theme": "^12.6.0",
32
- "@atlaskit/tokens": "^1.30.0",
32
+ "@atlaskit/tokens": "^1.37.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@emotion/react": "^11.7.1"
35
35
  },