@synerise/ds-step-card 0.8.24 → 0.9.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 +19 -0
- package/README.md +3 -1
- package/dist/StepCard.d.ts +1 -1
- package/dist/StepCard.js +19 -11
- package/dist/StepCard.types.d.ts +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.9.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.8.25...@synerise/ds-step-card@0.9.0) (2023-07-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **filter:** adds letter tags to step cards and filter header ([ad9a366](https://github.com/Synerise/synerise-design/commit/ad9a366ae6bb8127eaeafa5e7bd89f7e35c1bcde))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.8.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.8.24...@synerise/ds-step-card@0.8.25) (2023-06-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.8.24](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.8.23...@synerise/ds-step-card@0.8.24) (2023-06-14)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-step-card
|
package/README.md
CHANGED
|
@@ -51,8 +51,10 @@ footer={<span>Footer</span>}
|
|
|
51
51
|
| onChangeName | Function called when user change name of StepCard | (name: string) => void | - |
|
|
52
52
|
| onDelete | Function called when user click on delete StepCard icon | () => void | - |
|
|
53
53
|
| onDuplicate | Function called when user click on duplicate StepCard icon | () => void | - |
|
|
54
|
-
| footer |
|
|
54
|
+
| footer | React node to inject as footer of StepCard React.ReactNode | - |
|
|
55
|
+
| headerRightSide | React node to inject into header right side slot | React.ReactNode | - |
|
|
55
56
|
| texts | Object with translations | StepCardTexts | - |
|
|
57
|
+
| readonly | Toggles editability (cruds, step name, draggability) | boolean | - |
|
|
56
58
|
|
|
57
59
|
### StepCardTexts
|
|
58
60
|
|
package/dist/StepCard.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StepCardProps } from './StepCard.types';
|
|
3
|
-
declare const StepCard: React.
|
|
3
|
+
declare const StepCard: React.ForwardRefExoticComponent<StepCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default StepCard;
|
package/dist/StepCard.js
CHANGED
|
@@ -11,8 +11,7 @@ import Cruds from '@synerise/ds-cruds';
|
|
|
11
11
|
import { DragHandleM } from '@synerise/ds-icon';
|
|
12
12
|
import { Title } from '@synerise/ds-typography';
|
|
13
13
|
import * as S from './StepCard.styles';
|
|
14
|
-
|
|
15
|
-
var StepCard = function StepCard(_ref) {
|
|
14
|
+
var StepCard = React.forwardRef(function (_ref, ref) {
|
|
16
15
|
var children = _ref.children,
|
|
17
16
|
onDelete = _ref.onDelete,
|
|
18
17
|
onDuplicate = _ref.onDuplicate,
|
|
@@ -20,6 +19,7 @@ var StepCard = function StepCard(_ref) {
|
|
|
20
19
|
matching = _ref.matching,
|
|
21
20
|
onChangeMatching = _ref.onChangeMatching,
|
|
22
21
|
texts = _ref.texts,
|
|
22
|
+
headerRightSide = _ref.headerRightSide,
|
|
23
23
|
_ref$isHeaderVisible = _ref.isHeaderVisible,
|
|
24
24
|
isHeaderVisible = _ref$isHeaderVisible === void 0 ? true : _ref$isHeaderVisible,
|
|
25
25
|
_ref$readOnly = _ref.readOnly,
|
|
@@ -56,7 +56,19 @@ var StepCard = function StepCard(_ref) {
|
|
|
56
56
|
})
|
|
57
57
|
}, texts);
|
|
58
58
|
}, [formatMessage, texts]);
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
var renderRightSide = function renderRightSide() {
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !readOnly && /*#__PURE__*/React.createElement(S.CrudsWrapper, null, /*#__PURE__*/React.createElement(Cruds, {
|
|
62
|
+
deleteTooltip: text.deleteTooltip,
|
|
63
|
+
onDelete: onDelete,
|
|
64
|
+
duplicateTooltip: text.duplicateTooltip,
|
|
65
|
+
onDuplicate: onDuplicate
|
|
66
|
+
})), headerRightSide);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return /*#__PURE__*/React.createElement(S.Container, {
|
|
70
|
+
ref: ref
|
|
71
|
+
}, isHeaderVisible && /*#__PURE__*/React.createElement(S.Header, {
|
|
60
72
|
className: "step-card-drag-handler"
|
|
61
73
|
}, /*#__PURE__*/React.createElement(S.LeftSide, {
|
|
62
74
|
readOnly: readOnly
|
|
@@ -73,12 +85,8 @@ var StepCard = function StepCard(_ref) {
|
|
|
73
85
|
}), /*#__PURE__*/React.createElement(Title, {
|
|
74
86
|
withoutMargin: true,
|
|
75
87
|
level: 4
|
|
76
|
-
}, matching ? text.conditionType : text.notConditionType)), !readOnly && /*#__PURE__*/React.createElement(S.RightSide,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
onDuplicate: onDuplicate
|
|
81
|
-
}))), ' '), /*#__PURE__*/React.createElement(S.Body, null, children), footer && /*#__PURE__*/React.createElement(S.Footer, null, footer));
|
|
82
|
-
};
|
|
83
|
-
|
|
88
|
+
}, matching ? text.conditionType : text.notConditionType)), (!readOnly || headerRightSide) && /*#__PURE__*/React.createElement(S.RightSide, {
|
|
89
|
+
className: "step-card-right-side"
|
|
90
|
+
}, renderRightSide())), /*#__PURE__*/React.createElement(S.Body, null, children), footer && /*#__PURE__*/React.createElement(S.Footer, null, footer));
|
|
91
|
+
});
|
|
84
92
|
export default StepCard;
|
package/dist/StepCard.types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-step-card",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "StepCard UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-cruds": "^0.3.
|
|
36
|
-
"@synerise/ds-icon": "^0.
|
|
37
|
-
"@synerise/ds-inline-edit": "^0.6.
|
|
38
|
-
"@synerise/ds-logic": "^0.8.
|
|
35
|
+
"@synerise/ds-cruds": "^0.3.29",
|
|
36
|
+
"@synerise/ds-icon": "^0.57.0",
|
|
37
|
+
"@synerise/ds-inline-edit": "^0.6.67",
|
|
38
|
+
"@synerise/ds-logic": "^0.8.5"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@synerise/ds-core": "*",
|
|
42
42
|
"react": ">=16.9.0 < 17.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "e8a06c902ef96e767576df5377b8965e1034d6c0"
|
|
45
45
|
}
|