@synerise/ds-card 1.2.10 → 1.2.12

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
+ ## [1.2.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@1.2.11...@synerise/ds-card@1.2.12) (2025-10-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **card:** summary styles refactor ([faa301f](https://github.com/Synerise/synerise-design/commit/faa301f17de5475ae80bac13fac0158fb3d2eb03))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.2.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@1.2.10...@synerise/ds-card@1.2.11) (2025-09-25)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-card
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.2.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@1.2.9...@synerise/ds-card@1.2.10) (2025-09-19)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-card
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type CardProps } from './Card.types';
3
- declare const Card: ({ children, raised, disabled, style, className, lively, withHeader, defaultHeaderBackgroundColor, title, description, compactHeader, icon, avatar, renderBadge, iconColor, headerSideChildren, onHeaderClick, withoutPadding, headerBorderBottom, background, hideContent, staticContent, titleTag, showSideChildrenWhenHeaderHidden, ...props }: CardProps) => React.JSX.Element;
3
+ declare const Card: ({ children, raised, disabled, className, lively, withHeader, defaultHeaderBackgroundColor, title, description, compactHeader, icon, avatar, renderBadge, iconColor, headerSideChildren, onHeaderClick, withoutPadding, headerBorderBottom, background, hideContent, staticContent, titleTag, showSideChildrenWhenHeaderHidden, ...htmlAttributes }: CardProps) => React.JSX.Element;
4
4
  export default Card;
package/dist/Card/Card.js CHANGED
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "raised", "disabled", "style", "className", "lively", "withHeader", "defaultHeaderBackgroundColor", "title", "description", "compactHeader", "icon", "avatar", "renderBadge", "iconColor", "headerSideChildren", "onHeaderClick", "withoutPadding", "headerBorderBottom", "background", "hideContent", "staticContent", "titleTag", "showSideChildrenWhenHeaderHidden"];
1
+ var _excluded = ["children", "raised", "disabled", "className", "lively", "withHeader", "defaultHeaderBackgroundColor", "title", "description", "compactHeader", "icon", "avatar", "renderBadge", "iconColor", "headerSideChildren", "onHeaderClick", "withoutPadding", "headerBorderBottom", "background", "hideContent", "staticContent", "titleTag", "showSideChildrenWhenHeaderHidden"];
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
4
  import React, { useState } from 'react';
