@synerise/ds-card 1.3.2 → 1.3.3

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,10 @@
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.3.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@1.3.2...@synerise/ds-card@1.3.3) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-card
9
+
6
10
  ## [1.3.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card@1.3.1...@synerise/ds-card@1.3.2) (2026-03-20)
7
11
 
8
12
  **Note:** Version bump only for package @synerise/ds-card
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CardProps } from './Card.types';
1
+ import { default as React } from 'react';
2
+ import { CardProps } from './Card.types';
3
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,107 +1,73 @@
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
- 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, { useState } from 'react';
5
- import AnimateHeight from 'react-animate-height';
6
- import VisibilitySensor from 'react-visibility-sensor';
7
- import Icon from '@synerise/ds-icon';
8
- import { ANIMATION_DURATION } from '../constants';
9
- import * as S from './Card.styles';
10
- var Card = function Card(_ref) {
11
- var children = _ref.children,
12
- raised = _ref.raised,
13
- disabled = _ref.disabled,
14
- className = _ref.className,
15
- lively = _ref.lively,
16
- withHeader = _ref.withHeader,
17
- defaultHeaderBackgroundColor = _ref.defaultHeaderBackgroundColor,
18
- title = _ref.title,
19
- description = _ref.description,
20
- compactHeader = _ref.compactHeader,
21
- icon = _ref.icon,
22
- avatar = _ref.avatar,
23
- renderBadge = _ref.renderBadge,
24
- iconColor = _ref.iconColor,
25
- headerSideChildren = _ref.headerSideChildren,
26
- onHeaderClick = _ref.onHeaderClick,
27
- withoutPadding = _ref.withoutPadding,
28
- headerBorderBottom = _ref.headerBorderBottom,
29
- _ref$background = _ref.background,
30
- background = _ref$background === void 0 ? 'white-shadow' : _ref$background,
31
- hideContent = _ref.hideContent,
32
- staticContent = _ref.staticContent,
33
- titleTag = _ref.titleTag,
34
- showSideChildrenWhenHeaderHidden = _ref.showSideChildrenWhenHeaderHidden,
35
- htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
36
- var fatTitle = !description || description && compactHeader;
37
- var _useState = useState(false),
38
- headerActionsVisible = _useState[0],
39
- setHeaderActionsVisible = _useState[1];
40
- var renderTitle = function renderTitle() {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import AnimateHeight from "react-animate-height";
4
+ import VisibilitySensor from "react-visibility-sensor";
5
+ import Icon from "@synerise/ds-icon";
6
+ import { ANIMATION_DURATION } from "../constants.js";
7
+ import { Container, Header, IconContainer, HeaderContent, Description, HeaderSideChildren, ChildrenContainer, PaddingWrapper, FooterContainer, TitleWrapper, Title, TitleTag } from "./Card.styles.js";
8
+ const Card = ({
9
+ children,
10
+ raised,
11
+ disabled,
12
+ className,
13
+ lively,
14
+ withHeader,
15
+ defaultHeaderBackgroundColor,
16
+ title,
17
+ description,
18
+ compactHeader,
19
+ icon,
20
+ avatar,
21
+ renderBadge,
22
+ iconColor,
23
+ headerSideChildren,
24
+ onHeaderClick,
25
+ withoutPadding,
26
+ headerBorderBottom,
27
+ background = "white-shadow",
28
+ hideContent,
29
+ staticContent,
30
+ titleTag,
31
+ showSideChildrenWhenHeaderHidden,
32
+ ...htmlAttributes
33
+ }) => {
34
+ const fatTitle = !description || description && compactHeader;
35
+ const [headerActionsVisible, setHeaderActionsVisible] = useState(false);
36
+ const renderTitle = () => {
41
37
  if (!title && !titleTag) {
42
38
  return null;
43
39
  }
44
- return /*#__PURE__*/React.createElement(S.TitleWrapper, {
45
- "data-testid": "card-title",
46
- compact: compactHeader,
47
- description: Boolean(description)
48
- }, title && /*#__PURE__*/React.createElement(S.Title, {
49
- level: 4,
50
- fat: !!fatTitle
51
- }, title), titleTag && /*#__PURE__*/React.createElement(S.TitleTag, null, titleTag));
40
+ return /* @__PURE__ */ jsxs(TitleWrapper, { "data-testid": "card-title", compact: compactHeader, description: Boolean(description), children: [
41
+ title && /* @__PURE__ */ jsx(Title, { level: 4, fat: !!fatTitle, children: title }),
42
+ titleTag && /* @__PURE__ */ jsx(TitleTag, { children: titleTag })
43
+ ] });
52
44
  };
53
- return /*#__PURE__*/React.createElement(S.Container, _extends({
54
- raised: raised,
55
- disabled: disabled,
56
- className: "ds-card " + (className || ''),
57
- lively: lively,
58
- "data-testid": "card-wrapper",
59
- background: background
60
- /** Necessary for passing down data-* attributes */
61
- }, htmlAttributes), withHeader && /*#__PURE__*/React.createElement(S.Header, {
62
- onClick: onHeaderClick,
63
- headerBorderBottom: headerBorderBottom,
64
- defaultHeaderBackgroundColor: defaultHeaderBackgroundColor
65
- }, icon && /*#__PURE__*/React.createElement(S.IconContainer, {
66
- description: description,
67
- compact: compactHeader
68
- }, /*#__PURE__*/React.createElement(Icon, {
69
- component: icon,
70
- color: iconColor
71
- })) || avatar || renderBadge && renderBadge(), /*#__PURE__*/React.createElement(S.HeaderContent, {
72
- compact: compactHeader,
73
- hasIconOrAvatar: Boolean(icon || avatar)
74
- }, renderTitle(), description && /*#__PURE__*/React.createElement(S.Description, {
75
- "data-testid": "card-description"
76
- }, description)), headerSideChildren && /*#__PURE__*/React.createElement(VisibilitySensor, {
77
- partialVisibility: true,
78
- onChange: setHeaderActionsVisible
79
- }, /*#__PURE__*/React.createElement(S.HeaderSideChildren, {
80
- onClick: function onClick(event) {
81
- return event.stopPropagation();
45
+ return /* @__PURE__ */ jsxs(
46
+ Container,
47
+ {
48
+ raised,
49
+ disabled,
50
+ className: `ds-card ${className || ""}`,
51
+ lively,
52
+ "data-testid": "card-wrapper",
53
+ background,
54
+ ...htmlAttributes,
55
+ children: [
56
+ withHeader && /* @__PURE__ */ jsxs(Header, { onClick: onHeaderClick, headerBorderBottom, defaultHeaderBackgroundColor, children: [
57
+ icon && /* @__PURE__ */ jsx(IconContainer, { description, compact: compactHeader, children: /* @__PURE__ */ jsx(Icon, { component: icon, color: iconColor }) }) || avatar || renderBadge && renderBadge(),
58
+ /* @__PURE__ */ jsxs(HeaderContent, { compact: compactHeader, hasIconOrAvatar: Boolean(icon || avatar), children: [
59
+ renderTitle(),
60
+ description && /* @__PURE__ */ jsx(Description, { "data-testid": "card-description", children: description })
61
+ ] }),
62
+ headerSideChildren && /* @__PURE__ */ jsx(VisibilitySensor, { partialVisibility: true, onChange: setHeaderActionsVisible, children: /* @__PURE__ */ jsx(HeaderSideChildren, { onClick: (event) => event.stopPropagation(), children: headerSideChildren }) })
63
+ ] }),
64
+ staticContent && /* @__PURE__ */ jsx(AnimateHeight, { className: "static-content-card-animation", duration: ANIMATION_DURATION, height: hideContent ? "auto" : 0, children: /* @__PURE__ */ jsx(ChildrenContainer, { "data-testid": "card-static-content", children: /* @__PURE__ */ jsx(PaddingWrapper, { withoutPadding, withHeader, children: staticContent }) }) }),
65
+ /* @__PURE__ */ jsx(AnimateHeight, { className: "card-animation", duration: ANIMATION_DURATION, height: hideContent ? 0 : "auto", children: /* @__PURE__ */ jsx(ChildrenContainer, { "data-testid": "card-content", children: /* @__PURE__ */ jsx(PaddingWrapper, { withoutPadding, withHeader, children }) }) }),
66
+ showSideChildrenWhenHeaderHidden && /* @__PURE__ */ jsx(AnimateHeight, { className: "card-animation-footer", duration: 0, height: headerSideChildren && !headerActionsVisible ? "auto" : 0, children: /* @__PURE__ */ jsx(FooterContainer, { children: headerSideChildren }) })
67
+ ]
82
68
  }
83
- }, headerSideChildren))), staticContent && /*#__PURE__*/React.createElement(AnimateHeight, {
84
- className: "static-content-card-animation",
85
- duration: ANIMATION_DURATION,
86
- height: hideContent ? 'auto' : 0
87
- }, /*#__PURE__*/React.createElement(S.ChildrenContainer, {
88
- "data-testid": "card-static-content"
89
- }, /*#__PURE__*/React.createElement(S.PaddingWrapper, {
90
- withoutPadding: withoutPadding,
91
- withHeader: withHeader
92
- }, staticContent))), /*#__PURE__*/React.createElement(AnimateHeight, {
93
- className: "card-animation",
94
- duration: ANIMATION_DURATION,
95
- height: hideContent ? 0 : 'auto'
96
- }, /*#__PURE__*/React.createElement(S.ChildrenContainer, {
97
- "data-testid": "card-content"
98
- }, /*#__PURE__*/React.createElement(S.PaddingWrapper, {
99
- withoutPadding: withoutPadding,
100
- withHeader: withHeader
101
- }, children))), showSideChildrenWhenHeaderHidden && /*#__PURE__*/React.createElement(AnimateHeight, {
102
- className: "card-animation-footer",
103
- duration: 0,
104
- height: headerSideChildren && !headerActionsVisible ? 'auto' : 0
105
- }, /*#__PURE__*/React.createElement(S.FooterContainer, null, headerSideChildren)));
69
+ );
70
+ };
71
+ export {
72
+ Card as default
106
73
  };
107
- export default Card;
@@ -1,37 +1,37 @@
1
- import type { MouseEventHandler, ReactNode } from 'react';
2
- import { type Backgrounds } from './Card.types';
3
- export declare const HeaderSideChildren: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const IconContainer: import("styled-components").StyledComponent<"div", any, {
1
+ import { MouseEventHandler, ReactNode } from 'react';
2
+ import { Backgrounds } from './Card.types';
3
+ export declare const HeaderSideChildren: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const IconContainer: import('styled-components').StyledComponent<"div", any, {
5
5
  compact?: boolean;
6
6
  description?: ReactNode;
7
7
  }, never>;
8
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
8
+ export declare const Container: import('styled-components').StyledComponent<"div", any, {
9
9
  raised?: boolean;
10
10
  disabled?: boolean;
11
11
  lively?: boolean;
12
12
  background: Backgrounds;
13
13
  }, never>;
14
- export declare const Header: import("styled-components").StyledComponent<"div", any, {
14
+ export declare const Header: import('styled-components').StyledComponent<"div", any, {
15
15
  onClick?: MouseEventHandler;
16
16
  headerBorderBottom?: boolean;
17
17
  defaultHeaderBackgroundColor?: boolean;
18
18
  }, never>;
19
- export declare const Title: import("styled-components").StyledComponent<({ level, withoutMargin, children, className, ellipsis, ...antdProps }: import("@synerise/ds-typography/dist/Title.types").Props) => React.JSX.Element, any, {
19
+ export declare const Title: import('styled-components').StyledComponent<({ level, withoutMargin, children, className, ellipsis, ...antdProps }: import('@synerise/ds-typography/dist/Title.types').Props) => React.JSX.Element, any, {
20
20
  fat: boolean;
21
21
  }, never>;
22
- export declare const TitleWrapper: import("styled-components").StyledComponent<"div", any, {
22
+ export declare const TitleWrapper: import('styled-components').StyledComponent<"div", any, {
23
23
  compact?: boolean;
24
24
  description?: boolean;
25
25
  }, never>;
26
- export declare const TitleTag: import("styled-components").StyledComponent<"div", any, {}, never>;
27
- export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
28
- export declare const HeaderContent: import("styled-components").StyledComponent<"div", any, {
26
+ export declare const TitleTag: import('styled-components').StyledComponent<"div", any, {}, never>;
27
+ export declare const Description: import('styled-components').StyledComponent<"div", any, {}, never>;
28
+ export declare const HeaderContent: import('styled-components').StyledComponent<"div", any, {
29
29
  compact?: boolean;
30
30
  hasIconOrAvatar: boolean;
31
31
  }, never>;
32
- export declare const ChildrenContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
33
- export declare const PaddingWrapper: import("styled-components").StyledComponent<"div", any, {
32
+ export declare const ChildrenContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
33
+ export declare const PaddingWrapper: import('styled-components').StyledComponent<"div", any, {
34
34
  withHeader?: boolean;
35
35
  withoutPadding?: boolean;
36
36
  }, never>;
37
- export declare const FooterContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
37
+ export declare const FooterContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,120 +1,92 @@
1
- import styled, { css } from 'styled-components';
2
- import { Title as DSTitle } from '@synerise/ds-typography';
3
- import { CardSummaryWrapper } from '../CardSummary/CardSummary.styles';
4
- var whiteBg = ['white', 'white-shadow'];
5
- var greyBg = ['grey', 'grey-shadow'];
6
- var withBoxShadow = ['white-shadow', 'grey-shadow'];
7
- var withOutline = ['outline'];
8
- var backgroundColor = function backgroundColor(props) {
1
+ import styled, { css } from "styled-components";
2
+ import { Title as Title$1 } from "@synerise/ds-typography";
3
+ import { CardSummaryWrapper } from "../CardSummary/CardSummary.styles.js";
4
+ const whiteBg = ["white", "white-shadow"];
5
+ const greyBg = ["grey", "grey-shadow"];
6
+ const withBoxShadow = ["white-shadow", "grey-shadow"];
7
+ const withOutline = ["outline"];
8
+ const backgroundColor = (props) => {
9
9
  if (whiteBg.includes(props.background)) {
10
10
  return props.theme.palette.white;
11
11
  }
12
12
  if (greyBg.includes(props.background)) {
13
- return props.theme.palette['grey-050'];
13
+ return props.theme.palette["grey-050"];
14
14
  }
15
15
  return props.theme.palette.transparent;
16
16
  };
17
- var boxShadow = function boxShadow(props) {
17
+ const boxShadow = (props) => {
18
18
  if (withBoxShadow.includes(props.background)) {
19
- return "0 4px 12px 0 rgba(35, 41, 54, 0.04)";
19
+ return `0 4px 12px 0 rgba(35, 41, 54, 0.04)`;
20
20
  }
21
21
  if (withOutline.includes(props.background)) {
22
- return props.theme.palette['grey-200'] + " 0px 0px 0px 1px inset";
22
+ return `${props.theme.palette["grey-200"]} 0px 0px 0px 1px inset`;
23
23
  }
24
- return 'none';
24
+ return "none";
25
25
  };
26
- export var HeaderSideChildren = styled.div.withConfig({
26
+ const HeaderSideChildren = /* @__PURE__ */ styled.div.withConfig({
27
27
  displayName: "Cardstyles__HeaderSideChildren",
28
28
  componentId: "sc-18exblx-0"
29
29
  })(["position:relative;padding-left:24px;"]);
30
- export var IconContainer = styled.div.withConfig({
30
+ const IconContainer = /* @__PURE__ */ styled.div.withConfig({
31
31
  displayName: "Cardstyles__IconContainer",
32
32
  componentId: "sc-18exblx-1"
33
- })(["display:flex;width:24px;height:", ";align-items:center;"], function (props) {
34
- return props.description && !props.compact ? '24px' : '32px';
35
- });
36
- export var Container = styled.div.withConfig({
33
+ })(["display:flex;width:24px;height:", ";align-items:center;"], (props) => props.description && !props.compact ? "24px" : "32px");
34
+ const Container = /* @__PURE__ */ styled.div.withConfig({
37
35
  displayName: "Cardstyles__Container",
38
36
  componentId: "sc-18exblx-2"
39
- })(["background-color:", ";box-shadow:", ";border-radius:", ";display:flex;flex-flow:column;width:100%;.card-animation{> *{transition:opacity 0.3s ease;opacity:0;}&.rah-static--height-auto{> *{opacity:1;}}}", " ", ";", ""], function (props) {
40
- return props.background ? backgroundColor(props) : props.theme.palette.transparent;
41
- }, function (props) {
42
- return props.background ? boxShadow(props) : 'none';
43
- }, function (props) {
44
- return props.theme.variable('@border-radius-base');
45
- }, function (props) {
46
- return !!props.raised && css(["box-shadow:", ";"], props.theme.variable('@box-shadow-active'));
47
- }, function (props) {
48
- return !!props.disabled && css(["pointer-events:none;opacity:0.4;", "{opacity:0.16;}", "{opacity:0.4;}"], HeaderSideChildren, IconContainer);
49
- }, function (props) {
50
- return !!props.lively && css(["&:hover{box-shadow:", ";}"], props.theme.variable('@box-shadow-active'));
51
- });
52
- export var Header = styled.div.withConfig({
37
+ })(["background-color:", ";box-shadow:", ";border-radius:", ";display:flex;flex-flow:column;width:100%;.card-animation{> *{transition:opacity 0.3s ease;opacity:0;}&.rah-static--height-auto{> *{opacity:1;}}}", " ", ";", ""], (props) => props.background ? backgroundColor(props) : props.theme.palette.transparent, (props) => props.background ? boxShadow(props) : "none", (props) => props.theme.variable("@border-radius-base"), (props) => !!props.raised && css(["box-shadow:", ";"], props.theme.variable("@box-shadow-active")), (props) => !!props.disabled && css(["pointer-events:none;opacity:0.4;", "{opacity:0.16;}", "{opacity:0.4;}"], HeaderSideChildren, IconContainer), (props) => !!props.lively && css(["&:hover{box-shadow:", ";}"], props.theme.variable("@box-shadow-active")));
38
+ const Header = /* @__PURE__ */ styled.div.withConfig({
53
39
  displayName: "Cardstyles__Header",
54
40
  componentId: "sc-18exblx-3"
55
- })(["padding:24px 24px 24px 24px;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;position:relative;&:after{position:absolute;bottom:0;left:24px;right:24px;height:1px;content:'';display:", ";background-color:", ";}&:hover{", "}", ""], function (props) {
56
- return props.headerBorderBottom ? 'block' : 'none';
57
- }, function (props) {
58
- return props.theme.palette['grey-100'];
59
- }, function (props) {
60
- return !!props.onClick && "cursor:pointer;";
61
- }, function (props) {
62
- return !!props.defaultHeaderBackgroundColor && css(["background-color:", ";"], props.theme.palette.white);
63
- });
64
- export var Title = styled(DSTitle).withConfig({
41
+ })(["padding:24px 24px 24px 24px;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;position:relative;&:after{position:absolute;bottom:0;left:24px;right:24px;height:1px;content:'';display:", ";background-color:", ";}&:hover{", "}", ""], (props) => props.headerBorderBottom ? "block" : "none", (props) => props.theme.palette["grey-100"], (props) => !!props.onClick && `cursor:pointer;`, (props) => !!props.defaultHeaderBackgroundColor && css(["background-color:", ";"], props.theme.palette.white));
42
+ const Title = /* @__PURE__ */ styled(Title$1).withConfig({
65
43
  displayName: "Cardstyles__Title",
66
44
  componentId: "sc-18exblx-4"
67
- })(["&&{display:flex;align-items:center;min-height:", ";margin:0;line-height:1.4;}"], function (props) {
68
- return props.fat ? '32px' : '20px';
69
- });
70
- export var TitleWrapper = styled.div.withConfig({
45
+ })(["&&{display:flex;align-items:center;min-height:", ";margin:0;line-height:1.4;}"], (props) => props.fat ? "32px" : "20px");
46
+ const TitleWrapper = /* @__PURE__ */ styled.div.withConfig({
71
47
  displayName: "Cardstyles__TitleWrapper",
72
48
  componentId: "sc-18exblx-5"
73
- })(["display:flex;flex-direction:row;gap:4px;align-items:center;margin-bottom:", ";"], function (props) {
74
- return props.description && !props.compact ? '6px' : '0';
75
- });
76
- export var TitleTag = styled.div.withConfig({
49
+ })(["display:flex;flex-direction:row;gap:4px;align-items:center;margin-bottom:", ";"], (props) => props.description && !props.compact ? "6px" : "0");
50
+ const TitleTag = /* @__PURE__ */ styled.div.withConfig({
77
51
  displayName: "Cardstyles__TitleTag",
78
52
  componentId: "sc-18exblx-6"
79
53
  })([""]);
80
- export var Description = styled.div.withConfig({
54
+ const Description = /* @__PURE__ */ styled.div.withConfig({
81
55
  displayName: "Cardstyles__Description",
82
56
  componentId: "sc-18exblx-7"
83
- })(["&&{color:", ";font-size:13px;line-height:1.38;margin:0;}"], function (props) {
84
- return props.theme.palette['grey-600'];
85
- });
86
- export var HeaderContent = styled.div.withConfig({
57
+ })(["&&{color:", ";font-size:13px;line-height:1.38;margin:0;}"], (props) => props.theme.palette["grey-600"]);
58
+ const HeaderContent = /* @__PURE__ */ styled.div.withConfig({
87
59
  displayName: "Cardstyles__HeaderContent",
88
60
  componentId: "sc-18exblx-8"
89
- })(["max-width:100%;flex:1;display:flex;flex-direction:", ";align-items:", ";margin:0 0 0 ", ";", ""], function (props) {
90
- return props.compact ? 'row' : 'column';
91
- }, function (props) {
92
- return props.compact ? 'center' : 'flex-start';
93
- }, function (props) {
61
+ })(["max-width:100%;flex:1;display:flex;flex-direction:", ";align-items:", ";margin:0 0 0 ", ";", ""], (props) => props.compact ? "row" : "column", (props) => props.compact ? "center" : "flex-start", (props) => {
94
62
  if (props.hasIconOrAvatar) {
95
- return '24px';
63
+ return "24px";
96
64
  }
97
- return '0';
98
- }, function (props) {
99
- return !!props.compact && css(["", "{height:32px;line-height:32px;margin:0;}", "{border-left:1px solid ", ";height:32px;line-height:32px;padding:0 0 0 24px;margin:0 0 0 24px;}"], Title, Description, props.theme.palette['grey-200']);
100
- });
101
- export var ChildrenContainer = styled.div.withConfig({
65
+ return "0";
66
+ }, (props) => !!props.compact && css(["", "{height:32px;line-height:32px;margin:0;}", "{border-left:1px solid ", ";height:32px;line-height:32px;padding:0 0 0 24px;margin:0 0 0 24px;}"], Title, Description, props.theme.palette["grey-200"]));
67
+ const ChildrenContainer = /* @__PURE__ */ styled.div.withConfig({
102
68
  displayName: "Cardstyles__ChildrenContainer",
103
69
  componentId: "sc-18exblx-9"
104
70
  })([""]);
105
- export var PaddingWrapper = styled.div.withConfig({
71
+ const PaddingWrapper = /* @__PURE__ */ styled.div.withConfig({
106
72
  displayName: "Cardstyles__PaddingWrapper",
107
73
  componentId: "sc-18exblx-10"
108
- })(["padding:", ";", " ", "{margin:0 48px;}"], function (props) {
109
- return props.withoutPadding ? '0' : "24px";
110
- }, function (props) {
111
- return !!props.withHeader && "padding-top: 0;";
112
- }, CardSummaryWrapper);
113
- export var FooterContainer = styled.div.withConfig({
74
+ })(["padding:", ";", " ", "{margin:0 48px;}"], (props) => props.withoutPadding ? "0" : `24px`, (props) => !!props.withHeader && `padding-top: 0;`, CardSummaryWrapper);
75
+ const FooterContainer = /* @__PURE__ */ styled.div.withConfig({
114
76
  displayName: "Cardstyles__FooterContainer",
115
77
  componentId: "sc-18exblx-11"
116
- })(["padding:24px;display:flex;align-items:center;justify-content:flex-end;background:", ";border-top:solid 1px ", ";"], function (props) {
117
- return props.theme.palette.white;
118
- }, function (props) {
119
- return props.theme.palette['grey-100'];
120
- });
78
+ })(["padding:24px;display:flex;align-items:center;justify-content:flex-end;background:", ";border-top:solid 1px ", ";"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-100"]);
79
+ export {
80
+ ChildrenContainer,
81
+ Container,
82
+ Description,
83
+ FooterContainer,
84
+ Header,
85
+ HeaderContent,
86
+ HeaderSideChildren,
87
+ IconContainer,
88
+ PaddingWrapper,
89
+ Title,
90
+ TitleTag,
91
+ TitleWrapper
92
+ };
@@ -1,5 +1,5 @@
1
- import { type CSSProperties, type ReactNode, type SyntheticEvent } from 'react';
2
- import { type WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { CSSProperties, ReactNode, SyntheticEvent } from 'react';
2
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type Backgrounds = 'white' | 'white-shadow' | 'grey' | 'grey-shadow' | 'outline';
4
4
  export type CardProps = WithHTMLAttributes<HTMLDivElement, {
5
5
  raised?: boolean;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CardBadgeProps } from './CardBadge.types';
1
+ import { default as React } from 'react';
2
+ import { CardBadgeProps } from './CardBadge.types';
3
3
  declare const CardBadge: ({ icon, status, ...props }: CardBadgeProps) => React.JSX.Element;
4
4
  export default CardBadge;
@@ -1,18 +1,11 @@
1
- var _excluded = ["icon", "status"];
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 from 'react';
5
- import Icon from '@synerise/ds-icon';
6
- import * as S from './CardBadge.styles';
7
- var CardBadge = function CardBadge(_ref) {
8
- var icon = _ref.icon,
9
- _ref$status = _ref.status,
10
- status = _ref$status === void 0 ? 'default' : _ref$status,
11
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
12
- return /*#__PURE__*/React.createElement(S.CardBadge, _extends({
13
- status: status
14
- }, props), /*#__PURE__*/React.createElement(Icon, {
15
- component: icon
16
- }));
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Icon from "@synerise/ds-icon";
3
+ import { CardBadge as CardBadge$1 } from "./CardBadge.styles.js";
4
+ const CardBadge = ({
5
+ icon,
6
+ status = "default",
7
+ ...props
8
+ }) => /* @__PURE__ */ jsx(CardBadge$1, { status, ...props, children: /* @__PURE__ */ jsx(Icon, { component: icon }) });
9
+ export {
10
+ CardBadge as default
17
11
  };
18
- export default CardBadge;
@@ -1,4 +1,4 @@
1
- import { type BadgeStatus } from './CardBadge.types';
2
- export declare const CardBadge: import("styled-components").StyledComponent<"div", any, {
1
+ import { BadgeStatus } from './CardBadge.types';
2
+ export declare const CardBadge: import('styled-components').StyledComponent<"div", any, {
3
3
  status: BadgeStatus;
4
4
  }, never>;
@@ -1,28 +1,25 @@
1
- import styled from 'styled-components';
2
- var background = {
3
- success: 'green-600',
4
- warning: 'yellow-600',
5
- error: 'red-600',
6
- "default": 'transparent',
7
- checked: 'transparent'
1
+ import styled from "styled-components";
2
+ const background = {
3
+ success: "green-600",
4
+ warning: "yellow-600",
5
+ error: "red-600",
6
+ default: "transparent",
7
+ checked: "transparent"
8
8
  };
9
- var color = {
10
- success: 'white',
11
- warning: 'white',
12
- error: 'white',
13
- "default": 'grey-400',
14
- checked: 'grey-400'
9
+ const color = {
10
+ success: "white",
11
+ warning: "white",
12
+ error: "white",
13
+ default: "grey-400",
14
+ checked: "grey-400"
15
15
  };
16
- var boxShadow = function boxShadow(props) {
17
- return props.status === 'default' ? props.theme.palette['grey-400'] + " 0px 0px 0px 1.5px inset" : 'none';
16
+ const boxShadow = (props) => {
17
+ return props.status === "default" ? `${props.theme.palette["grey-400"]} 0px 0px 0px 1.5px inset` : "none";
18
18
  };
19
- export var CardBadge = styled.div.withConfig({
19
+ const CardBadge = /* @__PURE__ */ styled.div.withConfig({
20
20
  displayName: "CardBadgestyles__CardBadge",
21
21
  componentId: "sc-1xcnpyh-0"
22
- })(["width:24px;height:24px;display:flex;align-items:center;justify-content:center;background-color:", ";box-shadow:", ";border-radius:50%;&&& svg{color:", ";}"], function (props) {
23
- return props.theme.palette[background[props.status]];
24
- }, function (props) {
25
- return boxShadow(props);
26
- }, function (props) {
27
- return props.theme.palette[color[props.status]];
28
- });
22
+ })(["width:24px;height:24px;display:flex;align-items:center;justify-content:center;background-color:", ";box-shadow:", ";border-radius:50%;&&& svg{color:", ";}"], (props) => props.theme.palette[background[props.status]], (props) => boxShadow(props), (props) => props.theme.palette[color[props.status]]);
23
+ export {
24
+ CardBadge
25
+ };
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export type BadgeStatus = 'success' | 'checked' | 'warning' | 'error' | 'default';
3
3
  export type CardBadgeProps = {
4
4
  icon: ReactNode;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CardGroupProps } from './CardGroup.types';
1
+ import { default as React } from 'react';
2
+ import { CardGroupProps } from './CardGroup.types';
3
3
  declare const CardGroup: ({ children, columns, ...htmlAttributes }: CardGroupProps) => React.JSX.Element;
4
4
  export default CardGroup;
@@ -1,14 +1,12 @@
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; }
4
- import React from 'react';
5
- import * as S from './CardGroup.styles';
6
- var CardGroup = function CardGroup(_ref) {
7
- var children = _ref.children,
8
- columns = _ref.columns,
9
- htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
10
- return /*#__PURE__*/React.createElement(S.Container, _extends({
11
- items: columns
12
- }, htmlAttributes), children);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Container } from "./CardGroup.styles.js";
3
+ const CardGroup = ({
4
+ children,
5
+ columns,
6
+ ...htmlAttributes
7
+ }) => {
8
+ return /* @__PURE__ */ jsx(Container, { items: columns, ...htmlAttributes, children });
9
+ };
10
+ export {
11
+ CardGroup as default
13
12
  };
14
- export default CardGroup;
@@ -1,3 +1,3 @@
1
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const Container: import('styled-components').StyledComponent<"div", any, {
2
2
  items: number;
3
3
  }, never>;
@@ -1,9 +1,8 @@
1
- import styled from 'styled-components';
2
- export var Container = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const Container = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "CardGroupstyles__Container",
4
4
  componentId: "sc-qyudjs-0"
5
- })(["display:grid;grid-column-gap:24px;grid-row-gap:24px;grid-template-columns:", ";width:100%;"], function (props) {
6
- return [].concat(new Array(props.items)).map(function () {
7
- return '1fr';
8
- }).join(' ');
9
- });
5
+ })(["display:grid;grid-column-gap:24px;grid-row-gap:24px;grid-template-columns:", ";width:100%;"], (props) => [...new Array(props.items)].map(() => "1fr").join(" "));
6
+ export {
7
+ Container
8
+ };
@@ -1,5 +1,5 @@
1
- import { type ReactNode } from 'react';
2
- import { type WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { ReactNode } from 'react';
2
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type CardGroupProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  children: ReactNode;
5
5
  columns: number;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { type CardSummaryProps } from './CardSummary.types';
1
+ import { default as React } from 'react';
2
+ import { CardSummaryProps } from './CardSummary.types';
3
3
  export declare const CardSummary: ({ title, items, ...props }: CardSummaryProps) => React.JSX.Element;
@@ -1,21 +1,20 @@
1
- var _excluded = ["title", "items"],
2
- _excluded2 = ["key"];
3
- 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); }
4
- 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; }
5
- import React from 'react';
6
- import * as S from './CardSummary.styles';
7
- import { CardSummaryItem } from './CardSummaryItem';
8
- export var CardSummary = function CardSummary(_ref) {
9
- var title = _ref.title,
10
- items = _ref.items,
11
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
12
- return /*#__PURE__*/React.createElement(S.CardSummaryWrapper, props, title && /*#__PURE__*/React.createElement(S.CardSummaryTitle, {
13
- level: 5
14
- }, title), /*#__PURE__*/React.createElement(S.CardSummaryList, null, items.map(function (_ref2) {
15
- var key = _ref2.key,
16
- item = _objectWithoutPropertiesLoose(_ref2, _excluded2);
17
- return /*#__PURE__*/React.createElement(CardSummaryItem, _extends({}, item, {
18
- key: key
19
- }));
20
- })));
21
- };
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { createElement } from "react";
3
+ import { CardSummaryWrapper, CardSummaryTitle, CardSummaryList } from "./CardSummary.styles.js";
4
+ import { CardSummaryItem } from "./CardSummaryItem.js";
5
+ const CardSummary = ({
6
+ title,
7
+ items,
8
+ ...props
9
+ }) => {
10
+ return /* @__PURE__ */ jsxs(CardSummaryWrapper, { ...props, children: [
11
+ title && /* @__PURE__ */ jsx(CardSummaryTitle, { level: 5, children: title }),
12
+ /* @__PURE__ */ jsx(CardSummaryList, { children: items.map(({
13
+ key,
14
+ ...item
15
+ }) => /* @__PURE__ */ createElement(CardSummaryItem, { ...item, key })) })
16
+ ] });
17
+ };
18
+ export {
19
+ CardSummary
20
+ };
@@ -1,27 +1,27 @@
1
- import { type SummaryObjectsDirection } from './CardSummary.types';
2
- export declare const CardSummaryWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const CardSummaryTitle: import("styled-components").StyledComponent<({ level, withoutMargin, children, className, ellipsis, ...antdProps }: import("@synerise/ds-typography/dist/Title.types").Props) => React.JSX.Element, any, {}, never>;
4
- export declare const CardSummaryList: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const CardSummaryItemWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const ValueButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const CardSummaryItemDetailsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const CardSummaryItemDetails: import("styled-components").StyledComponent<"div", any, {}, never>;
9
- export declare const CardSummaryItemLabelValueWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
10
- export declare const CardSummaryItemLabel: import("styled-components").StyledComponent<({ size, className, children, ellipsis, style, }: {
11
- size?: import("@synerise/ds-typography").TextSize;
12
- ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps;
13
- children?: import("react").ReactNode;
1
+ import { SummaryObjectsDirection } from './CardSummary.types';
2
+ export declare const CardSummaryWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const CardSummaryTitle: import('styled-components').StyledComponent<({ level, withoutMargin, children, className, ellipsis, ...antdProps }: import('@synerise/ds-typography/dist/Title.types').Props) => React.JSX.Element, any, {}, never>;
4
+ export declare const CardSummaryList: import('styled-components').StyledComponent<"div", any, {}, never>;
5
+ export declare const CardSummaryItemWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const ValueButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
7
+ export declare const CardSummaryItemDetailsWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
8
+ export declare const CardSummaryItemDetails: import('styled-components').StyledComponent<"div", any, {}, never>;
9
+ export declare const CardSummaryItemLabelValueWrapper: import('styled-components').StyledComponent<"span", any, {}, never>;
10
+ export declare const CardSummaryItemLabel: import('styled-components').StyledComponent<({ size, className, children, ellipsis, style, }: {
11
+ size?: import('@synerise/ds-typography').TextSize;
12
+ ellipsis?: import('@synerise/ds-typography/dist/Ellipsis').EllipsisProps;
13
+ children?: import('react').ReactNode;
14
14
  className?: string;
15
- style?: import("react").CSSProperties;
15
+ style?: import('react').CSSProperties;
16
16
  }) => React.JSX.Element, any, {}, never>;
17
- export declare const CardSummaryItemValue: import("styled-components").StyledComponent<"span", any, {}, never>;
18
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
19
- export declare const Icon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@synerise/ds-icon").BaseIconProps & Omit<import("react").HTMLAttributes<HTMLDivElement>, keyof import("@synerise/ds-icon").BaseIconProps> & import("@synerise/ds-utils").DataAttributes & import("react").RefAttributes<HTMLDivElement>>, any, {
17
+ export declare const CardSummaryItemValue: import('styled-components').StyledComponent<"span", any, {}, never>;
18
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
19
+ export declare const Icon: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('@synerise/ds-icon').BaseIconProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, keyof import('@synerise/ds-icon').BaseIconProps> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {
20
20
  isOpen: boolean;
21
21
  }, never>;
22
- export declare const CardSummaryItemObjects: import("styled-components").StyledComponent<"div", any, {
22
+ export declare const CardSummaryItemObjects: import('styled-components').StyledComponent<"div", any, {
23
23
  direction: SummaryObjectsDirection;
24
24
  }, never>;
25
- export declare const CardSummaryItemObject: import("styled-components").StyledComponent<"div", any, {
25
+ export declare const CardSummaryItemObject: import('styled-components').StyledComponent<"div", any, {
26
26
  direction: SummaryObjectsDirection;
27
27
  }, never>;
@@ -1,68 +1,90 @@
1
- import styled from 'styled-components';
2
- import DSIcon from '@synerise/ds-icon';
3
- import { Tag } from '@synerise/ds-tag/dist/Tag.styles';
4
- import { Text, Title, macro } from '@synerise/ds-typography';
5
- export var CardSummaryWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ import Icon$1 from "@synerise/ds-icon";
3
+ import { Tag } from "@synerise/ds-tag/dist/Tag.styles";
4
+ import { macro, Text, Title } from "@synerise/ds-typography";
5
+ const CardSummaryWrapper = /* @__PURE__ */ styled.div.withConfig({
6
6
  displayName: "CardSummarystyles__CardSummaryWrapper",
7
7
  componentId: "sc-1yj41os-0"
8
8
  })([""]);
9
- export var CardSummaryTitle = styled(Title).withConfig({
9
+ const CardSummaryTitle = /* @__PURE__ */ styled(Title).withConfig({
10
10
  displayName: "CardSummarystyles__CardSummaryTitle",
11
11
  componentId: "sc-1yj41os-1"
12
12
  })([""]);
13
- export var CardSummaryList = styled.div.withConfig({
13
+ const CardSummaryList = /* @__PURE__ */ styled.div.withConfig({
14
14
  displayName: "CardSummarystyles__CardSummaryList",
15
15
  componentId: "sc-1yj41os-2"
16
16
  })([""]);
17
- export var CardSummaryItemWrapper = styled.div.withConfig({
17
+ const CardSummaryItemWrapper = /* @__PURE__ */ styled.div.withConfig({
18
18
  displayName: "CardSummarystyles__CardSummaryItemWrapper",
19
19
  componentId: "sc-1yj41os-3"
20
20
  })([""]);
21
- export var ValueButtonWrapper = styled.div.withConfig({
21
+ const ValueButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
22
22
  displayName: "CardSummarystyles__ValueButtonWrapper",
23
23
  componentId: "sc-1yj41os-4"
24
24
  })(["align-self:flex-start;"]);
25
- export var CardSummaryItemDetailsWrapper = styled.div.withConfig({
25
+ const CardSummaryItemDetailsWrapper = /* @__PURE__ */ styled.div.withConfig({
26
26
  displayName: "CardSummarystyles__CardSummaryItemDetailsWrapper",
27
27
  componentId: "sc-1yj41os-5"
28
28
  })(["display:flex;align-items:center;gap:12px;min-height:32px;"]);
29
- export var CardSummaryItemDetails = styled.div.withConfig({
29
+ const CardSummaryItemDetails = /* @__PURE__ */ styled.div.withConfig({
30
30
  displayName: "CardSummarystyles__CardSummaryItemDetails",
31
31
  componentId: "sc-1yj41os-6"
32
- })(["&:before{content:'\u2022';}display:flex;gap:12px;align-items:center;"]);
33
- export var CardSummaryItemLabelValueWrapper = styled.span.withConfig({
32
+ })(["&:before{content:'•';}display:flex;gap:12px;align-items:center;"]);
33
+ const CardSummaryItemLabelValueWrapper = /* @__PURE__ */ styled.span.withConfig({
34
34
  displayName: "CardSummarystyles__CardSummaryItemLabelValueWrapper",
35
35
  componentId: "sc-1yj41os-7"
36
36
  })(["align-self:center;word-break:break-all;display:flex;align-items:center;"]);
37
- export var CardSummaryItemLabel = styled(Text).withConfig({
37
+ const CardSummaryItemLabel = /* @__PURE__ */ styled(Text).withConfig({
38
38
  displayName: "CardSummarystyles__CardSummaryItemLabel",
39
39
  componentId: "sc-1yj41os-8"
40
40
  })(["line-height:24px;margin-right:4px;"]);
41
- export var CardSummaryItemValue = styled.span.withConfig({
41
+ const CardSummaryItemValue = /* @__PURE__ */ styled.span.withConfig({
42
42
  displayName: "CardSummarystyles__CardSummaryItemValue",
43
43
  componentId: "sc-1yj41os-9"
44
44
  })(["", " display:flex;align-items:center;gap:4px;"], macro.h200);
45
- export var IconWrapper = styled.div.withConfig({
45
+ const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
46
46
  displayName: "CardSummarystyles__IconWrapper",
47
47
  componentId: "sc-1yj41os-10"
48
48
  })([""]);
49
- export var Icon = styled(DSIcon).withConfig({
49
+ const Icon = /* @__PURE__ */ styled(Icon$1).withConfig({
50
50
  displayName: "CardSummarystyles__Icon",
51
51
  componentId: "sc-1yj41os-11"
52
- })(["transform:rotate(", "deg);"], function (props) {
53
- return props.isOpen ? '180' : '0';
54
- });
55
- export var CardSummaryItemObjects = styled.div.withConfig({
52
+ })(["transform:rotate(", "deg);"], (props) => props.isOpen ? "180" : "0");
53
+ const CardSummaryItemObjects = /* @__PURE__ */ styled.div.withConfig({
56
54
  displayName: "CardSummarystyles__CardSummaryItemObjects",
57
55
  componentId: "sc-1yj41os-12"
58
- })(["--cols:4;--gap:8px;display:flex;margin:8px 0 8px 16px;", ""], function (_ref) {
59
- var direction = _ref.direction;
60
- return direction === 'column' ? "\n flex-direction: column;\n gap: 12px;\n " : "\n flex-wrap: wrap;\n gap: 0 var(--gap);\n ";
61
- });
62
- export var CardSummaryItemObject = styled.div.withConfig({
56
+ })(["--cols:4;--gap:8px;display:flex;margin:8px 0 8px 16px;", ""], ({
57
+ direction
58
+ }) => direction === "column" ? `
59
+ flex-direction: column;
60
+ gap: 12px;
61
+ ` : `
62
+ flex-wrap: wrap;
63
+ gap: 0 var(--gap);
64
+ `);
65
+ const CardSummaryItemObject = /* @__PURE__ */ styled.div.withConfig({
63
66
  displayName: "CardSummarystyles__CardSummaryItemObject",
64
67
  componentId: "sc-1yj41os-13"
65
- })(["min-width:0;", "{margin-left:0;}", ""], Tag, function (_ref2) {
66
- var direction = _ref2.direction;
67
- return direction === 'row' && "\n flex-basis: calc(\n 100% / var(--cols) - var(--gap) / var(--cols) * (var(--cols) - 1)\n );\n ";
68
- });
68
+ })(["min-width:0;", "{margin-left:0;}", ""], Tag, ({
69
+ direction
70
+ }) => direction === "row" && `
71
+ flex-basis: calc(
72
+ 100% / var(--cols) - var(--gap) / var(--cols) * (var(--cols) - 1)
73
+ );
74
+ `);
75
+ export {
76
+ CardSummaryItemDetails,
77
+ CardSummaryItemDetailsWrapper,
78
+ CardSummaryItemLabel,
79
+ CardSummaryItemLabelValueWrapper,
80
+ CardSummaryItemObject,
81
+ CardSummaryItemObjects,
82
+ CardSummaryItemValue,
83
+ CardSummaryItemWrapper,
84
+ CardSummaryList,
85
+ CardSummaryTitle,
86
+ CardSummaryWrapper,
87
+ Icon,
88
+ IconWrapper,
89
+ ValueButtonWrapper
90
+ };
@@ -1,5 +1,5 @@
1
- import type { Key, ReactElement, ReactNode } from 'react';
2
- import type { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { Key, ReactElement, ReactNode } from 'react';
2
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type SummaryObjectsDirection = 'row' | 'column';
4
4
  export type CardSummaryItemProps = WithHTMLAttributes<HTMLDivElement, {
5
5
  key: Key;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { type CardSummaryItemProps } from './CardSummary.types';
1
+ import { default as React } from 'react';
2
+ import { CardSummaryItemProps } from './CardSummary.types';
3
3
  export declare const CardSummaryItem: ({ label, value, summaryObjects, summaryObjectsDirection, valueButton, ...rest }: CardSummaryItemProps) => React.JSX.Element;
@@ -1,42 +1,42 @@
1
- var _excluded = ["label", "value", "summaryObjects", "summaryObjectsDirection", "valueButton"];
2
- 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; }
3
- import React, { useState } from 'react';
4
- import AnimateHeight from 'react-animate-height';
5
- import { v4 as uuid } from 'uuid';
6
- import { AngleDownS } from '@synerise/ds-icon';
7
- import { ANIMATION_DURATION } from '../constants';
8
- import * as S from './CardSummary.styles';
9
- export var CardSummaryItem = function CardSummaryItem(_ref) {
10
- var label = _ref.label,
11
- value = _ref.value,
12
- summaryObjects = _ref.summaryObjects,
13
- _ref$summaryObjectsDi = _ref.summaryObjectsDirection,
14
- summaryObjectsDirection = _ref$summaryObjectsDi === void 0 ? 'row' : _ref$summaryObjectsDi,
15
- valueButton = _ref.valueButton,
16
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
17
- var _useState = useState(false),
18
- isOpen = _useState[0],
19
- setIsOpen = _useState[1];
20
- var withObjects = !!(summaryObjects != null && summaryObjects.length);
21
- var handleClick = function handleClick() {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import AnimateHeight from "react-animate-height";
4
+ import { v4 } from "uuid";
5
+ import { AngleDownS } from "@synerise/ds-icon";
6
+ import { ANIMATION_DURATION } from "../constants.js";
7
+ import { CardSummaryItemWrapper, CardSummaryItemDetailsWrapper, CardSummaryItemDetails, CardSummaryItemLabelValueWrapper, CardSummaryItemLabel, CardSummaryItemValue, ValueButtonWrapper, CardSummaryItemObjects, CardSummaryItemObject, IconWrapper, Icon } from "./CardSummary.styles.js";
8
+ const CardSummaryItem = ({
9
+ label,
10
+ value,
11
+ summaryObjects,
12
+ summaryObjectsDirection = "row",
13
+ valueButton,
14
+ ...rest
15
+ }) => {
16
+ const [isOpen, setIsOpen] = useState(false);
17
+ const withObjects = !!summaryObjects?.length;
18
+ const handleClick = () => {
22
19
  setIsOpen(!isOpen);
23
20
  };
24
- var icon = /*#__PURE__*/React.createElement(S.IconWrapper, null, /*#__PURE__*/React.createElement(S.Icon, {
25
- isOpen: isOpen,
26
- component: /*#__PURE__*/React.createElement(AngleDownS, null),
27
- onClick: handleClick
28
- }));
29
- return /*#__PURE__*/React.createElement(S.CardSummaryItemWrapper, rest, /*#__PURE__*/React.createElement(S.CardSummaryItemDetailsWrapper, null, /*#__PURE__*/React.createElement(S.CardSummaryItemDetails, null, /*#__PURE__*/React.createElement(S.CardSummaryItemLabelValueWrapper, null, label && /*#__PURE__*/React.createElement(S.CardSummaryItemLabel, {
30
- size: "small"
31
- }, label, ":"), /*#__PURE__*/React.createElement(S.CardSummaryItemValue, null, value, " ", withObjects && icon))), valueButton && /*#__PURE__*/React.createElement(S.ValueButtonWrapper, null, valueButton)), withObjects && /*#__PURE__*/React.createElement(AnimateHeight, {
32
- duration: ANIMATION_DURATION,
33
- height: isOpen ? 'auto' : 0
34
- }, /*#__PURE__*/React.createElement(S.CardSummaryItemObjects, {
35
- direction: summaryObjectsDirection
36
- }, summaryObjects == null ? void 0 : summaryObjects.map(function (object) {
37
- return /*#__PURE__*/React.createElement(S.CardSummaryItemObject, {
38
- direction: summaryObjectsDirection,
39
- key: object.key || uuid()
40
- }, object);
41
- }))));
42
- };
21
+ const icon = /* @__PURE__ */ jsx(IconWrapper, { children: /* @__PURE__ */ jsx(Icon, { isOpen, component: /* @__PURE__ */ jsx(AngleDownS, {}), onClick: handleClick }) });
22
+ return /* @__PURE__ */ jsxs(CardSummaryItemWrapper, { ...rest, children: [
23
+ /* @__PURE__ */ jsxs(CardSummaryItemDetailsWrapper, { children: [
24
+ /* @__PURE__ */ jsx(CardSummaryItemDetails, { children: /* @__PURE__ */ jsxs(CardSummaryItemLabelValueWrapper, { children: [
25
+ label && /* @__PURE__ */ jsxs(CardSummaryItemLabel, { size: "small", children: [
26
+ label,
27
+ ":"
28
+ ] }),
29
+ /* @__PURE__ */ jsxs(CardSummaryItemValue, { children: [
30
+ value,
31
+ " ",
32
+ withObjects && icon
33
+ ] })
34
+ ] }) }),
35
+ valueButton && /* @__PURE__ */ jsx(ValueButtonWrapper, { children: valueButton })
36
+ ] }),
37
+ withObjects && /* @__PURE__ */ jsx(AnimateHeight, { duration: ANIMATION_DURATION, height: isOpen ? "auto" : 0, children: /* @__PURE__ */ jsx(CardSummaryItemObjects, { direction: summaryObjectsDirection, children: summaryObjects?.map((object) => /* @__PURE__ */ jsx(CardSummaryItemObject, { direction: summaryObjectsDirection, children: object }, object.key || v4())) }) })
38
+ ] });
39
+ };
40
+ export {
41
+ CardSummaryItem
42
+ };
package/dist/constants.js CHANGED
@@ -1 +1,4 @@
1
- export var ANIMATION_DURATION = 300;
1
+ const ANIMATION_DURATION = 300;
2
+ export {
3
+ ANIMATION_DURATION
4
+ };
package/dist/index.js CHANGED
@@ -1,12 +1,19 @@
1
- import * as MainCardStyles from './Card/Card.styles';
2
- import * as CardBadgeStyles from './CardBadge/CardBadge.styles';
3
- import * as CardGroupStyles from './CardGroup/CardGroup.styles';
4
- export { default } from './Card/Card';
5
- export { default as CardGroup } from './CardGroup/CardGroup';
6
- export { default as CardBadge } from './CardBadge/CardBadge';
7
- export { CardSummary } from './CardSummary/CardSummary';
8
- export var CardStyles = {
9
- Card: MainCardStyles,
10
- CardGroup: CardGroupStyles,
11
- CardBadge: CardBadgeStyles
12
- };
1
+ import * as Card_Card_styles from "./Card/Card.styles.js";
2
+ import * as CardBadge_CardBadge_styles from "./CardBadge/CardBadge.styles.js";
3
+ import * as CardGroup_CardGroup_styles from "./CardGroup/CardGroup.styles.js";
4
+ import { default as default2 } from "./Card/Card.js";
5
+ import { default as default3 } from "./CardGroup/CardGroup.js";
6
+ import { default as default4 } from "./CardBadge/CardBadge.js";
7
+ import { CardSummary } from "./CardSummary/CardSummary.js";
8
+ const CardStyles = {
9
+ Card: Card_Card_styles,
10
+ CardGroup: CardGroup_CardGroup_styles,
11
+ CardBadge: CardBadge_CardBadge_styles
12
+ };
13
+ export {
14
+ default4 as CardBadge,
15
+ default3 as CardGroup,
16
+ CardStyles,
17
+ CardSummary,
18
+ default2 as default
19
+ };
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-card",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Card 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
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -35,11 +35,11 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-avatar": "^1.3.4",
39
- "@synerise/ds-icon": "^1.15.0",
40
- "@synerise/ds-tag": "^1.4.17",
41
- "@synerise/ds-typography": "^1.1.12",
42
- "@synerise/ds-utils": "^1.7.0",
38
+ "@synerise/ds-avatar": "^1.3.5",
39
+ "@synerise/ds-icon": "^1.15.1",
40
+ "@synerise/ds-tag": "^1.4.18",
41
+ "@synerise/ds-typography": "^1.1.13",
42
+ "@synerise/ds-utils": "^1.7.1",
43
43
  "react-animate-height": "^2.0.23",
44
44
  "react-visibility-sensor": "^5.1.1",
45
45
  "uuid": "^8.3.2"
@@ -51,5 +51,5 @@
51
51
  "styled-components": "^5.3.3",
52
52
  "vitest": "4"
53
53
  },
54
- "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
54
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
55
55
  }