@synerise/ds-card-select 2.0.10 → 2.1.0

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
+ # [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@2.0.11...@synerise/ds-card-select@2.1.0) (2026-10-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@2.0.10...@synerise/ds-card-select@2.0.11) (2026-10-28)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-card-select
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.0.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@2.0.9...@synerise/ds-card-select@2.0.10) (2026-10-26)
7
26
 
8
27
 
package/CLAUDE.md CHANGED
@@ -103,7 +103,7 @@ const [selected, setSelected] = useState(false);
103
103
 
104
104
  ## Styling
105
105
 
106
- Styles are in `CardSelect.styles.ts` using `styled-is` for `is(prop)` / `isNot(prop)` conditional CSS blocks. All colours are resolved from `@synerise/ds-core` theme palette tokens — no hardcoded hex values except in comments. The `styled-is` library is an additional dependency not used elsewhere in the DS.
106
+ Styles are in `CardSelect.styles.ts` using `styled-is` for `is(prop)` / `isNot(prop)` conditional CSS blocks. Colours come from `var(--ds-*)` tokens, mostly the `--ds-card-select-*` module tokens — no hardcoded hex values except in comments. The `styled-is` library is an additional dependency not used elsewhere in the DS.
107
107
 
108
108
  ## Implementation notes
109
109
 
