@synerise/ds-information-card 1.6.3 → 1.6.5

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +9 -7
  3. package/dist/InformationCard.d.ts +6 -6
  4. package/dist/InformationCard.js +82 -135
  5. package/dist/InformationCard.styles.d.ts +25 -25
  6. package/dist/InformationCard.styles.js +68 -69
  7. package/dist/InformationCard.types.d.ts +8 -8
  8. package/dist/InformationCard.types.js +1 -1
  9. package/dist/InformationCard.utils.d.ts +3 -3
  10. package/dist/InformationCard.utils.js +29 -36
  11. package/dist/InformationCardActions/InformationCardActions.d.ts +2 -2
  12. package/dist/InformationCardActions/InformationCardActions.js +22 -26
  13. package/dist/InformationCardActions/InformationCardActions.types.d.ts +2 -2
  14. package/dist/InformationCardActions/InformationCardActions.types.js +1 -1
  15. package/dist/InformationCardDescription/InformationCardDescription.d.ts +2 -2
  16. package/dist/InformationCardDescription/InformationCardDescription.js +23 -29
  17. package/dist/InformationCardFooter/InformationCardFooter.d.ts +2 -2
  18. package/dist/InformationCardFooter/InformationCardFooter.js +29 -42
  19. package/dist/InformationCardFooter/InformationCardFooter.types.d.ts +3 -3
  20. package/dist/InformationCardFooter/InformationCardFooter.types.js +1 -1
  21. package/dist/InformationCardPropertyList/InformationCardPropertyList.d.ts +2 -2
  22. package/dist/InformationCardPropertyList/InformationCardPropertyList.js +32 -30
  23. package/dist/InformationCardPropertyList/InformationCardPropertyList.types.d.ts +1 -1
  24. package/dist/InformationCardPropertyList/InformationCardPropertyList.types.js +1 -1
  25. package/dist/InformationCardSummary/InformationCardSummary.d.ts +2 -2
  26. package/dist/InformationCardSummary/InformationCardSummary.js +29 -30
  27. package/dist/InformationCardSummary/InformationCardSummary.types.d.ts +2 -2
  28. package/dist/InformationCardSummary/InformationCardSummary.types.js +1 -1
  29. package/dist/InformationCardTooltip/InformationCard.constants.d.ts +1 -1
  30. package/dist/InformationCardTooltip/InformationCard.constants.js +13 -6
  31. package/dist/InformationCardTooltip/InformationCardTooltip.d.ts +4 -4
  32. package/dist/InformationCardTooltip/InformationCardTooltip.js +27 -43
  33. package/dist/InformationCardTooltip/InformationCardTooltip.styles.d.ts +1 -1
  34. package/dist/InformationCardTooltip/InformationCardTooltip.styles.js +6 -3
  35. package/dist/InformationCardTooltip/InformationCardTooltip.types.d.ts +5 -5
  36. package/dist/InformationCardTooltip/InformationCardTooltip.types.js +1 -1
  37. package/dist/index.js +12 -7
  38. package/dist/modules.d.js +1 -1
  39. package/dist/modules.d.ts +0 -0
  40. package/package.json +23 -23
