@atlaskit/empty-state
Advanced tools
Comparing version 7.5.2 to 7.6.0
# @atlaskit/empty-state | ||
## 7.6.0 | ||
### Minor Changes | ||
- [`56d11ec914b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56d11ec914b) - Add a new prop `headingLevel` to set the heading level in the header element. | ||
## 7.5.2 | ||
@@ -4,0 +10,0 @@ |
@@ -37,2 +37,4 @@ "use strict"; | ||
header = _ref.header, | ||
_ref$headingLevel = _ref.headingLevel, | ||
headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel, | ||
imageHeight = _ref.imageHeight, | ||
@@ -70,5 +72,7 @@ imageUrl = _ref.imageUrl, | ||
imageHeight: imageHeight | ||
}), /*#__PURE__*/_react.default.createElement(_styled.Header, null, header), description && /*#__PURE__*/_react.default.createElement(_styled.Description, null, description), actionsContainer, tertiaryAction); | ||
}), /*#__PURE__*/_react.default.createElement(_styled.Header, { | ||
level: headingLevel | ||
}, header), description && /*#__PURE__*/_react.default.createElement(_styled.Description, null, description), actionsContainer, tertiaryAction); | ||
}; | ||
var _default = EmptyState; | ||
exports.default = _default; |
@@ -11,3 +11,3 @@ "use strict"; | ||
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
var headerStyles = (0, _react.css)([(0, _typography.h600)(), { | ||
@@ -26,4 +26,7 @@ marginTop: "var(--ds-space-0, 0px)", | ||
var EmptyStateHeader = function EmptyStateHeader(_ref) { | ||
var children = _ref.children; | ||
return (0, _react.jsx)("h4", { | ||
var children = _ref.children, | ||
_ref$level = _ref.level, | ||
level = _ref$level === void 0 ? 4 : _ref$level; | ||
var Tag = "h".concat(level > 0 && level < 7 ? level : level > 6 ? 6 : 4); | ||
return (0, _react.jsx)(Tag, { | ||
css: headerStyles | ||
@@ -30,0 +33,0 @@ }, children); |
{ | ||
"name": "@atlaskit/empty-state", | ||
"version": "7.5.2", | ||
"version": "7.6.0", | ||
"sideEffects": false | ||
} |
@@ -30,2 +30,3 @@ import React from 'react'; | ||
header, | ||
headingLevel = 4, | ||
imageHeight, | ||
@@ -62,4 +63,6 @@ imageUrl, | ||
imageHeight | ||
}), /*#__PURE__*/React.createElement(Header, null, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction); | ||
}), /*#__PURE__*/React.createElement(Header, { | ||
level: headingLevel | ||
}, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction); | ||
}; | ||
export default EmptyState; |
@@ -5,3 +5,3 @@ /** @jsx jsx */ | ||
import { h600 } from '@atlaskit/theme/typography'; | ||
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
const headerStyles = css([h600(), { | ||
@@ -20,6 +20,10 @@ marginTop: "var(--ds-space-0, 0px)", | ||
const EmptyStateHeader = ({ | ||
children | ||
}) => jsx("h4", { | ||
css: headerStyles | ||
}, children); | ||
children, | ||
level = 4 | ||
}) => { | ||
const Tag = `h${level > 0 && level < 7 ? level : level > 6 ? 6 : 4}`; | ||
return jsx(Tag, { | ||
css: headerStyles | ||
}, children); | ||
}; | ||
export default EmptyStateHeader; |
{ | ||
"name": "@atlaskit/empty-state", | ||
"version": "7.5.2", | ||
"version": "7.6.0", | ||
"sideEffects": false | ||
} |
@@ -30,2 +30,4 @@ import React from 'react'; | ||
header = _ref.header, | ||
_ref$headingLevel = _ref.headingLevel, | ||
headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel, | ||
imageHeight = _ref.imageHeight, | ||
@@ -63,4 +65,6 @@ imageUrl = _ref.imageUrl, | ||
imageHeight: imageHeight | ||
}), /*#__PURE__*/React.createElement(Header, null, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction); | ||
}), /*#__PURE__*/React.createElement(Header, { | ||
level: headingLevel | ||
}, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction); | ||
}; | ||
export default EmptyState; |
@@ -5,3 +5,3 @@ /** @jsx jsx */ | ||
import { h600 } from '@atlaskit/theme/typography'; | ||
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
var headerStyles = css([h600(), { | ||
@@ -20,4 +20,7 @@ marginTop: "var(--ds-space-0, 0px)", | ||
var EmptyStateHeader = function EmptyStateHeader(_ref) { | ||
var children = _ref.children; | ||
return jsx("h4", { | ||
var children = _ref.children, | ||
_ref$level = _ref.level, | ||
level = _ref$level === void 0 ? 4 : _ref$level; | ||
var Tag = "h".concat(level > 0 && level < 7 ? level : level > 6 ? 6 : 4); | ||
return jsx(Tag, { | ||
css: headerStyles | ||
@@ -24,0 +27,0 @@ }, children); |
{ | ||
"name": "@atlaskit/empty-state", | ||
"version": "7.5.2", | ||
"version": "7.6.0", | ||
"sideEffects": false | ||
} |
@@ -25,3 +25,3 @@ /// <reference types="react" /> | ||
*/ | ||
declare const EmptyState: ({ description, header, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
export default EmptyState; |
/** @jsx jsx */ | ||
import { FC } from 'react'; | ||
type HeaderProps = { | ||
children: string; | ||
level?: number; | ||
}; | ||
/** | ||
@@ -10,5 +14,3 @@ * __Header__ | ||
*/ | ||
declare const EmptyStateHeader: FC<{ | ||
children: string; | ||
}>; | ||
declare const EmptyStateHeader: FC<HeaderProps>; | ||
export default EmptyStateHeader; |
@@ -16,2 +16,7 @@ import type { ReactNode } from 'react'; | ||
/** | ||
* The value used to set the heading level of the header element. | ||
* Must be in the range of 1 to 6. Defaults to 4. | ||
*/ | ||
headingLevel?: number; | ||
/** | ||
* The main block of text that holds additional supporting information. | ||
@@ -18,0 +23,0 @@ */ |
@@ -25,3 +25,3 @@ /// <reference types="react" /> | ||
*/ | ||
declare const EmptyState: ({ description, header, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element; | ||
export default EmptyState; |
/** @jsx jsx */ | ||
import { FC } from 'react'; | ||
type HeaderProps = { | ||
children: string; | ||
level?: number; | ||
}; | ||
/** | ||
@@ -10,5 +14,3 @@ * __Header__ | ||
*/ | ||
declare const EmptyStateHeader: FC<{ | ||
children: string; | ||
}>; | ||
declare const EmptyStateHeader: FC<HeaderProps>; | ||
export default EmptyStateHeader; |
@@ -16,2 +16,7 @@ import type { ReactNode } from 'react'; | ||
/** | ||
* The value used to set the heading level of the header element. | ||
* Must be in the range of 1 to 6. Defaults to 4. | ||
*/ | ||
headingLevel?: number; | ||
/** | ||
* The main block of text that holds additional supporting information. | ||
@@ -18,0 +23,0 @@ */ |
{ | ||
"name": "@atlaskit/empty-state", | ||
"version": "7.5.2", | ||
"version": "7.6.0", | ||
"description": "An empty state appears when there is no data to display and describes what the user can do next.", | ||
@@ -28,3 +28,3 @@ "publishConfig": { | ||
"team": "Design System Team", | ||
"releaseModel": "scheduled", | ||
"releaseModel": "continuous", | ||
"website": { | ||
@@ -36,6 +36,6 @@ "name": "Empty state", | ||
"dependencies": { | ||
"@atlaskit/button": "^16.7.0", | ||
"@atlaskit/button": "^16.8.0", | ||
"@atlaskit/spinner": "^15.5.0", | ||
"@atlaskit/theme": "^12.5.0", | ||
"@atlaskit/tokens": "^1.4.0", | ||
"@atlaskit/tokens": "^1.9.0", | ||
"@babel/runtime": "^7.0.0", | ||
@@ -54,2 +54,3 @@ "@emotion/react": "^11.7.1" | ||
"@testing-library/react": "^12.1.5", | ||
"jest-axe": "^4.0.0", | ||
"react-dom": "^16.8.0", | ||
@@ -56,0 +57,0 @@ "typescript": "~4.9.5", |
@@ -11,2 +11,3 @@ <!-- API Report Version: 2.3 --> | ||
- [Main Entry Types](#main-entry-types) | ||
- [Peer Dependencies](#peer-dependencies) | ||
@@ -26,2 +27,3 @@ ### Main Entry Types | ||
header, | ||
headingLevel, | ||
imageHeight, | ||
@@ -47,2 +49,3 @@ imageUrl, | ||
header: string; | ||
headingLevel?: number; | ||
imageHeight?: number; | ||
@@ -86,1 +89,13 @@ imageUrl?: string; | ||
<!--SECTION END: Main Entry Types--> | ||
### Peer Dependencies | ||
<!--SECTION START: Peer Dependencies--> | ||
```json | ||
{ | ||
"react": "^16.8.0" | ||
} | ||
``` | ||
<!--SECTION END: Peer Dependencies--> |
66471
61
1261
10
Updated@atlaskit/button@^16.8.0
Updated@atlaskit/tokens@^1.9.0