@@ -113,4 +113,4 @@ Styles are in `CardSelect.styles.ts` using `styled-is` for `is(prop)` / `isNot(p
113
113
  - **Tag ribbon offset**: the `TagRibbonAnchor` padding is calculated from constants (`TAG_LEFT_OFFSET*`) to align the ribbon with or without a tick. Position (`left`/`right`) is mirrored based on `elementsPosition`.
114
114
  - **`CardSelectGroup` columns fallback**: when `columns` is `null`, the grid uses `itemsCount` columns (i.e. all items in one row). When both `items` and `children` are provided, `items` takes precedence.
115
115
  - **`width` prop is deprecated**: it maps to the same styled `size` prop on the wrapper and only affects gap, not card size. Use `size` for both.
116
- - **`withTheme` wrapper**: `CardSelect` is exported as `withTheme(CardSelect)` so the component receives `theme` as a prop. Internally it also calls `useTheme()` from `@synerise/ds-core`. The `theme` prop type is marked `@deprecated`.
116
+ - **`withTheme` wrapper**: `CardSelect` is exported as `withTheme(CardSelect)` so the component receives `theme` as a prop, but nothing reads it any more (no `useTheme()` call). The `theme` prop type is marked `@deprecated`.
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useRef } from "react";
3
3
  import { withTheme } from "styled-components";
4
- import { useTheme } from "@synerise/ds-core";
5
4
  import Icon, { Check3M, InfoFillS } from "@synerise/ds-icon";
6
5
  import { TagShape } from "@synerise/ds-tag";
7
6
  import Tooltip from "@synerise/ds-tooltip";
@@ -32,7 +31,6 @@ const CardSelect = ({
32
31
  infoTooltipProps
33
32
  }) => {
34
33
  const [isPressed, setIsPressed] = useState(false);
35
- const theme = useTheme();
36
34
  const wrapperRef = useRef(null);
37
35
  const tickIconRef = useRef(null);
38
36
  const handleClick = () => {
@@ -53,8 +51,8 @@ const CardSelect = ({
53
51
  tagElementWithTooltip,
54
52
  /* @__PURE__ */ jsxs(Container, { error: !!error, ref: wrapperRef, pressed: isPressed, raised, disabled, value, size, onClick: handleClick, className: `ds-card-select ${className || ""}`, elementsPosition, stretchToFit, children: [
55
53
  /* @__PURE__ */ jsxs(Aside, { size, elementsPosition, tickVisible, tabIndex: disabled ? void 0 : 0, ref: tickIconRef, children: [
56
- tickVisible && /* @__PURE__ */ jsx(TickIcon, { className: "ds-card-select-tick", disabled, elementsPosition, selected: value && !disabled, size, children: value ? /* @__PURE__ */ jsx(Icon, { size: realTickSize, color: value ? theme.palette["green-600"] : theme.palette["grey-400"], component: /* @__PURE__ */ jsx(Check3M, {}) }) : /* @__PURE__ */ jsx(RadioShape, { size }) }),
57
- infoTooltipProps && /* @__PURE__ */ jsx(Tooltip, { ...infoTooltipProps, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(InfoFillS, {}), color: theme.palette["grey-400"] }) })
54
+ tickVisible && /* @__PURE__ */ jsx(TickIcon, { className: "ds-card-select-tick", disabled, elementsPosition, selected: value && !disabled, size, children: value ? /* @__PURE__ */ jsx(Icon, { size: realTickSize, color: "var(--ds-card-select-check-bg-selected)", component: /* @__PURE__ */ jsx(Check3M, {}) }) : /* @__PURE__ */ jsx(RadioShape, { size }) }),
55
+ infoTooltipProps && /* @__PURE__ */ jsx(Tooltip, { ...infoTooltipProps, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(InfoFillS, {}), color: "var(--ds-color-icon-base-muted)" }) })
58
56
  ] }),
59
57
  /* @__PURE__ */ jsxs(Main, { children: [
60
58
  icon && /* @__PURE__ */ jsx(IconWrapper, { size, children: /* @__PURE__ */ jsx(Icon, { component: icon, size: realIconSize }) }),
@@ -18,7 +18,6 @@ const MAP_ELEMENTS_POSITION = {
18
18
  right: "flex-end",
19
19
  center: "center"
20
20
  };
21
- const getVar = (name) => (props) => props.theme.palette[name];
22
21
  const getTransformValues = (props) => {
23
22
  if (props.size === "small") {
24
23
  return "translate(-2px,-2px)";
@@ -32,11 +31,11 @@ const sizeCondition = (smallValue, mediumValue, props) => props.size === "small"
32
31
  const RadioShape = /* @__PURE__ */ styled.div.withConfig({
33
32
  displayName: "CardSelectstyles__RadioShape",
34
33
  componentId: "sc-tfmgtj-0"
35
- })(["", ";width:", "px;height:", "px;border-radius:50%;border-width:", "px;border-style:solid;border-color:", ";margin:2px;&:hover{border-color:", ";}"], TRANSITION, (props) => sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props), (props) => sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props), RADIO_BORDER_WIDTH, getVar("grey-300"), getVar("grey-400"));
34
+ })(["", ";width:", "px;height:", "px;border-radius:50%;border-width:", "px;border-style:solid;border-color:var(--ds-card-select-check-border-color-default);margin:2px;&:hover{border-color:var(--ds-card-select-check-border-color-hover);}"], TRANSITION, (props) => sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props), (props) => sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props), RADIO_BORDER_WIDTH);
36
35
  const Title = /* @__PURE__ */ styled.div.withConfig({
37
36
  displayName: "CardSelectstyles__Title",
38
37
  componentId: "sc-tfmgtj-1"
39
- })(["text-align:center;color:", ";font-weight:", ";width:100%;font-size:", ";", ""], getVar("grey-800"), (props) => sizeCondition("400", "500", props), (props) => sizeCondition("13px", "14px", props), (props) => props.size === "small" && props.hasIcon && css(["margin-top:4px;"]));
38
+ })(["text-align:center;color:var(--ds-card-select-header-color);font-weight:", ";width:100%;font-size:", ";", ""], (props) => sizeCondition("400", "500", props), (props) => sizeCondition("13px", "14px", props), (props) => props.size === "small" && props.hasIcon && css(["margin-top:4px;"]));
40
39
  const Description = /* @__PURE__ */ styled.div.withConfig({
41
40
  displayName: "CardSelectstyles__Description",
42
41
  componentId: "sc-tfmgtj-2"
@@ -52,56 +51,56 @@ const Aside = /* @__PURE__ */ styled.div.withConfig({
52
51
  const Container = /* @__PURE__ */ styled.div.withConfig({
53
52
  displayName: "CardSelectstyles__Container",
54
53
  componentId: "sc-tfmgtj-5"
55
- })(["", " ", ";background-color:", ";border-radius:", ";", " display:flex;flex:1;justify-content:", ";border-color:", ";position:relative;padding:", ";cursor:pointer;&&:focus-within{box-shadow:0px 0px 0px 2px ", ";}", " ", " ", " ", " ", " ", ",", ",", "{text-align:", ";}", "{margin-left:", ";margin-right:", ";}", " ", ";"], is("stretchToFit")`
54
+ })(["", " ", ";background-color:var(--ds-card-select-bg-default);border-radius:", ";", " display:flex;flex:1;justify-content:", ";border-color:var(--ds-card-select-bg-default);position:relative;padding:", ";cursor:pointer;&&:focus-within{box-shadow:0px 0px 0px 2px var(--ds-card-select-border-color-focused);}", " ", " ", " ", " ", " ", ",", ",", "{text-align:", ";}", "{margin-left:", ";margin-right:", ";}", " ", ";"], is("stretchToFit")`
56
55
  height: 100%;
57
- `, TRANSITION, getVar("white"), (props) => props.theme.variable("@border-radius-base"), is("error")`
56
+ `, TRANSITION, (props) => props.theme.variable("@border-radius-base"), is("error")`
58
57
  &&, &&:hover {
59
- box-shadow: 0px 0px 0px 2px ${getVar("red-500")};
58
+ box-shadow: 0px 0px 0px 2px var(--ds-color-border-danger-default);
60
59
  }
61
- `, (props) => MAP_ELEMENTS_POSITION[props.elementsPosition], getVar("white"), (props) => props.size === "small" ? "16px" : "24px", getVar("blue-600"), isNot("pressed") && isNot("value")`box-shadow: 0px 0px 0px 1px ${getVar("grey-300")};`, is("value")`
62
- box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};
63
- `, is("value") && is("pressed")` box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};`, is("value") && is("raised")`
64
- box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};
65
- `, is("value") && is("pressed")` box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};`, Title, Description, IconWrapper, (props) => props.elementsPosition, IconWrapper, (props) => props.elementsPosition === "left" ? "-18px" : "0px", (props) => props.elementsPosition === "right" ? "-18px" : "0px", isNot("disabled")`
66
-
60
+ `, (props) => MAP_ELEMENTS_POSITION[props.elementsPosition], (props) => props.size === "small" ? "16px" : "24px", isNot("pressed") && isNot("value")`box-shadow: 0px 0px 0px 1px var(--ds-card-select-border-color-default);`, is("value")`
61
+ box-shadow: 0px 0px 0px 2px var(--ds-card-select-border-color-selected);
62
+ `, is("value") && is("pressed")` box-shadow: 0px 0px 0px 2px var(--ds-card-select-border-color-selected);`, is("value") && is("raised")`
63
+ box-shadow: 0px 0px 0px 2px var(--ds-card-select-border-color-selected);
64
+ `, is("value") && is("pressed")` box-shadow: 0px 0px 0px 2px var(--ds-card-select-border-color-selected);`, Title, Description, IconWrapper, (props) => props.elementsPosition, IconWrapper, (props) => props.elementsPosition === "left" ? "-18px" : "0px", (props) => props.elementsPosition === "right" ? "-18px" : "0px", isNot("disabled")`
65
+
67
66
 
68
67
  &:hover {
69
68
  ${RadioShape} {
70
- border-color: ${getVar("grey-400")};
69
+ border-color: var(--ds-card-select-check-border-color-hover);
71
70
  }
72
71
  }
73
72
 
74
73
  ${isNot("raised")`
75
74
  ${isNot("value")`
76
- box-shadow: 0px 0px 0px 1px ${getVar("grey-300")};
77
-
75
+ box-shadow: 0px 0px 0px 1px var(--ds-card-select-border-color-default);
76
+
78
77
  &:hover, &:active {
79
- box-shadow: 0px 0px 0px 1px ${getVar("grey-400")};
78
+ box-shadow: 0px 0px 0px 1px var(--ds-card-select-border-color-hover);
80
79
  }
81
80
  `};
82
81
  `};
83
-
82
+
84
83
  ${is("raised")`
85
84
  ${isNot("value")`
86
- box-shadow: ${(props) => props.theme.variable("@box-shadow-base") || "none"};
87
-
85
+ box-shadow: var(--ds-card-select-shadow-default);
86
+
88
87
  &:hover, &:active {
89
- box-shadow: ${(props) => props.theme.variable("@box-shadow-active") || "none"};
88
+ box-shadow: var(--ds-card-select-shadow-hover);
90
89
  }
91
90
  `}
92
-
91
+
93
92
  `}
94
93
  `, is("disabled")`
95
- opacity: 0.4;
94
+ opacity: var(--ds-card-select-disabled-opacity);
96
95
  pointer-events:none;
97
96
 
98
97
  ${isNot("raised")`
99
98
 
100
99
  ${isNot("value")`
101
- box-shadow: 0px 0px 0px 1px ${getVar("grey-200")};
100
+ box-shadow: 0px 0px 0px 1px var(--ds-card-select-border-color-disabled);
102
101
  `}
103
102
  `}
104
-
103
+
105
104
  `);
