@synerise/ds-step-card 1.2.38 → 1.2.40

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,14 @@
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
+ ## [1.2.40](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@1.2.39...@synerise/ds-step-card@1.2.40) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-step-card
9
+
10
+ ## [1.2.39](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@1.2.38...@synerise/ds-step-card@1.2.39) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-step-card
13
+
6
14
  ## [1.2.38](https://github.com/Synerise/synerise-design/compare/@synerise/ds-step-card@1.2.37...@synerise/ds-step-card@1.2.38) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-step-card
package/README.md CHANGED
@@ -15,29 +15,30 @@ yarn add @synerise/ds-step-card
15
15
 
16
16
  ## Usage
17
17
 
18
- ```
18
+ ```jsx
19
19
  import StepCard from '@synerise/ds-step-card'
20
20
 
21
21
  <StepCard
22
- matching={true}
23
- onChangeMatching={(matchingValue) => {}}
24
- name={'funnel'}
25
- onChangeName={(name) => {}}
26
- onDuplicate={() => {}}
27
- onDelete={() => {}}
28
- texts={{
29
- matching: 'Matching',
30
- notMatching: 'Not matching',
31
- namePlaceholder: 'Placeholder',
32
- moveTooltip: 'Move',
33
- deleteTooltip: 'Delete',
34
- duplicateTooltip: 'Duplicate',
35
- }}
36
- footer={<span>Footer</span>}
22
+ matching={true}
23
+ onChangeMatching={(matchingValue) => {}}
24
+ name={'funnel'}
25
+ onMove={(index, offset) => reorder(index, offset)}
26
+ expressionIndex={0}
27
+ expressionCount={3}
28
+ onDuplicate={() => {}}
29
+ onDelete={() => {}}
30
+ texts={{
31
+ matching: 'Matching',
32
+ notMatching: 'Not matching',
33
+ namePlaceholder: 'Placeholder',
34
+ moveTooltip: 'Move',
35
+ deleteTooltip: 'Delete',
36
+ duplicateTooltip: 'Duplicate',
37
+ }}
38
+ footer={<span>Footer</span>}
37
39
  >
38
- <span>Content</span>
40
+ <span>Content</span>
39
41
  </StepCard>
