@synerise/ds-information-card 0.1.36 → 0.2.0
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
|
+
# [0.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@0.1.37...@synerise/ds-information-card@0.2.0) (2023-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **information-card:** adjusts styles to use as a tooltip ([8e4d04a](https://github.com/Synerise/synerise-design/commit/8e4d04a08f829a9e5bd21f3d8e432f24b5e5b038))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.1.37](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@0.1.36...@synerise/ds-information-card@0.1.37) (2023-01-12)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-information-card
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.1.36](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@0.1.35...@synerise/ds-information-card@0.1.36) (2023-01-09)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-information-card
|
|
@@ -30,6 +30,10 @@ export declare type InformationCardProps = {
|
|
|
30
30
|
* default action button tooltip
|
|
31
31
|
*/
|
|
32
32
|
actionButtonTooltipText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* adjusts the styles to be displayed as a tooltip
|
|
35
|
+
*/
|
|
36
|
+
asTooltip?: boolean;
|
|
33
37
|
/**
|
|
34
38
|
* description in a tooltip shown when user (note renderBadge has to be provided)
|
|
35
39
|
*/
|
package/dist/InformationCard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["actionButton", "actionButtonTooltipText", "actionButtonCallback", "avatarTooltipText", "children", "copyTooltip", "copiedTooltip", "renderFooter", "renderBadge", "subtitle", "title", "notice", "footerText", "icon", "iconColor", "descriptionConfig"];
|
|
1
|
+
var _excluded = ["actionButton", "actionButtonTooltipText", "actionButtonCallback", "asTooltip", "avatarTooltipText", "children", "copyTooltip", "copiedTooltip", "renderFooter", "renderBadge", "subtitle", "title", "notice", "footerText", "icon", "iconColor", "descriptionConfig"];
|
|
2
2
|
|
|
3
3
|
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; }
|
|
4
4
|
|
|
@@ -54,6 +54,7 @@ var InformationCard = React.forwardRef(function (_ref, ref) {
|
|
|
54
54
|
var actionButton = _ref.actionButton,
|
|
55
55
|
actionButtonTooltipText = _ref.actionButtonTooltipText,
|
|
56
56
|
actionButtonCallback = _ref.actionButtonCallback,
|
|
57
|
+
asTooltip = _ref.asTooltip,
|
|
57
58
|
avatarTooltipText = _ref.avatarTooltipText,
|
|
58
59
|
children = _ref.children,
|
|
59
60
|
copyTooltip = _ref.copyTooltip,
|
|
@@ -76,7 +77,8 @@ var InformationCard = React.forwardRef(function (_ref, ref) {
|
|
|
76
77
|
}, /*#__PURE__*/React.createElement(S.Flex, {
|
|
77
78
|
style: {
|
|
78
79
|
backgroundColor: '',
|
|
79
|
-
alignItems: 'center'
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
textAlign: 'left'
|
|
80
82
|
}
|
|
81
83
|
}, /*#__PURE__*/React.createElement("span", null, content), /*#__PURE__*/React.createElement(Copy, {
|
|
82
84
|
copyValue: content,
|
|
@@ -93,7 +95,8 @@ var InformationCard = React.forwardRef(function (_ref, ref) {
|
|
|
93
95
|
return /*#__PURE__*/React.createElement(S.InfoCardWrapper, {
|
|
94
96
|
ref: ref,
|
|
95
97
|
"aria-label": "information card",
|
|
96
|
-
className: "ds-info-card"
|
|
98
|
+
className: "ds-info-card",
|
|
99
|
+
asTooltip: asTooltip
|
|
97
100
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
98
101
|
background: "white" // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
99
102
|
// @ts-ignore
|
|
@@ -6,6 +6,7 @@ export declare const FlexGrow: import("styled-components").StyledComponent<"div"
|
|
|
6
6
|
export declare const ActionButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
export declare const InfoCardWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
8
8
|
footerText?: string | undefined;
|
|
9
|
+
asTooltip?: boolean | undefined;
|
|
9
10
|
}, never>;
|
|
10
11
|
/**
|
|
11
12
|
* This component can be used to style container with popovers/tooltips to disable arrow.
|
|
@@ -16,6 +17,6 @@ export declare const HidePopoverArrowWrapper: import("styled-components").Styled
|
|
|
16
17
|
*/
|
|
17
18
|
export declare const GlobalCSSHidePopoverArrow: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
|
|
18
19
|
export declare const ExtraInfo: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
-
export declare const TooltipComponentClassName: import("styled-components").StyledComponent<"div", any, Pick<import("@synerise/ds-tooltip/dist/Tooltip.types").default, "button" | "title" | "offset" | "description" | "icon" | "status" | "tutorials" | "tutorialAutoplay" | "tutorialAutoplaySpeed" | "timeToHideAfterClick"> & {
|
|
20
|
+
export declare const TooltipComponentClassName: import("styled-components").StyledComponent<"div", any, Pick<import("@synerise/ds-tooltip/dist/Tooltip.types").default, "button" | "title" | "render" | "offset" | "description" | "icon" | "status" | "tutorials" | "tutorialAutoplay" | "tutorialAutoplaySpeed" | "timeToHideAfterClick"> & {
|
|
20
21
|
tooltipType: import("@synerise/ds-tooltip/dist/Tooltip.types").tooltipTypes;
|
|
21
22
|
}, never>;
|
|
@@ -25,7 +25,11 @@ export var ActionButtonContainer = styled.div.withConfig({
|
|
|
25
25
|
export var InfoCardWrapper = styled.div.withConfig({
|
|
26
26
|
displayName: "InformationCardstyles__InfoCardWrapper",
|
|
27
27
|
componentId: "zxu5qa-3"
|
|
28
|
-
})(["margin-left:
|
|
28
|
+
})(["margin-left:", ";", "{background-color:white;margin-bottom:1px;font-weight:400;min-width:250px;&.custom-description ", "{margin-top:8px;}padding:16px 16px 8px 16px;border-radius:3px;box-shadow:", ";}", "{padding-top:0;}", "{padding:0 0 1px 0;margin-bottom:8px;}", "{align-self:center;margin-left:10px;margin-right:10px;}", "{margin:0;}", "", "{margin-bottom:0;font-size:14px;}", "{width:32px;height:32px;}.ds-button{background:transparent;}.btn-focus,.btn-focus:hover{box-shadow:unset;}"], function (props) {
|
|
29
|
+
return props.asTooltip ? '0' : '8px';
|
|
30
|
+
}, CardContainer, ChildrenContainer, function (props) {
|
|
31
|
+
return props.asTooltip ? 'unset' : '0 16px 32px 0 rgba(35, 41, 54, 0.1)';
|
|
32
|
+
}, PaddingWrapper, Header, IconContainer, HeaderContent, Title, Title, AntdButton);
|
|
29
33
|
/**
|
|
30
34
|
* This component can be used to style container with popovers/tooltips to disable arrow.
|
|
31
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-information-card",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "InformationCard UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@synerise/ds-alert": "^0.4.4",
|
|
37
|
-
"@synerise/ds-avatar": "^0.14.
|
|
38
|
-
"@synerise/ds-card": "^0.
|
|
39
|
-
"@synerise/ds-description": "^0.3.
|
|
40
|
-
"@synerise/ds-subtle-form": "^0.9.
|
|
37
|
+
"@synerise/ds-avatar": "^0.14.48",
|
|
38
|
+
"@synerise/ds-card": "^0.14.0",
|
|
39
|
+
"@synerise/ds-description": "^0.3.48",
|
|
40
|
+
"@synerise/ds-subtle-form": "^0.9.34",
|
|
41
41
|
"@synerise/ds-typography": "^0.12.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@synerise/ds-core": "^0.31.2",
|
|
45
45
|
"react": ">=16.9.0 < 17.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "dcd2dfdd97402a7333564d0efb50898e7b97ac0b"
|
|
48
48
|
}
|