@synerise/ds-factors 2.3.2 → 2.4.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,28 @@
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.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@2.3.3...@synerise/ds-factors@2.4.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.3.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@2.3.2...@synerise/ds-factors@2.3.3) (2026-10-28)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * keep the information card closed while its picker is open ([4fbed93](https://github.com/Synerise/synerise-design/commit/4fbed93dc688f1f26633378ecc5246c10869bcf4))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [2.3.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@2.3.1...@synerise/ds-factors@2.3.2) (2026-10-26)
7
29
 
8
30
 
package/CLAUDE.md CHANGED
@@ -168,7 +168,7 @@ Merges the user-provided `texts` (any `DeepPartial<FactorsTexts>`) with react-in
168
168
 
169
169
  ## Styling
170
170
 
171
- Styles are minimal — the outer `Group` wrapper uses `@synerise/ds-input` group primitives. Individual factor value components each have their own styles files. All use `@synerise/ds-core` theme tokens; no hardcoded colours.
171
+ Styles are minimal — the outer `Group` wrapper uses `@synerise/ds-input` group primitives. Individual factor value components each have their own styles files. All use `var(--ds-*)` tokens; no hardcoded colours.
172
172
 
173
173
  ## Key dependencies
174
174
 
@@ -1,6 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { theme } from "@synerise/ds-core";
4
3
  import { DropdownMenu } from "@synerise/ds-dropdown";
5
4
  import Icon, { CheckS } from "@synerise/ds-icon";
6
5
  import Tooltip from "@synerise/ds-tooltip";
@@ -29,7 +28,7 @@ const FactorTypeSelector = ({
29
28
  className: "ds-factor-type",
30
29
  key: typeData.name,
31
30
  prefixel: /* @__PURE__ */ jsx(Icon, { component: typeData.icon }),
32
- suffixel: type === selectedFactorType ? /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CheckS, {}), color: theme.palette["green-600"] }) : "",
31
+ suffixel: type === selectedFactorType ? /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CheckS, {}), color: "var(--ds-color-icon-success-default)" }) : "",
33
32
  onClick: () => {
34
33
  setSelectedFactorType(type);
35
34
  },
@@ -3,11 +3,11 @@ import Button from "@synerise/ds-button";
3
3
  const FactorTypeList = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "FactorTypeSelectorstyles__FactorTypeList",
5
5
  componentId: "sc-15cv997-0"
6
- })(["padding:8px;background:", ";"], (props) => props.theme.palette.white);
6
+ })(["padding:8px;background:var(--ds-color-background-base-default);"]);
7
7
  const TriggerButton = /* @__PURE__ */ styled(Button).withConfig({
8
8
  displayName: "FactorTypeSelectorstyles__TriggerButton",
9
9
  componentId: "sc-15cv997-1"
10
- })(["&&&{display:inline-flex;border-radius:3px 0 0 3px;min-width:32px;&:focus{.btn-focus{box-shadow:inset 0 0 0 1px ", ";}}}"], (props) => props.theme.palette["grey-300"]);
10
+ })(["&&&{display:inline-flex;border-radius:3px 0 0 3px;min-width:32px;}"]);
11
11
  export {
12
12
  FactorTypeList,
13
13
  TriggerButton
@@ -1,6 +1,5 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useMemo } from "react";
3
- import { useTheme } from "@synerise/ds-core";
4
3
  import Icon, { EditS } from "@synerise/ds-icon";
5
4
  import { TagShape } from "@synerise/ds-tag";
6
5
  import { TriggerButton, TriggerButtonLabel } from "./Array.styles.js";
