@synerise/ds-information-card 1.0.17 → 1.0.19

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/README.md CHANGED
@@ -38,7 +38,7 @@ import { InformationCardTooltip } from '@synerise/ds-information-card';
38
38
  avatarTooltipText: 'Tooltip Text',
39
39
  }}
40
40
  triggerProps={{
41
- popupPlacement: 'top'
41
+ popupPlacement: 'top',
42
42
  }}
43
43
  >
44
44
  <button>Element to attach infocard to</button>
@@ -122,7 +122,7 @@ Displays a list of icons with value and optional tooltip
122
122
  Displays InformationCard as a tooltip with `children` node as trigger
123
123
 
124
124
  | Property | Description | Type | Default |
125
- |----------------------|-----------------------------------------|--------------------------------------------------------------------|---------|
125
+ | -------------------- | --------------------------------------- | ------------------------------------------------------------------ | ------- |
126
126
  | informationCardProps | Props for rendering the InformationCard | `InformationCardProps` | - |
127
127
  | triggerProps | Trigger props. See rc-trigger | `Partial<TriggerProps> & { ref?: React.LegacyRef<TriggerHandle> }` | - |
128
128
  | children | trigger element | `ReactNode` | - |
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import 'rc-trigger/assets/index.less';
2
+ import React from 'react';
3
3
  declare const InformationCard: React.ForwardRefExoticComponent<{
4
4
  actionButton?: boolean | (() => React.ReactNode) | undefined;
5
5
  actionButtonCallback?: (() => void) | undefined;
@@ -1,17 +1,17 @@
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 React, { forwardRef, useState, useRef, useEffect } from 'react';
5
- import { SegmentM } from '@synerise/ds-icon';
4
+ import "rc-trigger/assets/index.css";
5
+ import React, { forwardRef, useEffect, useRef, useState } from 'react';
6
6
  import Card from '@synerise/ds-card';
7
- import { useResizeObserver } from '@synerise/ds-utils';
8
7
  import { RowWrapper } from '@synerise/ds-description/dist/Row/DescriptionRow.styles';
9
- import "rc-trigger/assets/index.css";
8
+ import { SegmentM } from '@synerise/ds-icon';
9
+ import { useResizeObserver } from '@synerise/ds-utils';
10
10
  import * as S from './InformationCard.styles';
11
- import { InformationCardFooter } from './InformationCardFooter/InformationCardFooter';
12
11
  import { buildIconBadge } from './InformationCard.utils';
13
12
  import { InformationCardActions } from './InformationCardActions/InformationCardActions';
14
13
  import { InformationCardDescription } from './InformationCardDescription/InformationCardDescription';
14
+ import { InformationCardFooter } from './InformationCardFooter/InformationCardFooter';
15
15
  import { InformationCardPropertyList } from './InformationCardPropertyList/InformationCardPropertyList';
16
16
  import { InformationCardSummary } from './InformationCardSummary/InformationCardSummary';
17
17
  var InformationCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Flex: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const Copyable: import("styled-components").StyledComponent<({ copyValue, texts, className, onMouseEnter, onMouseLeave }: import("@synerise/ds-description/dist/Row/Copy.types").CopyProps) => import("react").JSX.Element, any, {}, never>;
3
+ export declare const Copyable: import("styled-components").StyledComponent<({ copyValue, texts, className, onMouseEnter, onMouseLeave, }: import("@synerise/ds-description/dist/Row/Copy.types").CopyProps) => import("react").JSX.Element, any, {}, never>;
4
4
  export declare const Divider: import("styled-components").StyledComponent<(props: import("@synerise/ds-divider").DividerProps) => import("react").JSX.Element, any, {}, never>;
5
5
  export declare const FooterWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const ActionsMenuItems: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -32,7 +32,7 @@ export declare const HidePopoverArrowWrapper: import("styled-components").Styled
32
32
  export declare const GlobalCSSHidePopoverArrow: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
33
33
  export declare const ExtraInfo: import("styled-components").StyledComponent<"div", any, {}, never>;
34
34
  export declare const TooltipComponentClassName: import("styled-components").StyledComponent<"div", any, {
35
- tooltipType: import("@synerise/ds-tooltip").tooltipTypes;
35
+ tooltipType: import("@synerise/ds-tooltip").TooltipTypes;
36
36
  }, never>;
37
37
  export declare const InformationCardActionsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
38
38
  export declare const InformationCardPropertyListWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -2,8 +2,8 @@ import styled, { createGlobalStyle, css } from 'styled-components';
2
2
  import { CardStyles } from '@synerise/ds-card';
3
3
  import { DescriptionCopyable } from '@synerise/ds-description';
4
4
  import DSDivider from '@synerise/ds-divider';
5
- import { macro } from '@synerise/ds-typography';
6
5
  import * as S from '@synerise/ds-tooltip/dist/Tooltip.styles';
6
+ import { macro } from '@synerise/ds-typography';
7
7
  var INFOCARD_WIDTH = 350;
8
8
  export var Flex = styled.div.withConfig({
9
9
  displayName: "InformationCardstyles__Flex",
@@ -1,11 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
+ import { type Color, type Size } from '@synerise/ds-avatar/dist/Avatar.types';
3
+ import { type IconProps } from '@synerise/ds-icon';
4
+ import { type SubtleTextAreaProps } from '@synerise/ds-subtle-form/dist/Elements/TextArea/TextArea.types';
2
5
  import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
- import { SubtleTextAreaProps } from '@synerise/ds-subtle-form/dist/Elements/TextArea/TextArea.types';
4
- import { Color, Size } from '@synerise/ds-avatar/dist/Avatar.types';
5
- import { IconProps } from '@synerise/ds-icon';
6
- import { InformationCardPropertyListProps } from './InformationCardPropertyList/InformationCardPropertyList.types';
7
- import { InformationCardActionsProps } from './InformationCardActions/InformationCardActions.types';
8
- import { InformationCardSummaryProps } from './InformationCardSummary/InformationCardSummary.types';
6
+ import { type InformationCardActionsProps } from './InformationCardActions/InformationCardActions.types';
7
+ import { type InformationCardPropertyListProps } from './InformationCardPropertyList/InformationCardPropertyList.types';
8
+ import { type InformationCardSummaryProps } from './InformationCardSummary/InformationCardSummary.types';
9
9
  export type BadgeData = {
10
10
  type?: string;
11
11
  title?: string;
@@ -1,6 +1,6 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { InlineAlertType } from '@synerise/ds-alert/dist/InlineAlert/InlineAlert.types';
3
- import { BadgeData } from './InformationCard.types';
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type InlineAlertType } from '@synerise/ds-alert/dist/InlineAlert/InlineAlert.types';
3
+ import { type BadgeData } from './InformationCard.types';
4
4
  export declare function buildInitialsBadge(name: string): React.JSX.Element;
5
5
  export declare function buildExtraInfo(message: string, level?: InlineAlertType): React.JSX.Element;
6
6
  export declare function getInitials(name: string): string;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { InformationCardActionsProps } from './InformationCardActions.types';
2
+ import { type InformationCardActionsProps } from './InformationCardActions.types';
3
3
  export declare const InformationCardActions: ({ onHeaderClick, navigationLabel, items, menuProps, maxHeight, }: InformationCardActionsProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { MenuItemProps, AntdMenuProps } from '@synerise/ds-menu';
1
+ import { type ReactNode } from 'react';
2
+ import { type AntdMenuProps, type MenuItemProps } from '@synerise/ds-menu';
3
3
  export type InformationCardActionsProps = {
4
4
  items: MenuItemProps[];
5
5
  menuProps?: Partial<AntdMenuProps>;
@@ -1,5 +1,5 @@
1
- import React, { ReactNode } from 'react';
2
- import { SubtleTextAreaProps } from '@synerise/ds-subtle-form/dist/Elements/TextArea/TextArea.types';
1
+ import React, { type ReactNode } from 'react';
2
+ import { type SubtleTextAreaProps } from '@synerise/ds-subtle-form/dist/Elements/TextArea/TextArea.types';
3
3
  type InformationCardDescriptionProps = {
4
4
  extraInformation?: ReactNode;
5
5
  descriptionConfig?: SubtleTextAreaProps | string | null;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { InformationCardFooterProps } from './InformationCardFooter.types';
2
+ import { type InformationCardFooterProps } from './InformationCardFooter.types';
3
3
  export declare const InformationCardFooter: ({ actionButton, actionButtonCallback, actionsMenuButtonLabel, actionsMenuButtonOnClick, actionButtonTooltipText, text, }: InformationCardFooterProps) => React.JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
+ import Button from '@synerise/ds-button';
3
4
  import Icon, { AngleRightS, ArrowRuCircleM } from '@synerise/ds-icon';
4
5
  import Tooltip from '@synerise/ds-tooltip';
5
6
  import { Text } from '@synerise/ds-typography';
6
- import Button from '@synerise/ds-button';
7
7
  import * as S from '../InformationCard.styles';
8
8
  export var InformationCardFooter = function InformationCardFooter(_ref) {
9
9
  var _ref$actionButton = _ref.actionButton,
@@ -1,6 +1,6 @@
1
- import { MouseEvent } from 'react';
2
- import { InformationCardActionsProps } from '../InformationCardActions/InformationCardActions.types';
3
- import { InformationCardProps } from '../InformationCard.types';
1
+ import { type MouseEvent } from 'react';
2
+ import { type InformationCardProps } from '../InformationCard.types';
3
+ import { type InformationCardActionsProps } from '../InformationCardActions/InformationCardActions.types';
4
4
  export type InformationCardFooterProps = {
5
5
  text: InformationCardProps['footerText'];
6
6
  actionsMenuButtonLabel?: InformationCardActionsProps['buttonLabel'];
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { InformationCardPropertyListProps } from './InformationCardPropertyList.types';
3
- export declare const InformationCardPropertyList: ({ items }: InformationCardPropertyListProps) => React.JSX.Element;
2
+ import { type InformationCardPropertyListProps } from './InformationCardPropertyList.types';
3
+ export declare const InformationCardPropertyList: ({ items, }: InformationCardPropertyListProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { InformationCardSummaryProps } from './InformationCardSummary.types';
3
- export declare const InformationCardSummary: ({ items }: InformationCardSummaryProps) => React.JSX.Element;
2
+ import { type InformationCardSummaryProps } from './InformationCardSummary.types';
3
+ export declare const InformationCardSummary: ({ items, }: InformationCardSummaryProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { ReactNode, Key } from 'react';
1
+ import type { Key, ReactNode } from 'react';
2
2
  import type { TooltipProps } from '@synerise/ds-tooltip';
3
3
  export type InformationCardSummaryItem = {
4
4
  key?: string | number;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { InformationCardTooltipProps } from './InformationCardTooltip.types';
2
+ import { type InformationCardTooltipProps } from './InformationCardTooltip.types';
3
3
  export declare const InformationCardTooltip: ({ triggerProps, children, style, informationCardProps, ...rest }: InformationCardTooltipProps) => React.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  var _excluded = ["triggerProps", "children", "style", "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 React, { useCallback, useMemo } from 'react';
5
4
  import Trigger from 'rc-trigger';
5
+ import React, { useCallback, useMemo } from 'react';
6
6
  import { useTheme } from '@synerise/ds-core';
7
7
  import InformationCard from '../InformationCard';
8
8
  import { TRIGGER_PLACEMENTS } from './InformationCard.constants';
@@ -32,25 +32,21 @@ export var InformationCardTooltip = function InformationCardTooltip(_ref) {
32
32
  adjustY: true
33
33
  }, popupAlign == null ? void 0 : popupAlign.overflow)
34
34
  }, popupAlign);
35
- return (
36
- /*#__PURE__*/
37
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
38
- React.createElement(S.InformationCardTooltipWrapper, _extends({}, rest, {
39
- onKeyDown: cancelBubblingEvent,
40
- onClick: cancelBubblingEvent
41
- }), /*#__PURE__*/React.createElement(Trigger, _extends({
42
- builtinPlacements: TRIGGER_PLACEMENTS,
43
- defaultPopupVisible: (_triggerProps$default = triggerProps == null ? void 0 : triggerProps.defaultPopupVisible) != null ? _triggerProps$default : false,
44
- action: (triggerProps == null ? void 0 : triggerProps.action) || ['click', 'hover'],
45
- popupPlacement: (triggerProps == null ? void 0 : triggerProps.popupPlacement) || 'right',
46
- popup: renderedInfocard,
47
- popupClassName: "ignore-click-outside ds-hide-arrow",
48
- mouseEnterDelay: 0.2,
49
- popupStyle: {
50
- zIndex: zIndex
51
- },
52
- zIndex: zIndex,
53
- popupAlign: triggerPopupAlign
54
- }, triggerProps), /*#__PURE__*/React.createElement(S.InformationCardTooltipTrigger, null, children)))
55
- );
35
+ return /*#__PURE__*/React.createElement(S.InformationCardTooltipWrapper, _extends({}, rest, {
36
+ onKeyDown: cancelBubblingEvent,
37
+ 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)));
56
52
  };
@@ -1,5 +1,5 @@
1
- import type { Component, HTMLAttributes, ReactNode } from 'react';
2
1
  import type { TriggerProps } from 'rc-trigger';
2
+ import type { Component, HTMLAttributes, ReactNode } from 'react';
3
3
  import type { InformationCardProps } from '../InformationCard.types';
4
4
  export type TriggerHandle = Component<TriggerProps> & {
5
5
  getPopupDomNode: () => HTMLElement;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { default } from './InformationCard';
2
2
  export { InformationCardPropertyList } from './InformationCardPropertyList/InformationCardPropertyList';
3
3
  export type { InformationCardPropertyItem, InformationCardPropertyItemTypes, InformationCardPropertyListProps, } from './InformationCardPropertyList/InformationCardPropertyList.types';
4
- export { buildExtraInfo, buildIconBadge, buildInitialsBadge } from './InformationCard.utils';
4
+ export { buildExtraInfo, buildIconBadge, buildInitialsBadge, } from './InformationCard.utils';
5
5
  export type { InformationCardProps } from './InformationCard.types';
6
6
  export { InformationCardTooltip } from './InformationCardTooltip/InformationCardTooltip';
7
7
  export { TRIGGER_PLACEMENTS } from './InformationCardTooltip/InformationCard.constants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-information-card",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
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.1.6",
39
- "@synerise/ds-avatar": "^1.0.12",
40
- "@synerise/ds-badge": "^1.0.12",
41
- "@synerise/ds-button": "^1.4.1",
42
- "@synerise/ds-card": "^1.2.0",
43
- "@synerise/ds-description": "^1.1.1",
44
- "@synerise/ds-divider": "^1.0.12",
45
- "@synerise/ds-dropdown": "^1.0.14",
46
- "@synerise/ds-icon": "^1.5.3",
47
- "@synerise/ds-menu": "^1.0.13",
48
- "@synerise/ds-scrollbar": "^1.1.1",
49
- "@synerise/ds-subtle-form": "^1.1.10",
50
- "@synerise/ds-tooltip": "^1.1.11",
51
- "@synerise/ds-typography": "^1.0.12",
52
- "@synerise/ds-utils": "^1.3.0",
38
+ "@synerise/ds-alert": "^1.1.7",
39
+ "@synerise/ds-avatar": "^1.0.13",
40
+ "@synerise/ds-badge": "^1.0.13",
41
+ "@synerise/ds-button": "^1.4.2",
42
+ "@synerise/ds-card": "^1.2.1",
43
+ "@synerise/ds-description": "^1.1.2",
44
+ "@synerise/ds-divider": "^1.0.13",
45
+ "@synerise/ds-dropdown": "^1.0.15",
46
+ "@synerise/ds-icon": "^1.5.4",
47
+ "@synerise/ds-menu": "^1.0.14",
48
+ "@synerise/ds-scrollbar": "^1.1.2",
49
+ "@synerise/ds-subtle-form": "^1.1.12",
50
+ "@synerise/ds-tooltip": "^1.1.12",
51
+ "@synerise/ds-typography": "^1.0.13",
52
+ "@synerise/ds-utils": "^1.3.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": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
61
+ "gitHead": "2161bdb04f3db0f79b7d0465ce6b41121f1543ef"
62
62
  }