@synerise/ds-step-card 0.3.3 → 0.4.3
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 +32 -0
- package/dist/StepCard.js +12 -27
- package/dist/StepCard.styles.js +1 -1
- package/dist/StepCard.types.js +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
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.4.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.4.2...@synerise/ds-step-card@0.4.3) (2021-11-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.4.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.4.1...@synerise/ds-step-card@0.4.2) (2021-11-16)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.4.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.3.3...@synerise/ds-step-card@0.4.1) (2021-11-09)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [0.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.3.3...@synerise/ds-step-card@0.4.0) (2021-11-09)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @synerise/ds-step-card
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.3.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@0.3.2...@synerise/ds-step-card@0.3.3) (2021-11-05)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @synerise/ds-step-card
|
package/dist/StepCard.js
CHANGED
|
@@ -4,30 +4,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
|
|
9
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
|
|
11
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
-
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
-
|
|
15
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
-
|
|
17
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
|
|
19
7
|
import * as React from 'react';
|
|
8
|
+
import { useIntl } from 'react-intl';
|
|
9
|
+
import { debounce } from 'lodash';
|
|
20
10
|
import Matching from '@synerise/ds-logic/dist/Matching/Matching';
|
|
21
11
|
import InlineEdit from '@synerise/ds-inline-edit';
|
|
22
12
|
import Cruds from '@synerise/ds-cruds';
|
|
23
|
-
import { DragHandleM } from '@synerise/ds-icon
|
|
24
|
-
import {
|
|
25
|
-
import { debounce } from 'lodash';
|
|
13
|
+
import { DragHandleM } from '@synerise/ds-icon';
|
|
14
|
+
import { NOOP } from '@synerise/ds-utils';
|
|
26
15
|
import * as S from './StepCard.styles';
|
|
27
16
|
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
29
|
-
var NOOP = function NOOP() {};
|
|
30
|
-
|
|
31
17
|
var StepCard = function StepCard(_ref) {
|
|
32
18
|
var children = _ref.children,
|
|
33
19
|
name = _ref.name,
|
|
@@ -43,9 +29,8 @@ var StepCard = function StepCard(_ref) {
|
|
|
43
29
|
formatMessage = _useIntl.formatMessage;
|
|
44
30
|
|
|
45
31
|
var _React$useState = React.useState(name),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
setNameValue = _React$useState2[1];
|
|
32
|
+
nameValue = _React$useState[0],
|
|
33
|
+
setNameValue = _React$useState[1];
|
|
49
34
|
|
|
50
35
|
var onChangeNameDebounce = React.useCallback(debounce(onChangeName, 300), [onChangeName]);
|
|
51
36
|
var text = React.useMemo(function () {
|
|
@@ -76,14 +61,14 @@ var StepCard = function StepCard(_ref) {
|
|
|
76
61
|
onChangeNameDebounce(event.target.value);
|
|
77
62
|
};
|
|
78
63
|
|
|
79
|
-
return React.createElement(S.Container, null, React.createElement(S.Header, null, React.createElement(S.LeftSide, null, React.createElement(Matching, {
|
|
64
|
+
return /*#__PURE__*/React.createElement(S.Container, null, /*#__PURE__*/React.createElement(S.Header, null, /*#__PURE__*/React.createElement(S.LeftSide, null, /*#__PURE__*/React.createElement(Matching, {
|
|
80
65
|
matching: matching,
|
|
81
66
|
onChange: onChangeMatching,
|
|
82
67
|
texts: {
|
|
83
68
|
matching: text.matching,
|
|
84
69
|
notMatching: text.notMatching
|
|
85
70
|
}
|
|
86
|
-
}), React.createElement(InlineEdit, {
|
|
71
|
+
}), /*#__PURE__*/React.createElement(InlineEdit, {
|
|
87
72
|
input: {
|
|
88
73
|
name: 'name-of-input',
|
|
89
74
|
value: nameValue,
|
|
@@ -91,17 +76,17 @@ var StepCard = function StepCard(_ref) {
|
|
|
91
76
|
placeholder: text.namePlaceholder,
|
|
92
77
|
onChange: handleChangeName
|
|
93
78
|
}
|
|
94
|
-
})), React.createElement(S.RightSide, null, React.createElement(S.CrudsWrapper, null, React.createElement(Cruds.CustomAction, {
|
|
79
|
+
})), /*#__PURE__*/React.createElement(S.RightSide, null, /*#__PURE__*/React.createElement(S.CrudsWrapper, null, /*#__PURE__*/React.createElement(Cruds.CustomAction, {
|
|
95
80
|
title: text.moveTooltip,
|
|
96
81
|
onClick: NOOP,
|
|
97
|
-
icon: React.createElement(DragHandleM, null),
|
|
82
|
+
icon: /*#__PURE__*/React.createElement(DragHandleM, null),
|
|
98
83
|
className: "step-card-drag-handler"
|
|
99
|
-
}), React.createElement(Cruds, {
|
|
84
|
+
}), /*#__PURE__*/React.createElement(Cruds, {
|
|
100
85
|
deleteTooltip: text.deleteTooltip,
|
|
101
86
|
onDelete: onDelete,
|
|
102
87
|
duplicateTooltip: text.duplicateTooltip,
|
|
103
88
|
onDuplicate: onDuplicate
|
|
104
|
-
})))), React.createElement(S.Body, null, children), footer && React.createElement(S.Footer, null, footer));
|
|
89
|
+
})))), /*#__PURE__*/React.createElement(S.Body, null, children), footer && /*#__PURE__*/React.createElement(S.Footer, null, footer));
|
|
105
90
|
};
|
|
106
91
|
|
|
107
92
|
export default StepCard;
|
package/dist/StepCard.styles.js
CHANGED
|
@@ -13,7 +13,7 @@ export var Header = styled.div.withConfig({
|
|
|
13
13
|
displayName: "StepCardstyles__Header",
|
|
14
14
|
componentId: "sc-45dbps-2"
|
|
15
15
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:21px 0;margin:0 24px;width:100%;max-width:calc(100% - 48px);position:relative;&:after{content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background-color:transparent;background-image:", ";background-position:top;background-size:5px 1px;background-repeat:repeat-x;}&:hover{", "{opacity:1;visibility:visible;}}"], function (props) {
|
|
16
|
-
return "linear-gradient(to right, "
|
|
16
|
+
return "linear-gradient(to right, " + props.theme.palette.white + " 66%, " + props.theme.palette['grey-300'] + " 34%)";
|
|
17
17
|
}, CrudsWrapper);
|
|
18
18
|
export var LeftSide = styled.div.withConfig({
|
|
19
19
|
displayName: "StepCardstyles__LeftSide",
|
package/dist/StepCard.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-step-card",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.3",
|
|
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.2
|
|
36
|
-
"@synerise/ds-icon": "^0.
|
|
37
|
-
"@synerise/ds-inline-edit": "^0.
|
|
38
|
-
"@synerise/ds-logic": "^0.3
|
|
35
|
+
"@synerise/ds-cruds": "^0.3.2",
|
|
36
|
+
"@synerise/ds-icon": "^0.46.2",
|
|
37
|
+
"@synerise/ds-inline-edit": "^0.5.3",
|
|
38
|
+
"@synerise/ds-logic": "^0.4.3"
|
|
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": "2468359677783819939fb9f1ef5acc36667ecd1a"
|
|
45
45
|
}
|