@@ -1,43 +1,27 @@
1
- var _excluded = ["popoverProps", "asChild", "children", "style", "content", "informationCardProps"];
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
- 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, useCallback } from 'react';
5
- import { useTheme } from '@synerise/ds-core';
6
- import { Popover, PopoverContent, PopoverTrigger } from '@synerise/ds-popover';
7
- import InformationCard from '../InformationCard';
8
- import { FLIP_CONFIG, HOVER_CONFIG, OFFSET_CONFIG, SHIFT_CONFIG } from './InformationCard.constants';
9
- import * as S from './InformationCardTooltip.styles';
10
- export var InformationCardTooltip = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
- var popoverProps = _ref.popoverProps,
12
- asChild = _ref.asChild,
13
- children = _ref.children,
14
- style = _ref.style,
15
- content = _ref.content,
16
- informationCardProps = _ref.informationCardProps,
17
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
18
- var theme = useTheme();
19
- var zIndex = parseInt(theme.variables['zindex-tooltip'], 10);
20
- var cancelBubblingEvent = useCallback(function () {
21
- return function (event) {
22
- return event.stopPropagation();
23
- };
24
- }, []);
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, {
37
- onKeyDown: cancelBubblingEvent,
38
- onClick: cancelBubblingEvent
39
- }), informationCardProps ? /*#__PURE__*/React.createElement(InformationCard, informationCardProps) : content)), /*#__PURE__*/React.createElement(PopoverTrigger, {
40
- asChild: asChild,
41
- ref: ref
42
- }, children));
43
- });
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useCallback } from "react";
3
+ import { useTheme } from "@synerise/ds-core";
4
+ import { Popover, PopoverContent, PopoverTrigger } from "@synerise/ds-popover";
5
+ import InformationCard from "../InformationCard.js";
6
+ import { HOVER_CONFIG, FLIP_CONFIG, OFFSET_CONFIG, SHIFT_CONFIG } from "./InformationCard.constants.js";
7
+ import { InformationCardTooltipWrapper } from "./InformationCardTooltip.styles.js";
8
+ const InformationCardTooltip = forwardRef(({
9
+ popoverProps,
10
+ asChild,
11
+ children,
12
+ style,
13
+ content,
14
+ informationCardProps,
15
+ ...rest
16
+ }, ref) => {
17
+ const theme = useTheme();
18
+ const zIndex = parseInt(theme.variables["zindex-tooltip"], 10);
19
+ const cancelBubblingEvent = useCallback(() => (event) => event.stopPropagation(), []);
20
+ return /* @__PURE__ */ jsxs(Popover, { trigger: "hover", modal: false, componentId: "information-card", testId: "information-card", shiftConfig: SHIFT_CONFIG, offsetConfig: OFFSET_CONFIG, flipConfig: FLIP_CONFIG, hoverConfig: HOVER_CONFIG, placement: "right", zIndex, ...popoverProps, children: [
21
+ /* @__PURE__ */ jsx(PopoverContent, { children: /* @__PURE__ */ jsx(InformationCardTooltipWrapper, { ...rest, onKeyDown: cancelBubblingEvent, onClick: cancelBubblingEvent, children: informationCardProps ? /* @__PURE__ */ jsx(InformationCard, { ...informationCardProps }) : content }) }),
22
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild, ref, children })
23
+ ] });
24
+ });
25
+ export {
26
+ InformationCardTooltip
27
+ };
@@ -1 +1 @@
1
- export declare const InformationCardTooltipWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const InformationCardTooltipWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,5 +1,8 @@
1
- import styled from 'styled-components';
2
- export var InformationCardTooltipWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const InformationCardTooltipWrapper = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "InformationCardTooltipstyles__InformationCardTooltipWrapper",
4
4
  componentId: "sc-1q11fca-0"
