@synerise/ds-card-tabs 1.2.2 → 1.2.4
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,25 @@
|
|
|
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.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@1.2.3...@synerise/ds-card-tabs@1.2.4) (2025-04-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* add keyId as key into CardTab ([9a1d626](https://github.com/Synerise/synerise-design/commit/9a1d6265496288a71e43163c4299f41200afe450))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.2.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@1.2.2...@synerise/ds-card-tabs@1.2.3) (2025-04-04)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-card-tabs
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@1.2.1...@synerise/ds-card-tabs@1.2.2) (2025-04-02)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-card-tabs
|
package/dist/CardTab/CardTab.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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
2
|
import React, { useState, useMemo, useCallback } from 'react';
|
|
3
3
|
import Icon from '@synerise/ds-icon';
|
|
4
4
|
import InlineEdit from '@synerise/ds-inline-edit/dist/InlineEdit';
|
|
@@ -48,6 +48,10 @@ export type CardTabProps<IdType extends string | number = number> = {
|
|
|
48
48
|
itemData?: unknown;
|
|
49
49
|
actionsAsDropdown?: boolean;
|
|
50
50
|
renderSuffix?: (props: CardTabSuffixProps) => ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
*/
|
|
54
|
+
keyId?: string;
|
|
51
55
|
};
|
|
52
56
|
export type CardTabSuffixProps = Omit<CardTabProps & {
|
|
53
57
|
handleRemove?: (event?: MouseEvent<HTMLElement>) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export var prefixType
|
|
2
|
-
(function (prefixType) {
|
|
1
|
+
export var prefixType = /*#__PURE__*/function (prefixType) {
|
|
3
2
|
prefixType[prefixType["TAG"] = 0] = "TAG";
|
|
4
3
|
prefixType[prefixType["ICON"] = 1] = "ICON";
|
|
5
4
|
prefixType[prefixType["DOT"] = 2] = "DOT";
|
|
6
5
|
prefixType[prefixType["HANDLE"] = 3] = "HANDLE";
|
|
7
|
-
|
|
6
|
+
return prefixType;
|
|
7
|
+
}({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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
2
|
import React from 'react';
|
|
3
3
|
import Icon, { DragHandleM } from '@synerise/ds-icon';
|
|
4
4
|
import * as S from '../CardTab.styles';
|
package/dist/CardTabs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["className", "onChangeOrder", "onAddTab", "maxTabsCount", "children", "addTabLabel"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
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); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { Children, cloneElement, isValidElement } from 'react';
|
|
5
5
|
// import { ReactSortable, MoveEvent } from 'react-sortablejs';
|
|
6
6
|
|
|
@@ -34,12 +34,14 @@ var CardTabs = function CardTabs(_ref) {
|
|
|
34
34
|
return _extends({}, child.props, {
|
|
35
35
|
color: defaultColorsOrder[i % defaultColorsOrder.length],
|
|
36
36
|
draggable: childrenCount > 1 && (Boolean(onChangeOrder) || child.props.draggable)
|
|
37
|
-
}
|
|
37
|
+
}, child.props.keyId ? {
|
|
38
|
+
key: child.props.keyId
|
|
39
|
+
} : {});
|
|
38
40
|
});
|
|
39
41
|
var renderChildren = function renderChildren() {
|
|
40
42
|
return /*#__PURE__*/React.createElement(React.Fragment, null, Children.map(children, function (child, i) {
|
|
41
43
|
var props = child.props;
|
|
42
|
-
return isValidElement(child) && cloneElement(child, _extends({}, props.color ? {} : {
|
|
44
|
+
return /*#__PURE__*/isValidElement(child) && /*#__PURE__*/cloneElement(child, _extends({}, props.color ? {} : {
|
|
43
45
|
color: defaultColorsOrder[i % defaultColorsOrder.length]
|
|
44
46
|
}, {
|
|
45
47
|
draggable: childrenCount > 1 && (Boolean(onChangeOrder) || props.draggable)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-card-tabs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "CardTabs UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.1.
|
|
38
|
-
"@synerise/ds-cruds": "^1.0.
|
|
39
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
40
|
-
"@synerise/ds-icon": "^1.
|
|
41
|
-
"@synerise/ds-inline-edit": "^1.0.
|
|
42
|
-
"@synerise/ds-menu": "^1.0.
|
|
37
|
+
"@synerise/ds-button": "^1.1.4",
|
|
38
|
+
"@synerise/ds-cruds": "^1.0.5",
|
|
39
|
+
"@synerise/ds-dropdown": "^1.0.5",
|
|
40
|
+
"@synerise/ds-icon": "^1.4.0",
|
|
41
|
+
"@synerise/ds-inline-edit": "^1.0.6",
|
|
42
|
+
"@synerise/ds-menu": "^1.0.5",
|
|
43
43
|
"@synerise/ds-sortable": "^1.1.0",
|
|
44
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
45
|
-
"@synerise/ds-typography": "^1.0.
|
|
44
|
+
"@synerise/ds-tooltip": "^1.1.4",
|
|
45
|
+
"@synerise/ds-typography": "^1.0.5",
|
|
46
46
|
"@synerise/ds-utils": "^1.0.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
53
53
|
"styled-components": "^5.3.3"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "6735f9babfeef53122f54ca86cba5f581e8870d9"
|
|
56
56
|
}
|