106
105
  const TagRibbonAnchor = /* @__PURE__ */ styled.div.withConfig({
107
106
  displayName: "CardSelectstyles__TagRibbonAnchor",
@@ -119,11 +118,11 @@ const TickIcon = /* @__PURE__ */ styled.div.withConfig({
119
118
  displayName: "CardSelectstyles__TickIcon",
120
119
  componentId: "sc-tfmgtj-9"
121
120
  })(["", " ", " ", ""], is("selected")`
122
- transform: ${(props) => getTransformValues(props)};
121
+ transform: ${(props) => getTransformValues(props)};
123
122
  `, is("disabled")`
124
123
  ${RadioShape} {
125
- background-color: ${getVar("grey-050")};
126
- border-color: ${getVar("grey-200")};
124
+ background-color: var(--ds-color-background-base-subtle);
125
+ border-color: var(--ds-card-select-check-border-color-default);
127
126
  }
128
127
  `, isNot("disabled")`
129
128
  ${RadioShape} {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-card-select",
3
- "version": "2.0.10",
3
+ "version": "2.1.0",
4
4
  "description": "Card-Select UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,10 +42,10 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-icon": "^2.2.3",
46
- "@synerise/ds-tag": "^2.0.10",
47
- "@synerise/ds-tooltip": "^2.0.10",
48
- "@synerise/ds-utils": "^2.2.2",
45
+ "@synerise/ds-icon": "^2.3.0",
46
+ "@synerise/ds-tag": "^2.1.0",
47
+ "@synerise/ds-tooltip": "^2.1.0",
48
+ "@synerise/ds-utils": "^2.3.0",
49
49
  "styled-is": "^1.3.0"
50
50
  },
51
51
  "devDependencies": {
@@ -56,5 +56,5 @@
56
56
  "react": ">=16.9.0 <= 18.3.1",
57
57
  "styled-components": "^5.3.3"
58
58
  },
59
- "gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
59
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
60
60
  }