@synerise/ds-step-card 0.5.9 → 0.6.2
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 +27 -0
- package/dist/StepCard.js +15 -33
- package/dist/StepCard.styles.d.ts +2 -0
- package/dist/StepCard.styles.js +12 -9
- package/dist/StepCard.types.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.6.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.6.1...@synerise/ds-step-card@0.6.2) (2022-04-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.6.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.6.0...@synerise/ds-step-card@0.6.1) (2022-04-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [0.6.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.5.9...@synerise/ds-step-card@0.6.0) (2022-04-05)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **step-card:** removes title, updates styles ([8d0555f](https://github.com/Synerise/synerise-design/commit/8d0555fe60152f00b315479ae4a5a84f475d8a99))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [0.5.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.5.8...@synerise/ds-step-card@0.5.9) (2022-03-30)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @synerise/ds-step-card
|
package/dist/StepCard.js
CHANGED
|
@@ -6,18 +6,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6
6
|
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
|
-
import { debounce } from 'lodash';
|
|
10
9
|
import Matching from '@synerise/ds-logic/dist/Matching/Matching';
|
|
11
|
-
import InlineEdit from '@synerise/ds-inline-edit';
|
|
12
10
|
import Cruds from '@synerise/ds-cruds';
|
|
13
11
|
import { DragHandleM } from '@synerise/ds-icon';
|
|
14
|
-
import {
|
|
12
|
+
import { Title } from '@synerise/ds-typography';
|
|
15
13
|
import * as S from './StepCard.styles';
|
|
16
14
|
|
|
17
15
|
var StepCard = function StepCard(_ref) {
|
|
18
16
|
var children = _ref.children,
|
|
19
|
-
name = _ref.name,
|
|
20
|
-
onChangeName = _ref.onChangeName,
|
|
21
17
|
onDelete = _ref.onDelete,
|
|
22
18
|
onDuplicate = _ref.onDuplicate,
|
|
23
19
|
footer = _ref.footer,
|
|
@@ -28,18 +24,16 @@ var StepCard = function StepCard(_ref) {
|
|
|
28
24
|
var _useIntl = useIntl(),
|
|
29
25
|
formatMessage = _useIntl.formatMessage;
|
|
30
26
|
|
|
31
|
-
var _React$useState = React.useState(name),
|
|
32
|
-
nameValue = _React$useState[0],
|
|
33
|
-
setNameValue = _React$useState[1];
|
|
34
|
-
|
|
35
|
-
var onChangeNameDebounce = React.useCallback(debounce(onChangeName, 300), [onChangeName]);
|
|
36
27
|
var text = React.useMemo(function () {
|
|
37
28
|
return _objectSpread({
|
|
38
29
|
matching: formatMessage({
|
|
39
|
-
id: 'DS.MATCHING.
|
|
30
|
+
id: 'DS.MATCHING.PERFORMED'
|
|
40
31
|
}),
|
|
41
32
|
notMatching: formatMessage({
|
|
42
|
-
id: 'DS.MATCHING.NOT-
|
|
33
|
+
id: 'DS.MATCHING.NOT-PERFORMED'
|
|
34
|
+
}),
|
|
35
|
+
conditionType: formatMessage({
|
|
36
|
+
id: 'DS.STEP-CARD.CONDITION-TYPE'
|
|
43
37
|
}),
|
|
44
38
|
namePlaceholder: formatMessage({
|
|
45
39
|
id: 'DS.STEP-CARD.NAME-PLACEHOLDER'
|
|
@@ -55,33 +49,21 @@ var StepCard = function StepCard(_ref) {
|
|
|
55
49
|
})
|
|
56
50
|
}, texts);
|
|
57
51
|
}, [formatMessage, texts]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return /*#__PURE__*/React.createElement(S.Container, null, /*#__PURE__*/React.createElement(S.Header, null, /*#__PURE__*/React.createElement(S.LeftSide, null, /*#__PURE__*/React.createElement(Matching, {
|
|
52
|
+
return /*#__PURE__*/React.createElement(S.Container, null, /*#__PURE__*/React.createElement(S.Header, {
|
|
53
|
+
className: "step-card-drag-handler"
|
|
54
|
+
}, /*#__PURE__*/React.createElement(S.LeftSide, null, /*#__PURE__*/React.createElement(S.DragIcon, {
|
|
55
|
+
component: /*#__PURE__*/React.createElement(DragHandleM, null)
|
|
56
|
+
}), /*#__PURE__*/React.createElement(Matching, {
|
|
65
57
|
matching: matching,
|
|
66
58
|
onChange: onChangeMatching,
|
|
67
59
|
texts: {
|
|
68
60
|
matching: text.matching,
|
|
69
61
|
notMatching: text.notMatching
|
|
70
62
|
}
|
|
71
|
-
}), /*#__PURE__*/React.createElement(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
maxLength: 120,
|
|
76
|
-
placeholder: text.namePlaceholder,
|
|
77
|
-
onChange: handleChangeName
|
|
78
|
-
}
|
|
79
|
-
})), /*#__PURE__*/React.createElement(S.RightSide, null, /*#__PURE__*/React.createElement(S.CrudsWrapper, null, /*#__PURE__*/React.createElement(Cruds.CustomAction, {
|
|
80
|
-
title: text.moveTooltip,
|
|
81
|
-
onClick: NOOP,
|
|
82
|
-
icon: /*#__PURE__*/React.createElement(DragHandleM, null),
|
|
83
|
-
className: "step-card-drag-handler"
|
|
84
|
-
}), /*#__PURE__*/React.createElement(Cruds, {
|
|
63
|
+
}), /*#__PURE__*/React.createElement(Title, {
|
|
64
|
+
withoutMargin: true,
|
|
65
|
+
level: 4
|
|
66
|
+
}, text.conditionType)), /*#__PURE__*/React.createElement(S.RightSide, null, /*#__PURE__*/React.createElement(S.CrudsWrapper, null, /*#__PURE__*/React.createElement(Cruds, {
|
|
85
67
|
deleteTooltip: text.deleteTooltip,
|
|
86
68
|
onDelete: onDelete,
|
|
87
69
|
duplicateTooltip: text.duplicateTooltip,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const CrudsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const DragIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon").IconProps>, any, {}, never>;
|
|
3
5
|
export declare const Header: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
6
|
export declare const LeftSide: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
7
|
export declare const RightSide: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/dist/StepCard.styles.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
+
import Icon from '@synerise/ds-icon';
|
|
2
3
|
export var Container = styled.div.withConfig({
|
|
3
4
|
displayName: "StepCardstyles__Container",
|
|
4
5
|
componentId: "sc-45dbps-0"
|
|
@@ -9,27 +10,29 @@ export var CrudsWrapper = styled.div.withConfig({
|
|
|
9
10
|
displayName: "StepCardstyles__CrudsWrapper",
|
|
10
11
|
componentId: "sc-45dbps-1"
|
|
11
12
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;opacity:0;visibility:hidden;"]);
|
|
13
|
+
export var DragIcon = styled(Icon).withConfig({
|
|
14
|
+
displayName: "StepCardstyles__DragIcon",
|
|
15
|
+
componentId: "sc-45dbps-2"
|
|
16
|
+
})(["visibility:hidden;opacity:0;"]);
|
|
12
17
|
export var Header = styled.div.withConfig({
|
|
13
18
|
displayName: "StepCardstyles__Header",
|
|
14
|
-
componentId: "sc-45dbps-
|
|
15
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:
|
|
16
|
-
return "linear-gradient(to right, " + props.theme.palette.white + " 66%, " + props.theme.palette['grey-300'] + " 34%)";
|
|
17
|
-
}, CrudsWrapper);
|
|
19
|
+
componentId: "sc-45dbps-3"
|
|
20
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:22px 0;margin:0 24px 0 0;width:100%;max-width:calc(100% - 24px);position:relative;cursor:grab;&:hover{", "{opacity:1;visibility:visible;}", "{visibility:visible;opacity:1;}}"], CrudsWrapper, DragIcon);
|
|
18
21
|
export var LeftSide = styled.div.withConfig({
|
|
19
22
|
displayName: "StepCardstyles__LeftSide",
|
|
20
|
-
componentId: "sc-45dbps-
|
|
23
|
+
componentId: "sc-45dbps-4"
|
|
21
24
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;> *{margin-right:8px;}"]);
|
|
22
25
|
export var RightSide = styled.div.withConfig({
|
|
23
26
|
displayName: "StepCardstyles__RightSide",
|
|
24
|
-
componentId: "sc-45dbps-
|
|
27
|
+
componentId: "sc-45dbps-5"
|
|
25
28
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;> *{margin-left:8px;}"]);
|
|
26
29
|
export var Body = styled.div.withConfig({
|
|
27
30
|
displayName: "StepCardstyles__Body",
|
|
28
|
-
componentId: "sc-45dbps-
|
|
29
|
-
})(["padding:0
|
|
31
|
+
componentId: "sc-45dbps-6"
|
|
32
|
+
})(["padding:0 0 24px;width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;.ds-conditions{&:first-of-type{padding-top:0;}&:last-of-type{padding-bottom:0;}}"]);
|
|
30
33
|
export var Footer = styled.div.withConfig({
|
|
31
34
|
displayName: "StepCardstyles__Footer",
|
|
32
|
-
componentId: "sc-45dbps-
|
|
35
|
+
componentId: "sc-45dbps-7"
|
|
33
36
|
})(["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) {
|
|
34
37
|
return props.theme.palette['grey-100'];
|
|
35
38
|
});
|
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.6.2",
|
|
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
|
"dependencies": {
|
|
35
35
|
"@synerise/ds-cruds": "^0.3.9",
|
|
36
36
|
"@synerise/ds-icon": "^0.49.0",
|
|
37
|
-
"@synerise/ds-inline-edit": "^0.6.
|
|
38
|
-
"@synerise/ds-logic": "^0.
|
|
37
|
+
"@synerise/ds-inline-edit": "^0.6.12",
|
|
38
|
+
"@synerise/ds-logic": "^0.7.0"
|
|
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": "4a658911645846d1e329609ba9db06a7bc64962b"
|
|
45
45
|
}
|