@synerise/ds-information-card 1.3.8 → 1.4.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 +10 -0
- package/dist/InformationCard.d.ts +0 -1
- package/dist/InformationCard.js +0 -1
- package/dist/InformationCardTooltip/InformationCard.constants.d.ts +6 -34
- package/dist/InformationCardTooltip/InformationCard.constants.js +12 -32
- package/dist/InformationCardTooltip/InformationCardTooltip.d.ts +7 -2
- package/dist/InformationCardTooltip/InformationCardTooltip.js +27 -36
- package/dist/InformationCardTooltip/InformationCardTooltip.styles.d.ts +0 -1
- package/dist/InformationCardTooltip/InformationCardTooltip.styles.js +1 -5
- package/dist/InformationCardTooltip/InformationCardTooltip.types.d.ts +21 -11
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3 -1
- package/package.json +22 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@1.3.9...@synerise/ds-information-card@1.4.0) (2026-01-20)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **information-card:** migrate to popover ([de900e4](https://github.com/Synerise/synerise-design/commit/de900e4bc1c32a4bbbf175401374619e691023f2))
|
|
11
|
+
|
|
12
|
+
## [1.3.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@1.3.8...@synerise/ds-information-card@1.3.9) (2026-01-15)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @synerise/ds-information-card
|
|
15
|
+
|
|
6
16
|
## [1.3.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@1.3.7...@synerise/ds-information-card@1.3.8) (2026-01-12)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-information-card
|
package/dist/InformationCard.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
var _excluded = ["actionButton", "actionButtonTooltipText", "actionButtonCallback", "actionsMenu", "asTooltip", "avatarTooltipText", "copyTooltip", "copiedTooltip", "renderFooter", "renderBadge", "subtitle", "title", "notice", "footerText", "icon", "iconColor", "descriptionConfig", "className", "renderAdditionalDescription", "propertyListItems", "summaryItems"];
|
|
2
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
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
|
-
import "rc-trigger/assets/index.css";
|
|
5
4
|
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
6
5
|
import Card from '@synerise/ds-card';
|
|
7
6
|
import { SegmentM } from '@synerise/ds-icon';
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
points: string[];
|
|
8
|
-
offset: number[];
|
|
9
|
-
};
|
|
10
|
-
top: {
|
|
11
|
-
points: string[];
|
|
12
|
-
offset: number[];
|
|
13
|
-
};
|
|
14
|
-
bottom: {
|
|
15
|
-
points: string[];
|
|
16
|
-
offset: number[];
|
|
17
|
-
};
|
|
18
|
-
topLeft: {
|
|
19
|
-
points: string[];
|
|
20
|
-
offset: number[];
|
|
21
|
-
};
|
|
22
|
-
topRight: {
|
|
23
|
-
points: string[];
|
|
24
|
-
offset: number[];
|
|
25
|
-
};
|
|
26
|
-
bottomRight: {
|
|
27
|
-
points: string[];
|
|
28
|
-
offset: number[];
|
|
29
|
-
};
|
|
30
|
-
bottomLeft: {
|
|
31
|
-
points: string[];
|
|
32
|
-
offset: number[];
|
|
33
|
-
};
|
|
34
|
-
};
|
|
1
|
+
import { type FlipConfig, type HoverConfig, type OffsetConfig, type ShiftConfig } from '@synerise/ds-popover';
|
|
2
|
+
export declare const TRANSITION_DURATION = 150;
|
|
3
|
+
export declare const OFFSET_CONFIG: OffsetConfig;
|
|
4
|
+
export declare const FLIP_CONFIG: FlipConfig;
|
|
5
|
+
export declare const HOVER_CONFIG: HoverConfig;
|
|
6
|
+
export declare const SHIFT_CONFIG: ShiftConfig;
|
|
@@ -1,34 +1,14 @@
|
|
|
1
|
-
export var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
top: {
|
|
11
|
-
points: ['bc', 'tc'],
|
|
12
|
-
offset: [0, -8]
|
|
13
|
-
},
|
|
14
|
-
bottom: {
|
|
15
|
-
points: ['tc', 'bc'],
|
|
16
|
-
offset: [0, 8]
|
|
17
|
-
},
|
|
18
|
-
topLeft: {
|
|
19
|
-
points: ['bl', 'tl'],
|
|
20
|
-
offset: [0, -8]
|
|
21
|
-
},
|
|
22
|
-
topRight: {
|
|
23
|
-
points: ['br', 'tr'],
|
|
24
|
-
offset: [0, -8]
|
|
25
|
-
},
|
|
26
|
-
bottomRight: {
|
|
27
|
-
points: ['tr', 'br'],
|
|
28
|
-
offset: [0, 8]
|
|
29
|
-
},
|
|
30
|
-
bottomLeft: {
|
|
31
|
-
points: ['tl', 'bl'],
|
|
32
|
-
offset: [0, 8]
|
|
1
|
+
export var TRANSITION_DURATION = 150;
|
|
2
|
+
export var OFFSET_CONFIG = {
|
|
3
|
+
mainAxis: 8
|
|
4
|
+
};
|
|
5
|
+
export var FLIP_CONFIG = {};
|
|
6
|
+
export var HOVER_CONFIG = {
|
|
7
|
+
delay: {
|
|
8
|
+
open: 100,
|
|
9
|
+
close: 400
|
|
33
10
|
}
|
|
11
|
+
};
|
|
12
|
+
export var SHIFT_CONFIG = {
|
|
13
|
+
crossAxis: true
|
|
34
14
|
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export declare const InformationCardTooltip: React.ForwardRefExoticComponent<{
|
|
3
|
+
informationCardProps?: import("..").InformationCardProps;
|
|
4
|
+
content?: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
popoverProps?: Omit<import("@synerise/ds-popover").PopoverOptions, "listNavigationConfig" | "arrowConfig" | "returnFocus" | "modal">;
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "content" | "asChild" | "popoverProps" | "informationCardProps"> & import("@synerise/ds-utils").DataAttributes & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,52 +1,43 @@
|
|
|
1
|
-
var _excluded = ["
|
|
1
|
+
var _excluded = ["popoverProps", "asChild", "children", "style", "content", "informationCardProps"];
|
|
2
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
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
|
-
import
|
|
5
|
-
import React, { useCallback, useMemo } from 'react';
|
|
4
|
+
import React, { forwardRef, useCallback } from 'react';
|
|
6
5
|
import { useTheme } from '@synerise/ds-core';
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from '@synerise/ds-popover';
|
|
7
7
|
import InformationCard from '../InformationCard';
|
|
8
|
-
import {
|
|
8
|
+
import { FLIP_CONFIG, HOVER_CONFIG, OFFSET_CONFIG, SHIFT_CONFIG } from './InformationCard.constants';
|
|
9
9
|
import * as S from './InformationCardTooltip.styles';
|
|
10
|
-
export var InformationCardTooltip = function
|
|
11
|
-
var
|
|
12
|
-
|
|
10
|
+
export var InformationCardTooltip = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
11
|
+
var popoverProps = _ref.popoverProps,
|
|
12
|
+
asChild = _ref.asChild,
|
|
13
13
|
children = _ref.children,
|
|
14
14
|
style = _ref.style,
|
|
15
|
+
content = _ref.content,
|
|
15
16
|
informationCardProps = _ref.informationCardProps,
|
|
16
17
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
17
|
-
var
|
|
18
|
-
var zIndex = parseInt(
|
|
19
|
-
var renderedInfocard = useMemo(function () {
|
|
20
|
-
return /*#__PURE__*/React.createElement(InformationCard, informationCardProps);
|
|
21
|
-
}, [informationCardProps]);
|
|
18
|
+
var theme = useTheme();
|
|
19
|
+
var zIndex = parseInt(theme.variables['zindex-tooltip'], 10);
|
|
22
20
|
var cancelBubblingEvent = useCallback(function () {
|
|
23
21
|
return function (event) {
|
|
24
22
|
return event.stopPropagation();
|
|
25
23
|
};
|
|
26
24
|
}, []);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
return /*#__PURE__*/React.createElement(Popover, _extends({
|
|
26
|
+
trigger: "hover",
|
|
27
|
+
modal: false,
|
|
28
|
+
componentId: "information-card",
|
|
29
|
+
testId: "information-card",
|
|
30
|
+
shiftConfig: SHIFT_CONFIG,
|
|
31
|
+
offsetConfig: OFFSET_CONFIG,
|
|
32
|
+
flipConfig: FLIP_CONFIG,
|
|
33
|
+
hoverConfig: HOVER_CONFIG,
|
|
34
|
+
placement: "right",
|
|
35
|
+
zIndex: zIndex
|
|
36
|
+
}, popoverProps), /*#__PURE__*/React.createElement(PopoverContent, null, /*#__PURE__*/React.createElement(S.InformationCardTooltipWrapper, _extends({}, rest, {
|
|
36
37
|
onKeyDown: cancelBubblingEvent,
|
|
37
38
|
onClick: cancelBubblingEvent
|
|
38
|
-
}), /*#__PURE__*/React.createElement(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
popup: renderedInfocard,
|
|
44
|
-
popupClassName: "ignore-click-outside ds-hide-arrow",
|
|
45
|
-
mouseEnterDelay: 0.2,
|
|
46
|
-
popupStyle: {
|
|
47
|
-
zIndex: zIndex
|
|
48
|
-
},
|
|
49
|
-
zIndex: zIndex,
|
|
50
|
-
popupAlign: triggerPopupAlign
|
|
51
|
-
}, triggerProps), /*#__PURE__*/React.createElement(S.InformationCardTooltipTrigger, null, children)));
|
|
52
|
-
};
|
|
39
|
+
}), informationCardProps ? /*#__PURE__*/React.createElement(InformationCard, informationCardProps) : content)), /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
40
|
+
asChild: asChild,
|
|
41
|
+
ref: ref
|
|
42
|
+
}, children));
|
|
43
|
+
});
|
|
@@ -2,8 +2,4 @@ import styled from 'styled-components';
|
|
|
2
2
|
export var InformationCardTooltipWrapper = styled.div.withConfig({
|
|
3
3
|
displayName: "InformationCardTooltipstyles__InformationCardTooltipWrapper",
|
|
4
4
|
componentId: "sc-1q11fca-0"
|
|
5
|
-
})([""]);
|
|
6
|
-
export var InformationCardTooltipTrigger = styled.div.withConfig({
|
|
7
|
-
displayName: "InformationCardTooltipstyles__InformationCardTooltipTrigger",
|
|
8
|
-
componentId: "sc-1q11fca-1"
|
|
9
|
-
})([""]);
|
|
5
|
+
})(["display:contents;"]);
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
1
|
+
import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
import { type StyledComponent } from 'styled-components';
|
|
3
|
+
import { type LegacyPlacement, type PopoverOptions } from '@synerise/ds-popover';
|
|
4
|
+
import { type WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
5
|
import type { InformationCardProps } from '../InformationCard.types';
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
informationCardProps
|
|
6
|
+
export type InformationCardTooltipProps = WithHTMLAttributes<HTMLDivElement, {
|
|
7
|
+
/**
|
|
8
|
+
* InformationCardProps - will render <InformationCard/> component with these props as the content of the tooltip
|
|
9
|
+
*/
|
|
10
|
+
informationCardProps?: InformationCardProps;
|
|
11
|
+
/**
|
|
12
|
+
* rendered content of the infocard tooltip (alternative to informationCardProps prop)
|
|
13
|
+
*/
|
|
14
|
+
content?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* trigger to attach the tooltip to
|
|
17
|
+
*/
|
|
9
18
|
children: ReactNode;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
popoverProps?: Omit<PopoverOptions, 'listNavigationConfig' | 'arrowConfig' | 'returnFocus' | 'modal'>;
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
export type LegacyInformationCardPlacement = Exclude<LegacyPlacement, 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom'>;
|
|
23
|
+
export type StyledInformationCardTooltip<CustomProps extends object = object> = StyledComponent<ForwardRefExoticComponent<InformationCardTooltipProps & RefAttributes<HTMLDivElement>>, object, CustomProps, never>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { default } from './InformationCard';
|
|
2
2
|
export { InformationCardPropertyList } from './InformationCardPropertyList/InformationCardPropertyList';
|
|
3
|
-
export type { InformationCardPropertyItem, InformationCardPropertyItemTypes, InformationCardPropertyListProps, } from './InformationCardPropertyList/InformationCardPropertyList.types';
|
|
4
3
|
export { buildExtraInfo, buildIconBadge, buildInitialsBadge, } from './InformationCard.utils';
|
|
5
|
-
export type { InformationCardProps } from './InformationCard.types';
|
|
6
4
|
export { InformationCardTooltip } from './InformationCardTooltip/InformationCardTooltip';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export * from './InformationCardPropertyList/InformationCardPropertyList.types';
|
|
6
|
+
export * from './InformationCard.types';
|
|
7
|
+
export * from './InformationCardTooltip/InformationCardTooltip.types';
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,6 @@ export { default } from './InformationCard';
|
|
|
2
2
|
export { InformationCardPropertyList } from './InformationCardPropertyList/InformationCardPropertyList';
|
|
3
3
|
export { buildExtraInfo, buildIconBadge, buildInitialsBadge } from './InformationCard.utils';
|
|
4
4
|
export { InformationCardTooltip } from './InformationCardTooltip/InformationCardTooltip';
|
|
5
|
-
export
|
|
5
|
+
export * from './InformationCardPropertyList/InformationCardPropertyList.types';
|
|
6
|
+
export * from './InformationCard.types';
|
|
7
|
+
export * from './InformationCardTooltip/InformationCardTooltip.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-information-card",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "InformationCard UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -36,25 +36,26 @@
|
|
|
36
36
|
],
|
|
37
37
|
"types": "dist/index.d.ts",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@synerise/ds-
|
|
41
|
-
"@synerise/ds-
|
|
42
|
-
"@synerise/ds-
|
|
43
|
-
"@synerise/ds-
|
|
44
|
-
"@synerise/ds-
|
|
45
|
-
"@synerise/ds-
|
|
46
|
-
"@synerise/ds-
|
|
47
|
-
"@synerise/ds-
|
|
48
|
-
"@synerise/ds-
|
|
49
|
-
"@synerise/ds-
|
|
50
|
-
"@synerise/ds-
|
|
51
|
-
"@synerise/ds-
|
|
52
|
-
"@synerise/ds-
|
|
53
|
-
"@synerise/ds-
|
|
54
|
-
"@synerise/ds-
|
|
55
|
-
"@synerise/ds-
|
|
56
|
-
"@synerise/ds-
|
|
57
|
-
"
|
|
39
|
+
"@floating-ui/react": "^0.27.16",
|
|
40
|
+
"@synerise/ds-alert": "^1.1.31",
|
|
41
|
+
"@synerise/ds-avatar": "^1.1.5",
|
|
42
|
+
"@synerise/ds-badge": "^1.0.30",
|
|
43
|
+
"@synerise/ds-button": "^1.5.5",
|
|
44
|
+
"@synerise/ds-card": "^1.2.21",
|
|
45
|
+
"@synerise/ds-copy-icon": "^1.0.6",
|
|
46
|
+
"@synerise/ds-description": "^1.1.19",
|
|
47
|
+
"@synerise/ds-divider": "^1.2.6",
|
|
48
|
+
"@synerise/ds-dropdown": "^1.1.9",
|
|
49
|
+
"@synerise/ds-icon": "^1.10.0",
|
|
50
|
+
"@synerise/ds-menu": "^1.3.0",
|
|
51
|
+
"@synerise/ds-popover": "^1.3.0",
|
|
52
|
+
"@synerise/ds-scrollbar": "^1.2.5",
|
|
53
|
+
"@synerise/ds-skeleton": "^1.0.30",
|
|
54
|
+
"@synerise/ds-status": "^1.3.5",
|
|
55
|
+
"@synerise/ds-subtle-form": "^1.1.44",
|
|
56
|
+
"@synerise/ds-tooltip": "^1.3.5",
|
|
57
|
+
"@synerise/ds-typography": "^1.0.28",
|
|
58
|
+
"@synerise/ds-utils": "^1.5.3"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
61
|
"@synerise/ds-core": "*",
|
|
@@ -62,5 +63,5 @@
|
|
|
62
63
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
63
64
|
"styled-components": "^5.3.3"
|
|
64
65
|
},
|
|
65
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "db758824923a2a231a0de460f0d6d10739514cda"
|
|
66
67
|
}
|