@synerise/ds-information-card 1.0.0 → 1.0.1
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 +8 -0
- package/dist/InformationCardPropertyList/InformationCardPropertyList.js +9 -7
- package/dist/InformationCardPropertyList/InformationCardPropertyList.types.d.ts +6 -3
- package/dist/InformationCardSummary/InformationCardSummary.js +1 -1
- package/dist/InformationCardSummary/InformationCardSummary.types.d.ts +1 -0
- package/package.json +17 -17
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.0.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@1.0.0...@synerise/ds-information-card@1.0.1) (2025-03-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-information-card
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.9.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@0.9.4...@synerise/ds-information-card@0.9.5) (2025-03-10)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-information-card
|
|
@@ -2,6 +2,9 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
4
|
import * as S from '../InformationCard.styles';
|
|
5
|
+
var isDivider = function isDivider(item) {
|
|
6
|
+
return 'type' in item && item.type === 'divider';
|
|
7
|
+
};
|
|
5
8
|
export var InformationCardPropertyList = function InformationCardPropertyList(_ref) {
|
|
6
9
|
var items = _ref.items;
|
|
7
10
|
var itemsWithIDs = useMemo(function () {
|
|
@@ -13,17 +16,16 @@ export var InformationCardPropertyList = function InformationCardPropertyList(_r
|
|
|
13
16
|
}, [items]);
|
|
14
17
|
return /*#__PURE__*/React.createElement(S.InformationCardPropertyListWrapper, {
|
|
15
18
|
"data-testid": "information-card-property-list"
|
|
16
|
-
}, itemsWithIDs == null ? void 0 : itemsWithIDs.map(function (
|
|
17
|
-
|
|
18
|
-
label = _ref2.label,
|
|
19
|
-
value = _ref2.value,
|
|
20
|
-
id = _ref2.id;
|
|
21
|
-
if (type === 'divider') {
|
|
19
|
+
}, itemsWithIDs == null ? void 0 : itemsWithIDs.map(function (item) {
|
|
20
|
+
if (isDivider(item)) {
|
|
22
21
|
return /*#__PURE__*/React.createElement(S.Divider, {
|
|
23
22
|
dashed: true,
|
|
24
|
-
key: id
|
|
23
|
+
key: item.id
|
|
25
24
|
});
|
|
26
25
|
}
|
|
26
|
+
var label = item.label,
|
|
27
|
+
value = item.value,
|
|
28
|
+
id = item.id;
|
|
27
29
|
return /*#__PURE__*/React.createElement(S.InformationCardPropertyItem, {
|
|
28
30
|
key: id
|
|
29
31
|
}, label && /*#__PURE__*/React.createElement(S.InformationCardPropertyItemLabel, null, label, ":"), /*#__PURE__*/React.createElement(S.InformationCardPropertyItemValue, null, value));
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Key, ReactNode } from 'react';
|
|
2
2
|
export type InformationCardPropertyItemTypes = 'divider';
|
|
3
|
+
export type InformationCardPropertyDivider = {
|
|
4
|
+
type: InformationCardPropertyItemTypes;
|
|
5
|
+
id?: Key;
|
|
6
|
+
};
|
|
3
7
|
export type InformationCardPropertyItem = {
|
|
8
|
+
id?: Key;
|
|
4
9
|
label: ReactNode;
|
|
5
10
|
value?: ReactNode;
|
|
6
|
-
|
|
7
|
-
type?: InformationCardPropertyItemTypes;
|
|
8
|
-
};
|
|
11
|
+
} | InformationCardPropertyDivider;
|
|
9
12
|
export type InformationCardPropertyListProps = {
|
|
10
13
|
items?: InformationCardPropertyItem[];
|
|
11
14
|
summaryItems?: InformationCardPropertyItem[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
|
-
import Tooltip from '@synerise/ds-tooltip
|
|
4
|
+
import Tooltip from '@synerise/ds-tooltip';
|
|
5
5
|
import * as S from '../InformationCard.styles';
|
|
6
6
|
export var InformationCardSummary = function InformationCardSummary(_ref) {
|
|
7
7
|
var items = _ref.items;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-information-card",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "InformationCard UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-alert": "^1.0.
|
|
39
|
-
"@synerise/ds-avatar": "^1.0.
|
|
40
|
-
"@synerise/ds-badge": "^1.0.
|
|
41
|
-
"@synerise/ds-button": "^1.
|
|
42
|
-
"@synerise/ds-card": "^1.
|
|
43
|
-
"@synerise/ds-description": "^1.0.
|
|
44
|
-
"@synerise/ds-divider": "^1.0.
|
|
45
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
46
|
-
"@synerise/ds-icon": "^1.0.
|
|
47
|
-
"@synerise/ds-menu": "^1.0.
|
|
48
|
-
"@synerise/ds-scrollbar": "^1.0.
|
|
49
|
-
"@synerise/ds-subtle-form": "^1.0.
|
|
50
|
-
"@synerise/ds-tooltip": "^1.
|
|
51
|
-
"@synerise/ds-typography": "^1.0.
|
|
52
|
-
"@synerise/ds-utils": "^1.0.
|
|
38
|
+
"@synerise/ds-alert": "^1.0.1",
|
|
39
|
+
"@synerise/ds-avatar": "^1.0.1",
|
|
40
|
+
"@synerise/ds-badge": "^1.0.1",
|
|
41
|
+
"@synerise/ds-button": "^1.1.0",
|
|
42
|
+
"@synerise/ds-card": "^1.1.0",
|
|
43
|
+
"@synerise/ds-description": "^1.0.1",
|
|
44
|
+
"@synerise/ds-divider": "^1.0.1",
|
|
45
|
+
"@synerise/ds-dropdown": "^1.0.1",
|
|
46
|
+
"@synerise/ds-icon": "^1.0.1",
|
|
47
|
+
"@synerise/ds-menu": "^1.0.1",
|
|
48
|
+
"@synerise/ds-scrollbar": "^1.0.1",
|
|
49
|
+
"@synerise/ds-subtle-form": "^1.0.1",
|
|
50
|
+
"@synerise/ds-tooltip": "^1.1.0",
|
|
51
|
+
"@synerise/ds-typography": "^1.0.1",
|
|
52
|
+
"@synerise/ds-utils": "^1.0.1",
|
|
53
53
|
"rc-trigger": "^5.3.4"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
59
59
|
"styled-components": "^5.3.3"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "218110f61f4371bc04d793b2b976b71d14e99e76"
|
|
62
62
|
}
|