@@ -37,12 +36,11 @@ const Array = ({
37
36
  setIsVisible(false);
38
37
  onDeactivate && onDeactivate();
39
38
  };
40
- const theme = useTheme();
41
39
  const tagProps = {
42
40
  asPill: true,
43
41
  name: `${arrayValue.length}`,
44
- color: error ? theme.palette["red-600"] : theme.palette["grey-600"],
45
- textColor: "#fff",
42
+ color: error ? "var(--ds-color-background-danger-solid)" : "var(--ds-color-background-neutral-solid)",
43
+ textColor: "var(--ds-color-text-base-onsolid)",
46
44
  shape: TagShape.DEFAULT_ROUND
47
45
  };
48
46
  const tooltipProps = arrayValue?.length ? {
@@ -62,7 +62,7 @@ const CreatorItemsList = /* @__PURE__ */ styled.div.withConfig({
62
62
  const DeleteIcon = /* @__PURE__ */ styled(Icon).withConfig({
63
63
  displayName: "Arraystyles__DeleteIcon",
64
64
  componentId: "sc-9atgo7-14"
65
- })(["position:absolute;right:0;top:50%;transform:translateY(-50%);display:none;color:", ";&:hover{color:", ";}"], (props) => props.theme.palette["red-600"], (props) => props.theme.palette["red-500"]);
65
+ })(["position:absolute;right:0;top:50%;transform:translateY(-50%);display:none;color:var(--ds-color-icon-danger-default);&:hover{color:var(--ds-color-icon-danger-defaulthover);}"]);
66
66
  const CollectorWrapper = /* @__PURE__ */ styled.div.withConfig({
67
67
  displayName: "Arraystyles__CollectorWrapper",
68
68
  componentId: "sc-9atgo7-15"
@@ -88,7 +88,7 @@ const ParameterInput = ({
88
88
  label: void 0
89
89
  } : void 0, ...parameter.informationCardProps }));
90
90
  }, [parameter, isSelected, parameterIcon, parameterName]);
