@synerise/ds-step-card 0.11.29 → 0.11.31

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
@@ -3,6 +3,22 @@
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.11.31](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.11.30...@synerise/ds-step-card@0.11.31) (2024-10-28)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-step-card
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.11.30](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.11.29...@synerise/ds-step-card@0.11.30) (2024-10-23)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-step-card
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.11.29](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.11.28...@synerise/ds-step-card@0.11.29) (2024-10-14)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-step-card
package/dist/StepCard.js CHANGED
@@ -31,7 +31,12 @@ var StepCard = forwardRef(function (_ref, ref) {
31
31
  isHeaderVisible = _ref$isHeaderVisible === void 0 ? true : _ref$isHeaderVisible,
32
32
  _ref$readOnly = _ref.readOnly,
33
33
  readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
34
- getMoveByLabel = _ref.getMoveByLabel;
34
+ _ref$singleStepCondit = _ref.singleStepCondition,
35
+ singleStepCondition = _ref$singleStepCondit === void 0 ? false : _ref$singleStepCondit,
36
+ getMoveByLabel = _ref.getMoveByLabel,
37
+ _ref$isDraggable = _ref.isDraggable,
38
+ isDraggable = _ref$isDraggable === void 0 ? true : _ref$isDraggable,
39
+ additionalFields = _ref.additionalFields;
35
40
 
36
41
  var _useIntl = useIntl(),
37
42
  formatMessage = _useIntl.formatMessage;
@@ -203,9 +208,9 @@ var StepCard = forwardRef(function (_ref, ref) {
203
208
  className: "step-card-drag-handler"
204
209
  }, /*#__PURE__*/React.createElement(S.LeftSide, {
205
210
  readOnly: readOnly
206
- }, !readOnly && /*#__PURE__*/React.createElement(S.DragIcon, {
211
+ }, !readOnly && isDraggable && /*#__PURE__*/React.createElement(S.DragIcon, {
207
212
  component: /*#__PURE__*/React.createElement(DragHandleM, null)
208
- }), /*#__PURE__*/React.createElement(Matching, {
213
+ }), matching !== undefined && onChangeMatching && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Matching, {
209
214
  matching: matching,
210
215
  onChange: onChangeMatching,
211
216
  texts: {
@@ -216,8 +221,10 @@ var StepCard = forwardRef(function (_ref, ref) {
216
221
  }), /*#__PURE__*/React.createElement(Title, {
217
222
  withoutMargin: true,
218
223
  level: 4
219
- }, matching ? text.conditionType : text.notConditionType)), (!readOnly || headerRightSide) && /*#__PURE__*/React.createElement(S.RightSide, {
224
+ }, matching ? text.conditionType : text.notConditionType))), (!readOnly || headerRightSide) && /*#__PURE__*/React.createElement(S.RightSide, {
220
225
  className: "step-card-right-side"
221
- }, renderRightSide())), /*#__PURE__*/React.createElement(S.Body, null, children), footer && /*#__PURE__*/React.createElement(S.Footer, null, footer));
226
+ }, renderRightSide())), /*#__PURE__*/React.createElement(S.Body, {
227
+ singleStepCondition: singleStepCondition
228
+ }, children), additionalFields && /*#__PURE__*/React.createElement(S.AdditionalFields, null, additionalFields), footer && /*#__PURE__*/React.createElement(S.Footer, null, footer));
222
229
  });
223
230
  export default StepCard;
@@ -18,5 +18,8 @@ export declare const LeftSide: import("styled-components").StyledComponent<"div"
18
18
  readOnly?: boolean | undefined;
19
19
  }, never>;
20
20
  export declare const RightSide: import("styled-components").StyledComponent<"div", any, {}, never>;