@@ -11,7 +11,6 @@ var Card = function Card(_ref) {
11
11
  var children = _ref.children,
12
12
  raised = _ref.raised,
13
13
  disabled = _ref.disabled,
14
- style = _ref.style,
15
14
  className = _ref.className,
16
15
  lively = _ref.lively,
17
16
  withHeader = _ref.withHeader,
@@ -33,7 +32,7 @@ var Card = function Card(_ref) {
33
32
  staticContent = _ref.staticContent,
34
33
  titleTag = _ref.titleTag,
35
34
  showSideChildrenWhenHeaderHidden = _ref.showSideChildrenWhenHeaderHidden,
36
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
35
+ htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
37
36
  var fatTitle = !description || description && compactHeader;
38
37
  var _useState = useState(false),
39
38
  headerActionsVisible = _useState[0],
@@ -54,13 +53,12 @@ var Card = function Card(_ref) {
54
53
  return /*#__PURE__*/React.createElement(S.Container, _extends({
55
54
  raised: raised,
56
55
  disabled: disabled,
57
- style: style,
58
56
  className: "ds-card " + (className || ''),
59
57
  lively: lively,
60
58
  "data-testid": "card-wrapper",
61
59
  background: background
62
60
  /** Necessary for passing down data-* attributes */
63
- }, props), withHeader && /*#__PURE__*/React.createElement(S.Header, {
61
+ }, htmlAttributes), withHeader && /*#__PURE__*/React.createElement(S.Header, {
64
62
  onClick: onHeaderClick,
65
63
  headerBorderBottom: headerBorderBottom,
66
64
  defaultHeaderBackgroundColor: defaultHeaderBackgroundColor
@@ -1,6 +1,7 @@
1
1
  import { type CSSProperties, type ReactNode, type SyntheticEvent } from 'react';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
2
3
  export type Backgrounds = 'white' | 'white-shadow' | 'grey' | 'grey-shadow' | 'outline';
3
- export interface CardProps {
4
+ export type CardProps = WithHTMLAttributes<HTMLDivElement, {
4
5
  raised?: boolean;
5
6
  disabled?: boolean;
6
7
  className?: string;
@@ -25,4 +26,4 @@ export interface CardProps {
25
26
  hideContent?: boolean;
26
27
  showSideChildrenWhenHeaderHidden?: boolean;
27
28
  titleTag?: ReactNode;
28
- }
29
+ }>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type CardGroupProps } from './CardGroup.types';
3
- declare const CardGroup: ({ className, children, columns }: CardGroupProps) => React.JSX.Element;
3
+ declare const CardGroup: ({ children, columns, ...htmlAttributes }: CardGroupProps) => React.JSX.Element;
4
4
  export default CardGroup;
@@ -1,12 +1,14 @@
1
+ var _excluded = ["children", "columns"];
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; }
1
4
  import React from 'react';
2
5
  import * as S from './CardGroup.styles';
3
6
  var CardGroup = function CardGroup(_ref) {
4
- var className = _ref.className,
5
- children = _ref.children,
6
- columns = _ref.columns;
7
- return /*#__PURE__*/React.createElement(S.Container, {
8
- className: className,
7
+ var children = _ref.children,
8
+ columns = _ref.columns,
9
+ htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
10
+ return /*#__PURE__*/React.createElement(S.Container, _extends({
9
11
  items: columns
10
- }, children);
12
+ }, htmlAttributes), children);
11
13
  };
12
14
  export default CardGroup;
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
- export interface CardGroupProps {
3
- className?: string;
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
+ export type CardGroupProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  children: ReactNode;
5
5
  columns: number;
6
- }
6
+ }>;
@@ -25,15 +25,15 @@ export var ValueButtonWrapper = styled.div.withConfig({
25
25
  export var CardSummaryItemDetailsWrapper = styled.div.withConfig({
26
26
  displayName: "CardSummarystyles__CardSummaryItemDetailsWrapper",
27
27
  componentId: "sc-1yj41os-5"
28
- })(["display:flex;align-items:center;gap:12px;"]);
28
+ })(["display:flex;align-items:center;gap:12px;min-height:32px;"]);
29
29
  export var CardSummaryItemDetails = styled.div.withConfig({
30
30
  displayName: "CardSummarystyles__CardSummaryItemDetails",
31
31
  componentId: "sc-1yj41os-6"
32
- })(["&:before{content:'\u2022';margin-right:8px;}display:flex;gap:4px;line-height:24px;padding:4px 0;"]);
32
+ })(["&:before{content:'\u2022';}display:flex;gap:12px;align-items:center;"]);
33
33
  export var CardSummaryItemLabelValueWrapper = styled.span.withConfig({
34
34
  displayName: "CardSummarystyles__CardSummaryItemLabelValueWrapper",
35
35
  componentId: "sc-1yj41os-7"
36
- })(["align-self:center;word-break:break-all;"]);
36
+ })(["align-self:center;word-break:break-all;display:flex;align-items:center;"]);
37
37
  export var CardSummaryItemLabel = styled(Text).withConfig({
38
38
  displayName: "CardSummarystyles__CardSummaryItemLabel",
39
39
  componentId: "sc-1yj41os-8"
@@ -41,11 +41,11 @@ export var CardSummaryItemLabel = styled(Text).withConfig({
41
41
  export var CardSummaryItemValue = styled.span.withConfig({
42
42
  displayName: "CardSummarystyles__CardSummaryItemValue",
43
43
  componentId: "sc-1yj41os-9"
44
- })(["", " line-height:24px;"], macro.h200);
44
+ })(["", " display:flex;align-items:center;gap:4px;"], macro.h200);
45
45
  export var IconWrapper = styled.div.withConfig({
46
46
  displayName: "CardSummarystyles__IconWrapper",
47
47
  componentId: "sc-1yj41os-10"
48
- })(["display:inline-block;height:24px;"]);
48
+ })([""]);
49
49
  export var Icon = styled(DSIcon).withConfig({
50
50
  displayName: "CardSummarystyles__Icon",
51
51
  componentId: "sc-1yj41os-11"
@@ -55,8 +55,8 @@ export var Icon = styled(DSIcon).withConfig({
55
55
  export var CardSummaryItemObjects = styled.div.withConfig({
56
56
  displayName: "CardSummarystyles__CardSummaryItemObjects",
57
57
  componentId: "sc-1yj41os-12"
58
- })(["display:flex;gap:8px;margin-left:16px;margin-top:8px;"]);
58
+ })(["--cols:4;--gap:8px;display:flex;flex-wrap:wrap;gap:0 var(--gap);margin:8px 0 8px 16px;"]);
59
59
  export var CardSummaryItemObject = styled.div.withConfig({
60
60
  displayName: "CardSummarystyles__CardSummaryItemObject",
61
61
  componentId: "sc-1yj41os-13"
62
- })(["flex-basis:25%;min-width:0;", "{margin-left:0;}"], Tag);
62
+ })(["flex-basis:calc( 100% / var(--cols) - var(--gap) / var(--cols) * (var(--cols) - 1) );min-width:0;", "{margin-left:0;}"], Tag);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-card",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "description": "Card UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -35,9 +35,9 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-avatar": "^1.0.22",
38
+ "@synerise/ds-avatar": "^1.0.23",
39
39
  "@synerise/ds-icon": "^1.7.2",
40
- "@synerise/ds-tag": "^1.2.0",
40
+ "@synerise/ds-tag": "^1.3.0",
41
41
  "@synerise/ds-typography": "^1.0.21",
42
42
  "@synerise/ds-utils": "^1.4.2",
43
43
  "react-animate-height": "^2.0.23",
@@ -50,5 +50,5 @@
50
50
  "react": ">=16.9.0 <= 18.3.1",
51
51
  "styled-components": "^5.3.3"
52
52
  },
53
- "gitHead": "5029af8713235b315d36bb3c73363f2feca86da0"
53
+ "gitHead": "1f909e1fc4174f1c05c148338e64652a893ef926"
54
54
  }