40
-
41
42
  ```
42
43
 
43
44
  ## Demo
@@ -46,25 +47,45 @@ footer={<span>Footer</span>}
46
47
 
47
48
  ## API
48
49
 
49
- | Property | Description | Type | Default |
50
- | ---------------- | ----------------------------------------------------------- | --------------------------- | ------- |
51
- | matching | Main matching configuration | : MatchingProps | - |
52
- | onChangeMatching | Function called when user change value of StepCard matching | (matching: boolean) => void | - |
53
- | onChangeName | Function called when user change name of StepCard | (name: string) => void | - |
54
- | onDelete | Function called when user click on delete StepCard icon | () => void | - |
55
- | onDuplicate | Function called when user click on duplicate StepCard icon | () => void | - |
56
- | footer | React node to inject as footer of StepCard React.ReactNode | - |
57
- | headerRightSide | React node to inject into header right side slot | React.ReactNode | - |
58
- | texts | Object with translations | StepCardTexts | - |
59
- | readonly | Toggles editability (cruds, step name, draggability) | boolean | - |
50
+ | Property | Description | Type | Default |
51
+ | ----------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------- |
52
+ | matching | Current matching state; shown via Matching toggle | boolean | - |
53
+ | onMove | Called after 1000ms debounce with current index and cumulative offset | (index: number, offset: number) => void | - |
54
+ | expressionIndex | Current position in the list | number | - |
55
+ | expressionCount | Total number of steps; used to disable move up/down at boundaries | number | - |
56
+ | name | Step name | string | - |
57
+ | children | Condition content rendered in the body | React.ReactNode | - |
58
+ | footer | Content rendered in the footer section | React.ReactNode | - |
59
+ | onChangeMatching | Called when the matching toggle is clicked | (matching: boolean) => void | - |
60
+ | onDelete | Called when delete icon is clicked | () => void | - |
61
+ | onDuplicate | Called when duplicate icon is clicked | () => void | - |
62
+ | texts | Object with translations | Partial\<StepCardTexts\> | - |
63
+ | isHeaderVisible | Whether to render the header section | boolean | `true` |
64
+ | isDraggable | Shows drag handle icon and enables drag cursor | boolean | `true` |
65
+ | readOnly | Hides cruds, drag handle, and disables matching toggle | boolean | `false` |
66
+ | singleStepCondition | Removes bottom padding from body | boolean | `false` |
67
+ | headerRightSide | Static content in the header right slot | React.ReactNode | - |
68
+ | renderHeaderRightSide | Dynamic right-side renderer; also called in drag placeholder with `placeholder: true` | (index: number, options?: { placeholder?: boolean }) => React.ReactNode | - |
69
+ | getMoveByLabel | Custom accessible label for the pending move | (moveByOffset: number) => string | - |
70
+ | dropLabel | Content shown in the drag placeholder (blue dashed area) | React.ReactNode | - |
71
+ | additionalFields | Extra content rendered between body and footer, separated by a border | JSX.Element | - |
72
+ | expressionMoved | Set `true` to show a success "Moved" alert for 2000ms | boolean | - |
73
+ | dragHandleProps | dnd-kit drag handle attributes/listeners (from `@synerise/ds-sortable`) | DragHandlePropType | - |
74
+ | isDragged | When `true`, hides body content and shows the blue dashed placeholder | boolean | - |
75
+ | isDragOverlay | When `true`, renders a compact preview (76px, no footer, no right side) | boolean | - |
76
+ | dragIndex | Index passed to `renderHeaderRightSide` during drag overlay rendering | number | - |
60
77
 
61
78
  ### StepCardTexts
62
79
 
63
- | Property | Description | Type | Default |
64
- | ---------------- | --------------------------------------------------------- | ------ | -------------- |
65
- | matching | Label of Toggle component, visible when matching is true | string | 'Matching' |
66
- | notMatching | Label of Toggle component, visible when matching is false | string | 'Not matching' |
67
- | namePlaceholder | Placeholder of step name | string | 'Name' |
68
- | moveTooltip | Tooltip on move icon | string | 'Move' |
69
- | deleteTooltip | Tooltip on delete icon | string | 'Delete' |
70
- | duplicateTooltip | Tooltip on duplicate icon | string | 'Duplicate' |
80
+ | Property | Description | Type | Default |
81
+ | ---------------- | --------------------------------------------------------- | ------ | ---------------- |
82
+ | matching | Label of Toggle component, visible when matching is true | string | `'Performed'` |
83
+ | notMatching | Label of Toggle component, visible when matching is false | string | `'Not performed'`|
84
+ | conditionType | Condition type label when matching | string | `'event'` |
85
+ | notConditionType | Condition type label when not matching | string | `'event'` |
86
+ | namePlaceholder | Placeholder of step name | string | `'Name'` |
87
+ | moveTooltip | Tooltip on move icon | string | `'Move'` |
88
+ | moveUpTooltip | Tooltip on move up icon | string | `'Move Up'` |
89
+ | moveDownTooltip | Tooltip on move down icon | string | `'Move Down'` |
90
+ | deleteTooltip | Tooltip on delete icon | string | `'Delete'` |
91
+ | duplicateTooltip | Tooltip on duplicate icon | string | `'Duplicate'` |
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { type StepCardProps } from './StepCard.types';
1
+ import { default as React } from 'react';
2
+ import { 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,114 +1,91 @@
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, { createRef, forwardRef, useEffect, useRef, useState } from 'react';
3
- import { InlineAlert } from '@synerise/ds-alert';
4
- import Cruds from '@synerise/ds-cruds';
5
- import { DragHandleM } from '@synerise/ds-icon';
6
- import { Matching } from '@synerise/ds-logic';
7
- import { Title } from '@synerise/ds-typography';
8
- import * as S from './StepCard.styles';
9
- import { useDefaultTexts } from './hooks/useDefaultTexts';
10
- export var REORDER_THROTTLE = 1000;
11
- var MOVE_SUCCESS_FEEDBACK_DURATION = 2000;
12
- var StepCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
- var children = _ref.children,
14
- onDelete = _ref.onDelete,
15
- onDuplicate = _ref.onDuplicate,
16
- onMove = _ref.onMove,
17
- expressionIndex = _ref.expressionIndex,
18
- expressionMoved = _ref.expressionMoved,
19
- expressionCount = _ref.expressionCount,
20
- footer = _ref.footer,
21
- matching = _ref.matching,
22
- onChangeMatching = _ref.onChangeMatching,
23
- texts = _ref.texts,
24
- headerRightSide = _ref.headerRightSide,
25
- renderHeaderRightSide = _ref.renderHeaderRightSide,
26
- _ref$isHeaderVisible = _ref.isHeaderVisible,
27
- isHeaderVisible = _ref$isHeaderVisible === void 0 ? true : _ref$isHeaderVisible,
28
- _ref$readOnly = _ref.readOnly,
29
- readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
30
- _ref$singleStepCondit = _ref.singleStepCondition,
31
- singleStepCondition = _ref$singleStepCondit === void 0 ? false : _ref$singleStepCondit,
32
- getMoveByLabel = _ref.getMoveByLabel,
33
- _ref$isDraggable = _ref.isDraggable,
34
- isDraggable = _ref$isDraggable === void 0 ? true : _ref$isDraggable,
35
- isDragged = _ref.isDragged,
36
- isDragOverlay = _ref.isDragOverlay,
37
- dragIndex = _ref.dragIndex,
38
- dropLabel = _ref.dropLabel,
39
- dragHandleProps = _ref.dragHandleProps,
40
- additionalFields = _ref.additionalFields;
41
- var allTexts = useDefaultTexts(texts);
42
- var _useState = useState(0),
43
- moveByOffset = _useState[0],
44
- setMoveByOffset = _useState[1];
45
- var moveUpInactive = expressionIndex + moveByOffset <= 0;
46
- var moveDownInactive = expressionIndex + moveByOffset >= expressionCount - 1;
47
- var timeoutMovedRef = useRef(null);
48
- var _useState2 = useState(expressionMoved),
49
- recentlyMoved = _useState2[0],
50
- setRecentlyMoved = _useState2[1];
51
- var spinnerRef = /*#__PURE__*/createRef();
52
- var countDownSpinnerElement = /*#__PURE__*/React.createElement(S.CountDownWrapper, null, /*#__PURE__*/React.createElement("svg", {
53
- viewBox: "0 0 24 24"
54
- }, /*#__PURE__*/React.createElement(S.CountDownSpinner, {
55
- "data-test": moveByOffset,
56
- duration: REORDER_THROTTLE / 1000,
57
- "stroke-dashoffset": "40",
58
- "stroke-linecap": "butt"
59
- }, /*#__PURE__*/React.createElement("circle", {
60
- ref: spinnerRef,
61
- r: "5",
62
- cx: "12",
63
- cy: "12",
64
- fill: "transparent",
65
- transform: "rotate(-90,12,12)"
66
- }))));
67
- var resetAnimation = function resetAnimation() {
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useRef, createRef, useEffect } from "react";
3
+ import { InlineAlert } from "@synerise/ds-alert";
4
+ import Cruds from "@synerise/ds-cruds";
5
+ import { DragHandleM } from "@synerise/ds-icon";
6
+ import { Matching } from "@synerise/ds-logic";
7
+ import { Title } from "@synerise/ds-typography";
8
+ import { Container, DragPlaceholder, DragPlaceholderContent, DragPlaceholderTag, Content, Header, LeftSide, DragIcon, StepCardTitle, Middle, RightSide, Body, AdditionalFields, Footer, CrudsWrapper, MoveByOffset, MoveByOffsetLabel, RecentlyMoved, CountDownWrapper, CountDownSpinner } from "./StepCard.styles.js";
9
+ import { useDefaultTexts } from "./hooks/useDefaultTexts.js";
10
+ const REORDER_THROTTLE = 1e3;
11
+ const MOVE_SUCCESS_FEEDBACK_DURATION = 2e3;
12
+ const StepCard = forwardRef(({
13
+ children,
14
+ onDelete,
15
+ onDuplicate,
16
+ onMove,
17
+ expressionIndex,
18
+ expressionMoved,
19
+ expressionCount,
20
+ footer,
21
+ matching,
22
+ onChangeMatching,
23
+ texts,
24
+ headerRightSide,
25
+ renderHeaderRightSide,
26
+ isHeaderVisible = true,
27
+ readOnly = false,
28
+ singleStepCondition = false,
29
+ getMoveByLabel,
30
+ isDraggable = true,
31
+ isDragged,
32
+ isDragOverlay,
33
+ dragIndex,
34
+ dropLabel,
35
+ dragHandleProps,
36
+ additionalFields
37
+ }, ref) => {
38
+ const allTexts = useDefaultTexts(texts);
39
+ const [moveByOffset, setMoveByOffset] = useState(0);
40
+ const moveUpInactive = expressionIndex + moveByOffset <= 0;
41
+ const moveDownInactive = expressionIndex + moveByOffset >= expressionCount - 1;
42
+ const timeoutMovedRef = useRef(null);
43
+ const [recentlyMoved, setRecentlyMoved] = useState(expressionMoved);
44
+ const spinnerRef = createRef();
45
+ const countDownSpinnerElement = /* @__PURE__ */ jsx(CountDownWrapper, { children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx(CountDownSpinner, { "data-test": moveByOffset, duration: REORDER_THROTTLE / 1e3, "stroke-dashoffset": "40", "stroke-linecap": "butt", children: /* @__PURE__ */ jsx("circle", { ref: spinnerRef, r: "5", cx: "12", cy: "12", fill: "transparent", transform: "rotate(-90,12,12)" }) }) }) });
46
+ const resetAnimation = () => {
68
47
  if (spinnerRef.current && spinnerRef.current.parentElement) {
69
- var svgGroupElem = spinnerRef.current.parentElement;
70
- svgGroupElem.style.transitionProperty = 'none';
71
- svgGroupElem.style.strokeDashoffset = '75';
48
+ const svgGroupElem = spinnerRef.current.parentElement;
49
+ svgGroupElem.style.transitionProperty = "none";
50
+ svgGroupElem.style.strokeDashoffset = "75";
72
51
  }
73
52
  };
74
- var startAnimation = function startAnimation() {
53
+ const startAnimation = () => {
75
54
  if (spinnerRef.current && spinnerRef.current.parentElement) {
76
- var svgGroupElem = spinnerRef.current.parentElement;
77
- svgGroupElem.style.transitionDuration = REORDER_THROTTLE / 1000 + "s";
78
- svgGroupElem.style.transitionProperty = 'stroke-dashoffset';
79
- svgGroupElem.style.strokeDashoffset = '40';
55
+ const svgGroupElem = spinnerRef.current.parentElement;
56
+ svgGroupElem.style.transitionDuration = `${REORDER_THROTTLE / 1e3}s`;
57
+ svgGroupElem.style.transitionProperty = "stroke-dashoffset";
58
+ svgGroupElem.style.strokeDashoffset = "40";
80
59
  }
81
60
  };
82
- var onMoveUp = function onMoveUp() {
61
+ const onMoveUp = () => {
83
62
  if (!moveUpInactive) {
84
63
  resetAnimation();
85
64
  setMoveByOffset(moveByOffset - 1);
86
65
  }
87
66
  };
88
- var onMoveDown = function onMoveDown() {
67
+ const onMoveDown = () => {
89
68
  if (!moveDownInactive) {
90
69
  resetAnimation();
91
70
  setMoveByOffset(moveByOffset + 1);
92
71
  }
93
72
  };
94
- useEffect(function () {
73
+ useEffect(() => {
95
74
  if (expressionMoved) {
96
75
  setRecentlyMoved(expressionMoved);
97
- timeoutMovedRef.current = setTimeout(function () {
98
- return setRecentlyMoved(false);
99
- }, MOVE_SUCCESS_FEEDBACK_DURATION);
76
+ timeoutMovedRef.current = setTimeout(() => setRecentlyMoved(false), MOVE_SUCCESS_FEEDBACK_DURATION);
100
77
  }
101
78
  return resetMoveSuccess;
102
79
  }, [expressionMoved, expressionIndex]);
103
- var resetMoveSuccess = function resetMoveSuccess() {
80
+ const resetMoveSuccess = () => {
104
81
  timeoutMovedRef.current && clearTimeout(timeoutMovedRef.current);
105
82
  setRecentlyMoved(false);
106
83
  };
107
- useEffect(function () {
108
- var timer;
109
- var timer2;
84
+ useEffect(() => {
85
+ let timer;
86
+ let timer2;
110
87
  if (moveByOffset !== 0) {
111
- timer = setTimeout(function () {
88
+ timer = setTimeout(() => {
112
89
  onMove(expressionIndex, moveByOffset);
113
90
  setMoveByOffset(0);
114
91
  }, REORDER_THROTTLE);
@@ -117,62 +94,55 @@ var StepCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
117
94
  if (moveByOffset) {
118
95
  timer2 = setTimeout(startAnimation, 0);
119
96
  }
120
- return function () {
97
+ return () => {
121
98
  timer && clearTimeout(timer);
122
99
  timer2 && clearTimeout(timer2);
123
100
  };
124
101
  });
125
- var moveByOffsetLabel = getMoveByLabel ? getMoveByLabel(moveByOffset) : "Move " + Math.abs(moveByOffset) + " " + (moveByOffset < 0 ? 'up' : 'down') + "...";
126
- var renderRightSide = function renderRightSide() {
127
- return /*#__PURE__*/React.createElement(React.Fragment, null, !readOnly && /*#__PURE__*/React.createElement(S.CrudsWrapper, null, /*#__PURE__*/React.createElement(S.MoveByOffset, {
128
- offset: moveByOffset
129
- }, countDownSpinnerElement, ' ', /*#__PURE__*/React.createElement(S.MoveByOffsetLabel, null, moveByOffsetLabel)), /*#__PURE__*/React.createElement(Cruds, {
130
- onMoveUp: onMoveUp,
131
- moveUpTooltip: allTexts.moveUpTooltip,
132
- moveUpInactive: moveUpInactive,
133
- onMoveDown: onMoveDown,
134
- moveDownTooltip: allTexts.moveDownTooltip,
135
- moveDownInactive: moveDownInactive,
136
- deleteTooltip: allTexts.deleteTooltip,
137
- onDelete: onDelete,
138
- duplicateTooltip: allTexts.duplicateTooltip,
139
- onDuplicate: onDuplicate
140
- })), recentlyMoved && /*#__PURE__*/React.createElement(S.RecentlyMoved, {
141
- duration: MOVE_SUCCESS_FEEDBACK_DURATION
142
- }, /*#__PURE__*/React.createElement(InlineAlert, {
143
- type: "success",
144
- message: "Moved"
145
- })), renderHeaderRightSide ? renderHeaderRightSide(dragIndex != null ? dragIndex : expressionIndex) : headerRightSide);
102
+ const moveByOffsetLabel = getMoveByLabel ? getMoveByLabel(moveByOffset) : `Move ${Math.abs(moveByOffset)} ${moveByOffset < 0 ? "up" : "down"}...`;
103
+ const renderRightSide = () => {
104
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
105
+ !readOnly && /* @__PURE__ */ jsxs(CrudsWrapper, { children: [
106
+ /* @__PURE__ */ jsxs(MoveByOffset, { offset: moveByOffset, children: [
107
+ countDownSpinnerElement,
108
+ " ",
109
+ /* @__PURE__ */ jsx(MoveByOffsetLabel, { children: moveByOffsetLabel })
110
+ ] }),
111
+ /* @__PURE__ */ jsx(Cruds, { onMoveUp, moveUpTooltip: allTexts.moveUpTooltip, moveUpInactive, onMoveDown, moveDownTooltip: allTexts.moveDownTooltip, moveDownInactive, deleteTooltip: allTexts.deleteTooltip, onDelete, duplicateTooltip: allTexts.duplicateTooltip, onDuplicate })
112
+ ] }),
113
+ recentlyMoved && /* @__PURE__ */ jsx(RecentlyMoved, { duration: MOVE_SUCCESS_FEEDBACK_DURATION, children: /* @__PURE__ */ jsx(InlineAlert, { type: "success", message: "Moved" }) }),
114
+ renderHeaderRightSide ? renderHeaderRightSide(dragIndex ?? expressionIndex) : headerRightSide
115
+ ] });
146
116
  };
147
- return /*#__PURE__*/React.createElement(S.Container, {
148
- isDragged: isDragged,
149
- isDragOverlay: isDragOverlay,
150
- ref: ref
151
- }, /*#__PURE__*/React.createElement(S.DragPlaceholder, null, dropLabel && /*#__PURE__*/React.createElement(S.DragPlaceholderContent, null, dropLabel), /*#__PURE__*/React.createElement(S.DragPlaceholderTag, null, renderHeaderRightSide && dragIndex !== undefined ? renderHeaderRightSide(dragIndex, {
152
- placeholder: true
153
- }) : headerRightSide)), /*#__PURE__*/React.createElement(S.Content, null, isHeaderVisible && /*#__PURE__*/React.createElement(S.Header, {
154
- isDraggable: !readOnly && isDraggable,
155
- onMouseOver: resetMoveSuccess,
156
- onFocus: resetMoveSuccess
157
- }, /*#__PURE__*/React.createElement(S.LeftSide, {
158
- isDraggable: !readOnly && isDraggable
159
- }, !readOnly && isDraggable && /*#__PURE__*/React.createElement(S.DragIcon, _extends({
160
- component: /*#__PURE__*/React.createElement(DragHandleM, null)
161
- }, !readOnly && isDraggable ? dragHandleProps : {})), matching !== undefined && onChangeMatching && /*#__PURE__*/React.createElement(S.StepCardTitle, null, /*#__PURE__*/React.createElement(Matching, {
162
- matching: matching,
163
- onChange: onChangeMatching,
164
- texts: {
165
- matching: allTexts.matching,
166
- notMatching: allTexts.notMatching
167
- },
168
- readOnly: readOnly
169
- }), /*#__PURE__*/React.createElement(Title, {
170
- withoutMargin: true,
171
- level: 4
172
- }, matching ? allTexts.conditionType : allTexts.notConditionType))), !readOnly && isDraggable && /*#__PURE__*/React.createElement(S.Middle, dragHandleProps), (!readOnly || headerRightSide || renderHeaderRightSide) && /*#__PURE__*/React.createElement(S.RightSide, {
173
- className: "step-card-right-side"
174
- }, renderRightSide())), /*#__PURE__*/React.createElement(S.Body, {
175
- singleStepCondition: singleStepCondition
176
- }, children), additionalFields && /*#__PURE__*/React.createElement(S.AdditionalFields, null, additionalFields), footer && /*#__PURE__*/React.createElement(S.Footer, null, footer)));
117
+ return /* @__PURE__ */ jsxs(Container, { isDragged, isDragOverlay, ref, children: [
118
+ /* @__PURE__ */ jsxs(DragPlaceholder, { children: [
119
+ dropLabel && /* @__PURE__ */ jsx(DragPlaceholderContent, { children: dropLabel }),
120
+ /* @__PURE__ */ jsx(DragPlaceholderTag, { children: renderHeaderRightSide && dragIndex !== void 0 ? renderHeaderRightSide(dragIndex, {
121
+ placeholder: true
122
+ }) : headerRightSide })
123
+ ] }),
124
+ /* @__PURE__ */ jsxs(Content, { children: [
125
+ isHeaderVisible && /* @__PURE__ */ jsxs(Header, { isDraggable: !readOnly && isDraggable, onMouseOver: resetMoveSuccess, onFocus: resetMoveSuccess, children: [
126
+ /* @__PURE__ */ jsxs(LeftSide, { isDraggable: !readOnly && isDraggable, children: [
127
+ !readOnly && isDraggable && /* @__PURE__ */ jsx(DragIcon, { component: /* @__PURE__ */ jsx(DragHandleM, {}), ...!readOnly && isDraggable ? dragHandleProps : {} }),
128
+ matching !== void 0 && onChangeMatching && /* @__PURE__ */ jsxs(StepCardTitle, { children: [
129
+ /* @__PURE__ */ jsx(Matching, { matching, onChange: onChangeMatching, texts: {
130
+ matching: allTexts.matching,
131
+ notMatching: allTexts.notMatching
132
+ }, readOnly }),
133
+ /* @__PURE__ */ jsx(Title, { withoutMargin: true, level: 4, children: matching ? allTexts.conditionType : allTexts.notConditionType })
134
+ ] })
135
+ ] }),
136
+ !readOnly && isDraggable && /* @__PURE__ */ jsx(Middle, { ...dragHandleProps }),
137
+ (!readOnly || headerRightSide || renderHeaderRightSide) && /* @__PURE__ */ jsx(RightSide, { className: "step-card-right-side", children: renderRightSide() })
138
+ ] }),
139
+ /* @__PURE__ */ jsx(Body, { singleStepCondition, children }),
140
+ additionalFields && /* @__PURE__ */ jsx(AdditionalFields, { children: additionalFields }),
141
+ footer && /* @__PURE__ */ jsx(Footer, { children: footer })
142
+ ] })
143
+ ] });
177
144
  });
178
- export default StepCard;
145
+ export {
146
+ REORDER_THROTTLE,
147
+ StepCard as default
148
+ };
@@ -1,36 +1,36 @@
1
- import { type StyledIcon } from '@synerise/ds-icon';
2
- export declare const DragPlaceholder: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const DragPlaceholderContent: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const DragPlaceholderTag: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
1
+ import { StyledIcon } from '@synerise/ds-icon';
2
+ export declare const DragPlaceholder: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const DragPlaceholderContent: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const DragPlaceholderTag: import('styled-components').StyledComponent<"div", any, {}, never>;
5
+ export declare const Content: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const Container: import('styled-components').StyledComponent<"div", any, {
7
7
  isDragged?: boolean;
8
8
  isDragOverlay?: boolean;
9
9
  }, never>;
10
- export declare const RecentlyMoved: import("styled-components").StyledComponent<"span", any, {
10
+ export declare const RecentlyMoved: import('styled-components').StyledComponent<"span", any, {
11
11
  duration: number;
12
12
  }, never>;
13
- export declare const CountDownWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
- export declare const MoveByOffsetLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
15
- export declare const CountDownSpinner: import("styled-components").StyledComponent<"g", any, {
13
+ export declare const CountDownWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
14
+ export declare const MoveByOffsetLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
15
+ export declare const CountDownSpinner: import('styled-components').StyledComponent<"g", any, {
16
16
  duration: number;
17
17
  }, never>;
18
- export declare const MoveByOffset: import("styled-components").StyledComponent<"span", any, {
18
+ export declare const MoveByOffset: import('styled-components').StyledComponent<"span", any, {
19
19
  offset: number;
20
20
  }, never>;
21
- export declare const CrudsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
21
+ export declare const CrudsWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
22
22
  export declare const DragIcon: StyledIcon;
23
- export declare const Header: import("styled-components").StyledComponent<"div", any, {
23
+ export declare const Header: import('styled-components').StyledComponent<"div", any, {
24
24
  isDraggable?: boolean;
25
25
  }, never>;
26
- export declare const StepCardTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
27
- export declare const Middle: import("styled-components").StyledComponent<"div", any, {}, never>;
28
- export declare const LeftSide: import("styled-components").StyledComponent<"div", any, {
26
+ export declare const StepCardTitle: import('styled-components').StyledComponent<"div", any, {}, never>;
27
+ export declare const Middle: import('styled-components').StyledComponent<"div", any, {}, never>;
28
+ export declare const LeftSide: import('styled-components').StyledComponent<"div", any, {
29
29
  isDraggable?: boolean;
30
30
  }, never>;
31
- export declare const RightSide: import("styled-components").StyledComponent<"div", any, {}, never>;
32
- export declare const Body: import("styled-components").StyledComponent<"div", any, {
31
+ export declare const RightSide: import('styled-components').StyledComponent<"div", any, {}, never>;
32
+ export declare const Body: import('styled-components').StyledComponent<"div", any, {
33
33
  singleStepCondition: boolean;
34
34
  }, never>;
35
- export declare const AdditionalFields: import("styled-components").StyledComponent<"div", any, {}, never>;
36
- export declare const Footer: import("styled-components").StyledComponent<"div", any, {}, never>;
35
+ export declare const AdditionalFields: import('styled-components').StyledComponent<"div", any, {}, never>;
36
+ export declare const Footer: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,111 +1,111 @@
1
- import styled, { css, keyframes } from 'styled-components';
2
- import Icon from '@synerise/ds-icon';
3
- var fadeout = keyframes(["from{opacity:1}to{opacity:0;}"]);
4
- export var DragPlaceholder = styled.div.withConfig({
1
+ import styled, { css, keyframes } from "styled-components";
2
+ import Icon from "@synerise/ds-icon";
3
+ const fadeout = /* @__PURE__ */ keyframes(["from{opacity:1}to{opacity:0;}"]);
4
+ const DragPlaceholder = /* @__PURE__ */ styled.div.withConfig({
5
5
  displayName: "StepCardstyles__DragPlaceholder",
6
6
  componentId: "sc-45dbps-0"
7
7
  })(["opacity:0;pointer-events:none;visibility:hidden;display:none;align-items:center;"]);
8
- export var DragPlaceholderContent = styled.div.withConfig({
8
+ const DragPlaceholderContent = /* @__PURE__ */ 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:", ";"], function (props) {
12
- return props.theme.palette['blue-600'];
13
- });
14
- export var DragPlaceholderTag = styled.div.withConfig({
11
+ })(["position:absolute;left:0;top:0;width:100%;height:calc(100% - 24px);display:flex;align-items:center;justify-content:center;color:", ";"], (props) => props.theme.palette["blue-600"]);
12
+ const DragPlaceholderTag = /* @__PURE__ */ styled.div.withConfig({
15
13
  displayName: "StepCardstyles__DragPlaceholderTag",
16
14
  componentId: "sc-45dbps-2"
17
15
  })(["position:absolute;right:24px;top:22px;opacity:0.4;"]);
18
- export var Content = styled.div.withConfig({
16
+ const Content = /* @__PURE__ */ styled.div.withConfig({
19
17
  displayName: "StepCardstyles__Content",
20
18
  componentId: "sc-45dbps-3"
21
- })(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:", ";box-shadow:0 4px 12px 0 #2329360a;border-radius:3px;"], function (props) {
22
- return props.theme.palette.white;
23
- });
24
- export var Container = styled.div.withConfig({
19
+ })(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:", ";box-shadow:0 4px 12px 0 #2329360a;border-radius:3px;"], (props) => props.theme.palette.white);
20
+ const Container = /* @__PURE__ */ styled.div.withConfig({
25
21
  displayName: "StepCardstyles__Container",
26
22
  componentId: "sc-45dbps-4"
27
- })(["width:100%;min-width:594px;", ""], function (props) {
28
- return (props.isDragged || props.isDragOverlay) && css(["cursor:grabbing;width:100%;opacity:1 !important;padding:0;", " ", " ", "", "{visibility:visible;opacity:1;}", "{position:absolute;opacity:0;height:0;}", "{display:none;}"], props.isDragged && // dragged item - blue placeholder
29
- css(["height:100px;", "", "{visibility:visible;opacity:1;display:block;}", "{visibility:hidden;opacity:0;}"], DragPlaceholder, DragPlaceholder, Content), props.isDragOverlay && // grabbed item on top layer
30
- css(["", "{height:76px;margin-bottom:24px;display:flex;align-items:center;justify-content:center;}", "{display:none;}"], Content, RightSide), DragIcon, DragIcon, Body, Footer);
31
- });
32
- export var RecentlyMoved = styled.span.withConfig({
23
+ })(["width:100%;min-width:594px;", ""], (props) => (props.isDragged || props.isDragOverlay) && css(["cursor:grabbing;width:100%;opacity:1 !important;padding:0;", " ", " ", "", "{visibility:visible;opacity:1;}", "{position:absolute;opacity:0;height:0;}", "{display:none;}"], props.isDragged && // dragged item - blue placeholder
24
+ css(["height:100px;", "", "{visibility:visible;opacity:1;display:block;}", "{visibility:hidden;opacity:0;}"], DragPlaceholder, DragPlaceholder, Content), props.isDragOverlay && // grabbed item on top layer
25
+ css(["", "{height:76px;margin-bottom:24px;display:flex;align-items:center;justify-content:center;}", "{display:none;}"], Content, RightSide), DragIcon, DragIcon, Body, Footer));
26
+ const RecentlyMoved = /* @__PURE__ */ styled.span.withConfig({
33
27
  displayName: "StepCardstyles__RecentlyMoved",
34
28
  componentId: "sc-45dbps-5"
35
- })(["animation:", " 0.1s linear ", "s 1 forwards;"], fadeout, function (props) {
36
- return (props.duration - 200) / 1000;
37
- });
38
- export var CountDownWrapper = styled.div.withConfig({
29
+ })(["animation:", " 0.1s linear ", "s 1 forwards;"], fadeout, (props) => (props.duration - 200) / 1e3);
30
+ const CountDownWrapper = /* @__PURE__ */ styled.div.withConfig({
39
31
  displayName: "StepCardstyles__CountDownWrapper",
40
32
  componentId: "sc-45dbps-6"
41
33
  })(["vertical-align:middle;display:inline-block;width:24px;height:24px;color:inherit;"]);
42
- export var MoveByOffsetLabel = styled.span.withConfig({
34
+ const MoveByOffsetLabel = /* @__PURE__ */ styled.span.withConfig({
43
35
  displayName: "StepCardstyles__MoveByOffsetLabel",
44
36
  componentId: "sc-45dbps-7"
45
37
  })([""]);
46
- export var CountDownSpinner = styled.g.withConfig({
38
+ const CountDownSpinner = /* @__PURE__ */ styled.g.withConfig({
47
39
  displayName: "StepCardstyles__CountDownSpinner",
48
40
  componentId: "sc-45dbps-8"
49
- })(["stroke:", ";stroke-width:2px;stroke-dasharray:75;transition:stroke-dashoffset ", "s linear;"], function (props) {
50
- return props.theme.palette['grey-500'];
51
- }, function (props) {
52
- return props.duration;
53
- });
54
- export var MoveByOffset = styled.span.withConfig({
41
+ })(["stroke:", ";stroke-width:2px;stroke-dasharray:75;transition:stroke-dashoffset ", "s linear;"], (props) => props.theme.palette["grey-500"], (props) => props.duration);
42
+ const MoveByOffset = /* @__PURE__ */ styled.span.withConfig({
55
43
  displayName: "StepCardstyles__MoveByOffset",
56
44
  componentId: "sc-45dbps-9"
57
- })(["display:flex;align-items:center;gap:2px;", "{display:", ";}"], MoveByOffsetLabel, function (props) {
58
- return props.offset === 0 ? 'none' : 'block';
59
- });
60
- export var CrudsWrapper = styled.div.withConfig({
45
+ })(["display:flex;align-items:center;gap:2px;", "{display:", ";}"], MoveByOffsetLabel, (props) => props.offset === 0 ? "none" : "block");
46
+ const CrudsWrapper = /* @__PURE__ */ styled.div.withConfig({
61
47
  displayName: "StepCardstyles__CrudsWrapper",
62
48
  componentId: "sc-45dbps-10"
63
49
  })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;opacity:0;visibility:hidden;"]);
64
- export var DragIcon = styled(Icon).withConfig({
50
+ const DragIcon = /* @__PURE__ */ styled(Icon).withConfig({
65
51
  displayName: "StepCardstyles__DragIcon",
66
52
  componentId: "sc-45dbps-11"
67
53
  })(["visibility:hidden;opacity:0;"]);
68
- export var Header = styled.div.withConfig({
54
+ const Header = /* @__PURE__ */ styled.div.withConfig({
69
55
  displayName: "StepCardstyles__Header",
70
56
  componentId: "sc-45dbps-12"
71
- })(["display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;padding:22px 0;margin:0 24px 0 0;width:100%;max-width:calc(100% - 24px);position:relative;cursor:", ";&:hover{", "{display:none;}", "{opacity:1;visibility:visible;}", "{visibility:visible;opacity:1;}}"], function (props) {
72
- return props.isDraggable ? 'grab' : 'default';
73
- }, RecentlyMoved, CrudsWrapper, DragIcon);
74
- export var StepCardTitle = styled.div.withConfig({
57
+ })(["display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;padding:22px 0;margin:0 24px 0 0;width:100%;max-width:calc(100% - 24px);position:relative;cursor:", ";&:hover{", "{display:none;}", "{opacity:1;visibility:visible;}", "{visibility:visible;opacity:1;}}"], (props) => props.isDraggable ? "grab" : "default", RecentlyMoved, CrudsWrapper, DragIcon);
58
+ const StepCardTitle = /* @__PURE__ */ styled.div.withConfig({
75
59
  displayName: "StepCardstyles__StepCardTitle",
76
60
  componentId: "sc-45dbps-13"
77
61
  })(["display:flex;gap:8px;"]);
78
- export var Middle = styled.div.withConfig({
62
+ const Middle = /* @__PURE__ */ styled.div.withConfig({
79
63
  displayName: "StepCardstyles__Middle",
80
64
  componentId: "sc-45dbps-14"
81
65
  })(["flex-grow:1;"]);
82
- export var LeftSide = styled.div.withConfig({
66
+ const LeftSide = /* @__PURE__ */ styled.div.withConfig({
83
67
  displayName: "StepCardstyles__LeftSide",
84
68
  componentId: "sc-45dbps-15"
85
- })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding-left:", ";"], function (_ref) {
86
- var isDraggable = _ref.isDraggable;
87
- return isDraggable ? '0' : '24px';
88
- });
89
- export var RightSide = styled.div.withConfig({
69
+ })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding-left:", ";"], ({
70
+ isDraggable
71
+ }) => isDraggable ? "0" : "24px");
72
+ const RightSide = /* @__PURE__ */ styled.div.withConfig({
90
73
  displayName: "StepCardstyles__RightSide",
91
74
  componentId: "sc-45dbps-16"
92
75
  })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;> *{margin-left:8px;}"]);
93
- export var Body = styled.div.withConfig({
76
+ const Body = /* @__PURE__ */ styled.div.withConfig({
94
77
  displayName: "StepCardstyles__Body",
95
78
  componentId: "sc-45dbps-17"
96
- })(["padding:", ";width:100%;.ds-conditions{&:first-of-type{padding-top:0;}&:last-of-type{padding-bottom:0;}}"], function (_ref2) {
97
- var singleStepCondition = _ref2.singleStepCondition;
98
- return singleStepCondition ? '0' : '0 0 24px';
99
- });
100
- export var AdditionalFields = styled.div.withConfig({
79
+ })(["padding:", ";width:100%;.ds-conditions{&:first-of-type{padding-top:0;}&:last-of-type{padding-bottom:0;}}"], ({
80
+ singleStepCondition
81
+ }) => singleStepCondition ? "0" : "0 0 24px");
82
+ const AdditionalFields = /* @__PURE__ */ styled.div.withConfig({
101
83
  displayName: "StepCardstyles__AdditionalFields",
102
84
  componentId: "sc-45dbps-18"
103
- })(["width:100%;padding:24px 24px 12px;border-top:1px solid ", ";"], function (props) {
104
- return props.theme.palette['grey-200'];
105
- });
106
- export var Footer = styled.div.withConfig({
85
+ })(["width:100%;padding:24px 24px 12px;border-top:1px solid ", ";"], (props) => props.theme.palette["grey-200"]);
86
+ const Footer = /* @__PURE__ */ styled.div.withConfig({
107
87
  displayName: "StepCardstyles__Footer",
108
88
  componentId: "sc-45dbps-19"
109
- })(["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) {
110
- return props.theme.palette['grey-100'];
111
- });
89
+ })(["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;}"], (props) => props.theme.palette["grey-100"]);
90
+ export {
91
+ AdditionalFields,
92
+ Body,
93
+ Container,
94
+ Content,
95
+ CountDownSpinner,
96
+ CountDownWrapper,
97
+ CrudsWrapper,
98
+ DragIcon,
99
+ DragPlaceholder,
100
+ DragPlaceholderContent,
101
+ DragPlaceholderTag,
102
+ Footer,
103
+ Header,
104
+ LeftSide,
105
+ Middle,
106
+ MoveByOffset,
107
+ MoveByOffsetLabel,
108
+ RecentlyMoved,
109
+ RightSide,
110
+ StepCardTitle
111
+ };
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
- import type { DragHandlePropType } from '@synerise/ds-sortable';
1
+ import { ReactNode } from 'react';
2
+ import { DragHandlePropType } from '@synerise/ds-sortable';
3
3
  export type StepCardTexts = {
4
4
  matching: string;
5
5
  notMatching: string;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,2 +1,2 @@
1
- import { type StepCardTexts } from '../StepCard.types';
1
+ import { StepCardTexts } from '../StepCard.types';
2
2
  export declare const useDefaultTexts: (texts?: Partial<StepCardTexts>) => StepCardTexts;
@@ -1,52 +1,54 @@
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 { useMemo } from 'react';
3
- import { useIntl } from 'react-intl';
4
- export var useDefaultTexts = function useDefaultTexts(texts) {
5
- var _useIntl = useIntl(),
6
- formatMessage = _useIntl.formatMessage;
7
- var allTexts = useMemo(function () {
8
- return _extends({
9
- matching: formatMessage({
10
- id: 'DS.MATCHING.PERFORMED',
11
- defaultMessage: 'Performed'
12
- }),
13
- notMatching: formatMessage({
14
- id: 'DS.MATCHING.NOT-PERFORMED',
15
- defaultMessage: 'Not performed'
16
- }),
17
- conditionType: formatMessage({
18
- id: 'DS.STEP-CARD.CONDITION-TYPE',
19
- defaultMessage: 'event'
20
- }),
21
- notConditionType: formatMessage({
22
- id: 'DS.STEP-CARD.NOT-CONDITION-TYPE',
23
- defaultMessage: 'event'
24
- }),
25
- namePlaceholder: formatMessage({
26
- id: 'DS.STEP-CARD.NAME-PLACEHOLDER',
27
- defaultMessage: 'Name'
28
- }),
29
- moveTooltip: formatMessage({
30
- id: 'DS.STEP-CARD.MOVE',
31
- defaultMessage: 'Move'
32
- }),
33
- moveUpTooltip: formatMessage({
34
- id: 'DS.STEP-CARD.MOVE-UP',
35
- defaultMessage: 'Move Up'
36
- }),
37
- moveDownTooltip: formatMessage({
38
- id: 'DS.STEP-CARD.MOVE-DOWN',
39
- defaultMessage: 'Move Down'
40
- }),
41
- deleteTooltip: formatMessage({
42
- id: 'DS.STEP-CARD.DELETE',
43
- defaultMessage: 'Delete'
44
- }),
45
- duplicateTooltip: formatMessage({
46
- id: 'DS.STEP-CARD.DUPLICATE',
47
- defaultMessage: 'Duplicate'
48
- })
49
- }, texts || {});
50
- }, [formatMessage, texts]);
1
+ import { useMemo } from "react";
2
+ import { useIntl } from "react-intl";
3
+ const useDefaultTexts = (texts) => {
4
+ const {
5
+ formatMessage
6
+ } = useIntl();
7
+ const allTexts = useMemo(() => ({
8
+ matching: formatMessage({
9
+ id: "DS.MATCHING.PERFORMED",
10
+ defaultMessage: "Performed"
11
+ }),
12
+ notMatching: formatMessage({
13
+ id: "DS.MATCHING.NOT-PERFORMED",
14
+ defaultMessage: "Not performed"
15
+ }),
16
+ conditionType: formatMessage({
17
+ id: "DS.STEP-CARD.CONDITION-TYPE",
18
+ defaultMessage: "event"
19
+ }),
20
+ notConditionType: formatMessage({
21
+ id: "DS.STEP-CARD.NOT-CONDITION-TYPE",
22
+ defaultMessage: "event"
23
+ }),
24
+ namePlaceholder: formatMessage({
25
+ id: "DS.STEP-CARD.NAME-PLACEHOLDER",
26
+ defaultMessage: "Name"
27
+ }),
28
+ moveTooltip: formatMessage({
29
+ id: "DS.STEP-CARD.MOVE",
30
+ defaultMessage: "Move"
31
+ }),
32
+ moveUpTooltip: formatMessage({
33
+ id: "DS.STEP-CARD.MOVE-UP",
34
+ defaultMessage: "Move Up"
35
+ }),
36
+ moveDownTooltip: formatMessage({
37
+ id: "DS.STEP-CARD.MOVE-DOWN",
38
+ defaultMessage: "Move Down"
39
+ }),
40
+ deleteTooltip: formatMessage({
41
+ id: "DS.STEP-CARD.DELETE",
42
+ defaultMessage: "Delete"
43
+ }),
44
+ duplicateTooltip: formatMessage({
45
+ id: "DS.STEP-CARD.DUPLICATE",
46
+ defaultMessage: "Duplicate"
47
+ }),
48
+ ...texts || {}
49
+ }), [formatMessage, texts]);
51
50
  return allTexts;
52
- };
51
+ };
52
+ export {
53
+ useDefaultTexts
54
+ };
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './StepCard';
1
+ import { default as default2 } from "./StepCard.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-step-card",
3
- "version": "1.2.38",
3
+ "version": "1.2.40",
4
4
  "description": "StepCard UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -35,14 +35,14 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-alert": "^1.1.43",
39
- "@synerise/ds-cruds": "^1.1.0",
40
- "@synerise/ds-icon": "^1.14.1",
41
- "@synerise/ds-logic": "^1.1.30",
42
- "@synerise/ds-typography": "^1.1.11"
38
+ "@synerise/ds-alert": "^1.1.45",
39
+ "@synerise/ds-cruds": "^1.1.2",
40
+ "@synerise/ds-icon": "^1.15.1",
41
+ "@synerise/ds-logic": "^1.1.32",
42
+ "@synerise/ds-typography": "^1.1.13"
43
43
  },
44
44
  "devDependencies": {
45
- "@synerise/ds-sortable": "^1.3.12"
45
+ "@synerise/ds-sortable": "^1.3.14"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@synerise/ds-core": "*",
@@ -50,5 +50,5 @@
50
50
  "react-intl": ">=3.12.0 <= 6.8",
51
51
  "styled-components": "^5.3.3"
52
52
  },
53
- "gitHead": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
53
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
54
54
  }