@synerise/ds-empty-states 0.2.33 → 0.2.34
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 +11 -0
- package/README.md +1 -1
- package/dist/EmptyStates.d.ts +1 -2
- package/dist/EmptyStates.js +8 -4
- package/dist/EmptyStates.types.d.ts +6 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.34](https://github.com/Synerise/synerise-design/compare/@synerise/ds-empty-states@0.2.33...@synerise/ds-empty-states@0.2.34) (2024-02-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **empty-states:** conditional rendering of optional props ([a6870cc](https://github.com/Synerise/synerise-design/commit/a6870ccfc98f778ff93647a2e30262524a9e5737))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.2.33](https://github.com/Synerise/synerise-design/compare/@synerise/ds-empty-states@0.2.32...@synerise/ds-empty-states@0.2.33) (2024-01-24)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-empty-states
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ import EmptyStates from '@synerise/ds-empty-states'
|
|
|
30
30
|
| ---------------- | ---------------------------------- | --------------------------------------- | ----------- |
|
|
31
31
|
| size | Changing size on Icon | 'Xl' / 'L' | M |
|
|
32
32
|
| label | text of empty states | string / React.ReactNode | - |
|
|
33
|
-
| labelPosition | Defines the position of text | right / bottom |
|
|
33
|
+
| labelPosition | Defines the position of text | right / bottom | right |
|
|
34
34
|
| text | text of Header | string / React.ReactNode | - |
|
|
35
35
|
| type | type of icon | `Add` / `NoResults` / `SearchNoResults` | - |
|
|
36
36
|
| button | render button | string / React.ReactNode | - |
|
package/dist/EmptyStates.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { EmptyStatesProps } from './EmptyStates.types';
|
|
3
|
-
declare const EmptyStates:
|
|
2
|
+
declare const EmptyStates: ({ size, label, labelPosition, text, button, fontSize, customIcon, className, mode, }: EmptyStatesProps) => JSX.Element;
|
|
4
3
|
export default EmptyStates;
|
package/dist/EmptyStates.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _mapSizeToPx;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import Icon from '@synerise/ds-icon';
|
|
5
5
|
import * as S from './EmptyStates.styles';
|
|
6
6
|
import { EmptyStatesSize } from './EmptyStates.types';
|
|
@@ -16,20 +16,24 @@ var EmptyStates = function EmptyStates(_ref) {
|
|
|
16
16
|
button = _ref.button,
|
|
17
17
|
fontSize = _ref.fontSize,
|
|
18
18
|
customIcon = _ref.customIcon,
|
|
19
|
+
className = _ref.className,
|
|
19
20
|
mode = _ref.mode;
|
|
20
21
|
return /*#__PURE__*/React.createElement(S.EmptyStatesWrapper, {
|
|
21
22
|
mode: mode,
|
|
22
|
-
className: "ds-empty-states",
|
|
23
|
+
className: "ds-empty-states " + className,
|
|
23
24
|
labelPosition: labelPosition
|
|
24
|
-
}, /*#__PURE__*/React.createElement(S.EmptyStatesIconContainer, {
|
|
25
|
+
}, customIcon && /*#__PURE__*/React.createElement(S.EmptyStatesIconContainer, {
|
|
25
26
|
size: size
|
|
26
27
|
}, /*#__PURE__*/React.createElement(S.StatusIconContainer, null, /*#__PURE__*/React.createElement(Icon, {
|
|
28
|
+
"data-testid": "empty-states-custom-icon",
|
|
27
29
|
component: customIcon,
|
|
28
30
|
size: mapSizeToPx[size]
|
|
29
31
|
}))), text && /*#__PURE__*/React.createElement(S.HeaderWrapper, {
|
|
32
|
+
"data-testid": "empty-states-header",
|
|
30
33
|
size: size,
|
|
31
34
|
fontSize: fontSize
|
|
32
|
-
}, text), /*#__PURE__*/React.createElement(S.TextWrapper, {
|
|
35
|
+
}, text), label && /*#__PURE__*/React.createElement(S.TextWrapper, {
|
|
36
|
+
"data-testid": "empty-states-label",
|
|
33
37
|
labelPosition: labelPosition
|
|
34
38
|
}, label), button && /*#__PURE__*/React.createElement(S.ButtonWrapper, null, button));
|
|
35
39
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
export type EmptyStatesProps = {
|
|
3
3
|
size?: EmptyStatesSize;
|
|
4
4
|
fontSize?: EmptyStatesSize;
|
|
5
|
-
text?:
|
|
6
|
-
button?:
|
|
7
|
-
label?:
|
|
5
|
+
text?: ReactNode;
|
|
6
|
+
button?: ReactNode;
|
|
7
|
+
label?: ReactNode;
|
|
8
8
|
labelPosition?: 'bottom' | 'right';
|
|
9
9
|
mode?: 'absolute';
|
|
10
|
-
customIcon?:
|
|
10
|
+
customIcon?: ReactElement;
|
|
11
|
+
className?: string;
|
|
11
12
|
};
|
|
12
13
|
export declare enum EmptyStatesSize {
|
|
13
14
|
SMALL = "small",
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './EmptyStates';
|
|
1
|
+
export { default } from './EmptyStates';
|
|
2
|
+
export * from './EmptyStates.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-empty-states",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.34",
|
|
4
4
|
"description": "EmptyStates UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@synerise/ds-utils": "^0.24.24",
|
|
45
45
|
"@testing-library/jest-dom": "5.1.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "5dd899dfee61f80a7375192d8033e7bfaba2074c"
|
|
48
48
|
}
|