@synerise/ds-step-card 1.2.1 → 1.2.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 +408 -1345
- package/README.md +7 -5
- package/dist/StepCard.d.ts +1 -1
- package/dist/StepCard.js +4 -4
- package/dist/StepCard.styles.js +1 -1
- package/dist/hooks/useDefaultTexts.d.ts +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ title: StepCard
|
|
|
6
6
|
StepCard UI Component
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
|
+
|
|
9
10
|
```
|
|
10
11
|
npm i @synerise/ds-step-card
|
|
11
12
|
or
|
|
@@ -13,6 +14,7 @@ yarn add @synerise/ds-step-card
|
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
## Usage
|
|
17
|
+
|
|
16
18
|
```
|
|
17
19
|
import StepCard from '@synerise/ds-step-card'
|
|
18
20
|
|
|
@@ -45,21 +47,21 @@ footer={<span>Footer</span>}
|
|
|
45
47
|
## API
|
|
46
48
|
|
|
47
49
|
| Property | Description | Type | Default |
|
|
48
|
-
|
|
|
50
|
+
| ---------------- | ----------------------------------------------------------- | --------------------------- | ------- |
|
|
49
51
|
| matching | Main matching configuration | : MatchingProps | - |
|
|
50
52
|
| onChangeMatching | Function called when user change value of StepCard matching | (matching: boolean) => void | - |
|
|
51
53
|
| onChangeName | Function called when user change name of StepCard | (name: string) => void | - |
|
|
52
54
|
| onDelete | Function called when user click on delete StepCard icon | () => void | - |
|
|
53
55
|
| onDuplicate | Function called when user click on duplicate StepCard icon | () => void | - |
|
|
54
|
-
| footer | React node to inject as footer of StepCard
|
|
56
|
+
| footer | React node to inject as footer of StepCard React.ReactNode | - |
|
|
55
57
|
| headerRightSide | React node to inject into header right side slot | React.ReactNode | - |
|
|
56
58
|
| texts | Object with translations | StepCardTexts | - |
|
|
57
|
-
| readonly | Toggles editability (cruds, step name, draggability) | boolean
|
|
58
|
-
|
|
59
|
+
| readonly | Toggles editability (cruds, step name, draggability) | boolean | - |
|
|
60
|
+
|
|
59
61
|
### StepCardTexts
|
|
60
62
|
|
|
61
63
|
| Property | Description | Type | Default |
|
|
62
|
-
|
|
|
64
|
+
| ---------------- | --------------------------------------------------------- | ------ | -------------- |
|
|
63
65
|
| matching | Label of Toggle component, visible when matching is true | string | 'Matching' |
|
|
64
66
|
| notMatching | Label of Toggle component, visible when matching is false | string | 'Not matching' |
|
|
65
67
|
| namePlaceholder | Placeholder of step name | string | 'Name' |
|
package/dist/StepCard.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StepCardProps } from './StepCard.types';
|
|
2
|
+
import { type StepCardProps } from './StepCard.types';
|
|
3
3
|
export declare const REORDER_THROTTLE = 1000;
|
|
4
4
|
declare const StepCard: React.ForwardRefExoticComponent<StepCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default StepCard;
|
package/dist/StepCard.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React, {
|
|
3
|
-
import { Matching } from '@synerise/ds-logic';
|
|
4
|
-
import Cruds from '@synerise/ds-cruds';
|
|
2
|
+
import React, { createRef, forwardRef, useEffect, useRef, useState } from 'react';
|
|
5
3
|
import { InlineAlert } from '@synerise/ds-alert';
|
|
4
|
+
import Cruds from '@synerise/ds-cruds';
|
|
6
5
|
import { DragHandleM } from '@synerise/ds-icon';
|
|
6
|
+
import { Matching } from '@synerise/ds-logic';
|
|
7
7
|
import { Title } from '@synerise/ds-typography';
|
|
8
8
|
import * as S from './StepCard.styles';
|
|
9
9
|
import { useDefaultTexts } from './hooks/useDefaultTexts';
|
|
@@ -126,7 +126,7 @@ var StepCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
126
126
|
var renderRightSide = function renderRightSide() {
|
|
127
127
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !readOnly && /*#__PURE__*/React.createElement(S.CrudsWrapper, null, /*#__PURE__*/React.createElement(S.MoveByOffset, {
|
|
128
128
|
offset: moveByOffset
|
|
129
|
-
}, countDownSpinnerElement,
|
|
129
|
+
}, countDownSpinnerElement, ' ', /*#__PURE__*/React.createElement(S.MoveByOffsetLabel, null, moveByOffsetLabel)), /*#__PURE__*/React.createElement(Cruds, {
|
|
130
130
|
onMoveUp: onMoveUp,
|
|
131
131
|
moveUpTooltip: allTexts.moveUpTooltip,
|
|
132
132
|
moveUpInactive: moveUpInactive,
|
package/dist/StepCard.styles.js
CHANGED
|
@@ -8,7 +8,7 @@ export var DragPlaceholder = styled.div.withConfig({
|
|
|
8
8
|
export var DragPlaceholderContent = styled.div.withConfig({
|
|
9
9
|
displayName: "StepCardstyles__DragPlaceholderContent",
|
|
10
10
|
componentId: "sc-45dbps-1"
|
|
11
|
-
})(["position:absolute;left:0;top:0;width:100%;height:calc(100% - 24px);display:flex;align-items:center;justify-content:center;color:", "
|
|
11
|
+
})(["position:absolute;left:0;top:0;width:100%;height:calc(100% - 24px);display:flex;align-items:center;justify-content:center;color:", ";"], function (props) {
|
|
12
12
|
return props.theme.palette['blue-600'];
|
|
13
13
|
});
|
|
14
14
|
export var DragPlaceholderTag = styled.div.withConfig({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StepCardTexts } from '../StepCard.types';
|
|
1
|
+
import { type StepCardTexts } from '../StepCard.types';
|
|
2
2
|
export declare const useDefaultTexts: (texts?: Partial<StepCardTexts>) => StepCardTexts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-step-card",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.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
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-alert": "^1.1.
|
|
38
|
-
"@synerise/ds-cruds": "^1.0.
|
|
39
|
-
"@synerise/ds-icon": "^1.5.
|
|
40
|
-
"@synerise/ds-logic": "^1.1.
|
|
41
|
-
"@synerise/ds-typography": "^1.0.
|
|
42
|
-
"@synerise/ds-utils": "^1.3.
|
|
37
|
+
"@synerise/ds-alert": "^1.1.7",
|
|
38
|
+
"@synerise/ds-cruds": "^1.0.13",
|
|
39
|
+
"@synerise/ds-icon": "^1.5.4",
|
|
40
|
+
"@synerise/ds-logic": "^1.1.3",
|
|
41
|
+
"@synerise/ds-typography": "^1.0.13",
|
|
42
|
+
"@synerise/ds-utils": "^1.3.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@synerise/ds-core": "*",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
48
48
|
"styled-components": "^5.3.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "4512641033ba3581a3df208143c547fcfed45895"
|
|
51
51
|
}
|