91
- const trigger = selectedItemInfoCard ? /* @__PURE__ */ jsx(InformationCardTooltip, { content: selectedItemInfoCard, popoverProps: {
91
+ const trigger = selectedItemInfoCard ? /* @__PURE__ */ jsx(InformationCardTooltip, { disabled: dropdownVisible, content: selectedItemInfoCard, popoverProps: {
92
92
  placement: "top",
93
93
  getPopupContainer: getPopupContainerOverride || getPopupContainer
94
94
  }, children: triggerButton }) : triggerButton;
@@ -18,11 +18,11 @@ const ItemsList = /* @__PURE__ */ styled.div.withConfig({
18
18
  const SearchResult = /* @__PURE__ */ styled.span.withConfig({
19
19
  displayName: "Parameterstyle__SearchResult",
20
20
  componentId: "sc-u2uvgh-3"
21
- })(["font-weight:400;color:", ";"], (props) => props.theme.palette["grey-500"]);
21
+ })(["font-weight:400;color:var(--ds-divider-header-text-color);"]);
22
22
  const SearchResultHighlight = /* @__PURE__ */ styled.span.withConfig({
23
23
  displayName: "Parameterstyle__SearchResultHighlight",
24
24
  componentId: "sc-u2uvgh-4"
25
- })(["font-weight:500;color:", ";"], (props) => props.theme.palette["grey-700"]);
25
+ })(["font-weight:500;color:var(--ds-color-text-base-subtle);"]);
26
26
  const Value = /* @__PURE__ */ styled.span.withConfig({
27
27
  displayName: "Parameterstyle__Value",
28
28
  componentId: "sc-u2uvgh-5"
@@ -46,7 +46,7 @@ const Skeleton = /* @__PURE__ */ styled(DropdownSkeleton).withConfig({
46
46
  const Title = /* @__PURE__ */ styled.div.withConfig({
47
47
  displayName: "Parameterstyle__Title",
48
48
  componentId: "sc-u2uvgh-9"
49
- })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 12px;"], (props) => props.theme.palette["grey-500"]);
49
+ })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:var(--ds-divider-header-text-color);padding:8px 12px;"]);
50
50
  const ShowMoreItem = /* @__PURE__ */ styled.div.withConfig({
51
51
  displayName: "Parameterstyle__ShowMoreItem",
52
52
  componentId: "sc-u2uvgh-10"
@@ -1,6 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React, { useRef, useState, useMemo, useCallback, useEffect } from "react";
3
- import { useTheme } from "@synerise/ds-core";
4
3
  import Divider from "@synerise/ds-divider";
5
4
  import Dropdown from "@synerise/ds-dropdown";
6
5
  import Icon, { ArrowRightCircleM, SearchM } from "@synerise/ds-icon";
@@ -32,7 +31,6 @@ const ParameterDropdown = ({
32
31
  const listRef = useRef(null);
33
32
  const overlayRef = useRef(null);
34
33
  const scrollBarRef = useRef(null);
35
- const theme = useTheme();
36
34
  const {
37
35
  visibleGroups,
38
36
  tabs,
@@ -237,7 +235,7 @@ const ParameterDropdown = ({
237
235
  setSearchInputFocus(true);
238
236
  });
239
237
  }, children: [
240
- /* @__PURE__ */ jsx(Dropdown.SearchInput, { onSearchChange: handleSearch, onClearInput: () => handleSearch(""), placeholder: texts.parameter.searchPlaceholder, value: searchQuery, autofocus: !searchQuery || searchInputCanBeFocused, autofocusDelay: 50, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}), color: theme.palette["grey-600"] }) }),
238
+ /* @__PURE__ */ jsx(Dropdown.SearchInput, { onSearchChange: handleSearch, onClearInput: () => handleSearch(""), placeholder: texts.parameter.searchPlaceholder, value: searchQuery, autofocus: !searchQuery || searchInputCanBeFocused, autofocusDelay: 50, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}) }) }),
241
239
  tabs.length > 1 && /* @__PURE__ */ jsx(TabsWrapper, { children: /* @__PURE__ */ jsx(Tabs, { block: true, tabs, activeTab, handleTabClick: (index) => {
242
240
  setActiveTab(index);
243
241
  setActiveGroup(void 0);
@@ -1,6 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback, useMemo } from "react";
3
- import { useTheme } from "@synerise/ds-core";
4
3
  import Dropdown from "@synerise/ds-dropdown";
5
4
  import Icon, { AngleDownS, Close3S } from "@synerise/ds-icon";
6
5
  import { getPopupContainer } from "@synerise/ds-utils";
@@ -23,7 +22,6 @@ const RelativeDateInput = ({
23
22
  }) => {
24
23
  const [isOpen, setIsOpen] = useState(opened);
25
24
  const [localValue, setLocalValue] = useState(() => value);
26
- const theme = useTheme();
27
25
  const {
28
26
  relativeDate: texts
29
27
  } = allTexts;
@@ -63,9 +61,9 @@ const RelativeDateInput = ({
63
61
  }
64
62
  return /* @__PURE__ */ jsxs(IconWrapper, { children: [
65
63
  /* @__PURE__ */ jsx(ChevronIcon, { onClick: handleOpen, component: /* @__PURE__ */ jsx(AngleDownS, {}) }),
66
- /* @__PURE__ */ jsx(ClearIcon, { onClick: handleClear, color: theme.palette["red-600"], component: /* @__PURE__ */ jsx(Close3S, {}) })
64
+ /* @__PURE__ */ jsx(ClearIcon, { onClick: handleClear, component: /* @__PURE__ */ jsx(Close3S, {}) })
67
65
  ] });
68
- }, [localValue, allowClear, handleClear, handleOpen, theme.palette]);
66
+ }, [localValue, allowClear, handleClear, handleOpen]);
69
67
  const trigger = useMemo(() => {
70
68
  return /* @__PURE__ */ jsx(Trigger, { "data-testid": "ds-factors-relative-date-trigger", error, readOnly: true, autoResize: {
71
69
  minWidth: "123px",
@@ -10,7 +10,7 @@ const RelativeDateDropdownWrapper = /* @__PURE__ */ styled(Dropdown.Wrapper).wit
10
10
  const RelativeDateDropdownFooter = /* @__PURE__ */ styled.div.withConfig({
11
11
  displayName: "RelativeDateDropdownstyles__RelativeDateDropdownFooter",
12
12
  componentId: "sc-1xn8l81-1"
13
- })(["background:", ";display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:8px;"], (props) => props.theme.palette["grey-100"]);
13
+ })(["background:var(--ds-color-background-base-muted);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:8px;"]);
14
14
  const RelativeDateCurrentLabel = /* @__PURE__ */ styled.div.withConfig({
15
15
  displayName: "RelativeDateDropdownstyles__RelativeDateCurrentLabel",
16
16
  componentId: "sc-1xn8l81-2"
@@ -30,7 +30,7 @@ const ChevronIcon = /* @__PURE__ */ styled(Icon).withConfig({
30
30
  const Trigger = /* @__PURE__ */ styled(Input).withConfig({
31
31
  displayName: "RelativeDateDropdownstyles__Trigger",
32
32
  componentId: "sc-1xn8l81-6"
33
- })(["", "{display:none;}&:hover{", "{display:block;svg{fill:", ";}&:hover svg{fill:", ";}}", "{display:none;}}"], ClearIcon, ClearIcon, (props) => props.theme.palette["red-600"], (props) => props.theme.palette["red-500"], ChevronIcon);
33
+ })(["", "{display:none;color:var(--ds-color-icon-danger-default);}&:hover{", "{display:block;&:hover{color:var(--ds-color-icon-danger-defaulthover);}}", "{display:none;}}"], ClearIcon, ClearIcon, ChevronIcon);
34
34
  export {
35
35
  ChevronIcon,
36
36
  ClearIcon,
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback, useMemo } from "react";
3
3
  import Autocomplete from "@synerise/ds-autocomplete";
4
- import { useTheme } from "@synerise/ds-core";
5
4
  import Icon, { FullScreenM } from "@synerise/ds-icon";
6
5
  import { Input } from "@synerise/ds-input";
7
6
  import { TextWrapper, InputWrapper, IconWrapper } from "./Text.styles.js";
@@ -27,7 +26,6 @@ const TextInput = ({
27
26
  const [inputRef, setInputRef] = useState();
28
27
  const [localValue, setLocalValue] = useState(() => value);
29
28
  const [localError, setLocalError] = useState(false);
30
- const theme = useTheme();
31
29
  useEffect(() => {
32
30
  if (inputRef?.current && opened) {
33
31
  inputRef.current.focus();
@@ -76,7 +74,7 @@ const TextInput = ({
76
74
  return /* @__PURE__ */ jsx(InputWrapper, { children: /* @__PURE__ */ jsx(Input, { ...inputProps, ...extraInputProps, handleInputRef: setInputRef, placeholder: texts.valuePlaceholder, value: localValue, onChange: handleChange, onBlur: onDeactivate, onFocus: onActivate, error: localError || error, readOnly, resetMargin: true }) });
77
75
  }
78
76
  return /* @__PURE__ */ jsxs(Fragment, { children: [
79
- /* @__PURE__ */ jsx(InputWrapper, { children: /* @__PURE__ */ jsx(Input, { ...inputProps, ...extraInputProps, handleInputRef: setInputRef, placeholder: texts.valuePlaceholder, icon1: /* @__PURE__ */ jsx(IconWrapper, { onClick: () => setOpenExpanseEditor(true), children: !readOnly && /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(FullScreenM, { "data-testid": "ds-factors-expansible-icon" }), color: theme.palette["grey-600"] }) }), value: localValue, onChange: handleChange, onBlur: onDeactivate, onFocus: onActivate, error: localError || error, readOnly, resetMargin: true }) }),
77
+ /* @__PURE__ */ jsx(InputWrapper, { children: /* @__PURE__ */ jsx(Input, { ...inputProps, ...extraInputProps, handleInputRef: setInputRef, placeholder: texts.valuePlaceholder, icon1: /* @__PURE__ */ jsx(IconWrapper, { onClick: () => setOpenExpanseEditor(true), children: !readOnly && /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(FullScreenM, { "data-testid": "ds-factors-expansible-icon" }) }) }), value: localValue, onChange: handleChange, onBlur: onDeactivate, onFocus: onActivate, error: localError || error, readOnly, resetMargin: true }) }),
80
78
  /* @__PURE__ */ jsx(TextModal, { visible: openExpanseEditor, onCancel: () => setOpenExpanseEditor(false), value: localValue, onApply: handleApply, texts })
81
79
  ] });
82
80
  };
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  const IconWrapper = /* @__PURE__ */ styled.span.withConfig({
3
3
  displayName: "Textstyles__IconWrapper",
4
4
  componentId: "sc-rjr8p0-0"
5
- })(["&:hover{cursor:pointer;svg{color:", ";fill:", ";}}"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"]);
5
+ })(["color:var(--ds-form-icon-color-default);&:hover{cursor:pointer;color:var(--ds-color-icon-brand-default);}"]);
6
6
  const InputWrapper = /* @__PURE__ */ styled.div.withConfig({
7
7
  displayName: "Textstyles__InputWrapper",
8
8
  componentId: "sc-rjr8p0-1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-factors",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "Factors UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,34 +42,34 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-autocomplete": "^2.0.11",
46
- "@synerise/ds-badge": "^2.0.10",
47
- "@synerise/ds-button": "^2.1.5",
48
- "@synerise/ds-button-group": "^2.0.10",
49
- "@synerise/ds-collector": "^2.0.11",
50
- "@synerise/ds-date-picker": "^2.1.8",
51
- "@synerise/ds-date-range-picker": "^2.1.8",
52
- "@synerise/ds-divider": "^2.0.10",
53
- "@synerise/ds-dropdown": "^2.1.7",
54
- "@synerise/ds-empty-states": "^2.0.8",
55
- "@synerise/ds-icon": "^2.2.3",
56
- "@synerise/ds-information-card": "^2.0.13",
57
- "@synerise/ds-inline-alert": "^2.0.8",
58
- "@synerise/ds-inline-edit": "^2.0.11",
59
- "@synerise/ds-input": "^2.0.11",
60
- "@synerise/ds-input-number": "^2.0.11",
61
- "@synerise/ds-list-item": "^2.2.3",
62
- "@synerise/ds-modal": "^2.1.0",
63
- "@synerise/ds-result": "^2.0.10",
64
- "@synerise/ds-scrollbar": "^2.0.9",
65
- "@synerise/ds-search": "^2.0.10",
66
- "@synerise/ds-select": "^2.1.7",
67
- "@synerise/ds-short-cuts": "^2.0.10",
68
- "@synerise/ds-skeleton": "^2.0.10",
69
- "@synerise/ds-tabs": "^2.0.11",
70
- "@synerise/ds-tag": "^2.0.10",
71
- "@synerise/ds-tooltip": "^2.0.10",
72
- "@synerise/ds-utils": "^2.2.2",
45
+ "@synerise/ds-autocomplete": "^2.1.0",
46
+ "@synerise/ds-badge": "^2.1.0",
47
+ "@synerise/ds-button": "^2.2.0",
48
+ "@synerise/ds-button-group": "^2.1.0",
49
+ "@synerise/ds-collector": "^2.1.0",
50
+ "@synerise/ds-date-picker": "^2.2.0",
51
+ "@synerise/ds-date-range-picker": "^2.3.0",
52
+ "@synerise/ds-divider": "^2.1.0",
53
+ "@synerise/ds-dropdown": "^2.2.0",
54
+ "@synerise/ds-empty-states": "^2.1.0",
55
+ "@synerise/ds-icon": "^2.3.0",
56
+ "@synerise/ds-information-card": "^2.1.0",
57
+ "@synerise/ds-inline-alert": "^2.1.0",
58
+ "@synerise/ds-inline-edit": "^2.1.0",
59
+ "@synerise/ds-input": "^2.1.0",
60
+ "@synerise/ds-input-number": "^2.1.0",
61
+ "@synerise/ds-list-item": "^2.3.0",
62
+ "@synerise/ds-modal": "^2.2.0",
63
+ "@synerise/ds-result": "^2.1.0",
64
+ "@synerise/ds-scrollbar": "^2.1.0",
65
+ "@synerise/ds-search": "^2.1.0",
66
+ "@synerise/ds-select": "^2.2.0",
67
+ "@synerise/ds-short-cuts": "^2.1.0",
68
+ "@synerise/ds-skeleton": "^2.1.0",
69
+ "@synerise/ds-tabs": "^2.1.0",
70
+ "@synerise/ds-tag": "^2.1.0",
71
+ "@synerise/ds-tooltip": "^2.1.0",
72
+ "@synerise/ds-utils": "^2.3.0",
73
73
  "lodash.merge": "^4.6.2",
74
74
  "react-window": "^1.8.11"
75
75
  },
@@ -84,5 +84,5 @@
84
84
  "react-intl": ">=3.12.0 <= 6.8",
85
85
  "styled-components": "^5.3.3"
86
86
  },
87
- "gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
87
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
88
88
  }