@synerise/ds-condition 2.1.2 → 2.2.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.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@2.1.3...@synerise/ds-condition@2.2.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.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@2.1.2...@synerise/ds-condition@2.1.3) (2026-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-condition
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@2.1.1...@synerise/ds-condition@2.1.2) (2026-10-26)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-condition
|
package/dist/Condition.style.js
CHANGED
|
@@ -6,7 +6,7 @@ import { InputGroupItem } from "@synerise/ds-input/dist/InputGroup.styles";
|
|
|
6
6
|
const ErrorWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "Conditionstyle__ErrorWrapper",
|
|
8
8
|
componentId: "sc-1lk06p3-0"
|
|
9
|
-
})(["color:
|
|
9
|
+
})(["color:var(--ds-color-text-danger-default);margin-top:8px;"]);
|
|
10
10
|
const DragIcon = /* @__PURE__ */ styled(Icon).withConfig({
|
|
11
11
|
displayName: "Conditionstyle__DragIcon",
|
|
12
12
|
componentId: "sc-1lk06p3-1"
|
|
@@ -22,7 +22,7 @@ const StepConditions = /* @__PURE__ */ styled.div.withConfig({
|
|
|
22
22
|
const StepName = /* @__PURE__ */ styled.div.withConfig({
|
|
23
23
|
displayName: "Conditionstyle__StepName",
|
|
24
24
|
componentId: "sc-1lk06p3-4"
|
|
25
|
-
})(["font-size:13px;line-height:1.84;color:
|
|
25
|
+
})(["font-size:13px;line-height:1.84;color:var(--ds-color-text-base-default);display:flex;flex-direction:row;align-items:center;justify-content:flex-start;white-space:pre-wrap;gap:8px;&&& input{margin-top:2px;cursor:default;}"]);
|
|
26
26
|
const StepIndexWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
27
27
|
displayName: "Conditionstyle__StepIndexWrapper",
|
|
28
28
|
componentId: "sc-1lk06p3-5"
|
|
@@ -54,13 +54,13 @@ const StepHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
|
54
54
|
const DraggedLabel = /* @__PURE__ */ styled.span.withConfig({
|
|
55
55
|
displayName: "Conditionstyle__DraggedLabel",
|
|
56
56
|
componentId: "sc-1lk06p3-12"
|
|
57
|
-
})(["width:100%;height:100%;display:none;position:absolute;top:0;left:0;align-items:center;justify-content:flex-start;padding-left:18px;color:
|
|
57
|
+
})(["width:100%;height:100%;display:none;position:absolute;top:0;left:0;align-items:center;justify-content:flex-start;padding-left:18px;color:var(--ds-color-text-base-muted);font-size:13px;"]);
|
|
58
58
|
const Step = /* @__PURE__ */ styled.div.withConfig({
|
|
59
59
|
displayName: "Conditionstyle__Step",
|
|
60
60
|
componentId: "sc-1lk06p3-13"
|
|
61
61
|
})(["padding:", ";position:relative;", " ", " &:hover{", ";", "{opacity:1;visibility:visible;}", "{opacity:1;visibility:visible;}", "{opacity:1;visibility:visible;}}"], ({
|
|
62
62
|
singleStepCondition
|
|
63
|
-
}) => singleStepCondition ? "24px 0" : "12px 0", (props) => props.showSuffix && css(["&:after{display:flex;width:100%;padding:18px 0 18px 24px;bottom:-18px;content:attr(data-conditionSuffix);background-color:
|
|
63
|
+
}) => singleStepCondition ? "24px 0" : "12px 0", (props) => props.showSuffix && css(["&:after{display:flex;width:100%;padding:18px 0 18px 24px;bottom:-18px;content:attr(data-conditionSuffix);background-color:var(--ds-color-background-base-default);position:relative;font-size:16px;font-weight:500;color:var(--ds-color-text-base-default);}"]), (props) => props.active && !props.singleStepCondition && css(["&:hover{background-color:var(--ds-color-background-base-subtle);}"]), (props) => !props.hoverDisabled && `background-color: var(--ds-color-background-base-subtle)`, StepCruds, StepConditionCruds, DragIcon);
|
|
64
64
|
const DropLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
65
65
|
displayName: "Conditionstyle__DropLabel",
|
|
66
66
|
componentId: "sc-1lk06p3-14"
|
|
@@ -76,7 +76,7 @@ const DragLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
|
76
76
|
const StepWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
77
77
|
displayName: "Conditionstyle__StepWrapper",
|
|
78
78
|
componentId: "sc-1lk06p3-17"
|
|
79
|
-
})(["", " ", ""], (props) => props.isDragOverlay && css(["", "{display:none;}height:50px;overflow:hidden;cursor:grabbing;background:
|
|
79
|
+
})(["", " ", ""], (props) => props.isDragOverlay && css(["", "{display:none;}height:50px;overflow:hidden;cursor:grabbing;background:var(--ds-color-background-base-default);box-shadow:var(--ds-shadows-shadow-2);display:flex;align-items:center;", "{display:flex;}"], Step, DragLabel), (props) => props.isDragged && css(["", "{display:none;}", "{display:block;}height:50px;overflow:hidden;display:flex;align-items:center;justify-content:center;background-color:var(--ds-color-background-brand-subtle);color:var(--ds-color-text-brand-default);border-left:2px solid var(--ds-color-border-brand-default);"], Step, DropLabel));
|
|
80
80
|
const Subject = /* @__PURE__ */ styled.div.withConfig({
|
|
81
81
|
displayName: "Conditionstyle__Subject",
|
|
82
82
|
componentId: "sc-1lk06p3-18"
|
|
@@ -122,7 +122,7 @@ const AddConditionRow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
122
122
|
const ConditionConnections = /* @__PURE__ */ styled.span.withConfig({
|
|
123
123
|
displayName: "Conditionstyle__ConditionConnections",
|
|
124
124
|
componentId: "sc-1lk06p3-28"
|
|
125
|
-
})(["display:flex;width:32px;min-width:32px;margin:0 12px;position:relative;height:32px;&:before{position:absolute;content:'';width:", ";height:1px;top:16px;left:", ";background-color:
|
|
125
|
+
})(["display:flex;width:32px;min-width:32px;margin:0 12px;position:relative;height:32px;&:before{position:absolute;content:'';width:", ";height:1px;top:16px;left:", ";background-color:var(--ds-color-border-base-strong);}&:after{display:", ";position:absolute;content:'';width:1px;left:50%;height:auto;top:", ";bottom:", ";background-color:var(--ds-color-border-base-strong);}"], (props) => props.first ? "100%" : "16px", (props) => props.first ? "0" : "16px", (props) => props.first && props.last || props.last && props.readOnly ? "none" : "flex", (props) => props.first ? "16px" : "0", (props) => props.last ? "16px" : "-100%");
|
|
126
126
|
const ConditionRow = /* @__PURE__ */ styled.div.withConfig({
|
|
127
127
|
displayName: "Conditionstyle__ConditionRow",
|
|
128
128
|
componentId: "sc-1lk06p3-29"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { theme } from "@synerise/ds-core";
|
|
4
3
|
import Factors from "@synerise/ds-factors";
|
|
5
4
|
import Icon, { CloseS } from "@synerise/ds-icon";
|
|
6
5
|
import Operators from "@synerise/ds-operators";
|
|
@@ -53,7 +52,7 @@ const ConditionRow = ({
|
|
|
53
52
|
}
|
|
54
53
|
return errorText ? /* @__PURE__ */ jsx(ErrorWrapper, { children: errorText }) : /* @__PURE__ */ jsx(Fragment, {});
|
|
55
54
|
}, [conditionOperatorErrorText, conditionFactorErrorText, conditionParameterErrorText]);
|
|
56
|
-
const removeConditionTrigger = !readOnly && removeCondition && conditionsNumber > minConditionLength && /* @__PURE__ */ jsx(RemoveIconWrapper, { onClick: () => removeCondition(stepId, conditionId), className: "ds-conditions-remove-row", children: /* @__PURE__ */ jsx(Tooltip, { title: texts.removeConditionRowTooltip, trigger: ["hover"], children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), color:
|
|
55
|
+
const removeConditionTrigger = !readOnly && removeCondition && conditionsNumber > minConditionLength && /* @__PURE__ */ jsx(RemoveIconWrapper, { onClick: () => removeCondition(stepId, conditionId), className: "ds-conditions-remove-row", children: /* @__PURE__ */ jsx(Tooltip, { title: texts.removeConditionRowTooltip, trigger: ["hover"], children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), color: "var(--ds-color-icon-danger-default)" }) }) });
|
|
57
56
|
const renderConditionParameterWrapper = Boolean(conditionParameter);
|
|
58
57
|
const renderConditionOperatorWrapper = Boolean((!conditionParameter || conditionParameter?.value && (conditionParameter?.value).name !== "") && conditionOperator);
|
|
59
58
|
const renderConditionFactorWrapper = Boolean(conditionFactor !== void 0 && conditionOperator?.value && conditionFactor?.availableFactorTypes !== null);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from "@synerise/ds-core";
|
|
3
2
|
import Icon, { ClickM } from "@synerise/ds-icon";
|
|
4
3
|
import { EmptyConditionWrapper, LabelWrapper } from "./emptyCondition.styles.js";
|
|
5
4
|
const EmptyCondition = ({
|
|
@@ -7,7 +6,7 @@ const EmptyCondition = ({
|
|
|
7
6
|
label
|
|
8
7
|
}) => {
|
|
9
8
|
return /* @__PURE__ */ jsxs(EmptyConditionWrapper, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Icon, { component: icon, color:
|
|
9
|
+
/* @__PURE__ */ jsx(Icon, { component: icon, color: "var(--ds-color-icon-base-subtle)" }),
|
|
11
10
|
/* @__PURE__ */ jsx(LabelWrapper, { size: "small", children: label })
|
|
12
11
|
] });
|
|
13
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-condition",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Condition UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-button": "^2.
|
|
46
|
-
"@synerise/ds-context-selector": "^2.
|
|
47
|
-
"@synerise/ds-cruds": "^2.0
|
|
48
|
-
"@synerise/ds-factors": "^2.
|
|
49
|
-
"@synerise/ds-icon": "^2.
|
|
50
|
-
"@synerise/ds-inline-edit": "^2.0
|
|
51
|
-
"@synerise/ds-input": "^2.0
|
|
52
|
-
"@synerise/ds-operators": "^2.0
|
|
53
|
-
"@synerise/ds-sortable": "^2.0
|
|
54
|
-
"@synerise/ds-subject": "^2.0
|
|
55
|
-
"@synerise/ds-tooltip": "^2.0
|
|
56
|
-
"@synerise/ds-typography": "^2.0
|
|
57
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-button": "^2.2.0",
|
|
46
|
+
"@synerise/ds-context-selector": "^2.2.0",
|
|
47
|
+
"@synerise/ds-cruds": "^2.1.0",
|
|
48
|
+
"@synerise/ds-factors": "^2.4.0",
|
|
49
|
+
"@synerise/ds-icon": "^2.3.0",
|
|
50
|
+
"@synerise/ds-inline-edit": "^2.1.0",
|
|
51
|
+
"@synerise/ds-input": "^2.1.0",
|
|
52
|
+
"@synerise/ds-operators": "^2.1.0",
|
|
53
|
+
"@synerise/ds-sortable": "^2.1.0",
|
|
54
|
+
"@synerise/ds-subject": "^2.1.0",
|
|
55
|
+
"@synerise/ds-tooltip": "^2.1.0",
|
|
56
|
+
"@synerise/ds-typography": "^2.1.0",
|
|
57
|
+
"@synerise/ds-utils": "^2.3.0",
|
|
58
58
|
"lodash.debounce": "^4.0.8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
69
69
|
"styled-components": "^5.3.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
|
|
72
72
|
}
|