@atlaskit/empty-state 10.0.2 → 10.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,14 @@
1
1
  # @atlaskit/empty-state
2
2
 
3
+ ## 10.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#173373](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173373)
8
+ [`8061d8294d7ad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8061d8294d7ad) -
9
+ Added option to set headingSize prop on the header in the EmptyState component. Options are medium
10
+ (default) and xsmall, intended for smaller spaces such as popups.
11
+
3
12
  ## 10.0.2
4
13
 
5
14
  ### Patch Changes
@@ -39,6 +39,8 @@ var EmptyState = function EmptyState(_ref) {
39
39
  header = _ref.header,
40
40
  _ref$headingLevel = _ref.headingLevel,
41
41
  headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel,
42
+ _ref$headingSize = _ref.headingSize,
43
+ headingSize = _ref$headingSize === void 0 ? 'medium' : _ref$headingSize,
42
44
  imageHeight = _ref.imageHeight,
43
45
  imageUrl = _ref.imageUrl,
44
46
  imageWidth = _ref.imageWidth,
@@ -77,7 +79,7 @@ var EmptyState = function EmptyState(_ref) {
77
79
  }), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
78
80
  paddingBlockEnd: "space.200"
79
81
  }, /*#__PURE__*/_react.default.createElement(_heading.default, {
80
- size: "medium",
82
+ size: headingSize,
81
83
  as: tag
82
84
  }, header)), description && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
83
85
  paddingBlockEnd: "space.300"
@@ -31,6 +31,7 @@ const EmptyState = ({
31
31
  description,
32
32
  header,
33
33
  headingLevel = 4,
34
+ headingSize = 'medium',
34
35
  imageHeight,
35
36
  imageUrl,
36
37
  imageWidth,
@@ -68,7 +69,7 @@ const EmptyState = ({
68
69
  }), /*#__PURE__*/React.createElement(Box, {
69
70
  paddingBlockEnd: "space.200"
70
71
  }, /*#__PURE__*/React.createElement(Heading, {
71
- size: "medium",
72
+ size: headingSize,
72
73
  as: tag
73
74
  }, header)), description && /*#__PURE__*/React.createElement(Box, {
74
75
  paddingBlockEnd: "space.300"
@@ -32,6 +32,8 @@ var EmptyState = function EmptyState(_ref) {
32
32
  header = _ref.header,
33
33
  _ref$headingLevel = _ref.headingLevel,
34
34
  headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel,
35
+ _ref$headingSize = _ref.headingSize,
36
+ headingSize = _ref$headingSize === void 0 ? 'medium' : _ref$headingSize,
35
37
  imageHeight = _ref.imageHeight,
36
38
  imageUrl = _ref.imageUrl,
37
39
  imageWidth = _ref.imageWidth,
@@ -70,7 +72,7 @@ var EmptyState = function EmptyState(_ref) {
70
72
  }), /*#__PURE__*/React.createElement(Box, {
71
73
  paddingBlockEnd: "space.200"
72
74
  }, /*#__PURE__*/React.createElement(Heading, {
73
- size: "medium",
75
+ size: headingSize,
74
76
  as: tag
75
77
  }, header)), description && /*#__PURE__*/React.createElement(Box, {
76
78
  paddingBlockEnd: "space.300"
@@ -22,5 +22,5 @@ import type { EmptyStateProps } from './types';
22
22
  * };
23
23
  * ```
24
24
  */
25
- declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, tertiaryAction, testId, }: EmptyStateProps) => React.JSX.Element;
25
+ declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, headingSize, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, tertiaryAction, testId, }: EmptyStateProps) => React.JSX.Element;
26
26
  export default EmptyState;
@@ -16,6 +16,11 @@ export interface EmptyStateProps {
16
16
  * Must be in the range of 1 to 6. Defaults to 4.
17
17
  */
18
18
  headingLevel?: number;
19
+ /**
20
+ * The keyword used to set the visual appearance of the header element.
21
+ * Defaults to "medium". "xsmall" can be used for empty states in smaller contexts such as popups.
22
+ */
23
+ headingSize?: 'xsmall' | 'medium';
19
24
  /**
20
25
  * The main block of text that holds additional supporting information.
21
26
  */
@@ -22,5 +22,5 @@ import type { EmptyStateProps } from './types';
22
22
  * };
23
23
  * ```
24
24
  */
25
- declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, tertiaryAction, testId, }: EmptyStateProps) => React.JSX.Element;
25
+ declare const EmptyState: ({ buttonGroupLabel, description, header, headingLevel, headingSize, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, tertiaryAction, testId, }: EmptyStateProps) => React.JSX.Element;
26
26
  export default EmptyState;
@@ -16,6 +16,11 @@ export interface EmptyStateProps {
16
16
  * Must be in the range of 1 to 6. Defaults to 4.
17
17
  */
18
18
  headingLevel?: number;
19
+ /**
20
+ * The keyword used to set the visual appearance of the header element.
21
+ * Defaults to "medium". "xsmall" can be used for empty states in smaller contexts such as popups.
22
+ */
23
+ headingSize?: 'xsmall' | 'medium';
19
24
  /**
20
25
  * The main block of text that holds additional supporting information.
21
26
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/empty-state",
3
- "version": "10.0.2",
3
+ "version": "10.1.0",
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/"
@@ -27,10 +27,10 @@
27
27
  "dependencies": {
28
28
  "@atlaskit/button": "^23.2.0",
29
29
  "@atlaskit/heading": "^5.2.0",
30
- "@atlaskit/primitives": "^14.8.0",
30
+ "@atlaskit/primitives": "^14.9.0",
31
31
  "@atlaskit/spinner": "^18.0.0",
32
32
  "@atlaskit/theme": "^18.0.0",
33
- "@atlaskit/tokens": "^5.0.0",
33
+ "@atlaskit/tokens": "^5.4.0",
34
34
  "@babel/runtime": "^7.0.0",
35
35
  "@compiled/react": "^0.18.3"
36
36
  },
@@ -41,7 +41,7 @@
41
41
  "@af/accessibility-testing": "workspace:^",
42
42
  "@af/integration-testing": "workspace:^",
43
43
  "@af/visual-regression": "workspace:^",
44
- "@atlaskit/docs": "^10.0.0",
44
+ "@atlaskit/docs": "^11.0.0",
45
45
  "@atlaskit/ds-lib": "^4.0.0",
46
46
  "@atlaskit/link": "^3.2.0",
47
47
  "@atlaskit/section-message": "^8.2.0",