@atlaskit/empty-state
Advanced tools
Comparing version 7.6.5 to 7.7.0
# @atlaskit/empty-state | ||
## 7.7.0 | ||
### Minor Changes | ||
- [#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. | ||
## 7.6.5 | ||
@@ -4,0 +10,0 @@ |
@@ -35,3 +35,4 @@ "use strict"; | ||
var EmptyState = function EmptyState(_ref) { | ||
var description = _ref.description, | ||
var buttonGroupLabel = _ref.buttonGroupLabel, | ||
description = _ref.description, | ||
header = _ref.header, | ||
@@ -55,3 +56,6 @@ _ref$headingLevel = _ref.headingLevel, | ||
testId = _ref.testId; | ||
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, { | ||
var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/_react.default.createElement(_styled.ActionsContainer, null, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, { | ||
label: buttonGroupLabel || 'Button group', | ||
testId: testId && "".concat(testId, "-button-group") | ||
}, secondaryAction, primaryAction), /*#__PURE__*/_react.default.createElement(_styled.SpinnerContainer, null, isLoading && /*#__PURE__*/_react.default.createElement(_spinner.default, { | ||
testId: "empty-state-spinner" | ||
@@ -58,0 +62,0 @@ }))) : null; |
@@ -28,2 +28,3 @@ import React from 'react'; | ||
const EmptyState = ({ | ||
buttonGroupLabel, | ||
description, | ||
@@ -46,3 +47,6 @@ header, | ||
}) => { | ||
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, { | ||
const actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, { | ||
label: buttonGroupLabel || 'Button group', | ||
testId: testId && `${testId}-button-group` | ||
}, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, { | ||
testId: "empty-state-spinner" | ||
@@ -49,0 +53,0 @@ }))) : null; |
@@ -28,3 +28,4 @@ import React from 'react'; | ||
var EmptyState = function EmptyState(_ref) { | ||
var description = _ref.description, | ||
var buttonGroupLabel = _ref.buttonGroupLabel, | ||
description = _ref.description, | ||
header = _ref.header, | ||
@@ -48,3 +49,6 @@ _ref$headingLevel = _ref.headingLevel, | ||
testId = _ref.testId; | ||
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, { | ||
var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, { | ||
label: buttonGroupLabel || 'Button group', | ||
testId: testId && "".concat(testId, "-button-group") | ||
}, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, { | ||
testId: "empty-state-spinner" | ||
@@ -51,0 +55,0 @@ }))) : null; |
@@ -25,3 +25,3 @@ /// <reference types="react" /> | ||
*/ | ||
declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
export default EmptyState; |
@@ -63,3 +63,3 @@ import type { ReactNode } from 'react'; | ||
/** | ||
* A hook for automated testing | ||
* A hook for automated testing. | ||
*/ | ||
@@ -82,2 +82,6 @@ testId?: string; | ||
imageHeight?: number; | ||
/** | ||
* Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group". | ||
*/ | ||
buttonGroupLabel?: string; | ||
} |
@@ -25,3 +25,3 @@ /// <reference types="react" /> | ||
*/ | ||
declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
export default EmptyState; |
@@ -63,3 +63,3 @@ import type { ReactNode } from 'react'; | ||
/** | ||
* A hook for automated testing | ||
* A hook for automated testing. | ||
*/ | ||
@@ -82,2 +82,6 @@ testId?: string; | ||
imageHeight?: number; | ||
/** | ||
* Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group". | ||
*/ | ||
buttonGroupLabel?: string; | ||
} |
{ | ||
"name": "@atlaskit/empty-state", | ||
"version": "7.6.5", | ||
"version": "7.7.0", | ||
"description": "An empty state appears when there is no data to display and describes what the user can do next.", | ||
@@ -29,6 +29,6 @@ "publishConfig": { | ||
"dependencies": { | ||
"@atlaskit/button": "^17.0.0", | ||
"@atlaskit/button": "^17.3.0", | ||
"@atlaskit/spinner": "^16.0.0", | ||
"@atlaskit/theme": "^12.6.0", | ||
"@atlaskit/tokens": "^1.30.0", | ||
"@atlaskit/tokens": "^1.37.0", | ||
"@babel/runtime": "^7.0.0", | ||
@@ -35,0 +35,0 @@ "@emotion/react": "^11.7.1" |
68970
1211
Updated@atlaskit/button@^17.3.0
Updated@atlaskit/tokens@^1.37.0