5
- })(["display:contents;"]);
5
+ })(["display:contents;"]);
6
+ export {
7
+ InformationCardTooltipWrapper
8
+ };
@@ -1,8 +1,8 @@
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';
5
- import type { InformationCardProps } from '../InformationCard.types';
1
+ import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
2
+ import { StyledComponent } from 'styled-components';
3
+ import { LegacyPlacement, PopoverOptions } from '@synerise/ds-popover';
4
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
5
+ import { InformationCardProps } from '../InformationCard.types';
6
6
  export type InformationCardTooltipProps = WithHTMLAttributes<HTMLDivElement, {
7
7
  /**
8
8
  * InformationCardProps - will render <InformationCard/> component with these props as the content of the tooltip
@@ -1 +1 @@
1
- export {};
1
+
package/dist/index.js CHANGED
@@ -1,7 +1,12 @@
1
- export { default } from './InformationCard';
2
- export { InformationCardPropertyList } from './InformationCardPropertyList/InformationCardPropertyList';
3
- export { buildExtraInfo, buildIconBadge, buildInitialsBadge } from './InformationCard.utils';
4
- export { InformationCardTooltip } from './InformationCardTooltip/InformationCardTooltip';
5
- export * from './InformationCardPropertyList/InformationCardPropertyList.types';
6
- export * from './InformationCard.types';
7
- export * from './InformationCardTooltip/InformationCardTooltip.types';
1
+ import { default as default2 } from "./InformationCard.js";
2
+ import { InformationCardPropertyList } from "./InformationCardPropertyList/InformationCardPropertyList.js";
3
+ import { buildExtraInfo, buildIconBadge, buildInitialsBadge } from "./InformationCard.utils.js";
4
+ import { InformationCardTooltip } from "./InformationCardTooltip/InformationCardTooltip.js";
5
+ export {
6
+ InformationCardPropertyList,
7
+ InformationCardTooltip,
8
+ buildExtraInfo,
9
+ buildIconBadge,
10
+ buildInitialsBadge,
11
+ default2 as default
12
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-information-card",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "InformationCard UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "lint": "eslint . --ext .ts --ext .tsx --max-warnings 0 --ignore-pattern dist",
25
25
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
@@ -37,25 +37,25 @@
37
37
  "types": "dist/index.d.ts",
38
38
  "dependencies": {
39
39
  "@floating-ui/react": "^0.27.16",
40
- "@synerise/ds-alert": "^1.1.43",
41
- "@synerise/ds-avatar": "^1.3.3",
42
- "@synerise/ds-badge": "^1.0.42",
43
- "@synerise/ds-button": "^1.5.16",
44
- "@synerise/ds-card": "^1.3.1",
45
- "@synerise/ds-copy-icon": "^1.2.0",
46
- "@synerise/ds-description": "^1.3.0",
47
- "@synerise/ds-divider": "^1.3.0",
48
- "@synerise/ds-dropdown": "^1.3.0",
49
- "@synerise/ds-icon": "^1.14.1",
50
- "@synerise/ds-menu": "^1.4.11",
51
- "@synerise/ds-popover": "^1.5.1",
52
- "@synerise/ds-scrollbar": "^1.2.15",
53
- "@synerise/ds-skeleton": "^1.0.43",
54
- "@synerise/ds-status": "^1.3.16",
55
- "@synerise/ds-subtle-form": "^1.1.57",
56
- "@synerise/ds-tooltip": "^1.4.8",
57
- "@synerise/ds-typography": "^1.1.11",
58
- "@synerise/ds-utils": "^1.6.0",
40
+ "@synerise/ds-alert": "^1.1.45",
41
+ "@synerise/ds-avatar": "^1.3.5",
42
+ "@synerise/ds-badge": "^1.0.44",
43
+ "@synerise/ds-button": "^1.5.18",
44
+ "@synerise/ds-card": "^1.3.3",
45
+ "@synerise/ds-copy-icon": "^1.2.2",
46
+ "@synerise/ds-description": "^1.3.2",
47
+ "@synerise/ds-divider": "^1.3.2",
48
+ "@synerise/ds-dropdown": "^1.3.2",
49
+ "@synerise/ds-icon": "^1.15.1",
50
+ "@synerise/ds-menu": "^1.4.13",
51
+ "@synerise/ds-popover": "^1.5.3",
52
+ "@synerise/ds-scrollbar": "^1.2.17",
53
+ "@synerise/ds-skeleton": "^1.0.45",
54
+ "@synerise/ds-status": "^1.3.18",
55
+ "@synerise/ds-subtle-form": "^1.1.59",
56
+ "@synerise/ds-tooltip": "^1.4.10",
57
+ "@synerise/ds-typography": "^1.1.13",
58
+ "@synerise/ds-utils": "^1.7.1",
59
59
  "uuid": "^8.3.2"
60
60
  },
61
61
  "peerDependencies": {
@@ -64,5 +64,5 @@
64
64
  "react-intl": ">=3.12.0 <= 6.8",
65
65
  "styled-components": "^5.3.3"
66
66
  },
67
- "gitHead": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
67
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
68
68
  }