21
- export declare const Body: import("styled-components").StyledComponent<"div", any, {}, never>;
21
+ export declare const Body: import("styled-components").StyledComponent<"div", any, {
22
+ singleStepCondition: boolean;
23
+ }, never>;
24
+ export declare const AdditionalFields: import("styled-components").StyledComponent<"div", any, {}, never>;
22
25
  export declare const Footer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -61,10 +61,19 @@ export var RightSide = styled.div.withConfig({
61
61
  export var Body = styled.div.withConfig({
62
62
  displayName: "StepCardstyles__Body",
63
63
  componentId: "sc-45dbps-11"
64
- })(["padding:0 0 24px;width:100%;.ds-conditions{&:first-of-type{padding-top:0;}&:last-of-type{padding-bottom:0;}}"]);
64
+ })(["padding:", ";width:100%;.ds-conditions{&:first-of-type{padding-top:0;}&:last-of-type{padding-bottom:0;}}"], function (_ref2) {
65
+ var singleStepCondition = _ref2.singleStepCondition;
66
+ return singleStepCondition ? '0' : '0 0 24px';
67
+ });
68
+ export var AdditionalFields = styled.div.withConfig({
69
+ displayName: "StepCardstyles__AdditionalFields",
70
+ componentId: "sc-45dbps-12"
71
+ })(["width:100%;padding:24px 24px 12px;border-top:1px solid ", ";"], function (props) {
72
+ return props.theme.palette['grey-200'];
73
+ });
65
74
  export var Footer = styled.div.withConfig({
66
75
  displayName: "StepCardstyles__Footer",
67
- componentId: "sc-45dbps-12"
76
+ componentId: "sc-45dbps-13"
68
77
  })(["background-color:rgba(249,250,251,0.6);border-top:1px solid ", ";padding:16px 24px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;width:100%;> *{margin-left:8px;}"], function (props) {
69
78
  return props.theme.palette['grey-100'];
70
79
  });
@@ -15,17 +15,20 @@ export type StepCardProps = {
15
15
  footer?: ReactNode;
16
16
  matching: boolean;
17
17
  name: string;
18
- onChangeName: (name: string) => void;
19
- onChangeMatching: (matching: boolean) => void;
20
- onDelete: () => void;
21
- onDuplicate: () => void;
18
+ onChangeName?: (name: string) => void;
19
+ onChangeMatching?: (matching: boolean) => void;
20
+ onDelete?: () => void;
21
+ onDuplicate?: () => void;
22
22
  onMove: (index: number, offset: number) => void;
23
23
  expressionIndex: number;
24
24
  expressionCount: number;
25
25
  expressionMoved?: boolean;
26
26
  texts?: StepCardTexts;
27
27
  isHeaderVisible?: boolean;
28
+ isDraggable?: boolean;
28
29
  readOnly?: boolean;
30
+ singleStepCondition?: boolean;
29
31
  headerRightSide?: ReactNode;
30
32
  getMoveByLabel?: (moveByOffset: number) => string;
33
+ additionalFields?: JSX.Element;
31
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-step-card",
3
- "version": "0.11.29",
3
+ "version": "0.11.31",
4
4
  "description": "StepCard UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,12 +34,12 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-alert": "^0.8.32",
38
- "@synerise/ds-cruds": "^0.5.23",
39
- "@synerise/ds-icon": "^0.65.8",
40
- "@synerise/ds-logic": "^0.8.50",
41
- "@synerise/ds-typography": "^0.16.0",
42
- "@synerise/ds-utils": "^0.30.0",
37
+ "@synerise/ds-alert": "^0.8.34",
38
+ "@synerise/ds-cruds": "^0.5.25",
39
+ "@synerise/ds-icon": "^0.66.1",
40
+ "@synerise/ds-logic": "^0.8.52",
41
+ "@synerise/ds-typography": "^0.16.2",
42
+ "@synerise/ds-utils": "^0.30.1",
43
43
  "react-intl": "3.12.0"
44
44
  },
45
45
  "peerDependencies": {
@@ -47,5 +47,5 @@
47
47
  "react": ">=16.9.0 <= 17.0.2",
48
48
  "styled-components": "5.0.1"
49
49
  },
50
- "gitHead": "39c906a3f4d8ec9442e5780c6e6a387584eabce1"
50
+ "gitHead": "fbadaa2299668c527b52ecc66d61fc2165528bff"
51
51
  }