@synerise/ds-information-card 1.3.9 → 1.4.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 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.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-information-card@1.4.0...@synerise/ds-information-card@1.4.1) (2026-01-21)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-information-card
9
+
10
+ # [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)
11
+
12
+ ### Features
13
+
14
+ - **information-card:** migrate to popover ([de900e4](https://github.com/Synerise/synerise-design/commit/de900e4bc1c32a4bbbf175401374619e691023f2))
15
+
6
16
  ## [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)
7
17
 
8
18
  **Note:** Version bump only for package @synerise/ds-information-card
@@ -1,4 +1,3 @@
1
- import 'rc-trigger/assets/index.less';
2
1
  import React from 'react';
3
2
  declare const InformationCard: React.ForwardRefExoticComponent<{
4
3
  actionButton?: boolean | (() => React.ReactNode);
@@ -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
- export declare const TRIGGER_PLACEMENTS: {
2
- left: {
3
- points: string[];
4
- offset: number[];
5
- };
6
- right: {
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 TRIGGER_PLACEMENTS = {
2
- left: {
3
- points: ['cr', 'cl'],
4
- offset: [-8, 0]
5
- },
6
- right: {
7
- points: ['cl', 'cr'],
8
- offset: [0, 0]
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
- import { type InformationCardTooltipProps } from './InformationCardTooltip.types';
3
- export declare const InformationCardTooltip: ({ triggerProps, children, style, informationCardProps, ...rest }: InformationCardTooltipProps) => React.JSX.Element;
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 = ["triggerProps", "children", "style", "informationCardProps"];
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 Trigger from 'rc-trigger';
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 { TRIGGER_PLACEMENTS } from './InformationCard.constants';
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 InformationCardTooltip(_ref) {
11
- var _triggerProps$default;
12
- var triggerProps = _ref.triggerProps,
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 dsTheme = useTheme();
18
- var zIndex = parseInt(dsTheme.variables['zindex-tooltip'], 10);
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
- var _ref2 = triggerProps || {},
28
- popupAlign = _ref2.popupAlign;
29
- var triggerPopupAlign = _extends({
30
- overflow: _extends({
31
- adjustX: true,
32
- adjustY: true
33
- }, popupAlign == null ? void 0 : popupAlign.overflow)
34
- }, popupAlign);
35
- return /*#__PURE__*/React.createElement(S.InformationCardTooltipWrapper, _extends({}, rest, {
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(Trigger, _extends({
39
- builtinPlacements: TRIGGER_PLACEMENTS,
40
- defaultPopupVisible: (_triggerProps$default = triggerProps == null ? void 0 : triggerProps.defaultPopupVisible) != null ? _triggerProps$default : false,
41
- action: (triggerProps == null ? void 0 : triggerProps.action) || ['click', 'hover'],
42
- popupPlacement: (triggerProps == null ? void 0 : triggerProps.popupPlacement) || 'right',
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
+ });
@@ -1,2 +1 @@
1
1
  export declare const InformationCardTooltipWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const InformationCardTooltipTrigger: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -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 { TriggerProps } from 'rc-trigger';
2
- import type { Component, HTMLAttributes, ReactNode } from 'react';
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 TriggerHandle = Component<TriggerProps> & {
5
- getPopupDomNode: () => HTMLElement;
6
- };
7
- export type InformationCardTooltipProps = Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown'> & {
8
- informationCardProps: 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
- triggerProps?: Partial<TriggerProps> & {
11
- ref?: React.LegacyRef<TriggerHandle>;
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 { TRIGGER_PLACEMENTS } from './InformationCardTooltip/InformationCard.constants';
8
- export type { InformationCardTooltipProps } from './InformationCardTooltip/InformationCardTooltip.types';
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 { TRIGGER_PLACEMENTS } from './InformationCardTooltip/InformationCard.constants';
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.9",
3
+ "version": "1.4.1",
4
4
  "description": "InformationCard UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -36,6 +36,7 @@
36
36
  ],
37
37
  "types": "dist/index.d.ts",
38
38
  "dependencies": {
39
+ "@floating-ui/react": "^0.27.16",
39
40
  "@synerise/ds-alert": "^1.1.31",
40
41
  "@synerise/ds-avatar": "^1.1.5",
41
42
  "@synerise/ds-badge": "^1.0.30",
@@ -44,17 +45,17 @@
44
45
  "@synerise/ds-copy-icon": "^1.0.6",
45
46
  "@synerise/ds-description": "^1.1.19",
46
47
  "@synerise/ds-divider": "^1.2.6",
47
- "@synerise/ds-dropdown": "^1.1.8",
48
+ "@synerise/ds-dropdown": "^1.1.10",
48
49
  "@synerise/ds-icon": "^1.10.0",
49
- "@synerise/ds-menu": "^1.2.5",
50
+ "@synerise/ds-menu": "^1.3.1",
51
+ "@synerise/ds-popover": "^1.3.1",
50
52
  "@synerise/ds-scrollbar": "^1.2.5",
51
53
  "@synerise/ds-skeleton": "^1.0.30",
52
54
  "@synerise/ds-status": "^1.3.5",
53
- "@synerise/ds-subtle-form": "^1.1.43",
55
+ "@synerise/ds-subtle-form": "^1.1.45",
54
56
  "@synerise/ds-tooltip": "^1.3.5",
55
57
  "@synerise/ds-typography": "^1.0.28",
56
- "@synerise/ds-utils": "^1.5.3",
57
- "rc-trigger": "^5.3.4"
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": "4cde643d1f63a4b47e84707a13b1b1d138730d53"
66
+ "gitHead": "1ab50150aadeb21d9464b1558d0d1ea8808b85e5"
66
67
  }