@synerise/ds-cruds 0.5.12 → 0.5.13
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 +11 -0
- package/dist/Cruds.js +18 -9
- package/dist/SingleAction.d.ts +2 -2
- package/dist/SingleAction.js +14 -6
- package/dist/SingleAction.types.d.ts +4 -4
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.5.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cruds@0.5.12...@synerise/ds-cruds@0.5.13) (2024-07-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **storybook7:** card tabs stories ([537084e](https://github.com/Synerise/synerise-design/commit/537084e610b5a932ed208b27725c6feb2208ccd6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.5.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cruds@0.5.11...@synerise/ds-cruds@0.5.12) (2024-07-05)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-cruds
|
package/dist/Cruds.js
CHANGED
|
@@ -39,48 +39,57 @@ var Cruds = function Cruds(_ref) {
|
|
|
39
39
|
inactive: moveUpInactive,
|
|
40
40
|
className: "moveup",
|
|
41
41
|
onClick: onMoveUp,
|
|
42
|
-
icon: /*#__PURE__*/React.createElement(ArrowUpS, null)
|
|
42
|
+
icon: /*#__PURE__*/React.createElement(ArrowUpS, null),
|
|
43
|
+
"data-testid": "ds-cruds-moveup"
|
|
43
44
|
}), onMoveDown && /*#__PURE__*/React.createElement(SingleAction, {
|
|
44
45
|
title: moveDownTooltip,
|
|
45
46
|
inactive: moveDownInactive,
|
|
46
47
|
className: "movedown",
|
|
47
48
|
onClick: onMoveDown,
|
|
48
|
-
icon: /*#__PURE__*/React.createElement(ArrowDownS, null)
|
|
49
|
+
icon: /*#__PURE__*/React.createElement(ArrowDownS, null),
|
|
50
|
+
"data-testid": "ds-cruds-movedown"
|
|
49
51
|
}), onAdd && /*#__PURE__*/React.createElement(SingleAction, {
|
|
50
52
|
title: addTooltip,
|
|
51
53
|
className: "add",
|
|
52
54
|
onClick: onAdd,
|
|
53
|
-
icon: /*#__PURE__*/React.createElement(AddS, null)
|
|
55
|
+
icon: /*#__PURE__*/React.createElement(AddS, null),
|
|
56
|
+
"data-testid": "ds-cruds-add"
|
|
54
57
|
}), onEdit && /*#__PURE__*/React.createElement(SingleAction, {
|
|
55
58
|
title: editTooltip,
|
|
56
59
|
className: "edit",
|
|
57
60
|
onClick: onEdit,
|
|
58
|
-
icon: /*#__PURE__*/React.createElement(EditS, null)
|
|
61
|
+
icon: /*#__PURE__*/React.createElement(EditS, null),
|
|
62
|
+
"data-testid": "ds-cruds-edit"
|
|
59
63
|
}), onPreview && /*#__PURE__*/React.createElement(SingleAction, {
|
|
60
64
|
title: previewTooltip,
|
|
61
65
|
className: "preview",
|
|
62
66
|
onClick: onPreview,
|
|
63
|
-
icon: /*#__PURE__*/React.createElement(ShowM, null)
|
|
67
|
+
icon: /*#__PURE__*/React.createElement(ShowM, null),
|
|
68
|
+
"data-testid": "ds-cruds-preview"
|
|
64
69
|
}), onDuplicate && /*#__PURE__*/React.createElement(SingleAction, {
|
|
65
70
|
title: duplicateTooltip,
|
|
66
71
|
className: "duplicate",
|
|
67
72
|
onClick: onDuplicate,
|
|
68
|
-
icon: /*#__PURE__*/React.createElement(DuplicateS, null)
|
|
73
|
+
icon: /*#__PURE__*/React.createElement(DuplicateS, null),
|
|
74
|
+
"data-testid": "ds-cruds-duplicate"
|
|
69
75
|
}), onDelete && /*#__PURE__*/React.createElement(SingleAction, {
|
|
70
76
|
title: deleteTooltip,
|
|
71
77
|
className: "delete",
|
|
72
78
|
onClick: onDelete,
|
|
73
|
-
icon: /*#__PURE__*/React.createElement(TrashS, null)
|
|
79
|
+
icon: /*#__PURE__*/React.createElement(TrashS, null),
|
|
80
|
+
"data-testid": "ds-cruds-delete"
|
|
74
81
|
}), onMove && /*#__PURE__*/React.createElement(SingleAction, {
|
|
75
82
|
title: moveTooltip,
|
|
76
83
|
className: "move",
|
|
77
84
|
onClick: onMove,
|
|
78
|
-
icon: /*#__PURE__*/React.createElement(DragHandleM, null)
|
|
85
|
+
icon: /*#__PURE__*/React.createElement(DragHandleM, null),
|
|
86
|
+
"data-testid": "ds-cruds-move"
|
|
79
87
|
}), onRemove && /*#__PURE__*/React.createElement(SingleAction, {
|
|
80
88
|
title: removeTooltip,
|
|
81
89
|
className: "remove",
|
|
82
90
|
onClick: onRemove,
|
|
83
|
-
icon: /*#__PURE__*/React.createElement(CloseS, null)
|
|
91
|
+
icon: /*#__PURE__*/React.createElement(CloseS, null),
|
|
92
|
+
"data-testid": "ds-cruds-remove"
|
|
84
93
|
}));
|
|
85
94
|
};
|
|
86
95
|
|
package/dist/SingleAction.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { SingleActionProps } from './SingleAction.types';
|
|
3
|
-
declare const SingleAction: React.
|
|
3
|
+
declare const SingleAction: ({ title, inactive, className, onClick, icon, iconSize, ...htmlProps }: SingleActionProps) => React.JSX.Element;
|
|
4
4
|
export default SingleAction;
|
package/dist/SingleAction.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["title", "inactive", "className", "onClick", "icon", "iconSize"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
2
8
|
import Tooltip from '@synerise/ds-tooltip/dist/Tooltip';
|
|
3
9
|
import Icon from '@synerise/ds-icon';
|
|
4
10
|
import * as S from './Cruds.styles';
|
|
@@ -9,17 +15,19 @@ var SingleAction = function SingleAction(_ref) {
|
|
|
9
15
|
className = _ref.className,
|
|
10
16
|
_onClick = _ref.onClick,
|
|
11
17
|
icon = _ref.icon,
|
|
12
|
-
iconSize = _ref.iconSize
|
|
18
|
+
iconSize = _ref.iconSize,
|
|
19
|
+
htmlProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
|
+
|
|
13
21
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14
22
|
title: title
|
|
15
|
-
}, /*#__PURE__*/React.createElement(S.IconWrapper, {
|
|
23
|
+
}, /*#__PURE__*/React.createElement(S.IconWrapper, _extends({
|
|
16
24
|
inactive: inactive,
|
|
17
25
|
className: className,
|
|
18
|
-
onClick: function onClick(
|
|
19
|
-
|
|
26
|
+
onClick: function onClick(event) {
|
|
27
|
+
event.stopPropagation();
|
|
20
28
|
_onClick && _onClick();
|
|
21
29
|
}
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
30
|
+
}, htmlProps), /*#__PURE__*/React.createElement(Icon, {
|
|
23
31
|
component: icon,
|
|
24
32
|
size: iconSize || 24
|
|
25
33
|
})));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type SingleActionProps = {
|
|
3
|
-
title:
|
|
3
|
+
title: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
5
|
inactive?: boolean;
|
|
6
6
|
onClick: () => void;
|
|
7
|
-
icon:
|
|
7
|
+
icon: ReactNode;
|
|
8
8
|
iconSize?: number;
|
|
9
|
-
}
|
|
9
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'className' | 'onClick'>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-cruds",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"description": "Cruds UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
],
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@synerise/ds-icon": "^0.64.
|
|
37
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
36
|
+
"@synerise/ds-icon": "^0.64.1",
|
|
37
|
+
"@synerise/ds-tooltip": "^0.14.33"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@synerise/ds-core": "*",
|
|
41
41
|
"react": ">=16.9.0 <= 17.0.2",
|
|
42
42
|
"styled-components": "5.0.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "6f4996380356c1e5cb9a9d8b553069ad9cea7c27"
|
|
45
45
|
}
|