@synerise/ds-logic 2.0.11 → 2.1.1
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.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-logic@2.1.0...@synerise/ds-logic@2.1.1) (2026-11-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-logic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-logic@2.0.11...@synerise/ds-logic@2.1.0) (2026-10-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-logic@2.0.10...@synerise/ds-logic@2.0.11) (2026-10-28)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-logic
|
package/CLAUDE.md
CHANGED
|
@@ -118,11 +118,11 @@ import { Placeholder } from '@synerise/ds-logic';
|
|
|
118
118
|
|
|
119
119
|
## Styling
|
|
120
120
|
|
|
121
|
-
- `Logic`: `styled.div` — dashed bottom border via `::after` pseudo-element (
|
|
122
|
-
- `Matching` toggle: `styled.span` — green (
|
|
121
|
+
- `Logic`: `styled.div` — dashed bottom border via `::after` pseudo-element (`--ds-color-text-base-muted`, hidden in `readOnly`); hover changes text and border to `--ds-color-text-brand-defaulthover`.
|
|
122
|
+
- `Matching` toggle: `styled.span` — green (`--ds-color-background-success-solid` / `-solidactive` hover) when `matching=true`, red (`--ds-color-background-danger-solid` / `-solidactive` hover) when `matching=false`; `--ds-color-text-base-default` when `readOnly`.
|
|
123
123
|
- Both use `user-select: none`.
|
|
124
|
-
- `Placeholder`: fixed `min-height: 63px`,
|
|
125
|
-
- All colour values come from `
|
|
124
|
+
- `Placeholder`: fixed `min-height: 63px`, `--ds-color-background-base-default` background, icon + text centered in a row.
|
|
125
|
+
- All colour values come from `var(--ds-*)` tokens — no hardcoded hex values.
|
|
126
126
|
|
|
127
127
|
## Key dependencies
|
|
128
128
|
|
package/dist/Logic.style.js
CHANGED
|
@@ -3,8 +3,7 @@ const Logic = /* @__PURE__ */ styled.div.withConfig({
|
|
|
3
3
|
displayName: "Logicstyle__Logic",
|
|
4
4
|
componentId: "sc-yp0pif-0"
|
|
5
5
|
})(["user-select:none;position:relative;.ds-title{cursor:pointer;", "}", ""], ({
|
|
6
|
-
readOnly
|
|
7
|
-
theme
|
|
6
|
+
readOnly
|
|
8
7
|
}) => !readOnly ? `&:after {
|
|
9
8
|
position: absolute;
|
|
10
9
|
bottom: -2px;
|
|
@@ -14,23 +13,22 @@ const Logic = /* @__PURE__ */ styled.div.withConfig({
|
|
|
14
13
|
left: 1px;
|
|
15
14
|
background-image: linear-gradient(
|
|
16
15
|
to right,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
var(--ds-color-text-base-muted) 25%,
|
|
17
|
+
transparent 0%
|
|
19
18
|
);
|
|
20
19
|
background-position: top;
|
|
21
20
|
background-size: 4px 1px;
|
|
22
21
|
background-repeat: repeat-x;
|
|
23
22
|
}` : "", ({
|
|
24
|
-
readOnly
|
|
25
|
-
theme
|
|
23
|
+
readOnly
|
|
26
24
|
}) => !readOnly ? ` &:hover {
|
|
27
25
|
.ds-title {
|
|
28
|
-
color:
|
|
26
|
+
color: var(--ds-color-text-brand-defaulthover);
|
|
29
27
|
&:after {
|
|
30
28
|
background-image: linear-gradient(
|
|
31
29
|
to right,
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
var(--ds-color-text-brand-defaulthover) 25%,
|
|
31
|
+
transparent 0%
|
|
34
32
|
);
|
|
35
33
|
}
|
|
36
34
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
const getColor = ({
|
|
3
|
-
theme,
|
|
4
3
|
matching,
|
|
5
4
|
readOnly,
|
|
6
5
|
hovered = false
|
|
7
6
|
}) => {
|
|
8
7
|
if (readOnly) {
|
|
9
|
-
return
|
|
8
|
+
return "var(--ds-color-text-base-default)";
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (matching) {
|
|
11
|
+
return hovered ? "var(--ds-color-background-success-solidactive)" : "var(--ds-color-background-success-solid)";
|
|
12
|
+
}
|
|
13
|
+
return hovered ? "var(--ds-color-background-danger-solidactive)" : "var(--ds-color-background-danger-solid)";
|
|
13
14
|
};
|
|
14
15
|
const MatchingWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
15
16
|
displayName: "Matchingstyles__MatchingWrapper",
|
|
16
17
|
componentId: "sc-7z57qz-0"
|
|
17
|
-
})(["font-size:16px;font-weight:500;line-height:1.25;color:
|
|
18
|
+
})(["font-size:16px;font-weight:500;line-height:1.25;color:var(--ds-color-text-base-default);text-align:left;user-select:none;&:first-letter{text-transform:uppercase;}"]);
|
|
18
19
|
const Toggle = /* @__PURE__ */ styled.span.withConfig({
|
|
19
20
|
displayName: "Matchingstyles__Toggle",
|
|
20
21
|
componentId: "sc-7z57qz-1"
|
|
21
22
|
})(["cursor:pointer;font-size:16px;font-weight:500;line-height:1.25;color:", ";transition:color 0.1s ease-in-out;position:relative;display:inline-flex;", " ", ""], getColor, (props) => {
|
|
22
23
|
const color = getColor(props);
|
|
23
24
|
const {
|
|
24
|
-
readOnly
|
|
25
|
-
theme
|
|
25
|
+
readOnly
|
|
26
26
|
} = props;
|
|
27
27
|
return !readOnly && `
|
|
28
28
|
&:after {
|
|
@@ -35,7 +35,7 @@ const Toggle = /* @__PURE__ */ styled.span.withConfig({
|
|
|
35
35
|
background-image: linear-gradient(
|
|
36
36
|
to right,
|
|
37
37
|
${color} 25%,
|
|
38
|
-
|
|
38
|
+
transparent 0%
|
|
39
39
|
);
|
|
40
40
|
background-position: top;
|
|
41
41
|
background-size: 4px 1px;
|
|
@@ -47,10 +47,9 @@ const Toggle = /* @__PURE__ */ styled.span.withConfig({
|
|
|
47
47
|
hovered: true
|
|
48
48
|
});
|
|
49
49
|
const {
|
|
50
|
-
readOnly
|
|
51
|
-
theme
|
|
50
|
+
readOnly
|
|
52
51
|
} = props;
|
|
53
|
-
return !readOnly && css(["&:hover{color:", ";&:after{background-image:linear-gradient( to right,", " 25%,
|
|
52
|
+
return !readOnly && css(["&:hover{color:", ";&:after{background-image:linear-gradient( to right,", " 25%,transparent 0% );}"], hoveredColor, hoveredColor);
|
|
54
53
|
});
|
|
55
54
|
export {
|
|
56
55
|
MatchingWrapper,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from "@synerise/ds-core";
|
|
3
2
|
import Icon, { ClickM } from "@synerise/ds-icon";
|
|
4
3
|
import { Text } from "@synerise/ds-typography";
|
|
5
4
|
import { PlaceholderContainer } from "./Placeholder.styles.js";
|
|
@@ -7,7 +6,7 @@ const Placeholder = ({
|
|
|
7
6
|
text
|
|
8
7
|
}) => {
|
|
9
8
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(PlaceholderContainer, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Icon, { size: 24, color:
|
|
9
|
+
/* @__PURE__ */ jsx(Icon, { size: 24, color: "var(--ds-color-icon-base-default)", component: /* @__PURE__ */ jsx(ClickM, {}) }),
|
|
11
10
|
/* @__PURE__ */ jsx(Text, { size: "medium", children: text })
|
|
12
11
|
] }) });
|
|
13
12
|
};
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const PlaceholderContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Placeholderstyles__PlaceholderContainer",
|
|
4
4
|
componentId: "sc-1dp40dc-0"
|
|
5
|
-
})(["width:100%;min-height:63px;margin:auto;border-radius:3px;background-color:
|
|
5
|
+
})(["width:100%;min-height:63px;margin:auto;border-radius:3px;background-color:var(--ds-color-background-base-default);display:flex;justify-content:center;align-items:center;flex-direction:row;span.ds-text{display:block;font-size:13px;margin:6px 0 5px 11px;color:var(--ds-color-text-base-muted);}"]);
|
|
6
6
|
export {
|
|
7
7
|
PlaceholderContainer
|
|
8
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-logic",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Logic UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-icon": "^2.
|
|
46
|
-
"@synerise/ds-typography": "^2.
|
|
47
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-icon": "^2.3.1",
|
|
46
|
+
"@synerise/ds-typography": "^2.1.1",
|
|
47
|
+
"@synerise/ds-utils": "^2.3.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"vitest": "4"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
56
56
|
"styled-components": "^5.3.3"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
|
|
59
59
|
}
|